editor.main.js 3.4 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188511895119051191511925119351194511955119651197511985119951200512015120251203512045120551206512075120851209512105121151212512135121451215512165121751218512195122051221512225122351224512255122651227512285122951230512315123251233512345123551236512375123851239512405124151242512435124451245512465124751248512495125051251512525125351254512555125651257512585125951260512615126251263512645126551266512675126851269512705127151272512735127451275512765127751278512795128051281512825128351284512855128651287512885128951290512915129251293512945129551296512975129851299513005130151302513035130451305513065130751308513095131051311513125131351314513155131651317513185131951320513215132251323513245132551326513275132851329513305133151332513335133451335513365133751338513395134051341513425134351344513455134651347513485134951350513515135251353513545135551356513575135851359513605136151362513635136451365513665136751368513695137051371513725137351374513755137651377513785137951380513815138251383513845138551386513875138851389513905139151392513935139451395513965139751398513995140051401514025140351404514055140651407514085140951410514115141251413514145141551416514175141851419514205142151422514235142451425514265142751428514295143051431514325143351434514355143651437514385143951440514415144251443514445144551446514475144851449514505145151452514535145451455514565145751458514595146051461514625146351464514655146651467514685146951470514715147251473514745147551476514775147851479514805148151482514835148451485514865148751488514895149051491514925149351494514955149651497514985149951500515015150251503515045150551506515075150851509515105151151512515135151451515515165151751518515195152051521515225152351524515255152651527515285152951530515315153251533515345153551536515375153851539515405154151542515435154451545515465154751548515495155051551515525155351554515555155651557515585155951560515615156251563515645156551566515675156851569515705157151572515735157451575515765157751578515795158051581515825158351584515855158651587515885158951590515915159251593515945159551596515975159851599516005160151602516035160451605516065160751608516095161051611516125161351614516155161651617516185161951620516215162251623516245162551626516275162851629516305163151632516335163451635516365163751638516395164051641516425164351644516455164651647516485164951650516515165251653516545165551656516575165851659516605166151662516635166451665516665166751668516695167051671516725167351674516755167651677516785167951680516815168251683516845168551686516875168851689516905169151692516935169451695516965169751698516995170051701517025170351704517055170651707517085170951710517115171251713517145171551716517175171851719517205172151722517235172451725517265172751728517295173051731517325173351734517355173651737517385173951740517415174251743517445174551746517475174851749517505175151752517535175451755517565175751758517595176051761517625176351764517655176651767517685176951770517715177251773517745177551776517775177851779517805178151782517835178451785517865178751788517895179051791517925179351794517955179651797517985179951800518015180251803518045180551806518075180851809518105181151812518135181451815518165181751818518195182051821518225182351824518255182651827518285182951830518315183251833518345183551836518375183851839518405184151842518435184451845518465184751848518495185051851518525185351854518555185651857518585185951860518615186251863518645186551866518675186851869518705187151872518735187451875518765187751878518795188051881518825188351884518855188651887518885188951890518915189251893518945189551896518975189851899519005190151902519035190451905519065190751908519095191051911519125191351914519155191651917519185191951920519215192251923519245192551926519275192851929519305193151932519335193451935519365193751938519395194051941519425194351944519455194651947519485194951950519515195251953519545195551956519575195851959519605196151962519635196451965519665196751968519695197051971519725197351974519755197651977519785197951980519815198251983519845198551986519875198851989519905199151992519935199451995519965199751998519995200052001520025200352004520055200652007520085200952010520115201252013520145201552016520175201852019520205202152022520235202452025520265202752028520295203052031520325203352034520355203652037520385203952040520415204252043520445204552046520475204852049520505205152052520535205452055520565205752058520595206052061520625206352064520655206652067520685206952070520715207252073520745207552076520775207852079520805208152082520835208452085520865208752088520895209052091520925209352094520955209652097520985209952100521015210252103521045210552106521075210852109521105211152112521135211452115521165211752118521195212052121521225212352124521255212652127521285212952130521315213252133521345213552136521375213852139521405214152142521435214452145521465214752148521495215052151521525215352154521555215652157521585215952160521615216252163521645216552166521675216852169521705217152172521735217452175521765217752178521795218052181521825218352184521855218652187521885218952190521915219252193521945219552196521975219852199522005220152202522035220452205522065220752208522095221052211522125221352214522155221652217522185221952220522215222252223522245222552226522275222852229522305223152232522335223452235522365223752238522395224052241522425224352244522455224652247522485224952250522515225252253522545225552256522575225852259522605226152262522635226452265522665226752268522695227052271522725227352274522755227652277522785227952280522815228252283522845228552286522875228852289522905229152292522935229452295522965229752298522995230052301523025230352304523055230652307523085230952310523115231252313523145231552316523175231852319523205232152322523235232452325523265232752328523295233052331523325233352334523355233652337523385233952340523415234252343523445234552346523475234852349523505235152352523535235452355523565235752358523595236052361523625236352364523655236652367523685236952370523715237252373523745237552376523775237852379523805238152382523835238452385523865238752388523895239052391523925239352394523955239652397523985239952400524015240252403524045240552406524075240852409524105241152412524135241452415524165241752418524195242052421524225242352424524255242652427524285242952430524315243252433524345243552436524375243852439524405244152442524435244452445524465244752448524495245052451524525245352454524555245652457524585245952460524615246252463524645246552466524675246852469524705247152472524735247452475524765247752478524795248052481524825248352484524855248652487524885248952490524915249252493524945249552496524975249852499525005250152502525035250452505525065250752508525095251052511525125251352514525155251652517525185251952520525215252252523525245252552526525275252852529525305253152532525335253452535525365253752538525395254052541525425254352544525455254652547525485254952550525515255252553525545255552556525575255852559525605256152562525635256452565525665256752568525695257052571525725257352574525755257652577525785257952580525815258252583525845258552586525875258852589525905259152592525935259452595525965259752598525995260052601526025260352604526055260652607526085260952610526115261252613526145261552616526175261852619526205262152622526235262452625526265262752628526295263052631526325263352634526355263652637526385263952640526415264252643526445264552646526475264852649526505265152652526535265452655526565265752658526595266052661526625266352664526655266652667526685266952670526715267252673526745267552676526775267852679526805268152682526835268452685526865268752688526895269052691526925269352694526955269652697526985269952700527015270252703527045270552706527075270852709527105271152712527135271452715527165271752718527195272052721527225272352724527255272652727527285272952730527315273252733527345273552736527375273852739527405274152742527435274452745527465274752748527495275052751527525275352754527555275652757527585275952760527615276252763527645276552766527675276852769527705277152772527735277452775527765277752778527795278052781527825278352784527855278652787527885278952790527915279252793527945279552796527975279852799528005280152802528035280452805528065280752808528095281052811528125281352814528155281652817528185281952820528215282252823528245282552826528275282852829528305283152832528335283452835528365283752838528395284052841528425284352844528455284652847528485284952850528515285252853528545285552856528575285852859528605286152862528635286452865528665286752868528695287052871528725287352874528755287652877528785287952880528815288252883528845288552886528875288852889528905289152892528935289452895528965289752898528995290052901529025290352904529055290652907529085290952910529115291252913529145291552916529175291852919529205292152922529235292452925529265292752928529295293052931529325293352934529355293652937529385293952940529415294252943529445294552946529475294852949529505295152952529535295452955529565295752958529595296052961529625296352964529655296652967529685296952970529715297252973529745297552976529775297852979529805298152982529835298452985529865298752988529895299052991529925299352994529955299652997529985299953000530015300253003530045300553006530075300853009530105301153012530135301453015530165301753018530195302053021530225302353024530255302653027530285302953030530315303253033530345303553036530375303853039530405304153042530435304453045530465304753048530495305053051530525305353054530555305653057530585305953060530615306253063530645306553066530675306853069530705307153072530735307453075530765307753078530795308053081530825308353084530855308653087530885308953090530915309253093530945309553096530975309853099531005310153102531035310453105531065310753108531095311053111531125311353114531155311653117531185311953120531215312253123531245312553126531275312853129531305313153132531335313453135531365313753138531395314053141531425314353144531455314653147531485314953150531515315253153531545315553156531575315853159531605316153162531635316453165531665316753168531695317053171531725317353174531755317653177531785317953180531815318253183531845318553186531875318853189531905319153192531935319453195531965319753198531995320053201532025320353204532055320653207532085320953210532115321253213532145321553216532175321853219532205322153222532235322453225532265322753228532295323053231532325323353234532355323653237532385323953240532415324253243532445324553246532475324853249532505325153252532535325453255532565325753258532595326053261532625326353264532655326653267532685326953270532715327253273532745327553276532775327853279532805328153282532835328453285532865328753288532895329053291532925329353294532955329653297532985329953300533015330253303533045330553306533075330853309533105331153312533135331453315533165331753318533195332053321533225332353324533255332653327533285332953330533315333253333533345333553336533375333853339533405334153342533435334453345533465334753348533495335053351533525335353354533555335653357533585335953360533615336253363533645336553366533675336853369533705337153372533735337453375533765337753378533795338053381533825338353384533855338653387533885338953390533915339253393533945339553396533975339853399534005340153402534035340453405534065340753408534095341053411534125341353414534155341653417534185341953420534215342253423534245342553426534275342853429534305343153432534335343453435534365343753438534395344053441534425344353444534455344653447534485344953450534515345253453534545345553456534575345853459534605346153462534635346453465534665346753468534695347053471534725347353474534755347653477534785347953480534815348253483534845348553486534875348853489534905349153492534935349453495534965349753498534995350053501535025350353504535055350653507535085350953510535115351253513535145351553516535175351853519535205352153522535235352453525535265352753528535295353053531535325353353534535355353653537535385353953540535415354253543535445354553546535475354853549535505355153552535535355453555535565355753558535595356053561535625356353564535655356653567535685356953570535715357253573535745357553576535775357853579535805358153582535835358453585535865358753588535895359053591535925359353594535955359653597535985359953600536015360253603536045360553606536075360853609536105361153612536135361453615536165361753618536195362053621536225362353624536255362653627536285362953630536315363253633536345363553636536375363853639536405364153642536435364453645536465364753648536495365053651536525365353654536555365653657536585365953660536615366253663536645366553666536675366853669536705367153672536735367453675536765367753678536795368053681536825368353684536855368653687536885368953690536915369253693536945369553696536975369853699537005370153702537035370453705537065370753708537095371053711537125371353714537155371653717537185371953720537215372253723537245372553726537275372853729537305373153732537335373453735537365373753738537395374053741537425374353744537455374653747537485374953750537515375253753537545375553756537575375853759537605376153762537635376453765537665376753768537695377053771537725377353774537755377653777537785377953780537815378253783537845378553786537875378853789537905379153792537935379453795537965379753798537995380053801538025380353804538055380653807538085380953810538115381253813538145381553816538175381853819538205382153822538235382453825538265382753828538295383053831538325383353834538355383653837538385383953840538415384253843538445384553846538475384853849538505385153852538535385453855538565385753858538595386053861538625386353864538655386653867538685386953870538715387253873538745387553876538775387853879538805388153882538835388453885538865388753888538895389053891538925389353894538955389653897538985389953900539015390253903539045390553906539075390853909539105391153912539135391453915539165391753918539195392053921539225392353924539255392653927539285392953930539315393253933539345393553936539375393853939539405394153942539435394453945539465394753948539495395053951539525395353954539555395653957539585395953960539615396253963539645396553966539675396853969539705397153972539735397453975539765397753978539795398053981539825398353984539855398653987539885398953990539915399253993539945399553996539975399853999540005400154002540035400454005540065400754008540095401054011540125401354014540155401654017540185401954020540215402254023540245402554026540275402854029540305403154032540335403454035540365403754038540395404054041540425404354044540455404654047540485404954050540515405254053540545405554056540575405854059540605406154062540635406454065540665406754068540695407054071540725407354074540755407654077540785407954080540815408254083540845408554086540875408854089540905409154092540935409454095540965409754098540995410054101541025410354104541055410654107541085410954110541115411254113541145411554116541175411854119541205412154122541235412454125541265412754128541295413054131541325413354134541355413654137541385413954140541415414254143541445414554146541475414854149541505415154152541535415454155541565415754158541595416054161541625416354164541655416654167541685416954170541715417254173541745417554176541775417854179541805418154182541835418454185541865418754188541895419054191541925419354194541955419654197541985419954200542015420254203542045420554206542075420854209542105421154212542135421454215542165421754218542195422054221542225422354224542255422654227542285422954230542315423254233542345423554236542375423854239542405424154242542435424454245542465424754248542495425054251542525425354254542555425654257542585425954260542615426254263542645426554266542675426854269542705427154272542735427454275542765427754278542795428054281542825428354284542855428654287542885428954290542915429254293542945429554296542975429854299543005430154302543035430454305543065430754308543095431054311543125431354314543155431654317543185431954320543215432254323543245432554326543275432854329543305433154332543335433454335543365433754338543395434054341543425434354344543455434654347543485434954350543515435254353543545435554356543575435854359543605436154362543635436454365543665436754368543695437054371543725437354374543755437654377543785437954380543815438254383543845438554386543875438854389543905439154392543935439454395543965439754398543995440054401544025440354404544055440654407544085440954410544115441254413544145441554416544175441854419544205442154422544235442454425544265442754428544295443054431544325443354434544355443654437544385443954440544415444254443544445444554446544475444854449544505445154452544535445454455544565445754458544595446054461544625446354464544655446654467544685446954470544715447254473544745447554476544775447854479544805448154482544835448454485544865448754488544895449054491544925449354494544955449654497544985449954500545015450254503545045450554506545075450854509545105451154512545135451454515545165451754518545195452054521545225452354524545255452654527545285452954530545315453254533545345453554536545375453854539545405454154542545435454454545545465454754548545495455054551545525455354554545555455654557545585455954560545615456254563545645456554566545675456854569545705457154572545735457454575545765457754578545795458054581545825458354584545855458654587545885458954590545915459254593545945459554596545975459854599546005460154602546035460454605546065460754608546095461054611546125461354614546155461654617546185461954620546215462254623546245462554626546275462854629546305463154632546335463454635546365463754638546395464054641546425464354644546455464654647546485464954650546515465254653546545465554656546575465854659546605466154662546635466454665546665466754668546695467054671546725467354674546755467654677546785467954680546815468254683546845468554686546875468854689546905469154692546935469454695546965469754698546995470054701547025470354704547055470654707547085470954710547115471254713547145471554716547175471854719547205472154722547235472454725547265472754728547295473054731547325473354734547355473654737547385473954740547415474254743547445474554746547475474854749547505475154752547535475454755547565475754758547595476054761547625476354764547655476654767547685476954770547715477254773547745477554776547775477854779547805478154782547835478454785547865478754788547895479054791547925479354794547955479654797547985479954800548015480254803548045480554806548075480854809548105481154812548135481454815548165481754818548195482054821548225482354824548255482654827548285482954830548315483254833548345483554836548375483854839548405484154842548435484454845548465484754848548495485054851548525485354854548555485654857548585485954860548615486254863548645486554866548675486854869548705487154872548735487454875548765487754878548795488054881548825488354884548855488654887548885488954890548915489254893548945489554896548975489854899549005490154902549035490454905549065490754908549095491054911549125491354914549155491654917549185491954920549215492254923549245492554926549275492854929549305493154932549335493454935549365493754938549395494054941549425494354944549455494654947549485494954950549515495254953549545495554956549575495854959549605496154962549635496454965549665496754968549695497054971549725497354974549755497654977549785497954980549815498254983549845498554986549875498854989549905499154992549935499454995549965499754998549995500055001550025500355004550055500655007550085500955010550115501255013550145501555016550175501855019550205502155022550235502455025550265502755028550295503055031550325503355034550355503655037550385503955040550415504255043550445504555046550475504855049550505505155052550535505455055550565505755058550595506055061550625506355064550655506655067550685506955070550715507255073550745507555076550775507855079550805508155082550835508455085550865508755088550895509055091550925509355094550955509655097550985509955100551015510255103551045510555106551075510855109551105511155112551135511455115551165511755118551195512055121551225512355124551255512655127551285512955130551315513255133551345513555136551375513855139551405514155142551435514455145551465514755148551495515055151551525515355154551555515655157551585515955160551615516255163551645516555166551675516855169551705517155172551735517455175551765517755178551795518055181551825518355184551855518655187551885518955190551915519255193551945519555196551975519855199552005520155202552035520455205552065520755208552095521055211552125521355214552155521655217552185521955220552215522255223552245522555226552275522855229552305523155232552335523455235552365523755238552395524055241552425524355244552455524655247552485524955250552515525255253552545525555256552575525855259552605526155262552635526455265552665526755268552695527055271552725527355274552755527655277552785527955280552815528255283552845528555286552875528855289552905529155292552935529455295552965529755298552995530055301553025530355304553055530655307553085530955310553115531255313553145531555316553175531855319553205532155322553235532455325553265532755328553295533055331553325533355334553355533655337553385533955340553415534255343553445534555346553475534855349553505535155352553535535455355553565535755358553595536055361553625536355364553655536655367553685536955370553715537255373553745537555376553775537855379553805538155382553835538455385553865538755388553895539055391553925539355394553955539655397553985539955400554015540255403554045540555406554075540855409554105541155412554135541455415554165541755418554195542055421554225542355424554255542655427554285542955430554315543255433554345543555436554375543855439554405544155442554435544455445554465544755448554495545055451554525545355454554555545655457554585545955460554615546255463554645546555466554675546855469554705547155472554735547455475554765547755478554795548055481554825548355484554855548655487554885548955490554915549255493554945549555496554975549855499555005550155502555035550455505555065550755508555095551055511555125551355514555155551655517555185551955520555215552255523555245552555526555275552855529555305553155532555335553455535555365553755538555395554055541555425554355544555455554655547555485554955550555515555255553555545555555556555575555855559555605556155562555635556455565555665556755568555695557055571555725557355574555755557655577555785557955580555815558255583555845558555586555875558855589555905559155592555935559455595555965559755598555995560055601556025560355604556055560655607556085560955610556115561255613556145561555616556175561855619556205562155622556235562455625556265562755628556295563055631556325563355634556355563655637556385563955640556415564255643556445564555646556475564855649556505565155652556535565455655556565565755658556595566055661556625566355664556655566655667556685566955670556715567255673556745567555676556775567855679556805568155682556835568455685556865568755688556895569055691556925569355694556955569655697556985569955700557015570255703557045570555706557075570855709557105571155712557135571455715557165571755718557195572055721557225572355724557255572655727557285572955730557315573255733557345573555736557375573855739557405574155742557435574455745557465574755748557495575055751557525575355754557555575655757557585575955760557615576255763557645576555766557675576855769557705577155772557735577455775557765577755778557795578055781557825578355784557855578655787557885578955790557915579255793557945579555796557975579855799558005580155802558035580455805558065580755808558095581055811558125581355814558155581655817558185581955820558215582255823558245582555826558275582855829558305583155832558335583455835558365583755838558395584055841558425584355844558455584655847558485584955850558515585255853558545585555856558575585855859558605586155862558635586455865558665586755868558695587055871558725587355874558755587655877558785587955880558815588255883558845588555886558875588855889558905589155892558935589455895558965589755898558995590055901559025590355904559055590655907559085590955910559115591255913559145591555916559175591855919559205592155922559235592455925559265592755928559295593055931559325593355934559355593655937559385593955940559415594255943559445594555946559475594855949559505595155952559535595455955559565595755958559595596055961559625596355964559655596655967559685596955970559715597255973559745597555976559775597855979559805598155982559835598455985559865598755988559895599055991559925599355994559955599655997559985599956000560015600256003560045600556006560075600856009560105601156012560135601456015560165601756018560195602056021560225602356024560255602656027560285602956030560315603256033560345603556036560375603856039560405604156042560435604456045560465604756048560495605056051560525605356054560555605656057560585605956060560615606256063560645606556066560675606856069560705607156072560735607456075560765607756078560795608056081560825608356084560855608656087560885608956090560915609256093560945609556096560975609856099561005610156102561035610456105561065610756108561095611056111561125611356114561155611656117561185611956120561215612256123561245612556126561275612856129561305613156132561335613456135561365613756138561395614056141561425614356144561455614656147561485614956150561515615256153561545615556156561575615856159561605616156162561635616456165561665616756168561695617056171561725617356174561755617656177561785617956180561815618256183561845618556186561875618856189561905619156192561935619456195561965619756198561995620056201562025620356204562055620656207562085620956210562115621256213562145621556216562175621856219562205622156222562235622456225562265622756228562295623056231562325623356234562355623656237562385623956240562415624256243562445624556246562475624856249562505625156252562535625456255562565625756258562595626056261562625626356264562655626656267562685626956270562715627256273562745627556276562775627856279562805628156282562835628456285562865628756288562895629056291562925629356294562955629656297562985629956300563015630256303563045630556306563075630856309563105631156312563135631456315563165631756318563195632056321563225632356324563255632656327563285632956330563315633256333563345633556336563375633856339563405634156342563435634456345563465634756348563495635056351563525635356354563555635656357563585635956360563615636256363563645636556366563675636856369563705637156372563735637456375563765637756378563795638056381563825638356384563855638656387563885638956390563915639256393563945639556396563975639856399564005640156402564035640456405564065640756408564095641056411564125641356414564155641656417564185641956420564215642256423564245642556426564275642856429564305643156432564335643456435564365643756438564395644056441564425644356444564455644656447564485644956450564515645256453564545645556456564575645856459564605646156462564635646456465564665646756468564695647056471564725647356474564755647656477564785647956480564815648256483564845648556486564875648856489564905649156492564935649456495564965649756498564995650056501565025650356504565055650656507565085650956510565115651256513565145651556516565175651856519565205652156522565235652456525565265652756528565295653056531565325653356534565355653656537565385653956540565415654256543565445654556546565475654856549565505655156552565535655456555565565655756558565595656056561565625656356564565655656656567565685656956570565715657256573565745657556576565775657856579565805658156582565835658456585565865658756588565895659056591565925659356594565955659656597565985659956600566015660256603566045660556606566075660856609566105661156612566135661456615566165661756618566195662056621566225662356624566255662656627566285662956630566315663256633566345663556636566375663856639566405664156642566435664456645566465664756648566495665056651566525665356654566555665656657566585665956660566615666256663566645666556666566675666856669566705667156672566735667456675566765667756678566795668056681566825668356684566855668656687566885668956690566915669256693566945669556696566975669856699567005670156702567035670456705567065670756708567095671056711567125671356714567155671656717567185671956720567215672256723567245672556726567275672856729567305673156732567335673456735567365673756738567395674056741567425674356744567455674656747567485674956750567515675256753567545675556756567575675856759567605676156762567635676456765567665676756768567695677056771567725677356774567755677656777567785677956780567815678256783567845678556786567875678856789567905679156792567935679456795567965679756798567995680056801568025680356804568055680656807568085680956810568115681256813568145681556816568175681856819568205682156822568235682456825568265682756828568295683056831568325683356834568355683656837568385683956840568415684256843568445684556846568475684856849568505685156852568535685456855568565685756858568595686056861568625686356864568655686656867568685686956870568715687256873568745687556876568775687856879568805688156882568835688456885568865688756888568895689056891568925689356894568955689656897568985689956900569015690256903569045690556906569075690856909569105691156912569135691456915569165691756918569195692056921569225692356924569255692656927569285692956930569315693256933569345693556936569375693856939569405694156942569435694456945569465694756948569495695056951569525695356954569555695656957569585695956960569615696256963569645696556966569675696856969569705697156972569735697456975569765697756978569795698056981569825698356984569855698656987569885698956990569915699256993569945699556996569975699856999570005700157002570035700457005570065700757008570095701057011570125701357014570155701657017570185701957020570215702257023570245702557026570275702857029570305703157032570335703457035570365703757038570395704057041570425704357044570455704657047570485704957050570515705257053570545705557056570575705857059570605706157062570635706457065570665706757068570695707057071570725707357074570755707657077570785707957080570815708257083570845708557086570875708857089570905709157092570935709457095570965709757098570995710057101571025710357104571055710657107571085710957110571115711257113571145711557116571175711857119571205712157122571235712457125571265712757128571295713057131571325713357134571355713657137571385713957140571415714257143571445714557146571475714857149571505715157152571535715457155571565715757158571595716057161571625716357164571655716657167571685716957170571715717257173571745717557176571775717857179571805718157182571835718457185571865718757188571895719057191571925719357194571955719657197571985719957200572015720257203572045720557206572075720857209572105721157212572135721457215572165721757218572195722057221572225722357224572255722657227572285722957230572315723257233572345723557236572375723857239572405724157242572435724457245572465724757248572495725057251572525725357254572555725657257572585725957260572615726257263572645726557266572675726857269572705727157272572735727457275572765727757278572795728057281572825728357284572855728657287572885728957290572915729257293572945729557296572975729857299573005730157302573035730457305573065730757308573095731057311573125731357314573155731657317573185731957320573215732257323573245732557326573275732857329573305733157332573335733457335573365733757338573395734057341573425734357344573455734657347573485734957350573515735257353573545735557356573575735857359573605736157362573635736457365573665736757368573695737057371573725737357374573755737657377573785737957380573815738257383573845738557386573875738857389573905739157392573935739457395573965739757398573995740057401574025740357404574055740657407574085740957410574115741257413574145741557416574175741857419574205742157422574235742457425574265742757428574295743057431574325743357434574355743657437574385743957440574415744257443574445744557446574475744857449574505745157452574535745457455574565745757458574595746057461574625746357464574655746657467574685746957470574715747257473574745747557476574775747857479574805748157482574835748457485574865748757488574895749057491574925749357494574955749657497574985749957500575015750257503575045750557506575075750857509575105751157512575135751457515575165751757518575195752057521575225752357524575255752657527575285752957530575315753257533575345753557536575375753857539575405754157542575435754457545575465754757548575495755057551575525755357554575555755657557575585755957560575615756257563575645756557566575675756857569575705757157572575735757457575575765757757578575795758057581575825758357584575855758657587575885758957590575915759257593575945759557596575975759857599576005760157602576035760457605576065760757608576095761057611576125761357614576155761657617576185761957620576215762257623576245762557626576275762857629576305763157632576335763457635576365763757638576395764057641576425764357644576455764657647576485764957650576515765257653576545765557656576575765857659576605766157662576635766457665576665766757668576695767057671576725767357674576755767657677576785767957680576815768257683576845768557686576875768857689576905769157692576935769457695576965769757698576995770057701577025770357704577055770657707577085770957710577115771257713577145771557716577175771857719577205772157722577235772457725577265772757728577295773057731577325773357734577355773657737577385773957740577415774257743577445774557746577475774857749577505775157752577535775457755577565775757758577595776057761577625776357764577655776657767577685776957770577715777257773577745777557776577775777857779577805778157782577835778457785577865778757788577895779057791577925779357794577955779657797577985779957800578015780257803578045780557806578075780857809578105781157812578135781457815578165781757818578195782057821578225782357824578255782657827578285782957830578315783257833578345783557836578375783857839578405784157842578435784457845578465784757848578495785057851578525785357854578555785657857578585785957860578615786257863578645786557866578675786857869578705787157872578735787457875578765787757878578795788057881578825788357884578855788657887578885788957890578915789257893578945789557896578975789857899579005790157902579035790457905579065790757908579095791057911579125791357914579155791657917579185791957920579215792257923579245792557926579275792857929579305793157932579335793457935579365793757938579395794057941579425794357944579455794657947579485794957950579515795257953579545795557956579575795857959579605796157962579635796457965579665796757968579695797057971579725797357974579755797657977579785797957980579815798257983579845798557986579875798857989579905799157992579935799457995579965799757998579995800058001580025800358004580055800658007580085800958010580115801258013580145801558016580175801858019580205802158022580235802458025580265802758028580295803058031580325803358034580355803658037580385803958040580415804258043580445804558046580475804858049580505805158052580535805458055580565805758058580595806058061580625806358064580655806658067580685806958070580715807258073580745807558076580775807858079580805808158082580835808458085580865808758088580895809058091580925809358094580955809658097580985809958100581015810258103581045810558106581075810858109581105811158112581135811458115581165811758118581195812058121581225812358124581255812658127581285812958130581315813258133581345813558136581375813858139581405814158142581435814458145581465814758148581495815058151581525815358154581555815658157581585815958160581615816258163581645816558166581675816858169581705817158172581735817458175581765817758178581795818058181581825818358184581855818658187581885818958190581915819258193581945819558196581975819858199582005820158202582035820458205582065820758208582095821058211582125821358214582155821658217582185821958220582215822258223582245822558226582275822858229582305823158232582335823458235582365823758238582395824058241582425824358244582455824658247582485824958250582515825258253582545825558256582575825858259582605826158262582635826458265582665826758268582695827058271582725827358274582755827658277582785827958280582815828258283582845828558286582875828858289582905829158292582935829458295582965829758298582995830058301583025830358304583055830658307583085830958310583115831258313583145831558316583175831858319583205832158322583235832458325583265832758328583295833058331583325833358334583355833658337583385833958340583415834258343583445834558346583475834858349583505835158352583535835458355583565835758358583595836058361583625836358364583655836658367583685836958370583715837258373583745837558376583775837858379583805838158382583835838458385583865838758388583895839058391583925839358394583955839658397583985839958400584015840258403584045840558406584075840858409584105841158412584135841458415584165841758418584195842058421584225842358424584255842658427584285842958430584315843258433584345843558436584375843858439584405844158442584435844458445584465844758448584495845058451584525845358454584555845658457584585845958460584615846258463584645846558466584675846858469584705847158472584735847458475584765847758478584795848058481584825848358484584855848658487584885848958490584915849258493584945849558496584975849858499585005850158502585035850458505585065850758508585095851058511585125851358514585155851658517585185851958520585215852258523585245852558526585275852858529585305853158532585335853458535585365853758538585395854058541585425854358544585455854658547585485854958550585515855258553585545855558556585575855858559585605856158562585635856458565585665856758568585695857058571585725857358574585755857658577585785857958580585815858258583585845858558586585875858858589585905859158592585935859458595585965859758598585995860058601586025860358604586055860658607586085860958610586115861258613586145861558616586175861858619586205862158622586235862458625586265862758628586295863058631586325863358634586355863658637586385863958640586415864258643586445864558646586475864858649586505865158652586535865458655586565865758658586595866058661586625866358664586655866658667586685866958670586715867258673586745867558676586775867858679586805868158682586835868458685586865868758688586895869058691586925869358694586955869658697586985869958700587015870258703587045870558706587075870858709587105871158712587135871458715587165871758718587195872058721587225872358724587255872658727587285872958730587315873258733587345873558736587375873858739587405874158742587435874458745587465874758748587495875058751587525875358754587555875658757587585875958760587615876258763587645876558766587675876858769587705877158772587735877458775587765877758778587795878058781587825878358784587855878658787587885878958790587915879258793587945879558796587975879858799588005880158802588035880458805588065880758808588095881058811588125881358814588155881658817588185881958820588215882258823588245882558826588275882858829588305883158832588335883458835588365883758838588395884058841588425884358844588455884658847588485884958850588515885258853588545885558856588575885858859588605886158862588635886458865588665886758868588695887058871588725887358874588755887658877588785887958880588815888258883588845888558886588875888858889588905889158892588935889458895588965889758898588995890058901589025890358904589055890658907589085890958910589115891258913589145891558916589175891858919589205892158922589235892458925589265892758928589295893058931589325893358934589355893658937589385893958940589415894258943589445894558946589475894858949589505895158952589535895458955589565895758958589595896058961589625896358964589655896658967589685896958970589715897258973589745897558976589775897858979589805898158982589835898458985589865898758988589895899058991589925899358994589955899658997589985899959000590015900259003590045900559006590075900859009590105901159012590135901459015590165901759018590195902059021590225902359024590255902659027590285902959030590315903259033
  1. /*!-----------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Version: 0.20.0(6363745c0a33c27b149b89342a7b96d354fb554c)
  4. * Released under the MIT license
  5. * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
  6. *-----------------------------------------------------------*/
  7. (function () {
  8. var e, t,
  9. n = ["require", "exports", "vs/base/common/lifecycle", "vs/editor/common/core/range", "vs/base/common/event", "vs/base/common/strings", "vs/base/browser/dom", "vs/nls", "vs/nls!vs/editor/editor.main", "vs/css!vs/editor/editor.main", "vs/base/common/errors", "vs/platform/instantiation/common/instantiation", "vs/editor/browser/editorExtensions", "vs/editor/common/core/position", "vs/platform/theme/common/themeService", "vs/base/common/async", "vs/base/common/platform", "vs/editor/common/modes", "vs/platform/contextkey/common/contextkey", "vs/base/common/arrays", "vs/platform/theme/common/colorRegistry", "vs/base/common/types", "vs/editor/common/core/selection", "vs/editor/common/editorContextKeys", "vs/base/browser/browser", "vs/base/common/uri", "vs/base/common/cancellation", "vs/base/common/color", "vs/base/browser/fastDomNode", "vs/platform/commands/common/commands", "vs/editor/common/model/textModel", "vs/base/common/objects", "vs/editor/browser/services/codeEditorService", "vs/editor/common/config/editorOptions", "vs/platform/keybinding/common/keybinding", "vs/platform/notification/common/notification", "vs/base/common/keyCodes", "vs/editor/browser/view/viewPart", "vs/base/common/map", "vs/base/common/resources", "vs/editor/common/controller/cursorCommon", "vs/editor/common/modes/languageConfigurationRegistry", "vs/platform/registry/common/platform", "vs/platform/configuration/common/configuration", "vs/editor/common/view/editorColorRegistry", "vs/base/browser/mouseEvent", "vs/base/common/network", "vs/base/browser/ui/widget", "vs/editor/common/model", "vs/editor/common/services/modelService", "vs/base/browser/ui/aria/aria", "vs/platform/opener/common/opener", "vs/base/browser/event", "vs/base/browser/ui/scrollbar/scrollableElement", "vs/base/common/iterator", "vs/base/common/actions", "vs/base/browser/keyboardEvent", "vs/base/browser/touch", "vs/editor/common/core/editOperation", "vs/editor/common/standaloneStrings", "vs/editor/browser/config/configuration", "vs/base/common/filters", "vs/editor/common/services/editorWorkerService", "vs/editor/common/modes/nullMode", "vs/platform/accessibility/common/accessibility", "vs/platform/actions/common/actions", "vs/platform/contextview/browser/contextView", "vs/editor/browser/core/editorState", "vs/editor/common/editorCommon", "vs/editor/common/viewModel/viewModel", "vs/base/browser/ui/actionbar/actionbar", "vs/editor/common/services/modeService", "vs/platform/markers/common/markers", "vs/platform/progress/common/progress", "vs/platform/storage/common/storage", "vs/base/common/htmlContent", "vs/base/common/linkedList", "vs/base/common/path", "vs/base/browser/globalMouseMoveMonitor", "vs/editor/common/core/characterClassifier", "vs/editor/common/commands/replaceCommand", "vs/editor/common/view/viewEvents", "vs/editor/browser/view/dynamicViewOverlay", "vs/platform/instantiation/common/extensions", "vs/editor/common/services/resolverService", "vs/platform/configuration/common/configurationRegistry", "vs/platform/keybinding/common/keybindingsRegistry", "vs/base/common/collections", "vs/base/browser/canIUse", "vs/editor/common/controller/wordCharacterClassifier", "vs/editor/common/modes/languageConfiguration", "vs/editor/common/view/renderingContext", "vs/editor/common/viewModel/viewEventHandler", "vs/editor/common/core/lineTokens", "vs/editor/standalone/common/standaloneThemeService", "vs/platform/log/common/log", "vs/platform/telemetry/common/telemetry", "vs/platform/theme/common/styler", "vs/base/browser/dnd", "vs/base/browser/ui/tree/tree", "vs/base/common/codicons", "vs/base/common/decorators", "vs/base/common/functional", "vs/base/common/range", "vs/base/browser/ui/sash/sash", "vs/editor/common/config/editorZoom", "vs/editor/common/core/stringBuilder", "vs/editor/common/core/token", "vs/editor/browser/editorBrowser", "vs/editor/common/model/wordHelper", "vs/editor/common/viewLayout/viewLineRenderer", "vs/editor/contrib/codeAction/types", "vs/base/common/severity", "vs/editor/contrib/gotoSymbol/referencesModel", "vs/editor/common/services/textResourceConfigurationService", "vs/platform/instantiation/common/serviceCollection", "vs/platform/label/common/label", "vs/editor/contrib/markdown/markdownRenderer", "vs/editor/common/modes/modesRegistry", "vs/editor/contrib/codeAction/codeAction", "vs/editor/contrib/suggest/suggest", "vs/editor/browser/widget/codeEditorWidget", "vs/editor/contrib/message/messageController", "vs/editor/contrib/peekView/peekView", "vs/base/common/assert", "vs/base/common/hash", "vs/base/common/diff/diff", "vs/base/common/idGenerator", "vs/base/common/lazy", "vs/base/browser/ui/tree/indexTreeModel", "vs/base/browser/ui/tree/objectTreeModel", "vs/base/common/numbers", "vs/base/common/stopwatch", "vs/base/browser/ui/highlightedlabel/highlightedLabel", "vs/base/browser/formattedTextRenderer", "vs/base/browser/ui/scrollbar/scrollbarArrow", "vs/base/common/labels", "vs/base/parts/tree/browser/treeDefaults", "vs/base/browser/ui/checkbox/checkbox", "vs/base/browser/ui/iconLabel/iconLabel", "vs/base/browser/ui/list/listView", "vs/editor/browser/editorDom", "vs/editor/common/config/fontInfo", "vs/editor/browser/view/viewLayer", "vs/editor/common/model/textModelSearch", "vs/editor/common/modes/supports", "vs/editor/common/modes/supports/richEditBrackets", "vs/editor/common/standalone/standaloneEnums", "vs/editor/common/viewLayout/lineDecorations", "vs/editor/browser/viewParts/glyphMargin/glyphMargin", "vs/editor/contrib/folding/foldingRanges", "vs/editor/contrib/snippet/snippetParser", "vs/base/browser/ui/inputbox/inputBox", "vs/base/browser/ui/list/listWidget", "vs/base/browser/ui/tree/abstractTree", "vs/base/parts/quickopen/browser/quickOpenModel", "vs/editor/browser/services/bulkEditService", "vs/editor/common/model/tokensStore", "vs/editor/common/controller/cursorMoveOperations", "vs/editor/common/controller/cursorTypeOperations", "vs/editor/common/controller/cursorWordOperations", "vs/editor/common/viewModel/splitLinesCollection", "vs/platform/clipboard/common/clipboardService", "vs/editor/common/config/commonEditorConfig", "vs/editor/browser/controller/coreCommands", "vs/editor/contrib/parameterHints/provideSignatureHelp", "vs/editor/browser/controller/mouseTarget", "vs/editor/browser/widget/embeddedCodeEditorWidget", "vs/editor/contrib/find/findModel", "vs/editor/standalone/browser/quickOpen/editorQuickOpen", "vs/platform/list/browser/listService", "vs/platform/workspace/common/workspace", "vs/editor/standalone/browser/simpleServices", "vs/editor/contrib/snippet/snippetController2", "vs/base/browser/iframe", "vs/base/browser/ui/scrollbar/scrollbarState", "vs/base/common/scrollable", "vs/base/common/extpath", "vs/base/common/glob", "vs/base/common/uint", "vs/base/common/marshalling", "vs/base/browser/ui/scrollbar/abstractScrollbar", "vs/base/common/worker/simpleWorker", "vs/base/browser/ui/codiconLabel/codiconLabel", "vs/css!vs/base/browser/ui/findinput/findInput", "vs/editor/browser/config/elementSizeObserver", "vs/editor/browser/viewParts/minimap/minimapCharSheet", "vs/editor/browser/controller/textAreaState", "vs/editor/browser/widget/diffNavigator", "vs/editor/browser/controller/textAreaInput", "vs/editor/common/editorAction", "vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase", "vs/editor/common/standalone/standaloneBase", "vs/editor/common/view/overviewZoneManager", "vs/editor/common/viewModel/prefixSumComputer", "vs/editor/browser/viewParts/margin/margin", "vs/editor/contrib/comment/blockCommentCommand", "vs/editor/contrib/folding/syntaxRangeProvider", "vs/editor/contrib/format/formattingEdit", "vs/editor/contrib/gotoSymbol/link/clickLinkGesture", "vs/editor/contrib/hover/hoverOperation", "vs/editor/contrib/hover/hoverWidgets", "vs/editor/contrib/smartSelect/bracketSelections", "vs/editor/standalone/common/monarch/monarchCommon", "vs/base/browser/ui/findinput/findInputCheckboxes", "vs/base/browser/ui/menu/menu", "vs/base/browser/ui/tree/objectTree", "vs/base/common/keybindingLabels", "vs/platform/files/common/files", "vs/platform/instantiation/common/descriptors", "vs/editor/common/services/markersDecorationService", "vs/editor/common/commands/shiftCommand", "vs/editor/common/controller/cursorDeleteOperations", "vs/editor/common/controller/cursorMoveCommands", "vs/editor/common/modes/textToHtmlTokenizer", "vs/editor/common/viewModel/minimapTokensColorTracker", "vs/editor/standalone/common/monarch/monarchLexer", "vs/platform/keybinding/common/keybindingResolver", "vs/platform/layout/browser/layoutService", "vs/editor/common/services/editorWorkerServiceImpl", "vs/platform/jsonschemas/common/jsonContributionRegistry", "vs/editor/contrib/codelens/codelens", "vs/editor/contrib/colorPicker/color", "vs/editor/contrib/colorPicker/colorDetector", "vs/editor/contrib/gotoSymbol/goToSymbol", "vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode", "vs/editor/contrib/wordOperations/wordOperations", "vs/editor/browser/viewParts/lines/viewLine", "vs/editor/browser/view/viewOutgoingEvents", "vs/editor/browser/viewParts/lineNumbers/lineNumbers", "vs/editor/browser/widget/diffEditorWidget", "vs/editor/contrib/documentSymbols/outlineTree", "vs/editor/contrib/find/findController", "vs/editor/contrib/codeAction/codeActionCommands", "vs/editor/contrib/gotoSymbol/peek/referencesController", "vs/editor/contrib/gotoSymbol/goToCommands", "vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition", "vs/editor/contrib/gotoError/gotoError", "vs/editor/standalone/browser/standaloneServices", "vs/base/browser/ui/list/list", "vs/base/browser/ui/list/splice", "vs/base/common/diff/diffChange", "vs/base/common/history", "vs/base/browser/ui/tree/compressedObjectTreeModel", "vs/base/browser/ui/scrollbar/scrollbarVisibilityController", "vs/base/common/process", "vs/base/browser/ui/list/rangeMap", "vs/base/common/search", "vs/base/browser/markdownRenderer", "vs/base/browser/ui/list/rowCache", "vs/base/browser/ui/scrollbar/horizontalScrollbar", "vs/base/browser/ui/scrollbar/verticalScrollbar", "vs/base/common/mime", "vs/base/parts/quickopen/browser/quickOpenViewer", "vs/base/parts/tree/browser/tree", "vs/base/parts/tree/browser/treeDnd", "vs/base/parts/tree/browser/treeModel", "vs/base/parts/tree/browser/treeViewModel", "vs/base/worker/defaultWorkerFactory", "vs/css!vs/base/browser/ui/actionbar/actionbar", "vs/css!vs/base/browser/ui/aria/aria", "vs/css!vs/base/browser/ui/checkbox/checkbox", "vs/css!vs/base/browser/ui/codiconLabel/codicon/codicon", "vs/css!vs/base/browser/ui/codiconLabel/codicon/codicon-animations", "vs/css!vs/base/browser/ui/contextview/contextview", "vs/base/browser/ui/contextview/contextview", "vs/css!vs/base/browser/ui/countBadge/countBadge", "vs/base/browser/ui/countBadge/countBadge", "vs/css!vs/base/browser/ui/iconLabel/iconlabel", "vs/css!vs/base/browser/ui/inputbox/inputBox", "vs/css!vs/base/browser/ui/keybindingLabel/keybindingLabel", "vs/css!vs/base/browser/ui/list/list", "vs/css!vs/base/browser/ui/menu/menu", "vs/css!vs/base/browser/ui/progressbar/progressbar", "vs/base/browser/ui/progressbar/progressbar", "vs/css!vs/base/browser/ui/sash/sash", "vs/css!vs/base/browser/ui/scrollbar/media/scrollbars", "vs/base/parts/tree/browser/treeView", "vs/css!vs/base/browser/ui/splitview/splitview", "vs/base/browser/ui/splitview/splitview", "vs/css!vs/base/browser/ui/tree/media/tree", "vs/css!vs/base/parts/quickopen/browser/quickopen", "vs/css!vs/base/parts/tree/browser/tree", "vs/base/parts/tree/browser/treeImpl", "vs/css!vs/editor/browser/controller/textAreaHandler", "vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight", "vs/css!vs/editor/browser/viewParts/decorations/decorations", "vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin", "vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides", "vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers", "vs/css!vs/editor/browser/viewParts/lines/viewLines", "vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations", "vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations", "vs/css!vs/editor/browser/viewParts/minimap/minimap", "vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets", "vs/css!vs/editor/browser/viewParts/rulers/rulers", "vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration", "vs/css!vs/editor/browser/viewParts/selections/selections", "vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors", "vs/css!vs/editor/browser/widget/media/diffEditor", "vs/css!vs/editor/browser/widget/media/diffReview", "vs/css!vs/editor/browser/widget/media/editor", "vs/css!vs/editor/contrib/bracketMatching/bracketMatching", "vs/css!vs/editor/contrib/clipboard/clipboard", "vs/css!vs/editor/contrib/codeAction/lightBulbWidget", "vs/css!vs/editor/contrib/codelens/codelensWidget", "vs/css!vs/editor/contrib/colorPicker/colorPicker", "vs/css!vs/editor/contrib/dnd/dnd", "vs/css!vs/editor/contrib/documentSymbols/media/outlineTree", "vs/css!vs/editor/contrib/documentSymbols/media/symbol-icons", "vs/css!vs/editor/contrib/find/findWidget", "vs/css!vs/editor/contrib/folding/folding", "vs/css!vs/editor/contrib/gotoError/media/gotoErrorWidget", "vs/css!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition", "vs/css!vs/editor/contrib/gotoSymbol/peek/referencesWidget", "vs/css!vs/editor/contrib/hover/hover", "vs/css!vs/editor/contrib/links/links", "vs/css!vs/editor/contrib/message/messageController", "vs/css!vs/editor/contrib/parameterHints/parameterHints", "vs/css!vs/editor/contrib/peekView/media/peekViewWidget", "vs/css!vs/editor/contrib/rename/renameInputField", "vs/css!vs/editor/contrib/snippet/snippetSession", "vs/css!vs/editor/contrib/suggest/media/suggest", "vs/css!vs/editor/contrib/suggest/media/suggestStatusBar", "vs/css!vs/editor/contrib/zoneWidget/zoneWidget", "vs/css!vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp", "vs/css!vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard", "vs/css!vs/editor/standalone/browser/inspectTokens/inspectTokens", "vs/css!vs/editor/standalone/browser/quickOpen/editorQuickOpen", "vs/css!vs/editor/standalone/browser/quickOpen/gotoLine", "vs/css!vs/editor/standalone/browser/quickOpen/quickOutline", "vs/css!vs/editor/standalone/browser/standalone-tokens", "vs/css!vs/platform/contextview/browser/contextMenuHandler", "vs/editor/browser/config/charWidthReader", "vs/editor/browser/services/abstractCodeEditorService", "vs/editor/browser/viewParts/minimap/minimapCharRenderer", "vs/editor/browser/viewParts/minimap/minimapPreBaked", "vs/editor/browser/viewParts/minimap/minimapCharRendererFactory", "vs/editor/common/commands/trimTrailingWhitespaceCommand", "vs/editor/common/core/rgba", "vs/editor/common/commands/surroundSelectionCommand", "vs/editor/common/diff/diffComputer", "vs/editor/common/model/editStack", "vs/editor/common/model/indentationGuesser", "vs/editor/common/model/intervalTree", "vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase", "vs/editor/common/model/textModelEvents", "vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer", "vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder", "vs/editor/common/modes/abstractMode", "vs/editor/common/modes/languageSelector", "vs/editor/common/modes/linkComputer", "vs/editor/common/modes/supports/characterPair", "vs/editor/common/modes/supports/indentRules", "vs/editor/common/modes/supports/inplaceReplaceSupport", "vs/editor/common/modes/supports/onEnter", "vs/editor/common/modes/supports/electricCharacter", "vs/editor/common/modes/supports/tokenization", "vs/editor/common/modes/tokenizationRegistry", "vs/editor/browser/viewParts/lines/rangeUtil", "vs/editor/common/view/viewContext", "vs/editor/common/view/viewEventDispatcher", "vs/editor/common/viewLayout/linesLayout", "vs/editor/common/viewLayout/viewLinesViewportData", "vs/editor/common/model/mirrorTextModel", "vs/editor/common/services/editorSimpleWorker", "vs/editor/browser/viewParts/contentWidgets/contentWidgets", "vs/editor/browser/viewParts/decorations/decorations", "vs/editor/browser/viewParts/linesDecorations/linesDecorations", "vs/editor/browser/viewParts/marginDecorations/marginDecorations", "vs/editor/browser/viewParts/overlayWidgets/overlayWidgets", "vs/editor/browser/viewParts/overviewRuler/overviewRuler", "vs/editor/browser/viewParts/viewZones/viewZones", "vs/editor/common/viewLayout/viewLayout", "vs/editor/contrib/caretOperations/moveCaretCommand", "vs/editor/contrib/colorPicker/colorPickerModel", "vs/editor/contrib/comment/lineCommentCommand", "vs/editor/contrib/dnd/dragAndDropCommand", "vs/editor/contrib/find/findState", "vs/editor/contrib/find/replaceAllCommand", "vs/editor/contrib/find/replacePattern", "vs/editor/contrib/folding/foldingModel", "vs/editor/contrib/folding/hiddenRangeModel", "vs/editor/contrib/folding/intializingRangeProvider", "vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand", "vs/editor/contrib/indentation/indentUtils", "vs/editor/contrib/linesOperations/copyLinesCommand", "vs/editor/contrib/linesOperations/sortLinesCommand", "vs/editor/contrib/smartSelect/wordSelections", "vs/editor/contrib/suggest/completionModel", "vs/editor/contrib/suggest/suggestCommitCharacters", "vs/editor/contrib/suggest/suggestRangeHighlighter", "vs/editor/contrib/suggest/wordDistance", "vs/editor/standalone/common/monarch/monarchCompile", "vs/nls!vs/base/browser/ui/actionbar/actionbar", "vs/nls!vs/base/browser/ui/aria/aria", "vs/nls!vs/base/browser/ui/findinput/findInput", "vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes", "vs/nls!vs/base/browser/ui/findinput/replaceInput", "vs/nls!vs/base/browser/ui/inputbox/inputBox", "vs/base/browser/ui/findinput/findInput", "vs/base/browser/ui/findinput/replaceInput", "vs/nls!vs/base/browser/ui/keybindingLabel/keybindingLabel", "vs/nls!vs/base/browser/ui/list/listWidget", "vs/nls!vs/base/browser/ui/menu/menu", "vs/base/browser/contextmenu", "vs/nls!vs/base/browser/ui/tree/abstractTree", "vs/base/browser/ui/tree/dataTree", "vs/base/browser/ui/tree/asyncDataTree", "vs/nls!vs/base/common/keybindingLabels", "vs/base/browser/ui/keybindingLabel/keybindingLabel", "vs/nls!vs/base/common/severity", "vs/nls!vs/base/parts/quickopen/browser/quickOpenModel", "vs/nls!vs/base/parts/quickopen/browser/quickOpenWidget", "vs/base/parts/quickopen/browser/quickOpenWidget", "vs/nls!vs/editor/browser/controller/coreCommands", "vs/nls!vs/editor/browser/controller/textAreaHandler", "vs/nls!vs/editor/browser/widget/codeEditorWidget", "vs/nls!vs/editor/browser/widget/diffEditorWidget", "vs/nls!vs/editor/browser/widget/diffReview", "vs/nls!vs/editor/browser/widget/inlineDiffMargin", "vs/editor/browser/widget/inlineDiffMargin", "vs/nls!vs/editor/common/config/commonEditorConfig", "vs/nls!vs/editor/common/config/editorOptions", "vs/editor/common/viewModel/viewModelDecorations", "vs/nls!vs/editor/common/modes/modesRegistry", "vs/nls!vs/editor/common/standaloneStrings", "vs/nls!vs/editor/common/view/editorColorRegistry", "vs/nls!vs/editor/contrib/bracketMatching/bracketMatching", "vs/nls!vs/editor/contrib/caretOperations/caretOperations", "vs/nls!vs/editor/contrib/caretOperations/transpose", "vs/nls!vs/editor/contrib/clipboard/clipboard", "vs/nls!vs/editor/contrib/codeAction/codeActionCommands", "vs/nls!vs/editor/contrib/codeAction/lightBulbWidget", "vs/nls!vs/editor/contrib/comment/comment", "vs/nls!vs/editor/contrib/contextmenu/contextmenu", "vs/nls!vs/editor/contrib/cursorUndo/cursorUndo", "vs/nls!vs/editor/contrib/documentSymbols/outlineTree", "vs/nls!vs/editor/contrib/find/findController", "vs/nls!vs/editor/contrib/find/findWidget", "vs/nls!vs/editor/contrib/folding/folding", "vs/nls!vs/editor/contrib/fontZoom/fontZoom", "vs/nls!vs/editor/contrib/format/format", "vs/nls!vs/editor/contrib/format/formatActions", "vs/nls!vs/editor/contrib/gotoError/gotoError", "vs/nls!vs/editor/contrib/gotoError/gotoErrorWidget", "vs/nls!vs/editor/contrib/gotoSymbol/goToCommands", "vs/nls!vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition", "vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesController", "vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesTree", "vs/nls!vs/editor/contrib/gotoSymbol/peek/referencesWidget", "vs/nls!vs/editor/contrib/gotoSymbol/referencesModel", "vs/nls!vs/editor/contrib/gotoSymbol/symbolNavigation", "vs/nls!vs/editor/contrib/hover/hover", "vs/nls!vs/editor/contrib/hover/modesContentHover", "vs/nls!vs/editor/contrib/inPlaceReplace/inPlaceReplace", "vs/nls!vs/editor/contrib/linesOperations/linesOperations", "vs/nls!vs/editor/contrib/links/links", "vs/nls!vs/editor/contrib/message/messageController", "vs/nls!vs/editor/contrib/multicursor/multicursor", "vs/nls!vs/editor/contrib/parameterHints/parameterHints", "vs/nls!vs/editor/contrib/parameterHints/parameterHintsWidget", "vs/nls!vs/editor/contrib/peekView/peekView", "vs/nls!vs/editor/contrib/rename/rename", "vs/nls!vs/editor/contrib/rename/renameInputField", "vs/nls!vs/editor/contrib/smartSelect/smartSelect", "vs/nls!vs/editor/contrib/snippet/snippetVariables", "vs/nls!vs/editor/contrib/suggest/suggestController", "vs/nls!vs/editor/contrib/suggest/suggestWidget", "vs/nls!vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode", "vs/nls!vs/editor/contrib/tokenization/tokenization", "vs/nls!vs/editor/contrib/wordHighlighter/wordHighlighter", "vs/nls!vs/platform/configuration/common/configurationRegistry", "vs/nls!vs/platform/keybinding/common/abstractKeybindingService", "vs/nls!vs/platform/list/browser/listService", "vs/nls!vs/platform/markers/common/markers", "vs/nls!vs/platform/theme/common/colorRegistry", "vs/platform/contextkey/common/contextkeys", "vs/platform/editor/common/editor", "vs/platform/extensions/common/extensions", "vs/platform/instantiation/common/graph", "vs/editor/common/modes/languageFeatureRegistry", "vs/editor/common/model/textModelTokens", "vs/editor/common/controller/cursorColumnSelection", "vs/editor/common/controller/oneCursor", "vs/editor/common/controller/cursorCollection", "vs/editor/common/controller/cursor", "vs/editor/common/viewModel/monospaceLineBreaksComputer", "vs/editor/common/viewModel/viewModelImpl", "vs/editor/contrib/documentSymbols/outlineModel", "vs/editor/contrib/folding/foldingDecorations", "vs/editor/contrib/folding/indentRangeProvider", "vs/editor/contrib/linesOperations/moveLinesCommand", "vs/editor/contrib/zoneWidget/zoneWidget", "vs/editor/standalone/browser/colorizer", "vs/editor/contrib/links/getLinks", "vs/editor/contrib/quickOpen/quickOpen", "vs/editor/contrib/suggest/suggestAlternatives", "vs/editor/contrib/suggest/wordContextKey", "vs/platform/actions/common/menuService", "vs/platform/dialogs/common/dialogs", "vs/platform/instantiation/common/instantiationService", "vs/platform/keybinding/common/abstractKeybindingService", "vs/platform/keybinding/common/baseResolvedKeybinding", "vs/platform/keybinding/common/resolvedKeybindingItem", "vs/platform/keybinding/common/usLayoutResolvedKeybinding", "vs/platform/contextview/browser/contextViewService", "vs/editor/common/services/webWorker", "vs/platform/markers/common/markerService", "vs/editor/browser/services/openerService", "vs/editor/contrib/hover/modesGlyphHover", "vs/editor/common/services/getIconClasses", "vs/editor/browser/view/domLineBreaksComputer", "vs/editor/browser/view/viewOverlays", "vs/editor/browser/viewParts/viewCursors/viewCursor", "vs/editor/common/services/languagesRegistry", "vs/editor/common/services/modeServiceImpl", "vs/platform/accessibility/common/accessibilityService", "vs/platform/configuration/common/configurationModels", "vs/platform/contextkey/browser/contextKeyService", "vs/platform/browser/contextScopedHistoryWidget", "vs/editor/contrib/suggest/suggestMemory", "vs/editor/browser/core/keybindingCancellation", "vs/editor/browser/view/viewController", "vs/editor/contrib/caretOperations/caretOperations", "vs/editor/contrib/caretOperations/transpose", "vs/editor/contrib/clipboard/clipboard", "vs/editor/contrib/codeAction/codeActionMenu", "vs/editor/contrib/codeAction/codeActionModel", "vs/editor/contrib/codelens/codeLensCache", "vs/editor/contrib/comment/comment", "vs/editor/contrib/contextmenu/contextmenu", "vs/editor/contrib/cursorUndo/cursorUndo", "vs/editor/contrib/dnd/dnd", "vs/editor/contrib/fontZoom/fontZoom", "vs/editor/contrib/format/format", "vs/editor/contrib/format/formatActions", "vs/editor/contrib/gotoSymbol/symbolNavigation", "vs/editor/contrib/hover/getHover", "vs/editor/contrib/linesOperations/linesOperations", "vs/editor/contrib/parameterHints/parameterHintsModel", "vs/editor/contrib/smartSelect/smartSelect", "vs/editor/contrib/tokenization/tokenization", "vs/editor/contrib/wordPartOperations/wordPartOperations", "vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard", "vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast", "vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget", "vs/platform/contextview/browser/contextMenuHandler", "vs/editor/browser/services/codeEditorServiceImpl", "vs/editor/browser/viewParts/editorScrollbar/editorScrollbar", "vs/editor/browser/controller/mouseHandler", "vs/editor/browser/controller/pointerHandler", "vs/editor/browser/viewParts/lines/viewLines", "vs/editor/browser/viewParts/minimap/minimap", "vs/editor/browser/viewParts/scrollDecoration/scrollDecoration", "vs/editor/browser/viewParts/selections/selections", "vs/editor/common/services/modelServiceImpl", "vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight", "vs/editor/browser/viewParts/indentGuides/indentGuides", "vs/editor/browser/controller/textAreaHandler", "vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler", "vs/editor/browser/viewParts/rulers/rulers", "vs/editor/browser/viewParts/viewCursors/viewCursors", "vs/editor/browser/view/viewImpl", "vs/editor/browser/widget/diffReview", "vs/editor/common/services/markerDecorationsServiceImpl", "vs/editor/contrib/bracketMatching/bracketMatching", "vs/editor/contrib/codeAction/lightBulbWidget", "vs/editor/contrib/codelens/codelensWidget", "vs/editor/contrib/codelens/codelensController", "vs/editor/contrib/colorPicker/colorPickerWidget", "vs/editor/contrib/find/findDecorations", "vs/editor/contrib/find/findOptionsWidget", "vs/editor/contrib/find/findWidget", "vs/editor/contrib/folding/folding", "vs/editor/contrib/gotoSymbol/peek/referencesTree", "vs/editor/contrib/inPlaceReplace/inPlaceReplace", "vs/editor/contrib/links/links", "vs/editor/contrib/codeAction/codeActionUi", "vs/editor/contrib/codeAction/codeActionContributions", "vs/editor/contrib/multicursor/multicursor", "vs/editor/contrib/parameterHints/parameterHintsWidget", "vs/editor/contrib/parameterHints/parameterHints", "vs/editor/contrib/rename/renameInputField", "vs/editor/contrib/rename/rename", "vs/editor/contrib/suggest/suggestWidget", "vs/editor/contrib/wordHighlighter/wordHighlighter", "vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp", "vs/editor/standalone/browser/inspectTokens/inspectTokens", "vs/editor/standalone/browser/quickOpen/gotoLine", "vs/editor/standalone/browser/quickOpen/quickCommand", "vs/editor/standalone/browser/quickOpen/quickOutline", "vs/editor/standalone/browser/standaloneCodeServiceImpl", "vs/editor/standalone/common/themes", "vs/editor/standalone/browser/standaloneThemeServiceImpl", "vs/platform/contextview/browser/contextMenuService", "vs/editor/contrib/gotoSymbol/peek/referencesWidget", "vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch", "vs/platform/severityIcon/common/severityIcon", "vs/editor/contrib/gotoError/gotoErrorWidget", "vs/editor/contrib/hover/modesContentHover", "vs/editor/contrib/hover/hover", "vs/editor/standalone/browser/standaloneCodeEditor", "vs/editor/standalone/browser/standaloneEditor", "vs/editor/standalone/browser/standaloneLanguages", "vs/editor/editor.api", "vs/platform/workspaces/common/workspaces", "vs/editor/contrib/snippet/snippetVariables", "vs/editor/contrib/snippet/snippetSession", "vs/editor/contrib/suggest/suggestModel", "vs/editor/contrib/suggest/suggestController", "vs/editor/editor.all", "vs/base/common/marked/marked", "vs/base/common/insane/insane", "vs/editor/common/standalone/promise-polyfill/polyfill", "vs/editor/edcore.main"],
  10. i = function (e) {
  11. for (var t = [], i = 0, o = e.length; i < o; i++) t[i] = n[e[i]];
  12. return t
  13. };
  14. !function (e) {
  15. var t = function () {
  16. function e() {
  17. this._pendingLoads = 0
  18. }
  19. return e.prototype.attachListeners = function (e, t, n, i) {
  20. var o = function () {
  21. t.removeEventListener("load", r), t.removeEventListener("error", s)
  22. }, r = function (e) {
  23. o(), n()
  24. }, s = function (e) {
  25. o(), i(e)
  26. };
  27. t.addEventListener("load", r), t.addEventListener("error", s)
  28. }, e.prototype._onLoad = function (e, t) {
  29. this._pendingLoads--, t()
  30. }, e.prototype._onLoadError = function (e, t, n) {
  31. this._pendingLoads--, t(n)
  32. }, e.prototype._insertLinkNode = function (e) {
  33. this._pendingLoads++;
  34. var t = document.head || document.getElementsByTagName("head")[0],
  35. n = t.getElementsByTagName("link") || document.head.getElementsByTagName("script");
  36. n.length > 0 ? t.insertBefore(e, n[n.length - 1]) : t.appendChild(e)
  37. }, e.prototype.createLinkTag = function (e, t, n, i) {
  38. var o = this, r = document.createElement("link");
  39. r.setAttribute("rel", "stylesheet"), r.setAttribute("type", "text/css"), r.setAttribute("data-name", e);
  40. return this.attachListeners(e, r, (function () {
  41. return o._onLoad(e, n)
  42. }), (function (t) {
  43. return o._onLoadError(e, i, t)
  44. })), r.setAttribute("href", t), r
  45. }, e.prototype._linkTagExists = function (e, t) {
  46. var n, i, o, r, s = document.getElementsByTagName("link");
  47. for (n = 0, i = s.length; n < i; n++) if (o = s[n].getAttribute("data-name"), r = s[n].getAttribute("href"), o === e || r === t) return !0;
  48. return !1
  49. }, e.prototype.load = function (e, t, n, i) {
  50. if (this._linkTagExists(e, t)) n(); else {
  51. var o = this.createLinkTag(e, t, n, i);
  52. this._insertLinkNode(o)
  53. }
  54. }, e
  55. }(), n = function () {
  56. function e() {
  57. this._cssLoader = new t
  58. }
  59. return e.prototype.load = function (e, t, n) {
  60. var i = t.toUrl(e + ".css");
  61. this._cssLoader.load(e, i, (function (e) {
  62. n({})
  63. }), (function (e) {
  64. "function" == typeof n.error && n.error("Could not find " + i + " or it was empty")
  65. }))
  66. }, e
  67. }();
  68. e.CSSPlugin = n, define("vs/css", new n)
  69. }(e || (e = {})), function (e) {
  70. var t = function () {
  71. function e() {
  72. this._detected = !1, this._isPseudo = !1
  73. }
  74. return Object.defineProperty(e.prototype, "isPseudo", {
  75. get: function () {
  76. return this._detect(), this._isPseudo
  77. }, enumerable: !0, configurable: !0
  78. }), e.prototype._detect = function () {
  79. this._detected || (this._detected = !0,
  80. this._isPseudo = "undefined" != typeof document && document.location && document.location.hash.indexOf("pseudo=true") >= 0)
  81. }, e
  82. }();
  83. function n(e, t, n) {
  84. var i;
  85. return i = 0 === t.length ? e : e.replace(/\{(\d+)\}/g, (function (e, n) {
  86. var i = n[0], o = t[i], r = e;
  87. return "string" == typeof o ? r = o : "number" != typeof o && "boolean" != typeof o && null != o || (r = String(o)), r
  88. })), n.isPseudo && (i = "[" + i.replace(/[aouei]/g, "$&$&") + "]"), i
  89. }
  90. function i(e, t, i) {
  91. for (var o = [], r = 3; r < arguments.length; r++) o[r - 3] = arguments[r];
  92. return n(i, o, e)
  93. }
  94. function o(e, t) {
  95. return function (i, o) {
  96. var r = Array.prototype.slice.call(arguments, 2);
  97. return n(e[i], r, t)
  98. }
  99. }
  100. var r = function () {
  101. function e(e) {
  102. var t = this;
  103. this._env = e, this.localize = function (e, n) {
  104. for (var o = [], r = 2; r < arguments.length; r++) o[r - 2] = arguments[r];
  105. return i.apply(void 0, [t._env, e, n].concat(o))
  106. }
  107. }
  108. return e.prototype.setPseudoTranslation = function (e) {
  109. this._env._isPseudo = e
  110. }, e.prototype.create = function (e, t) {
  111. return {localize: o(t[e], this._env)}
  112. }, e.prototype.load = function (t, n, i, r) {
  113. var s = this;
  114. if (r = r || {}, t && 0 !== t.length) {
  115. var a = r["vs/nls"] || {}, l = a.availableLanguages ? function (e, t) {
  116. var n = e[t];
  117. return n || ((n = e["*"]) || null)
  118. }(a.availableLanguages, t) : null, u = ".nls";
  119. null !== l && l !== e.DEFAULT_TAG && (u = u + "." + l);
  120. var d = function (e) {
  121. Array.isArray(e) ? e.localize = o(e, s._env) : e.localize = o(e[t], s._env), i(e)
  122. };
  123. "function" == typeof a.loadBundle ? a.loadBundle(t, l, (function (e, i) {
  124. e ? n([t + ".nls"], d) : d(i)
  125. })) : n([t + u], d)
  126. } else i({localize: this.localize})
  127. }, e.DEFAULT_TAG = "i-default", e
  128. }();
  129. e.NLSPlugin = r, define("vs/nls", new r(new t))
  130. }(t || (t = {})), define(n[98], i([0, 1]), (function (e, t) {
  131. "use strict";
  132. Object.defineProperty(t, "__esModule", {value: !0}), t.DataTransfers = {
  133. RESOURCES: "ResourceURLs",
  134. DOWNLOAD_URL: "DownloadURL",
  135. FILES: "Files",
  136. TEXT: "text/plain"
  137. };
  138. var n = function () {
  139. function e(e) {
  140. this.data = e
  141. }
  142. return e.prototype.update = function () {
  143. }, e.prototype.getData = function () {
  144. return this.data
  145. }, e
  146. }();
  147. t.DragAndDropData = n, t.StaticDND = {CurrentDragAndDropData: void 0}
  148. })), define(n[174], i([0, 1]), (function (e, t) {
  149. "use strict";
  150. Object.defineProperty(t, "__esModule", {value: !0});
  151. var n = !1, i = null
  152. ;
  153. function o(e) {
  154. if (!e.parent || e.parent === e) return null;
  155. try {
  156. var t = e.location, i = e.parent.location;
  157. if (t.protocol !== i.protocol || t.hostname !== i.hostname || t.port !== i.port) return n = !0, null
  158. } catch (e) {
  159. return n = !0, null
  160. }
  161. return e.parent
  162. }
  163. function r(e, t) {
  164. for (var n, i = e.document.getElementsByTagName("iframe"), o = 0, r = i.length; o < r; o++) if ((n = i[o]).contentWindow === t) return n;
  165. return null
  166. }
  167. var s = function () {
  168. function e() {
  169. }
  170. return e.getSameOriginWindowChain = function () {
  171. if (!i) {
  172. i = [];
  173. var e, t = window;
  174. do {
  175. (e = o(t)) ? i.push({window: t, iframeElement: r(e, t)}) : i.push({
  176. window: t,
  177. iframeElement: null
  178. }), t = e
  179. } while (t)
  180. }
  181. return i.slice(0)
  182. }, e.hasDifferentOriginAncestor = function () {
  183. return i || this.getSameOriginWindowChain(), n
  184. }, e.getPositionOfChildWindowRelativeToAncestorWindow = function (e, t) {
  185. if (!t || e === t) return {top: 0, left: 0};
  186. for (var n = 0, i = 0, o = 0, r = this.getSameOriginWindowChain(); o < r.length; o++) {
  187. var s = r[o];
  188. if (s.window === t) break;
  189. if (!s.iframeElement) break;
  190. var a = s.iframeElement.getBoundingClientRect();
  191. n += a.top, i += a.left
  192. }
  193. return {top: n, left: i}
  194. }, e
  195. }();
  196. t.IframeUtils = s
  197. }))
  198. ;var o, r = this && this.__extends || (o = function (e, t) {
  199. return (o = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (e, t) {
  200. e.__proto__ = t
  201. } || function (e, t) {
  202. for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n])
  203. })(e, t)
  204. }, function (e, t) {
  205. function n() {
  206. this.constructor = e
  207. }
  208. o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n)
  209. });
  210. /*
  211. The MIT License (MIT)
  212. Copyright © 2015 Nicolas Bevacqua
  213. Permission is hereby granted, free of charge, to any person obtaining a copy of
  214. this software and associated documentation files (the "Software"), to deal in
  215. the Software without restriction, including without limitation the rights to
  216. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  217. the Software, and to permit persons to whom the Software is furnished to do so,
  218. subject to the following conditions:
  219. The above copyright notice and this permission notice shall be included in all
  220. copies or substantial portions of the Software.
  221. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  222. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  223. FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  224. COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  225. IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  226. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  227. */
  228. let s;
  229. define(n[239], i([0, 1]), (function (e, t) {
  230. "use strict";
  231. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  232. e.TREE = "tree", e.FORM = "form"
  233. }(t.ListAriaRootRole || (t.ListAriaRootRole = {}));
  234. var n = function (e) {
  235. function t(t, n) {
  236. return e.call(this, "ListError [" + t + "] " + n) || this
  237. }
  238. return r(t, e), t
  239. }(Error);
  240. t.ListError = n
  241. })), define(n[240], i([0, 1]), (function (e, t) {
  242. "use strict";
  243. Object.defineProperty(t, "__esModule", {value: !0});
  244. var n = function () {
  245. function e(e) {
  246. this.spliceables = e
  247. }
  248. return e.prototype.splice = function (e, t, n) {
  249. this.spliceables.forEach((function (i) {
  250. return i.splice(e, t, n)
  251. }))
  252. }, e
  253. }();
  254. t.CombinedSpliceable = n
  255. })), define(n[175], i([0, 1]), (function (e, t) {
  256. "use strict";
  257. Object.defineProperty(t, "__esModule", {value: !0});
  258. var n = function () {
  259. function e(e, t, n, i, o, r) {
  260. this._scrollbarSize = Math.round(t), this._oppositeScrollbarSize = Math.round(n), this._arrowSize = Math.round(e), this._visibleSize = i, this._scrollSize = o, this._scrollPosition = r, this._computedAvailableSize = 0, this._computedIsNeeded = !1, this._computedSliderSize = 0, this._computedSliderRatio = 0,
  261. this._computedSliderPosition = 0, this._refreshComputedValues()
  262. }
  263. return e.prototype.clone = function () {
  264. return new e(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition)
  265. }, e.prototype.setVisibleSize = function (e) {
  266. var t = Math.round(e);
  267. return this._visibleSize !== t && (this._visibleSize = t, this._refreshComputedValues(), !0)
  268. }, e.prototype.setScrollSize = function (e) {
  269. var t = Math.round(e);
  270. return this._scrollSize !== t && (this._scrollSize = t, this._refreshComputedValues(), !0)
  271. }, e.prototype.setScrollPosition = function (e) {
  272. var t = Math.round(e);
  273. return this._scrollPosition !== t && (this._scrollPosition = t, this._refreshComputedValues(), !0)
  274. }, e._computeValues = function (e, t, n, i, o) {
  275. var r = Math.max(0, n - e), s = Math.max(0, r - 2 * t), a = i > 0 && i > n;
  276. if (!a) return {
  277. computedAvailableSize: Math.round(r),
  278. computedIsNeeded: a,
  279. computedSliderSize: Math.round(s),
  280. computedSliderRatio: 0,
  281. computedSliderPosition: 0
  282. };
  283. var l = Math.round(Math.max(20, Math.floor(n * s / i))), u = (s - l) / (i - n), d = o * u;
  284. return {
  285. computedAvailableSize: Math.round(r),
  286. computedIsNeeded: a,
  287. computedSliderSize: Math.round(l),
  288. computedSliderRatio: u,
  289. computedSliderPosition: Math.round(d)
  290. }
  291. }, e.prototype._refreshComputedValues = function () {
  292. var t = e._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition);
  293. this._computedAvailableSize = t.computedAvailableSize, this._computedIsNeeded = t.computedIsNeeded, this._computedSliderSize = t.computedSliderSize, this._computedSliderRatio = t.computedSliderRatio, this._computedSliderPosition = t.computedSliderPosition
  294. }, e.prototype.getArrowSize = function () {
  295. return this._arrowSize
  296. }, e.prototype.getScrollPosition = function () {
  297. return this._scrollPosition
  298. }, e.prototype.getRectangleLargeSize = function () {
  299. return this._computedAvailableSize
  300. }, e.prototype.getRectangleSmallSize = function () {
  301. return this._scrollbarSize
  302. }, e.prototype.isNeeded = function () {
  303. return this._computedIsNeeded
  304. }, e.prototype.getSliderSize = function () {
  305. return this._computedSliderSize
  306. }, e.prototype.getSliderPosition = function () {
  307. return this._computedSliderPosition
  308. },
  309. e.prototype.getDesiredScrollPositionFromOffset = function (e) {
  310. if (!this._computedIsNeeded) return 0;
  311. var t = e - this._arrowSize - this._computedSliderSize / 2;
  312. return Math.round(t / this._computedSliderRatio)
  313. }, e.prototype.getDesiredScrollPositionFromDelta = function (e) {
  314. if (!this._computedIsNeeded) return 0;
  315. var t = this._computedSliderPosition + e;
  316. return Math.round(t / this._computedSliderRatio)
  317. }, e
  318. }();
  319. t.ScrollbarState = n
  320. })), define(n[99], i([0, 1]), (function (e, t) {
  321. "use strict";
  322. Object.defineProperty(t, "__esModule", {value: !0});
  323. var n = function (e) {
  324. function t(t, n) {
  325. return e.call(this, "TreeError [" + t + "] " + n) || this
  326. }
  327. return r(t, e), t
  328. }(Error);
  329. t.TreeError = n;
  330. var i = function () {
  331. function e(e) {
  332. this.fn = e, this._map = new WeakMap
  333. }
  334. return e.prototype.map = function (e) {
  335. var t = this._map.get(e);
  336. return t || (t = this.fn(e), this._map.set(e, t)), t
  337. }, e
  338. }();
  339. t.WeakMapper = i
  340. })), define(n[19], i([0, 1]), (function (e, t) {
  341. "use strict";
  342. function n(e, t) {
  343. return function e(t, n, i, o, r) {
  344. if (o <= i) return;
  345. var s = i + (o - i) / 2 | 0;
  346. e(t, n, i, s, r);
  347. e(t, n, s + 1, o, r);
  348. if (n(t[s], t[s + 1]) <= 0) return;
  349. !function (e, t, n, i, o, r) {
  350. for (var s = n, a = i + 1, l = n; l <= o; l++) r[l] = e[l];
  351. for (l = n; l <= o; l++) s > i ? e[l] = r[a++] : a > o ? e[l] = r[s++] : t(r[a], r[s]) < 0 ? e[l] = r[a++] : e[l] = r[s++]
  352. }(t, n, i, s, o, r)
  353. }(e, t, 0, e.length - 1, []), e
  354. }
  355. function i(e, t) {
  356. for (var n = 0; n < e.length; n++) {
  357. if (t(e[n])) return n
  358. }
  359. return -1
  360. }
  361. Object.defineProperty(t, "__esModule", {value: !0}), t.tail = function (e, t) {
  362. return void 0 === t && (t = 0), e[e.length - (1 + t)]
  363. }, t.tail2 = function (e) {
  364. if (0 === e.length) throw new Error("Invalid tail call");
  365. return [e.slice(0, e.length - 1), e[e.length - 1]]
  366. }, t.equals = function (e, t, n) {
  367. if (void 0 === n && (n = function (e, t) {
  368. return e === t
  369. }), e === t) return !0;
  370. if (!e || !t) return !1;
  371. if (e.length !== t.length) return !1;
  372. for (var i = 0, o = e.length; i < o; i++) if (!n(e[i], t[i])) return !1;
  373. return !0
  374. }, t.binarySearch = function (e, t, n) {
  375. for (var i = 0, o = e.length - 1; i <= o;) {
  376. var r = (i + o) / 2 | 0, s = n(e[r], t);
  377. if (s < 0) i = r + 1; else {
  378. if (!(s > 0)) return r;
  379. o = r - 1
  380. }
  381. }
  382. return -(i + 1)
  383. }, t.findFirstInSorted = function (e, t) {
  384. var n = 0, i = e.length;
  385. if (0 === i) return 0;
  386. for (; n < i;) {
  387. var o = Math.floor((n + i) / 2);
  388. t(e[o]) ? i = o : n = o + 1
  389. }
  390. return n
  391. }, t.mergeSort = n, t.groupBy = function (e, t) {
  392. for (var i = [], o = void 0, r = 0, s = n(e.slice(0), t); r < s.length; r++) {
  393. var a = s[r];
  394. o && 0 === t(o[0], a) ? o.push(a) : (o = [a], i.push(o))
  395. }
  396. return i
  397. }, t.coalesce = function (e) {
  398. return e.filter((function (e) {
  399. return !!e
  400. }))
  401. }, t.isFalsyOrEmpty = function (e) {
  402. return !Array.isArray(e) || 0 === e.length
  403. }, t.isNonEmptyArray = function (e) {
  404. return Array.isArray(e) && e.length > 0
  405. }, t.distinct = function (e, t) {
  406. if (!t) return e.filter((function (t, n) {
  407. return e.indexOf(t) === n
  408. }));
  409. var n = Object.create(null);
  410. return e.filter((function (e) {
  411. var i = t(e);
  412. return !n[i] && (n[i] = !0, !0)
  413. }))
  414. }, t.distinctES6 = function (e) {
  415. var t = new Set;
  416. return e.filter((function (e) {
  417. return !t.has(e) && (t.add(e), !0)
  418. }))
  419. }, t.fromSet = function (e) {
  420. var t = [];
  421. return e.forEach((function (e) {
  422. return t.push(e)
  423. })), t
  424. }, t.firstIndex = i, t.first = function (e, t, n) {
  425. void 0 === n && (n = void 0);
  426. var o = i(e, t);
  427. return o < 0 ? n : e[o]
  428. }, t.firstOrDefault = function (e, t) {
  429. return e.length > 0 ? e[0] : t
  430. }, t.flatten = function (e) {
  431. var t;
  432. return (t = []).concat.apply(t, e)
  433. }, t.range = function (e, t) {
  434. var n = "number" == typeof t ? e : 0;
  435. "number" == typeof t ? n = e : (n = 0, t = e);
  436. var i = []
  437. ;
  438. if (n <= t) for (var o = n; o < t; o++) i.push(o); else for (o = n; o > t; o--) i.push(o);
  439. return i
  440. }, t.arrayInsert = function (e, t, n) {
  441. var i = e.slice(0, t), o = e.slice(t);
  442. return i.concat(n, o)
  443. }, t.pushToStart = function (e, t) {
  444. var n = e.indexOf(t);
  445. n > -1 && (e.splice(n, 1), e.unshift(t))
  446. }, t.pushToEnd = function (e, t) {
  447. var n = e.indexOf(t);
  448. n > -1 && (e.splice(n, 1), e.push(t))
  449. }, t.find = function (e, t) {
  450. for (var n = 0; n < e.length; n++) {
  451. var i = e[n];
  452. if (t(i, n, e)) return i
  453. }
  454. }, t.asArray = function (e) {
  455. return Array.isArray(e) ? e : [e]
  456. }
  457. })), define(n[124], i([0, 1]), (function (e, t) {
  458. "use strict";
  459. Object.defineProperty(t, "__esModule", {value: !0}), t.ok = function (e, t) {
  460. if (!e) throw new Error(t ? "Assertion failed (" + t + ")" : "Assertion Failed")
  461. }
  462. })), define(n[100], i([0, 1]), (function (e, t) {
  463. "use strict";
  464. Object.defineProperty(t, "__esModule", {value: !0});
  465. var n = /(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;
  466. t.escapeCodicons = function (e) {
  467. return e.replace(n, (function (e, t) {
  468. return t ? e : "\\" + e
  469. }))
  470. };
  471. var i = /\\\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;
  472. t.markdownEscapeEscapedCodicons = function (e) {
  473. return e.replace(i, (function (e) {
  474. return "\\" + e
  475. }))
  476. };
  477. var o = /(\\)?\$\((([a-z0-9\-]+?)(?:~([a-z0-9\-]*?))?)\)/gi;
  478. t.renderCodicons = function (e) {
  479. return e.replace(o, (function (e, t, n, i, o) {
  480. return t ? "$(" + n + ")" : '<span class="codicon codicon-' + i + (o ? " codicon-animation-" + o : "") + '"></span>'
  481. }))
  482. }
  483. })), define(n[87], i([0, 1]), (function (e, t) {
  484. "use strict";
  485. Object.defineProperty(t, "__esModule", {value: !0});
  486. var n = Object.prototype.hasOwnProperty;
  487. t.values = function (e) {
  488. var t = [];
  489. for (var i in e) n.call(e, i) && t.push(e[i]);
  490. return t
  491. }, t.first = function (e) {
  492. for (var t in e) if (n.call(e, t)) return e[t]
  493. }, t.forEach = function (e, t) {
  494. var i = function (i) {
  495. if (n.call(e, i) && !1 === t({key: i, value: e[i]}, (function () {
  496. delete e[i]
  497. }))) return {value: void 0}
  498. };
  499. for (var o in e) {
  500. var r = i(o);
  501. if ("object" == typeof r) return r.value
  502. }
  503. };
  504. var i = function () {
  505. function e() {
  506. this.map = new Map
  507. }
  508. return e.prototype.add = function (e, t) {
  509. var n = this.map.get(e);
  510. n || (n = new Set, this.map.set(e, n)), n.add(t)
  511. }, e.prototype.delete = function (e, t) {
  512. var n = this.map.get(e);
  513. n && (n.delete(t), 0 === n.size && this.map.delete(e))
  514. }, e.prototype.forEach = function (e, t) {
  515. var n = this.map.get(e);
  516. n && n.forEach(t)
  517. }, e
  518. }();
  519. t.SetMap = i
  520. })), define(n[27], i([0, 1]), (function (e, t) {
  521. "use strict";
  522. function n(e, t) {
  523. var n = Math.pow(10, t);
  524. return Math.round(e * n) / n
  525. }
  526. Object.defineProperty(t, "__esModule", {value: !0});
  527. var i = function () {
  528. function e(e, t, i, o) {
  529. void 0 === o && (o = 1), this.r = 0 | Math.min(255, Math.max(0, e)), this.g = 0 | Math.min(255, Math.max(0, t)), this.b = 0 | Math.min(255, Math.max(0, i)), this.a = n(Math.max(Math.min(1, o), 0), 3)
  530. }
  531. return e.equals = function (e, t) {
  532. return e.r === t.r && e.g === t.g && e.b === t.b && e.a === t.a
  533. }, e
  534. }();
  535. t.RGBA = i;
  536. var o = function () {
  537. function e(e, t, i, o) {
  538. this.h = 0 | Math.max(Math.min(360, e), 0), this.s = n(Math.max(Math.min(1, t), 0), 3), this.l = n(Math.max(Math.min(1, i), 0), 3), this.a = n(Math.max(Math.min(1, o), 0), 3)
  539. }
  540. return e.equals = function (e, t) {
  541. return e.h === t.h && e.s === t.s && e.l === t.l && e.a === t.a
  542. }, e.fromRGBA = function (t) {
  543. var n = t.r / 255, i = t.g / 255, o = t.b / 255, r = t.a, s = Math.max(n, i, o), a = Math.min(n, i, o),
  544. l = 0, u = 0, d = (a + s) / 2, c = s - a;
  545. if (c > 0) {
  546. switch (u = Math.min(d <= .5 ? c / (2 * d) : c / (2 - 2 * d), 1), s) {
  547. case n:
  548. l = (i - o) / c + (i < o ? 6 : 0);
  549. break;
  550. case i:
  551. l = (o - n) / c + 2;
  552. break
  553. ;
  554. case o:
  555. l = (n - i) / c + 4
  556. }
  557. l *= 60, l = Math.round(l)
  558. }
  559. return new e(l, u, d, r)
  560. }, e._hue2rgb = function (e, t, n) {
  561. return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + 6 * (t - e) * n : n < .5 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e
  562. }, e.toRGBA = function (t) {
  563. var n, o, r, s = t.h / 360, a = t.s, l = t.l, u = t.a;
  564. if (0 === a) n = o = r = l; else {
  565. var d = l < .5 ? l * (1 + a) : l + a - l * a, c = 2 * l - d;
  566. n = e._hue2rgb(c, d, s + 1 / 3), o = e._hue2rgb(c, d, s), r = e._hue2rgb(c, d, s - 1 / 3)
  567. }
  568. return new i(Math.round(255 * n), Math.round(255 * o), Math.round(255 * r), u)
  569. }, e
  570. }();
  571. t.HSLA = o;
  572. var r = function () {
  573. function e(e, t, i, o) {
  574. this.h = 0 | Math.max(Math.min(360, e), 0), this.s = n(Math.max(Math.min(1, t), 0), 3), this.v = n(Math.max(Math.min(1, i), 0), 3), this.a = n(Math.max(Math.min(1, o), 0), 3)
  575. }
  576. return e.equals = function (e, t) {
  577. return e.h === t.h && e.s === t.s && e.v === t.v && e.a === t.a
  578. }, e.fromRGBA = function (t) {
  579. var n, i = t.r / 255, o = t.g / 255, r = t.b / 255, s = Math.max(i, o, r), a = s - Math.min(i, o, r),
  580. l = 0 === s ? 0 : a / s;
  581. return n = 0 === a ? 0 : s === i ? ((o - r) / a % 6 + 6) % 6 : s === o ? (r - i) / a + 2 : (i - o) / a + 4, new e(Math.round(60 * n), l, s, t.a)
  582. }, e.toRGBA = function (e) {
  583. var t = e.h, n = e.s, o = e.v, r = e.a, s = o * n, a = s * (1 - Math.abs(t / 60 % 2 - 1)), l = o - s,
  584. u = [0, 0, 0], d = u[0], c = u[1], h = u[2];
  585. return t < 60 ? (d = s, c = a) : t < 120 ? (d = a, c = s) : t < 180 ? (c = s, h = a) : t < 240 ? (c = a, h = s) : t < 300 ? (d = a, h = s) : t < 360 && (d = s, h = a), d = Math.round(255 * (d + l)), c = Math.round(255 * (c + l)), h = Math.round(255 * (h + l)), new i(d, c, h, r)
  586. }, e
  587. }();
  588. t.HSVA = r;
  589. var s = function () {
  590. function e(e) {
  591. if (!e) throw new Error("Color needs a value");
  592. if (e instanceof i) this.rgba = e; else if (e instanceof o) this._hsla = e, this.rgba = o.toRGBA(e); else {
  593. if (!(e instanceof r)) throw new Error("Invalid color ctor argument");
  594. this._hsva = e, this.rgba = r.toRGBA(e)
  595. }
  596. }
  597. return e.fromHex = function (t) {
  598. return e.Format.CSS.parseHex(t) || e.red
  599. }, Object.defineProperty(e.prototype, "hsla", {
  600. get: function () {
  601. return this._hsla ? this._hsla : o.fromRGBA(this.rgba)
  602. }, enumerable: !0, configurable: !0
  603. }), Object.defineProperty(e.prototype, "hsva", {
  604. get: function () {
  605. return this._hsva ? this._hsva : r.fromRGBA(this.rgba)
  606. }, enumerable: !0, configurable: !0
  607. }), e.prototype.equals = function (e) {
  608. return !!e && i.equals(this.rgba, e.rgba) && o.equals(this.hsla, e.hsla) && r.equals(this.hsva, e.hsva)
  609. }, e.prototype.getRelativeLuminance = function () {
  610. return n(.2126 * e._relativeLuminanceForComponent(this.rgba.r) + .7152 * e._relativeLuminanceForComponent(this.rgba.g) + .0722 * e._relativeLuminanceForComponent(this.rgba.b), 4)
  611. }, e._relativeLuminanceForComponent = function (e) {
  612. var t = e / 255;
  613. return t <= .03928 ? t / 12.92 : Math.pow((t + .055) / 1.055, 2.4)
  614. }, e.prototype.isLighter = function () {
  615. return (299 * this.rgba.r + 587 * this.rgba.g + 114 * this.rgba.b) / 1e3 >= 128
  616. }, e.prototype.isLighterThan = function (e) {
  617. return this.getRelativeLuminance() > e.getRelativeLuminance()
  618. }, e.prototype.isDarkerThan = function (e) {
  619. return this.getRelativeLuminance() < e.getRelativeLuminance()
  620. }, e.prototype.lighten = function (t) {
  621. return new e(new o(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * t, this.hsla.a))
  622. }, e.prototype.darken = function (t) {
  623. return new e(new o(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * t, this.hsla.a))
  624. }, e.prototype.transparent = function (t) {
  625. var n = this.rgba, o = n.r, r = n.g, s = n.b, a = n.a
  626. ;
  627. return new e(new i(o, r, s, a * t))
  628. }, e.prototype.isTransparent = function () {
  629. return 0 === this.rgba.a
  630. }, e.prototype.isOpaque = function () {
  631. return 1 === this.rgba.a
  632. }, e.prototype.opposite = function () {
  633. return new e(new i(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a))
  634. }, e.prototype.toString = function () {
  635. return "" + e.Format.CSS.format(this)
  636. }, e.getLighterColor = function (e, t, n) {
  637. if (e.isLighterThan(t)) return e;
  638. n = n || .5;
  639. var i = e.getRelativeLuminance(), o = t.getRelativeLuminance();
  640. return n = n * (o - i) / o, e.lighten(n)
  641. }, e.getDarkerColor = function (e, t, n) {
  642. if (e.isDarkerThan(t)) return e;
  643. n = n || .5;
  644. var i = e.getRelativeLuminance();
  645. return n = n * (i - t.getRelativeLuminance()) / i, e.darken(n)
  646. }, e.white = new e(new i(255, 255, 255, 1)), e.black = new e(new i(0, 0, 0, 1)), e.red = new e(new i(255, 0, 0, 1)), e.blue = new e(new i(0, 0, 255, 1)), e.cyan = new e(new i(0, 255, 255, 1)), e.lightgrey = new e(new i(211, 211, 211, 1)), e.transparent = new e(new i(0, 0, 0, 0)), e
  647. }();
  648. t.Color = s, function (e) {
  649. !function (t) {
  650. !function (t) {
  651. function n(e) {
  652. var t = e.toString(16);
  653. return 2 !== t.length ? "0" + t : t
  654. }
  655. function o(e) {
  656. switch (e) {
  657. case 48:
  658. return 0;
  659. case 49:
  660. return 1;
  661. case 50:
  662. return 2;
  663. case 51:
  664. return 3;
  665. case 52:
  666. return 4;
  667. case 53:
  668. return 5;
  669. case 54:
  670. return 6;
  671. case 55:
  672. return 7;
  673. case 56:
  674. return 8;
  675. case 57:
  676. return 9;
  677. case 97:
  678. case 65:
  679. return 10;
  680. case 98:
  681. case 66:
  682. return 11;
  683. case 99:
  684. case 67:
  685. return 12;
  686. case 100:
  687. case 68:
  688. return 13;
  689. case 101:
  690. case 69:
  691. return 14;
  692. case 102:
  693. case 70:
  694. return 15
  695. }
  696. return 0
  697. }
  698. t.formatRGB = function (t) {
  699. return 1 === t.rgba.a ? "rgb(" + t.rgba.r + ", " + t.rgba.g + ", " + t.rgba.b + ")" : e.Format.CSS.formatRGBA(t)
  700. }, t.formatRGBA = function (e) {
  701. return "rgba(" + e.rgba.r + ", " + e.rgba.g + ", " + e.rgba.b + ", " + +e.rgba.a.toFixed(2) + ")"
  702. }, t.formatHSL = function (t) {
  703. return 1 === t.hsla.a ? "hsl(" + t.hsla.h + ", " + (100 * t.hsla.s).toFixed(2) + "%, " + (100 * t.hsla.l).toFixed(2) + "%)" : e.Format.CSS.formatHSLA(t)
  704. }, t.formatHSLA = function (e) {
  705. return "hsla(" + e.hsla.h + ", " + (100 * e.hsla.s).toFixed(2) + "%, " + (100 * e.hsla.l).toFixed(2) + "%, " + e.hsla.a.toFixed(2) + ")"
  706. }, t.formatHex = function (e) {
  707. return "#" + n(e.rgba.r) + n(e.rgba.g) + n(e.rgba.b)
  708. }, t.formatHexA = function (t, i) {
  709. return void 0 === i && (i = !1),
  710. i && 1 === t.rgba.a ? e.Format.CSS.formatHex(t) : "#" + n(t.rgba.r) + n(t.rgba.g) + n(t.rgba.b) + n(Math.round(255 * t.rgba.a))
  711. }, t.format = function (t) {
  712. return t.isOpaque() ? e.Format.CSS.formatHex(t) : e.Format.CSS.formatRGBA(t)
  713. }, t.parseHex = function (t) {
  714. var n = t.length;
  715. if (0 === n) return null;
  716. if (35 !== t.charCodeAt(0)) return null;
  717. if (7 === n) {
  718. var r = 16 * o(t.charCodeAt(1)) + o(t.charCodeAt(2)),
  719. s = 16 * o(t.charCodeAt(3)) + o(t.charCodeAt(4)),
  720. a = 16 * o(t.charCodeAt(5)) + o(t.charCodeAt(6));
  721. return new e(new i(r, s, a, 1))
  722. }
  723. if (9 === n) {
  724. r = 16 * o(t.charCodeAt(1)) + o(t.charCodeAt(2)), s = 16 * o(t.charCodeAt(3)) + o(t.charCodeAt(4)), a = 16 * o(t.charCodeAt(5)) + o(t.charCodeAt(6));
  725. var l = 16 * o(t.charCodeAt(7)) + o(t.charCodeAt(8));
  726. return new e(new i(r, s, a, l / 255))
  727. }
  728. if (4 === n) {
  729. r = o(t.charCodeAt(1)), s = o(t.charCodeAt(2)), a = o(t.charCodeAt(3));
  730. return new e(new i(16 * r + r, 16 * s + s, 16 * a + a))
  731. }
  732. if (5 === n) {
  733. r = o(t.charCodeAt(1)), s = o(t.charCodeAt(2)), a = o(t.charCodeAt(3)), l = o(t.charCodeAt(4));
  734. return new e(new i(16 * r + r, 16 * s + s, 16 * a + a, (16 * l + l) / 255))
  735. }
  736. return null
  737. }
  738. }(t.CSS || (t.CSS = {}))
  739. }(e.Format || (e.Format = {}))
  740. }(s = t.Color || (t.Color = {})), t.Color = s
  741. })), define(n[101], i([0, 1]), (function (e, t) {
  742. "use strict";
  743. Object.defineProperty(t, "__esModule", {value: !0});
  744. var n = 0;
  745. function i() {
  746. var e = "$memoize" + n++, t = void 0, i = function (n, i, o) {
  747. var r = null, s = null;
  748. if ("function" == typeof o.value ? (r = "value", 0 !== (s = o.value).length && console.warn("Memoize should only be used in functions with zero parameters")) : "function" == typeof o.get && (r = "get", s = o.get), !s) throw new Error("not supported");
  749. var a = e + ":" + i;
  750. o[r] = function () {
  751. for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
  752. return t = this, this.hasOwnProperty(a) || Object.defineProperty(this, a, {
  753. configurable: !0,
  754. enumerable: !1,
  755. writable: !0,
  756. value: s.apply(this, e)
  757. }), this[a]
  758. }
  759. };
  760. return i.clear = function () {
  761. void 0 !== t && Object.getOwnPropertyNames(t).forEach((function (n) {
  762. 0 === n.indexOf(e) && delete t[n]
  763. }))
  764. }, i
  765. }
  766. t.createMemoizer = i, t.memoize = function (e, t, n) {
  767. return i()(e, t, n)
  768. }
  769. })), define(n[241], i([0, 1]), (function (e, t) {
  770. "use strict";
  771. Object.defineProperty(t, "__esModule", {value: !0});
  772. var n = function () {
  773. function e(e, t, n, i) {
  774. this.originalStart = e, this.originalLength = t, this.modifiedStart = n, this.modifiedLength = i
  775. }
  776. return e.prototype.getOriginalEnd = function () {
  777. return this.originalStart + this.originalLength
  778. }, e.prototype.getModifiedEnd = function () {
  779. return this.modifiedStart + this.modifiedLength
  780. }, e
  781. }();
  782. t.DiffChange = n
  783. })), define(n[10], i([0, 1]), (function (e, t) {
  784. "use strict";
  785. Object.defineProperty(t, "__esModule", {value: !0});
  786. var n = function () {
  787. function e() {
  788. this.listeners = [], this.unexpectedErrorHandler = function (e) {
  789. setTimeout((function () {
  790. if (e.stack) throw new Error(e.message + "\n\n" + e.stack);
  791. throw e
  792. }), 0)
  793. }
  794. }
  795. return e.prototype.emit = function (e) {
  796. this.listeners.forEach((function (t) {
  797. t(e)
  798. }))
  799. }, e.prototype.onUnexpectedError = function (e) {
  800. this.unexpectedErrorHandler(e), this.emit(e)
  801. }, e.prototype.onUnexpectedExternalError = function (e) {
  802. this.unexpectedErrorHandler(e)
  803. }, e
  804. }();
  805. t.ErrorHandler = n, t.errorHandler = new n, t.onUnexpectedError = function (e) {
  806. o(e) || t.errorHandler.onUnexpectedError(e)
  807. }, t.onUnexpectedExternalError = function (e) {
  808. o(e) || t.errorHandler.onUnexpectedExternalError(e)
  809. },
  810. t.transformErrorForSerialization = function (e) {
  811. return e instanceof Error ? {
  812. $isError: !0,
  813. name: e.name,
  814. message: e.message,
  815. stack: e.stacktrace || e.stack
  816. } : e
  817. };
  818. var i = "Canceled";
  819. function o(e) {
  820. return e instanceof Error && e.name === i && e.message === i
  821. }
  822. t.isPromiseCanceledError = o, t.canceled = function () {
  823. var e = new Error(i);
  824. return e.name = e.message, e
  825. }, t.illegalArgument = function (e) {
  826. return e ? new Error("Illegal argument: " + e) : new Error("Illegal argument")
  827. }, t.illegalState = function (e) {
  828. return e ? new Error("Illegal state: " + e) : new Error("Illegal state")
  829. }
  830. })), define(n[102], i([0, 1]), (function (e, t) {
  831. "use strict";
  832. Object.defineProperty(t, "__esModule", {value: !0}), t.once = function (e) {
  833. var t, n = this, i = !1;
  834. return function () {
  835. return i ? t : (i = !0, t = e.apply(n, arguments))
  836. }
  837. }
  838. })), define(n[125], i([0, 1]), (function (e, t) {
  839. "use strict";
  840. function n(e, t) {
  841. switch (void 0 === t && (t = 0), typeof e) {
  842. case"object":
  843. return null === e ? i(349, t) : Array.isArray(e) ? (r = e, s = i(104579, s = t), r.reduce((function (e, t) {
  844. return n(t, e)
  845. }), s)) : function (e, t) {
  846. return t = i(181387, t),
  847. Object.keys(e).sort().reduce((function (t, i) {
  848. return t = o(i, t), n(e[i], t)
  849. }), t)
  850. }(e, t);
  851. case"string":
  852. return o(e, t);
  853. case"boolean":
  854. return function (e, t) {
  855. return i(e ? 433 : 863, t)
  856. }(e, t);
  857. case"number":
  858. return i(e, t);
  859. case"undefined":
  860. return i(0, 937);
  861. default:
  862. return i(0, 617)
  863. }
  864. var r, s
  865. }
  866. function i(e, t) {
  867. return (t << 5) - t + e | 0
  868. }
  869. function o(e, t) {
  870. t = i(149417, t);
  871. for (var n = 0, o = e.length; n < o; n++) t = i(e.charCodeAt(n), t);
  872. return t
  873. }
  874. Object.defineProperty(t, "__esModule", {value: !0}), t.hash = n, t.stringHash = o
  875. })), define(n[126], i([0, 1, 241, 125]), (function (e, t, n, i) {
  876. "use strict";
  877. Object.defineProperty(t, "__esModule", {value: !0});
  878. var o = function () {
  879. function e(e) {
  880. this.source = e
  881. }
  882. return e.prototype.getElements = function () {
  883. for (var e = this.source, t = new Int32Array(e.length), n = 0, i = e.length; n < i; n++) t[n] = e.charCodeAt(n);
  884. return t
  885. }, e
  886. }();
  887. t.StringDiffSequence = o, t.stringDiff = function (e, t, n) {
  888. return new l(new o(e), new o(t)).ComputeDiff(n).changes
  889. };
  890. var r = function () {
  891. function e() {
  892. }
  893. return e.Assert = function (e, t) {
  894. if (!e) throw new Error(t)
  895. }, e
  896. }();
  897. t.Debug = r;
  898. var s = function () {
  899. function e() {
  900. }
  901. return e.Copy = function (e, t, n, i, o) {
  902. for (var r = 0; r < o; r++) n[i + r] = e[t + r]
  903. }, e.Copy2 = function (e, t, n, i, o) {
  904. for (var r = 0; r < o; r++) n[i + r] = e[t + r]
  905. }, e
  906. }();
  907. t.MyArray = s;
  908. var a = function () {
  909. function e() {
  910. this.m_changes = [], this.m_originalStart = 1073741824, this.m_modifiedStart = 1073741824, this.m_originalCount = 0, this.m_modifiedCount = 0
  911. }
  912. return e.prototype.MarkNextChange = function () {
  913. (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.m_changes.push(new n.DiffChange(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount)), this.m_originalCount = 0, this.m_modifiedCount = 0, this.m_originalStart = 1073741824, this.m_modifiedStart = 1073741824
  914. }, e.prototype.AddOriginalElement = function (e, t) {
  915. this.m_originalStart = Math.min(this.m_originalStart, e), this.m_modifiedStart = Math.min(this.m_modifiedStart, t), this.m_originalCount++
  916. }, e.prototype.AddModifiedElement = function (e, t) {
  917. this.m_originalStart = Math.min(this.m_originalStart, e), this.m_modifiedStart = Math.min(this.m_modifiedStart, t), this.m_modifiedCount++
  918. }, e.prototype.getChanges = function () {
  919. return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes
  920. }, e.prototype.getReverseChanges = function () {
  921. return (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), this.m_changes.reverse(), this.m_changes
  922. }, e
  923. }(), l = function () {
  924. function e(t, n, i) {
  925. void 0 === i && (i = null), this.ContinueProcessingPredicate = i;
  926. var o = e._getElements(t), r = o[0], s = o[1], a = o[2], l = e._getElements(n), u = l[0], d = l[1],
  927. c = l[2];
  928. this._hasStrings = a && c, this._originalStringElements = r, this._originalElementsOrHash = s, this._modifiedStringElements = u, this._modifiedElementsOrHash = d, this.m_forwardHistory = [], this.m_reverseHistory = []
  929. }
  930. return e._isStringArray = function (e) {
  931. return e.length > 0 && "string" == typeof e[0]
  932. }, e._getElements = function (t) {
  933. var n = t.getElements();
  934. if (e._isStringArray(n)) {
  935. for (var o = new Int32Array(n.length), r = 0, s = n.length; r < s; r++) o[r] = i.stringHash(n[r], 0);
  936. return [n, o, !0]
  937. }
  938. return n instanceof Int32Array ? [[], n, !1] : [[], new Int32Array(n), !1]
  939. }, e.prototype.ElementsAreEqual = function (e, t) {
  940. return this._originalElementsOrHash[e] === this._modifiedElementsOrHash[t] && (!this._hasStrings || this._originalStringElements[e] === this._modifiedStringElements[t])
  941. }, e.prototype.OriginalElementsAreEqual = function (e, t) {
  942. return this._originalElementsOrHash[e] === this._originalElementsOrHash[t] && (!this._hasStrings || this._originalStringElements[e] === this._originalStringElements[t])
  943. }, e.prototype.ModifiedElementsAreEqual = function (e, t) {
  944. return this._modifiedElementsOrHash[e] === this._modifiedElementsOrHash[t] && (!this._hasStrings || this._modifiedStringElements[e] === this._modifiedStringElements[t])
  945. }, e.prototype.ComputeDiff = function (e) {
  946. return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, e)
  947. }, e.prototype._ComputeDiff = function (e, t, n, i, o) {
  948. var r = [!1], s = this.ComputeDiffRecursive(e, t, n, i, r);
  949. return o && (s = this.PrettifyChanges(s)), {quitEarly: r[0], changes: s}
  950. }, e.prototype.ComputeDiffRecursive = function (e, t, i, o, s) {
  951. for (s[0] = !1; e <= t && i <= o && this.ElementsAreEqual(e, i);) e++, i++
  952. ;
  953. for (; t >= e && o >= i && this.ElementsAreEqual(t, o);) t--, o--;
  954. if (e > t || i > o) {
  955. var a = void 0;
  956. return i <= o ? (r.Assert(e === t + 1, "originalStart should only be one more than originalEnd"), a = [new n.DiffChange(e, 0, i, o - i + 1)]) : e <= t ? (r.Assert(i === o + 1, "modifiedStart should only be one more than modifiedEnd"), a = [new n.DiffChange(e, t - e + 1, i, 0)]) : (r.Assert(e === t + 1, "originalStart should only be one more than originalEnd"), r.Assert(i === o + 1, "modifiedStart should only be one more than modifiedEnd"), a = []), a
  957. }
  958. var l = [0], u = [0], d = this.ComputeRecursionPoint(e, t, i, o, l, u, s), c = l[0], h = u[0];
  959. if (null !== d) return d;
  960. if (!s[0]) {
  961. var p = this.ComputeDiffRecursive(e, c, i, h, s), g = [];
  962. return g = s[0] ? [new n.DiffChange(c + 1, t - (c + 1) + 1, h + 1, o - (h + 1) + 1)] : this.ComputeDiffRecursive(c + 1, t, h + 1, o, s), this.ConcatenateChanges(p, g)
  963. }
  964. return [new n.DiffChange(e, t - e + 1, i, o - i + 1)]
  965. }, e.prototype.WALKTRACE = function (e, t, i, o, r, s, l, u, d, c, h, p, g, f, m, v, _, y) {
  966. var C, b = null, S = new a, w = t, E = i, L = g[0] - v[0] - o, D = -1073741824,
  967. N = this.m_forwardHistory.length - 1;
  968. do {
  969. (k = L + e) === w || k < E && d[k - 1] < d[k + 1] ? (f = (h = d[k + 1]) - L - o,
  970. h < D && S.MarkNextChange(), D = h, S.AddModifiedElement(h + 1, f), L = k + 1 - e) : (f = (h = d[k - 1] + 1) - L - o, h < D && S.MarkNextChange(), D = h - 1, S.AddOriginalElement(h, f + 1), L = k - 1 - e), N >= 0 && (e = (d = this.m_forwardHistory[N])[0], w = 1, E = d.length - 1)
  971. } while (--N >= -1);
  972. if (C = S.getReverseChanges(), y[0]) {
  973. var x = g[0] + 1, I = v[0] + 1;
  974. if (null !== C && C.length > 0) {
  975. var M = C[C.length - 1];
  976. x = Math.max(x, M.getOriginalEnd()), I = Math.max(I, M.getModifiedEnd())
  977. }
  978. b = [new n.DiffChange(x, p - x + 1, I, m - I + 1)]
  979. } else {
  980. S = new a, w = s, E = l, L = g[0] - v[0] - u, D = 1073741824, N = _ ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;
  981. do {
  982. var k;
  983. (k = L + r) === w || k < E && c[k - 1] >= c[k + 1] ? (f = (h = c[k + 1] - 1) - L - u, h > D && S.MarkNextChange(), D = h + 1, S.AddOriginalElement(h + 1, f + 1), L = k + 1 - r) : (f = (h = c[k - 1]) - L - u, h > D && S.MarkNextChange(), D = h, S.AddModifiedElement(h + 1, f + 1), L = k - 1 - r), N >= 0 && (r = (c = this.m_reverseHistory[N])[0], w = 1, E = c.length - 1)
  984. } while (--N >= -1);
  985. b = S.getChanges()
  986. }
  987. return this.ConcatenateChanges(C, b)
  988. }, e.prototype.ComputeRecursionPoint = function (e, t, i, o, r, a, l) {
  989. var u = 0, d = 0, c = 0, h = 0, p = 0, g = 0;
  990. e--, i--, r[0] = 0, a[0] = 0, this.m_forwardHistory = [],
  991. this.m_reverseHistory = [];
  992. var f = t - e + (o - i), m = f + 1, v = new Int32Array(m), _ = new Int32Array(m), y = o - i, C = t - e,
  993. b = e - i, S = t - o, w = (C - y) % 2 == 0;
  994. v[y] = e, _[C] = t, l[0] = !1;
  995. for (var E = 1; E <= f / 2 + 1; E++) {
  996. var L = 0, D = 0;
  997. c = this.ClipDiagonalBound(y - E, E, y, m), h = this.ClipDiagonalBound(y + E, E, y, m);
  998. for (var N = c; N <= h; N += 2) {
  999. d = (u = N === c || N < h && v[N - 1] < v[N + 1] ? v[N + 1] : v[N - 1] + 1) - (N - y) - b;
  1000. for (var x = u; u < t && d < o && this.ElementsAreEqual(u + 1, d + 1);) u++, d++;
  1001. if (v[N] = u, u + d > L + D && (L = u, D = d), !w && Math.abs(N - C) <= E - 1 && u >= _[N]) return r[0] = u, a[0] = d, x <= _[N] && E <= 1448 ? this.WALKTRACE(y, c, h, b, C, p, g, S, v, _, u, t, r, d, o, a, w, l) : null
  1002. }
  1003. var I = (L - e + (D - i) - E) / 2;
  1004. if (null !== this.ContinueProcessingPredicate && !this.ContinueProcessingPredicate(L, I)) return l[0] = !0, r[0] = L, a[0] = D, I > 0 && E <= 1448 ? this.WALKTRACE(y, c, h, b, C, p, g, S, v, _, u, t, r, d, o, a, w, l) : (e++, i++, [new n.DiffChange(e, t - e + 1, i, o - i + 1)]);
  1005. p = this.ClipDiagonalBound(C - E, E, C, m), g = this.ClipDiagonalBound(C + E, E, C, m);
  1006. for (N = p; N <= g; N += 2) {
  1007. d = (u = N === p || N < g && _[N - 1] >= _[N + 1] ? _[N + 1] - 1 : _[N - 1]) - (N - C) - S;
  1008. for (x = u; u > e && d > i && this.ElementsAreEqual(u, d);) u--, d--;
  1009. if (_[N] = u,
  1010. w && Math.abs(N - y) <= E && u <= v[N]) return r[0] = u, a[0] = d, x >= v[N] && E <= 1448 ? this.WALKTRACE(y, c, h, b, C, p, g, S, v, _, u, t, r, d, o, a, w, l) : null
  1011. }
  1012. if (E <= 1447) {
  1013. var M = new Int32Array(h - c + 2);
  1014. M[0] = y - c + 1, s.Copy2(v, c, M, 1, h - c + 1), this.m_forwardHistory.push(M), (M = new Int32Array(g - p + 2))[0] = C - p + 1, s.Copy2(_, p, M, 1, g - p + 1), this.m_reverseHistory.push(M)
  1015. }
  1016. }
  1017. return this.WALKTRACE(y, c, h, b, C, p, g, S, v, _, u, t, r, d, o, a, w, l)
  1018. }, e.prototype.PrettifyChanges = function (e) {
  1019. for (var t = 0; t < e.length; t++) {
  1020. for (var n = e[t], i = t < e.length - 1 ? e[t + 1].originalStart : this._originalElementsOrHash.length, o = t < e.length - 1 ? e[t + 1].modifiedStart : this._modifiedElementsOrHash.length, r = n.originalLength > 0, s = n.modifiedLength > 0; n.originalStart + n.originalLength < i && n.modifiedStart + n.modifiedLength < o && (!r || this.OriginalElementsAreEqual(n.originalStart, n.originalStart + n.originalLength)) && (!s || this.ModifiedElementsAreEqual(n.modifiedStart, n.modifiedStart + n.modifiedLength));) n.originalStart++, n.modifiedStart++;
  1021. var a = [null];
  1022. t < e.length - 1 && this.ChangesOverlap(e[t], e[t + 1], a) && (e[t] = a[0], e.splice(t + 1, 1), t--)
  1023. }
  1024. for (t = e.length - 1; t >= 0; t--) {
  1025. n = e[t], i = 0, o = 0;
  1026. if (t > 0) {
  1027. var l = e[t - 1];
  1028. l.originalLength > 0 && (i = l.originalStart + l.originalLength), l.modifiedLength > 0 && (o = l.modifiedStart + l.modifiedLength)
  1029. }
  1030. r = n.originalLength > 0, s = n.modifiedLength > 0;
  1031. for (var u = 0, d = this._boundaryScore(n.originalStart, n.originalLength, n.modifiedStart, n.modifiedLength), c = 1; ; c++) {
  1032. var h = n.originalStart - c, p = n.modifiedStart - c;
  1033. if (h < i || p < o) break;
  1034. if (r && !this.OriginalElementsAreEqual(h, h + n.originalLength)) break;
  1035. if (s && !this.ModifiedElementsAreEqual(p, p + n.modifiedLength)) break;
  1036. var g = this._boundaryScore(h, n.originalLength, p, n.modifiedLength);
  1037. g > d && (d = g, u = c)
  1038. }
  1039. n.originalStart -= u, n.modifiedStart -= u
  1040. }
  1041. return e
  1042. }, e.prototype._OriginalIsBoundary = function (e) {
  1043. return e <= 0 || e >= this._originalElementsOrHash.length - 1 || this._hasStrings && /^\s*$/.test(this._originalStringElements[e])
  1044. }, e.prototype._OriginalRegionIsBoundary = function (e, t) {
  1045. if (this._OriginalIsBoundary(e) || this._OriginalIsBoundary(e - 1)) return !0;
  1046. if (t > 0) {
  1047. var n = e + t
  1048. ;
  1049. if (this._OriginalIsBoundary(n - 1) || this._OriginalIsBoundary(n)) return !0
  1050. }
  1051. return !1
  1052. }, e.prototype._ModifiedIsBoundary = function (e) {
  1053. return e <= 0 || e >= this._modifiedElementsOrHash.length - 1 || this._hasStrings && /^\s*$/.test(this._modifiedStringElements[e])
  1054. }, e.prototype._ModifiedRegionIsBoundary = function (e, t) {
  1055. if (this._ModifiedIsBoundary(e) || this._ModifiedIsBoundary(e - 1)) return !0;
  1056. if (t > 0) {
  1057. var n = e + t;
  1058. if (this._ModifiedIsBoundary(n - 1) || this._ModifiedIsBoundary(n)) return !0
  1059. }
  1060. return !1
  1061. }, e.prototype._boundaryScore = function (e, t, n, i) {
  1062. return (this._OriginalRegionIsBoundary(e, t) ? 1 : 0) + (this._ModifiedRegionIsBoundary(n, i) ? 1 : 0)
  1063. }, e.prototype.ConcatenateChanges = function (e, t) {
  1064. var n = [];
  1065. if (0 === e.length || 0 === t.length) return t.length > 0 ? t : e;
  1066. if (this.ChangesOverlap(e[e.length - 1], t[0], n)) {
  1067. var i = new Array(e.length + t.length - 1);
  1068. return s.Copy(e, 0, i, 0, e.length - 1), i[e.length - 1] = n[0], s.Copy(t, 1, i, e.length, t.length - 1), i
  1069. }
  1070. i = new Array(e.length + t.length);
  1071. return s.Copy(e, 0, i, 0, e.length), s.Copy(t, 0, i, e.length, t.length), i
  1072. }, e.prototype.ChangesOverlap = function (e, t, i) {
  1073. if (r.Assert(e.originalStart <= t.originalStart, "Left change is not less than or equal to right change"), r.Assert(e.modifiedStart <= t.modifiedStart, "Left change is not less than or equal to right change"), e.originalStart + e.originalLength >= t.originalStart || e.modifiedStart + e.modifiedLength >= t.modifiedStart) {
  1074. var o = e.originalStart, s = e.originalLength, a = e.modifiedStart, l = e.modifiedLength;
  1075. return e.originalStart + e.originalLength >= t.originalStart && (s = t.originalStart + t.originalLength - e.originalStart), e.modifiedStart + e.modifiedLength >= t.modifiedStart && (l = t.modifiedStart + t.modifiedLength - e.modifiedStart), i[0] = new n.DiffChange(o, s, a, l), !0
  1076. }
  1077. return i[0] = null, !1
  1078. }, e.prototype.ClipDiagonalBound = function (e, t, n, i) {
  1079. if (e >= 0 && e < i) return e;
  1080. var o = t % 2 == 0;
  1081. return e < 0 ? o === (n % 2 == 0) ? 0 : 1 : o === ((i - n - 1) % 2 == 0) ? i - 1 : i - 2
  1082. }, e
  1083. }();
  1084. t.LcsDiff = l
  1085. })), define(n[75], i([0, 1, 19, 100]), (function (e, t, n, i) {
  1086. "use strict";
  1087. Object.defineProperty(t, "__esModule", {value: !0});
  1088. var o = function () {
  1089. function e(e, t) {
  1090. var n, i;
  1091. void 0 === e && (e = ""), void 0 === t && (t = !1), this._value = e,
  1092. "boolean" == typeof t ? (this._isTrusted = t, this._supportThemeIcons = !1) : (this._isTrusted = null !== (n = t.isTrusted) && void 0 !== n && n, this._supportThemeIcons = null !== (i = t.supportThemeIcons) && void 0 !== i && i)
  1093. }
  1094. return Object.defineProperty(e.prototype, "value", {
  1095. get: function () {
  1096. return this._value
  1097. }, enumerable: !0, configurable: !0
  1098. }), Object.defineProperty(e.prototype, "isTrusted", {
  1099. get: function () {
  1100. return this._isTrusted
  1101. }, enumerable: !0, configurable: !0
  1102. }), Object.defineProperty(e.prototype, "supportThemeIcons", {
  1103. get: function () {
  1104. return this._supportThemeIcons
  1105. }, enumerable: !0, configurable: !0
  1106. }), e.prototype.appendText = function (e) {
  1107. return this._value += (this._supportThemeIcons ? i.escapeCodicons(e) : e).replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&").replace("\n", "\n\n"), this
  1108. }, e.prototype.appendMarkdown = function (e) {
  1109. return this._value += e, this
  1110. }, e.prototype.appendCodeblock = function (e, t) {
  1111. return this._value += "\n```", this._value += e, this._value += "\n", this._value += t, this._value += "\n```\n", this
  1112. }, e
  1113. }();
  1114. function r(e) {
  1115. return e instanceof o || !(!e || "object" != typeof e) && !("string" != typeof e.value || "boolean" != typeof e.isTrusted && void 0 !== e.isTrusted || "boolean" != typeof e.supportThemeIcons && void 0 !== e.supportThemeIcons)
  1116. }
  1117. function s(e, t) {
  1118. return e === t || !(!e || !t) && (e.value === t.value && e.isTrusted === t.isTrusted && e.supportThemeIcons === t.supportThemeIcons)
  1119. }
  1120. t.MarkdownString = o, t.isEmptyMarkdownString = function e(t) {
  1121. return r(t) ? !t.value : !Array.isArray(t) || t.every(e)
  1122. }, t.isMarkdownString = r, t.markedStringsEquals = function (e, t) {
  1123. return !e && !t || !(!e || !t) && (Array.isArray(e) && Array.isArray(t) ? n.equals(e, t, s) : !(!r(e) || !r(t)) && s(e, t))
  1124. }, t.removeMarkdownEscapes = function (e) {
  1125. return e ? e.replace(/\\([\\`*_{}[\]()#+\-.!])/g, "$1") : e
  1126. }, t.parseHrefAndDimensions = function (e) {
  1127. var t = [], n = e.split("|").map((function (e) {
  1128. return e.trim()
  1129. }));
  1130. e = n[0];
  1131. var i = n[1];
  1132. if (i) {
  1133. var o = /height=(\d+)/.exec(i), r = /width=(\d+)/.exec(i), s = o ? o[1] : "", a = r ? r[1] : "",
  1134. l = isFinite(parseInt(a)), u = isFinite(parseInt(s));
  1135. l && t.push('width="' + a + '"'), u && t.push('height="' + s + '"')
  1136. }
  1137. return {href: e, dimensions: t}
  1138. }
  1139. })), define(n[127], i([0, 1]), (function (e, t) {
  1140. "use strict";
  1141. Object.defineProperty(t, "__esModule", {value: !0});
  1142. var n = function () {
  1143. function e(e) {
  1144. this._prefix = e, this._lastId = 0
  1145. }
  1146. return e.prototype.nextId = function () {
  1147. return this._prefix + ++this._lastId
  1148. }, e
  1149. }();
  1150. t.IdGenerator = n, t.defaultGenerator = new n("id#")
  1151. })), function e(t, n, i) {
  1152. function o(s, a) {
  1153. if (!n[s]) {
  1154. if (!t[s]) {
  1155. var l = "function" == typeof require && require;
  1156. if (!a && l) return l(s, !0);
  1157. if (r) return r(s, !0);
  1158. var u = new Error("Cannot find module '" + s + "'");
  1159. throw u.code = "MODULE_NOT_FOUND", u
  1160. }
  1161. var d = n[s] = {exports: {}};
  1162. t[s][0].call(d.exports, (function (e) {
  1163. return o(t[s][1][e] || e)
  1164. }), d, d.exports, e, t, n, i)
  1165. }
  1166. return n[s].exports
  1167. }
  1168. for (var r = "function" == typeof require && require, s = 0; s < i.length; s++) o(i[s]);
  1169. return o
  1170. }({
  1171. 1: [function (e, t, n) {
  1172. "use strict";
  1173. var i = e("./toMap");
  1174. t.exports = {uris: i(["background", "base", "cite", "href", "longdesc", "src", "usemap"])}
  1175. }, {"./toMap": 10}], 2: [function (e, t, n) {
  1176. "use strict";
  1177. t.exports = {
  1178. allowedAttributes: {
  1179. "*": ["title", "accesskey"], a: ["href", "name", "target", "aria-label"],
  1180. iframe: ["allowfullscreen", "frameborder", "src"], img: ["src", "alt", "title", "aria-label"]
  1181. },
  1182. allowedClasses: {},
  1183. allowedSchemes: ["http", "https", "mailto"],
  1184. allowedTags: ["a", "abbr", "article", "b", "blockquote", "br", "caption", "code", "del", "details", "div", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd", "li", "main", "mark", "ol", "p", "pre", "section", "span", "strike", "strong", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead", "tr", "u", "ul"],
  1185. filter: null
  1186. }
  1187. }, {}], 3: [function (e, t, n) {
  1188. "use strict";
  1189. var i = e("./toMap");
  1190. t.exports = {voids: i(["area", "br", "col", "hr", "img", "wbr", "input", "base", "basefont", "link", "meta"])}
  1191. }, {"./toMap": 10}], 4: [function (e, t, n) {
  1192. "use strict";
  1193. e("he");
  1194. var i = e("assignment"), o = e("./parser"), r = e("./sanitizer"), a = e("./defaults");
  1195. function l(e, t, n) {
  1196. var s = [], l = !0 === n ? t : i({}, a, t), u = r(s, l);
  1197. return o(e, u), s.join("")
  1198. }
  1199. l.defaults = a, t.exports = l, s = l
  1200. }, {"./defaults": 2, "./parser": 7, "./sanitizer": 8, assignment: 6, he: 9}], 5: [function (e, t, n) {
  1201. "use strict";
  1202. t.exports = function (e) {
  1203. return "string" == typeof e ? e.toLowerCase() : e
  1204. }
  1205. }, {}],
  1206. 6: [function (e, t, n) {
  1207. "use strict";
  1208. t.exports = function e(t) {
  1209. for (var n, i, o = Array.prototype.slice.call(arguments, 1); o.length;) for (i in n = o.shift()) n.hasOwnProperty(i) && ("[object Object]" === Object.prototype.toString.call(t[i]) ? t[i] = e(t[i], n[i]) : t[i] = n[i]);
  1210. return t
  1211. }
  1212. }, {}], 7: [function (e, t, n) {
  1213. "use strict";
  1214. var i = e("he"), o = e("./lowercase"), r = (e("./attributes"), e("./elements")),
  1215. s = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,
  1216. a = /^<\s*\/\s*([\w:-]+)[^>]*>/,
  1217. l = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, u = /^</, d = /^<\s*\//;
  1218. t.exports = function (e, t) {
  1219. for (var n, c = function () {
  1220. var e = [];
  1221. return e.lastItem = function () {
  1222. return e[e.length - 1]
  1223. }, e
  1224. }(), h = e; e;) p();
  1225. function p() {
  1226. n = !0, function () {
  1227. "\x3c!--" === e.substr(0, 4) ? (i = e.indexOf("--\x3e")) >= 0 && (t.comment && t.comment(e.substring(4, i)), e = e.substring(i + 3), n = !1) : d.test(e) ? g(a, m) : u.test(e) && g(s, f);
  1228. var i;
  1229. !function () {
  1230. if (!n) return;
  1231. var i, o = e.indexOf("<");
  1232. o >= 0 ? (i = e.substring(0, o), e = e.substring(o)) : (i = e, e = "");
  1233. t.chars && t.chars(i)
  1234. }()
  1235. }();
  1236. var i = e === h;
  1237. h = e, i && (e = "")
  1238. }
  1239. function g(t, i) {
  1240. var o = e.match(t);
  1241. o && (e = e.substring(o[0].length), o[0].replace(t, i), n = !1)
  1242. }
  1243. function f(e, n, s, a) {
  1244. var u = {}, d = o(n), h = r.voids[d] || !!a;
  1245. s.replace(l, (function (e, t, n, o, r) {
  1246. u[t] = void 0 === n && void 0 === o && void 0 === r ? void 0 : i.decode(n || o || r || "")
  1247. })), h || c.push(d), t.start && t.start(d, u, h)
  1248. }
  1249. function m(e, n) {
  1250. var i, r = 0, s = o(n);
  1251. if (s) for (r = c.length - 1; r >= 0 && c[r] !== s; r--) ;
  1252. if (r >= 0) {
  1253. for (i = c.length - 1; i >= r; i--) t.end && t.end(c[i]);
  1254. c.length = r
  1255. }
  1256. }
  1257. m()
  1258. }
  1259. }, {"./attributes": 1, "./elements": 3, "./lowercase": 5, he: 9}], 8: [function (e, t, n) {
  1260. "use strict";
  1261. var i = e("he"), o = e("./lowercase"), r = e("./attributes"), s = e("./elements");
  1262. t.exports = function (e, t) {
  1263. var n, a = t || {};
  1264. return c(), {
  1265. start: function (e, t, s) {
  1266. var d = o(e);
  1267. if (n.ignoring) return void u(d);
  1268. if (-1 === (a.allowedTags || []).indexOf(d)) return void u(d);
  1269. if (a.filter && !a.filter({tag: d, attrs: t})) return void u(d);
  1270. l("<"), l(d), Object.keys(t).forEach((function (e) {
  1271. var n = t[e], s = (a.allowedClasses || {})[d] || [],
  1272. u = (a.allowedAttributes || {})[d] || [];
  1273. u = u.concat((a.allowedAttributes || {})["*"] || [])
  1274. ;var c = o(e);
  1275. ("class" === c && -1 === u.indexOf(c) ? (n = n.split(" ").filter((function (e) {
  1276. return s && -1 !== s.indexOf(e)
  1277. })).join(" ").trim()).length : -1 !== u.indexOf(c) && (!0 !== r.uris[c] || function (e) {
  1278. var t = e[0];
  1279. if ("#" === t || "/" === t) return !0;
  1280. var n = e.indexOf(":");
  1281. if (-1 === n) return !0;
  1282. var i = e.indexOf("?");
  1283. if (-1 !== i && n > i) return !0;
  1284. var o = e.indexOf("#");
  1285. if (-1 !== o && n > o) return !0;
  1286. return a.allowedSchemes.some((function (t) {
  1287. return 0 === e.indexOf(t + ":")
  1288. }))
  1289. }(n))) && (l(" "), l(e), "string" == typeof n && (l('="'), l(i.encode(n)), l('"')))
  1290. })), l(s ? "/>" : ">")
  1291. }, end: function (e) {
  1292. var t = o(e);
  1293. -1 !== (a.allowedTags || []).indexOf(t) && !1 === n.ignoring ? (l("</"), l(t), l(">")) : d(t)
  1294. }, chars: function (e) {
  1295. !1 === n.ignoring && l(a.transformText ? a.transformText(e) : e)
  1296. }
  1297. };
  1298. function l(t) {
  1299. e.push(t)
  1300. }
  1301. function u(e) {
  1302. s.voids[e] || (!1 === n.ignoring ? n = {ignoring: e, depth: 1} : n.ignoring === e && n.depth++)
  1303. }
  1304. function d(e) {
  1305. n.ignoring === e && --n.depth <= 0 && c()
  1306. }
  1307. function c() {
  1308. n = {ignoring: !1, depth: 0}
  1309. }
  1310. }
  1311. }, {"./attributes": 1, "./elements": 3, "./lowercase": 5, he: 9}], 9: [function (e, t, n) {
  1312. "use strict";
  1313. var i = {
  1314. "&": "&amp;",
  1315. "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;"
  1316. }, o = {"&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'"},
  1317. r = /(&amp;|&lt;|&gt;|&quot;|&#39;)/g, s = /[&<>"']/g;
  1318. function a(e) {
  1319. return i[e]
  1320. }
  1321. function l(e) {
  1322. return o[e]
  1323. }
  1324. function u(e) {
  1325. return null == e ? "" : String(e).replace(s, a)
  1326. }
  1327. function d(e) {
  1328. return null == e ? "" : String(e).replace(r, l)
  1329. }
  1330. u.options = d.options = {}, t.exports = {
  1331. encode: u,
  1332. escape: u,
  1333. decode: d,
  1334. unescape: d,
  1335. version: "1.0.0-browser"
  1336. }
  1337. }, {}], 10: [function (e, t, n) {
  1338. "use strict";
  1339. function i(e, t) {
  1340. return e[t] = !0, e
  1341. }
  1342. t.exports = function (e) {
  1343. return e.reduce(i, {})
  1344. }
  1345. }, {}]
  1346. }, {}, [4]), define("vs/base/common/insane/insane", (function () {
  1347. return {insane: s}
  1348. })), define(n[54], i([0, 1]), (function (e, t) {
  1349. "use strict";
  1350. var n;
  1351. Object.defineProperty(t, "__esModule", {value: !0}), t.FIN = {done: !0, value: void 0}, function (e) {
  1352. var n = {
  1353. next: function () {
  1354. return t.FIN
  1355. }
  1356. };
  1357. e.empty = function () {
  1358. return n
  1359. }, e.single = function (e) {
  1360. var n = !1;
  1361. return {
  1362. next: function () {
  1363. return n ? t.FIN : (n = !0, {done: !1, value: e})
  1364. }
  1365. }
  1366. }, e.fromArray = function (e, n, i) {
  1367. return void 0 === n && (n = 0), void 0 === i && (i = e.length), {
  1368. next: function () {
  1369. return n >= i ? t.FIN : {done: !1, value: e[n++]}
  1370. }
  1371. }
  1372. }, e.fromNativeIterator = function (e) {
  1373. return {
  1374. next: function () {
  1375. var n = e.next();
  1376. return n.done ? t.FIN : {done: !1, value: n.value}
  1377. }
  1378. }
  1379. }, e.from = function (t) {
  1380. return t ? Array.isArray(t) ? e.fromArray(t) : t : e.empty()
  1381. }, e.map = function (e, n) {
  1382. return {
  1383. next: function () {
  1384. var i = e.next();
  1385. return i.done ? t.FIN : {done: !1, value: n(i.value)}
  1386. }
  1387. }
  1388. }, e.filter = function (e, n) {
  1389. return {
  1390. next: function () {
  1391. for (; ;) {
  1392. var i = e.next();
  1393. if (i.done) return t.FIN;
  1394. if (n(i.value)) return {done: !1, value: i.value}
  1395. }
  1396. }
  1397. }
  1398. }, e.forEach = function (e, t) {
  1399. for (var n = e.next(); !n.done; n = e.next()) t(n.value)
  1400. }, e.collect = function (e, t) {
  1401. void 0 === t && (t = Number.POSITIVE_INFINITY);
  1402. var n = [];
  1403. if (0 === t) return n;
  1404. for (var i = 0, o = e.next(); !o.done && (n.push(o.value), !(++i >= t)); o = e.next()) ;
  1405. return n
  1406. }, e.concat = function () {
  1407. for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
  1408. var i = 0;
  1409. return {
  1410. next: function () {
  1411. if (i >= e.length) return t.FIN;
  1412. var n = e[i].next();
  1413. return n.done ? (i++, this.next()) : n
  1414. }
  1415. }
  1416. }, e.chain = function (e) {
  1417. return new i(e)
  1418. }
  1419. }(n = t.Iterator || (t.Iterator = {}));
  1420. var i = function () {
  1421. function e(e) {
  1422. this.it = e
  1423. }
  1424. return e.prototype.next = function () {
  1425. return this.it.next()
  1426. }, e
  1427. }();
  1428. t.ChainableIterator = i, t.getSequenceIterator = function (e) {
  1429. return Array.isArray(e) ? n.fromArray(e) : e || n.empty()
  1430. };
  1431. var o = function () {
  1432. function e(e, t, n, i) {
  1433. void 0 === t && (t = 0), void 0 === n && (n = e.length), void 0 === i && (i = t - 1), this.items = e, this.start = t, this.end = n, this.index = i
  1434. }
  1435. return e.prototype.first = function () {
  1436. return this.index = this.start, this.current()
  1437. }, e.prototype.next = function () {
  1438. return this.index = Math.min(this.index + 1, this.end), this.current()
  1439. }, e.prototype.current = function () {
  1440. return this.index === this.start - 1 || this.index === this.end ? null : this.items[this.index]
  1441. }, e
  1442. }();
  1443. t.ArrayIterator = o;
  1444. var s = function (e) {
  1445. function t(t, n, i, o) {
  1446. return void 0 === n && (n = 0), void 0 === i && (i = t.length), void 0 === o && (o = n - 1), e.call(this, t, n, i, o) || this
  1447. }
  1448. return r(t, e), t.prototype.current = function () {
  1449. return e.prototype.current.call(this)
  1450. }, t.prototype.previous = function () {
  1451. return this.index = Math.max(this.index - 1, this.start - 1), this.current()
  1452. }, t.prototype.first = function () {
  1453. return this.index = this.start, this.current()
  1454. }, t.prototype.last = function () {
  1455. return this.index = this.end - 1, this.current()
  1456. }, t.prototype.parent = function () {
  1457. return null
  1458. }, t
  1459. }(o);
  1460. t.ArrayNavigator = s;
  1461. var a = function () {
  1462. function e(e, t) {
  1463. this.iterator = e, this.fn = t
  1464. }
  1465. return e.prototype.next = function () {
  1466. return this.fn(this.iterator.next())
  1467. }, e
  1468. }();
  1469. t.MappedIterator = a
  1470. })), define(n[242], i([0, 1, 54]), (function (e, t, n) {
  1471. "use strict";
  1472. Object.defineProperty(t, "__esModule", {value: !0});
  1473. var i = function () {
  1474. function e(e, t) {
  1475. void 0 === e && (e = []), void 0 === t && (t = 10), this._initialize(e), this._limit = t, this._onChange()
  1476. }
  1477. return e.prototype.add = function (e) {
  1478. this._history.delete(e), this._history.add(e), this._onChange()
  1479. }, e.prototype.next = function () {
  1480. return this._navigator.next()
  1481. }, e.prototype.previous = function () {
  1482. return this._navigator.previous()
  1483. }, e.prototype.current = function () {
  1484. return this._navigator.current()
  1485. }, e.prototype.parent = function () {
  1486. return null
  1487. }, e.prototype.first = function () {
  1488. return this._navigator.first()
  1489. }, e.prototype.last = function () {
  1490. return this._navigator.last()
  1491. },
  1492. e.prototype.has = function (e) {
  1493. return this._history.has(e)
  1494. }, e.prototype._onChange = function () {
  1495. this._reduceToLimit();
  1496. var e = this._elements;
  1497. this._navigator = new n.ArrayNavigator(e, 0, e.length, e.length)
  1498. }, e.prototype._reduceToLimit = function () {
  1499. var e = this._elements;
  1500. e.length > this._limit && this._initialize(e.slice(e.length - this._limit))
  1501. }, e.prototype._initialize = function (e) {
  1502. this._history = new Set;
  1503. for (var t = 0, n = e; t < n.length; t++) {
  1504. var i = n[t];
  1505. this._history.add(i)
  1506. }
  1507. }, Object.defineProperty(e.prototype, "_elements", {
  1508. get: function () {
  1509. var e = [];
  1510. return this._history.forEach((function (t) {
  1511. return e.push(t)
  1512. })), e
  1513. }, enumerable: !0, configurable: !0
  1514. }), e
  1515. }();
  1516. t.HistoryNavigator = i
  1517. })), define(n[36], i([0, 1, 10]), (function (e, t, n) {
  1518. "use strict";
  1519. Object.defineProperty(t, "__esModule", {value: !0});
  1520. var i = function () {
  1521. function e() {
  1522. this._keyCodeToStr = [], this._strToKeyCode = Object.create(null)
  1523. }
  1524. return e.prototype.define = function (e, t) {
  1525. this._keyCodeToStr[e] = t, this._strToKeyCode[t.toLowerCase()] = e
  1526. }, e.prototype.keyCodeToStr = function (e) {
  1527. return this._keyCodeToStr[e]
  1528. },
  1529. e.prototype.strToKeyCode = function (e) {
  1530. return this._strToKeyCode[e.toLowerCase()] || 0
  1531. }, e
  1532. }(), o = new i, r = new i, s = new i;
  1533. function a(e, t) {
  1534. var n = !!(2048 & e), i = !!(256 & e);
  1535. return new l(2 === t ? i : n, !!(1024 & e), !!(512 & e), 2 === t ? n : i, 255 & e)
  1536. }
  1537. !function () {
  1538. function e(e, t, n, i) {
  1539. void 0 === n && (n = t), void 0 === i && (i = n), o.define(e, t), r.define(e, n), s.define(e, i)
  1540. }
  1541. e(0, "unknown"), e(1, "Backspace"), e(2, "Tab"), e(3, "Enter"), e(4, "Shift"), e(5, "Ctrl"), e(6, "Alt"), e(7, "PauseBreak"), e(8, "CapsLock"), e(9, "Escape"), e(10, "Space"), e(11, "PageUp"), e(12, "PageDown"), e(13, "End"), e(14, "Home"), e(15, "LeftArrow", "Left"), e(16, "UpArrow", "Up"), e(17, "RightArrow", "Right"), e(18, "DownArrow", "Down"), e(19, "Insert"), e(20, "Delete"), e(21, "0"), e(22, "1"), e(23, "2"), e(24, "3"), e(25, "4"), e(26, "5"), e(27, "6"), e(28, "7"), e(29, "8"), e(30, "9"), e(31, "A"), e(32, "B"), e(33, "C"), e(34, "D"), e(35, "E"), e(36, "F"), e(37, "G"), e(38, "H"), e(39, "I"), e(40, "J"), e(41, "K"), e(42, "L"), e(43, "M"), e(44, "N"), e(45, "O"), e(46, "P"), e(47, "Q"), e(48, "R"), e(49, "S"), e(50, "T"), e(51, "U"), e(52, "V"), e(53, "W"), e(54, "X"), e(55, "Y"),
  1542. e(56, "Z"), e(57, "Meta"), e(58, "ContextMenu"), e(59, "F1"), e(60, "F2"), e(61, "F3"), e(62, "F4"), e(63, "F5"), e(64, "F6"), e(65, "F7"), e(66, "F8"), e(67, "F9"), e(68, "F10"), e(69, "F11"), e(70, "F12"), e(71, "F13"), e(72, "F14"), e(73, "F15"), e(74, "F16"), e(75, "F17"), e(76, "F18"), e(77, "F19"), e(78, "NumLock"), e(79, "ScrollLock"), e(80, ";", ";", "OEM_1"), e(81, "=", "=", "OEM_PLUS"), e(82, ",", ",", "OEM_COMMA"), e(83, "-", "-", "OEM_MINUS"), e(84, ".", ".", "OEM_PERIOD"), e(85, "/", "/", "OEM_2"), e(86, "`", "`", "OEM_3"), e(110, "ABNT_C1"), e(111, "ABNT_C2"), e(87, "[", "[", "OEM_4"), e(88, "\\", "\\", "OEM_5"), e(89, "]", "]", "OEM_6"), e(90, "'", "'", "OEM_7"), e(91, "OEM_8"), e(92, "OEM_102"), e(93, "NumPad0"), e(94, "NumPad1"), e(95, "NumPad2"), e(96, "NumPad3"), e(97, "NumPad4"), e(98, "NumPad5"),e(99, "NumPad6"),e(100, "NumPad7"),e(101, "NumPad8"),e(102, "NumPad9"),e(103, "NumPad_Multiply"),e(104, "NumPad_Add"),e(105, "NumPad_Separator"),e(106, "NumPad_Subtract"),e(107, "NumPad_Decimal"),e(108, "NumPad_Divide")
  1543. }(), function (e) {
  1544. e.toString = function (e) {
  1545. return o.keyCodeToStr(e)
  1546. }, e.fromString = function (e) {
  1547. return o.strToKeyCode(e)
  1548. }, e.toUserSettingsUS = function (e) {
  1549. return r.keyCodeToStr(e)
  1550. }, e.toUserSettingsGeneral = function (e) {
  1551. return s.keyCodeToStr(e)
  1552. }, e.fromUserSettings = function (e) {
  1553. return r.strToKeyCode(e) || s.strToKeyCode(e)
  1554. }
  1555. }(t.KeyCodeUtils || (t.KeyCodeUtils = {})), t.KeyChord = function (e, t) {
  1556. return (e | (65535 & t) << 16 >>> 0) >>> 0
  1557. }, t.createKeybinding = function (e, t) {
  1558. if (0 === e) return null;
  1559. var n = (65535 & e) >>> 0, i = (4294901760 & e) >>> 16;
  1560. return new u(0 !== i ? [a(n, t), a(i, t)] : [a(n, t)])
  1561. }, t.createSimpleKeybinding = a;
  1562. var l = function () {
  1563. function e(e, t, n, i, o) {
  1564. this.ctrlKey = e, this.shiftKey = t, this.altKey = n, this.metaKey = i, this.keyCode = o
  1565. }
  1566. return e.prototype.equals = function (e) {
  1567. return this.ctrlKey === e.ctrlKey && this.shiftKey === e.shiftKey && this.altKey === e.altKey && this.metaKey === e.metaKey && this.keyCode === e.keyCode
  1568. }, e.prototype.isModifierKey = function () {
  1569. return 0 === this.keyCode || 5 === this.keyCode || 57 === this.keyCode || 6 === this.keyCode || 4 === this.keyCode
  1570. }, e.prototype.toChord = function () {
  1571. return new u([this])
  1572. }, e.prototype.isDuplicateModifierCase = function () {
  1573. return this.ctrlKey && 5 === this.keyCode || this.shiftKey && 4 === this.keyCode || this.altKey && 6 === this.keyCode || this.metaKey && 57 === this.keyCode
  1574. }, e
  1575. }();
  1576. t.SimpleKeybinding = l;
  1577. var u = function () {
  1578. function e(e) {
  1579. if (0 === e.length) throw n.illegalArgument("parts");
  1580. this.parts = e
  1581. }
  1582. return e.prototype.equals = function (e) {
  1583. if (null === e) return !1;
  1584. if (this.parts.length !== e.parts.length) return !1;
  1585. for (var t = 0; t < this.parts.length; t++) if (!this.parts[t].equals(e.parts[t])) return !1;
  1586. return !0
  1587. }, e
  1588. }();
  1589. t.ChordKeybinding = u;
  1590. var d = function (e, t, n, i, o, r) {
  1591. this.ctrlKey = e, this.shiftKey = t, this.altKey = n, this.metaKey = i, this.keyLabel = o, this.keyAriaLabel = r
  1592. };
  1593. t.ResolvedKeybindingPart = d;
  1594. var c = function () {
  1595. };
  1596. t.ResolvedKeybinding = c
  1597. })), define(n[128], i([0, 1]), (function (e, t) {
  1598. "use strict";
  1599. Object.defineProperty(t, "__esModule", {value: !0});
  1600. var n = function () {
  1601. function e(e) {
  1602. this.executor = e, this._didRun = !1
  1603. }
  1604. return e.prototype.getValue = function () {
  1605. if (!this._didRun) try {
  1606. this._value = this.executor()
  1607. } catch (e) {
  1608. this._error = e
  1609. } finally {
  1610. this._didRun = !0
  1611. }
  1612. if (this._error) throw this._error;
  1613. return this._value
  1614. }, Object.defineProperty(e.prototype, "rawValue", {
  1615. get: function () {
  1616. return this._value
  1617. }, enumerable: !0, configurable: !0
  1618. }), e
  1619. }();
  1620. t.Lazy = n
  1621. })), define(n[2], i([0, 1]), (function (e, t) {
  1622. "use strict";
  1623. Object.defineProperty(t, "__esModule", {value: !0});
  1624. var n = !1, i = "__is_disposable_tracked__";
  1625. function o(e) {
  1626. if (n && e && e !== l.None) try {
  1627. e[i] = !0
  1628. } catch (e) {
  1629. }
  1630. }
  1631. function r(e) {
  1632. if (!n) return e;
  1633. var t = new Error("Potentially leaked disposable").stack;
  1634. return setTimeout((function () {
  1635. e[i] || console.log(t)
  1636. }), 3e3), e
  1637. }
  1638. function s(e) {
  1639. return Array.isArray(e) ? (e.forEach((function (e) {
  1640. e && (o(e), e.dispose())
  1641. })), []) : e ? (o(e), e.dispose(), e) : void 0
  1642. }
  1643. t.isDisposable = function (e) {
  1644. return "function" == typeof e.dispose && 0 === e.dispose.length
  1645. }, t.dispose = s, t.combinedDisposable = function () {
  1646. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  1647. return e.forEach(o), r({
  1648. dispose: function () {
  1649. return s(e)
  1650. }
  1651. })
  1652. }, t.toDisposable = function (e) {
  1653. var t = r({
  1654. dispose: function () {
  1655. o(t), e()
  1656. }
  1657. });
  1658. return t
  1659. };
  1660. var a = function () {
  1661. function e() {
  1662. this._toDispose = new Set, this._isDisposed = !1
  1663. }
  1664. return e.prototype.dispose = function () {
  1665. this._isDisposed || (o(this), this._isDisposed = !0, this.clear())
  1666. }, e.prototype.clear = function () {
  1667. this._toDispose.forEach((function (e) {
  1668. return e.dispose()
  1669. })), this._toDispose.clear()
  1670. }, e.prototype.add = function (e) {
  1671. if (!e) return e;
  1672. if (e === this) throw new Error("Cannot register a disposable on itself!");
  1673. return o(e), this._isDisposed ? console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack) : this._toDispose.add(e), e
  1674. }, e
  1675. }();
  1676. t.DisposableStore = a;
  1677. var l = function () {
  1678. function e() {
  1679. this._store = new a, r(this)
  1680. }
  1681. return e.prototype.dispose = function () {
  1682. o(this), this._store.dispose()
  1683. }, e.prototype._register = function (e) {
  1684. if (e === this) throw new Error("Cannot register a disposable on itself!");
  1685. return this._store.add(e)
  1686. }, e.None = Object.freeze({
  1687. dispose: function () {
  1688. }
  1689. }), e
  1690. }();
  1691. t.Disposable = l;
  1692. var u = function () {
  1693. function e() {
  1694. this._isDisposed = !1, r(this)
  1695. }
  1696. return Object.defineProperty(e.prototype, "value", {
  1697. get: function () {
  1698. return this._isDisposed ? void 0 : this._value
  1699. }, set: function (e) {
  1700. this._isDisposed || e === this._value || (this._value && this._value.dispose(), e && o(e), this._value = e)
  1701. }, enumerable: !0, configurable: !0
  1702. }), e.prototype.clear = function () {
  1703. this.value = void 0
  1704. }, e.prototype.dispose = function () {
  1705. this._isDisposed = !0, o(this), this._value && this._value.dispose(), this._value = void 0
  1706. }, e
  1707. }();
  1708. t.MutableDisposable = u;
  1709. var d = function () {
  1710. function e(e) {
  1711. this.object = e
  1712. }
  1713. return e.prototype.dispose = function () {
  1714. }, e
  1715. }();
  1716. t.ImmortalReference = d
  1717. })), define(n[76], i([0, 1, 54]), (function (e, t, n) {
  1718. "use strict";
  1719. Object.defineProperty(t, "__esModule", {value: !0});
  1720. var i = function () {
  1721. function e(t) {
  1722. this.element = t, this.next = e.Undefined, this.prev = e.Undefined
  1723. }
  1724. return e.Undefined = new e(void 0), e
  1725. }(), o = function () {
  1726. function e() {
  1727. this._first = i.Undefined, this._last = i.Undefined, this._size = 0
  1728. }
  1729. return Object.defineProperty(e.prototype, "size", {
  1730. get: function () {
  1731. return this._size
  1732. }, enumerable: !0, configurable: !0
  1733. }), e.prototype.isEmpty = function () {
  1734. return this._first === i.Undefined
  1735. }, e.prototype.clear = function () {
  1736. this._first = i.Undefined, this._last = i.Undefined, this._size = 0
  1737. }, e.prototype.unshift = function (e) {
  1738. return this._insert(e, !1)
  1739. }, e.prototype.push = function (e) {
  1740. return this._insert(e, !0)
  1741. }, e.prototype._insert = function (e, t) {
  1742. var n = this, o = new i(e);
  1743. if (this._first === i.Undefined) this._first = o, this._last = o; else if (t) {
  1744. var r = this._last;
  1745. this._last = o, o.prev = r, r.next = o
  1746. } else {
  1747. var s = this._first;
  1748. this._first = o, o.next = s, s.prev = o
  1749. }
  1750. this._size += 1;
  1751. var a = !1;
  1752. return function () {
  1753. a || (a = !0, n._remove(o))
  1754. }
  1755. }, e.prototype.shift = function () {
  1756. if (this._first !== i.Undefined) {
  1757. var e = this._first.element;
  1758. return this._remove(this._first), e
  1759. }
  1760. }, e.prototype.pop = function () {
  1761. if (this._last !== i.Undefined) {
  1762. var e = this._last.element;
  1763. return this._remove(this._last), e
  1764. }
  1765. }, e.prototype._remove = function (e) {
  1766. if (e.prev !== i.Undefined && e.next !== i.Undefined) {
  1767. var t = e.prev;
  1768. t.next = e.next, e.next.prev = t
  1769. } else e.prev === i.Undefined && e.next === i.Undefined ? (this._first = i.Undefined, this._last = i.Undefined) : e.next === i.Undefined ? (this._last = this._last.prev,
  1770. this._last.next = i.Undefined) : e.prev === i.Undefined && (this._first = this._first.next, this._first.prev = i.Undefined);
  1771. this._size -= 1
  1772. }, e.prototype.iterator = function () {
  1773. var e, t = this._first;
  1774. return {
  1775. next: function () {
  1776. return t === i.Undefined ? n.FIN : (e ? e.value = t.element : e = {
  1777. done: !1,
  1778. value: t.element
  1779. }, t = t.next, e)
  1780. }
  1781. }
  1782. }, e.prototype.toArray = function () {
  1783. for (var e = [], t = this._first; t !== i.Undefined; t = t.next) e.push(t.element);
  1784. return e
  1785. }, e
  1786. }();
  1787. t.LinkedList = o
  1788. })), define(n[4], i([0, 1, 10, 102, 2, 76]), (function (e, t, n, i, o, s) {
  1789. "use strict";
  1790. var a;
  1791. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  1792. function t(e) {
  1793. return function (t, n, i) {
  1794. void 0 === n && (n = null);
  1795. var o, r = !1;
  1796. return o = e((function (e) {
  1797. if (!r) return o ? o.dispose() : r = !0, t.call(n, e)
  1798. }), null, i), r && o.dispose(), o
  1799. }
  1800. }
  1801. function n(e, t) {
  1802. return a((function (n, i, o) {
  1803. return void 0 === i && (i = null), e((function (e) {
  1804. return n.call(i, t(e))
  1805. }), null, o)
  1806. }))
  1807. }
  1808. function i(e, t) {
  1809. return a((function (n, i, o) {
  1810. return void 0 === i && (i = null), e((function (e) {
  1811. t(e), n.call(i, e)
  1812. }), null, o)
  1813. }))
  1814. }
  1815. function r(e, t) {
  1816. return a((function (n, i, o) {
  1817. return void 0 === i && (i = null), e((function (e) {
  1818. return t(e) && n.call(i, e)
  1819. }), null, o)
  1820. }))
  1821. }
  1822. function s(e, t, i) {
  1823. var o = i;
  1824. return n(e, (function (e) {
  1825. return o = t(o, e)
  1826. }))
  1827. }
  1828. function a(e) {
  1829. var t, n = new d({
  1830. onFirstListenerAdd: function () {
  1831. t = e(n.fire, n)
  1832. }, onLastListenerRemove: function () {
  1833. t.dispose()
  1834. }
  1835. });
  1836. return n.event
  1837. }
  1838. function l(e, t, n, i, o) {
  1839. var r;
  1840. void 0 === n && (n = 100), void 0 === i && (i = !1);
  1841. var s = void 0, a = void 0, l = 0, u = new d({
  1842. leakWarningThreshold: o, onFirstListenerAdd: function () {
  1843. r = e((function (e) {
  1844. l++, s = t(s, e), i && !a && (u.fire(s), s = void 0), clearTimeout(a), a = setTimeout((function () {
  1845. var e = s;
  1846. s = void 0, a = void 0, (!i || l > 1) && u.fire(e), l = 0
  1847. }), n)
  1848. }))
  1849. }, onLastListenerRemove: function () {
  1850. r.dispose()
  1851. }
  1852. });
  1853. return u.event
  1854. }
  1855. function u(e) {
  1856. var t, n = !0;
  1857. return r(e, (function (e) {
  1858. var i = n || e !== t;
  1859. return n = !1, t = e, i
  1860. }))
  1861. }
  1862. e.None = function () {
  1863. return o.Disposable.None
  1864. }, e.once = t, e.map = n, e.forEach = i, e.filter = r, e.signal = function (e) {
  1865. return e
  1866. }, e.any = function () {
  1867. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  1868. return function (t, n, i) {
  1869. return void 0 === n && (n = null),
  1870. o.combinedDisposable.apply(void 0, e.map((function (e) {
  1871. return e((function (e) {
  1872. return t.call(n, e)
  1873. }), null, i)
  1874. })))
  1875. }
  1876. }, e.reduce = s, e.snapshot = a, e.debounce = l, e.stopwatch = function (e) {
  1877. var i = (new Date).getTime();
  1878. return n(t(e), (function (e) {
  1879. return (new Date).getTime() - i
  1880. }))
  1881. }, e.latch = u, e.buffer = function (e, t, n) {
  1882. void 0 === t && (t = !1), void 0 === n && (n = []);
  1883. var i = n.slice(), o = e((function (e) {
  1884. i ? i.push(e) : s.fire(e)
  1885. })), r = function () {
  1886. i && i.forEach((function (e) {
  1887. return s.fire(e)
  1888. })), i = null
  1889. }, s = new d({
  1890. onFirstListenerAdd: function () {
  1891. o || (o = e((function (e) {
  1892. return s.fire(e)
  1893. })))
  1894. }, onFirstListenerDidAdd: function () {
  1895. i && (t ? setTimeout(r) : r())
  1896. }, onLastListenerRemove: function () {
  1897. o && o.dispose(), o = null
  1898. }
  1899. });
  1900. return s.event
  1901. };
  1902. var c = function () {
  1903. function e(e) {
  1904. this.event = e
  1905. }
  1906. return e.prototype.map = function (t) {
  1907. return new e(n(this.event, t))
  1908. }, e.prototype.forEach = function (t) {
  1909. return new e(i(this.event, t))
  1910. }, e.prototype.filter = function (t) {
  1911. return new e(r(this.event, t))
  1912. }, e.prototype.reduce = function (t, n) {
  1913. return new e(s(this.event, t, n))
  1914. }, e.prototype.latch = function () {
  1915. return new e(u(this.event))
  1916. }, e.prototype.debounce = function (t, n, i, o) {
  1917. return void 0 === n && (n = 100), void 0 === i && (i = !1), new e(l(this.event, t, n, i, o))
  1918. }, e.prototype.on = function (e, t, n) {
  1919. return this.event(e, t, n)
  1920. }, e.prototype.once = function (e, n, i) {
  1921. return t(this.event)(e, n, i)
  1922. }, e
  1923. }();
  1924. e.chain = function (e) {
  1925. return new c(e)
  1926. }, e.fromNodeEventEmitter = function (e, t, n) {
  1927. void 0 === n && (n = function (e) {
  1928. return e
  1929. });
  1930. var i = function () {
  1931. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  1932. return o.fire(n.apply(void 0, e))
  1933. }, o = new d({
  1934. onFirstListenerAdd: function () {
  1935. return e.on(t, i)
  1936. }, onLastListenerRemove: function () {
  1937. return e.removeListener(t, i)
  1938. }
  1939. });
  1940. return o.event
  1941. }, e.fromDOMEventEmitter = function (e, t, n) {
  1942. void 0 === n && (n = function (e) {
  1943. return e
  1944. });
  1945. var i = function () {
  1946. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  1947. return o.fire(n.apply(void 0, e))
  1948. }, o = new d({
  1949. onFirstListenerAdd: function () {
  1950. return e.addEventListener(t, i)
  1951. }, onLastListenerRemove: function () {
  1952. return e.removeEventListener(t, i)
  1953. }
  1954. });
  1955. return o.event
  1956. }, e.fromPromise = function (e) {
  1957. var t = new d, n = !1
  1958. ;
  1959. return e.then(void 0, (function () {
  1960. return null
  1961. })).then((function () {
  1962. n ? t.fire(void 0) : setTimeout((function () {
  1963. return t.fire(void 0)
  1964. }), 0)
  1965. })), n = !0, t.event
  1966. }, e.toPromise = function (e) {
  1967. return new Promise((function (n) {
  1968. return t(e)(n)
  1969. }))
  1970. }
  1971. }(a = t.Event || (t.Event = {}));
  1972. var l = -1, u = function () {
  1973. function e(e, t) {
  1974. void 0 === t && (t = Math.random().toString(18).slice(2, 5)), this.customThreshold = e, this.name = t, this._warnCountdown = 0
  1975. }
  1976. return e.prototype.dispose = function () {
  1977. this._stacks && this._stacks.clear()
  1978. }, e.prototype.check = function (e) {
  1979. var t = this, n = l;
  1980. if ("number" == typeof this.customThreshold && (n = this.customThreshold), !(n <= 0 || e < n)) {
  1981. this._stacks || (this._stacks = new Map);
  1982. var i = (new Error).stack.split("\n").slice(3).join("\n"), o = this._stacks.get(i) || 0;
  1983. if (this._stacks.set(i, o + 1), this._warnCountdown -= 1, this._warnCountdown <= 0) {
  1984. var r;
  1985. this._warnCountdown = .5 * n;
  1986. var s = 0;
  1987. this._stacks.forEach((function (e, t) {
  1988. (!r || s < e) && (r = t, s = e)
  1989. })), console.warn("[" + this.name + "] potential listener LEAK detected, having " + e + " listeners already. MOST frequent listener (" + s + "):"),
  1990. console.warn(r)
  1991. }
  1992. return function () {
  1993. var e = t._stacks.get(i) || 0;
  1994. t._stacks.set(i, e - 1)
  1995. }
  1996. }
  1997. }, e
  1998. }(), d = function () {
  1999. function e(e) {
  2000. this._disposed = !1, this._options = e, this._leakageMon = l > 0 ? new u(this._options && this._options.leakWarningThreshold) : void 0
  2001. }
  2002. return Object.defineProperty(e.prototype, "event", {
  2003. get: function () {
  2004. var t = this;
  2005. return this._event || (this._event = function (n, i, r) {
  2006. t._listeners || (t._listeners = new s.LinkedList);
  2007. var a = t._listeners.isEmpty();
  2008. a && t._options && t._options.onFirstListenerAdd && t._options.onFirstListenerAdd(t);
  2009. var l, u, d = t._listeners.push(i ? [n, i] : n);
  2010. return a && t._options && t._options.onFirstListenerDidAdd && t._options.onFirstListenerDidAdd(t), t._options && t._options.onListenerDidAdd && t._options.onListenerDidAdd(t, n, i), t._leakageMon && (l = t._leakageMon.check(t._listeners.size)), u = {
  2011. dispose: function () {
  2012. (l && l(), u.dispose = e._noop, t._disposed) || (d(), t._options && t._options.onLastListenerRemove && (t._listeners && !t._listeners.isEmpty() || t._options.onLastListenerRemove(t)))
  2013. }
  2014. },
  2015. r instanceof o.DisposableStore ? r.add(u) : Array.isArray(r) && r.push(u), u
  2016. }), this._event
  2017. }, enumerable: !0, configurable: !0
  2018. }), e.prototype.fire = function (e) {
  2019. if (this._listeners) {
  2020. this._deliveryQueue || (this._deliveryQueue = new s.LinkedList);
  2021. for (var t = this._listeners.iterator(), i = t.next(); !i.done; i = t.next()) this._deliveryQueue.push([i.value, e]);
  2022. for (; this._deliveryQueue.size > 0;) {
  2023. var o = this._deliveryQueue.shift(), r = o[0], a = o[1];
  2024. try {
  2025. "function" == typeof r ? r.call(void 0, a) : r[0].call(r[1], a)
  2026. } catch (i) {
  2027. n.onUnexpectedError(i)
  2028. }
  2029. }
  2030. }
  2031. }, e.prototype.dispose = function () {
  2032. this._listeners && this._listeners.clear(), this._deliveryQueue && this._deliveryQueue.clear(), this._leakageMon && this._leakageMon.dispose(), this._disposed = !0
  2033. }, e._noop = function () {
  2034. }, e
  2035. }();
  2036. t.Emitter = d;
  2037. var c = function (e) {
  2038. function t(t) {
  2039. var n = e.call(this, t) || this;
  2040. return n._isPaused = 0, n._eventQueue = new s.LinkedList, n._mergeFn = t && t.merge, n
  2041. }
  2042. return r(t, e), t.prototype.pause = function () {
  2043. this._isPaused++
  2044. }, t.prototype.resume = function () {
  2045. if (0 !== this._isPaused && 0 == --this._isPaused) if (this._mergeFn) {
  2046. var t = this._eventQueue.toArray();
  2047. this._eventQueue.clear(), e.prototype.fire.call(this, this._mergeFn(t))
  2048. } else for (; !this._isPaused && 0 !== this._eventQueue.size;) e.prototype.fire.call(this, this._eventQueue.shift())
  2049. }, t.prototype.fire = function (t) {
  2050. this._listeners && (0 !== this._isPaused ? this._eventQueue.push(t) : e.prototype.fire.call(this, t))
  2051. }, t
  2052. }(d);
  2053. t.PauseableEmitter = c;
  2054. var h = function () {
  2055. function e() {
  2056. var e = this;
  2057. this.hasListeners = !1, this.events = [], this.emitter = new d({
  2058. onFirstListenerAdd: function () {
  2059. return e.onFirstListenerAdd()
  2060. }, onLastListenerRemove: function () {
  2061. return e.onLastListenerRemove()
  2062. }
  2063. })
  2064. }
  2065. return Object.defineProperty(e.prototype, "event", {
  2066. get: function () {
  2067. return this.emitter.event
  2068. }, enumerable: !0, configurable: !0
  2069. }), e.prototype.add = function (e) {
  2070. var t = this, n = {event: e, listener: null};
  2071. this.events.push(n), this.hasListeners && this.hook(n);
  2072. return o.toDisposable(i.once((function () {
  2073. t.hasListeners && t.unhook(n);
  2074. var e = t.events.indexOf(n);
  2075. t.events.splice(e, 1)
  2076. })))
  2077. }, e.prototype.onFirstListenerAdd = function () {
  2078. var e = this;
  2079. this.hasListeners = !0,
  2080. this.events.forEach((function (t) {
  2081. return e.hook(t)
  2082. }))
  2083. }, e.prototype.onLastListenerRemove = function () {
  2084. var e = this;
  2085. this.hasListeners = !1, this.events.forEach((function (t) {
  2086. return e.unhook(t)
  2087. }))
  2088. }, e.prototype.hook = function (e) {
  2089. var t = this;
  2090. e.listener = e.event((function (e) {
  2091. return t.emitter.fire(e)
  2092. }))
  2093. }, e.prototype.unhook = function (e) {
  2094. e.listener && e.listener.dispose(), e.listener = null
  2095. }, e.prototype.dispose = function () {
  2096. this.emitter.dispose()
  2097. }, e
  2098. }();
  2099. t.EventMultiplexer = h;
  2100. var p = function () {
  2101. function e() {
  2102. this.buffers = []
  2103. }
  2104. return e.prototype.wrapEvent = function (e) {
  2105. var t = this;
  2106. return function (n, i, o) {
  2107. return e((function (e) {
  2108. var o = t.buffers[t.buffers.length - 1];
  2109. o ? o.push((function () {
  2110. return n.call(i, e)
  2111. })) : n.call(i, e)
  2112. }), void 0, o)
  2113. }
  2114. }, e.prototype.bufferEvents = function (e) {
  2115. var t = [];
  2116. this.buffers.push(t);
  2117. var n = e();
  2118. return this.buffers.pop(), t.forEach((function (e) {
  2119. return e()
  2120. })), n
  2121. }, e
  2122. }();
  2123. t.EventBufferer = p;
  2124. var g = function () {
  2125. function e() {
  2126. var e = this;
  2127. this.listening = !1, this.inputEvent = a.None, this.inputEventListener = o.Disposable.None, this.emitter = new d({
  2128. onFirstListenerDidAdd: function () {
  2129. e.listening = !0, e.inputEventListener = e.inputEvent(e.emitter.fire, e.emitter)
  2130. }, onLastListenerRemove: function () {
  2131. e.listening = !1, e.inputEventListener.dispose()
  2132. }
  2133. }), this.event = this.emitter.event
  2134. }
  2135. return Object.defineProperty(e.prototype, "input", {
  2136. set: function (e) {
  2137. this.inputEvent = e, this.listening && (this.inputEventListener.dispose(), this.inputEventListener = e(this.emitter.fire, this.emitter))
  2138. }, enumerable: !0, configurable: !0
  2139. }), e.prototype.dispose = function () {
  2140. this.inputEventListener.dispose(), this.emitter.dispose()
  2141. }, e
  2142. }();
  2143. t.Relay = g
  2144. })), define(n[24], i([0, 1, 4]), (function (e, t, n) {
  2145. "use strict";
  2146. Object.defineProperty(t, "__esModule", {value: !0});
  2147. var i = function () {
  2148. function e() {
  2149. this._zoomLevel = 0, this._lastZoomLevelChangeTime = 0, this._onDidChangeZoomLevel = new n.Emitter, this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event
  2150. }
  2151. return e.prototype.getZoomLevel = function () {
  2152. return this._zoomLevel
  2153. }, e.prototype.getTimeSinceLastZoomLevelChanged = function () {
  2154. return Date.now() - this._lastZoomLevelChangeTime
  2155. },
  2156. e.prototype.getPixelRatio = function () {
  2157. var e = document.createElement("canvas").getContext("2d");
  2158. return (window.devicePixelRatio || 1) / (e.webkitBackingStorePixelRatio || e.mozBackingStorePixelRatio || e.msBackingStorePixelRatio || e.oBackingStorePixelRatio || e.backingStorePixelRatio || 1)
  2159. }, e.INSTANCE = new e, e
  2160. }();
  2161. t.getZoomLevel = function () {
  2162. return i.INSTANCE.getZoomLevel()
  2163. }, t.getTimeSinceLastZoomLevelChanged = function () {
  2164. return i.INSTANCE.getTimeSinceLastZoomLevelChanged()
  2165. }, t.onDidChangeZoomLevel = function (e) {
  2166. return i.INSTANCE.onDidChangeZoomLevel(e)
  2167. }, t.getPixelRatio = function () {
  2168. return i.INSTANCE.getPixelRatio()
  2169. };
  2170. var o = navigator.userAgent;
  2171. t.isIE = o.indexOf("Trident") >= 0, t.isEdge = o.indexOf("Edge/") >= 0, t.isEdgeOrIE = t.isIE || t.isEdge, t.isFirefox = o.indexOf("Firefox") >= 0, t.isWebKit = o.indexOf("AppleWebKit") >= 0, t.isChrome = o.indexOf("Chrome") >= 0, t.isSafari = !t.isChrome && o.indexOf("Safari") >= 0, t.isWebkitWebView = !t.isChrome && !t.isSafari && t.isWebKit, t.isIPad = o.indexOf("iPad") >= 0 || t.isSafari && navigator.maxTouchPoints > 0,
  2172. t.isEdgeWebView = t.isEdge && o.indexOf("WebView/") >= 0, t.isStandalone = window.matchMedia && window.matchMedia("(display-mode: standalone)").matches
  2173. })), define(n[52], i([0, 1, 4]), (function (e, t, n) {
  2174. "use strict";
  2175. Object.defineProperty(t, "__esModule", {value: !0}), t.domEvent = function (e, t, i) {
  2176. var o = function (e) {
  2177. return r.fire(e)
  2178. }, r = new n.Emitter({
  2179. onFirstListenerAdd: function () {
  2180. e.addEventListener(t, o, i)
  2181. }, onLastListenerRemove: function () {
  2182. e.removeEventListener(t, o, i)
  2183. }
  2184. });
  2185. return r.event
  2186. }, t.stop = function (e) {
  2187. return n.Event.map(e, (function (e) {
  2188. return e.preventDefault(), e.stopPropagation(), e
  2189. }))
  2190. }
  2191. }));
  2192. var a = this && this.__spreadArrays || function () {
  2193. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  2194. var i = Array(e), o = 0;
  2195. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  2196. return i
  2197. };
  2198. define(n[129], i([0, 1, 99, 19, 4, 54]), (function (e, t, n, i, o, r) {
  2199. "use strict";
  2200. function s(e) {
  2201. return "object" == typeof e && "visibility" in e && "data" in e
  2202. }
  2203. function l(e) {
  2204. switch (e) {
  2205. case!0:
  2206. return 1;
  2207. case!1:
  2208. return 0;
  2209. default:
  2210. return e
  2211. }
  2212. }
  2213. function u(e) {
  2214. return "boolean" == typeof e.collapsible
  2215. }
  2216. Object.defineProperty(t, "__esModule", {value: !0}), t.isFilterResult = s, t.getVisibleState = l;
  2217. var d = function () {
  2218. function e(e, t, n, i) {
  2219. void 0 === i && (i = {}), this.user = e, this.list = t, this.rootRef = [], this.eventBufferer = new o.EventBufferer, this._onDidChangeCollapseState = new o.Emitter, this.onDidChangeCollapseState = this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event), this._onDidChangeRenderNodeCount = new o.Emitter, this.onDidChangeRenderNodeCount = this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event), this._onDidSplice = new o.Emitter, this.onDidSplice = this._onDidSplice.event, this.collapseByDefault = void 0 !== i.collapseByDefault && i.collapseByDefault, this.filter = i.filter, this.autoExpandSingleChildren = void 0 !== i.autoExpandSingleChildren && i.autoExpandSingleChildren, this.root = {
  2220. parent: void 0,
  2221. element: n,
  2222. children: [],
  2223. depth: 0,
  2224. visibleChildrenCount: 0,
  2225. visibleChildIndex: -1,
  2226. collapsible: !1,
  2227. collapsed: !1,
  2228. renderNodeCount: 0,
  2229. visible: !0,
  2230. filterData: void 0
  2231. }
  2232. }
  2233. return e.prototype.splice = function (e, t, i, o, s) {
  2234. var l, u = this;
  2235. if (0 === e.length) throw new n.TreeError(this.user, "Invalid tree location");
  2236. for (var d = this.getParentNodeWithListIndex(e), c = d.parentNode, h = d.listIndex, p = d.revealed, g = d.visible, f = [], m = r.Iterator.map(r.Iterator.from(i), (function (e) {
  2237. return u.createTreeNode(e, c, c.visible ? 1 : 0, p, f, o)
  2238. })), v = e[e.length - 1], _ = 0, y = v; y >= 0 && y < c.children.length; y--) {
  2239. if ((N = c.children[y]).visible) {
  2240. _ = N.visibleChildIndex;
  2241. break
  2242. }
  2243. }
  2244. var C = [], b = 0, S = 0;
  2245. r.Iterator.forEach(m, (function (e) {
  2246. C.push(e), S += e.renderNodeCount, e.visible && (e.visibleChildIndex = _ + b++)
  2247. }));
  2248. for (var w = (l = c.children).splice.apply(l, a([v, t], C)), E = 0, L = 0, D = w; L < D.length; L++) {
  2249. (N = D[L]).visible && E++
  2250. }
  2251. if (0 !== E) for (y = v + C.length; y < c.children.length; y++) {
  2252. var N;
  2253. (N = c.children[y]).visible && (N.visibleChildIndex -= E)
  2254. }
  2255. if (c.visibleChildrenCount += b - E, p && g) {
  2256. var x = w.reduce((function (e, t) {
  2257. return e + (t.visible ? t.renderNodeCount : 0)
  2258. }), 0);
  2259. this._updateAncestorsRenderNodeCount(c, S - x), this.list.splice(h, x, f)
  2260. }
  2261. if (w.length > 0 && s) {
  2262. var I = function (e) {
  2263. s(e),
  2264. e.children.forEach(I)
  2265. };
  2266. w.forEach(I)
  2267. }
  2268. this._onDidSplice.fire({insertedNodes: C, deletedNodes: w})
  2269. }, e.prototype.rerender = function (e) {
  2270. if (0 === e.length) throw new n.TreeError(this.user, "Invalid tree location");
  2271. var t = this.getTreeNodeWithListIndex(e), i = t.node, o = t.listIndex;
  2272. t.revealed && this.list.splice(o, 1, [i])
  2273. }, e.prototype.has = function (e) {
  2274. return this.hasTreeNode(e)
  2275. }, e.prototype.getListIndex = function (e) {
  2276. var t = this.getTreeNodeWithListIndex(e), n = t.listIndex, i = t.visible, o = t.revealed;
  2277. return i && o ? n : -1
  2278. }, e.prototype.getListRenderCount = function (e) {
  2279. return this.getTreeNode(e).renderNodeCount
  2280. }, e.prototype.isCollapsible = function (e) {
  2281. return this.getTreeNode(e).collapsible
  2282. }, e.prototype.setCollapsible = function (e, t) {
  2283. var n = this, i = this.getTreeNode(e);
  2284. void 0 === t && (t = !i.collapsible);
  2285. var o = {collapsible: t};
  2286. return this.eventBufferer.bufferEvents((function () {
  2287. return n._setCollapseState(e, o)
  2288. }))
  2289. }, e.prototype.isCollapsed = function (e) {
  2290. return this.getTreeNode(e).collapsed
  2291. }, e.prototype.setCollapsed = function (e, t, n) {
  2292. var i = this, o = this.getTreeNode(e)
  2293. ;void 0 === t && (t = !o.collapsed);
  2294. var r = {collapsed: t, recursive: n || !1};
  2295. return this.eventBufferer.bufferEvents((function () {
  2296. return i._setCollapseState(e, r)
  2297. }))
  2298. }, e.prototype._setCollapseState = function (e, t) {
  2299. var n = this.getTreeNodeWithListIndex(e), i = n.node, o = n.listIndex, r = n.revealed,
  2300. s = this._setListNodeCollapseState(i, o, r, t);
  2301. if (i !== this.root && this.autoExpandSingleChildren && s && !u(t) && i.collapsible && !i.collapsed && !t.recursive) {
  2302. for (var l = -1, d = 0; d < i.children.length; d++) {
  2303. if (i.children[d].visible) {
  2304. if (l > -1) {
  2305. l = -1;
  2306. break
  2307. }
  2308. l = d
  2309. }
  2310. }
  2311. l > -1 && this._setCollapseState(a(e, [l]), t)
  2312. }
  2313. return s
  2314. }, e.prototype._setListNodeCollapseState = function (e, t, n, i) {
  2315. var o = this._setNodeCollapseState(e, i, !1);
  2316. if (!n || !e.visible || !o) return o;
  2317. var r = e.renderNodeCount, s = this.updateNodeAfterCollapseChange(e), a = r - (-1 === t ? 0 : 1);
  2318. return this.list.splice(t + 1, a, s.slice(1)), o
  2319. }, e.prototype._setNodeCollapseState = function (e, t, n) {
  2320. var i;
  2321. if (e === this.root ? i = !1 : (u(t) ? (i = e.collapsible !== t.collapsible, e.collapsible = t.collapsible) : e.collapsible ? (i = e.collapsed !== t.collapsed,
  2322. e.collapsed = t.collapsed) : i = !1, i && this._onDidChangeCollapseState.fire({
  2323. node: e,
  2324. deep: n
  2325. })), !u(t) && t.recursive) for (var o = 0, r = e.children; o < r.length; o++) {
  2326. var s = r[o];
  2327. i = this._setNodeCollapseState(s, t, !0) || i
  2328. }
  2329. return i
  2330. }, e.prototype.expandTo = function (e) {
  2331. var t = this;
  2332. this.eventBufferer.bufferEvents((function () {
  2333. for (var n = t.getTreeNode(e); n.parent;) n = n.parent, e = e.slice(0, e.length - 1), n.collapsed && t._setCollapseState(e, {
  2334. collapsed: !1,
  2335. recursive: !1
  2336. })
  2337. }))
  2338. }, e.prototype.refilter = function () {
  2339. var e = this.root.renderNodeCount, t = this.updateNodeAfterFilterChange(this.root);
  2340. this.list.splice(0, e, t)
  2341. }, e.prototype.createTreeNode = function (e, t, n, i, o, s) {
  2342. var a = this, l = {
  2343. parent: t,
  2344. element: e.element,
  2345. children: [],
  2346. depth: t.depth + 1,
  2347. visibleChildrenCount: 0,
  2348. visibleChildIndex: -1,
  2349. collapsible: "boolean" == typeof e.collapsible ? e.collapsible : void 0 !== e.collapsed,
  2350. collapsed: void 0 === e.collapsed ? this.collapseByDefault : e.collapsed,
  2351. renderNodeCount: 1,
  2352. visible: !0,
  2353. filterData: void 0
  2354. }, u = this._filterNode(l, n);
  2355. i && o.push(l)
  2356. ;var d = r.Iterator.from(e.children), c = i && 0 !== u && !l.collapsed,
  2357. h = r.Iterator.map(d, (function (e) {
  2358. return a.createTreeNode(e, l, u, c, o, s)
  2359. })), p = 0, g = 1;
  2360. return r.Iterator.forEach(h, (function (e) {
  2361. l.children.push(e), g += e.renderNodeCount, e.visible && (e.visibleChildIndex = p++)
  2362. })), l.collapsible = l.collapsible || l.children.length > 0, l.visibleChildrenCount = p, l.visible = 2 === u ? p > 0 : 1 === u, l.visible ? l.collapsed || (l.renderNodeCount = g) : (l.renderNodeCount = 0, i && o.pop()), s && s(l), l
  2363. }, e.prototype.updateNodeAfterCollapseChange = function (e) {
  2364. var t = e.renderNodeCount, n = [];
  2365. return this._updateNodeAfterCollapseChange(e, n), this._updateAncestorsRenderNodeCount(e.parent, n.length - t), n
  2366. }, e.prototype._updateNodeAfterCollapseChange = function (e, t) {
  2367. if (!1 === e.visible) return 0;
  2368. if (t.push(e), e.renderNodeCount = 1, !e.collapsed) for (var n = 0, i = e.children; n < i.length; n++) {
  2369. var o = i[n];
  2370. e.renderNodeCount += this._updateNodeAfterCollapseChange(o, t)
  2371. }
  2372. return this._onDidChangeRenderNodeCount.fire(e), e.renderNodeCount
  2373. }, e.prototype.updateNodeAfterFilterChange = function (e) {
  2374. var t = e.renderNodeCount, n = [];
  2375. return this._updateNodeAfterFilterChange(e, e.visible ? 1 : 0, n), this._updateAncestorsRenderNodeCount(e.parent, n.length - t), n
  2376. }, e.prototype._updateNodeAfterFilterChange = function (e, t, n, i) {
  2377. var o;
  2378. if (void 0 === i && (i = !0), e !== this.root) {
  2379. if (0 === (o = this._filterNode(e, t))) return e.visible = !1, e.renderNodeCount = 0, !1;
  2380. i && n.push(e)
  2381. }
  2382. var r = n.length;
  2383. e.renderNodeCount = e === this.root ? 0 : 1;
  2384. var s = !1;
  2385. if (e.collapsed && 0 === o) e.visibleChildrenCount = 0; else {
  2386. for (var a = 0, l = 0, u = e.children; l < u.length; l++) {
  2387. var d = u[l];
  2388. s = this._updateNodeAfterFilterChange(d, o, n, i && !e.collapsed) || s, d.visible && (d.visibleChildIndex = a++)
  2389. }
  2390. e.visibleChildrenCount = a
  2391. }
  2392. return e !== this.root && (e.visible = 2 === o ? s : 1 === o), e.visible ? e.collapsed || (e.renderNodeCount += n.length - r) : (e.renderNodeCount = 0, i && n.pop()), this._onDidChangeRenderNodeCount.fire(e), e.visible
  2393. }, e.prototype._updateAncestorsRenderNodeCount = function (e, t) {
  2394. if (0 !== t) for (; e;) e.renderNodeCount += t, this._onDidChangeRenderNodeCount.fire(e), e = e.parent
  2395. }, e.prototype._filterNode = function (e, t) {
  2396. var n = this.filter ? this.filter.filter(e.element, t) : 1;
  2397. return "boolean" == typeof n ? (e.filterData = void 0, n ? 1 : 0) : s(n) ? (e.filterData = n.data, l(n.visibility)) : (e.filterData = void 0, l(n))
  2398. }, e.prototype.hasTreeNode = function (e, t) {
  2399. if (void 0 === t && (t = this.root), !e || 0 === e.length) return !0;
  2400. var n = e[0], i = e.slice(1);
  2401. return !(n < 0 || n > t.children.length) && this.hasTreeNode(i, t.children[n])
  2402. }, e.prototype.getTreeNode = function (e, t) {
  2403. if (void 0 === t && (t = this.root), !e || 0 === e.length) return t;
  2404. var i = e[0], o = e.slice(1);
  2405. if (i < 0 || i > t.children.length) throw new n.TreeError(this.user, "Invalid tree location");
  2406. return this.getTreeNode(o, t.children[i])
  2407. }, e.prototype.getTreeNodeWithListIndex = function (e) {
  2408. if (0 === e.length) return {node: this.root, listIndex: -1, revealed: !0, visible: !1};
  2409. var t = this.getParentNodeWithListIndex(e), i = t.parentNode, o = t.listIndex, r = t.revealed,
  2410. s = t.visible, a = e[e.length - 1];
  2411. if (a < 0 || a > i.children.length) throw new n.TreeError(this.user, "Invalid tree location");
  2412. var l = i.children[a];
  2413. return {node: l, listIndex: o, revealed: r, visible: s && l.visible}
  2414. },
  2415. e.prototype.getParentNodeWithListIndex = function (e, t, i, o, r) {
  2416. void 0 === t && (t = this.root), void 0 === i && (i = 0), void 0 === o && (o = !0), void 0 === r && (r = !0);
  2417. var s = e[0], a = e.slice(1);
  2418. if (s < 0 || s > t.children.length) throw new n.TreeError(this.user, "Invalid tree location");
  2419. for (var l = 0; l < s; l++) i += t.children[l].renderNodeCount;
  2420. return o = o && !t.collapsed, r = r && t.visible, 0 === a.length ? {
  2421. parentNode: t,
  2422. listIndex: i,
  2423. revealed: o,
  2424. visible: r
  2425. } : this.getParentNodeWithListIndex(a, t.children[s], i + 1, o, r)
  2426. }, e.prototype.getNode = function (e) {
  2427. return void 0 === e && (e = []), this.getTreeNode(e)
  2428. }, e.prototype.getNodeLocation = function (e) {
  2429. for (var t = [], n = e; n.parent;) t.push(n.parent.children.indexOf(n)), n = n.parent;
  2430. return t.reverse()
  2431. }, e.prototype.getParentNodeLocation = function (e) {
  2432. return 0 === e.length ? void 0 : 1 === e.length ? [] : i.tail2(e)[0]
  2433. }, e
  2434. }();
  2435. t.IndexTreeModel = d
  2436. }));
  2437. var l = this && this.__assign || function () {
  2438. return (l = Object.assign || function (e) {
  2439. for (var t, n = 1, i = arguments.length; n < i; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
  2440. return e
  2441. }).apply(this, arguments)
  2442. };
  2443. a = this && this.__spreadArrays || function () {
  2444. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  2445. var i = Array(e), o = 0;
  2446. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  2447. return i
  2448. };
  2449. define(n[130], i([0, 1, 54, 129, 99, 19]), (function (e, t, n, i, o, r) {
  2450. "use strict";
  2451. Object.defineProperty(t, "__esModule", {value: !0});
  2452. var s = function () {
  2453. function e(e, t, n) {
  2454. void 0 === n && (n = {}), this.user = e, this.nodes = new Map, this.nodesByIdentity = new Map, this.model = new i.IndexTreeModel(e, t, null, n), this.onDidSplice = this.model.onDidSplice, this.onDidChangeCollapseState = this.model.onDidChangeCollapseState, this.onDidChangeRenderNodeCount = this.model.onDidChangeRenderNodeCount, n.sorter && (this.sorter = {
  2455. compare: function (e, t) {
  2456. return n.sorter.compare(e.element, t.element)
  2457. }
  2458. }), this.identityProvider = n.identityProvider
  2459. }
  2460. return e.prototype.setChildren = function (e, t, n, i) {
  2461. var o = this.getElementLocation(e);
  2462. this._setChildren(o, this.preserveCollapseState(t), n, i)
  2463. }, e.prototype._setChildren = function (e, t, n, i) {
  2464. var o = this, r = new Set, s = new Set;
  2465. this.model.splice(a(e, [0]), Number.MAX_VALUE, t, (function (e) {
  2466. if (r.add(e.element), o.nodes.set(e.element, e), o.identityProvider) {
  2467. var t = o.identityProvider.getId(e.element).toString();
  2468. s.add(t), o.nodesByIdentity.set(t, e)
  2469. }
  2470. n && n(e)
  2471. }), (function (e) {
  2472. if (r.has(e.element) || o.nodes.delete(e.element), o.identityProvider) {
  2473. var t = o.identityProvider.getId(e.element).toString();
  2474. s.has(t) || o.nodesByIdentity.delete(t)
  2475. }
  2476. i && i(e)
  2477. }))
  2478. }, e.prototype.preserveCollapseState = function (e) {
  2479. var t = this, i = e ? n.getSequenceIterator(e) : n.Iterator.empty();
  2480. return this.sorter && (i = n.Iterator.fromArray(r.mergeSort(n.Iterator.collect(i), this.sorter.compare.bind(this.sorter)))), n.Iterator.map(i, (function (e) {
  2481. var n = t.nodes.get(e.element);
  2482. if (!n && t.identityProvider) {
  2483. var i = t.identityProvider.getId(e.element).toString();
  2484. n = t.nodesByIdentity.get(i)
  2485. }
  2486. if (!n) return l(l({}, e), {children: t.preserveCollapseState(e.children)});
  2487. var o = "boolean" == typeof e.collapsible ? e.collapsible : n.collapsible,
  2488. r = void 0 !== e.collapsed ? e.collapsed : n.collapsed
  2489. ;
  2490. return l(l({}, e), {collapsible: o, collapsed: r, children: t.preserveCollapseState(e.children)})
  2491. }))
  2492. }, e.prototype.rerender = function (e) {
  2493. var t = this.getElementLocation(e);
  2494. this.model.rerender(t)
  2495. }, e.prototype.has = function (e) {
  2496. return this.nodes.has(e)
  2497. }, e.prototype.getListIndex = function (e) {
  2498. var t = this.getElementLocation(e);
  2499. return this.model.getListIndex(t)
  2500. }, e.prototype.getListRenderCount = function (e) {
  2501. var t = this.getElementLocation(e);
  2502. return this.model.getListRenderCount(t)
  2503. }, e.prototype.isCollapsible = function (e) {
  2504. var t = this.getElementLocation(e);
  2505. return this.model.isCollapsible(t)
  2506. }, e.prototype.setCollapsible = function (e, t) {
  2507. var n = this.getElementLocation(e);
  2508. return this.model.setCollapsible(n, t)
  2509. }, e.prototype.isCollapsed = function (e) {
  2510. var t = this.getElementLocation(e);
  2511. return this.model.isCollapsed(t)
  2512. }, e.prototype.setCollapsed = function (e, t, n) {
  2513. var i = this.getElementLocation(e);
  2514. return this.model.setCollapsed(i, t, n)
  2515. }, e.prototype.expandTo = function (e) {
  2516. var t = this.getElementLocation(e);
  2517. this.model.expandTo(t)
  2518. }, e.prototype.refilter = function () {
  2519. this.model.refilter()
  2520. }, e.prototype.getNode = function (e) {
  2521. if (void 0 === e && (e = null), null === e) return this.model.getNode(this.model.rootRef);
  2522. var t = this.nodes.get(e);
  2523. if (!t) throw new o.TreeError(this.user, "Tree element not found: " + e);
  2524. return t
  2525. }, e.prototype.getNodeLocation = function (e) {
  2526. return e.element
  2527. }, e.prototype.getParentNodeLocation = function (e) {
  2528. if (null === e) throw new o.TreeError(this.user, "Invalid getParentNodeLocation call");
  2529. var t = this.nodes.get(e);
  2530. if (!t) throw new o.TreeError(this.user, "Tree element not found: " + e);
  2531. var n = this.model.getNodeLocation(t), i = this.model.getParentNodeLocation(n);
  2532. return this.model.getNode(i).element
  2533. }, e.prototype.getElementLocation = function (e) {
  2534. if (null === e) return [];
  2535. var t = this.nodes.get(e);
  2536. if (!t) throw new o.TreeError(this.user, "Tree element not found: " + e);
  2537. return this.model.getNodeLocation(t)
  2538. }, e
  2539. }();
  2540. t.ObjectTreeModel = s
  2541. })), define(n[243], i([0, 1, 54, 4, 99, 130]), (function (e, t, n, i, o, r) {
  2542. "use strict";
  2543. function s(e) {
  2544. return {
  2545. element: {elements: [e.element], incompressible: e.incompressible || !1},
  2546. children: n.Iterator.map(n.Iterator.from(e.children), s),
  2547. collapsible: e.collapsible,
  2548. collapsed: e.collapsed
  2549. }
  2550. }
  2551. function a(e) {
  2552. for (var t, i, o = [e.element], r = e.incompressible || !1; t = n.Iterator.from(e.children), 1 === (i = n.Iterator.collect(t, 2)).length && !(e = i[0]).incompressible;) o.push(e.element);
  2553. return {
  2554. element: {elements: o, incompressible: r},
  2555. children: n.Iterator.map(n.Iterator.concat(n.Iterator.fromArray(i), t), a),
  2556. collapsible: e.collapsible,
  2557. collapsed: e.collapsed
  2558. }
  2559. }
  2560. function u(e) {
  2561. return function e(t, i) {
  2562. var o;
  2563. return void 0 === i && (i = 0), o = i < t.element.elements.length - 1 ? n.Iterator.single(e(t, i + 1)) : n.Iterator.map(n.Iterator.from(t.children), (function (t) {
  2564. return e(t, 0)
  2565. })), 0 === i && t.element.incompressible ? {
  2566. element: t.element.elements[i],
  2567. children: o,
  2568. incompressible: !0,
  2569. collapsible: t.collapsible,
  2570. collapsed: t.collapsed
  2571. } : {element: t.element.elements[i], children: o, collapsible: t.collapsible, collapsed: t.collapsed}
  2572. }(e, 0)
  2573. }
  2574. Object.defineProperty(t, "__esModule", {value: !0}), t.compress = a, t.decompress = u;
  2575. var d = function () {
  2576. function e(e, t, n) {
  2577. void 0 === n && (n = {}),
  2578. this.user = e, this.nodes = new Map, this.model = new r.ObjectTreeModel(e, t, n), this.enabled = void 0 === n.compressionEnabled || n.compressionEnabled
  2579. }
  2580. return Object.defineProperty(e.prototype, "onDidSplice", {
  2581. get: function () {
  2582. return this.model.onDidSplice
  2583. }, enumerable: !0, configurable: !0
  2584. }), Object.defineProperty(e.prototype, "onDidChangeCollapseState", {
  2585. get: function () {
  2586. return this.model.onDidChangeCollapseState
  2587. }, enumerable: !0, configurable: !0
  2588. }), e.prototype.setChildren = function (e, t) {
  2589. if (null !== e) {
  2590. var i = this.nodes.get(e);
  2591. if (!i) throw new Error("Unknown compressed tree node");
  2592. var o = this.model.getNode(i), r = this.model.getParentNodeLocation(i), d = this.model.getNode(r),
  2593. c = function e(t, i, o) {
  2594. return t.element === i ? l(l({}, t), {children: o}) : l(l({}, t), {
  2595. children: n.Iterator.map(n.Iterator.from(t.children), (function (t) {
  2596. return e(t, i, o)
  2597. }))
  2598. })
  2599. }(u(o), e, n.Iterator.from(t)), h = (this.enabled ? a : s)(c),
  2600. p = d.children.map((function (e) {
  2601. return e === o ? h : e
  2602. }));
  2603. this._setChildren(d.element, p)
  2604. } else {
  2605. var g = n.Iterator.map(n.Iterator.from(t), this.enabled ? a : s)
  2606. ;this._setChildren(null, g)
  2607. }
  2608. }, e.prototype.setCompressionEnabled = function (e) {
  2609. if (e !== this.enabled) {
  2610. this.enabled = e;
  2611. var t = this.model.getNode(), i = n.Iterator.from(t.children), o = n.Iterator.map(i, u),
  2612. r = n.Iterator.map(o, e ? a : s);
  2613. this._setChildren(null, r)
  2614. }
  2615. }, e.prototype._setChildren = function (e, t) {
  2616. var n = this, i = new Set;
  2617. this.model.setChildren(e, t, (function (e) {
  2618. for (var t = 0, o = e.element.elements; t < o.length; t++) {
  2619. var r = o[t];
  2620. i.add(r), n.nodes.set(r, e.element)
  2621. }
  2622. }), (function (e) {
  2623. for (var t = 0, o = e.element.elements; t < o.length; t++) {
  2624. var r = o[t];
  2625. i.has(r) || n.nodes.delete(r)
  2626. }
  2627. }))
  2628. }, e.prototype.has = function (e) {
  2629. return this.nodes.has(e)
  2630. }, e.prototype.getListIndex = function (e) {
  2631. var t = this.getCompressedNode(e);
  2632. return this.model.getListIndex(t)
  2633. }, e.prototype.getListRenderCount = function (e) {
  2634. var t = this.getCompressedNode(e);
  2635. return this.model.getListRenderCount(t)
  2636. }, e.prototype.getNode = function (e) {
  2637. if (void 0 === e) return this.model.getNode();
  2638. var t = this.getCompressedNode(e);
  2639. return this.model.getNode(t)
  2640. }, e.prototype.getNodeLocation = function (e) {
  2641. var t = this.model.getNodeLocation(e);
  2642. return null === t ? null : t.elements[t.elements.length - 1]
  2643. }, e.prototype.getParentNodeLocation = function (e) {
  2644. var t = this.getCompressedNode(e), n = this.model.getParentNodeLocation(t);
  2645. return null === n ? null : n.elements[n.elements.length - 1]
  2646. }, e.prototype.isCollapsible = function (e) {
  2647. var t = this.getCompressedNode(e);
  2648. return this.model.isCollapsible(t)
  2649. }, e.prototype.setCollapsible = function (e, t) {
  2650. var n = this.getCompressedNode(e);
  2651. return this.model.setCollapsible(n, t)
  2652. }, e.prototype.isCollapsed = function (e) {
  2653. var t = this.getCompressedNode(e);
  2654. return this.model.isCollapsed(t)
  2655. }, e.prototype.setCollapsed = function (e, t, n) {
  2656. var i = this.getCompressedNode(e);
  2657. return this.model.setCollapsed(i, t, n)
  2658. }, e.prototype.expandTo = function (e) {
  2659. var t = this.getCompressedNode(e);
  2660. this.model.expandTo(t)
  2661. }, e.prototype.rerender = function (e) {
  2662. var t = this.getCompressedNode(e);
  2663. this.model.rerender(t)
  2664. }, e.prototype.refilter = function () {
  2665. this.model.refilter()
  2666. }, e.prototype.getCompressedNode = function (e) {
  2667. if (null === e) return null;
  2668. var t = this.nodes.get(e)
  2669. ;
  2670. if (!t) throw new o.TreeError(this.user, "Tree element not found: " + e);
  2671. return t
  2672. }, e
  2673. }();
  2674. t.CompressedObjectTreeModel = d, t.DefaultElementMapper = function (e) {
  2675. return e[e.length - 1]
  2676. };
  2677. var c = function () {
  2678. function e(e, t) {
  2679. this.unwrapper = e, this.node = t
  2680. }
  2681. return Object.defineProperty(e.prototype, "element", {
  2682. get: function () {
  2683. return null === this.node.element ? null : this.unwrapper(this.node.element)
  2684. }, enumerable: !0, configurable: !0
  2685. }), Object.defineProperty(e.prototype, "children", {
  2686. get: function () {
  2687. var t = this;
  2688. return this.node.children.map((function (n) {
  2689. return new e(t.unwrapper, n)
  2690. }))
  2691. }, enumerable: !0, configurable: !0
  2692. }), Object.defineProperty(e.prototype, "depth", {
  2693. get: function () {
  2694. return this.node.depth
  2695. }, enumerable: !0, configurable: !0
  2696. }), Object.defineProperty(e.prototype, "visibleChildrenCount", {
  2697. get: function () {
  2698. return this.node.visibleChildrenCount
  2699. }, enumerable: !0, configurable: !0
  2700. }), Object.defineProperty(e.prototype, "visibleChildIndex", {
  2701. get: function () {
  2702. return this.node.visibleChildIndex
  2703. }, enumerable: !0, configurable: !0
  2704. }),
  2705. Object.defineProperty(e.prototype, "collapsible", {
  2706. get: function () {
  2707. return this.node.collapsible
  2708. }, enumerable: !0, configurable: !0
  2709. }), Object.defineProperty(e.prototype, "collapsed", {
  2710. get: function () {
  2711. return this.node.collapsed
  2712. }, enumerable: !0, configurable: !0
  2713. }), Object.defineProperty(e.prototype, "visible", {
  2714. get: function () {
  2715. return this.node.visible
  2716. }, enumerable: !0, configurable: !0
  2717. }), Object.defineProperty(e.prototype, "filterData", {
  2718. get: function () {
  2719. return this.node.filterData
  2720. }, enumerable: !0, configurable: !0
  2721. }), e
  2722. }();
  2723. var h = function () {
  2724. function e(e, n, i) {
  2725. var r = this;
  2726. void 0 === i && (i = {}), this.elementMapper = i.elementMapper || t.DefaultElementMapper;
  2727. var s = function (e) {
  2728. return r.elementMapper(e.elements)
  2729. };
  2730. this.nodeMapper = new o.WeakMapper((function (e) {
  2731. return new c(s, e)
  2732. })), this.model = new d(e, function (e, t) {
  2733. return {
  2734. splice: function (n, i, o) {
  2735. t.splice(n, i, o.map((function (t) {
  2736. return e.map(t)
  2737. })))
  2738. }
  2739. }
  2740. }(this.nodeMapper, n), function (e, t) {
  2741. return l(l({}, t), {
  2742. sorter: t.sorter && {
  2743. compare: function (e, n) {
  2744. return t.sorter.compare(e.elements[0], n.elements[0])
  2745. }
  2746. },
  2747. identityProvider: t.identityProvider && {
  2748. getId: function (n) {
  2749. return t.identityProvider.getId(e(n))
  2750. }
  2751. }, filter: t.filter && {
  2752. filter: function (n, i) {
  2753. return t.filter.filter(e(n), i)
  2754. }
  2755. }
  2756. })
  2757. }(s, i))
  2758. }
  2759. return Object.defineProperty(e.prototype, "onDidSplice", {
  2760. get: function () {
  2761. var e = this;
  2762. return i.Event.map(this.model.onDidSplice, (function (t) {
  2763. var n = t.insertedNodes, i = t.deletedNodes;
  2764. return {
  2765. insertedNodes: n.map((function (t) {
  2766. return e.nodeMapper.map(t)
  2767. })), deletedNodes: i.map((function (t) {
  2768. return e.nodeMapper.map(t)
  2769. }))
  2770. }
  2771. }))
  2772. }, enumerable: !0, configurable: !0
  2773. }), Object.defineProperty(e.prototype, "onDidChangeCollapseState", {
  2774. get: function () {
  2775. var e = this;
  2776. return i.Event.map(this.model.onDidChangeCollapseState, (function (t) {
  2777. var n = t.node, i = t.deep;
  2778. return {node: e.nodeMapper.map(n), deep: i}
  2779. }))
  2780. }, enumerable: !0, configurable: !0
  2781. }), e.prototype.setChildren = function (e, t) {
  2782. this.model.setChildren(e, t)
  2783. }, e.prototype.setCompressionEnabled = function (e) {
  2784. this.model.setCompressionEnabled(e)
  2785. }, e.prototype.has = function (e) {
  2786. return this.model.has(e)
  2787. }, e.prototype.getListIndex = function (e) {
  2788. return this.model.getListIndex(e)
  2789. }, e.prototype.getListRenderCount = function (e) {
  2790. return this.model.getListRenderCount(e)
  2791. }, e.prototype.getNode = function (e) {
  2792. return this.nodeMapper.map(this.model.getNode(e))
  2793. }, e.prototype.getNodeLocation = function (e) {
  2794. return e.element
  2795. }, e.prototype.getParentNodeLocation = function (e) {
  2796. return this.model.getParentNodeLocation(e)
  2797. }, e.prototype.isCollapsible = function (e) {
  2798. return this.model.isCollapsible(e)
  2799. }, e.prototype.setCollapsible = function (e, t) {
  2800. return this.model.setCollapsible(e, t)
  2801. }, e.prototype.isCollapsed = function (e) {
  2802. return this.model.isCollapsed(e)
  2803. }, e.prototype.setCollapsed = function (e, t, n) {
  2804. return this.model.setCollapsed(e, t, n)
  2805. }, e.prototype.expandTo = function (e) {
  2806. return this.model.expandTo(e)
  2807. }, e.prototype.rerender = function (e) {
  2808. return this.model.rerender(e)
  2809. }, e.prototype.refilter = function () {
  2810. return this.model.refilter()
  2811. }, e.prototype.getCompressedTreeNode = function (e) {
  2812. return void 0 === e && (e = null), this.model.getNode(e)
  2813. }, e
  2814. }();
  2815. t.CompressibleObjectTreeModel = h
  2816. }))
  2817. ;var u, d = this && this.__awaiter || function (e, t, n, i) {
  2818. return new (n || (n = Promise))((function (o, r) {
  2819. function s(e) {
  2820. try {
  2821. l(i.next(e))
  2822. } catch (e) {
  2823. r(e)
  2824. }
  2825. }
  2826. function a(e) {
  2827. try {
  2828. l(i.throw(e))
  2829. } catch (e) {
  2830. r(e)
  2831. }
  2832. }
  2833. function l(e) {
  2834. var t;
  2835. e.done ? o(e.value) : (t = e.value, t instanceof n ? t : new n((function (e) {
  2836. e(t)
  2837. }))).then(s, a)
  2838. }
  2839. l((i = i.apply(e, t || [])).next())
  2840. }))
  2841. }, c = this && this.__generator || function (e, t) {
  2842. var n, i, o, r, s = {
  2843. label: 0, sent: function () {
  2844. if (1 & o[0]) throw o[1];
  2845. return o[1]
  2846. }, trys: [], ops: []
  2847. };
  2848. return r = {
  2849. next: a(0),
  2850. throw: a(1),
  2851. return: a(2)
  2852. }, "function" == typeof Symbol && (r[Symbol.iterator] = function () {
  2853. return this
  2854. }), r;
  2855. function a(r) {
  2856. return function (a) {
  2857. return function (r) {
  2858. if (n) throw new TypeError("Generator is already executing.");
  2859. for (; s;) try {
  2860. if (n = 1, i && (o = 2 & r[0] ? i.return : r[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, r[1])).done) return o;
  2861. switch (i = 0, o && (r = [2 & r[0], o.value]), r[0]) {
  2862. case 0:
  2863. case 1:
  2864. o = r;
  2865. break;
  2866. case 4:
  2867. return s.label++, {value: r[1], done: !1};
  2868. case 5:
  2869. s.label++, i = r[1], r = [0];
  2870. continue;
  2871. case 7:
  2872. r = s.ops.pop(), s.trys.pop();
  2873. continue;
  2874. default:
  2875. if (!(o = (o = s.trys).length > 0 && o[o.length - 1]) && (6 === r[0] || 2 === r[0])) {
  2876. s = 0;
  2877. continue
  2878. }
  2879. if (3 === r[0] && (!o || r[1] > o[0] && r[1] < o[3])) {
  2880. s.label = r[1];
  2881. break
  2882. }
  2883. if (6 === r[0] && s.label < o[1]) {
  2884. s.label = o[1], o = r;
  2885. break
  2886. }
  2887. if (o && s.label < o[2]) {
  2888. s.label = o[2], s.ops.push(r);
  2889. break
  2890. }
  2891. o[2] && s.ops.pop(), s.trys.pop();
  2892. continue
  2893. }
  2894. r = t.call(e, s)
  2895. } catch (e) {
  2896. r = [6, e], i = 0
  2897. } finally {
  2898. n = o = 0
  2899. }
  2900. if (5 & r[0]) throw r[1];
  2901. return {value: r[0] ? r[1] : void 0, done: !0}
  2902. }([r, a])
  2903. }
  2904. }
  2905. };
  2906. define(n[55], i([0, 1, 2, 4]), (function (e, t, n, i) {
  2907. "use strict";
  2908. Object.defineProperty(t, "__esModule", {value: !0});
  2909. var o = function (e) {
  2910. function t(t, n, o, r, s) {
  2911. void 0 === n && (n = ""), void 0 === o && (o = ""), void 0 === r && (r = !0);
  2912. var a = e.call(this) || this;
  2913. return a._onDidChange = a._register(new i.Emitter), a.onDidChange = a._onDidChange.event, a._enabled = !0, a._checked = !1, a._id = t, a._label = n, a._cssClass = o, a._enabled = r, a._actionCallback = s, a
  2914. }
  2915. return r(t, e), Object.defineProperty(t.prototype, "id", {
  2916. get: function () {
  2917. return this._id
  2918. }, enumerable: !0, configurable: !0
  2919. }), Object.defineProperty(t.prototype, "label", {
  2920. get: function () {
  2921. return this._label
  2922. }, set: function (e) {
  2923. this._setLabel(e)
  2924. }, enumerable: !0, configurable: !0
  2925. }), t.prototype._setLabel = function (e) {
  2926. this._label !== e && (this._label = e, this._onDidChange.fire({label: e}))
  2927. }, Object.defineProperty(t.prototype, "tooltip", {
  2928. get: function () {
  2929. return this._tooltip || ""
  2930. }, set: function (e) {
  2931. this._setTooltip(e)
  2932. }, enumerable: !0, configurable: !0
  2933. }), t.prototype._setTooltip = function (e) {
  2934. this._tooltip !== e && (this._tooltip = e, this._onDidChange.fire({tooltip: e}))
  2935. }, Object.defineProperty(t.prototype, "class", {
  2936. get: function () {
  2937. return this._cssClass
  2938. }, set: function (e) {
  2939. this._setClass(e)
  2940. }, enumerable: !0, configurable: !0
  2941. }), t.prototype._setClass = function (e) {
  2942. this._cssClass !== e && (this._cssClass = e, this._onDidChange.fire({class: e}))
  2943. }, Object.defineProperty(t.prototype, "enabled", {
  2944. get: function () {
  2945. return this._enabled
  2946. }, set: function (e) {
  2947. this._setEnabled(e)
  2948. }, enumerable: !0, configurable: !0
  2949. }), t.prototype._setEnabled = function (e) {
  2950. this._enabled !== e && (this._enabled = e, this._onDidChange.fire({enabled: e}))
  2951. }, Object.defineProperty(t.prototype, "checked", {
  2952. get: function () {
  2953. return this._checked
  2954. },
  2955. set: function (e) {
  2956. this._setChecked(e)
  2957. }, enumerable: !0, configurable: !0
  2958. }), t.prototype._setChecked = function (e) {
  2959. this._checked !== e && (this._checked = e, this._onDidChange.fire({checked: e}))
  2960. }, t.prototype.run = function (e, t) {
  2961. return this._actionCallback ? this._actionCallback(e) : Promise.resolve(!0)
  2962. }, t
  2963. }(n.Disposable);
  2964. t.Action = o;
  2965. var s = function (e) {
  2966. function t() {
  2967. var t = null !== e && e.apply(this, arguments) || this;
  2968. return t._onDidBeforeRun = t._register(new i.Emitter), t.onDidBeforeRun = t._onDidBeforeRun.event, t._onDidRun = t._register(new i.Emitter), t.onDidRun = t._onDidRun.event, t
  2969. }
  2970. return r(t, e), t.prototype.run = function (e, t) {
  2971. return d(this, void 0, void 0, (function () {
  2972. var n, i;
  2973. return c(this, (function (o) {
  2974. switch (o.label) {
  2975. case 0:
  2976. if (!e.enabled) return [2, Promise.resolve(null)];
  2977. this._onDidBeforeRun.fire({action: e}), o.label = 1;
  2978. case 1:
  2979. return o.trys.push([1, 3, , 4]), [4, this.runAction(e, t)];
  2980. case 2:
  2981. return n = o.sent(), this._onDidRun.fire({action: e, result: n}), [3, 4];
  2982. case 3:
  2983. return i = o.sent(), this._onDidRun.fire({action: e, error: i}), [3, 4];
  2984. case 4:
  2985. return [2]
  2986. }
  2987. }))
  2988. }))
  2989. },
  2990. t.prototype.runAction = function (e, t) {
  2991. var n = t ? e.run(t) : e.run();
  2992. return Promise.resolve(n)
  2993. }, t
  2994. }(n.Disposable);
  2995. t.ActionRunner = s
  2996. })), define(n[26], i([0, 1, 4]), (function (e, t, n) {
  2997. "use strict";
  2998. Object.defineProperty(t, "__esModule", {value: !0});
  2999. var i, o = Object.freeze((function (e, t) {
  3000. var n = setTimeout(e.bind(t), 0);
  3001. return {
  3002. dispose: function () {
  3003. clearTimeout(n)
  3004. }
  3005. }
  3006. }));
  3007. !function (e) {
  3008. e.isCancellationToken = function (t) {
  3009. return t === e.None || t === e.Cancelled || (t instanceof r || !(!t || "object" != typeof t) && ("boolean" == typeof t.isCancellationRequested && "function" == typeof t.onCancellationRequested))
  3010. }, e.None = Object.freeze({
  3011. isCancellationRequested: !1,
  3012. onCancellationRequested: n.Event.None
  3013. }), e.Cancelled = Object.freeze({isCancellationRequested: !0, onCancellationRequested: o})
  3014. }(i = t.CancellationToken || (t.CancellationToken = {}));
  3015. var r = function () {
  3016. function e() {
  3017. this._isCancelled = !1, this._emitter = null
  3018. }
  3019. return e.prototype.cancel = function () {
  3020. this._isCancelled || (this._isCancelled = !0, this._emitter && (this._emitter.fire(void 0), this.dispose()))
  3021. },
  3022. Object.defineProperty(e.prototype, "isCancellationRequested", {
  3023. get: function () {
  3024. return this._isCancelled
  3025. }, enumerable: !0, configurable: !0
  3026. }), Object.defineProperty(e.prototype, "onCancellationRequested", {
  3027. get: function () {
  3028. return this._isCancelled ? o : (this._emitter || (this._emitter = new n.Emitter), this._emitter.event)
  3029. }, enumerable: !0, configurable: !0
  3030. }), e.prototype.dispose = function () {
  3031. this._emitter && (this._emitter.dispose(), this._emitter = null)
  3032. }, e
  3033. }(), s = function () {
  3034. function e(e) {
  3035. this._token = void 0, this._parentListener = void 0, this._parentListener = e && e.onCancellationRequested(this.cancel, this)
  3036. }
  3037. return Object.defineProperty(e.prototype, "token", {
  3038. get: function () {
  3039. return this._token || (this._token = new r), this._token
  3040. }, enumerable: !0, configurable: !0
  3041. }), e.prototype.cancel = function () {
  3042. this._token ? this._token instanceof r && this._token.cancel() : this._token = i.Cancelled
  3043. }, e.prototype.dispose = function (e) {
  3044. void 0 === e && (e = !1), e && this.cancel(), this._parentListener && this._parentListener.dispose(),
  3045. this._token ? this._token instanceof r && this._token.dispose() : this._token = i.None
  3046. }, e
  3047. }();
  3048. t.CancellationTokenSource = s
  3049. })), define(n[15], i([0, 1, 26, 10, 2]), (function (e, t, n, i, o) {
  3050. "use strict";
  3051. function r(e) {
  3052. var t = new n.CancellationTokenSource, o = e(t.token), r = new Promise((function (e, n) {
  3053. t.token.onCancellationRequested((function () {
  3054. n(i.canceled())
  3055. })), Promise.resolve(o).then((function (n) {
  3056. t.dispose(), e(n)
  3057. }), (function (e) {
  3058. t.dispose(), n(e)
  3059. }))
  3060. }));
  3061. return new (function () {
  3062. function e() {
  3063. }
  3064. return e.prototype.cancel = function () {
  3065. t.cancel()
  3066. }, e.prototype.then = function (e, t) {
  3067. return r.then(e, t)
  3068. }, e.prototype.catch = function (e) {
  3069. return this.then(void 0, e)
  3070. }, e.prototype.finally = function (e) {
  3071. return r.finally(e)
  3072. }, e
  3073. }())
  3074. }
  3075. Object.defineProperty(t, "__esModule", {value: !0}), t.isThenable = function (e) {
  3076. return e && "function" == typeof e.then
  3077. }, t.createCancelablePromise = r, t.raceCancellation = function (e, t, n) {
  3078. return Promise.race([e, new Promise((function (e) {
  3079. return t.onCancellationRequested((function () {
  3080. return e(n)
  3081. }))
  3082. }))])
  3083. };
  3084. var s = function () {
  3085. function e(e) {
  3086. this.defaultDelay = e,
  3087. this.timeout = null, this.completionPromise = null, this.doResolve = null, this.doReject = null, this.task = null
  3088. }
  3089. return e.prototype.trigger = function (e, t) {
  3090. var n = this;
  3091. return void 0 === t && (t = this.defaultDelay), this.task = e, this.cancelTimeout(), this.completionPromise || (this.completionPromise = new Promise((function (e, t) {
  3092. n.doResolve = e, n.doReject = t
  3093. })).then((function () {
  3094. if (n.completionPromise = null, n.doResolve = null, n.task) {
  3095. var e = n.task;
  3096. return n.task = null, e()
  3097. }
  3098. }))), this.timeout = setTimeout((function () {
  3099. n.timeout = null, n.doResolve && n.doResolve(null)
  3100. }), t), this.completionPromise
  3101. }, e.prototype.isTriggered = function () {
  3102. return null !== this.timeout
  3103. }, e.prototype.cancel = function () {
  3104. this.cancelTimeout(), this.completionPromise && (this.doReject && this.doReject(i.canceled()), this.completionPromise = null)
  3105. }, e.prototype.cancelTimeout = function () {
  3106. null !== this.timeout && (clearTimeout(this.timeout), this.timeout = null)
  3107. }, e.prototype.dispose = function () {
  3108. this.cancelTimeout()
  3109. }, e
  3110. }();
  3111. t.Delayer = s, t.timeout = function e(t, n) {
  3112. return n ? new Promise((function (e, o) {
  3113. var r = setTimeout(e, t)
  3114. ;n.onCancellationRequested((function () {
  3115. clearTimeout(r), o(i.canceled())
  3116. }))
  3117. })) : r((function (n) {
  3118. return e(t, n)
  3119. }))
  3120. }, t.disposableTimeout = function (e, t) {
  3121. void 0 === t && (t = 0);
  3122. var n = setTimeout(e, t);
  3123. return o.toDisposable((function () {
  3124. return clearTimeout(n)
  3125. }))
  3126. }, t.first = function (e, t, n) {
  3127. void 0 === t && (t = function (e) {
  3128. return !!e
  3129. }), void 0 === n && (n = null);
  3130. var i = 0, o = e.length, r = function () {
  3131. if (i >= o) return Promise.resolve(n);
  3132. var s = e[i++];
  3133. return Promise.resolve(s()).then((function (e) {
  3134. return t(e) ? Promise.resolve(e) : r()
  3135. }))
  3136. };
  3137. return r()
  3138. };
  3139. var a = function () {
  3140. function e(e, t) {
  3141. this._token = -1, "function" == typeof e && "number" == typeof t && this.setIfNotSet(e, t)
  3142. }
  3143. return e.prototype.dispose = function () {
  3144. this.cancel()
  3145. }, e.prototype.cancel = function () {
  3146. -1 !== this._token && (clearTimeout(this._token), this._token = -1)
  3147. }, e.prototype.cancelAndSet = function (e, t) {
  3148. var n = this;
  3149. this.cancel(), this._token = setTimeout((function () {
  3150. n._token = -1, e()
  3151. }), t)
  3152. }, e.prototype.setIfNotSet = function (e, t) {
  3153. var n = this;
  3154. -1 === this._token && (this._token = setTimeout((function () {
  3155. n._token = -1, e()
  3156. }), t))
  3157. }, e
  3158. }()
  3159. ;t.TimeoutTimer = a;
  3160. var l = function () {
  3161. function e() {
  3162. this._token = -1
  3163. }
  3164. return e.prototype.dispose = function () {
  3165. this.cancel()
  3166. }, e.prototype.cancel = function () {
  3167. -1 !== this._token && (clearInterval(this._token), this._token = -1)
  3168. }, e.prototype.cancelAndSet = function (e, t) {
  3169. this.cancel(), this._token = setInterval((function () {
  3170. e()
  3171. }), t)
  3172. }, e
  3173. }();
  3174. t.IntervalTimer = l;
  3175. var u = function () {
  3176. function e(e, t) {
  3177. this.timeoutToken = -1, this.runner = e, this.timeout = t, this.timeoutHandler = this.onTimeout.bind(this)
  3178. }
  3179. return e.prototype.dispose = function () {
  3180. this.cancel(), this.runner = null
  3181. }, e.prototype.cancel = function () {
  3182. this.isScheduled() && (clearTimeout(this.timeoutToken), this.timeoutToken = -1)
  3183. }, e.prototype.schedule = function (e) {
  3184. void 0 === e && (e = this.timeout), this.cancel(), this.timeoutToken = setTimeout(this.timeoutHandler, e)
  3185. }, e.prototype.isScheduled = function () {
  3186. return -1 !== this.timeoutToken
  3187. }, e.prototype.onTimeout = function () {
  3188. this.timeoutToken = -1, this.runner && this.doRun()
  3189. }, e.prototype.doRun = function () {
  3190. this.runner && this.runner()
  3191. }, e
  3192. }();
  3193. t.RunOnceScheduler = u, function () {
  3194. if ("function" != typeof requestIdleCallback || "function" != typeof cancelIdleCallback) {
  3195. var e = Object.freeze({
  3196. didTimeout: !0, timeRemaining: function () {
  3197. return 15
  3198. }
  3199. });
  3200. t.runWhenIdle = function (t) {
  3201. var n = setTimeout((function () {
  3202. return t(e)
  3203. })), i = !1;
  3204. return {
  3205. dispose: function () {
  3206. i || (i = !0, clearTimeout(n))
  3207. }
  3208. }
  3209. }
  3210. } else t.runWhenIdle = function (e, t) {
  3211. var n = requestIdleCallback(e, "number" == typeof t ? {timeout: t} : void 0), i = !1;
  3212. return {
  3213. dispose: function () {
  3214. i || (i = !0, cancelIdleCallback(n))
  3215. }
  3216. }
  3217. }
  3218. }();
  3219. var d = function () {
  3220. function e(e) {
  3221. var n = this;
  3222. this._didRun = !1, this._executor = function () {
  3223. try {
  3224. n._value = e()
  3225. } catch (e) {
  3226. n._error = e
  3227. } finally {
  3228. n._didRun = !0
  3229. }
  3230. }, this._handle = t.runWhenIdle((function () {
  3231. return n._executor()
  3232. }))
  3233. }
  3234. return e.prototype.dispose = function () {
  3235. this._handle.dispose()
  3236. }, e.prototype.getValue = function () {
  3237. if (this._didRun || (this._handle.dispose(), this._executor()), this._error) throw this._error;
  3238. return this._value
  3239. }, e
  3240. }();
  3241. t.IdleValue = d
  3242. })), define(n[244], i([0, 1, 15, 2]), (function (e, t, n, i) {
  3243. "use strict";
  3244. Object.defineProperty(t, "__esModule", {value: !0});
  3245. var o = function (e) {
  3246. function t(t, i, o) {
  3247. var r = e.call(this) || this;
  3248. return r._visibility = t, r._visibleClassName = i, r._invisibleClassName = o, r._domNode = null, r._isVisible = !1, r._isNeeded = !1, r._shouldBeVisible = !1, r._revealTimer = r._register(new n.TimeoutTimer), r
  3249. }
  3250. return r(t, e), t.prototype.applyVisibilitySetting = function (e) {
  3251. return 2 !== this._visibility && (3 === this._visibility || e)
  3252. }, t.prototype.setShouldBeVisible = function (e) {
  3253. var t = this.applyVisibilitySetting(e);
  3254. this._shouldBeVisible !== t && (this._shouldBeVisible = t, this.ensureVisibility())
  3255. }, t.prototype.setIsNeeded = function (e) {
  3256. this._isNeeded !== e && (this._isNeeded = e, this.ensureVisibility())
  3257. }, t.prototype.setDomNode = function (e) {
  3258. this._domNode = e, this._domNode.setClassName(this._invisibleClassName), this.setShouldBeVisible(!1)
  3259. }, t.prototype.ensureVisibility = function () {
  3260. this._isNeeded ? this._shouldBeVisible ? this._reveal() : this._hide(!0) : this._hide(!1)
  3261. }, t.prototype._reveal = function () {
  3262. var e = this;
  3263. this._isVisible || (this._isVisible = !0, this._revealTimer.setIfNotSet((function () {
  3264. e._domNode && e._domNode.setClassName(e._visibleClassName)
  3265. }), 0))
  3266. }, t.prototype._hide = function (e) {
  3267. this._revealTimer.cancel(), this._isVisible && (this._isVisible = !1, this._domNode && this._domNode.setClassName(this._invisibleClassName + (e ? " fade" : "")))
  3268. }, t
  3269. }(i.Disposable);
  3270. t.ScrollbarVisibilityController = o
  3271. })), define(n[38], i([0, 1]), (function (e, t) {
  3272. "use strict";
  3273. Object.defineProperty(t, "__esModule", {value: !0}), t.values = function (e) {
  3274. var t = [];
  3275. return e.forEach((function (e) {
  3276. return t.push(e)
  3277. })), t
  3278. }, t.keys = function (e) {
  3279. var t = [];
  3280. return e.forEach((function (e, n) {
  3281. return t.push(n)
  3282. })), t
  3283. };
  3284. var n = function () {
  3285. function e() {
  3286. this._value = "", this._pos = 0
  3287. }
  3288. return e.prototype.reset = function (e) {
  3289. return this._value = e, this._pos = 0, this
  3290. }, e.prototype.next = function () {
  3291. return this._pos += 1, this
  3292. }, e.prototype.hasNext = function () {
  3293. return this._pos < this._value.length - 1
  3294. }, e.prototype.cmp = function (e) {
  3295. return e.charCodeAt(0) - this._value.charCodeAt(this._pos)
  3296. }, e.prototype.value = function () {
  3297. return this._value[this._pos]
  3298. }, e
  3299. }();
  3300. t.StringIterator = n;
  3301. var i = function () {
  3302. function e(e) {
  3303. void 0 === e && (e = !0), this._splitOnBackslash = e
  3304. }
  3305. return e.prototype.reset = function (e) {
  3306. return this._value = e.replace(/\\$|\/$/, ""), this._from = 0, this._to = 0, this.next()
  3307. }, e.prototype.hasNext = function () {
  3308. return this._to < this._value.length
  3309. }, e.prototype.next = function () {
  3310. this._from = this._to;
  3311. for (var e = !0; this._to < this._value.length; this._to++) {
  3312. var t = this._value.charCodeAt(this._to);
  3313. if (47 === t || this._splitOnBackslash && 92 === t) {
  3314. if (!e) break;
  3315. this._from++
  3316. } else e = !1
  3317. }
  3318. return this
  3319. }, e.prototype.cmp = function (e) {
  3320. for (var t = 0, n = e.length, i = this._from; t < n && i < this._to;) {
  3321. var o = e.charCodeAt(t) - this._value.charCodeAt(i);
  3322. if (0 !== o) return o;
  3323. t += 1, i += 1
  3324. }
  3325. return n === this._to - this._from ? 0 : t < n ? -1 : 1
  3326. }, e.prototype.value = function () {
  3327. return this._value.substring(this._from, this._to)
  3328. }, e
  3329. }();
  3330. t.PathIterator = i;
  3331. var o = function () {
  3332. }, s = function () {
  3333. function e(e) {
  3334. this._iter = e
  3335. }
  3336. return e.forPaths = function () {
  3337. return new e(new i)
  3338. }, e.forStrings = function () {
  3339. return new e(new n)
  3340. }, e.prototype.clear = function () {
  3341. this._root = void 0
  3342. }, e.prototype.set = function (e, t) {
  3343. var n, i = this._iter.reset(e)
  3344. ;
  3345. for (this._root || (this._root = new o, this._root.segment = i.value()), n = this._root; ;) {
  3346. var r = i.cmp(n.segment);
  3347. if (r > 0) n.left || (n.left = new o, n.left.segment = i.value()), n = n.left; else if (r < 0) n.right || (n.right = new o, n.right.segment = i.value()), n = n.right; else {
  3348. if (!i.hasNext()) break;
  3349. i.next(), n.mid || (n.mid = new o, n.mid.segment = i.value()), n = n.mid
  3350. }
  3351. }
  3352. var s = n.value;
  3353. return n.value = t, n.key = e, s
  3354. }, e.prototype.get = function (e) {
  3355. for (var t = this._iter.reset(e), n = this._root; n;) {
  3356. var i = t.cmp(n.segment);
  3357. if (i > 0) n = n.left; else if (i < 0) n = n.right; else {
  3358. if (!t.hasNext()) break;
  3359. t.next(), n = n.mid
  3360. }
  3361. }
  3362. return n ? n.value : void 0
  3363. }, e.prototype.findSubstr = function (e) {
  3364. for (var t = this._iter.reset(e), n = this._root, i = void 0; n;) {
  3365. var o = t.cmp(n.segment);
  3366. if (o > 0) n = n.left; else if (o < 0) n = n.right; else {
  3367. if (!t.hasNext()) break;
  3368. t.next(), i = n.value || i, n = n.mid
  3369. }
  3370. }
  3371. return n && n.value || i
  3372. }, e.prototype.forEach = function (e) {
  3373. this._forEach(this._root, e)
  3374. }, e.prototype._forEach = function (e, t) {
  3375. e && (this._forEach(e.left, t), e.value && t(e.value, e.key), this._forEach(e.mid, t), this._forEach(e.right, t))
  3376. }, e
  3377. }()
  3378. ;t.TernarySearchTree = s;
  3379. var a = function () {
  3380. function e() {
  3381. this.map = new Map, this.ignoreCase = !1
  3382. }
  3383. return e.prototype.set = function (e, t) {
  3384. this.map.set(this.toKey(e), t)
  3385. }, e.prototype.get = function (e) {
  3386. return this.map.get(this.toKey(e))
  3387. }, e.prototype.toKey = function (e) {
  3388. var t = e.toString();
  3389. return this.ignoreCase && (t = t.toLowerCase()), t
  3390. }, e
  3391. }();
  3392. t.ResourceMap = a;
  3393. var l = function () {
  3394. function e() {
  3395. this._map = new Map, this._head = void 0, this._tail = void 0, this._size = 0
  3396. }
  3397. return e.prototype.clear = function () {
  3398. this._map.clear(), this._head = void 0, this._tail = void 0, this._size = 0
  3399. }, Object.defineProperty(e.prototype, "size", {
  3400. get: function () {
  3401. return this._size
  3402. }, enumerable: !0, configurable: !0
  3403. }), e.prototype.get = function (e, t) {
  3404. void 0 === t && (t = 0);
  3405. var n = this._map.get(e);
  3406. if (n) return 0 !== t && this.touch(n, t), n.value
  3407. }, e.prototype.set = function (e, t, n) {
  3408. void 0 === n && (n = 0);
  3409. var i = this._map.get(e);
  3410. if (i) i.value = t, 0 !== n && this.touch(i, n); else {
  3411. switch (i = {key: e, value: t, next: void 0, previous: void 0}, n) {
  3412. case 0:
  3413. this.addItemLast(i);
  3414. break;
  3415. case 1:
  3416. this.addItemFirst(i);
  3417. break;
  3418. case 2:
  3419. default:
  3420. this.addItemLast(i)
  3421. }
  3422. this._map.set(e, i), this._size++
  3423. }
  3424. }, e.prototype.delete = function (e) {
  3425. return !!this.remove(e)
  3426. }, e.prototype.remove = function (e) {
  3427. var t = this._map.get(e);
  3428. if (t) return this._map.delete(e), this.removeItem(t), this._size--, t.value
  3429. }, e.prototype.forEach = function (e, t) {
  3430. for (var n = this._head; n;) t ? e.bind(t)(n.value, n.key, this) : e(n.value, n.key, this), n = n.next
  3431. }, e.prototype.trimOld = function (e) {
  3432. if (!(e >= this.size)) if (0 !== e) {
  3433. for (var t = this._head, n = this.size; t && n > e;) this._map.delete(t.key), t = t.next, n--;
  3434. this._head = t, this._size = n, t && (t.previous = void 0)
  3435. } else this.clear()
  3436. }, e.prototype.addItemFirst = function (e) {
  3437. if (this._head || this._tail) {
  3438. if (!this._head) throw new Error("Invalid list");
  3439. e.next = this._head, this._head.previous = e
  3440. } else this._tail = e;
  3441. this._head = e
  3442. }, e.prototype.addItemLast = function (e) {
  3443. if (this._head || this._tail) {
  3444. if (!this._tail) throw new Error("Invalid list");
  3445. e.previous = this._tail, this._tail.next = e
  3446. } else this._head = e;
  3447. this._tail = e
  3448. }, e.prototype.removeItem = function (e) {
  3449. if (e === this._head && e === this._tail) this._head = void 0,
  3450. this._tail = void 0; else if (e === this._head) {
  3451. if (!e.next) throw new Error("Invalid list");
  3452. e.next.previous = void 0, this._head = e.next
  3453. } else if (e === this._tail) {
  3454. if (!e.previous) throw new Error("Invalid list");
  3455. e.previous.next = void 0, this._tail = e.previous
  3456. } else {
  3457. var t = e.next, n = e.previous;
  3458. if (!t || !n) throw new Error("Invalid list");
  3459. t.previous = n, n.next = t
  3460. }
  3461. e.next = void 0, e.previous = void 0
  3462. }, e.prototype.touch = function (e, t) {
  3463. if (!this._head || !this._tail) throw new Error("Invalid list");
  3464. if (1 === t || 2 === t) if (1 === t) {
  3465. if (e === this._head) return;
  3466. var n = e.next, i = e.previous;
  3467. e === this._tail ? (i.next = void 0, this._tail = i) : (n.previous = i, i.next = n), e.previous = void 0, e.next = this._head, this._head.previous = e, this._head = e
  3468. } else if (2 === t) {
  3469. if (e === this._tail) return;
  3470. n = e.next, i = e.previous;
  3471. e === this._head ? (n.previous = void 0, this._head = n) : (n.previous = i, i.next = n), e.next = void 0, e.previous = this._tail, this._tail.next = e, this._tail = e
  3472. }
  3473. }, e.prototype.toJSON = function () {
  3474. var e = [];
  3475. return this.forEach((function (t, n) {
  3476. e.push([n, t])
  3477. })), e
  3478. }, e
  3479. }();
  3480. t.LinkedMap = l;
  3481. var u = function (e) {
  3482. function t(t, n) {
  3483. void 0 === n && (n = 1);
  3484. var i = e.call(this) || this;
  3485. return i._limit = t, i._ratio = Math.min(Math.max(0, n), 1), i
  3486. }
  3487. return r(t, e), t.prototype.get = function (t) {
  3488. return e.prototype.get.call(this, t, 2)
  3489. }, t.prototype.peek = function (t) {
  3490. return e.prototype.get.call(this, t, 0)
  3491. }, t.prototype.set = function (t, n) {
  3492. e.prototype.set.call(this, t, n, 2), this.checkTrim()
  3493. }, t.prototype.checkTrim = function () {
  3494. this.size > this._limit && this.trimOld(Math.round(this._limit * this._ratio))
  3495. }, t
  3496. }(l);
  3497. t.LRUCache = u
  3498. })), function (e) {
  3499. "use strict";
  3500. var t = {
  3501. newline: /^\n+/,
  3502. code: /^( {4}[^\n]+\n*)+/,
  3503. fences: m,
  3504. hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,
  3505. heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,
  3506. nptable: m,
  3507. blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,
  3508. list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
  3509. html: "^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",
  3510. def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,
  3511. table: m,
  3512. lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
  3513. paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,
  3514. text: /^[^\n]+/
  3515. };
  3516. function n(e) {
  3517. this.tokens = [], this.tokens.links = Object.create(null), this.options = e || b.defaults, this.rules = t.normal, this.options.pedantic ? this.rules = t.pedantic : this.options.gfm && (this.options.tables ? this.rules = t.tables : this.rules = t.gfm)
  3518. }
  3519. t._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,
  3520. t._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/, t.def = h(t.def).replace("label", t._label).replace("title", t._title).getRegex(), t.bullet = /(?:[*+-]|\d{1,9}\.)/, t.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/, t.item = h(t.item, "gm").replace(/bull/g, t.bullet).getRegex(), t.list = h(t.list).replace(/bull/g, t.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + t.def.source + ")").getRegex(), t._tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", t._comment = /<!--(?!-?>)[\s\S]*?-->/,
  3521. t.html = h(t.html, "i").replace("comment", t._comment).replace("tag", t._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), t.paragraph = h(t.paragraph).replace("hr", t.hr).replace("heading", t.heading).replace("lheading", t.lheading).replace("tag", t._tag).getRegex(), t.blockquote = h(t.blockquote).replace("paragraph", t.paragraph).getRegex(), t.normal = v({}, t), t.gfm = v({}, t.normal, {
  3522. fences: /^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,
  3523. paragraph: /^/,
  3524. heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/
  3525. }), t.gfm.paragraph = h(t.paragraph).replace("(?!", "(?!" + t.gfm.fences.source.replace("\\1", "\\2") + "|" + t.list.source.replace("\\1", "\\3") + "|").getRegex(), t.tables = v({}, t.gfm, {
  3526. nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,
  3527. table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/
  3528. }), t.pedantic = v({}, t.normal, {
  3529. html: h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", t._comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
  3530. def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/
  3531. }), n.rules = t, n.lex = function (e, t) {
  3532. return new n(t).lex(e)
  3533. }, n.prototype.lex = function (e) {
  3534. return e = e.replace(/\r\n|\r/g, "\n").replace(/\t/g, " ").replace(/\u00a0/g, " ").replace(/\u2424/g, "\n"), this.token(e, !0)
  3535. }, n.prototype.token = function (e, n) {
  3536. var i, o, r, s, a, l, u, d, c, h, p, g, f, m, v, C;
  3537. for (e = e.replace(/^ +$/gm, ""); e;) if ((r = this.rules.newline.exec(e)) && (e = e.substring(r[0].length), r[0].length > 1 && this.tokens.push({type: "space"})), r = this.rules.code.exec(e)) e = e.substring(r[0].length), r = r[0].replace(/^ {4}/gm, ""), this.tokens.push({
  3538. type: "code", text: this.options.pedantic ? r : y(r, "\n")
  3539. }); else if (r = this.rules.fences.exec(e)) e = e.substring(r[0].length), this.tokens.push({
  3540. type: "code",
  3541. lang: r[2] ? r[2].trim() : r[2],
  3542. text: r[3] || ""
  3543. }); else if (r = this.rules.heading.exec(e)) e = e.substring(r[0].length), this.tokens.push({
  3544. type: "heading",
  3545. depth: r[1].length,
  3546. text: r[2]
  3547. }); else if ((r = this.rules.nptable.exec(e)) && (l = {
  3548. type: "table",
  3549. header: _(r[1].replace(/^ *| *\| *$/g, "")),
  3550. align: r[2].replace(/^ *|\| *$/g, "").split(/ *\| */),
  3551. cells: r[3] ? r[3].replace(/\n$/, "").split("\n") : []
  3552. }).header.length === l.align.length) {
  3553. for (e = e.substring(r[0].length), p = 0; p < l.align.length; p++) /^ *-+: *$/.test(l.align[p]) ? l.align[p] = "right" : /^ *:-+: *$/.test(l.align[p]) ? l.align[p] = "center" : /^ *:-+ *$/.test(l.align[p]) ? l.align[p] = "left" : l.align[p] = null;
  3554. for (p = 0; p < l.cells.length; p++) l.cells[p] = _(l.cells[p], l.header.length);
  3555. this.tokens.push(l)
  3556. } else if (r = this.rules.hr.exec(e)) e = e.substring(r[0].length), this.tokens.push({type: "hr"}); else if (r = this.rules.blockquote.exec(e)) e = e.substring(r[0].length), this.tokens.push({type: "blockquote_start"}),
  3557. r = r[0].replace(/^ *> ?/gm, ""), this.token(r, n), this.tokens.push({type: "blockquote_end"}); else if (r = this.rules.list.exec(e)) {
  3558. for (e = e.substring(r[0].length), u = {
  3559. type: "list_start",
  3560. ordered: m = (s = r[2]).length > 1,
  3561. start: m ? +s : "",
  3562. loose: !1
  3563. }, this.tokens.push(u), d = [], i = !1, f = (r = r[0].match(this.rules.item)).length, p = 0; p < f; p++) h = (l = r[p]).length, ~(l = l.replace(/^ *([*+-]|\d+\.) */, "")).indexOf("\n ") && (h -= l.length, l = this.options.pedantic ? l.replace(/^ {1,4}/gm, "") : l.replace(new RegExp("^ {1," + h + "}", "gm"), "")), p !== f - 1 && (a = t.bullet.exec(r[p + 1])[0], (s.length > 1 ? 1 === a.length : a.length > 1 || this.options.smartLists && a !== s) && (e = r.slice(p + 1).join("\n") + e, p = f - 1)), o = i || /\n\n(?!\s*$)/.test(l), p !== f - 1 && (i = "\n" === l.charAt(l.length - 1), o || (o = i)), o && (u.loose = !0), C = void 0, (v = /^\[[ xX]\] /.test(l)) && (C = " " !== l[1], l = l.replace(/^\[[ xX]\] +/, "")), c = {
  3564. type: "list_item_start",
  3565. task: v,
  3566. checked: C,
  3567. loose: o
  3568. }, d.push(c), this.tokens.push(c), this.token(l, !1), this.tokens.push({type: "list_item_end"});
  3569. if (u.loose) for (f = d.length, p = 0; p < f; p++) d[p].loose = !0;
  3570. this.tokens.push({
  3571. type: "list_end"
  3572. })
  3573. } else if (r = this.rules.html.exec(e)) e = e.substring(r[0].length), this.tokens.push({
  3574. type: this.options.sanitize ? "paragraph" : "html",
  3575. pre: !this.options.sanitizer && ("pre" === r[1] || "script" === r[1] || "style" === r[1]),
  3576. text: r[0]
  3577. }); else if (n && (r = this.rules.def.exec(e))) e = e.substring(r[0].length), r[3] && (r[3] = r[3].substring(1, r[3].length - 1)), g = r[1].toLowerCase().replace(/\s+/g, " "), this.tokens.links[g] || (this.tokens.links[g] = {
  3578. href: r[2],
  3579. title: r[3]
  3580. }); else if ((r = this.rules.table.exec(e)) && (l = {
  3581. type: "table",
  3582. header: _(r[1].replace(/^ *| *\| *$/g, "")),
  3583. align: r[2].replace(/^ *|\| *$/g, "").split(/ *\| */),
  3584. cells: r[3] ? r[3].replace(/\n$/, "").split("\n") : []
  3585. }).header.length === l.align.length) {
  3586. for (e = e.substring(r[0].length), p = 0; p < l.align.length; p++) /^ *-+: *$/.test(l.align[p]) ? l.align[p] = "right" : /^ *:-+: *$/.test(l.align[p]) ? l.align[p] = "center" : /^ *:-+ *$/.test(l.align[p]) ? l.align[p] = "left" : l.align[p] = null;
  3587. for (p = 0; p < l.cells.length; p++) l.cells[p] = _(l.cells[p].replace(/^ *\| *| *\| *$/g, ""), l.header.length);
  3588. this.tokens.push(l)
  3589. } else if (r = this.rules.lheading.exec(e)) e = e.substring(r[0].length), this.tokens.push({
  3590. type: "heading",
  3591. depth: "=" === r[2] ? 1 : 2,
  3592. text: r[1]
  3593. }); else if (n && (r = this.rules.paragraph.exec(e))) e = e.substring(r[0].length), this.tokens.push({
  3594. type: "paragraph",
  3595. text: "\n" === r[1].charAt(r[1].length - 1) ? r[1].slice(0, -1) : r[1]
  3596. }); else if (r = this.rules.text.exec(e)) e = e.substring(r[0].length), this.tokens.push({
  3597. type: "text",
  3598. text: r[0]
  3599. }); else if (e) throw new Error("Infinite loop on byte: " + e.charCodeAt(0));
  3600. return this.tokens
  3601. };
  3602. var i = {
  3603. escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
  3604. autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/,
  3605. url: m,
  3606. tag: "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",
  3607. link: /^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,
  3608. reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,
  3609. nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,
  3610. strong: /^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,
  3611. em: /^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,
  3612. code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
  3613. br: /^( {2,}|\\)\n(?!\s*$)/,
  3614. del: m,
  3615. text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/
  3616. };
  3617. function o(e, t) {
  3618. if (this.options = t || b.defaults, this.links = e, this.rules = i.normal, this.renderer = this.options.renderer || new r, this.renderer.options = this.options, !this.links) throw new Error("Tokens array requires a `links` property.");
  3619. this.options.pedantic ? this.rules = i.pedantic : this.options.gfm && (this.options.breaks ? this.rules = i.breaks : this.rules = i.gfm)
  3620. }
  3621. function r(e) {
  3622. this.options = e || b.defaults
  3623. }
  3624. function s() {
  3625. }
  3626. function a(e) {
  3627. this.tokens = [], this.token = null, this.options = e || b.defaults, this.options.renderer = this.options.renderer || new r,
  3628. this.renderer = this.options.renderer, this.renderer.options = this.options, this.slugger = new l
  3629. }
  3630. function l() {
  3631. this.seen = {}
  3632. }
  3633. function d(e, t) {
  3634. if (t) {
  3635. if (d.escapeTest.test(e)) return e.replace(d.escapeReplace, (function (e) {
  3636. return d.replacements[e]
  3637. }))
  3638. } else if (d.escapeTestNoEncode.test(e)) return e.replace(d.escapeReplaceNoEncode, (function (e) {
  3639. return d.replacements[e]
  3640. }));
  3641. return e
  3642. }
  3643. function c(e) {
  3644. return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi, (function (e, t) {
  3645. return "colon" === (t = t.toLowerCase()) ? ":" : "#" === t.charAt(0) ? "x" === t.charAt(1) ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""
  3646. }))
  3647. }
  3648. function h(e, t) {
  3649. return e = e.source || e, t = t || "", {
  3650. replace: function (t, n) {
  3651. return n = (n = n.source || n).replace(/(^|[^\[])\^/g, "$1"), e = e.replace(t, n), this
  3652. }, getRegex: function () {
  3653. return new RegExp(e, t)
  3654. }
  3655. }
  3656. }
  3657. function p(e, t, n) {
  3658. if (e) {
  3659. try {
  3660. var i = decodeURIComponent(c(n)).replace(/[^\w:]/g, "").toLowerCase()
  3661. } catch (e) {
  3662. return null
  3663. }
  3664. if (0 === i.indexOf("javascript:") || 0 === i.indexOf("vbscript:") || 0 === i.indexOf("data:")) return null
  3665. }
  3666. t && !f.test(n) && (n = function (e, t) {
  3667. g[" " + e] || (/^[^:]+:\/*[^/]*$/.test(e) ? g[" " + e] = e + "/" : g[" " + e] = y(e, "/", !0));
  3668. return e = g[" " + e], "//" === t.slice(0, 2) ? e.replace(/:[\s\S]*/, ":") + t : "/" === t.charAt(0) ? e.replace(/(:\/*[^/]*)[\s\S]*/, "$1") + t : e + t
  3669. }(t, n));
  3670. try {
  3671. n = encodeURI(n).replace(/%25/g, "%")
  3672. } catch (e) {
  3673. return null
  3674. }
  3675. return n
  3676. }
  3677. i._punctuation = "!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~", i.em = h(i.em).replace(/punctuation/g, i._punctuation).getRegex(), i._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g, i._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/, i._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/, i.autolink = h(i.autolink).replace("scheme", i._scheme).replace("email", i._email).getRegex(), i._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/, i.tag = h(i.tag).replace("comment", t._comment).replace("attribute", i._attribute).getRegex(), i._label = /(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/,
  3678. i._href = /\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/, i._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/, i.link = h(i.link).replace("label", i._label).replace("href", i._href).replace("title", i._title).getRegex(), i.reflink = h(i.reflink).replace("label", i._label).getRegex(), i.normal = v({}, i), i.pedantic = v({}, i.normal, {
  3679. strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
  3680. em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,
  3681. link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", i._label).getRegex(),
  3682. reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", i._label).getRegex()
  3683. }), i.gfm = v({}, i.normal, {
  3684. escape: h(i.escape).replace("])", "~|])").getRegex(),
  3685. _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,
  3686. url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,
  3687. _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,
  3688. del: /^~+(?=\S)([\s\S]*?\S)~+/,
  3689. text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/
  3690. }), i.gfm.url = h(i.gfm.url, "i").replace("email", i.gfm._extended_email).getRegex(), i.breaks = v({}, i.gfm, {
  3691. br: h(i.br).replace("{2,}", "*").getRegex(),
  3692. text: h(i.gfm.text).replace(/\{2,\}/g, "*").getRegex()
  3693. }), o.rules = i, o.output = function (e, t, n) {
  3694. return new o(t, n).output(e)
  3695. }, o.prototype.output = function (e) {
  3696. for (var t, n, i, r, s, a, l = ""; e;) if (s = this.rules.escape.exec(e)) e = e.substring(s[0].length), l += d(s[1]); else if (s = this.rules.tag.exec(e)) !this.inLink && /^<a /i.test(s[0]) ? this.inLink = !0 : this.inLink && /^<\/a>/i.test(s[0]) && (this.inLink = !1), !this.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(s[0]) ? this.inRawBlock = !0 : this.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0]) && (this.inRawBlock = !1), e = e.substring(s[0].length),
  3697. l += this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(s[0]) : d(s[0]) : s[0]; else if (s = this.rules.link.exec(e)) {
  3698. var u = C(s[2], "()");
  3699. if (u > -1) {
  3700. var c = s[0].length - (s[2].length - u) - (s[3] || "").length;
  3701. s[2] = s[2].substring(0, u), s[0] = s[0].substring(0, c).trim(), s[3] = ""
  3702. }
  3703. e = e.substring(s[0].length), this.inLink = !0, i = s[2], this.options.pedantic ? (t = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i)) ? (i = t[1], r = t[3]) : r = "" : r = s[3] ? s[3].slice(1, -1) : "", i = i.trim().replace(/^<([\s\S]*)>$/, "$1"), l += this.outputLink(s, {
  3704. href: o.escapes(i),
  3705. title: o.escapes(r)
  3706. }), this.inLink = !1
  3707. } else if ((s = this.rules.reflink.exec(e)) || (s = this.rules.nolink.exec(e))) {
  3708. if (e = e.substring(s[0].length), t = (s[2] || s[1]).replace(/\s+/g, " "), !(t = this.links[t.toLowerCase()]) || !t.href) {
  3709. l += s[0].charAt(0), e = s[0].substring(1) + e;
  3710. continue
  3711. }
  3712. this.inLink = !0, l += this.outputLink(s, t), this.inLink = !1
  3713. } else if (s = this.rules.strong.exec(e)) e = e.substring(s[0].length), l += this.renderer.strong(this.output(s[4] || s[3] || s[2] || s[1])); else if (s = this.rules.em.exec(e)) e = e.substring(s[0].length),
  3714. l += this.renderer.em(this.output(s[6] || s[5] || s[4] || s[3] || s[2] || s[1])); else if (s = this.rules.code.exec(e)) e = e.substring(s[0].length), l += this.renderer.codespan(d(s[2].trim(), !0)); else if (s = this.rules.br.exec(e)) e = e.substring(s[0].length), l += this.renderer.br(); else if (s = this.rules.del.exec(e)) e = e.substring(s[0].length), l += this.renderer.del(this.output(s[1])); else if (s = this.rules.autolink.exec(e)) e = e.substring(s[0].length), i = "@" === s[2] ? "mailto:" + (n = d(this.mangle(s[1]))) : n = d(s[1]), l += this.renderer.link(i, null, n); else if (this.inLink || !(s = this.rules.url.exec(e))) {
  3715. if (s = this.rules.text.exec(e)) e = e.substring(s[0].length), this.inRawBlock ? l += this.renderer.text(s[0]) : l += this.renderer.text(d(this.smartypants(s[0]))); else if (e) throw new Error("Infinite loop on byte: " + e.charCodeAt(0))
  3716. } else {
  3717. if ("@" === s[2]) i = "mailto:" + (n = d(s[0])); else {
  3718. do {
  3719. a = s[0], s[0] = this.rules._backpedal.exec(s[0])[0]
  3720. } while (a !== s[0]);
  3721. n = d(s[0]), i = "www." === s[1] ? "http://" + n : n
  3722. }
  3723. e = e.substring(s[0].length), l += this.renderer.link(i, null, n)
  3724. }
  3725. return l
  3726. },
  3727. o.escapes = function (e) {
  3728. return e ? e.replace(o.rules._escapes, "$1") : e
  3729. }, o.prototype.outputLink = function (e, t) {
  3730. var n = t.href, i = t.title ? d(t.title) : null;
  3731. return "!" !== e[0].charAt(0) ? this.renderer.link(n, i, this.output(e[1])) : this.renderer.image(n, i, d(e[1]))
  3732. }, o.prototype.smartypants = function (e) {
  3733. return this.options.smartypants ? e.replace(/---/g, "—").replace(/--/g, "–").replace(/(^|[-\u2014/(\[{"\s])'/g, "$1‘").replace(/'/g, "’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1“").replace(/"/g, "”").replace(/\.{3}/g, "…") : e
  3734. }, o.prototype.mangle = function (e) {
  3735. if (!this.options.mangle) return e;
  3736. for (var t, n = "", i = e.length, o = 0; o < i; o++) t = e.charCodeAt(o), Math.random() > .5 && (t = "x" + t.toString(16)), n += "&#" + t + ";";
  3737. return n
  3738. }, r.prototype.code = function (e, t, n) {
  3739. var i = (t || "").match(/\S*/)[0];
  3740. if (this.options.highlight) {
  3741. var o = this.options.highlight(e, i);
  3742. null != o && o !== e && (n = !0, e = o)
  3743. }
  3744. return i ? '<pre><code class="' + this.options.langPrefix + d(i, !0) + '">' + (n ? e : d(e, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? e : d(e, !0)) + "</code></pre>"
  3745. }, r.prototype.blockquote = function (e) {
  3746. return "<blockquote>\n" + e + "</blockquote>\n"
  3747. }, r.prototype.html = function (e) {
  3748. return e
  3749. }, r.prototype.heading = function (e, t, n, i) {
  3750. return this.options.headerIds ? "<h" + t + ' id="' + this.options.headerPrefix + i.slug(n) + '">' + e + "</h" + t + ">\n" : "<h" + t + ">" + e + "</h" + t + ">\n"
  3751. }, r.prototype.hr = function () {
  3752. return this.options.xhtml ? "<hr/>\n" : "<hr>\n"
  3753. }, r.prototype.list = function (e, t, n) {
  3754. var i = t ? "ol" : "ul";
  3755. return "<" + i + (t && 1 !== n ? ' start="' + n + '"' : "") + ">\n" + e + "</" + i + ">\n"
  3756. }, r.prototype.listitem = function (e) {
  3757. return "<li>" + e + "</li>\n"
  3758. }, r.prototype.checkbox = function (e) {
  3759. return "<input " + (e ? 'checked="" ' : "") + 'disabled="" type="checkbox"' + (this.options.xhtml ? " /" : "") + "> "
  3760. }, r.prototype.paragraph = function (e) {
  3761. return "<p>" + e + "</p>\n"
  3762. }, r.prototype.table = function (e, t) {
  3763. return t && (t = "<tbody>" + t + "</tbody>"), "<table>\n<thead>\n" + e + "</thead>\n" + t + "</table>\n"
  3764. }, r.prototype.tablerow = function (e) {
  3765. return "<tr>\n" + e + "</tr>\n"
  3766. }, r.prototype.tablecell = function (e, t) {
  3767. var n = t.header ? "th" : "td";
  3768. return (t.align ? "<" + n + ' align="' + t.align + '">' : "<" + n + ">") + e + "</" + n + ">\n"
  3769. },
  3770. r.prototype.strong = function (e) {
  3771. return "<strong>" + e + "</strong>"
  3772. }, r.prototype.em = function (e) {
  3773. return "<em>" + e + "</em>"
  3774. }, r.prototype.codespan = function (e) {
  3775. return "<code>" + e + "</code>"
  3776. }, r.prototype.br = function () {
  3777. return this.options.xhtml ? "<br/>" : "<br>"
  3778. }, r.prototype.del = function (e) {
  3779. return "<del>" + e + "</del>"
  3780. }, r.prototype.link = function (e, t, n) {
  3781. if (null === (e = p(this.options.sanitize, this.options.baseUrl, e))) return n;
  3782. var i = '<a href="' + d(e) + '"';
  3783. return t && (i += ' title="' + t + '"'), i += ">" + n + "</a>"
  3784. }, r.prototype.image = function (e, t, n) {
  3785. if (null === (e = p(this.options.sanitize, this.options.baseUrl, e))) return n;
  3786. var i = '<img src="' + e + '" alt="' + n + '"';
  3787. return t && (i += ' title="' + t + '"'), i += this.options.xhtml ? "/>" : ">"
  3788. }, r.prototype.text = function (e) {
  3789. return e
  3790. }, s.prototype.strong = s.prototype.em = s.prototype.codespan = s.prototype.del = s.prototype.text = function (e) {
  3791. return e
  3792. }, s.prototype.link = s.prototype.image = function (e, t, n) {
  3793. return "" + n
  3794. }, s.prototype.br = function () {
  3795. return ""
  3796. }, a.parse = function (e, t) {
  3797. return new a(t).parse(e)
  3798. }, a.prototype.parse = function (e) {
  3799. this.inline = new o(e.links, this.options), this.inlineText = new o(e.links, v({}, this.options, {renderer: new s})), this.tokens = e.reverse();
  3800. for (var t = ""; this.next();) t += this.tok();
  3801. return t
  3802. }, a.prototype.next = function () {
  3803. return this.token = this.tokens.pop()
  3804. }, a.prototype.peek = function () {
  3805. return this.tokens[this.tokens.length - 1] || 0
  3806. }, a.prototype.parseText = function () {
  3807. for (var e = this.token.text; "text" === this.peek().type;) e += "\n" + this.next().text;
  3808. return this.inline.output(e)
  3809. }, a.prototype.tok = function () {
  3810. switch (this.token.type) {
  3811. case"space":
  3812. return "";
  3813. case"hr":
  3814. return this.renderer.hr();
  3815. case"heading":
  3816. return this.renderer.heading(this.inline.output(this.token.text), this.token.depth, c(this.inlineText.output(this.token.text)), this.slugger);
  3817. case"code":
  3818. return this.renderer.code(this.token.text, this.token.lang, this.token.escaped);
  3819. case"table":
  3820. var e, t, n, i, o = "", r = "";
  3821. for (n = "", e = 0; e < this.token.header.length; e++) n += this.renderer.tablecell(this.inline.output(this.token.header[e]), {
  3822. header: !0,
  3823. align: this.token.align[e]
  3824. })
  3825. ;
  3826. for (o += this.renderer.tablerow(n), e = 0; e < this.token.cells.length; e++) {
  3827. for (t = this.token.cells[e], n = "", i = 0; i < t.length; i++) n += this.renderer.tablecell(this.inline.output(t[i]), {
  3828. header: !1,
  3829. align: this.token.align[i]
  3830. });
  3831. r += this.renderer.tablerow(n)
  3832. }
  3833. return this.renderer.table(o, r);
  3834. case"blockquote_start":
  3835. for (r = ""; "blockquote_end" !== this.next().type;) r += this.tok();
  3836. return this.renderer.blockquote(r);
  3837. case"list_start":
  3838. r = "";
  3839. for (var s = this.token.ordered, a = this.token.start; "list_end" !== this.next().type;) r += this.tok();
  3840. return this.renderer.list(r, s, a);
  3841. case"list_item_start":
  3842. r = "";
  3843. var l = this.token.loose, u = this.token.checked, d = this.token.task;
  3844. for (this.token.task && (r += this.renderer.checkbox(u)); "list_item_end" !== this.next().type;) r += l || "text" !== this.token.type ? this.tok() : this.parseText();
  3845. return this.renderer.listitem(r, d, u);
  3846. case"html":
  3847. return this.renderer.html(this.token.text);
  3848. case"paragraph":
  3849. return this.renderer.paragraph(this.inline.output(this.token.text));
  3850. case"text":
  3851. return this.renderer.paragraph(this.parseText());
  3852. default:
  3853. var h = 'Token with "' + this.token.type + '" type was not found.';
  3854. if (!this.options.silent) throw new Error(h);
  3855. console.log(h)
  3856. }
  3857. }, l.prototype.slug = function (e) {
  3858. var t = e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, "").replace(/\s/g, "-");
  3859. if (this.seen.hasOwnProperty(t)) {
  3860. var n = t;
  3861. do {
  3862. this.seen[n]++, t = n + "-" + this.seen[n]
  3863. } while (this.seen.hasOwnProperty(t))
  3864. }
  3865. return this.seen[t] = 0, t
  3866. }, d.escapeTest = /[&<>"']/, d.escapeReplace = /[&<>"']/g, d.replacements = {
  3867. "&": "&amp;",
  3868. "<": "&lt;",
  3869. ">": "&gt;",
  3870. '"': "&quot;",
  3871. "'": "&#39;"
  3872. }, d.escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/, d.escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g;
  3873. var g = {}, f = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
  3874. function m() {
  3875. }
  3876. function v(e) {
  3877. for (var t, n, i = 1; i < arguments.length; i++) for (n in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  3878. return e
  3879. }
  3880. function _(e, t) {
  3881. var n = e.replace(/\|/g, (function (e, t, n) {
  3882. for (var i = !1, o = t; --o >= 0 && "\\" === n[o];) i = !i;
  3883. return i ? "|" : " |"
  3884. })).split(/ \|/), i = 0;
  3885. if (n.length > t) n.splice(t); else for (; n.length < t;) n.push("")
  3886. ;
  3887. for (; i < n.length; i++) n[i] = n[i].trim().replace(/\\\|/g, "|");
  3888. return n
  3889. }
  3890. function y(e, t, n) {
  3891. if (0 === e.length) return "";
  3892. for (var i = 0; i < e.length;) {
  3893. var o = e.charAt(e.length - i - 1);
  3894. if (o !== t || n) {
  3895. if (o === t || !n) break;
  3896. i++
  3897. } else i++
  3898. }
  3899. return e.substr(0, e.length - i)
  3900. }
  3901. function C(e, t) {
  3902. if (-1 === e.indexOf(t[1])) return -1;
  3903. for (var n = 0, i = 0; i < e.length; i++) if ("\\" === e[i]) i++; else if (e[i] === t[0]) n++; else if (e[i] === t[1] && --n < 0) return i;
  3904. return -1
  3905. }
  3906. function b(e, t, i) {
  3907. if (null == e) throw new Error("marked(): input parameter is undefined or null");
  3908. if ("string" != typeof e) throw new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected");
  3909. if (i || "function" == typeof t) {
  3910. i || (i = t, t = null);
  3911. var o, r, s = (t = v({}, b.defaults, t || {})).highlight, l = 0;
  3912. try {
  3913. o = n.lex(e, t)
  3914. } catch (e) {
  3915. return i(e)
  3916. }
  3917. r = o.length;
  3918. var u = function (e) {
  3919. if (e) return t.highlight = s, i(e);
  3920. var n;
  3921. try {
  3922. n = a.parse(o, t)
  3923. } catch (t) {
  3924. e = t
  3925. }
  3926. return t.highlight = s, e ? i(e) : i(null, n)
  3927. };
  3928. if (!s || s.length < 3) return u();
  3929. if (delete t.highlight, !r) return u();
  3930. for (; l < o.length; l++) !function (e) {
  3931. "code" !== e.type ? --r || u() : s(e.text, e.lang, (function (t, n) {
  3932. return t ? u(t) : null == n || n === e.text ? --r || u() : (e.text = n, e.escaped = !0, void (--r || u()))
  3933. }))
  3934. }(o[l])
  3935. } else try {
  3936. return t && (t = v({}, b.defaults, t)), a.parse(n.lex(e, t), t)
  3937. } catch (e) {
  3938. if (e.message += "\nPlease report this to https://github.com/markedjs/marked.", (t || b.defaults).silent) return "<p>An error occurred:</p><pre>" + d(e.message + "", !0) + "</pre>";
  3939. throw e
  3940. }
  3941. }
  3942. m.exec = m, b.options = b.setOptions = function (e) {
  3943. return v(b.defaults, e), b
  3944. }, b.getDefaults = function () {
  3945. return {
  3946. baseUrl: null,
  3947. breaks: !1,
  3948. gfm: !0,
  3949. headerIds: !0,
  3950. headerPrefix: "",
  3951. highlight: null,
  3952. langPrefix: "language-",
  3953. mangle: !0,
  3954. pedantic: !1,
  3955. renderer: new r,
  3956. sanitize: !1,
  3957. sanitizer: null,
  3958. silent: !1,
  3959. smartLists: !1,
  3960. smartypants: !1,
  3961. tables: !0,
  3962. xhtml: !1
  3963. }
  3964. }, b.defaults = b.getDefaults(), b.Parser = a, b.parser = a.parse, b.Renderer = r, b.TextRenderer = s, b.Lexer = n, b.lexer = n.lex, b.InlineLexer = o, b.inlineLexer = o.output, b.Slugger = l, b.parse = b, u = b
  3965. }.call(this), define("vs/base/common/marked/marked", (function () {
  3966. return u
  3967. })), define(n[131], i([0, 1]), (function (e, t) {
  3968. "use strict"
  3969. ;Object.defineProperty(t, "__esModule", {value: !0}), t.clamp = function (e, t, n) {
  3970. return Math.min(Math.max(e, t), n)
  3971. }
  3972. })), define(n[16], i([0, 1]), (function (e, t) {
  3973. "use strict";
  3974. Object.defineProperty(t, "__esModule", {value: !0});
  3975. var n = !1, i = !1, o = !1, r = !1, s = !1, a = !1, l = void 0,
  3976. u = "undefined" != typeof process && void 0 !== process.versions && void 0 !== process.versions.electron && "renderer" === process.type;
  3977. if ("object" != typeof navigator || u) {
  3978. if ("object" == typeof process) {
  3979. n = "win32" === process.platform, i = "darwin" === process.platform, o = "linux" === process.platform, "en", "en";
  3980. var d = process.env.VSCODE_NLS_CONFIG;
  3981. if (d) try {
  3982. var c = JSON.parse(d), h = c.availableLanguages["*"];
  3983. c.locale, h || "en", c._translationsConfigFile
  3984. } catch (e) {
  3985. }
  3986. r = !0
  3987. }
  3988. } else n = (l = navigator.userAgent).indexOf("Windows") >= 0, i = l.indexOf("Macintosh") >= 0, a = l.indexOf("Macintosh") >= 0 && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0, o = l.indexOf("Linux") >= 0, s = !0, navigator.language;
  3989. t.isWindows = n, t.isMacintosh = i, t.isLinux = o, t.isNative = r, t.isWeb = s, t.isIOS = a
  3990. ;var p = "object" == typeof self ? self : "object" == typeof global ? global : {};
  3991. t.globals = p, t.setImmediate = function () {
  3992. if (t.globals.setImmediate) return t.globals.setImmediate.bind(t.globals);
  3993. if ("function" == typeof t.globals.postMessage && !t.globals.importScripts) {
  3994. var e = [];
  3995. t.globals.addEventListener("message", (function (t) {
  3996. if (t.data && t.data.vscodeSetImmediateId) for (var n = 0, i = e.length; n < i; n++) {
  3997. var o = e[n];
  3998. if (o.id === t.data.vscodeSetImmediateId) return e.splice(n, 1), void o.callback()
  3999. }
  4000. }));
  4001. var n = 0;
  4002. return function (i) {
  4003. var o = ++n;
  4004. e.push({id: o, callback: i}), t.globals.postMessage({vscodeSetImmediateId: o}, "*")
  4005. }
  4006. }
  4007. if ("undefined" != typeof process && "function" == typeof process.nextTick) return process.nextTick.bind(process);
  4008. var i = Promise.resolve();
  4009. return function (e) {
  4010. return i.then(e)
  4011. }
  4012. }(), t.OS = i ? 2 : n ? 1 : 3
  4013. })), define(n[88], i([0, 1, 24, 16]), (function (e, t, n, i) {
  4014. "use strict";
  4015. Object.defineProperty(t, "__esModule", {value: !0}), t.BrowserFeatures = {
  4016. clipboard: {
  4017. writeText: i.isNative || document.queryCommandSupported && document.queryCommandSupported("copy") || !!(navigator && navigator.clipboard && navigator.clipboard.writeText),
  4018. readText: i.isNative || !!(navigator && navigator.clipboard && navigator.clipboard.readText),
  4019. richText: function () {
  4020. if (n.isIE) return !1;
  4021. if (n.isEdge) {
  4022. var e = navigator.userAgent.indexOf("Edge/"),
  4023. t = parseInt(navigator.userAgent.substring(e + 5, navigator.userAgent.indexOf(".", e)), 10);
  4024. if (!t || t >= 12 && t <= 16) return !1
  4025. }
  4026. return !0
  4027. }()
  4028. },
  4029. keyboard: i.isNative || n.isStandalone ? 0 : navigator.keyboard || n.isSafari ? 1 : 2,
  4030. touch: "ontouchstart" in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0,
  4031. pointerEvents: window.PointerEvent && ("ontouchstart" in window || window.navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0)
  4032. }
  4033. })), define(n[56], i([0, 1, 24, 36, 16]), (function (e, t, n, i, o) {
  4034. "use strict";
  4035. Object.defineProperty(t, "__esModule", {value: !0});
  4036. var r = new Array(230), s = new Array(112);
  4037. !function () {
  4038. for (var e = 0; e < s.length; e++) s[e] = -1;
  4039. function t(e, t) {
  4040. r[e] = t,
  4041. s[t] = e
  4042. }
  4043. t(3, 7), t(8, 1), t(9, 2), t(13, 3), t(16, 4), t(17, 5), t(18, 6), t(19, 7), t(20, 8), t(27, 9), t(32, 10), t(33, 11), t(34, 12), t(35, 13), t(36, 14), t(37, 15), t(38, 16), t(39, 17), t(40, 18), t(45, 19), t(46, 20), t(48, 21), t(49, 22), t(50, 23), t(51, 24), t(52, 25), t(53, 26), t(54, 27), t(55, 28), t(56, 29), t(57, 30), t(65, 31), t(66, 32), t(67, 33), t(68, 34), t(69, 35), t(70, 36), t(71, 37), t(72, 38), t(73, 39), t(74, 40), t(75, 41), t(76, 42), t(77, 43), t(78, 44), t(79, 45), t(80, 46), t(81, 47), t(82, 48), t(83, 49), t(84, 50), t(85, 51), t(86, 52), t(87, 53), t(88, 54), t(89, 55), t(90, 56), t(93, 58), t(96, 93), t(97, 94), t(98, 95), t(99, 96), t(100, 97), t(101, 98), t(102, 99), t(103, 100), t(104, 101), t(105, 102), t(106, 103), t(107, 104), t(108, 105), t(109, 106), t(110, 107), t(111, 108), t(112, 59), t(113, 60), t(114, 61), t(115, 62), t(116, 63), t(117, 64), t(118, 65), t(119, 66), t(120, 67), t(121, 68), t(122, 69), t(123, 70), t(124, 71), t(125, 72), t(126, 73), t(127, 74), t(128, 75), t(129, 76), t(130, 77), t(144, 78), t(145, 79), t(186, 80), t(187, 81), t(188, 82), t(189, 83), t(190, 84), t(191, 85),t(192, 86),t(193, 110),t(194, 111),t(219, 87),t(220, 88),t(221, 89),t(222, 90),
  4044. t(223, 91),t(226, 92),t(229, 109),n.isIE ? t(91, 57) : n.isFirefox ? (t(59, 80), t(107, 81), t(109, 83), o.isMacintosh && t(224, 57)) : n.isWebKit && (t(91, 57), o.isMacintosh ? t(93, 57) : t(92, 57))
  4045. }();
  4046. var a = o.isMacintosh ? 256 : 2048, l = o.isMacintosh ? 2048 : 256, u = function () {
  4047. function e(e) {
  4048. this._standardKeyboardEventBrand = !0;
  4049. var t = e;
  4050. this.browserEvent = t, this.target = t.target, this.ctrlKey = t.ctrlKey, this.shiftKey = t.shiftKey, this.altKey = t.altKey, this.metaKey = t.metaKey, this.keyCode = function (e) {
  4051. if (e.charCode) {
  4052. var t = String.fromCharCode(e.charCode).toUpperCase();
  4053. return i.KeyCodeUtils.fromString(t)
  4054. }
  4055. return r[e.keyCode] || 0
  4056. }(t), this.code = t.code, this.ctrlKey = this.ctrlKey || 5 === this.keyCode, this.altKey = this.altKey || 6 === this.keyCode, this.shiftKey = this.shiftKey || 4 === this.keyCode, this.metaKey = this.metaKey || 57 === this.keyCode, this._asKeybinding = this._computeKeybinding(), this._asRuntimeKeybinding = this._computeRuntimeKeybinding()
  4057. }
  4058. return e.prototype.preventDefault = function () {
  4059. this.browserEvent && this.browserEvent.preventDefault && this.browserEvent.preventDefault()
  4060. },
  4061. e.prototype.stopPropagation = function () {
  4062. this.browserEvent && this.browserEvent.stopPropagation && this.browserEvent.stopPropagation()
  4063. }, e.prototype.toKeybinding = function () {
  4064. return this._asRuntimeKeybinding
  4065. }, e.prototype.equals = function (e) {
  4066. return this._asKeybinding === e
  4067. }, e.prototype._computeKeybinding = function () {
  4068. var e = 0;
  4069. 5 !== this.keyCode && 4 !== this.keyCode && 6 !== this.keyCode && 57 !== this.keyCode && (e = this.keyCode);
  4070. var t = 0;
  4071. return this.ctrlKey && (t |= a), this.altKey && (t |= 512), this.shiftKey && (t |= 1024), this.metaKey && (t |= l), t |= e
  4072. }, e.prototype._computeRuntimeKeybinding = function () {
  4073. var e = 0;
  4074. return 5 !== this.keyCode && 4 !== this.keyCode && 6 !== this.keyCode && 57 !== this.keyCode && (e = this.keyCode), new i.SimpleKeybinding(this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, e)
  4075. }, e
  4076. }();
  4077. t.StandardKeyboardEvent = u
  4078. })), define(n[45], i([0, 1, 24, 174, 16]), (function (e, t, n, i, o) {
  4079. "use strict";
  4080. Object.defineProperty(t, "__esModule", {value: !0});
  4081. var s = function () {
  4082. function e(e) {
  4083. this.timestamp = Date.now(), this.browserEvent = e, this.leftButton = 0 === e.button,
  4084. this.middleButton = 1 === e.button, this.rightButton = 2 === e.button, this.buttons = e.buttons, this.target = e.target, this.detail = e.detail || 1, "dblclick" === e.type && (this.detail = 2), this.ctrlKey = e.ctrlKey, this.shiftKey = e.shiftKey, this.altKey = e.altKey, this.metaKey = e.metaKey, "number" == typeof e.pageX ? (this.posx = e.pageX, this.posy = e.pageY) : (this.posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft, this.posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop);
  4085. var t = i.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self, e.view);
  4086. this.posx -= t.left, this.posy -= t.top
  4087. }
  4088. return e.prototype.preventDefault = function () {
  4089. this.browserEvent.preventDefault && this.browserEvent.preventDefault()
  4090. }, e.prototype.stopPropagation = function () {
  4091. this.browserEvent.stopPropagation && this.browserEvent.stopPropagation()
  4092. }, e
  4093. }();
  4094. t.StandardMouseEvent = s;
  4095. var a = function (e) {
  4096. function t(t) {
  4097. var n = e.call(this, t) || this;
  4098. return n.dataTransfer = t.dataTransfer, n
  4099. }
  4100. return r(t, e), t
  4101. }(s);
  4102. t.DragMouseEvent = a;
  4103. var l = function () {
  4104. function e(e, t, i) {
  4105. if (void 0 === t && (t = 0), void 0 === i && (i = 0), this.browserEvent = e || null, this.target = e ? e.target || e.targetNode || e.srcElement : null, this.deltaY = i, this.deltaX = t, e) {
  4106. var r = e, s = e;
  4107. if (void 0 !== r.wheelDeltaY) this.deltaY = r.wheelDeltaY / 120; else if (void 0 !== s.VERTICAL_AXIS && s.axis === s.VERTICAL_AXIS) this.deltaY = -s.detail / 3; else if ("wheel" === e.type) {
  4108. (a = e).deltaMode === a.DOM_DELTA_LINE ? this.deltaY = -e.deltaY : this.deltaY = -e.deltaY / 40
  4109. }
  4110. if (void 0 !== r.wheelDeltaX) n.isSafari && o.isWindows ? this.deltaX = -r.wheelDeltaX / 120 : this.deltaX = r.wheelDeltaX / 120; else if (void 0 !== s.HORIZONTAL_AXIS && s.axis === s.HORIZONTAL_AXIS) this.deltaX = -e.detail / 3; else if ("wheel" === e.type) {
  4111. var a;
  4112. (a = e).deltaMode === a.DOM_DELTA_LINE ? this.deltaX = -e.deltaX : this.deltaX = -e.deltaX / 40
  4113. }
  4114. 0 === this.deltaY && 0 === this.deltaX && e.wheelDelta && (this.deltaY = e.wheelDelta / 120)
  4115. }
  4116. }
  4117. return e.prototype.preventDefault = function () {
  4118. this.browserEvent && this.browserEvent.preventDefault && this.browserEvent.preventDefault()
  4119. }, e.prototype.stopPropagation = function () {
  4120. this.browserEvent && this.browserEvent.stopPropagation && this.browserEvent.stopPropagation()
  4121. }, e
  4122. }();
  4123. t.StandardWheelEvent = l
  4124. })), define(n[245], i([0, 1, 16]), (function (e, t, n) {
  4125. "use strict";
  4126. Object.defineProperty(t, "__esModule", {value: !0});
  4127. var i = "undefined" == typeof process ? {
  4128. cwd: function () {
  4129. return "/"
  4130. }, env: Object.create(null), get platform() {
  4131. return n.isWindows ? "win32" : n.isMacintosh ? "darwin" : "linux"
  4132. }, nextTick: function (e) {
  4133. return n.setImmediate(e)
  4134. }
  4135. } : process;
  4136. t.cwd = i.cwd, t.env = i.env, t.platform = i.platform
  4137. })), define(n[77], i([0, 1, 245]), (function (e, t, n) {
  4138. "use strict";
  4139. Object.defineProperty(t, "__esModule", {value: !0});
  4140. var i = 65, o = 97, s = 90, a = 122, l = 46, u = 47, d = 92, c = function (e) {
  4141. function t(t, n, i) {
  4142. var o, r = this;
  4143. "string" == typeof n && 0 === n.indexOf("not ") ? (o = "must not be", n = n.replace(/^not /, "")) : o = "must be";
  4144. var s = -1 !== t.indexOf(".") ? "property" : "argument",
  4145. a = 'The "' + t + '" ' + s + " " + o + " of type " + n;
  4146. return a += ". Received type " + typeof i, (r = e.call(this, a) || this).code = "ERR_INVALID_ARG_TYPE", r
  4147. }
  4148. return r(t, e), t
  4149. }(Error);
  4150. function h(e, t) {
  4151. if ("string" != typeof e) throw new c(t, "string", e)
  4152. }
  4153. function p(e) {
  4154. return e === u || e === d
  4155. }
  4156. function g(e) {
  4157. return e === u
  4158. }
  4159. function f(e) {
  4160. return e >= i && e <= s || e >= o && e <= a
  4161. }
  4162. function m(e, t, n, i) {
  4163. for (var o, r = "", s = 0, a = -1, d = 0, c = 0; c <= e.length; ++c) {
  4164. if (c < e.length) o = e.charCodeAt(c); else {
  4165. if (i(o)) break;
  4166. o = u
  4167. }
  4168. if (i(o)) {
  4169. if (a === c - 1 || 1 === d) ; else if (a !== c - 1 && 2 === d) {
  4170. if (r.length < 2 || 2 !== s || r.charCodeAt(r.length - 1) !== l || r.charCodeAt(r.length - 2) !== l) {
  4171. if (r.length > 2) {
  4172. var h = r.lastIndexOf(n);
  4173. -1 === h ? (r = "", s = 0) : s = (r = r.slice(0, h)).length - 1 - r.lastIndexOf(n), a = c, d = 0;
  4174. continue
  4175. }
  4176. if (2 === r.length || 1 === r.length) {
  4177. r = "", s = 0, a = c, d = 0;
  4178. continue
  4179. }
  4180. }
  4181. t && (r.length > 0 ? r += n + ".." : r = "..", s = 2)
  4182. } else r.length > 0 ? r += n + e.slice(a + 1, c) : r = e.slice(a + 1, c), s = c - a - 1;
  4183. a = c, d = 0
  4184. } else o === l && -1 !== d ? ++d : d = -1
  4185. }
  4186. return r
  4187. }
  4188. function v(e, t) {
  4189. var n = t.dir || t.root, i = t.base || (t.name || "") + (t.ext || "");
  4190. return n ? n === t.root ? n + i : n + e + i : i
  4191. }
  4192. t.win32 = {
  4193. resolve: function () {
  4194. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  4195. for (var i = "", o = "", r = !1, s = e.length - 1; s >= -1; s--) {
  4196. var a = void 0
  4197. ;
  4198. if (s >= 0 ? a = e[s] : i ? void 0 !== (a = n.env["=" + i] || n.cwd()) && a.slice(0, 3).toLowerCase() === i.toLowerCase() + "\\" || (a = i + "\\") : a = n.cwd(), h(a, "path"), 0 !== a.length) {
  4199. var l = a.length, u = 0, d = "", c = !1, g = a.charCodeAt(0);
  4200. if (l > 1) if (p(g)) if (c = !0, p(a.charCodeAt(1))) {
  4201. for (var v = 2, _ = v; v < l && !p(a.charCodeAt(v)); ++v) ;
  4202. if (v < l && v !== _) {
  4203. var y = a.slice(_, v);
  4204. for (_ = v; v < l && p(a.charCodeAt(v)); ++v) ;
  4205. if (v < l && v !== _) {
  4206. for (_ = v; v < l && !p(a.charCodeAt(v)); ++v) ;
  4207. v === l ? (d = "\\\\" + y + "\\" + a.slice(_), u = v) : v !== _ && (d = "\\\\" + y + "\\" + a.slice(_, v), u = v)
  4208. }
  4209. }
  4210. } else u = 1; else f(g) && 58 === a.charCodeAt(1) && (d = a.slice(0, 2), u = 2, l > 2 && p(a.charCodeAt(2)) && (c = !0, u = 3)); else p(g) && (u = 1, c = !0);
  4211. if (!(d.length > 0 && i.length > 0 && d.toLowerCase() !== i.toLowerCase()) && (0 === i.length && d.length > 0 && (i = d), r || (o = a.slice(u) + "\\" + o, r = c), i.length > 0 && r)) break
  4212. }
  4213. }
  4214. return i + (r ? "\\" : "") + (o = m(o, !r, "\\", p)) || "."
  4215. }, normalize: function (e) {
  4216. h(e, "path");
  4217. var t = e.length;
  4218. if (0 === t) return ".";
  4219. var n, i, o = 0, r = !1, s = e.charCodeAt(0);
  4220. if (t > 1) if (p(s)) if (r = !0, p(e.charCodeAt(1))) {
  4221. for (var a = 2, l = a; a < t && !p(e.charCodeAt(a)); ++a) ;
  4222. if (a < t && a !== l) {
  4223. var u = e.slice(l, a);
  4224. for (l = a; a < t && p(e.charCodeAt(a)); ++a) ;
  4225. if (a < t && a !== l) {
  4226. for (l = a; a < t && !p(e.charCodeAt(a)); ++a) ;
  4227. if (a === t) return "\\\\" + u + "\\" + e.slice(l) + "\\";
  4228. a !== l && (n = "\\\\" + u + "\\" + e.slice(l, a), o = a)
  4229. }
  4230. }
  4231. } else o = 1; else f(s) && 58 === e.charCodeAt(1) && (n = e.slice(0, 2), o = 2, t > 2 && p(e.charCodeAt(2)) && (r = !0, o = 3)); else if (p(s)) return "\\";
  4232. return 0 !== (i = o < t ? m(e.slice(o), !r, "\\", p) : "").length || r || (i = "."), i.length > 0 && p(e.charCodeAt(t - 1)) && (i += "\\"), void 0 === n ? r ? i.length > 0 ? "\\" + i : "\\" : i.length > 0 ? i : "" : r ? i.length > 0 ? n + "\\" + i : n + "\\" : i.length > 0 ? n + i : n
  4233. }, isAbsolute: function (e) {
  4234. h(e, "path");
  4235. var t = e.length;
  4236. if (0 === t) return !1;
  4237. var n = e.charCodeAt(0);
  4238. return !!p(n) || !!(f(n) && t > 2 && 58 === e.charCodeAt(1) && p(e.charCodeAt(2)))
  4239. }, join: function () {
  4240. for (var e, n, i = [], o = 0; o < arguments.length; o++) i[o] = arguments[o];
  4241. if (0 === i.length) return ".";
  4242. for (var r = 0; r < i.length; ++r) {
  4243. var s = i[r];
  4244. h(s, "path"), s.length > 0 && (void 0 === e ? e = n = s : e += "\\" + s)
  4245. }
  4246. if (void 0 === e) return ".";
  4247. var a = !0, l = 0;
  4248. if ("string" == typeof n && p(n.charCodeAt(0))) {
  4249. ++l;
  4250. var u = n.length;
  4251. u > 1 && p(n.charCodeAt(1)) && (++l,
  4252. u > 2 && (p(n.charCodeAt(2)) ? ++l : a = !1))
  4253. }
  4254. if (a) {
  4255. for (; l < e.length && p(e.charCodeAt(l)); ++l) ;
  4256. l >= 2 && (e = "\\" + e.slice(l))
  4257. }
  4258. return t.win32.normalize(e)
  4259. }, relative: function (e, n) {
  4260. if (h(e, "from"), h(n, "to"), e === n) return "";
  4261. var i = t.win32.resolve(e), o = t.win32.resolve(n);
  4262. if (i === o) return "";
  4263. if ((e = i.toLowerCase()) === (n = o.toLowerCase())) return "";
  4264. for (var r = 0; r < e.length && e.charCodeAt(r) === d; ++r) ;
  4265. for (var s = e.length; s - 1 > r && e.charCodeAt(s - 1) === d; --s) ;
  4266. for (var a = s - r, l = 0; l < n.length && n.charCodeAt(l) === d; ++l) ;
  4267. for (var u = n.length; u - 1 > l && n.charCodeAt(u - 1) === d; --u) ;
  4268. for (var c = u - l, p = a < c ? a : c, g = -1, f = 0; f <= p; ++f) {
  4269. if (f === p) {
  4270. if (c > p) {
  4271. if (n.charCodeAt(l + f) === d) return o.slice(l + f + 1);
  4272. if (2 === f) return o.slice(l + f)
  4273. }
  4274. a > p && (e.charCodeAt(r + f) === d ? g = f : 2 === f && (g = 3));
  4275. break
  4276. }
  4277. var m = e.charCodeAt(r + f);
  4278. if (m !== n.charCodeAt(l + f)) break;
  4279. m === d && (g = f)
  4280. }
  4281. if (f !== p && -1 === g) return o;
  4282. var v = "";
  4283. for (-1 === g && (g = 0), f = r + g + 1; f <= s; ++f) f !== s && e.charCodeAt(f) !== d || (0 === v.length ? v += ".." : v += "\\..");
  4284. return v.length > 0 ? v + o.slice(l + g, u) : (l += g, o.charCodeAt(l) === d && ++l, o.slice(l, u))
  4285. },
  4286. toNamespacedPath: function (e) {
  4287. if ("string" != typeof e) return e;
  4288. if (0 === e.length) return "";
  4289. var n = t.win32.resolve(e);
  4290. if (n.length >= 3) if (n.charCodeAt(0) === d) {
  4291. if (n.charCodeAt(1) === d) {
  4292. var i = n.charCodeAt(2);
  4293. if (63 !== i && i !== l) return "\\\\?\\UNC\\" + n.slice(2)
  4294. }
  4295. } else if (f(n.charCodeAt(0)) && 58 === n.charCodeAt(1) && n.charCodeAt(2) === d) return "\\\\?\\" + n;
  4296. return e
  4297. }, dirname: function (e) {
  4298. h(e, "path");
  4299. var t = e.length;
  4300. if (0 === t) return ".";
  4301. var n = -1, i = -1, o = !0, r = 0, s = e.charCodeAt(0);
  4302. if (t > 1) if (p(s)) {
  4303. if (n = r = 1, p(e.charCodeAt(1))) {
  4304. for (var a = 2, l = a; a < t && !p(e.charCodeAt(a)); ++a) ;
  4305. if (a < t && a !== l) {
  4306. for (l = a; a < t && p(e.charCodeAt(a)); ++a) ;
  4307. if (a < t && a !== l) {
  4308. for (l = a; a < t && !p(e.charCodeAt(a)); ++a) ;
  4309. if (a === t) return e;
  4310. a !== l && (n = r = a + 1)
  4311. }
  4312. }
  4313. }
  4314. } else f(s) && 58 === e.charCodeAt(1) && (n = r = 2, t > 2 && p(e.charCodeAt(2)) && (n = r = 3)); else if (p(s)) return e;
  4315. for (var u = t - 1; u >= r; --u) if (p(e.charCodeAt(u))) {
  4316. if (!o) {
  4317. i = u;
  4318. break
  4319. }
  4320. } else o = !1;
  4321. if (-1 === i) {
  4322. if (-1 === n) return ".";
  4323. i = n
  4324. }
  4325. return e.slice(0, i)
  4326. }, basename: function (e, t) {
  4327. void 0 !== t && h(t, "ext"), h(e, "path");
  4328. var n, i = 0, o = -1, r = !0
  4329. ;e.length >= 2 && (f(e.charCodeAt(0)) && 58 === e.charCodeAt(1) && (i = 2));
  4330. if (void 0 !== t && t.length > 0 && t.length <= e.length) {
  4331. if (t.length === e.length && t === e) return "";
  4332. var s = t.length - 1, a = -1;
  4333. for (n = e.length - 1; n >= i; --n) {
  4334. var l = e.charCodeAt(n);
  4335. if (p(l)) {
  4336. if (!r) {
  4337. i = n + 1;
  4338. break
  4339. }
  4340. } else -1 === a && (r = !1, a = n + 1), s >= 0 && (l === t.charCodeAt(s) ? -1 == --s && (o = n) : (s = -1, o = a))
  4341. }
  4342. return i === o ? o = a : -1 === o && (o = e.length), e.slice(i, o)
  4343. }
  4344. for (n = e.length - 1; n >= i; --n) if (p(e.charCodeAt(n))) {
  4345. if (!r) {
  4346. i = n + 1;
  4347. break
  4348. }
  4349. } else -1 === o && (r = !1, o = n + 1);
  4350. return -1 === o ? "" : e.slice(i, o)
  4351. }, extname: function (e) {
  4352. h(e, "path");
  4353. var t = 0, n = -1, i = 0, o = -1, r = !0, s = 0;
  4354. e.length >= 2 && 58 === e.charCodeAt(1) && f(e.charCodeAt(0)) && (t = i = 2);
  4355. for (var a = e.length - 1; a >= t; --a) {
  4356. var u = e.charCodeAt(a);
  4357. if (p(u)) {
  4358. if (!r) {
  4359. i = a + 1;
  4360. break
  4361. }
  4362. } else -1 === o && (r = !1, o = a + 1), u === l ? -1 === n ? n = a : 1 !== s && (s = 1) : -1 !== n && (s = -1)
  4363. }
  4364. return -1 === n || -1 === o || 0 === s || 1 === s && n === o - 1 && n === i + 1 ? "" : e.slice(n, o)
  4365. }, format: function (e) {
  4366. if (null === e || "object" != typeof e) throw new c("pathObject", "Object", e);
  4367. return v("\\", e)
  4368. }, parse: function (e) {
  4369. h(e, "path");
  4370. var t = {
  4371. root: "", dir: "", base: "",
  4372. ext: "", name: ""
  4373. };
  4374. if (0 === e.length) return t;
  4375. var n = e.length, i = 0, o = e.charCodeAt(0);
  4376. if (n > 1) {
  4377. if (p(o)) {
  4378. if (i = 1, p(e.charCodeAt(1))) {
  4379. for (var r = 2, s = r; r < n && !p(e.charCodeAt(r)); ++r) ;
  4380. if (r < n && r !== s) {
  4381. for (s = r; r < n && p(e.charCodeAt(r)); ++r) ;
  4382. if (r < n && r !== s) {
  4383. for (s = r; r < n && !p(e.charCodeAt(r)); ++r) ;
  4384. r === n ? i = r : r !== s && (i = r + 1)
  4385. }
  4386. }
  4387. }
  4388. } else if (f(o) && 58 === e.charCodeAt(1)) {
  4389. if (i = 2, !(n > 2)) return t.root = t.dir = e, t;
  4390. if (p(e.charCodeAt(2))) {
  4391. if (3 === n) return t.root = t.dir = e, t;
  4392. i = 3
  4393. }
  4394. }
  4395. } else if (p(o)) return t.root = t.dir = e, t;
  4396. i > 0 && (t.root = e.slice(0, i));
  4397. for (var a = -1, u = i, d = -1, c = !0, g = e.length - 1, m = 0; g >= i; --g) if (p(o = e.charCodeAt(g))) {
  4398. if (!c) {
  4399. u = g + 1;
  4400. break
  4401. }
  4402. } else -1 === d && (c = !1, d = g + 1), o === l ? -1 === a ? a = g : 1 !== m && (m = 1) : -1 !== a && (m = -1);
  4403. return -1 === a || -1 === d || 0 === m || 1 === m && a === d - 1 && a === u + 1 ? -1 !== d && (t.base = t.name = e.slice(u, d)) : (t.name = e.slice(u, a), t.base = e.slice(u, d), t.ext = e.slice(a, d)), t.dir = u > 0 && u !== i ? e.slice(0, u - 1) : t.root, t
  4404. }, sep: "\\", delimiter: ";", win32: null, posix: null
  4405. }, t.posix = {
  4406. resolve: function () {
  4407. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]
  4408. ;
  4409. for (var i = "", o = !1, r = e.length - 1; r >= -1 && !o; r--) {
  4410. var s = void 0;
  4411. h(s = r >= 0 ? e[r] : n.cwd(), "path"), 0 !== s.length && (i = s + "/" + i, o = s.charCodeAt(0) === u)
  4412. }
  4413. return i = m(i, !o, "/", g), o ? i.length > 0 ? "/" + i : "/" : i.length > 0 ? i : "."
  4414. }, normalize: function (e) {
  4415. if (h(e, "path"), 0 === e.length) return ".";
  4416. var t = e.charCodeAt(0) === u, n = e.charCodeAt(e.length - 1) === u;
  4417. return 0 !== (e = m(e, !t, "/", g)).length || t || (e = "."), e.length > 0 && n && (e += "/"), t ? "/" + e : e
  4418. }, isAbsolute: function (e) {
  4419. return h(e, "path"), e.length > 0 && e.charCodeAt(0) === u
  4420. }, join: function () {
  4421. for (var e, n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
  4422. if (0 === n.length) return ".";
  4423. for (var o = 0; o < n.length; ++o) {
  4424. var r = arguments[o];
  4425. h(r, "path"), r.length > 0 && (void 0 === e ? e = r : e += "/" + r)
  4426. }
  4427. return void 0 === e ? "." : t.posix.normalize(e)
  4428. }, relative: function (e, n) {
  4429. if (h(e, "from"), h(n, "to"), e === n) return "";
  4430. if ((e = t.posix.resolve(e)) === (n = t.posix.resolve(n))) return "";
  4431. for (var i = 1; i < e.length && e.charCodeAt(i) === u; ++i) ;
  4432. for (var o = e.length, r = o - i, s = 1; s < n.length && n.charCodeAt(s) === u; ++s) ;
  4433. for (var a = n.length - s, l = r < a ? r : a, d = -1, c = 0; c <= l; ++c) {
  4434. if (c === l) {
  4435. if (a > l) {
  4436. if (n.charCodeAt(s + c) === u) return n.slice(s + c + 1);
  4437. if (0 === c) return n.slice(s + c)
  4438. } else r > l && (e.charCodeAt(i + c) === u ? d = c : 0 === c && (d = 0));
  4439. break
  4440. }
  4441. var p = e.charCodeAt(i + c);
  4442. if (p !== n.charCodeAt(s + c)) break;
  4443. p === u && (d = c)
  4444. }
  4445. var g = "";
  4446. for (c = i + d + 1; c <= o; ++c) c !== o && e.charCodeAt(c) !== u || (0 === g.length ? g += ".." : g += "/..");
  4447. return g.length > 0 ? g + n.slice(s + d) : (s += d, n.charCodeAt(s) === u && ++s, n.slice(s))
  4448. }, toNamespacedPath: function (e) {
  4449. return e
  4450. }, dirname: function (e) {
  4451. if (h(e, "path"), 0 === e.length) return ".";
  4452. for (var t = e.charCodeAt(0) === u, n = -1, i = !0, o = e.length - 1; o >= 1; --o) if (e.charCodeAt(o) === u) {
  4453. if (!i) {
  4454. n = o;
  4455. break
  4456. }
  4457. } else i = !1;
  4458. return -1 === n ? t ? "/" : "." : t && 1 === n ? "//" : e.slice(0, n)
  4459. }, basename: function (e, t) {
  4460. void 0 !== t && h(t, "ext"), h(e, "path");
  4461. var n, i = 0, o = -1, r = !0;
  4462. if (void 0 !== t && t.length > 0 && t.length <= e.length) {
  4463. if (t.length === e.length && t === e) return "";
  4464. var s = t.length - 1, a = -1;
  4465. for (n = e.length - 1; n >= 0; --n) {
  4466. var l = e.charCodeAt(n);
  4467. if (l === u) {
  4468. if (!r) {
  4469. i = n + 1;
  4470. break
  4471. }
  4472. } else -1 === a && (r = !1, a = n + 1), s >= 0 && (l === t.charCodeAt(s) ? -1 == --s && (o = n) : (s = -1, o = a))
  4473. }
  4474. return i === o ? o = a : -1 === o && (o = e.length),
  4475. e.slice(i, o)
  4476. }
  4477. for (n = e.length - 1; n >= 0; --n) if (e.charCodeAt(n) === u) {
  4478. if (!r) {
  4479. i = n + 1;
  4480. break
  4481. }
  4482. } else -1 === o && (r = !1, o = n + 1);
  4483. return -1 === o ? "" : e.slice(i, o)
  4484. }, extname: function (e) {
  4485. h(e, "path");
  4486. for (var t = -1, n = 0, i = -1, o = !0, r = 0, s = e.length - 1; s >= 0; --s) {
  4487. var a = e.charCodeAt(s);
  4488. if (a !== u) -1 === i && (o = !1, i = s + 1), a === l ? -1 === t ? t = s : 1 !== r && (r = 1) : -1 !== t && (r = -1); else if (!o) {
  4489. n = s + 1;
  4490. break
  4491. }
  4492. }
  4493. return -1 === t || -1 === i || 0 === r || 1 === r && t === i - 1 && t === n + 1 ? "" : e.slice(t, i)
  4494. }, format: function (e) {
  4495. if (null === e || "object" != typeof e) throw new c("pathObject", "Object", e);
  4496. return v("/", e)
  4497. }, parse: function (e) {
  4498. h(e, "path");
  4499. var t = {root: "", dir: "", base: "", ext: "", name: ""};
  4500. if (0 === e.length) return t;
  4501. var n, i = e.charCodeAt(0) === u;
  4502. i ? (t.root = "/", n = 1) : n = 0;
  4503. for (var o = -1, r = 0, s = -1, a = !0, d = e.length - 1, c = 0; d >= n; --d) {
  4504. var p = e.charCodeAt(d);
  4505. if (p !== u) -1 === s && (a = !1, s = d + 1), p === l ? -1 === o ? o = d : 1 !== c && (c = 1) : -1 !== o && (c = -1); else if (!a) {
  4506. r = d + 1;
  4507. break
  4508. }
  4509. }
  4510. return -1 === o || -1 === s || 0 === c || 1 === c && o === s - 1 && o === r + 1 ? -1 !== s && (t.base = t.name = 0 === r && i ? e.slice(1, s) : e.slice(r, s)) : (0 === r && i ? (t.name = e.slice(1, o),
  4511. t.base = e.slice(1, s)) : (t.name = e.slice(r, o), t.base = e.slice(r, s)), t.ext = e.slice(o, s)), r > 0 ? t.dir = e.slice(0, r - 1) : i && (t.dir = "/"), t
  4512. }, sep: "/", delimiter: ":", win32: null, posix: null
  4513. }, t.posix.win32 = t.win32.win32 = t.win32, t.posix.posix = t.win32.posix = t.posix, t.normalize = "win32" === n.platform ? t.win32.normalize : t.posix.normalize, t.join = "win32" === n.platform ? t.win32.join : t.posix.join, t.relative = "win32" === n.platform ? t.win32.relative : t.posix.relative, t.dirname = "win32" === n.platform ? t.win32.dirname : t.posix.dirname, t.basename = "win32" === n.platform ? t.win32.basename : t.posix.basename, t.extname = "win32" === n.platform ? t.win32.extname : t.posix.extname, t.sep = "win32" === n.platform ? t.win32.sep : t.posix.sep
  4514. })), define(n[103], i([0, 1]), (function (e, t) {
  4515. "use strict";
  4516. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  4517. function t(e, t) {
  4518. if (e.start >= t.end || t.start >= e.end) return {start: 0, end: 0};
  4519. var n = Math.max(e.start, t.start), i = Math.min(e.end, t.end);
  4520. return i - n <= 0 ? {start: 0, end: 0} : {start: n, end: i}
  4521. }
  4522. function n(e) {
  4523. return e.end - e.start <= 0
  4524. }
  4525. e.intersect = t,
  4526. e.isEmpty = n, e.intersects = function (e, i) {
  4527. return !n(t(e, i))
  4528. }, e.relativeComplement = function (e, t) {
  4529. var i = [], o = {start: e.start, end: Math.min(t.start, e.end)},
  4530. r = {start: Math.max(t.end, e.start), end: e.end};
  4531. return n(o) || i.push(o), n(r) || i.push(r), i
  4532. }
  4533. }(t.Range || (t.Range = {}))
  4534. })), define(n[246], i([0, 1, 103]), (function (e, t, n) {
  4535. "use strict";
  4536. function i(e, t) {
  4537. for (var i = [], o = 0, r = t; o < r.length; o++) {
  4538. var s = r[o];
  4539. if (!(e.start >= s.range.end)) {
  4540. if (e.end < s.range.start) break;
  4541. var a = n.Range.intersect(e, s.range);
  4542. n.Range.isEmpty(a) || i.push({range: a, size: s.size})
  4543. }
  4544. }
  4545. return i
  4546. }
  4547. function o(e, t) {
  4548. return {start: e.start + t, end: e.end + t}
  4549. }
  4550. function r(e) {
  4551. for (var t = [], n = null, i = 0, o = e; i < o.length; i++) {
  4552. var r = o[i], s = r.range.start, a = r.range.end, l = r.size;
  4553. n && l === n.size ? n.range.end = a : (n = {range: {start: s, end: a}, size: l}, t.push(n))
  4554. }
  4555. return t
  4556. }
  4557. Object.defineProperty(t, "__esModule", {value: !0}), t.groupIntersect = i, t.shift = o, t.consolidate = r;
  4558. var s = function () {
  4559. function e() {
  4560. this.groups = [], this._size = 0
  4561. }
  4562. return e.prototype.splice = function (e, t, n) {
  4563. void 0 === n && (n = []);
  4564. var s = n.length - t, a = i({
  4565. start: 0, end: e
  4566. }, this.groups), l = i({start: e + t, end: Number.POSITIVE_INFINITY}, this.groups).map((function (e) {
  4567. return {range: o(e.range, s), size: e.size}
  4568. })), u = n.map((function (t, n) {
  4569. return {range: {start: e + n, end: e + n + 1}, size: t.size}
  4570. }));
  4571. this.groups = function () {
  4572. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  4573. return r(e.reduce((function (e, t) {
  4574. return e.concat(t)
  4575. }), []))
  4576. }(a, u, l), this._size = this.groups.reduce((function (e, t) {
  4577. return e + t.size * (t.range.end - t.range.start)
  4578. }), 0)
  4579. }, Object.defineProperty(e.prototype, "count", {
  4580. get: function () {
  4581. var e = this.groups.length;
  4582. return e ? this.groups[e - 1].range.end : 0
  4583. }, enumerable: !0, configurable: !0
  4584. }), Object.defineProperty(e.prototype, "size", {
  4585. get: function () {
  4586. return this._size
  4587. }, enumerable: !0, configurable: !0
  4588. }), e.prototype.indexAt = function (e) {
  4589. if (e < 0) return -1;
  4590. for (var t = 0, n = 0, i = 0, o = this.groups; i < o.length; i++) {
  4591. var r = o[i], s = r.range.end - r.range.start, a = n + s * r.size;
  4592. if (e < a) return t + Math.floor((e - n) / r.size);
  4593. t += s, n = a
  4594. }
  4595. return t
  4596. }, e.prototype.indexAfter = function (e) {
  4597. return Math.min(this.indexAt(e) + 1, this.count)
  4598. },
  4599. e.prototype.positionAt = function (e) {
  4600. if (e < 0) return -1;
  4601. for (var t = 0, n = 0, i = 0, o = this.groups; i < o.length; i++) {
  4602. var r = o[i], s = r.range.end - r.range.start, a = n + s;
  4603. if (e < a) return t + (e - n) * r.size;
  4604. t += s * r.size, n = a
  4605. }
  4606. return -1
  4607. }, e
  4608. }();
  4609. t.RangeMap = s
  4610. })), define(n[176], i([0, 1, 4, 2]), (function (e, t, n, i) {
  4611. "use strict";
  4612. Object.defineProperty(t, "__esModule", {value: !0});
  4613. var o = function () {
  4614. function e(e, t, n, i, o, r) {
  4615. (e |= 0) < 0 && (e = 0), (n |= 0) + e > (t |= 0) && (n = t - e), n < 0 && (n = 0), (i |= 0) < 0 && (i = 0), (r |= 0) + i > (o |= 0) && (r = o - i), r < 0 && (r = 0), this.width = e, this.scrollWidth = t, this.scrollLeft = n, this.height = i, this.scrollHeight = o, this.scrollTop = r
  4616. }
  4617. return e.prototype.equals = function (e) {
  4618. return this.width === e.width && this.scrollWidth === e.scrollWidth && this.scrollLeft === e.scrollLeft && this.height === e.height && this.scrollHeight === e.scrollHeight && this.scrollTop === e.scrollTop
  4619. }, e.prototype.withScrollDimensions = function (t) {
  4620. return new e(void 0 !== t.width ? t.width : this.width, void 0 !== t.scrollWidth ? t.scrollWidth : this.scrollWidth, this.scrollLeft, void 0 !== t.height ? t.height : this.height, void 0 !== t.scrollHeight ? t.scrollHeight : this.scrollHeight, this.scrollTop)
  4621. }, e.prototype.withScrollPosition = function (t) {
  4622. return new e(this.width, this.scrollWidth, void 0 !== t.scrollLeft ? t.scrollLeft : this.scrollLeft, this.height, this.scrollHeight, void 0 !== t.scrollTop ? t.scrollTop : this.scrollTop)
  4623. }, e.prototype.createScrollEvent = function (e) {
  4624. var t = this.width !== e.width, n = this.scrollWidth !== e.scrollWidth,
  4625. i = this.scrollLeft !== e.scrollLeft, o = this.height !== e.height,
  4626. r = this.scrollHeight !== e.scrollHeight, s = this.scrollTop !== e.scrollTop;
  4627. return {
  4628. width: this.width,
  4629. scrollWidth: this.scrollWidth,
  4630. scrollLeft: this.scrollLeft,
  4631. height: this.height,
  4632. scrollHeight: this.scrollHeight,
  4633. scrollTop: this.scrollTop,
  4634. widthChanged: t,
  4635. scrollWidthChanged: n,
  4636. scrollLeftChanged: i,
  4637. heightChanged: o,
  4638. scrollHeightChanged: r,
  4639. scrollTopChanged: s
  4640. }
  4641. }, e
  4642. }();
  4643. t.ScrollState = o;
  4644. var s = function (e) {
  4645. function t(t, i) {
  4646. var r = e.call(this) || this;
  4647. return r._onScroll = r._register(new n.Emitter), r.onScroll = r._onScroll.event, r._smoothScrollDuration = t, r._scheduleAtNextAnimationFrame = i, r._state = new o(0, 0, 0, 0, 0, 0), r._smoothScrolling = null, r
  4648. }
  4649. return r(t, e), t.prototype.dispose = function () {
  4650. this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = null), e.prototype.dispose.call(this)
  4651. }, t.prototype.setSmoothScrollDuration = function (e) {
  4652. this._smoothScrollDuration = e
  4653. }, t.prototype.validateScrollPosition = function (e) {
  4654. return this._state.withScrollPosition(e)
  4655. }, t.prototype.getScrollDimensions = function () {
  4656. return this._state
  4657. }, t.prototype.setScrollDimensions = function (e) {
  4658. var t = this._state.withScrollDimensions(e);
  4659. this._setState(t), this._smoothScrolling && this._smoothScrolling.acceptScrollDimensions(this._state)
  4660. }, t.prototype.getFutureScrollPosition = function () {
  4661. return this._smoothScrolling ? this._smoothScrolling.to : this._state
  4662. }, t.prototype.getCurrentScrollPosition = function () {
  4663. return this._state
  4664. }, t.prototype.setScrollPositionNow = function (e) {
  4665. var t = this._state.withScrollPosition(e);
  4666. this._smoothScrolling && (this._smoothScrolling.dispose(), this._smoothScrolling = null), this._setState(t)
  4667. }, t.prototype.setScrollPositionSmooth = function (e) {
  4668. var t = this;
  4669. if (0 === this._smoothScrollDuration) return this.setScrollPositionNow(e);
  4670. if (this._smoothScrolling) {
  4671. e = {
  4672. scrollLeft: void 0 === e.scrollLeft ? this._smoothScrolling.to.scrollLeft : e.scrollLeft,
  4673. scrollTop: void 0 === e.scrollTop ? this._smoothScrolling.to.scrollTop : e.scrollTop
  4674. };
  4675. var n = this._state.withScrollPosition(e);
  4676. if (this._smoothScrolling.to.scrollLeft === n.scrollLeft && this._smoothScrolling.to.scrollTop === n.scrollTop) return;
  4677. var i = this._smoothScrolling.combine(this._state, n, this._smoothScrollDuration);
  4678. this._smoothScrolling.dispose(), this._smoothScrolling = i
  4679. } else {
  4680. n = this._state.withScrollPosition(e);
  4681. this._smoothScrolling = u.start(this._state, n, this._smoothScrollDuration)
  4682. }
  4683. this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame((function () {
  4684. t._smoothScrolling && (t._smoothScrolling.animationFrameDisposable = null,
  4685. t._performSmoothScrolling())
  4686. }))
  4687. }, t.prototype._performSmoothScrolling = function () {
  4688. var e = this;
  4689. if (this._smoothScrolling) {
  4690. var t = this._smoothScrolling.tick(), n = this._state.withScrollPosition(t);
  4691. if (this._setState(n), t.isDone) return this._smoothScrolling.dispose(), void (this._smoothScrolling = null);
  4692. this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame((function () {
  4693. e._smoothScrolling && (e._smoothScrolling.animationFrameDisposable = null, e._performSmoothScrolling())
  4694. }))
  4695. }
  4696. }, t.prototype._setState = function (e) {
  4697. var t = this._state;
  4698. t.equals(e) || (this._state = e, this._onScroll.fire(this._state.createScrollEvent(t)))
  4699. }, t
  4700. }(i.Disposable);
  4701. t.Scrollable = s;
  4702. var a = function (e, t, n) {
  4703. this.scrollLeft = e, this.scrollTop = t, this.isDone = n
  4704. };
  4705. function l(e, t) {
  4706. var n = t - e;
  4707. return function (t) {
  4708. return e + n * (1 - function (e) {
  4709. return Math.pow(e, 3)
  4710. }(1 - t))
  4711. }
  4712. }
  4713. t.SmoothScrollingUpdate = a;
  4714. var u = function () {
  4715. function e(e, t, n, i) {
  4716. this.from = e, this.to = t, this.duration = i, this._startTime = n, this.animationFrameDisposable = null, this._initAnimations()
  4717. }
  4718. return e.prototype._initAnimations = function () {
  4719. this.scrollLeft = this._initAnimation(this.from.scrollLeft, this.to.scrollLeft, this.to.width), this.scrollTop = this._initAnimation(this.from.scrollTop, this.to.scrollTop, this.to.height)
  4720. }, e.prototype._initAnimation = function (e, t, n) {
  4721. var i, o, r;
  4722. if (Math.abs(e - t) > 2.5 * n) {
  4723. var s = void 0, a = void 0;
  4724. return e < t ? (s = e + .75 * n, a = t - .75 * n) : (s = e - .75 * n, a = t + .75 * n), i = l(e, s), o = l(a, t), r = .33, function (e) {
  4725. return e < r ? i(e / r) : o((e - r) / (1 - r))
  4726. }
  4727. }
  4728. return l(e, t)
  4729. }, e.prototype.dispose = function () {
  4730. null !== this.animationFrameDisposable && (this.animationFrameDisposable.dispose(), this.animationFrameDisposable = null)
  4731. }, e.prototype.acceptScrollDimensions = function (e) {
  4732. this.to = e.withScrollPosition(this.to), this._initAnimations()
  4733. }, e.prototype.tick = function () {
  4734. return this._tick(Date.now())
  4735. }, e.prototype._tick = function (e) {
  4736. var t = (e - this._startTime) / this.duration;
  4737. if (t < 1) {
  4738. var n = this.scrollLeft(t), i = this.scrollTop(t);
  4739. return new a(n, i, !1)
  4740. }
  4741. return new a(this.to.scrollLeft, this.to.scrollTop, !0)
  4742. }, e.prototype.combine = function (t, n, i) {
  4743. return e.start(t, n, i)
  4744. }, e.start = function (t, n, i) {
  4745. return i += 10, new e(t, n, Date.now() - 10, i)
  4746. }, e
  4747. }();
  4748. t.SmoothScrollingOperation = u
  4749. })), define(n[132], i([0, 1, 16]), (function (e, t, n) {
  4750. "use strict";
  4751. Object.defineProperty(t, "__esModule", {value: !0});
  4752. var i = n.globals.performance && "function" == typeof n.globals.performance.now, o = function () {
  4753. function e(e) {
  4754. this._highResolution = i && e, this._startTime = this._now(), this._stopTime = -1
  4755. }
  4756. return e.create = function (t) {
  4757. return void 0 === t && (t = !0), new e(t)
  4758. }, e.prototype.stop = function () {
  4759. this._stopTime = this._now()
  4760. }, e.prototype.elapsed = function () {
  4761. return -1 !== this._stopTime ? this._stopTime - this._startTime : this._now() - this._startTime
  4762. }, e.prototype._now = function () {
  4763. return this._highResolution ? n.globals.performance.now() : (new Date).getTime()
  4764. }, e
  4765. }();
  4766. t.StopWatch = o
  4767. })), define(n[5], i([0, 1]), (function (e, t) {
  4768. "use strict";
  4769. Object.defineProperty(t, "__esModule", {value: !0}), t.isFalsyOrWhitespace = function (e) {
  4770. return !e || "string" != typeof e || 0 === e.trim().length
  4771. }, t.pad = function (e, t, n) {
  4772. void 0 === n && (n = "0")
  4773. ;
  4774. for (var i = "" + e, o = [i], r = i.length; r < t; r++) o.push(n);
  4775. return o.reverse().join("")
  4776. };
  4777. var n = /{(\d+)}/g;
  4778. function i(e) {
  4779. return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&")
  4780. }
  4781. function o(e, t) {
  4782. if (!e || !t) return e;
  4783. var n = t.length;
  4784. if (0 === n || 0 === e.length) return e;
  4785. for (var i = 0; e.indexOf(t, i) === i;) i += n;
  4786. return e.substring(i)
  4787. }
  4788. function r(e, t) {
  4789. if (!e || !t) return e;
  4790. var n = t.length, i = e.length;
  4791. if (0 === n || 0 === i) return e;
  4792. for (var o = i, r = -1; -1 !== (r = e.lastIndexOf(t, o - 1)) && r + n === o;) {
  4793. if (0 === r) return "";
  4794. o = r
  4795. }
  4796. return e.substring(0, o)
  4797. }
  4798. function s(e, t) {
  4799. return e < t ? -1 : e > t ? 1 : 0
  4800. }
  4801. function a(e) {
  4802. return e >= 97 && e <= 122
  4803. }
  4804. function l(e) {
  4805. return e >= 65 && e <= 90
  4806. }
  4807. function u(e) {
  4808. return a(e) || l(e)
  4809. }
  4810. function d(e, t, n) {
  4811. void 0 === n && (n = e.length);
  4812. for (var i = 0; i < n; i++) {
  4813. var o = e.charCodeAt(i), r = t.charCodeAt(i);
  4814. if (o !== r) if (u(o) && u(r)) {
  4815. var s = Math.abs(o - r);
  4816. if (0 !== s && 32 !== s) return !1
  4817. } else if (String.fromCharCode(o).toLowerCase() !== String.fromCharCode(r).toLowerCase()) return !1
  4818. }
  4819. return !0
  4820. }
  4821. function c(e) {
  4822. return 55296 <= e && e <= 56319
  4823. }
  4824. function h(e) {
  4825. return 56320 <= e && e <= 57343
  4826. }
  4827. function p(e, t, n) {
  4828. var i = e.charCodeAt(n);
  4829. if (c(i) && n + 1 < t) {
  4830. var o = e.charCodeAt(n + 1);
  4831. if (h(o)) return o - 56320 + (i - 55296 << 10) + 65536
  4832. }
  4833. return i
  4834. }
  4835. function g(e, t) {
  4836. var n = e.charCodeAt(t - 1);
  4837. if (h(n) && t > 1) {
  4838. var i = e.charCodeAt(t - 2);
  4839. if (c(i)) return n - 56320 + (i - 55296 << 10) + 65536
  4840. }
  4841. return n
  4842. }
  4843. t.format = function (e) {
  4844. for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
  4845. return 0 === t.length ? e : e.replace(n, (function (e, n) {
  4846. var i = parseInt(n, 10);
  4847. return isNaN(i) || i < 0 || i >= t.length ? e : t[i]
  4848. }))
  4849. }, t.escape = function (e) {
  4850. return e.replace(/[<>&]/g, (function (e) {
  4851. switch (e) {
  4852. case"<":
  4853. return "&lt;";
  4854. case">":
  4855. return "&gt;";
  4856. case"&":
  4857. return "&amp;";
  4858. default:
  4859. return e
  4860. }
  4861. }))
  4862. }, t.escapeRegExpCharacters = i, t.trim = function (e, t) {
  4863. return void 0 === t && (t = " "), r(o(e, t), t)
  4864. }, t.ltrim = o, t.rtrim = r, t.convertSimple2RegExpPattern = function (e) {
  4865. return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&").replace(/[\*]/g, ".*")
  4866. }, t.startsWith = function (e, t) {
  4867. if (e.length < t.length) return !1;
  4868. if (e === t) return !0;
  4869. for (var n = 0; n < t.length; n++) if (e[n] !== t[n]) return !1;
  4870. return !0
  4871. }, t.endsWith = function (e, t) {
  4872. var n = e.length - t.length
  4873. ;
  4874. return n > 0 ? e.indexOf(t, n) === n : 0 === n && e === t
  4875. }, t.createRegExp = function (e, t, n) {
  4876. if (void 0 === n && (n = {}), !e) throw new Error("Cannot create regex from empty string");
  4877. t || (e = i(e)), n.wholeWord && (/\B/.test(e.charAt(0)) || (e = "\\b" + e), /\B/.test(e.charAt(e.length - 1)) || (e += "\\b"));
  4878. var o = "";
  4879. return n.global && (o += "g"), n.matchCase || (o += "i"), n.multiline && (o += "m"), n.unicode && (o += "u"), new RegExp(e, o)
  4880. }, t.regExpLeadsToEndlessLoop = function (e) {
  4881. return "^" !== e.source && "^$" !== e.source && "$" !== e.source && "^\\s*$" !== e.source && !(!e.exec("") || 0 !== e.lastIndex)
  4882. }, t.regExpFlags = function (e) {
  4883. return (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.unicode ? "u" : "")
  4884. }, t.firstNonWhitespaceIndex = function (e) {
  4885. for (var t = 0, n = e.length; t < n; t++) {
  4886. var i = e.charCodeAt(t);
  4887. if (32 !== i && 9 !== i) return t
  4888. }
  4889. return -1
  4890. }, t.getLeadingWhitespace = function (e, t, n) {
  4891. void 0 === t && (t = 0), void 0 === n && (n = e.length);
  4892. for (var i = t; i < n; i++) {
  4893. var o = e.charCodeAt(i);
  4894. if (32 !== o && 9 !== o) return e.substring(t, i)
  4895. }
  4896. return e.substring(t, n)
  4897. }, t.lastNonWhitespaceIndex = function (e, t) {
  4898. void 0 === t && (t = e.length - 1);
  4899. for (var n = t; n >= 0; n--) {
  4900. var i = e.charCodeAt(n);
  4901. if (32 !== i && 9 !== i) return n
  4902. }
  4903. return -1
  4904. }, t.compare = s, t.compareIgnoreCase = function (e, t) {
  4905. for (var n = Math.min(e.length, t.length), i = 0; i < n; i++) {
  4906. var o = e.charCodeAt(i), r = t.charCodeAt(i);
  4907. if (o !== r) {
  4908. l(o) && (o += 32), l(r) && (r += 32);
  4909. var u = o - r;
  4910. if (0 !== u) return a(o) && a(r) ? u : s(e.toLowerCase(), t.toLowerCase())
  4911. }
  4912. }
  4913. return e.length < t.length ? -1 : e.length > t.length ? 1 : 0
  4914. }, t.isLowerAsciiLetter = a, t.isUpperAsciiLetter = l, t.equalsIgnoreCase = function (e, t) {
  4915. return e.length === t.length && d(e, t)
  4916. }, t.startsWithIgnoreCase = function (e, t) {
  4917. var n = t.length;
  4918. return !(t.length > e.length) && d(e, t, n)
  4919. }, t.commonPrefixLength = function (e, t) {
  4920. var n, i = Math.min(e.length, t.length);
  4921. for (n = 0; n < i; n++) if (e.charCodeAt(n) !== t.charCodeAt(n)) return n;
  4922. return i
  4923. }, t.commonSuffixLength = function (e, t) {
  4924. var n, i = Math.min(e.length, t.length), o = e.length - 1, r = t.length - 1;
  4925. for (n = 0; n < i; n++) if (e.charCodeAt(o - n) !== t.charCodeAt(r - n)) return n;
  4926. return i
  4927. }, t.isHighSurrogate = c, t.isLowSurrogate = h, t.getNextCodePoint = p, t.nextCharLength = function (e, t) {
  4928. var n = C.getInstance(), i = t, o = e.length, r = p(e, o, t);
  4929. t += r >= 65536 ? 2 : 1;
  4930. for (var s = n.getGraphemeBreakType(r); t < o;) {
  4931. var a = p(e, o, t), l = n.getGraphemeBreakType(a);
  4932. if (y(s, l)) break;
  4933. t += a >= 65536 ? 2 : 1, s = l
  4934. }
  4935. return t - i
  4936. }, t.prevCharLength = function (e, t) {
  4937. var n = C.getInstance(), i = t, o = g(e, t);
  4938. t -= o >= 65536 ? 2 : 1;
  4939. for (var r = n.getGraphemeBreakType(o); t > 0;) {
  4940. var s = g(e, t), a = n.getGraphemeBreakType(s);
  4941. if (y(a, r)) break;
  4942. t -= s >= 65536 ? 2 : 1, r = a
  4943. }
  4944. return i - t
  4945. };
  4946. var f = /(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;
  4947. t.containsRTL = function (e) {
  4948. return f.test(e)
  4949. }
  4950. ;var m = /(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;
  4951. t.containsEmoji = function (e) {
  4952. return m.test(e)
  4953. };
  4954. var v = /^[\t\n\r\x20-\x7E]*$/;
  4955. function _(e) {
  4956. return (e = +e) >= 11904 && e <= 55215 || e >= 63744 && e <= 64255 || e >= 65281 && e <= 65374
  4957. }
  4958. function y(e, t) {
  4959. return 0 === e ? 5 !== t && 7 !== t : (2 !== e || 3 !== t) && (4 === e || 2 === e || 3 === e || (4 === t || 2 === t || 3 === t || (8 !== e || 8 !== t && 9 !== t && 11 !== t && 12 !== t) && ((11 !== e && 9 !== e || 9 !== t && 10 !== t) && ((12 !== e && 10 !== e || 10 !== t) && (5 !== t && 13 !== t && (7 !== t && (1 !== e && ((13 !== e || 14 !== t) && (6 !== e || 6 !== t)))))))))
  4960. }
  4961. t.isBasicASCII = function (e) {
  4962. return v.test(e)
  4963. }, t.containsFullWidthCharacter = function (e) {
  4964. for (var t = 0, n = e.length; t < n; t++) if (_(e.charCodeAt(t))) return !0;
  4965. return !1
  4966. }, t.isFullWidthCharacter = _, t.isEmojiImprecise = function (e) {
  4967. return e >= 127462 && e <= 127487 || e >= 9728 && e <= 10175 || e >= 127744 && e <= 128591 || e >= 128640 && e <= 128764 || e >= 128992 && e <= 129003 || e >= 129280 && e <= 129535 || e >= 129648 && e <= 129651 || e >= 129656 && e <= 129666 || e >= 129680 && e <= 129685
  4968. }, t.UTF8_BOM_CHARACTER = String.fromCharCode(65279), t.startsWithUTF8BOM = function (e) {
  4969. return !!(e && e.length > 0 && 65279 === e.charCodeAt(0))
  4970. }, t.safeBtoa = function (e) {
  4971. return btoa(encodeURIComponent(e))
  4972. }, t.repeat = function (e, t) {
  4973. for (var n = "", i = 0; i < t; i++) n += e;
  4974. return n
  4975. }, t.containsUppercaseCharacter = function (e, t) {
  4976. return void 0 === t && (t = !1), !!e && (t && (e = e.replace(/\\./g, "")), e.toLowerCase() !== e)
  4977. }, t.singleLetterHash = function (e) {
  4978. return (e %= 52) < 26 ? String.fromCharCode(97 + e) : String.fromCharCode(65 + e - 26)
  4979. }, t.getGraphemeBreakType = function (e) {
  4980. return C.getInstance().getGraphemeBreakType(e)
  4981. }, t.breakBetweenGraphemeBreakType = y;
  4982. var C = function () {
  4983. function e() {
  4984. this._data = JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")
  4985. }
  4986. return e.getInstance = function () {
  4987. return e._INSTANCE || (e._INSTANCE = new e), e._INSTANCE
  4988. }, e.prototype.getGraphemeBreakType = function (e) {
  4989. if (e < 32) return 10 === e ? 3 : 13 === e ? 2 : 4;
  4990. if (e < 127) return 0;
  4991. for (var t = this._data, n = t.length / 3, i = 1; i <= n;) if (e < t[3 * i]) i *= 2; else {
  4992. if (!(e > t[3 * i + 1])) return t[3 * i + 2];
  4993. i = 2 * i + 1
  4994. }
  4995. return 0
  4996. }, e._INSTANCE = null, e
  4997. }()
  4998. })), define(n[177], i([0, 1, 5, 77]), (function (e, t, n, i) {
  4999. "use strict";
  5000. Object.defineProperty(t, "__esModule", {value: !0}), t.toSlashes = function (e) {
  5001. return e.replace(/[\\/]/g, i.posix.sep)
  5002. }, t.isEqualOrParent = function (e, t, o, r) {
  5003. if (void 0 === r && (r = i.sep), e === t) return !0;
  5004. if (!e || !t) return !1;
  5005. if (t.length > e.length) return !1;
  5006. if (o) {
  5007. if (!n.startsWithIgnoreCase(e, t)) return !1;
  5008. if (t.length === e.length) return !0;
  5009. var s = t.length;
  5010. return t.charAt(t.length - 1) === r && s--, e.charAt(s) === r
  5011. }
  5012. return t.charAt(t.length - 1) !== r && (t += r), 0 === e.indexOf(t)
  5013. }, t.isWindowsDriveLetter = function (e) {
  5014. return e >= 65 && e <= 90 || e >= 97 && e <= 122
  5015. }
  5016. })), define(n[61], i([0, 1, 38, 5]), (function (e, t, n, i) {
  5017. "use strict";
  5018. function o() {
  5019. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  5020. return function (t, n) {
  5021. for (var i = 0, o = e.length; i < o; i++) {
  5022. var r = e[i](t, n);
  5023. if (r) return r
  5024. }
  5025. return null
  5026. }
  5027. }
  5028. function r(e, t) {
  5029. var n = t.toLowerCase().indexOf(e.toLowerCase());
  5030. return -1 === n ? null : [{start: n, end: n + e.length}]
  5031. }
  5032. function s(e, t) {
  5033. return function e(t, n, i, o) {
  5034. if (i === t.length) return [];
  5035. if (o === n.length) return null;
  5036. if (t[i] === n[o]) {
  5037. var r;
  5038. return (r = e(t, n, i + 1, o + 1)) ? p({start: o, end: o + 1}, r) : null
  5039. }
  5040. return e(t, n, i, o + 1)
  5041. }(e.toLowerCase(), t.toLowerCase(), 0, 0)
  5042. }
  5043. function a(e) {
  5044. return 97 <= e && e <= 122
  5045. }
  5046. function l(e) {
  5047. return 65 <= e && e <= 90
  5048. }
  5049. function u(e) {
  5050. return 48 <= e && e <= 57
  5051. }
  5052. function d(e) {
  5053. return 32 === e || 9 === e || 10 === e || 13 === e
  5054. }
  5055. Object.defineProperty(t, "__esModule", {value: !0}), t.or = o, t.matchesPrefix = function (e, t, n) {
  5056. if (!n || n.length < t.length) return null;
  5057. var o;
  5058. o = e ? i.startsWithIgnoreCase(n, t) : 0 === n.indexOf(t);
  5059. if (!o) return null;
  5060. return t.length > 0 ? [{start: 0, end: t.length}] : []
  5061. }.bind(void 0, !0), t.matchesContiguousSubString = r, t.matchesSubString = s, t.isUpper = l;
  5062. var c = new Set;
  5063. function h(e) {
  5064. return a(e) || l(e) || u(e)
  5065. }
  5066. function p(e, t) {
  5067. return 0 === t.length ? t = [e] : e.end === t[0].start ? t[0].start = e.start : t.unshift(e), t
  5068. }
  5069. function g(e, t) {
  5070. for (var n = t; n < e.length; n++) {
  5071. var i = e.charCodeAt(n);
  5072. if (l(i) || u(i) || n > 0 && !h(e.charCodeAt(n - 1))) return n
  5073. }
  5074. return e.length
  5075. }
  5076. function f(e, t, n, i) {
  5077. if (n === e.length) return [];
  5078. if (i === t.length) return null;
  5079. if (e[n] !== t[i].toLowerCase()) return null;
  5080. var o = null, r = i + 1;
  5081. for (o = f(e, t, n + 1, i + 1); !o && (r = g(t, r)) < t.length;) o = f(e, t, n + 1, r), r++;
  5082. return null === o ? null : p({start: i, end: i + 1}, o)
  5083. }
  5084. function m(e, t) {
  5085. if (!t) return null;
  5086. if (0 === (t = t.trim()).length) return null;
  5087. if (!function (e) {
  5088. for (var t = 0, n = 0, i = 0, o = 0, r = 0; r < e.length; r++) l(i = e.charCodeAt(r)) && t++, a(i) && n++, d(i) && o++;
  5089. return 0 !== t && 0 !== n || 0 !== o ? t <= 5 : e.length <= 30
  5090. }(e)) return null;
  5091. if (t.length > 60) return null;
  5092. var n = function (e) {
  5093. for (var t = 0, n = 0, i = 0, o = 0, r = 0, s = 0; s < e.length; s++) l(r = e.charCodeAt(s)) && t++, a(r) && n++, h(r) && i++, u(r) && o++;
  5094. return {
  5095. upperPercent: t / e.length,
  5096. lowerPercent: n / e.length,
  5097. alphaPercent: i / e.length,
  5098. numericPercent: o / e.length
  5099. }
  5100. }(t);
  5101. if (!function (e) {
  5102. var t = e.upperPercent, n = e.lowerPercent, i = e.alphaPercent, o = e.numericPercent;
  5103. return n > .2 && t < .8 && i > .6 && o < .2
  5104. }(n)) {
  5105. if (!function (e) {
  5106. var t = e.upperPercent;
  5107. return 0 === e.lowerPercent && t > .6
  5108. }(n)) return null;
  5109. t = t.toLowerCase()
  5110. }
  5111. var i = null, o = 0;
  5112. for (e = e.toLowerCase(); o < t.length && null === (i = f(e, t, 0, o));) o = g(t, o + 1);
  5113. return i
  5114. }
  5115. "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((function (e) {
  5116. return c.add(e.charCodeAt(0))
  5117. })), t.matchesCamelCase = m;
  5118. var v = o(t.matchesPrefix, m, r), _ = o(t.matchesPrefix, m, s), y = new n.LRUCache(1e4);
  5119. t.matchesFuzzy = function (e, t, n) {
  5120. if (void 0 === n && (n = !1), "string" != typeof e || "string" != typeof t) return null;
  5121. var o = y.get(e);
  5122. o || (o = new RegExp(i.convertSimple2RegExpPattern(e), "i"), y.set(e, o));
  5123. var r = o.exec(t);
  5124. return r ? [{start: r.index, end: r.index + r[0].length}] : n ? _(e, t) : v(e, t)
  5125. }, t.anyScore = function (e, t, n, i, o, r) {
  5126. var s = M(e, t, 0, i, o, 0, !0);
  5127. if (s) return s;
  5128. for (var a = 0, l = 0, u = r, d = 0; d < t.length && d < C; ++d) {
  5129. var c = o.indexOf(t.charAt(d), u);
  5130. if (c >= 0) l += 1, a += Math.pow(2, c), u = c + 1; else if (0 !== a) break
  5131. }
  5132. return [l, a, r]
  5133. }, t.createMatches = function (e) {
  5134. if (void 0 === e) return [];
  5135. for (var t = e[1].toString(2), n = [], i = e[2]; i < C; i++) if ("1" === t[t.length - (i + 1)]) {
  5136. var o = n[n.length - 1];
  5137. o && o.end === i ? o.end = i + 1 : n.push({start: i, end: i + 1})
  5138. }
  5139. return n
  5140. };
  5141. var C = 128;
  5142. function b() {
  5143. for (var e = [], t = [0], n = 1; n <= C; n++) t.push(-n);
  5144. for (n = 0; n <= C; n++) {
  5145. var i = t.slice(0);
  5146. i[0] = -n, e.push(i)
  5147. }
  5148. return e
  5149. }
  5150. var S = b(), w = b(), E = b(), L = !1;
  5151. function D(e, t, n, i, o) {
  5152. function r(e, t, n) {
  5153. for (void 0 === n && (n = " "); e.length < t;) e = n + e;
  5154. return e
  5155. }
  5156. for (var s = " | |" + i.split("").map((function (e) {
  5157. return r(e, 3)
  5158. })).join("|") + "\n", a = 0; a <= n; a++) s += 0 === a ? " |" : t[a - 1] + "|", s += e[a].slice(0, o + 1).map((function (e) {
  5159. return r(e.toString(), 3)
  5160. })).join("|") + "\n";
  5161. return s
  5162. }
  5163. function N(e, t) {
  5164. if (t < 0 || t >= e.length) return !1;
  5165. switch (e.charCodeAt(t)) {
  5166. case 95:
  5167. case 45:
  5168. case 46:
  5169. case 32:
  5170. case 47:
  5171. case 92:
  5172. case 39:
  5173. case 34:
  5174. case 58:
  5175. case 36:
  5176. return !0;
  5177. default:
  5178. return !1
  5179. }
  5180. }
  5181. function x(e, t, n) {
  5182. return t[e] !== n[e]
  5183. }
  5184. function I(e, t, n, i, o, r) {
  5185. for (; t < n && o < r;) e[t] === i[o] && (t += 1), o += 1;
  5186. return t === n
  5187. }
  5188. function M(e, t, n, i, o, r, s) {
  5189. var a = e.length > C ? C : e.length, l = i.length > C ? C : i.length
  5190. ;
  5191. if (!(n >= a || r >= l || a - n > l - r) && I(t, n, a, o, r, l)) {
  5192. var u = 1, d = 1, c = n, h = r;
  5193. for (u = 1, c = n; c < a; u++, c++) for (d = 1, h = r; h < l; d++, h++) {
  5194. var p = k(e, t, c, n, i, o, h);
  5195. w[u][d] = p;
  5196. var g = S[u - 1][d - 1] + (p > 1 ? 1 : p), f = S[u - 1][d] + -1, m = S[u][d - 1] + -1;
  5197. m >= f ? m > g ? (S[u][d] = m, E[u][d] = 4) : m === g ? (S[u][d] = m, E[u][d] = 6) : (S[u][d] = g, E[u][d] = 2) : f > g ? (S[u][d] = f, E[u][d] = 1) : f === g ? (S[u][d] = f, E[u][d] = 3) : (S[u][d] = g, E[u][d] = 2)
  5198. }
  5199. if (L && function (e, t, n, i) {
  5200. e = e.substr(t), n = n.substr(i), console.log(D(S, e, e.length, n, n.length)), console.log(D(E, e, e.length, n, n.length)), console.log(D(w, e, e.length, n, n.length))
  5201. }(e, n, i, r), T = 0, O = -100, P = r, A = s, function e(t, n, i, o, r) {
  5202. if (T >= 10 || i < -25) return;
  5203. var s = 0;
  5204. for (; t > 0 && n > 0;) {
  5205. var a = w[t][n], l = E[t][n];
  5206. if (4 === l) n -= 1, r ? i -= 5 : 0 !== o && (i -= 1), r = !1, s = 0; else {
  5207. if (!(2 & l)) return;
  5208. if (4 & l && e(t, n - 1, 0 !== o ? i - 1 : i, o, r), i += a, t -= 1, n -= 1, r = !0, o += Math.pow(2, n + P), 1 === a) {
  5209. if (s += 1, 0 === t && !A) return
  5210. } else i += 1 + s * (a - 1), s = 0
  5211. }
  5212. }
  5213. i -= n >= 3 ? 9 : 3 * n;
  5214. T += 1;
  5215. i > O && (O = i, R = o)
  5216. }(u - 1, d - 1, a === l ? 1 : 0, 0, !1), 0 !== T) return [O, R, r]
  5217. }
  5218. }
  5219. function k(e, t, n, i, o, r, s) {
  5220. return t[n] !== r[s] ? -1 : s === n - i ? e[n] === o[s] ? 7 : 5 : !x(s, o, r) || 0 !== s && x(s - 1, o, r) ? !N(r, s) || 0 !== s && N(r, s - 1) ? N(r, s - 1) || function (e, t) {
  5221. if (t < 0 || t >= e.length) return !1;
  5222. switch (e.charCodeAt(t)) {
  5223. case 32:
  5224. case 9:
  5225. return !0;
  5226. default:
  5227. return !1
  5228. }
  5229. }(r, s - 1) ? 5 : 1 : 5 : e[n] === o[s] ? 7 : 5
  5230. }
  5231. t.isPatternInWord = I, function (e) {
  5232. e.Default = Object.freeze([-100, 0, 0]), e.isDefault = function (e) {
  5233. return !e || -100 === e[0] && 0 === e[1] && 0 === e[2]
  5234. }
  5235. }(t.FuzzyScore || (t.FuzzyScore = {})), t.fuzzyScore = M;
  5236. var T = 0, R = 0, O = 0, P = 0, A = !1;
  5237. function F(e, t) {
  5238. if (!(t + 1 >= e.length)) {
  5239. var n = e[t], i = e[t + 1];
  5240. if (n !== i) return e.slice(0, t) + i + n + e.slice(t + 2)
  5241. }
  5242. }
  5243. t.fuzzyScoreGracefulAggressive = function (e, t, n, i, o, r, s) {
  5244. return function (e, t, n, i, o, r, s, a) {
  5245. var l = M(e, t, n, i, o, r, a);
  5246. if (l && !s) return l;
  5247. if (e.length >= 3) for (var u = Math.min(7, e.length - 1), d = n + 1; d < u; d++) {
  5248. var c = F(e, d);
  5249. if (c) {
  5250. var h = M(c, c.toLowerCase(), n, i, o, r, a);
  5251. h && (h[0] -= 3, (!l || h[0] > l[0]) && (l = h))
  5252. }
  5253. }
  5254. return l
  5255. }(e, t, n, i, o, r, !0, s)
  5256. }
  5257. })), define(n[178], i([0, 1, 19, 5, 177, 77, 38, 15]), (function (e, t, n, i, o, r, s, a) {
  5258. "use strict";
  5259. Object.defineProperty(t, "__esModule", {value: !0})
  5260. ;var l = "**", u = "/", d = "[/\\\\]", c = "[^/\\\\]", h = /\//g;
  5261. function p(e) {
  5262. switch (e) {
  5263. case 0:
  5264. return "";
  5265. case 1:
  5266. return c + "*?";
  5267. default:
  5268. return "(?:" + d + "|" + c + "+" + d + "|" + d + c + "+)*?"
  5269. }
  5270. }
  5271. function g(e, t) {
  5272. if (!e) return [];
  5273. for (var n = [], i = !1, o = !1, r = "", s = 0, a = e; s < a.length; s++) {
  5274. var l = a[s];
  5275. switch (l) {
  5276. case t:
  5277. if (!i && !o) {
  5278. n.push(r), r = "";
  5279. continue
  5280. }
  5281. break;
  5282. case"{":
  5283. i = !0;
  5284. break;
  5285. case"}":
  5286. i = !1;
  5287. break;
  5288. case"[":
  5289. o = !0;
  5290. break;
  5291. case"]":
  5292. o = !1
  5293. }
  5294. r += l
  5295. }
  5296. return r && n.push(r), n
  5297. }
  5298. t.splitGlobAware = g;
  5299. var f = /^\*\*\/\*\.[\w\.-]+$/, m = /^\*\*\/([\w\.-]+)\/?$/,
  5300. v = /^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,
  5301. _ = /^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,
  5302. y = /^\*\*((\/[\w\.-]+)+)\/?$/, C = /^([\w\.-]+(\/[\w\.-]+)*)\/?$/, b = new s.LRUCache(1e4),
  5303. S = function () {
  5304. return !1
  5305. }, w = function () {
  5306. return null
  5307. };
  5308. function E(e, t) {
  5309. if (!e) return w;
  5310. var o, r, s = (o = (o = "string" != typeof e ? e.pattern : e).trim()) + "_" + !!t.trimForExclusions,
  5311. a = b.get(s);
  5312. if (a) return L(a, e);
  5313. if (f.test(o)) {
  5314. var h = o.substr(4);
  5315. a = function (e, t) {
  5316. return "string" == typeof e && i.endsWith(e, h) ? o : null
  5317. }
  5318. } else a = (r = m.exec(D(o, t))) ? function (e, t) {
  5319. var n = "/" + e, o = "\\" + e, r = function (r, s) {
  5320. return "string" != typeof r ? null : s ? s === e ? t : null : r === e || i.endsWith(r, n) || i.endsWith(r, o) ? t : null
  5321. }, s = [e];
  5322. return r.basenames = s, r.patterns = [t], r.allBasenames = s, r
  5323. }(r[1], o) : (t.trimForExclusions ? _ : v).test(o) ? function (e, t) {
  5324. var i = M(e.slice(1, -1).split(",").map((function (e) {
  5325. return E(e, t)
  5326. })).filter((function (e) {
  5327. return e !== w
  5328. })), e), o = i.length;
  5329. if (!o) return w;
  5330. if (1 === o) return i[0];
  5331. var r = function (t, n) {
  5332. for (var o = 0, r = i.length; o < r; o++) if (i[o](t, n)) return e;
  5333. return null
  5334. }, s = n.first(i, (function (e) {
  5335. return !!e.allBasenames
  5336. }));
  5337. s && (r.allBasenames = s.allBasenames);
  5338. var a = i.reduce((function (e, t) {
  5339. return t.allPaths ? e.concat(t.allPaths) : e
  5340. }), []);
  5341. a.length && (r.allPaths = a);
  5342. return r
  5343. }(o, t) : (r = y.exec(D(o, t))) ? N(r[1].substr(1), o, !0) : (r = C.exec(D(o, t))) ? N(r[1], o, !1) : function (e) {
  5344. try {
  5345. var t = new RegExp("^" + function e(t) {
  5346. if (!t) return "";
  5347. var n = "", o = g(t, u);
  5348. if (o.every((function (e) {
  5349. return e === l
  5350. }))) n = ".*"; else {
  5351. var r = !1;
  5352. o.forEach((function (t, s) {
  5353. if (t !== l) {
  5354. for (var a = !1, h = "", f = !1, m = "", v = 0, _ = t; v < _.length; v++) {
  5355. var y = _[v];
  5356. if ("}" !== y && a) h += y; else if (!f || "]" === y && m) switch (y) {
  5357. case"{":
  5358. a = !0;
  5359. continue;
  5360. case"[":
  5361. f = !0;
  5362. continue;
  5363. case"}":
  5364. var C = "(?:" + g(h, ",").map((function (t) {
  5365. return e(t)
  5366. })).join("|") + ")";
  5367. n += C, a = !1, h = "";
  5368. break;
  5369. case"]":
  5370. n += "[" + m + "]", f = !1, m = "";
  5371. break;
  5372. case"?":
  5373. n += c;
  5374. continue;
  5375. case"*":
  5376. n += p(1);
  5377. continue;
  5378. default:
  5379. n += i.escapeRegExpCharacters(y)
  5380. } else {
  5381. m += "-" === y ? y : "^" !== y && "!" !== y || m ? y === u ? "" : i.escapeRegExpCharacters(y) : "^"
  5382. }
  5383. }
  5384. s < o.length - 1 && (o[s + 1] !== l || s + 2 < o.length) && (n += d), r = !1
  5385. } else r || (n += p(2), r = !0)
  5386. }))
  5387. }
  5388. return n
  5389. }(e) + "$");
  5390. return function (n, i) {
  5391. return t.lastIndex = 0, "string" == typeof n && t.test(n) ? e : null
  5392. }
  5393. } catch (e) {
  5394. return w
  5395. }
  5396. }(o);
  5397. return b.set(s, a), L(a, e)
  5398. }
  5399. function L(e, t) {
  5400. return "string" == typeof t ? e : function (n, i) {
  5401. return o.isEqualOrParent(n, t.base) ? e(r.relative(t.base, n), i) : null
  5402. }
  5403. }
  5404. function D(e, t) {
  5405. return t.trimForExclusions && i.endsWith(e, "/**") ? e.substr(0, e.length - 2) : e
  5406. }
  5407. function N(e, t, n) {
  5408. var o = r.sep !== r.posix.sep ? e.replace(h, r.sep) : e, s = r.sep + o, a = n ? function (e, n) {
  5409. return "string" != typeof e || e !== o && !i.endsWith(e, s) ? null : t
  5410. } : function (e, n) {
  5411. return "string" == typeof e && e === o ? t : null
  5412. };
  5413. return a.allPaths = [(n ? "*/" : "./") + e], a
  5414. }
  5415. function x(e, t) {
  5416. if (void 0 === t && (t = {}), !e) return S;
  5417. if ("string" == typeof e || I(e)) {
  5418. var i = E(e, t);
  5419. if (i === w) return S;
  5420. var o = function (e, t) {
  5421. return !!i(e, t)
  5422. };
  5423. return i.allBasenames && (o.allBasenames = i.allBasenames), i.allPaths && (o.allPaths = i.allPaths), o
  5424. }
  5425. return function (e, t) {
  5426. var i = M(Object.getOwnPropertyNames(e).map((function (n) {
  5427. return function (e, t, n) {
  5428. if (!1 === t) return w;
  5429. var i = E(e, n);
  5430. if (i === w) return w;
  5431. if ("boolean" == typeof t) return i;
  5432. if (t) {
  5433. var o = t.when;
  5434. if ("string" == typeof o) {
  5435. var r = function (t, n, r, s) {
  5436. if (!s || !i(t, n)) return null;
  5437. var l = s(o.replace("$(basename)", r));
  5438. return a.isThenable(l) ? l.then((function (t) {
  5439. return t ? e : null
  5440. })) : l ? e : null
  5441. };
  5442. return r.requiresSiblings = !0, r
  5443. }
  5444. }
  5445. return i
  5446. }(n, e[n], t)
  5447. })).filter((function (e) {
  5448. return e !== w
  5449. }))), o = i.length;
  5450. if (!o) return w;
  5451. if (!i.some((function (e) {
  5452. return !!e.requiresSiblings
  5453. }))) {
  5454. if (1 === o) return i[0];
  5455. var s = function (e, t) {
  5456. for (var n = 0, o = i.length; n < o; n++) {
  5457. var r = i[n](e, t);
  5458. if (r) return r
  5459. }
  5460. return null
  5461. }, l = n.first(i, (function (e) {
  5462. return !!e.allBasenames
  5463. }));
  5464. l && (s.allBasenames = l.allBasenames);
  5465. var u = i.reduce((function (e, t) {
  5466. return t.allPaths ? e.concat(t.allPaths) : e
  5467. }), []);
  5468. return u.length && (s.allPaths = u), s
  5469. }
  5470. var d = function (e, t, n) {
  5471. for (var o = void 0, s = 0, a = i.length; s < a; s++) {
  5472. var l = i[s];
  5473. l.requiresSiblings && n && (t || (t = r.basename(e)), o || (o = t.substr(0, t.length - r.extname(e).length)));
  5474. var u = l(e, t, o, n);
  5475. if (u) return u
  5476. }
  5477. return null
  5478. }, c = n.first(i, (function (e) {
  5479. return !!e.allBasenames
  5480. }));
  5481. c && (d.allBasenames = c.allBasenames);
  5482. var h = i.reduce((function (e, t) {
  5483. return t.allPaths ? e.concat(t.allPaths) : e
  5484. }), []);
  5485. h.length && (d.allPaths = h);
  5486. return d
  5487. }(e, t)
  5488. }
  5489. function I(e) {
  5490. var t = e;
  5491. return t && "string" == typeof t.base && "string" == typeof t.pattern
  5492. }
  5493. function M(e, t) {
  5494. var n = e.filter((function (e) {
  5495. return !!e.basenames
  5496. }));
  5497. if (n.length < 2) return e;
  5498. var i, o = n.reduce((function (e, t) {
  5499. var n = t.basenames;
  5500. return n ? e.concat(n) : e
  5501. }), []);
  5502. if (t) {
  5503. i = [];
  5504. for (var r = 0, s = o.length; r < s; r++) i.push(t)
  5505. } else i = n.reduce((function (e, t) {
  5506. var n = t.patterns
  5507. ;
  5508. return n ? e.concat(n) : e
  5509. }), []);
  5510. var a = function (e, t) {
  5511. if ("string" != typeof e) return null;
  5512. if (!t) {
  5513. var n = void 0;
  5514. for (n = e.length; n > 0; n--) {
  5515. var r = e.charCodeAt(n - 1);
  5516. if (47 === r || 92 === r) break
  5517. }
  5518. t = e.substr(n)
  5519. }
  5520. var s = o.indexOf(t);
  5521. return -1 !== s ? i[s] : null
  5522. };
  5523. a.basenames = o, a.patterns = i, a.allBasenames = o;
  5524. var l = e.filter((function (e) {
  5525. return !e.basenames
  5526. }));
  5527. return l.push(a), l
  5528. }
  5529. t.match = function (e, t, n) {
  5530. return !(!e || "string" != typeof t) && x(e)(t, void 0, n)
  5531. }, t.parse = x, t.isRelativePattern = I
  5532. })), define(n[247], i([0, 1, 5]), (function (e, t, n) {
  5533. "use strict";
  5534. function i(e, t) {
  5535. if (e && "" !== e[0]) {
  5536. var i = o(e, t, "-"), s = o(e, t, "_");
  5537. return i && !s ? r(e, t, "-") : !i && s ? r(e, t, "_") : e[0].toUpperCase() === e[0] ? t.toUpperCase() : e[0].toLowerCase() === e[0] ? t.toLowerCase() : n.containsUppercaseCharacter(e[0][0]) ? t[0].toUpperCase() + t.substr(1) : t
  5538. }
  5539. return t
  5540. }
  5541. function o(e, t, n) {
  5542. return -1 !== e[0].indexOf(n) && -1 !== t.indexOf(n) && e[0].split(n).length === t.split(n).length
  5543. }
  5544. function r(e, t, n) {
  5545. var o = t.split(n), r = e[0].split(n), s = "";
  5546. return o.forEach((function (e, t) {
  5547. s += i([r[t]], e) + n
  5548. })), s.slice(0, -1)
  5549. }
  5550. Object.defineProperty(t, "__esModule", {value: !0}), t.buildReplaceStringWithCasePreserved = i
  5551. })), define(n[21], i([0, 1]), (function (e, t) {
  5552. "use strict";
  5553. Object.defineProperty(t, "__esModule", {value: !0});
  5554. var n = {number: "number", string: "string", undefined: "undefined", object: "object", function: "function"};
  5555. function i(e) {
  5556. return typeof e === n.string || e instanceof String
  5557. }
  5558. function o(e) {
  5559. return !(typeof e !== n.object || null === e || Array.isArray(e) || e instanceof RegExp || e instanceof Date)
  5560. }
  5561. function r(e) {
  5562. return typeof e === n.undefined
  5563. }
  5564. function s(e) {
  5565. return r(e) || null === e
  5566. }
  5567. t.isArray = function (e) {
  5568. return Array.isArray ? Array.isArray(e) : !(!e || typeof e.length !== n.number || e.constructor !== Array)
  5569. }, t.isString = i, t.isObject = o, t.isNumber = function (e) {
  5570. return (typeof e === n.number || e instanceof Number) && !isNaN(e)
  5571. }, t.isBoolean = function (e) {
  5572. return !0 === e || !1 === e
  5573. }, t.isUndefined = r, t.isUndefinedOrNull = s, t.assertType = function (e, t) {
  5574. if (!e) throw new Error(t ? "Unexpected type, expected '" + t + "'" : "Unexpected type")
  5575. };
  5576. var a = Object.prototype.hasOwnProperty;
  5577. function l(e) {
  5578. return typeof e === n.function
  5579. }
  5580. function u(e, t) {
  5581. if (i(t)) {
  5582. if (typeof e !== t) throw new Error("argument does not match constraint: typeof " + t)
  5583. } else if (l(t)) {
  5584. try {
  5585. if (e instanceof t) return
  5586. } catch (e) {
  5587. }
  5588. if (!s(e) && e.constructor === t) return;
  5589. if (1 === t.length && !0 === t.call(void 0, e)) return;
  5590. throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")
  5591. }
  5592. }
  5593. function d(e) {
  5594. for (var t = [], n = Object.getPrototypeOf(e); Object.prototype !== n;) t = t.concat(Object.getOwnPropertyNames(n)), n = Object.getPrototypeOf(n);
  5595. return t
  5596. }
  5597. t.isEmptyObject = function (e) {
  5598. if (!o(e)) return !1;
  5599. for (var t in e) if (a.call(e, t)) return !1;
  5600. return !0
  5601. }, t.isFunction = l, t.validateConstraints = function (e, t) {
  5602. for (var n = Math.min(e.length, t.length), i = 0; i < n; i++) u(e[i], t[i])
  5603. }, t.validateConstraint = u, t.getAllPropertyNames = d, t.getAllMethodNames = function (e) {
  5604. for (var t = [], n = 0, i = d(e); n < i.length; n++) {
  5605. var o = i[n];
  5606. "function" == typeof e[o] && t.push(o)
  5607. }
  5608. return t
  5609. }, t.createProxyObject = function (e, t) {
  5610. for (var n = function (e) {
  5611. return function () {
  5612. var n = Array.prototype.slice.call(arguments, 0);
  5613. return t(e, n)
  5614. }
  5615. }, i = {}, o = 0, r = e; o < r.length; o++) {
  5616. var s = r[o];
  5617. i[s] = n(s)
  5618. }
  5619. return i
  5620. }, t.withNullAsUndefined = function (e) {
  5621. return null === e ? void 0 : e
  5622. }, t.withUndefinedAsNull = function (e) {
  5623. return void 0 === e ? null : e
  5624. }
  5625. })), define(n[31], i([0, 1, 21]), (function (e, t, n) {
  5626. "use strict";
  5627. Object.defineProperty(t, "__esModule", {value: !0}), t.deepClone = function e(t) {
  5628. if (!t || "object" != typeof t) return t;
  5629. if (t instanceof RegExp) return t;
  5630. var n = Array.isArray(t) ? [] : {};
  5631. return Object.keys(t).forEach((function (i) {
  5632. t[i] && "object" == typeof t[i] ? n[i] = e(t[i]) : n[i] = t[i]
  5633. })), n
  5634. }, t.deepFreeze = function (e) {
  5635. if (!e || "object" != typeof e) return e;
  5636. for (var t = [e]; t.length > 0;) {
  5637. var n = t.shift();
  5638. for (var o in Object.freeze(n), n) if (i.call(n, o)) {
  5639. var r = n[o];
  5640. "object" != typeof r || Object.isFrozen(r) || t.push(r)
  5641. }
  5642. }
  5643. return e
  5644. };
  5645. var i = Object.prototype.hasOwnProperty;
  5646. t.cloneAndChange = function (e, t) {
  5647. return function e(t, o, r) {
  5648. if (n.isUndefinedOrNull(t)) return t;
  5649. var s = o(t);
  5650. if (void 0 !== s) return s;
  5651. if (n.isArray(t)) {
  5652. for (var a = [], l = 0, u = t; l < u.length; l++) {
  5653. var d = u[l];
  5654. a.push(e(d, o, r))
  5655. }
  5656. return a
  5657. }
  5658. if (n.isObject(t)) {
  5659. if (r.has(t)) throw new Error("Cannot clone recursive data-structure");
  5660. r.add(t);
  5661. var c = {};
  5662. for (var h in t) i.call(t, h) && (c[h] = e(t[h], o, r));
  5663. return r.delete(t), c
  5664. }
  5665. return t
  5666. }(e, t, new Set)
  5667. }, t.mixin = function e(t, i, o) {
  5668. return void 0 === o && (o = !0), n.isObject(t) ? (n.isObject(i) && Object.keys(i).forEach((function (r) {
  5669. r in t ? o && (n.isObject(t[r]) && n.isObject(i[r]) ? e(t[r], i[r], o) : t[r] = i[r]) : t[r] = i[r]
  5670. })), t) : i
  5671. }, t.assign = function (e) {
  5672. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  5673. return t.forEach((function (t) {
  5674. return Object.keys(t).forEach((function (n) {
  5675. return e[n] = t[n]
  5676. }))
  5677. })), e
  5678. }, t.equals = function e(t, n) {
  5679. if (t === n) return !0;
  5680. if (null == t || null == n) return !1;
  5681. if (typeof t != typeof n) return !1;
  5682. if ("object" != typeof t) return !1;
  5683. if (Array.isArray(t) !== Array.isArray(n)) return !1;
  5684. var i, o;
  5685. if (Array.isArray(t)) {
  5686. if (t.length !== n.length) return !1;
  5687. for (i = 0; i < t.length; i++) if (!e(t[i], n[i])) return !1
  5688. } else {
  5689. var r = [];
  5690. for (o in t) r.push(o);
  5691. r.sort();
  5692. var s = []
  5693. ;
  5694. for (o in n) s.push(o);
  5695. if (s.sort(), !e(r, s)) return !1;
  5696. for (i = 0; i < r.length; i++) if (!e(t[r[i]], n[r[i]])) return !1
  5697. }
  5698. return !0
  5699. }, t.getOrDefault = function (e, t, n) {
  5700. var i = t(e);
  5701. return void 0 === i ? n : i
  5702. }
  5703. })), define(n[133], i([0, 1, 31, 100, 5]), (function (e, t, n, i, o) {
  5704. "use strict";
  5705. Object.defineProperty(t, "__esModule", {value: !0});
  5706. var r = function () {
  5707. function e(e, t) {
  5708. this.supportCodicons = t, this.text = "", this.title = "", this.highlights = [], this.didEverRender = !1, this.domNode = document.createElement("span"), this.domNode.className = "monaco-highlighted-label", e.appendChild(this.domNode)
  5709. }
  5710. return Object.defineProperty(e.prototype, "element", {
  5711. get: function () {
  5712. return this.domNode
  5713. }, enumerable: !0, configurable: !0
  5714. }), e.prototype.set = function (t, i, o, r) {
  5715. void 0 === i && (i = []), void 0 === o && (o = ""), t || (t = ""), r && (t = e.escapeNewLines(t, i)), this.didEverRender && this.text === t && this.title === o && n.equals(this.highlights, i) || (Array.isArray(i) || (i = []), this.text = t, this.title = o, this.highlights = i, this.render())
  5716. }, e.prototype.render = function () {
  5717. for (var e = "", t = 0, n = 0, r = this.highlights; n < r.length; n++) {
  5718. var s = r[n];
  5719. if (s.end !== s.start) {
  5720. if (t < s.start) {
  5721. e += "<span>";
  5722. var a = this.text.substring(t, s.start);
  5723. e += this.supportCodicons ? i.renderCodicons(o.escape(a)) : o.escape(a), e += "</span>", t = s.end
  5724. }
  5725. s.extraClasses ? e += '<span class="highlight ' + s.extraClasses + '">' : e += '<span class="highlight">';
  5726. var l = this.text.substring(s.start, s.end);
  5727. e += this.supportCodicons ? i.renderCodicons(o.escape(l)) : o.escape(l), e += "</span>", t = s.end
  5728. }
  5729. }
  5730. if (t < this.text.length) {
  5731. e += "<span>";
  5732. l = this.text.substring(t);
  5733. e += this.supportCodicons ? i.renderCodicons(o.escape(l)) : o.escape(l), e += "</span>"
  5734. }
  5735. this.domNode.innerHTML = e, this.title ? this.domNode.title = this.title : this.domNode.removeAttribute("title"), this.didEverRender = !0
  5736. }, e.escapeNewLines = function (e, t) {
  5737. var n = 0, i = 0;
  5738. return e.replace(/\r\n|\r|\n/g, (function (e, o) {
  5739. i = "\r\n" === e ? -1 : 0, o += n;
  5740. for (var r = 0, s = t; r < s.length; r++) {
  5741. var a = s[r];
  5742. a.end <= o || (a.start >= o && (a.start += i), a.end >= o && (a.end += i))
  5743. }
  5744. return n += i, "⏎"
  5745. }))
  5746. }, e
  5747. }();
  5748. t.HighlightedLabel = r
  5749. })),
  5750. define(n[179], i([0, 1]), (function (e, t) {
  5751. "use strict";
  5752. Object.defineProperty(t, "__esModule", {value: !0}), t.toUint8 = function (e) {
  5753. return e < 0 ? 0 : e > 255 ? 255 : 0 | e
  5754. }, t.toUint32 = function (e) {
  5755. return e < 0 ? 0 : e > 4294967295 ? 4294967295 : 0 | e
  5756. }
  5757. })), define(n[25], i([0, 1, 16]), (function (e, t, n) {
  5758. "use strict";
  5759. var i;
  5760. Object.defineProperty(t, "__esModule", {value: !0});
  5761. var o = /^\w[\w\d+.-]*$/, s = /^\//, a = /^\/\//;
  5762. var l = "", u = "/", d = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, c = function () {
  5763. function e(e, t, n, i, r, d) {
  5764. void 0 === d && (d = !1), "object" == typeof e ? (this.scheme = e.scheme || l, this.authority = e.authority || l, this.path = e.path || l, this.query = e.query || l, this.fragment = e.fragment || l) : (this.scheme = function (e, t) {
  5765. return e || t ? e : "file"
  5766. }(e, d), this.authority = t || l, this.path = function (e, t) {
  5767. switch (e) {
  5768. case"https":
  5769. case"http":
  5770. case"file":
  5771. t ? t[0] !== u && (t = u + t) : t = u
  5772. }
  5773. return t
  5774. }(this.scheme, n || l), this.query = i || l, this.fragment = r || l, function (e, t) {
  5775. if (!e.scheme && t) throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "' + e.authority + '", path: "' + e.path + '", query: "' + e.query + '", fragment: "' + e.fragment + '"}');
  5776. if (e.scheme && !o.test(e.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
  5777. if (e.path) if (e.authority) {
  5778. if (!s.test(e.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')
  5779. } else if (a.test(e.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')
  5780. }(this, d))
  5781. }
  5782. return e.isUri = function (t) {
  5783. return t instanceof e || !!t && ("string" == typeof t.authority && "string" == typeof t.fragment && "string" == typeof t.path && "string" == typeof t.query && "string" == typeof t.scheme && "function" == typeof t.fsPath && "function" == typeof t.with && "function" == typeof t.toString)
  5784. }, Object.defineProperty(e.prototype, "fsPath", {
  5785. get: function () {
  5786. return v(this)
  5787. }, enumerable: !0,
  5788. configurable: !0
  5789. }), e.prototype.with = function (e) {
  5790. if (!e) return this;
  5791. var t = e.scheme, n = e.authority, i = e.path, o = e.query, r = e.fragment;
  5792. return void 0 === t ? t = this.scheme : null === t && (t = l), void 0 === n ? n = this.authority : null === n && (n = l), void 0 === i ? i = this.path : null === i && (i = l), void 0 === o ? o = this.query : null === o && (o = l), void 0 === r ? r = this.fragment : null === r && (r = l), t === this.scheme && n === this.authority && i === this.path && o === this.query && r === this.fragment ? this : new p(t, n, i, o, r)
  5793. }, e.parse = function (e, t) {
  5794. void 0 === t && (t = !1);
  5795. var n = d.exec(e);
  5796. return n ? new p(n[2] || l, C(n[4] || l), C(n[5] || l), C(n[7] || l), C(n[9] || l), t) : new p(l, l, l, l, l)
  5797. }, e.file = function (e) {
  5798. var t = l;
  5799. if (n.isWindows && (e = e.replace(/\\/g, u)), e[0] === u && e[1] === u) {
  5800. var i = e.indexOf(u, 2);
  5801. -1 === i ? (t = e.substring(2), e = u) : (t = e.substring(2, i), e = e.substring(i) || u)
  5802. }
  5803. return new p("file", t, e, l, l)
  5804. }, e.from = function (e) {
  5805. return new p(e.scheme, e.authority, e.path, e.query, e.fragment)
  5806. }, e.prototype.toString = function (e) {
  5807. return void 0 === e && (e = !1), _(this, e)
  5808. }, e.prototype.toJSON = function () {
  5809. return this
  5810. }, e.revive = function (t) {
  5811. if (t) {
  5812. if (t instanceof e) return t;
  5813. var n = new p(t);
  5814. return n._formatted = t.external, n._fsPath = t._sep === h ? t.fsPath : null, n
  5815. }
  5816. return t
  5817. }, e
  5818. }();
  5819. t.URI = c;
  5820. var h = n.isWindows ? 1 : void 0, p = function (e) {
  5821. function t() {
  5822. var t = null !== e && e.apply(this, arguments) || this;
  5823. return t._formatted = null, t._fsPath = null, t
  5824. }
  5825. return r(t, e), Object.defineProperty(t.prototype, "fsPath", {
  5826. get: function () {
  5827. return this._fsPath || (this._fsPath = v(this)), this._fsPath
  5828. }, enumerable: !0, configurable: !0
  5829. }), t.prototype.toString = function (e) {
  5830. return void 0 === e && (e = !1), e ? _(this, !0) : (this._formatted || (this._formatted = _(this, !1)), this._formatted)
  5831. }, t.prototype.toJSON = function () {
  5832. var e = {$mid: 1};
  5833. return this._fsPath && (e.fsPath = this._fsPath, e._sep = h), this._formatted && (e.external = this._formatted), this.path && (e.path = this.path), this.scheme && (e.scheme = this.scheme), this.authority && (e.authority = this.authority), this.query && (e.query = this.query), this.fragment && (e.fragment = this.fragment), e
  5834. }, t
  5835. }(c),
  5836. g = ((i = {})[58] = "%3A", i[47] = "%2F", i[63] = "%3F", i[35] = "%23", i[91] = "%5B", i[93] = "%5D", i[64] = "%40", i[33] = "%21",
  5837. i[36] = "%24", i[38] = "%26", i[39] = "%27", i[40] = "%28", i[41] = "%29", i[42] = "%2A", i[43] = "%2B", i[44] = "%2C", i[59] = "%3B", i[61] = "%3D", i[32] = "%20", i);
  5838. function f(e, t) {
  5839. for (var n = void 0, i = -1, o = 0; o < e.length; o++) {
  5840. var r = e.charCodeAt(o);
  5841. if (r >= 97 && r <= 122 || r >= 65 && r <= 90 || r >= 48 && r <= 57 || 45 === r || 46 === r || 95 === r || 126 === r || t && 47 === r) -1 !== i && (n += encodeURIComponent(e.substring(i, o)), i = -1), void 0 !== n && (n += e.charAt(o)); else {
  5842. void 0 === n && (n = e.substr(0, o));
  5843. var s = g[r];
  5844. void 0 !== s ? (-1 !== i && (n += encodeURIComponent(e.substring(i, o)), i = -1), n += s) : -1 === i && (i = o)
  5845. }
  5846. }
  5847. return -1 !== i && (n += encodeURIComponent(e.substring(i))), void 0 !== n ? n : e
  5848. }
  5849. function m(e) {
  5850. for (var t = void 0, n = 0; n < e.length; n++) {
  5851. var i = e.charCodeAt(n);
  5852. 35 === i || 63 === i ? (void 0 === t && (t = e.substr(0, n)), t += g[i]) : void 0 !== t && (t += e[n])
  5853. }
  5854. return void 0 !== t ? t : e
  5855. }
  5856. function v(e) {
  5857. var t
  5858. ;
  5859. return t = e.authority && e.path.length > 1 && "file" === e.scheme ? "//" + e.authority + e.path : 47 === e.path.charCodeAt(0) && (e.path.charCodeAt(1) >= 65 && e.path.charCodeAt(1) <= 90 || e.path.charCodeAt(1) >= 97 && e.path.charCodeAt(1) <= 122) && 58 === e.path.charCodeAt(2) ? e.path[1].toLowerCase() + e.path.substr(2) : e.path, n.isWindows && (t = t.replace(/\//g, "\\")), t
  5860. }
  5861. function _(e, t) {
  5862. var n = t ? m : f, i = "", o = e.scheme, r = e.authority, s = e.path, a = e.query, l = e.fragment;
  5863. if (o && (i += o, i += ":"), (r || "file" === o) && (i += u, i += u), r) {
  5864. var d = r.indexOf("@");
  5865. if (-1 !== d) {
  5866. var c = r.substr(0, d);
  5867. r = r.substr(d + 1), -1 === (d = c.indexOf(":")) ? i += n(c, !1) : (i += n(c.substr(0, d), !1), i += ":", i += n(c.substr(d + 1), !1)), i += "@"
  5868. }
  5869. -1 === (d = (r = r.toLowerCase()).indexOf(":")) ? i += n(r, !1) : (i += n(r.substr(0, d), !1), i += r.substr(d))
  5870. }
  5871. if (s) {
  5872. if (s.length >= 3 && 47 === s.charCodeAt(0) && 58 === s.charCodeAt(2)) (h = s.charCodeAt(1)) >= 65 && h <= 90 && (s = "/" + String.fromCharCode(h + 32) + ":" + s.substr(3)); else if (s.length >= 2 && 58 === s.charCodeAt(1)) {
  5873. var h;
  5874. (h = s.charCodeAt(0)) >= 65 && h <= 90 && (s = String.fromCharCode(h + 32) + ":" + s.substr(2))
  5875. }
  5876. i += n(s, !0)
  5877. }
  5878. return a && (i += "?", i += n(a, !1)), l && (i += "#", i += t ? l : f(l, !1)), i
  5879. }
  5880. var y = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
  5881. function C(e) {
  5882. return e.match(y) ? e.replace(y, (function (e) {
  5883. return function e(t) {
  5884. try {
  5885. return decodeURIComponent(t)
  5886. } catch (n) {
  5887. return t.length > 3 ? t.substr(0, 3) + e(t.substr(3)) : t
  5888. }
  5889. }(e)
  5890. })) : e
  5891. }
  5892. })), define(n[180], i([0, 1, 25]), (function (e, t, n) {
  5893. "use strict";
  5894. function i(e, t) {
  5895. if (void 0 === t && (t = 0), !e || t > 200) return e;
  5896. if ("object" == typeof e) {
  5897. switch (e.$mid) {
  5898. case 1:
  5899. return n.URI.revive(e);
  5900. case 2:
  5901. return new RegExp(e.source, e.flags)
  5902. }
  5903. for (var o in e) Object.hasOwnProperty.call(e, o) && (e[o] = i(e[o], t + 1))
  5904. }
  5905. return e
  5906. }
  5907. Object.defineProperty(t, "__esModule", {value: !0}), t.parse = function (e) {
  5908. var t = JSON.parse(e);
  5909. return t = i(t)
  5910. }, t.revive = i
  5911. })), define(n[46], i([0, 1, 25, 16]), (function (e, t, n, i) {
  5912. "use strict";
  5913. var o;
  5914. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  5915. e.inMemory = "inmemory", e.vscode = "vscode", e.internal = "private", e.walkThrough = "walkThrough", e.walkThroughSnippet = "walkThroughSnippet", e.http = "http", e.https = "https", e.file = "file", e.mailto = "mailto",
  5916. e.untitled = "untitled", e.data = "data", e.command = "command", e.vscodeRemote = "vscode-remote", e.vscodeRemoteResource = "vscode-remote-resource", e.userData = "vscode-userdata"
  5917. }(o = t.Schemas || (t.Schemas = {}));
  5918. var r = function () {
  5919. function e() {
  5920. this._hosts = Object.create(null), this._ports = Object.create(null), this._connectionTokens = Object.create(null), this._preferredWebSchema = "http", this._delegate = null
  5921. }
  5922. return e.prototype.setPreferredWebSchema = function (e) {
  5923. this._preferredWebSchema = e
  5924. }, e.prototype.rewrite = function (e) {
  5925. if (this._delegate) return this._delegate(e);
  5926. var t = e.authority, r = this._hosts[t];
  5927. r && -1 !== r.indexOf(":") && (r = "[" + r + "]");
  5928. var s = this._ports[t], a = this._connectionTokens[t], l = "path=" + encodeURIComponent(e.path);
  5929. return "string" == typeof a && (l += "&tkn=" + encodeURIComponent(a)), n.URI.from({
  5930. scheme: i.isWeb ? this._preferredWebSchema : o.vscodeRemoteResource,
  5931. authority: r + ":" + s,
  5932. path: "/vscode-remote-resource",
  5933. query: l
  5934. })
  5935. }, e
  5936. }();
  5937. t.RemoteAuthorities = new r
  5938. }));
  5939. a = this && this.__spreadArrays || function () {
  5940. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  5941. var i = Array(e), o = 0;
  5942. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  5943. return i
  5944. };
  5945. define(n[6], i([0, 1, 24, 52, 56, 45, 15, 10, 4, 2, 16, 19, 46, 88]), (function (e, t, n, i, o, s, u, d, c, h, p, g, f, m) {
  5946. "use strict";
  5947. Object.defineProperty(t, "__esModule", {value: !0}), t.clearNode = function (e) {
  5948. for (; e.firstChild;) e.removeChild(e.firstChild)
  5949. }, t.removeNode = function (e) {
  5950. e.parentNode && e.parentNode.removeChild(e)
  5951. }, t.isInDOM = function (e) {
  5952. for (; e;) {
  5953. if (e === document.body) return !0;
  5954. e = e.parentNode || e.host
  5955. }
  5956. return !1
  5957. };
  5958. var v = new (function () {
  5959. function e() {
  5960. this._lastStart = -1, this._lastEnd = -1
  5961. }
  5962. return e.prototype._findClassName = function (e, t) {
  5963. var n = e.className;
  5964. if (n) {
  5965. t = t.trim();
  5966. var i = n.length, o = t.length;
  5967. if (0 !== o) if (i < o) this._lastStart = -1; else {
  5968. if (n === t) return this._lastStart = 0, void (this._lastEnd = i);
  5969. for (var r, s = -1; (s = n.indexOf(t, s + 1)) >= 0;) {
  5970. if (r = s + o, (0 === s || 32 === n.charCodeAt(s - 1)) && 32 === n.charCodeAt(r)) return this._lastStart = s, void (this._lastEnd = r + 1)
  5971. ;
  5972. if (s > 0 && 32 === n.charCodeAt(s - 1) && r === i) return this._lastStart = s - 1, void (this._lastEnd = r);
  5973. if (0 === s && r === i) return this._lastStart = 0, void (this._lastEnd = r)
  5974. }
  5975. this._lastStart = -1
  5976. } else this._lastStart = -1
  5977. } else this._lastStart = -1
  5978. }, e.prototype.hasClass = function (e, t) {
  5979. return this._findClassName(e, t), -1 !== this._lastStart
  5980. }, e.prototype.addClasses = function (e) {
  5981. for (var t = this, n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
  5982. n.forEach((function (n) {
  5983. return n.split(" ").forEach((function (n) {
  5984. return t.addClass(e, n)
  5985. }))
  5986. }))
  5987. }, e.prototype.addClass = function (e, t) {
  5988. e.className ? (this._findClassName(e, t), -1 === this._lastStart && (e.className = e.className + " " + t)) : e.className = t
  5989. }, e.prototype.removeClass = function (e, t) {
  5990. this._findClassName(e, t), -1 !== this._lastStart && (e.className = e.className.substring(0, this._lastStart) + e.className.substring(this._lastEnd))
  5991. }, e.prototype.removeClasses = function (e) {
  5992. for (var t = this, n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
  5993. n.forEach((function (n) {
  5994. return n.split(" ").forEach((function (n) {
  5995. return t.removeClass(e, n)
  5996. }))
  5997. }))
  5998. }, e.prototype.toggleClass = function (e, t, n) {
  5999. this._findClassName(e, t), -1 === this._lastStart || void 0 !== n && n || this.removeClass(e, t), -1 !== this._lastStart || void 0 !== n && !n || this.addClass(e, t)
  6000. }, e
  6001. }()), _ = new (function () {
  6002. function e() {
  6003. }
  6004. return e.prototype.hasClass = function (e, t) {
  6005. return Boolean(t) && e.classList && e.classList.contains(t)
  6006. }, e.prototype.addClasses = function (e) {
  6007. for (var t = this, n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
  6008. n.forEach((function (n) {
  6009. return n.split(" ").forEach((function (n) {
  6010. return t.addClass(e, n)
  6011. }))
  6012. }))
  6013. }, e.prototype.addClass = function (e, t) {
  6014. t && e.classList && e.classList.add(t)
  6015. }, e.prototype.removeClass = function (e, t) {
  6016. t && e.classList && e.classList.remove(t)
  6017. }, e.prototype.removeClasses = function (e) {
  6018. for (var t = this, n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
  6019. n.forEach((function (n) {
  6020. return n.split(" ").forEach((function (n) {
  6021. return t.removeClass(e, n)
  6022. }))
  6023. }))
  6024. }, e.prototype.toggleClass = function (e, t, n) {
  6025. e.classList && e.classList.toggle(t, n)
  6026. }, e
  6027. }()), y = n.isIE ? v : _;
  6028. t.hasClass = y.hasClass.bind(y),
  6029. t.addClass = y.addClass.bind(y), t.addClasses = y.addClasses.bind(y), t.removeClass = y.removeClass.bind(y), t.removeClasses = y.removeClasses.bind(y), t.toggleClass = y.toggleClass.bind(y);
  6030. var C = function () {
  6031. function e(e, t, n, i) {
  6032. this._node = e, this._type = t, this._handler = n, this._options = i || !1, this._node.addEventListener(this._type, this._handler, this._options)
  6033. }
  6034. return e.prototype.dispose = function () {
  6035. this._handler && (this._node.removeEventListener(this._type, this._handler, this._options), this._node = null, this._handler = null)
  6036. }, e
  6037. }();
  6038. function b(e, t, n, i) {
  6039. return new C(e, t, n, i)
  6040. }
  6041. function S(e) {
  6042. return function (t) {
  6043. return e(new s.StandardMouseEvent(t))
  6044. }
  6045. }
  6046. function w(e, n, i) {
  6047. return b(e, p.isIOS && m.BrowserFeatures.pointerEvents ? t.EventType.POINTER_DOWN : t.EventType.MOUSE_DOWN, n, i)
  6048. }
  6049. t.addDisposableListener = b, t.addStandardDisposableListener = function (e, t, n, i) {
  6050. var r = n;
  6051. return "click" === t || "mousedown" === t ? r = S(n) : "keydown" !== t && "keypress" !== t && "keyup" !== t || (r = function (e) {
  6052. return function (t) {
  6053. return e(new o.StandardKeyboardEvent(t))
  6054. }
  6055. }(n)), b(e, t, r, i)
  6056. },
  6057. t.addStandardDisposableGenericMouseDownListner = function (e, t, n) {
  6058. return w(e, S(t), n)
  6059. }, t.addDisposableGenericMouseDownListner = w, t.addDisposableGenericMouseUpListner = function (e, n, i) {
  6060. return b(e, p.isIOS && m.BrowserFeatures.pointerEvents ? t.EventType.POINTER_UP : t.EventType.MOUSE_UP, n, i)
  6061. }, t.addDisposableNonBubblingMouseOutListener = function (e, t) {
  6062. return b(e, "mouseout", (function (n) {
  6063. for (var i = n.relatedTarget; i && i !== e;) i = i.parentNode;
  6064. i !== e && t(n)
  6065. }))
  6066. }, t.addDisposableNonBubblingPointerOutListener = function (e, t) {
  6067. return b(e, "pointerout", (function (n) {
  6068. for (var i = n.relatedTarget; i && i !== e;) i = i.parentNode;
  6069. i !== e && t(n)
  6070. }))
  6071. };
  6072. var E = null;
  6073. var L, D, N, x, I, M = function () {
  6074. function e(e, t) {
  6075. void 0 === t && (t = 0), this._runner = e, this.priority = t, this._canceled = !1
  6076. }
  6077. return e.prototype.dispose = function () {
  6078. this._canceled = !0
  6079. }, e.prototype.execute = function () {
  6080. if (!this._canceled)
  6081. // try {
  6082. this._runner()
  6083. // } catch (e) {
  6084. // d.onUnexpectedError(e)
  6085. // }
  6086. }, e.sort = function (e, t) {
  6087. return t.priority - e.priority
  6088. }, e
  6089. }();
  6090. L = [], D = null, N = !1, x = !1, I = function () {
  6091. for (N = !1, D = L, L = [], x = !0; D.length > 0;) D.sort(M.sort),
  6092. D.shift().execute();
  6093. x = !1
  6094. }, t.scheduleAtNextAnimationFrame = function (e, t) {
  6095. void 0 === t && (t = 0);
  6096. var n, i = new M(e, t);
  6097. return L.push(i), N || (N = !0, n = I, E || (E = self.requestAnimationFrame || self.msRequestAnimationFrame || self.webkitRequestAnimationFrame || self.mozRequestAnimationFrame || self.oRequestAnimationFrame || function (e) {
  6098. return setTimeout((function () {
  6099. return e((new Date).getTime())
  6100. }), 0)
  6101. }), E.call(self, n)), i
  6102. }, t.runAtThisOrScheduleAtNextAnimationFrame = function (e, n) {
  6103. if (x) {
  6104. var i = new M(e, n);
  6105. return D.push(i), i
  6106. }
  6107. return t.scheduleAtNextAnimationFrame(e, n)
  6108. };
  6109. var k = 16, T = function (e, t) {
  6110. return t
  6111. }, R = function (e) {
  6112. function t(t, n, i, o, r) {
  6113. void 0 === o && (o = T), void 0 === r && (r = k);
  6114. var s = e.call(this) || this, a = null, l = 0, d = s._register(new u.TimeoutTimer), c = function () {
  6115. l = (new Date).getTime(), i(a), a = null
  6116. };
  6117. return s._register(b(t, n, (function (e) {
  6118. a = o(a, e);
  6119. var t = (new Date).getTime() - l;
  6120. t >= r ? (d.cancel(), c()) : d.setIfNotSet(c, r - t)
  6121. }))), s
  6122. }
  6123. return r(t, e), t
  6124. }(h.Disposable);
  6125. function O(e) {
  6126. return document.defaultView.getComputedStyle(e, null)
  6127. }
  6128. t.addDisposableThrottledListener = function (e, t, n, i, o) {
  6129. return new R(e, t, n, i, o)
  6130. }, t.getComputedStyle = O, t.getClientArea = function (e) {
  6131. if (e !== document.body) return new A(e.clientWidth, e.clientHeight);
  6132. if (p.isIOS && window.visualViewport) {
  6133. var t = window.visualViewport.width, i = window.visualViewport.height - (n.isStandalone ? 24 : 0);
  6134. return new A(t, i)
  6135. }
  6136. if (window.innerWidth && window.innerHeight) return new A(window.innerWidth, window.innerHeight);
  6137. if (document.body && document.body.clientWidth && document.body.clientHeight) return new A(document.body.clientWidth, document.body.clientHeight);
  6138. if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientHeight) return new A(document.documentElement.clientWidth, document.documentElement.clientHeight);
  6139. throw new Error("Unable to figure out browser width and height")
  6140. };
  6141. var P = function () {
  6142. function e() {
  6143. }
  6144. return e.convertToPixels = function (e, t) {
  6145. return parseFloat(t) || 0
  6146. }, e.getDimension = function (t, n, i) {
  6147. var o = O(t), r = "0"
  6148. ;
  6149. return o && (r = o.getPropertyValue ? o.getPropertyValue(n) : o.getAttribute(i)), e.convertToPixels(t, r)
  6150. }, e.getBorderLeftWidth = function (t) {
  6151. return e.getDimension(t, "border-left-width", "borderLeftWidth")
  6152. }, e.getBorderRightWidth = function (t) {
  6153. return e.getDimension(t, "border-right-width", "borderRightWidth")
  6154. }, e.getBorderTopWidth = function (t) {
  6155. return e.getDimension(t, "border-top-width", "borderTopWidth")
  6156. }, e.getBorderBottomWidth = function (t) {
  6157. return e.getDimension(t, "border-bottom-width", "borderBottomWidth")
  6158. }, e.getPaddingLeft = function (t) {
  6159. return e.getDimension(t, "padding-left", "paddingLeft")
  6160. }, e.getPaddingRight = function (t) {
  6161. return e.getDimension(t, "padding-right", "paddingRight")
  6162. }, e.getPaddingTop = function (t) {
  6163. return e.getDimension(t, "padding-top", "paddingTop")
  6164. }, e.getPaddingBottom = function (t) {
  6165. return e.getDimension(t, "padding-bottom", "paddingBottom")
  6166. }, e.getMarginLeft = function (t) {
  6167. return e.getDimension(t, "margin-left", "marginLeft")
  6168. }, e.getMarginTop = function (t) {
  6169. return e.getDimension(t, "margin-top", "marginTop")
  6170. }, e.getMarginRight = function (t) {
  6171. return e.getDimension(t, "margin-right", "marginRight")
  6172. }, e.getMarginBottom = function (t) {
  6173. return e.getDimension(t, "margin-bottom", "marginBottom")
  6174. }, e
  6175. }(), A = function (e, t) {
  6176. this.width = e, this.height = t
  6177. };
  6178. function F(e, t) {
  6179. for (; e;) {
  6180. if (e === t) return !0;
  6181. e = e.parentNode
  6182. }
  6183. return !1
  6184. }
  6185. function W(e) {
  6186. return e && !!e.host && !!e.mode
  6187. }
  6188. function B(e) {
  6189. for (; e.parentNode;) {
  6190. if (e === document.body) return null;
  6191. e = e.parentNode
  6192. }
  6193. return W(e) ? e : null
  6194. }
  6195. function V(e) {
  6196. void 0 === e && (e = document.getElementsByTagName("head")[0]);
  6197. var t = document.createElement("style");
  6198. return t.type = "text/css", t.media = "screen", e.appendChild(t), t
  6199. }
  6200. t.Dimension = A, t.getTopLeftOffset = function (e) {
  6201. for (var t = e.offsetParent, n = e.offsetTop, i = e.offsetLeft; null !== (e = e.parentNode) && e !== document.body && e !== document.documentElement;) {
  6202. n -= e.scrollTop;
  6203. var o = W(e) ? null : O(e);
  6204. o && (i -= "rtl" !== o.direction ? e.scrollLeft : -e.scrollLeft), e === t && (i += P.getBorderLeftWidth(e), n += P.getBorderTopWidth(e), n += e.offsetTop, i += e.offsetLeft, t = e.offsetParent)
  6205. }
  6206. return {left: i, top: n}
  6207. }, t.getDomNodePagePosition = function (e) {
  6208. var n = e.getBoundingClientRect();
  6209. return {
  6210. left: n.left + t.StandardWindow.scrollX,
  6211. top: n.top + t.StandardWindow.scrollY,
  6212. width: n.width,
  6213. height: n.height
  6214. }
  6215. }, t.StandardWindow = new (function () {
  6216. function e() {
  6217. }
  6218. return Object.defineProperty(e.prototype, "scrollX", {
  6219. get: function () {
  6220. return "number" == typeof window.scrollX ? window.scrollX : document.body.scrollLeft + document.documentElement.scrollLeft
  6221. }, enumerable: !0, configurable: !0
  6222. }), Object.defineProperty(e.prototype, "scrollY", {
  6223. get: function () {
  6224. return "number" == typeof window.scrollY ? window.scrollY : document.body.scrollTop + document.documentElement.scrollTop
  6225. }, enumerable: !0, configurable: !0
  6226. }), e
  6227. }()), t.getTotalWidth = function (e) {
  6228. var t = P.getMarginLeft(e) + P.getMarginRight(e);
  6229. return e.offsetWidth + t
  6230. }, t.getContentWidth = function (e) {
  6231. var t = P.getBorderLeftWidth(e) + P.getBorderRightWidth(e), n = P.getPaddingLeft(e) + P.getPaddingRight(e);
  6232. return e.offsetWidth - t - n
  6233. }, t.getContentHeight = function (e) {
  6234. var t = P.getBorderTopWidth(e) + P.getBorderBottomWidth(e), n = P.getPaddingTop(e) + P.getPaddingBottom(e);
  6235. return e.offsetHeight - t - n
  6236. },
  6237. t.getTotalHeight = function (e) {
  6238. var t = P.getMarginTop(e) + P.getMarginBottom(e);
  6239. return e.offsetHeight + t
  6240. }, t.isAncestor = F, t.findParentWithClass = function (e, n, i) {
  6241. for (; e && e.nodeType === e.ELEMENT_NODE;) {
  6242. if (t.hasClass(e, n)) return e;
  6243. if (i) if ("string" == typeof i) {
  6244. if (t.hasClass(e, i)) return null
  6245. } else if (e === i) return null;
  6246. e = e.parentNode
  6247. }
  6248. return null
  6249. }, t.isShadowRoot = W, t.isInShadowDOM = function (e) {
  6250. return !!B(e)
  6251. }, t.getShadowRoot = B, t.createStyleSheet = V;
  6252. var z = null;
  6253. function H() {
  6254. return z || (z = V()), z
  6255. }
  6256. t.createCSSRule = function (e, t, n) {
  6257. void 0 === n && (n = H()), n && t && n.sheet.insertRule(e + "{" + t + "}", 0)
  6258. }, t.removeCSSRulesContainingSelector = function (e, t) {
  6259. if (void 0 === t && (t = H()), t) {
  6260. for (var n = function (e) {
  6261. return e && e.sheet && e.sheet.rules ? e.sheet.rules : e && e.sheet && e.sheet.cssRules ? e.sheet.cssRules : []
  6262. }(t), i = [], o = 0; o < n.length; o++) {
  6263. -1 !== n[o].selectorText.indexOf(e) && i.push(o)
  6264. }
  6265. for (o = i.length - 1; o >= 0; o--) t.sheet.deleteRule(i[o])
  6266. }
  6267. }, t.isHTMLElement = function (e) {
  6268. return "object" == typeof HTMLElement ? e instanceof HTMLElement : e && "object" == typeof e && 1 === e.nodeType && "string" == typeof e.nodeName
  6269. }, t.EventType = {
  6270. CLICK: "click",
  6271. DBLCLICK: "dblclick",
  6272. MOUSE_UP: "mouseup",
  6273. MOUSE_DOWN: "mousedown",
  6274. MOUSE_OVER: "mouseover",
  6275. MOUSE_MOVE: "mousemove",
  6276. MOUSE_OUT: "mouseout",
  6277. MOUSE_ENTER: "mouseenter",
  6278. MOUSE_LEAVE: "mouseleave",
  6279. POINTER_UP: "pointerup",
  6280. POINTER_DOWN: "pointerdown",
  6281. POINTER_MOVE: "pointermove",
  6282. CONTEXT_MENU: "contextmenu",
  6283. WHEEL: "wheel",
  6284. KEY_DOWN: "keydown",
  6285. KEY_PRESS: "keypress",
  6286. KEY_UP: "keyup",
  6287. LOAD: "load",
  6288. BEFORE_UNLOAD: "beforeunload",
  6289. UNLOAD: "unload",
  6290. ABORT: "abort",
  6291. ERROR: "error",
  6292. RESIZE: "resize",
  6293. SCROLL: "scroll",
  6294. FULLSCREEN_CHANGE: "fullscreenchange",
  6295. WK_FULLSCREEN_CHANGE: "webkitfullscreenchange",
  6296. SELECT: "select",
  6297. CHANGE: "change",
  6298. SUBMIT: "submit",
  6299. RESET: "reset",
  6300. FOCUS: "focus",
  6301. FOCUS_IN: "focusin",
  6302. FOCUS_OUT: "focusout",
  6303. BLUR: "blur",
  6304. INPUT: "input",
  6305. STORAGE: "storage",
  6306. DRAG_START: "dragstart",
  6307. DRAG: "drag",
  6308. DRAG_ENTER: "dragenter",
  6309. DRAG_LEAVE: "dragleave",
  6310. DRAG_OVER: "dragover",
  6311. DROP: "drop",
  6312. DRAG_END: "dragend",
  6313. ANIMATION_START: n.isWebKit ? "webkitAnimationStart" : "animationstart",
  6314. ANIMATION_END: n.isWebKit ? "webkitAnimationEnd" : "animationend",
  6315. ANIMATION_ITERATION: n.isWebKit ? "webkitAnimationIteration" : "animationiteration"
  6316. }, t.EventHelper = {
  6317. stop: function (e, t) {
  6318. e.preventDefault ? e.preventDefault() : e.returnValue = !1, t && (e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0)
  6319. }
  6320. }, t.saveParentsScrollTop = function (e) {
  6321. for (var t = [], n = 0; e && e.nodeType === e.ELEMENT_NODE; n++) t[n] = e.scrollTop, e = e.parentNode;
  6322. return t
  6323. }, t.restoreParentsScrollTop = function (e, t) {
  6324. for (var n = 0; e && e.nodeType === e.ELEMENT_NODE; n++) e.scrollTop !== t[n] && (e.scrollTop = t[n]), e = e.parentNode
  6325. };
  6326. var K = function (e) {
  6327. function n(n) {
  6328. var o = e.call(this) || this;
  6329. o._onDidFocus = o._register(new c.Emitter), o.onDidFocus = o._onDidFocus.event, o._onDidBlur = o._register(new c.Emitter), o.onDidBlur = o._onDidBlur.event;
  6330. var r = F(document.activeElement, n), s = !1, a = function () {
  6331. s = !1, r || (r = !0, o._onDidFocus.fire())
  6332. }, l = function () {
  6333. r && (s = !0, window.setTimeout((function () {
  6334. s && (s = !1, r = !1, o._onDidBlur.fire())
  6335. }), 0))
  6336. }
  6337. ;
  6338. return o._refreshStateHandler = function () {
  6339. F(document.activeElement, n) !== r && (r ? l() : a())
  6340. }, o._register(i.domEvent(n, t.EventType.FOCUS, !0)(a)), o._register(i.domEvent(n, t.EventType.BLUR, !0)(l)), o
  6341. }
  6342. return r(n, e), n
  6343. }(h.Disposable);
  6344. t.trackFocus = function (e) {
  6345. return new K(e)
  6346. }, t.append = function (e) {
  6347. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  6348. return t.forEach((function (t) {
  6349. return e.appendChild(t)
  6350. })), t[t.length - 1]
  6351. };
  6352. var U, j = /([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;
  6353. function q(e, t, n) {
  6354. for (var i = [], o = 3; o < arguments.length; o++) i[o - 3] = arguments[o];
  6355. var r = j.exec(t);
  6356. if (!r) throw new Error("Bad use of emmet");
  6357. n = l({}, n || {});
  6358. var s, a = r[1] || "div";
  6359. return s = e !== U.HTML ? document.createElementNS(e, a) : document.createElement(a), r[3] && (s.id = r[3]), r[4] && (s.className = r[4].replace(/\./g, " ").trim()), Object.keys(n).forEach((function (e) {
  6360. var t = n[e];
  6361. void 0 !== t && (/^on\w+$/.test(e) ? s[e] = t : "selected" === e ? t && s.setAttribute(e, "true") : s.setAttribute(e, t))
  6362. })), g.coalesce(i).forEach((function (e) {
  6363. e instanceof Node ? s.appendChild(e) : s.appendChild(document.createTextNode(e))
  6364. })), s
  6365. }
  6366. function G(e, t) {
  6367. for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
  6368. return q.apply(void 0, a([U.HTML, e, t], n))
  6369. }
  6370. function Y(e) {
  6371. return e && f.Schemas.vscodeRemote === e.scheme ? f.RemoteAuthorities.rewrite(e) : e
  6372. }
  6373. !function (e) {
  6374. e.HTML = "http://www.w3.org/1999/xhtml", e.SVG = "http://www.w3.org/2000/svg"
  6375. }(U = t.Namespace || (t.Namespace = {})), t.$ = G, G.SVG = function (e, t) {
  6376. for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
  6377. return q.apply(void 0, a([U.SVG, e, t], n))
  6378. }, t.show = function () {
  6379. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  6380. for (var n = 0, i = e; n < i.length; n++) {
  6381. var o = i[n];
  6382. o.style.display = "", o.removeAttribute("aria-hidden")
  6383. }
  6384. }, t.hide = function () {
  6385. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  6386. for (var n = 0, i = e; n < i.length; n++) {
  6387. var o = i[n];
  6388. o.style.display = "none", o.setAttribute("aria-hidden", "true")
  6389. }
  6390. }, t.removeTabIndexAndUpdateFocus = function (e) {
  6391. if (e && e.hasAttribute("tabIndex")) {
  6392. if (document.activeElement === e) {
  6393. var t = function (e, t) {
  6394. for (; e && e.nodeType === e.ELEMENT_NODE;) {
  6395. if (e instanceof HTMLElement && e.hasAttribute(t)) return e;
  6396. e = e.parentNode
  6397. }
  6398. return null
  6399. }(e.parentElement, "tabIndex");
  6400. t && t.focus()
  6401. }
  6402. e.removeAttribute("tabindex")
  6403. }
  6404. }, t.getElementsByTagName = function (e) {
  6405. return Array.prototype.slice.call(document.getElementsByTagName(e), 0)
  6406. }, t.computeScreenAwareSize = function (e) {
  6407. var t = window.devicePixelRatio * e;
  6408. return Math.max(1, Math.floor(t)) / window.devicePixelRatio
  6409. }, t.windowOpenNoOpener = function (e) {
  6410. if (p.isNative || n.isEdgeWebView) window.open(e); else {
  6411. var t = window.open();
  6412. t && (t.opener = null, t.location.href = e)
  6413. }
  6414. }, t.animate = function (e) {
  6415. var n = function () {
  6416. e(), i = t.scheduleAtNextAnimationFrame(n)
  6417. }, i = t.scheduleAtNextAnimationFrame(n);
  6418. return h.toDisposable((function () {
  6419. return i.dispose()
  6420. }))
  6421. }, f.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href) ? "https" : "http"), t.asDomUri = Y, t.asCSSUrl = function (e) {
  6422. return e ? "url('" + Y(e).toString(!0).replace(/'/g, "%27") + "')" : "url('')"
  6423. }
  6424. })), define(n[28], i([0, 1, 6]), (function (e, t, n) {
  6425. "use strict"
  6426. ;Object.defineProperty(t, "__esModule", {value: !0});
  6427. var i = function () {
  6428. function e(e) {
  6429. this.domNode = e, this._maxWidth = -1, this._width = -1, this._height = -1, this._top = -1, this._left = -1, this._bottom = -1, this._right = -1, this._fontFamily = "", this._fontWeight = "", this._fontSize = -1, this._fontFeatureSettings = "", this._lineHeight = -1, this._letterSpacing = -100, this._className = "", this._display = "", this._position = "", this._visibility = "", this._backgroundColor = "", this._layerHint = !1, this._contain = "none"
  6430. }
  6431. return e.prototype.setMaxWidth = function (e) {
  6432. this._maxWidth !== e && (this._maxWidth = e, this.domNode.style.maxWidth = this._maxWidth + "px")
  6433. }, e.prototype.setWidth = function (e) {
  6434. this._width !== e && (this._width = e, this.domNode.style.width = this._width + "px")
  6435. }, e.prototype.setHeight = function (e) {
  6436. this._height !== e && (this._height = e, this.domNode.style.height = this._height + "px")
  6437. }, e.prototype.setTop = function (e) {
  6438. this._top !== e && (this._top = e, this.domNode.style.top = this._top + "px")
  6439. }, e.prototype.unsetTop = function () {
  6440. -1 !== this._top && (this._top = -1, this.domNode.style.top = "")
  6441. },
  6442. e.prototype.setLeft = function (e) {
  6443. this._left !== e && (this._left = e, this.domNode.style.left = this._left + "px")
  6444. }, e.prototype.setBottom = function (e) {
  6445. this._bottom !== e && (this._bottom = e, this.domNode.style.bottom = this._bottom + "px")
  6446. }, e.prototype.setRight = function (e) {
  6447. this._right !== e && (this._right = e, this.domNode.style.right = this._right + "px")
  6448. }, e.prototype.setFontFamily = function (e) {
  6449. this._fontFamily !== e && (this._fontFamily = e, this.domNode.style.fontFamily = this._fontFamily)
  6450. }, e.prototype.setFontWeight = function (e) {
  6451. this._fontWeight !== e && (this._fontWeight = e, this.domNode.style.fontWeight = this._fontWeight)
  6452. }, e.prototype.setFontSize = function (e) {
  6453. this._fontSize !== e && (this._fontSize = e, this.domNode.style.fontSize = this._fontSize + "px")
  6454. }, e.prototype.setFontFeatureSettings = function (e) {
  6455. this._fontFeatureSettings !== e && (this._fontFeatureSettings = e, this.domNode.style.fontFeatureSettings = this._fontFeatureSettings)
  6456. }, e.prototype.setLineHeight = function (e) {
  6457. this._lineHeight !== e && (this._lineHeight = e, this.domNode.style.lineHeight = this._lineHeight + "px")
  6458. },
  6459. e.prototype.setLetterSpacing = function (e) {
  6460. this._letterSpacing !== e && (this._letterSpacing = e, this.domNode.style.letterSpacing = this._letterSpacing + "px")
  6461. }, e.prototype.setClassName = function (e) {
  6462. this._className !== e && (this._className = e, this.domNode.className = this._className)
  6463. }, e.prototype.toggleClassName = function (e, t) {
  6464. n.toggleClass(this.domNode, e, t), this._className = this.domNode.className
  6465. }, e.prototype.setDisplay = function (e) {
  6466. this._display !== e && (this._display = e, this.domNode.style.display = this._display)
  6467. }, e.prototype.setPosition = function (e) {
  6468. this._position !== e && (this._position = e, this.domNode.style.position = this._position)
  6469. }, e.prototype.setVisibility = function (e) {
  6470. this._visibility !== e && (this._visibility = e, this.domNode.style.visibility = this._visibility)
  6471. }, e.prototype.setBackgroundColor = function (e) {
  6472. this._backgroundColor !== e && (this._backgroundColor = e, this.domNode.style.backgroundColor = this._backgroundColor)
  6473. }, e.prototype.setLayerHinting = function (e) {
  6474. this._layerHint !== e && (this._layerHint = e,
  6475. this.domNode.style.transform = this._layerHint ? "translate3d(0px, 0px, 0px)" : "")
  6476. }, e.prototype.setContain = function (e) {
  6477. this._contain !== e && (this._contain = e, this.domNode.style.contain = this._contain)
  6478. }, e.prototype.setAttribute = function (e, t) {
  6479. this.domNode.setAttribute(e, t)
  6480. }, e.prototype.removeAttribute = function (e) {
  6481. this.domNode.removeAttribute(e)
  6482. }, e.prototype.appendChild = function (e) {
  6483. this.domNode.appendChild(e.domNode)
  6484. }, e.prototype.removeChild = function (e) {
  6485. this.domNode.removeChild(e.domNode)
  6486. }, e
  6487. }();
  6488. t.FastDomNode = i, t.createFastDomNode = function (e) {
  6489. return new i(e)
  6490. }
  6491. })), define(n[134], i([0, 1, 6]), (function (e, t, n) {
  6492. "use strict";
  6493. function i(e) {
  6494. var t = e.inline ? "span" : "div", n = document.createElement(t);
  6495. return e.className && (n.className = e.className), n
  6496. }
  6497. Object.defineProperty(t, "__esModule", {value: !0}), t.renderText = function (e, t) {
  6498. void 0 === t && (t = {});
  6499. var n = i(t);
  6500. return n.textContent = e, n
  6501. }, t.renderFormattedText = function (e, t) {
  6502. void 0 === t && (t = {});
  6503. var s = i(t);
  6504. return function e(t, i, o) {
  6505. var r
  6506. ;
  6507. if (2 === i.type) r = document.createTextNode(i.content || ""); else if (3 === i.type) r = document.createElement("b"); else if (4 === i.type) r = document.createElement("i"); else if (5 === i.type && o) {
  6508. var s = document.createElement("a");
  6509. s.href = "#", o.disposeables.add(n.addStandardDisposableListener(s, "click", (function (e) {
  6510. o.callback(String(i.index), e)
  6511. }))), r = s
  6512. } else 7 === i.type ? r = document.createElement("br") : 1 === i.type && (r = t);
  6513. r && t !== r && t.appendChild(r);
  6514. r && Array.isArray(i.children) && i.children.forEach((function (t) {
  6515. e(r, t, o)
  6516. }))
  6517. }(s, function (e) {
  6518. var t = {type: 1, children: []}, n = 0, i = t, s = [], a = new o(e);
  6519. for (; !a.eos();) {
  6520. var l = a.next(), u = "\\" === l && 0 !== r(a.peek());
  6521. if (u && (l = a.next()), u || 0 === r(l) || l !== a.peek()) if ("\n" === l) 2 === i.type && (i = s.pop()), i.children.push({type: 7}); else if (2 !== i.type) {
  6522. var d = {type: 2, content: l};
  6523. i.children.push(d), s.push(i), i = d
  6524. } else i.content += l; else {
  6525. a.advance(), 2 === i.type && (i = s.pop());
  6526. var c = r(l);
  6527. if (i.type === c || 5 === i.type && 6 === c) i = s.pop(); else {
  6528. var h = {type: c, children: []};
  6529. 5 === c && (h.index = n, n++), i.children.push(h), s.push(i), i = h
  6530. }
  6531. }
  6532. }
  6533. 2 === i.type && (i = s.pop());
  6534. s.length;
  6535. return t
  6536. }(e), t.actionHandler), s
  6537. }, t.createElement = i;
  6538. var o = function () {
  6539. function e(e) {
  6540. this.source = e, this.index = 0
  6541. }
  6542. return e.prototype.eos = function () {
  6543. return this.index >= this.source.length
  6544. }, e.prototype.next = function () {
  6545. var e = this.peek();
  6546. return this.advance(), e
  6547. }, e.prototype.peek = function () {
  6548. return this.source[this.index]
  6549. }, e.prototype.advance = function () {
  6550. this.index++
  6551. }, e
  6552. }();
  6553. function r(e) {
  6554. switch (e) {
  6555. case"*":
  6556. return 3;
  6557. case"_":
  6558. return 4;
  6559. case"[":
  6560. return 5;
  6561. case"]":
  6562. return 6;
  6563. default:
  6564. return 0
  6565. }
  6566. }
  6567. })), define(n[78], i([0, 1, 6, 16, 24, 174, 45, 2, 88]), (function (e, t, n, i, o, r, s, a, l) {
  6568. "use strict";
  6569. Object.defineProperty(t, "__esModule", {value: !0}), t.standardMouseMoveMerger = function (e, t) {
  6570. var n = new s.StandardMouseEvent(t);
  6571. return n.preventDefault(), {leftButton: n.leftButton, buttons: n.buttons, posx: n.posx, posy: n.posy}
  6572. };
  6573. var u = function () {
  6574. function e() {
  6575. this._hooks = new a.DisposableStore, this._mouseMoveEventMerger = null, this._mouseMoveCallback = null, this._onStopCallback = null
  6576. }
  6577. return e.prototype.dispose = function () {
  6578. this.stopMonitoring(!1), this._hooks.dispose()
  6579. }, e.prototype.stopMonitoring = function (e) {
  6580. if (this.isMonitoring()) {
  6581. this._hooks.clear(), this._mouseMoveEventMerger = null, this._mouseMoveCallback = null;
  6582. var t = this._onStopCallback;
  6583. this._onStopCallback = null, e && t && t()
  6584. }
  6585. }, e.prototype.isMonitoring = function () {
  6586. return !!this._mouseMoveEventMerger
  6587. }, e.prototype.startMonitoring = function (e, t, a, u, d) {
  6588. var c = this;
  6589. if (!this.isMonitoring()) {
  6590. this._mouseMoveEventMerger = a, this._mouseMoveCallback = u, this._onStopCallback = d;
  6591. var h = r.IframeUtils.getSameOriginWindowChain(),
  6592. p = i.isIOS && l.BrowserFeatures.pointerEvents ? "pointermove" : "mousemove",
  6593. g = i.isIOS && l.BrowserFeatures.pointerEvents ? "pointerup" : "mouseup",
  6594. f = h.map((function (e) {
  6595. return e.window.document
  6596. })), m = n.getShadowRoot(e);
  6597. m && f.unshift(m);
  6598. for (var v = 0, _ = f; v < _.length; v++) {
  6599. var y = _[v];
  6600. this._hooks.add(n.addDisposableThrottledListener(y, p, (function (e) {
  6601. o.isIE || e.buttons === t ? c._mouseMoveCallback(e) : c.stopMonitoring(!0)
  6602. }), (function (e, t) {
  6603. return c._mouseMoveEventMerger(e, t)
  6604. }))),
  6605. this._hooks.add(n.addDisposableListener(y, g, (function (e) {
  6606. return c.stopMonitoring(!0)
  6607. })))
  6608. }
  6609. if (r.IframeUtils.hasDifferentOriginAncestor()) {
  6610. var C = h[h.length - 1];
  6611. this._hooks.add(n.addDisposableListener(C.window.document, "mouseout", (function (e) {
  6612. "html" === new s.StandardMouseEvent(e).target.tagName.toLowerCase() && c.stopMonitoring(!0)
  6613. }))), this._hooks.add(n.addDisposableListener(C.window.document, "mouseover", (function (e) {
  6614. "html" === new s.StandardMouseEvent(e).target.tagName.toLowerCase() && c.stopMonitoring(!0)
  6615. }))), this._hooks.add(n.addDisposableListener(C.window.document.body, "mouseleave", (function (e) {
  6616. c.stopMonitoring(!0)
  6617. })))
  6618. }
  6619. }
  6620. }, e
  6621. }();
  6622. t.GlobalMouseMoveMonitor = u
  6623. })), define(n[248], i([0, 1, 6, 134, 10, 75, 127, 612, 613, 180, 31, 5, 25, 46, 100]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g) {
  6624. "use strict";
  6625. Object.defineProperty(t, "__esModule", {value: !0}), t.renderMarkdown = function (e, t) {
  6626. void 0 === t && (t = {});
  6627. var f, m = i.createElement(t), v = function (t) {
  6628. var n;
  6629. try {
  6630. n = u.parse(decodeURIComponent(t))
  6631. } catch (e) {
  6632. }
  6633. return n ? (n = d.cloneAndChange(n, (function (t) {
  6634. return e.uris && e.uris[t] ? h.URI.revive(e.uris[t]) : void 0
  6635. })), encodeURIComponent(JSON.stringify(n))) : t
  6636. }, _ = function (t, i) {
  6637. var o = e.uris && e.uris[t];
  6638. if (!o) return t;
  6639. var r = h.URI.revive(o);
  6640. return h.URI.parse(t).toString() === r.toString() ? t : (i && (r = n.asDomUri(r)), r.query && (r = r.with({query: v(r.query)})), r.toString(!0))
  6641. }, y = new Promise((function (e) {
  6642. return f = e
  6643. })), C = new a.Renderer;
  6644. C.image = function (e, t, n) {
  6645. var i, o = [], s = [];
  6646. return e && (e = (i = r.parseHrefAndDimensions(e)).href, o = i.dimensions, e = _(e, !0), s.push('src="' + e + '"')), n && s.push('alt="' + n + '"'), t && s.push('title="' + t + '"'), o.length && (s = s.concat(o)), "<img " + s.join(" ") + ">"
  6647. }, C.link = function (t, n, i) {
  6648. return t === i && (i = r.removeMarkdownEscapes(i)), t = _(t, !1), n = r.removeMarkdownEscapes(n),
  6649. !(t = r.removeMarkdownEscapes(t)) || t.match(/^data:|javascript:/i) || t.match(/^command:/i) && !e.isTrusted || t.match(/^command:(\/\/\/)?_workbench\.downloadResource/i) ? i : '<a href="#" data-href="' + (t = t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")) + '" title="' + (n || t) + '">' + i + "</a>"
  6650. }, C.paragraph = function (t) {
  6651. return "<p>" + (e.supportThemeIcons ? g.renderCodicons(t) : t) + "</p>"
  6652. }, t.codeBlockRenderer && (C.code = function (e, n) {
  6653. var i = t.codeBlockRenderer(n, e), o = s.defaultGenerator.nextId(),
  6654. r = Promise.all([i, y]).then((function (e) {
  6655. var t = e[0], n = m.querySelector('div[data-code="' + o + '"]');
  6656. n && (n.innerHTML = t)
  6657. })).catch((function (e) {
  6658. }));
  6659. return t.codeBlockRenderCallback && r.then(t.codeBlockRenderCallback), '<div class="code" data-code="' + o + '">' + c.escape(e) + "</div>"
  6660. });
  6661. var b = t.actionHandler;
  6662. b && b.disposeables.add(n.addStandardDisposableListener(m, "click", (function (e) {
  6663. var t = e.target;
  6664. if ("A" === t.tagName || (t = t.parentElement) && "A" === t.tagName) try {
  6665. var n = t.dataset.href;
  6666. n && b.callback(n, e)
  6667. } catch (e) {
  6668. o.onUnexpectedError(e)
  6669. } finally {
  6670. e.preventDefault()
  6671. }
  6672. })));
  6673. var S = {sanitize: !0, renderer: C},
  6674. w = [p.Schemas.http, p.Schemas.https, p.Schemas.mailto, p.Schemas.data, p.Schemas.file, p.Schemas.vscodeRemote, p.Schemas.vscodeRemoteResource];
  6675. e.isTrusted && w.push(p.Schemas.command);
  6676. var E = a.parse(e.supportThemeIcons ? g.markdownEscapeEscapedCodicons(e.value) : e.value, S);
  6677. return m.innerHTML = l.insane(E, {
  6678. allowedSchemes: w,
  6679. allowedAttributes: {
  6680. a: ["href", "name", "target", "data-href"],
  6681. iframe: ["allowfullscreen", "frameborder", "src"],
  6682. img: ["src", "title", "alt", "width", "height"],
  6683. div: ["class", "data-code"],
  6684. span: ["class"]
  6685. }
  6686. }), f(), m
  6687. }
  6688. }));
  6689. var h = this && this.__decorate || function (e, t, n, i) {
  6690. var o, r = arguments.length, s = r < 3 ? t : null === i ? i = Object.getOwnPropertyDescriptor(t, n) : i;
  6691. if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(e, t, n, i); else for (var a = e.length - 1; a >= 0; a--) (o = e[a]) && (s = (r < 3 ? o(s) : r > 3 ? o(t, n, s) : o(t, n)) || s);
  6692. return r > 3 && s && Object.defineProperty(t, n, s), s
  6693. };
  6694. define(n[57], i([0, 1, 19, 2, 6, 101]), (function (e, t, n, i, o, s) {
  6695. "use strict";
  6696. var a
  6697. ;Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  6698. e.Tap = "-monaco-gesturetap", e.Change = "-monaco-gesturechange", e.Start = "-monaco-gesturestart", e.End = "-monaco-gesturesend", e.Contextmenu = "-monaco-gesturecontextmenu"
  6699. }(a = t.EventType || (t.EventType = {}));
  6700. var l = function (e) {
  6701. function t() {
  6702. var t = e.call(this) || this;
  6703. return t.dispatched = !1, t.activeTouches = {}, t.handle = null, t.targets = [], t.ignoreTargets = [], t._lastSetTapCountTime = 0, t._register(o.addDisposableListener(document, "touchstart", (function (e) {
  6704. return t.onTouchStart(e)
  6705. }))), t._register(o.addDisposableListener(document, "touchend", (function (e) {
  6706. return t.onTouchEnd(e)
  6707. }))), t._register(o.addDisposableListener(document, "touchmove", (function (e) {
  6708. return t.onTouchMove(e)
  6709. }))), t
  6710. }
  6711. return r(t, e), t.addTarget = function (e) {
  6712. return t.isTouchDevice() ? (t.INSTANCE || (t.INSTANCE = new t), t.INSTANCE.targets.push(e), {
  6713. dispose: function () {
  6714. t.INSTANCE.targets = t.INSTANCE.targets.filter((function (t) {
  6715. return t !== e
  6716. }))
  6717. }
  6718. }) : i.Disposable.None
  6719. }, t.ignoreTarget = function (e) {
  6720. return t.isTouchDevice() ? (t.INSTANCE || (t.INSTANCE = new t), t.INSTANCE.ignoreTargets.push(e), {
  6721. dispose: function () {
  6722. t.INSTANCE.ignoreTargets = t.INSTANCE.ignoreTargets.filter((function (t) {
  6723. return t !== e
  6724. }))
  6725. }
  6726. }) : i.Disposable.None
  6727. }, t.isTouchDevice = function () {
  6728. return "ontouchstart" in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0
  6729. }, t.prototype.dispose = function () {
  6730. this.handle && (this.handle.dispose(), this.handle = null), e.prototype.dispose.call(this)
  6731. }, t.prototype.onTouchStart = function (e) {
  6732. var t = Date.now();
  6733. this.handle && (this.handle.dispose(), this.handle = null);
  6734. for (var n = 0, i = e.targetTouches.length; n < i; n++) {
  6735. var o = e.targetTouches.item(n);
  6736. this.activeTouches[o.identifier] = {
  6737. id: o.identifier,
  6738. initialTarget: o.target,
  6739. initialTimeStamp: t,
  6740. initialPageX: o.pageX,
  6741. initialPageY: o.pageY,
  6742. rollingTimestamps: [t],
  6743. rollingPageX: [o.pageX],
  6744. rollingPageY: [o.pageY]
  6745. };
  6746. var r = this.newGestureEvent(a.Start, o.target);
  6747. r.pageX = o.pageX, r.pageY = o.pageY, this.dispatchEvent(r)
  6748. }
  6749. this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = !1)
  6750. },
  6751. t.prototype.onTouchEnd = function (e) {
  6752. for (var i = Date.now(), o = Object.keys(this.activeTouches).length, r = function (r, l) {
  6753. var u = e.changedTouches.item(r);
  6754. if (!s.activeTouches.hasOwnProperty(String(u.identifier))) return console.warn("move of an UNKNOWN touch", u), "continue";
  6755. var d = s.activeTouches[u.identifier], c = Date.now() - d.initialTimeStamp;
  6756. if (c < t.HOLD_DELAY && Math.abs(d.initialPageX - n.tail(d.rollingPageX)) < 30 && Math.abs(d.initialPageY - n.tail(d.rollingPageY)) < 30) (h = s.newGestureEvent(a.Tap, d.initialTarget)).pageX = n.tail(d.rollingPageX), h.pageY = n.tail(d.rollingPageY), s.dispatchEvent(h); else if (c >= t.HOLD_DELAY && Math.abs(d.initialPageX - n.tail(d.rollingPageX)) < 30 && Math.abs(d.initialPageY - n.tail(d.rollingPageY)) < 30) {
  6757. var h;
  6758. (h = s.newGestureEvent(a.Contextmenu, d.initialTarget)).pageX = n.tail(d.rollingPageX), h.pageY = n.tail(d.rollingPageY), s.dispatchEvent(h)
  6759. } else if (1 === o) {
  6760. var p = n.tail(d.rollingPageX), g = n.tail(d.rollingPageY),
  6761. f = n.tail(d.rollingTimestamps) - d.rollingTimestamps[0], m = p - d.rollingPageX[0],
  6762. v = g - d.rollingPageY[0], _ = s.targets.filter((function (e) {
  6763. return d.initialTarget instanceof Node && e.contains(d.initialTarget)
  6764. }));
  6765. s.inertia(_, i, Math.abs(m) / f, m > 0 ? 1 : -1, p, Math.abs(v) / f, v > 0 ? 1 : -1, g)
  6766. }
  6767. s.dispatchEvent(s.newGestureEvent(a.End, d.initialTarget)), delete s.activeTouches[u.identifier]
  6768. }, s = this, l = 0, u = e.changedTouches.length; l < u; l++) r(l);
  6769. this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = !1)
  6770. }, t.prototype.newGestureEvent = function (e, t) {
  6771. var n = document.createEvent("CustomEvent");
  6772. return n.initEvent(e, !1, !0), n.initialTarget = t, n.tapCount = 0, n
  6773. }, t.prototype.dispatchEvent = function (e) {
  6774. var n = this;
  6775. if (e.type === a.Tap) {
  6776. var i = (new Date).getTime(), o = 0;
  6777. o = i - this._lastSetTapCountTime > t.CLEAR_TAP_COUNT_TIME ? 1 : 2, this._lastSetTapCountTime = i, e.tapCount = o
  6778. } else e.type !== a.Change && e.type !== a.Contextmenu || (this._lastSetTapCountTime = 0)
  6779. ;
  6780. for (var r = 0; r < this.ignoreTargets.length; r++) if (e.initialTarget instanceof Node && this.ignoreTargets[r].contains(e.initialTarget)) return;
  6781. this.targets.forEach((function (t) {
  6782. e.initialTarget instanceof Node && t.contains(e.initialTarget) && (t.dispatchEvent(e), n.dispatched = !0)
  6783. }))
  6784. }, t.prototype.inertia = function (e, n, i, r, s, l, u, d) {
  6785. var c = this;
  6786. this.handle = o.scheduleAtNextAnimationFrame((function () {
  6787. var o = Date.now(), h = o - n, p = 0, g = 0, f = !0;
  6788. i += t.SCROLL_FRICTION * h, l += t.SCROLL_FRICTION * h, i > 0 && (f = !1, p = r * i * h), l > 0 && (f = !1, g = u * l * h);
  6789. var m = c.newGestureEvent(a.Change);
  6790. m.translationX = p, m.translationY = g, e.forEach((function (e) {
  6791. return e.dispatchEvent(m)
  6792. })), f || c.inertia(e, o, i, r, s + p, l, u, d + g)
  6793. }))
  6794. }, t.prototype.onTouchMove = function (e) {
  6795. for (var t = Date.now(), i = 0, o = e.changedTouches.length; i < o; i++) {
  6796. var r = e.changedTouches.item(i);
  6797. if (this.activeTouches.hasOwnProperty(String(r.identifier))) {
  6798. var s = this.activeTouches[r.identifier], l = this.newGestureEvent(a.Change, s.initialTarget);
  6799. l.translationX = r.pageX - n.tail(s.rollingPageX),
  6800. l.translationY = r.pageY - n.tail(s.rollingPageY), l.pageX = r.pageX, l.pageY = r.pageY, this.dispatchEvent(l), s.rollingPageX.length > 3 && (s.rollingPageX.shift(), s.rollingPageY.shift(), s.rollingTimestamps.shift()), s.rollingPageX.push(r.pageX), s.rollingPageY.push(r.pageY), s.rollingTimestamps.push(t)
  6801. } else console.warn("end of an UNKNOWN touch", r)
  6802. }
  6803. this.dispatched && (e.preventDefault(), e.stopPropagation(), this.dispatched = !1)
  6804. }, t.SCROLL_FRICTION = -.005, t.HOLD_DELAY = 700, t.CLEAR_TAP_COUNT_TIME = 400, h([s.memoize], t, "isTouchDevice", null), t
  6805. }(i.Disposable);
  6806. t.Gesture = l
  6807. })), define(n[249], i([0, 1, 6]), (function (e, t, n) {
  6808. "use strict";
  6809. Object.defineProperty(t, "__esModule", {value: !0});
  6810. var i = function () {
  6811. function e(e) {
  6812. this.renderers = e, this.cache = new Map
  6813. }
  6814. return e.prototype.alloc = function (e) {
  6815. var t = this.getTemplateCache(e).pop();
  6816. if (!t) {
  6817. var i = n.$(".monaco-list-row");
  6818. t = {domNode: i, templateId: e, templateData: this.getRenderer(e).renderTemplate(i)}
  6819. }
  6820. return t
  6821. }, e.prototype.release = function (e) {
  6822. e && this.releaseRow(e)
  6823. }, e.prototype.releaseRow = function (e) {
  6824. var t = e.domNode, i = e.templateId;
  6825. t && (n.removeClass(t, "scrolling"), function (e) {
  6826. try {
  6827. e.parentElement && e.parentElement.removeChild(e)
  6828. } catch (e) {
  6829. }
  6830. }(t)), this.getTemplateCache(i).push(e)
  6831. }, e.prototype.getTemplateCache = function (e) {
  6832. var t = this.cache.get(e);
  6833. return t || (t = [], this.cache.set(e, t)), t
  6834. }, e.prototype.dispose = function () {
  6835. var e = this;
  6836. this.cache.forEach((function (t, n) {
  6837. for (var i = 0, o = t; i < o.length; i++) {
  6838. var r = o[i];
  6839. e.getRenderer(n).disposeTemplate(r.templateData), r.domNode = null, r.templateData = null
  6840. }
  6841. })), this.cache.clear()
  6842. }, e.prototype.getRenderer = function (e) {
  6843. var t = this.renderers.get(e);
  6844. if (!t) throw new Error("No renderer found for " + e);
  6845. return t
  6846. }, e
  6847. }();
  6848. t.RowCache = i
  6849. })), define(n[47], i([0, 1, 6, 56, 45, 2, 57]), (function (e, t, n, i, o, s, a) {
  6850. "use strict";
  6851. Object.defineProperty(t, "__esModule", {value: !0});
  6852. var l = function (e) {
  6853. function t() {
  6854. return null !== e && e.apply(this, arguments) || this
  6855. }
  6856. return r(t, e), t.prototype.onclick = function (e, t) {
  6857. this._register(n.addDisposableListener(e, n.EventType.CLICK, (function (e) {
  6858. return t(new o.StandardMouseEvent(e))
  6859. })))
  6860. },
  6861. t.prototype.onmousedown = function (e, t) {
  6862. this._register(n.addDisposableListener(e, n.EventType.MOUSE_DOWN, (function (e) {
  6863. return t(new o.StandardMouseEvent(e))
  6864. })))
  6865. }, t.prototype.onmouseover = function (e, t) {
  6866. this._register(n.addDisposableListener(e, n.EventType.MOUSE_OVER, (function (e) {
  6867. return t(new o.StandardMouseEvent(e))
  6868. })))
  6869. }, t.prototype.onnonbubblingmouseout = function (e, t) {
  6870. this._register(n.addDisposableNonBubblingMouseOutListener(e, (function (e) {
  6871. return t(new o.StandardMouseEvent(e))
  6872. })))
  6873. }, t.prototype.onkeydown = function (e, t) {
  6874. this._register(n.addDisposableListener(e, n.EventType.KEY_DOWN, (function (e) {
  6875. return t(new i.StandardKeyboardEvent(e))
  6876. })))
  6877. }, t.prototype.onkeyup = function (e, t) {
  6878. this._register(n.addDisposableListener(e, n.EventType.KEY_UP, (function (e) {
  6879. return t(new i.StandardKeyboardEvent(e))
  6880. })))
  6881. }, t.prototype.oninput = function (e, t) {
  6882. this._register(n.addDisposableListener(e, n.EventType.INPUT, t))
  6883. }, t.prototype.onblur = function (e, t) {
  6884. this._register(n.addDisposableListener(e, n.EventType.BLUR, t))
  6885. }, t.prototype.onfocus = function (e, t) {
  6886. this._register(n.addDisposableListener(e, n.EventType.FOCUS, t))
  6887. }, t.prototype.ignoreGesture = function (e) {
  6888. a.Gesture.ignoreTarget(e)
  6889. }, t
  6890. }(s.Disposable);
  6891. t.Widget = l
  6892. })), define(n[135], i([0, 1, 78, 47, 15]), (function (e, t, n, i, o) {
  6893. "use strict";
  6894. Object.defineProperty(t, "__esModule", {value: !0}), t.ARROW_IMG_SIZE = 11;
  6895. var s = function (e) {
  6896. function i(i) {
  6897. var r = e.call(this) || this;
  6898. return r._onActivate = i.onActivate, r.bgDomNode = document.createElement("div"), r.bgDomNode.className = "arrow-background", r.bgDomNode.style.position = "absolute", r.bgDomNode.style.width = i.bgWidth + "px", r.bgDomNode.style.height = i.bgHeight + "px", void 0 !== i.top && (r.bgDomNode.style.top = "0px"), void 0 !== i.left && (r.bgDomNode.style.left = "0px"), void 0 !== i.bottom && (r.bgDomNode.style.bottom = "0px"), void 0 !== i.right && (r.bgDomNode.style.right = "0px"), r.domNode = document.createElement("div"), r.domNode.className = i.className, r.domNode.style.position = "absolute", r.domNode.style.width = t.ARROW_IMG_SIZE + "px", r.domNode.style.height = t.ARROW_IMG_SIZE + "px",
  6899. void 0 !== i.top && (r.domNode.style.top = i.top + "px"), void 0 !== i.left && (r.domNode.style.left = i.left + "px"), void 0 !== i.bottom && (r.domNode.style.bottom = i.bottom + "px"), void 0 !== i.right && (r.domNode.style.right = i.right + "px"), r._mouseMoveMonitor = r._register(new n.GlobalMouseMoveMonitor), r.onmousedown(r.bgDomNode, (function (e) {
  6900. return r._arrowMouseDown(e)
  6901. })), r.onmousedown(r.domNode, (function (e) {
  6902. return r._arrowMouseDown(e)
  6903. })), r._mousedownRepeatTimer = r._register(new o.IntervalTimer), r._mousedownScheduleRepeatTimer = r._register(new o.TimeoutTimer), r
  6904. }
  6905. return r(i, e), i.prototype._arrowMouseDown = function (e) {
  6906. var t = this;
  6907. this._onActivate(), this._mousedownRepeatTimer.cancel(), this._mousedownScheduleRepeatTimer.cancelAndSet((function () {
  6908. t._mousedownRepeatTimer.cancelAndSet((function () {
  6909. return t._onActivate()
  6910. }), 1e3 / 24)
  6911. }), 200), this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, n.standardMouseMoveMerger, (function (e) {
  6912. }), (function () {
  6913. t._mousedownRepeatTimer.cancel(), t._mousedownScheduleRepeatTimer.cancel()
  6914. })), e.preventDefault()
  6915. }, i
  6916. }(i.Widget);
  6917. t.ScrollbarArrow = s
  6918. })), define(n[181], i([0, 1, 6, 28, 78, 135, 244, 47, 16]), (function (e, t, n, i, o, s, a, l, u) {
  6919. "use strict";
  6920. Object.defineProperty(t, "__esModule", {value: !0});
  6921. var d = function (e) {
  6922. function t(t) {
  6923. var n = e.call(this) || this;
  6924. return n._lazyRender = t.lazyRender, n._host = t.host, n._scrollable = t.scrollable, n._scrollbarState = t.scrollbarState, n._visibilityController = n._register(new a.ScrollbarVisibilityController(t.visibility, "visible scrollbar " + t.extraScrollbarClassName, "invisible scrollbar " + t.extraScrollbarClassName)), n._visibilityController.setIsNeeded(n._scrollbarState.isNeeded()), n._mouseMoveMonitor = n._register(new o.GlobalMouseMoveMonitor), n._shouldRender = !0, n.domNode = i.createFastDomNode(document.createElement("div")), n.domNode.setAttribute("role", "presentation"), n.domNode.setAttribute("aria-hidden", "true"), n._visibilityController.setDomNode(n.domNode), n.domNode.setPosition("absolute"), n.onmousedown(n.domNode.domNode, (function (e) {
  6925. return n._domNodeMouseDown(e)
  6926. })), n
  6927. }
  6928. return r(t, e),
  6929. t.prototype._createArrow = function (e) {
  6930. var t = this._register(new s.ScrollbarArrow(e));
  6931. this.domNode.domNode.appendChild(t.bgDomNode), this.domNode.domNode.appendChild(t.domNode)
  6932. }, t.prototype._createSlider = function (e, t, n, o) {
  6933. var r = this;
  6934. this.slider = i.createFastDomNode(document.createElement("div")), this.slider.setClassName("slider"), this.slider.setPosition("absolute"), this.slider.setTop(e), this.slider.setLeft(t), "number" == typeof n && this.slider.setWidth(n), "number" == typeof o && this.slider.setHeight(o), this.slider.setLayerHinting(!0), this.slider.setContain("strict"), this.domNode.domNode.appendChild(this.slider.domNode), this.onmousedown(this.slider.domNode, (function (e) {
  6935. e.leftButton && (e.preventDefault(), r._sliderMouseDown(e, (function () {
  6936. })))
  6937. })), this.onclick(this.slider.domNode, (function (e) {
  6938. e.leftButton && e.stopPropagation()
  6939. }))
  6940. }, t.prototype._onElementSize = function (e) {
  6941. return this._scrollbarState.setVisibleSize(e) && (this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = !0,
  6942. this._lazyRender || this.render()), this._shouldRender
  6943. }, t.prototype._onElementScrollSize = function (e) {
  6944. return this._scrollbarState.setScrollSize(e) && (this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = !0, this._lazyRender || this.render()), this._shouldRender
  6945. }, t.prototype._onElementScrollPosition = function (e) {
  6946. return this._scrollbarState.setScrollPosition(e) && (this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()), this._shouldRender = !0, this._lazyRender || this.render()), this._shouldRender
  6947. }, t.prototype.beginReveal = function () {
  6948. this._visibilityController.setShouldBeVisible(!0)
  6949. }, t.prototype.beginHide = function () {
  6950. this._visibilityController.setShouldBeVisible(!1)
  6951. }, t.prototype.render = function () {
  6952. this._shouldRender && (this._shouldRender = !1, this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize()),
  6953. this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition()))
  6954. }, t.prototype._domNodeMouseDown = function (e) {
  6955. e.target === this.domNode.domNode && this._onMouseDown(e)
  6956. }, t.prototype.delegateMouseDown = function (e) {
  6957. var t = this.domNode.domNode.getClientRects()[0].top, n = t + this._scrollbarState.getSliderPosition(),
  6958. i = t + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize(),
  6959. o = this._sliderMousePosition(e);
  6960. n <= o && o <= i ? e.leftButton && (e.preventDefault(), this._sliderMouseDown(e, (function () {
  6961. }))) : this._onMouseDown(e)
  6962. }, t.prototype._onMouseDown = function (e) {
  6963. var t, i;
  6964. if (e.target === this.domNode.domNode && "number" == typeof e.browserEvent.offsetX && "number" == typeof e.browserEvent.offsetY) t = e.browserEvent.offsetX, i = e.browserEvent.offsetY; else {
  6965. var o = n.getDomNodePagePosition(this.domNode.domNode);
  6966. t = e.posx - o.left, i = e.posy - o.top
  6967. }
  6968. this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t, i))),
  6969. e.leftButton && (e.preventDefault(), this._sliderMouseDown(e, (function () {
  6970. })))
  6971. }, t.prototype._sliderMouseDown = function (e, t) {
  6972. var n = this, i = this._sliderMousePosition(e), r = this._sliderOrthogonalMousePosition(e),
  6973. s = this._scrollbarState.clone();
  6974. this.slider.toggleClassName("active", !0), this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, o.standardMouseMoveMerger, (function (e) {
  6975. var t = n._sliderOrthogonalMousePosition(e), o = Math.abs(t - r);
  6976. if (u.isWindows && o > 140) n._setDesiredScrollPositionNow(s.getScrollPosition()); else {
  6977. var a = n._sliderMousePosition(e) - i;
  6978. n._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(a))
  6979. }
  6980. }), (function () {
  6981. n.slider.toggleClassName("active", !1), n._host.onDragEnd(), t()
  6982. })), this._host.onDragStart()
  6983. }, t.prototype._setDesiredScrollPositionNow = function (e) {
  6984. var t = {};
  6985. this.writeScrollPosition(t, e), this._scrollable.setScrollPositionNow(t)
  6986. }, t
  6987. }(l.Widget);
  6988. t.AbstractScrollbar = d
  6989. })), define(n[250], i([0, 1, 45, 181, 135, 175]), (function (e, t, n, i, o, s) {
  6990. "use strict";
  6991. Object.defineProperty(t, "__esModule", {value: !0})
  6992. ;var a = function (e) {
  6993. function t(t, i, r) {
  6994. var a = this, l = t.getScrollDimensions(), u = t.getCurrentScrollPosition();
  6995. if (a = e.call(this, {
  6996. lazyRender: i.lazyRender,
  6997. host: r,
  6998. scrollbarState: new s.ScrollbarState(i.horizontalHasArrows ? i.arrowSize : 0, 2 === i.horizontal ? 0 : i.horizontalScrollbarSize, 2 === i.vertical ? 0 : i.verticalScrollbarSize, l.width, l.scrollWidth, u.scrollLeft),
  6999. visibility: i.horizontal,
  7000. extraScrollbarClassName: "horizontal",
  7001. scrollable: t
  7002. }) || this, i.horizontalHasArrows) {
  7003. var d = (i.arrowSize - o.ARROW_IMG_SIZE) / 2,
  7004. c = (i.horizontalScrollbarSize - o.ARROW_IMG_SIZE) / 2;
  7005. a._createArrow({
  7006. className: "left-arrow",
  7007. top: c,
  7008. left: d,
  7009. bottom: void 0,
  7010. right: void 0,
  7011. bgWidth: i.arrowSize,
  7012. bgHeight: i.horizontalScrollbarSize,
  7013. onActivate: function () {
  7014. return a._host.onMouseWheel(new n.StandardWheelEvent(null, 1, 0))
  7015. }
  7016. }), a._createArrow({
  7017. className: "right-arrow",
  7018. top: c,
  7019. left: void 0,
  7020. bottom: void 0,
  7021. right: d,
  7022. bgWidth: i.arrowSize,
  7023. bgHeight: i.horizontalScrollbarSize,
  7024. onActivate: function () {
  7025. return a._host.onMouseWheel(new n.StandardWheelEvent(null, -1, 0))
  7026. }
  7027. })
  7028. }
  7029. return a._createSlider(Math.floor((i.horizontalScrollbarSize - i.horizontalSliderSize) / 2), 0, void 0, i.horizontalSliderSize), a
  7030. }
  7031. return r(t, e), t.prototype._updateSlider = function (e, t) {
  7032. this.slider.setWidth(e), this.slider.setLeft(t)
  7033. }, t.prototype._renderDomNode = function (e, t) {
  7034. this.domNode.setWidth(e), this.domNode.setHeight(t), this.domNode.setLeft(0), this.domNode.setBottom(0)
  7035. }, t.prototype.onDidScroll = function (e) {
  7036. return this._shouldRender = this._onElementScrollSize(e.scrollWidth) || this._shouldRender, this._shouldRender = this._onElementScrollPosition(e.scrollLeft) || this._shouldRender, this._shouldRender = this._onElementSize(e.width) || this._shouldRender, this._shouldRender
  7037. }, t.prototype._mouseDownRelativePosition = function (e, t) {
  7038. return e
  7039. }, t.prototype._sliderMousePosition = function (e) {
  7040. return e.posx
  7041. }, t.prototype._sliderOrthogonalMousePosition = function (e) {
  7042. return e.posy
  7043. }, t.prototype.writeScrollPosition = function (e, t) {
  7044. e.scrollLeft = t
  7045. }, t
  7046. }(i.AbstractScrollbar);
  7047. t.HorizontalScrollbar = a
  7048. })),
  7049. define(n[251], i([0, 1, 45, 181, 135, 175]), (function (e, t, n, i, o, s) {
  7050. "use strict";
  7051. Object.defineProperty(t, "__esModule", {value: !0});
  7052. var a = function (e) {
  7053. function t(t, i, r) {
  7054. var a = this, l = t.getScrollDimensions(), u = t.getCurrentScrollPosition();
  7055. if (a = e.call(this, {
  7056. lazyRender: i.lazyRender,
  7057. host: r,
  7058. scrollbarState: new s.ScrollbarState(i.verticalHasArrows ? i.arrowSize : 0, 2 === i.vertical ? 0 : i.verticalScrollbarSize, 0, l.height, l.scrollHeight, u.scrollTop),
  7059. visibility: i.vertical,
  7060. extraScrollbarClassName: "vertical",
  7061. scrollable: t
  7062. }) || this, i.verticalHasArrows) {
  7063. var d = (i.arrowSize - o.ARROW_IMG_SIZE) / 2,
  7064. c = (i.verticalScrollbarSize - o.ARROW_IMG_SIZE) / 2;
  7065. a._createArrow({
  7066. className: "up-arrow",
  7067. top: d,
  7068. left: c,
  7069. bottom: void 0,
  7070. right: void 0,
  7071. bgWidth: i.verticalScrollbarSize,
  7072. bgHeight: i.arrowSize,
  7073. onActivate: function () {
  7074. return a._host.onMouseWheel(new n.StandardWheelEvent(null, 0, 1))
  7075. }
  7076. }), a._createArrow({
  7077. className: "down-arrow",
  7078. top: void 0,
  7079. left: c,
  7080. bottom: d,
  7081. right: void 0,
  7082. bgWidth: i.verticalScrollbarSize,
  7083. bgHeight: i.arrowSize,
  7084. onActivate: function () {
  7085. return a._host.onMouseWheel(new n.StandardWheelEvent(null, 0, -1))
  7086. }
  7087. })
  7088. }
  7089. return a._createSlider(0, Math.floor((i.verticalScrollbarSize - i.verticalSliderSize) / 2), i.verticalSliderSize, void 0), a
  7090. }
  7091. return r(t, e), t.prototype._updateSlider = function (e, t) {
  7092. this.slider.setHeight(e), this.slider.setTop(t)
  7093. }, t.prototype._renderDomNode = function (e, t) {
  7094. this.domNode.setWidth(t), this.domNode.setHeight(e), this.domNode.setRight(0), this.domNode.setTop(0)
  7095. }, t.prototype.onDidScroll = function (e) {
  7096. return this._shouldRender = this._onElementScrollSize(e.scrollHeight) || this._shouldRender, this._shouldRender = this._onElementScrollPosition(e.scrollTop) || this._shouldRender, this._shouldRender = this._onElementSize(e.height) || this._shouldRender, this._shouldRender
  7097. }, t.prototype._mouseDownRelativePosition = function (e, t) {
  7098. return t
  7099. }, t.prototype._sliderMousePosition = function (e) {
  7100. return e.posy
  7101. }, t.prototype._sliderOrthogonalMousePosition = function (e) {
  7102. return e.posx
  7103. }, t.prototype.writeScrollPosition = function (e, t) {
  7104. e.scrollTop = t
  7105. }, t
  7106. }(i.AbstractScrollbar);
  7107. t.VerticalScrollbar = a
  7108. }));
  7109. a = this && this.__spreadArrays || function () {
  7110. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  7111. var i = Array(e), o = 0;
  7112. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  7113. return i
  7114. };
  7115. define(n[39], i([0, 1, 177, 77, 25, 5, 46, 16]), (function (e, t, n, i, o, r, s, l) {
  7116. "use strict";
  7117. function u(e) {
  7118. return !e || e.scheme !== s.Schemas.file || !l.isLinux
  7119. }
  7120. function d(e, t) {
  7121. return e === t || r.equalsIgnoreCase(e, t)
  7122. }
  7123. function c(e) {
  7124. return i.posix.basename(e.path)
  7125. }
  7126. function h(e) {
  7127. var t, i = e.path;
  7128. return t = e.authority && i.length > 1 && e.scheme === s.Schemas.file ? "//" + e.authority + i : l.isWindows && 47 === i.charCodeAt(0) && n.isWindowsDriveLetter(i.charCodeAt(1)) && 58 === i.charCodeAt(2) ? i.substr(1) : i, l.isWindows && (t = t.replace(/\//g, "\\")), t
  7129. }
  7130. Object.defineProperty(t, "__esModule", {value: !0}), t.hasToIgnoreCase = u, t.basenameOrAuthority = function (e) {
  7131. return c(e) || e.authority
  7132. }, t.isEqualAuthority = d, t.isEqual = function (e, t, n) {
  7133. if (void 0 === n && (n = u(e)), e === t) return !0;
  7134. if (!e || !t) return !1;
  7135. if (e.scheme !== t.scheme || !d(e.authority, t.authority)) return !1
  7136. ;
  7137. var i = e.path || "/", o = t.path || "/";
  7138. return i === o || n && r.equalsIgnoreCase(i || "/", o || "/")
  7139. }, t.basename = c, t.dirname = function (e) {
  7140. if (0 === e.path.length) return e;
  7141. if (e.scheme === s.Schemas.file) return o.URI.file(i.dirname(h(e)));
  7142. var t = i.posix.dirname(e.path);
  7143. return e.authority && t.length && 47 !== t.charCodeAt(0) && (console.error('dirname("' + e.toString + ")) resulted in a relative path"), t = "/"), e.with({path: t})
  7144. }, t.joinPath = function (e) {
  7145. for (var t, n, r = [], l = 1; l < arguments.length; l++) r[l - 1] = arguments[l];
  7146. return n = e.scheme === s.Schemas.file ? o.URI.file(i.join.apply(i, a([h(e)], r))).path : (t = i.posix).join.apply(t, a([e.path || "/"], r)), e.with({path: n})
  7147. }, t.normalizePath = function (e) {
  7148. return e.path.length ? (t = e.scheme === s.Schemas.file ? o.URI.file(i.normalize(h(e))).path : i.posix.normalize(e.path), e.with({path: t})) : e;
  7149. var t
  7150. }, t.originalFSPath = h, t.relativePath = function (e, t, o) {
  7151. if (void 0 === o && (o = u(e)), e.scheme === t.scheme && d(e.authority, t.authority)) {
  7152. if (e.scheme === s.Schemas.file) {
  7153. var r = i.relative(e.path, t.path);
  7154. return l.isWindows ? n.toSlashes(r) : r
  7155. }
  7156. var a = e.path || "/", c = t.path || "/";
  7157. if (o) {
  7158. for (var h = 0, p = Math.min(a.length, c.length); h < p && (a.charCodeAt(h) === c.charCodeAt(h) || a.charAt(h).toLowerCase() === c.charAt(h).toLowerCase()); h++) ;
  7159. a = c.substr(0, h) + a.substr(h)
  7160. }
  7161. return i.posix.relative(a, c)
  7162. }
  7163. }, function (e) {
  7164. e.META_DATA_LABEL = "label", e.META_DATA_DESCRIPTION = "description", e.META_DATA_SIZE = "size", e.META_DATA_MIME = "mime", e.parseMetaData = function (t) {
  7165. var n = new Map;
  7166. t.path.substring(t.path.indexOf(";") + 1, t.path.lastIndexOf(";")).split(";").forEach((function (e) {
  7167. var t = e.split(":"), i = t[0], o = t[1];
  7168. i && o && n.set(i, o)
  7169. }));
  7170. var i = t.path.substring(0, t.path.indexOf(";"));
  7171. return i && n.set(e.META_DATA_MIME, i), n
  7172. }
  7173. }(t.DataUri || (t.DataUri = {}))
  7174. })), define(n[136], i([0, 1, 25, 77, 5, 46, 16, 39]), (function (e, t, n, i, o, r, s, a) {
  7175. "use strict";
  7176. function l(e) {
  7177. return !(!s.isWindows || !e || ":" !== e[1])
  7178. }
  7179. function u(e) {
  7180. return l(e) ? e.charAt(0).toUpperCase() + e.slice(1) : e
  7181. }
  7182. Object.defineProperty(t, "__esModule", {value: !0}), t.getPathLabel = function (e, t, o) {
  7183. if ("string" == typeof e && (e = n.URI.file(e)), o) {
  7184. var d = o.getWorkspaceFolder(e)
  7185. ;
  7186. if (d) {
  7187. var h = o.getWorkspace().folders.length > 1, p = void 0;
  7188. if (p = a.isEqual(d.uri, e) ? "" : a.relativePath(d.uri, e), h) {
  7189. var g = d.name ? d.name : a.basename(d.uri);
  7190. p = p ? g + " • " + p : g
  7191. }
  7192. return p
  7193. }
  7194. }
  7195. if (e.scheme !== r.Schemas.file && e.scheme !== r.Schemas.untitled) return e.with({
  7196. query: null,
  7197. fragment: null
  7198. }).toString(!0);
  7199. if (l(e.fsPath)) return i.normalize(u(e.fsPath));
  7200. var f = i.normalize(e.fsPath);
  7201. return !s.isWindows && t && (f = c(f, t.userHome)), f
  7202. }, t.getBaseLabel = function (e) {
  7203. if (e) {
  7204. "string" == typeof e && (e = n.URI.file(e));
  7205. var t = a.basename(e) || (e.scheme === r.Schemas.file ? e.fsPath : e.path);
  7206. return l(t) ? u(t) : t
  7207. }
  7208. }, t.normalizeDriveLetter = u;
  7209. var d = Object.create(null);
  7210. function c(e, t) {
  7211. if (s.isWindows || !e || !t) return e;
  7212. var n = d.original === t ? d.normalized : void 0;
  7213. return n || (n = "" + o.rtrim(t, i.posix.sep) + i.posix.sep, d = {
  7214. original: t,
  7215. normalized: n
  7216. }), (s.isLinux ? o.startsWith(e, n) : o.startsWithIgnoreCase(e, n)) && (e = "~/" + e.substr(n.length)), e
  7217. }
  7218. t.tildify = c
  7219. })), define(n[252], i([0, 1, 77, 5, 178, 46, 39]), (function (e, t, n, i, o, r, s) {
  7220. "use strict";
  7221. Object.defineProperty(t, "__esModule", {value: !0}),
  7222. t.MIME_TEXT = "text/plain", t.MIME_UNKNOWN = "application/unknown";
  7223. var a = [], l = [], u = [];
  7224. function d(e, t, n) {
  7225. for (var r = null, s = null, a = null, l = n.length - 1; l >= 0; l--) {
  7226. var u = n[l];
  7227. if (t === u.filenameLowercase) {
  7228. r = u;
  7229. break
  7230. }
  7231. if (u.filepattern && (!s || u.filepattern.length > s.filepattern.length)) {
  7232. var d = u.filepatternOnPath ? e : t;
  7233. o.match(u.filepatternLowercase, d) && (s = u)
  7234. }
  7235. u.extension && (!a || u.extension.length > a.extension.length) && i.endsWith(t, u.extensionLowercase) && (a = u)
  7236. }
  7237. return r ? r.mime : s ? s.mime : a ? a.mime : null
  7238. }
  7239. t.registerTextMime = function (e, t) {
  7240. void 0 === t && (t = !1);
  7241. var i = function (e) {
  7242. return {
  7243. id: e.id,
  7244. mime: e.mime,
  7245. filename: e.filename,
  7246. extension: e.extension,
  7247. filepattern: e.filepattern,
  7248. firstline: e.firstline,
  7249. userConfigured: e.userConfigured,
  7250. filenameLowercase: e.filename ? e.filename.toLowerCase() : void 0,
  7251. extensionLowercase: e.extension ? e.extension.toLowerCase() : void 0,
  7252. filepatternLowercase: e.filepattern ? e.filepattern.toLowerCase() : void 0,
  7253. filepatternOnPath: !!e.filepattern && e.filepattern.indexOf(n.posix.sep) >= 0
  7254. }
  7255. }(e);
  7256. a.push(i), i.userConfigured ? u.push(i) : l.push(i),
  7257. t && !i.userConfigured && a.forEach((function (e) {
  7258. e.mime === i.mime || e.userConfigured || (i.extension && e.extension === i.extension && console.warn("Overwriting extension <<" + i.extension + ">> to now point to mime <<" + i.mime + ">>"), i.filename && e.filename === i.filename && console.warn("Overwriting filename <<" + i.filename + ">> to now point to mime <<" + i.mime + ">>"), i.filepattern && e.filepattern === i.filepattern && console.warn("Overwriting filepattern <<" + i.filepattern + ">> to now point to mime <<" + i.mime + ">>"), i.firstline && e.firstline === i.firstline && console.warn("Overwriting firstline <<" + i.firstline + ">> to now point to mime <<" + i.mime + ">>"))
  7259. }))
  7260. }, t.guessMimeTypes = function (e, o) {
  7261. var c;
  7262. if (e) switch (e.scheme) {
  7263. case r.Schemas.file:
  7264. c = e.fsPath;
  7265. break;
  7266. case r.Schemas.data:
  7267. c = s.DataUri.parseMetaData(e).get(s.DataUri.META_DATA_LABEL);
  7268. break;
  7269. default:
  7270. c = e.path
  7271. }
  7272. if (!c) return [t.MIME_UNKNOWN];
  7273. c = c.toLowerCase();
  7274. var h = n.basename(c), p = d(c, h, u);
  7275. if (p) return [p, t.MIME_TEXT];
  7276. var g = d(c, h, l);
  7277. if (g) return [g, t.MIME_TEXT];
  7278. if (o) {
  7279. var f = function (e) {
  7280. i.startsWithUTF8BOM(e) && (e = e.substr(1));
  7281. if (e.length > 0) for (var t = a.length - 1; t >= 0; t--) {
  7282. var n = a[t];
  7283. if (n.firstline) {
  7284. var o = e.match(n.firstline);
  7285. if (o && o.length > 0) return n.mime
  7286. }
  7287. }
  7288. return null
  7289. }(o);
  7290. if (f) return [f, t.MIME_TEXT]
  7291. }
  7292. return [t.MIME_UNKNOWN]
  7293. }
  7294. })), define(n[182], i([0, 1, 10, 2, 16, 21]), (function (e, t, n, i, o, s) {
  7295. "use strict";
  7296. Object.defineProperty(t, "__esModule", {value: !0});
  7297. var a = "$initialize", l = !1;
  7298. t.logOnceWebWorkerWarning = function (e) {
  7299. o.isWeb && (l || (l = !0, console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")), console.warn(e.message))
  7300. };
  7301. var u = function () {
  7302. function e(e) {
  7303. this._workerId = -1, this._handler = e, this._lastSentReq = 0, this._pendingReplies = Object.create(null)
  7304. }
  7305. return e.prototype.setWorkerId = function (e) {
  7306. this._workerId = e
  7307. }, e.prototype.sendMessage = function (e, t) {
  7308. var n = this, i = String(++this._lastSentReq);
  7309. return new Promise((function (o, r) {
  7310. n._pendingReplies[i] = {resolve: o, reject: r}, n._send({
  7311. vsWorker: n._workerId, req: i, method: e, args: t
  7312. })
  7313. }))
  7314. }, e.prototype.handleMessage = function (e) {
  7315. e && e.vsWorker && (-1 !== this._workerId && e.vsWorker !== this._workerId || this._handleMessage(e))
  7316. }, e.prototype._handleMessage = function (e) {
  7317. var t = this;
  7318. if (e.seq) {
  7319. var i = e;
  7320. if (!this._pendingReplies[i.seq]) return void console.warn("Got reply to unknown seq");
  7321. var o = this._pendingReplies[i.seq];
  7322. if (delete this._pendingReplies[i.seq], i.err) {
  7323. var r = i.err;
  7324. return i.err.$isError && ((r = new Error).name = i.err.name, r.message = i.err.message, r.stack = i.err.stack), void o.reject(r)
  7325. }
  7326. o.resolve(i.res)
  7327. } else {
  7328. var s = e, a = s.req;
  7329. this._handler.handleMessage(s.method, s.args).then((function (e) {
  7330. t._send({vsWorker: t._workerId, seq: a, res: e, err: void 0})
  7331. }), (function (e) {
  7332. e.detail instanceof Error && (e.detail = n.transformErrorForSerialization(e.detail)), t._send({
  7333. vsWorker: t._workerId,
  7334. seq: a,
  7335. res: void 0,
  7336. err: n.transformErrorForSerialization(e)
  7337. })
  7338. }))
  7339. }
  7340. }, e.prototype._send = function (e) {
  7341. var t = []
  7342. ;
  7343. if (e.req) for (var n = e, i = 0; i < n.args.length; i++) n.args[i] instanceof ArrayBuffer && t.push(n.args[i]); else (n = e).res instanceof ArrayBuffer && t.push(n.res);
  7344. this._handler.sendMessage(e, t)
  7345. }, e
  7346. }(), d = function (e) {
  7347. function t(t, n, i) {
  7348. var o = e.call(this) || this, r = null;
  7349. o._worker = o._register(t.create("vs/base/common/worker/simpleWorker", (function (e) {
  7350. o._protocol.handleMessage(e)
  7351. }), (function (e) {
  7352. r && r(e)
  7353. }))), o._protocol = new u({
  7354. sendMessage: function (e, t) {
  7355. o._worker.postMessage(e, t)
  7356. }, handleMessage: function (e, t) {
  7357. if ("function" != typeof i[e]) return Promise.reject(new Error("Missing method " + e + " on main thread host."));
  7358. try {
  7359. return Promise.resolve(i[e].apply(i, t))
  7360. } catch (e) {
  7361. return Promise.reject(e)
  7362. }
  7363. }
  7364. }), o._protocol.setWorkerId(o._worker.getId());
  7365. var l = null;
  7366. void 0 !== self.require && "function" == typeof self.require.getConfig ? l = self.require.getConfig() : void 0 !== self.requirejs && (l = self.requirejs.s.contexts._.config);
  7367. var d = s.getAllMethodNames(i);
  7368. o._onModuleLoaded = o._protocol.sendMessage(a, [o._worker.getId(), JSON.parse(JSON.stringify(l)), n, d])
  7369. ;var c = function (e, t) {
  7370. return o._request(e, t)
  7371. };
  7372. return o._lazyProxy = new Promise((function (e, t) {
  7373. r = t, o._onModuleLoaded.then((function (t) {
  7374. e(s.createProxyObject(t, c))
  7375. }), (function (e) {
  7376. t(e), o._onError("Worker failed to load " + n, e)
  7377. }))
  7378. })), o
  7379. }
  7380. return r(t, e), t.prototype.getProxyObject = function () {
  7381. return this._lazyProxy
  7382. }, t.prototype._request = function (e, t) {
  7383. var n = this;
  7384. return new Promise((function (i, o) {
  7385. n._onModuleLoaded.then((function () {
  7386. n._protocol.sendMessage(e, t).then(i, o)
  7387. }), o)
  7388. }))
  7389. }, t.prototype._onError = function (e, t) {
  7390. console.error(e), console.info(t)
  7391. }, t
  7392. }(i.Disposable);
  7393. t.SimpleWorkerClient = d;
  7394. var c = function () {
  7395. function e(e, t) {
  7396. var n = this;
  7397. this._requestHandlerFactory = t, this._requestHandler = null, this._protocol = new u({
  7398. sendMessage: function (t, n) {
  7399. e(t, n)
  7400. }, handleMessage: function (e, t) {
  7401. return n._handleMessage(e, t)
  7402. }
  7403. })
  7404. }
  7405. return e.prototype.onmessage = function (e) {
  7406. this._protocol.handleMessage(e)
  7407. }, e.prototype._handleMessage = function (e, t) {
  7408. if (e === a) return this.initialize(t[0], t[1], t[2], t[3])
  7409. ;
  7410. if (!this._requestHandler || "function" != typeof this._requestHandler[e]) return Promise.reject(new Error("Missing requestHandler or method: " + e));
  7411. try {
  7412. return Promise.resolve(this._requestHandler[e].apply(this._requestHandler, t))
  7413. } catch (e) {
  7414. return Promise.reject(e)
  7415. }
  7416. }, e.prototype.initialize = function (e, t, n, i) {
  7417. var o = this;
  7418. this._protocol.setWorkerId(e);
  7419. var r = s.createProxyObject(i, (function (e, t) {
  7420. return o._protocol.sendMessage(e, t)
  7421. }));
  7422. return this._requestHandlerFactory ? (this._requestHandler = this._requestHandlerFactory(r), Promise.resolve(s.getAllMethodNames(this._requestHandler))) : (t && (void 0 !== t.baseUrl && delete t.baseUrl, void 0 !== t.paths && void 0 !== t.paths.vs && delete t.paths.vs, t.catchError = !0, self.require.config(t)), new Promise((function (e, t) {
  7423. self.require([n], (function (n) {
  7424. o._requestHandler = n.create(r), o._requestHandler ? e(s.getAllMethodNames(o._requestHandler)) : t(new Error("No RequestHandler!"))
  7425. }), t)
  7426. })))
  7427. }, e
  7428. }();
  7429. t.SimpleWorkerServer = c, t.create = function (e) {
  7430. return new c(e, null)
  7431. }
  7432. })), define(n[253], i([0, 1, 21]), (function (e, t, n) {
  7433. "use strict";
  7434. Object.defineProperty(t, "__esModule", {value: !0});
  7435. var i = function () {
  7436. function e(e) {
  7437. this.modelProvider = n.isFunction(e.getModel) ? e : {
  7438. getModel: function () {
  7439. return e
  7440. }
  7441. }
  7442. }
  7443. return e.prototype.getId = function (e, t) {
  7444. if (!t) return null;
  7445. var n = this.modelProvider.getModel();
  7446. return n === t ? "__root__" : n.dataSource.getId(t)
  7447. }, e.prototype.hasChildren = function (e, t) {
  7448. var n = this.modelProvider.getModel();
  7449. return !!(n && n === t && n.entries.length > 0)
  7450. }, e.prototype.getChildren = function (e, t) {
  7451. var n = this.modelProvider.getModel();
  7452. return Promise.resolve(n === t ? n.entries : [])
  7453. }, e.prototype.getParent = function (e, t) {
  7454. return Promise.resolve(null)
  7455. }, e
  7456. }();
  7457. t.DataSource = i;
  7458. var o = function () {
  7459. function e(e) {
  7460. this.modelProvider = e
  7461. }
  7462. return e.prototype.getAriaLabel = function (e, t) {
  7463. var n = this.modelProvider.getModel();
  7464. return n.accessibilityProvider ? n.accessibilityProvider.getAriaLabel(t) : null
  7465. }, e.prototype.getPosInSet = function (e, t) {
  7466. var n = this.modelProvider.getModel(), i = 0;
  7467. if (n.filter) for (var o = 0, r = n.entries; o < r.length; o++) {
  7468. var s = r[o];
  7469. if (n.filter.isVisible(s) && i++, s === t) break
  7470. } else i = n.entries.indexOf(t) + 1;
  7471. return String(i)
  7472. }, e.prototype.getSetSize = function () {
  7473. var e = this.modelProvider.getModel(), t = 0;
  7474. if (e.filter) for (var n = 0, i = e.entries; n < i.length; n++) {
  7475. var o = i[n];
  7476. e.filter.isVisible(o) && t++
  7477. } else t = e.entries.length;
  7478. return String(t)
  7479. }, e
  7480. }();
  7481. t.AccessibilityProvider = o;
  7482. var r = function () {
  7483. function e(e) {
  7484. this.modelProvider = e
  7485. }
  7486. return e.prototype.isVisible = function (e, t) {
  7487. var n = this.modelProvider.getModel();
  7488. return !n.filter || n.filter.isVisible(t)
  7489. }, e
  7490. }();
  7491. t.Filter = r;
  7492. var s = function () {
  7493. function e(e, t) {
  7494. this.modelProvider = e, this.styles = t
  7495. }
  7496. return e.prototype.updateStyles = function (e) {
  7497. this.styles = e
  7498. }, e.prototype.getHeight = function (e, t) {
  7499. return this.modelProvider.getModel().renderer.getHeight(t)
  7500. }, e.prototype.getTemplateId = function (e, t) {
  7501. return this.modelProvider.getModel().renderer.getTemplateId(t)
  7502. }, e.prototype.renderTemplate = function (e, t, n) {
  7503. return this.modelProvider.getModel().renderer.renderTemplate(t, n, this.styles)
  7504. }, e.prototype.renderElement = function (e, t, n, i) {
  7505. this.modelProvider.getModel().renderer.renderElement(t, n, i, this.styles)
  7506. }, e.prototype.disposeTemplate = function (e, t, n) {
  7507. this.modelProvider.getModel().renderer.disposeTemplate(t, n)
  7508. }, e
  7509. }();
  7510. t.Renderer = s
  7511. })), define(n[254], i([0, 1]), (function (e, t) {
  7512. "use strict";
  7513. Object.defineProperty(t, "__esModule", {value: !0});
  7514. var n = function () {
  7515. function e(e, t, n) {
  7516. this._posx = e, this._posy = t, this._target = n
  7517. }
  7518. return e.prototype.preventDefault = function () {
  7519. }, e.prototype.stopPropagation = function () {
  7520. }, Object.defineProperty(e.prototype, "target", {
  7521. get: function () {
  7522. return this._target
  7523. }, enumerable: !0, configurable: !0
  7524. }), e
  7525. }();
  7526. t.ContextMenuEvent = n;
  7527. var i = function (e) {
  7528. function t(t) {
  7529. var n = e.call(this, t.posx, t.posy, t.target) || this;
  7530. return n.originalEvent = t, n
  7531. }
  7532. return r(t, e), t.prototype.preventDefault = function () {
  7533. this.originalEvent.preventDefault()
  7534. }, t.prototype.stopPropagation = function () {
  7535. this.originalEvent.stopPropagation()
  7536. }, t
  7537. }(n);
  7538. t.MouseContextMenuEvent = i;
  7539. var o = function (e) {
  7540. function t(t, n, i) {
  7541. var o = e.call(this, t, n, i.target) || this;
  7542. return o.originalEvent = i, o
  7543. }
  7544. return r(t, e),
  7545. t.prototype.preventDefault = function () {
  7546. this.originalEvent.preventDefault()
  7547. }, t.prototype.stopPropagation = function () {
  7548. this.originalEvent.stopPropagation()
  7549. }, t
  7550. }(n);
  7551. t.KeyboardContextMenuEvent = o
  7552. })), define(n[137], i([0, 1, 16, 10, 6, 36]), (function (e, t, n, i, o, r) {
  7553. "use strict";
  7554. Object.defineProperty(t, "__esModule", {value: !0});
  7555. var s = function () {
  7556. function e() {
  7557. this._arr = []
  7558. }
  7559. return e.prototype.set = function (e, t) {
  7560. this._arr.push({keybinding: r.createKeybinding(e, n.OS), callback: t})
  7561. }, e.prototype.dispatch = function (e) {
  7562. for (var t = this._arr.length - 1; t >= 0; t--) {
  7563. var n = this._arr[t];
  7564. if (e.toChord().equals(n.keybinding)) return n.callback
  7565. }
  7566. return null
  7567. }, e
  7568. }();
  7569. t.KeybindingDispatcher = s;
  7570. var a = function () {
  7571. function e(e) {
  7572. var t = this;
  7573. void 0 === e && (e = {
  7574. clickBehavior: 0,
  7575. keyboardSupport: !0,
  7576. openMode: 0
  7577. }), this.options = e, this.downKeyBindingDispatcher = new s, this.upKeyBindingDispatcher = new s, ("boolean" != typeof e.keyboardSupport || e.keyboardSupport) && (this.downKeyBindingDispatcher.set(16, (function (e, n) {
  7578. return t.onUp(e, n)
  7579. })), this.downKeyBindingDispatcher.set(18, (function (e, n) {
  7580. return t.onDown(e, n)
  7581. })), this.downKeyBindingDispatcher.set(15, (function (e, n) {
  7582. return t.onLeft(e, n)
  7583. })), this.downKeyBindingDispatcher.set(17, (function (e, n) {
  7584. return t.onRight(e, n)
  7585. })), n.isMacintosh && (this.downKeyBindingDispatcher.set(2064, (function (e, n) {
  7586. return t.onLeft(e, n)
  7587. })), this.downKeyBindingDispatcher.set(300, (function (e, n) {
  7588. return t.onDown(e, n)
  7589. })), this.downKeyBindingDispatcher.set(302, (function (e, n) {
  7590. return t.onUp(e, n)
  7591. }))), this.downKeyBindingDispatcher.set(11, (function (e, n) {
  7592. return t.onPageUp(e, n)
  7593. })), this.downKeyBindingDispatcher.set(12, (function (e, n) {
  7594. return t.onPageDown(e, n)
  7595. })), this.downKeyBindingDispatcher.set(14, (function (e, n) {
  7596. return t.onHome(e, n)
  7597. })), this.downKeyBindingDispatcher.set(13, (function (e, n) {
  7598. return t.onEnd(e, n)
  7599. })), this.downKeyBindingDispatcher.set(10, (function (e, n) {
  7600. return t.onSpace(e, n)
  7601. })), this.downKeyBindingDispatcher.set(9, (function (e, n) {
  7602. return t.onEscape(e, n)
  7603. })), this.upKeyBindingDispatcher.set(3, this.onEnter.bind(this)), this.upKeyBindingDispatcher.set(2051, this.onEnter.bind(this)))
  7604. }
  7605. return e.prototype.onMouseDown = function (e, t, n, i) {
  7606. if (void 0 === i && (i = "mouse"), 0 === this.options.clickBehavior && (n.leftButton || n.middleButton)) {
  7607. if (n.target) {
  7608. if (n.target.tagName && "input" === n.target.tagName.toLowerCase()) return !1;
  7609. if (o.findParentWithClass(n.target, "scrollbar", "monaco-tree")) return !1;
  7610. if (o.findParentWithClass(n.target, "monaco-action-bar", "row")) return !1
  7611. }
  7612. return this.onLeftClick(e, t, n, i)
  7613. }
  7614. return !1
  7615. }, e.prototype.onClick = function (e, t, i) {
  7616. return n.isMacintosh && i.ctrlKey ? (i.preventDefault(), i.stopPropagation(), !1) : (!i.target || !i.target.tagName || "input" !== i.target.tagName.toLowerCase()) && ((0 !== this.options.clickBehavior || !i.leftButton && !i.middleButton) && this.onLeftClick(e, t, i))
  7617. }, e.prototype.onLeftClick = function (e, t, n, o) {
  7618. void 0 === o && (o = "mouse");
  7619. var r = n, s = {origin: o, originalEvent: n, didClickOnTwistie: this.isClickOnTwistie(r)};
  7620. e.getInput() === t ? (e.clearFocus(s), e.clearSelection(s)) : (n && r.browserEvent && "mousedown" === r.browserEvent.type && 1 === r.browserEvent.detail || n.preventDefault(), n.stopPropagation(), e.domFocus(),
  7621. e.setSelection([t], s), e.setFocus(t, s), this.shouldToggleExpansion(t, r, o) && (e.isExpanded(t) ? e.collapse(t).then(void 0, i.onUnexpectedError) : e.expand(t).then(void 0, i.onUnexpectedError)));
  7622. return !0
  7623. }, e.prototype.shouldToggleExpansion = function (e, t, n) {
  7624. var i = "mouse" === n && 2 === t.detail;
  7625. return this.openOnSingleClick || i || this.isClickOnTwistie(t)
  7626. }, Object.defineProperty(e.prototype, "openOnSingleClick", {
  7627. get: function () {
  7628. return 0 === this.options.openMode
  7629. }, enumerable: !0, configurable: !0
  7630. }), e.prototype.isClickOnTwistie = function (e) {
  7631. var t = e.target;
  7632. if (!o.hasClass(t, "content")) return !1;
  7633. var n = window.getComputedStyle(t, ":before");
  7634. if ("none" === n.backgroundImage || "none" === n.display) return !1;
  7635. var i = parseInt(n.width) + parseInt(n.paddingRight);
  7636. return e.browserEvent.offsetX <= i
  7637. }, e.prototype.onContextMenu = function (e, t, n) {
  7638. return (!n.target || !n.target.tagName || "input" !== n.target.tagName.toLowerCase()) && (n && (n.preventDefault(), n.stopPropagation()), !1)
  7639. }, e.prototype.onTap = function (e, t, n) {
  7640. var i = n.initialTarget
  7641. ;
  7642. return (!i || !i.tagName || "input" !== i.tagName.toLowerCase()) && this.onLeftClick(e, t, n, "touch")
  7643. }, e.prototype.onKeyDown = function (e, t) {
  7644. return this.onKey(this.downKeyBindingDispatcher, e, t)
  7645. }, e.prototype.onKeyUp = function (e, t) {
  7646. return this.onKey(this.upKeyBindingDispatcher, e, t)
  7647. }, e.prototype.onKey = function (e, t, n) {
  7648. var i = e.dispatch(n.toKeybinding());
  7649. return !(!i || !i(t, n)) && (n.preventDefault(), n.stopPropagation(), !0)
  7650. }, e.prototype.onUp = function (e, t) {
  7651. var n = {origin: "keyboard", originalEvent: t};
  7652. return e.getHighlight() ? e.clearHighlight(n) : (e.focusPrevious(1, n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
  7653. }, e.prototype.onPageUp = function (e, t) {
  7654. var n = {origin: "keyboard", originalEvent: t};
  7655. return e.getHighlight() ? e.clearHighlight(n) : (e.focusPreviousPage(n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
  7656. }, e.prototype.onDown = function (e, t) {
  7657. var n = {origin: "keyboard", originalEvent: t};
  7658. return e.getHighlight() ? e.clearHighlight(n) : (e.focusNext(1, n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
  7659. },
  7660. e.prototype.onPageDown = function (e, t) {
  7661. var n = {origin: "keyboard", originalEvent: t};
  7662. return e.getHighlight() ? e.clearHighlight(n) : (e.focusNextPage(n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
  7663. }, e.prototype.onHome = function (e, t) {
  7664. var n = {origin: "keyboard", originalEvent: t};
  7665. return e.getHighlight() ? e.clearHighlight(n) : (e.focusFirst(n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
  7666. }, e.prototype.onEnd = function (e, t) {
  7667. var n = {origin: "keyboard", originalEvent: t};
  7668. return e.getHighlight() ? e.clearHighlight(n) : (e.focusLast(n), e.reveal(e.getFocus()).then(void 0, i.onUnexpectedError)), !0
  7669. }, e.prototype.onLeft = function (e, t) {
  7670. var n = {origin: "keyboard", originalEvent: t};
  7671. if (e.getHighlight()) e.clearHighlight(n); else {
  7672. var o = e.getFocus();
  7673. e.collapse(o).then((function (t) {
  7674. if (o && !t) return e.focusParent(n), e.reveal(e.getFocus())
  7675. })).then(void 0, i.onUnexpectedError)
  7676. }
  7677. return !0
  7678. }, e.prototype.onRight = function (e, t) {
  7679. var n = {origin: "keyboard", originalEvent: t};
  7680. if (e.getHighlight()) e.clearHighlight(n); else {
  7681. var o = e.getFocus()
  7682. ;e.expand(o).then((function (t) {
  7683. if (o && !t) return e.focusFirstChild(n), e.reveal(e.getFocus())
  7684. })).then(void 0, i.onUnexpectedError)
  7685. }
  7686. return !0
  7687. }, e.prototype.onEnter = function (e, t) {
  7688. var n = {origin: "keyboard", originalEvent: t};
  7689. if (e.getHighlight()) return !1;
  7690. var i = e.getFocus();
  7691. return i && e.setSelection([i], n), !0
  7692. }, e.prototype.onSpace = function (e, t) {
  7693. if (e.getHighlight()) return !1;
  7694. var n = e.getFocus();
  7695. return n && e.toggleExpansion(n), !0
  7696. }, e.prototype.onEscape = function (e, t) {
  7697. var n = {origin: "keyboard", originalEvent: t};
  7698. return e.getHighlight() ? (e.clearHighlight(n), !0) : e.getSelection().length ? (e.clearSelection(n), !0) : !!e.getFocus() && (e.clearFocus(n), !0)
  7699. }, e
  7700. }();
  7701. t.DefaultController = a;
  7702. var l = function () {
  7703. function e() {
  7704. }
  7705. return e.prototype.getDragURI = function (e, t) {
  7706. return null
  7707. }, e.prototype.onDragStart = function (e, t, n) {
  7708. }, e.prototype.onDragOver = function (e, t, n, i) {
  7709. return null
  7710. }, e.prototype.drop = function (e, t, n, i) {
  7711. }, e
  7712. }();
  7713. t.DefaultDragAndDrop = l;
  7714. var u = function () {
  7715. function e() {
  7716. }
  7717. return e.prototype.isVisible = function (e, t) {
  7718. return !0
  7719. }, e
  7720. }();
  7721. t.DefaultFilter = u
  7722. ;var d = function () {
  7723. function e() {
  7724. }
  7725. return e.prototype.getAriaLabel = function (e, t) {
  7726. return null
  7727. }, e
  7728. }();
  7729. t.DefaultAccessibilityProvider = d;
  7730. var c = function () {
  7731. function e(e, t) {
  7732. this.styleElement = e, this.selectorSuffix = t
  7733. }
  7734. return e.prototype.style = function (e) {
  7735. var t = this.selectorSuffix ? "." + this.selectorSuffix : "", n = [];
  7736. e.listFocusBackground && n.push(".monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: " + e.listFocusBackground + "; }"), e.listFocusForeground && n.push(".monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: " + e.listFocusForeground + "; }"), e.listActiveSelectionBackground && n.push(".monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: " + e.listActiveSelectionBackground + "; }"), e.listActiveSelectionForeground && n.push(".monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: " + e.listActiveSelectionForeground + "; }"),
  7737. e.listFocusAndSelectionBackground && n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: " + e.listFocusAndSelectionBackground + "; }\n\t\t\t"), e.listFocusAndSelectionForeground && n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: " + e.listFocusAndSelectionForeground + "; }\n\t\t\t"), e.listInactiveSelectionBackground && n.push(".monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: " + e.listInactiveSelectionBackground + "; }"), e.listInactiveSelectionForeground && n.push(".monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: " + e.listInactiveSelectionForeground + "; }"),
  7738. e.listHoverBackground && n.push(".monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: " + e.listHoverBackground + "; }"), e.listHoverForeground && n.push(".monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: " + e.listHoverForeground + "; }"), e.listDropBackground && n.push("\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: " + e.listDropBackground + " !important; color: inherit !important; }\n\t\t\t"),
  7739. e.listFocusOutline && n.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid " + e.listFocusOutline + "; background: #000; }\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted " + e.listFocusOutline + "; }\n\t\t\t\t.monaco-tree" + t + ".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid " + e.listFocusOutline + "; }\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid " + e.listFocusOutline + "; }\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed " + e.listFocusOutline + "; }\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree" + t + " .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed " + e.listFocusOutline + "; }\n\t\t\t")
  7740. ;var i = n.join("\n");
  7741. i !== this.styleElement.innerHTML && (this.styleElement.innerHTML = i)
  7742. }, e
  7743. }();
  7744. t.DefaultTreestyler = c
  7745. })), define(n[255], i([0, 1]), (function (e, t) {
  7746. "use strict";
  7747. Object.defineProperty(t, "__esModule", {value: !0});
  7748. var n = function () {
  7749. function e(e) {
  7750. this.elements = e
  7751. }
  7752. return e.prototype.update = function (e) {
  7753. }, e.prototype.getData = function () {
  7754. return this.elements
  7755. }, e
  7756. }();
  7757. t.ElementsDragAndDropData = n;
  7758. var i = function () {
  7759. function e(e) {
  7760. this.elements = e
  7761. }
  7762. return e.prototype.update = function (e) {
  7763. }, e.prototype.getData = function () {
  7764. return this.elements
  7765. }, e
  7766. }();
  7767. t.ExternalElementsDragAndDropData = i;
  7768. var o = function () {
  7769. function e() {
  7770. this.types = [], this.files = []
  7771. }
  7772. return e.prototype.update = function (e) {
  7773. e.types && (this.types = [], Array.prototype.push.apply(this.types, e.types)), e.files && (this.files = [], Array.prototype.push.apply(this.files, e.files), this.files = this.files.filter((function (e) {
  7774. return e.size || e.type
  7775. })))
  7776. }, e.prototype.getData = function () {
  7777. return {types: this.types, files: this.files}
  7778. }, e
  7779. }();
  7780. t.DesktopDragAndDropData = o
  7781. })),
  7782. define(n[256], i([0, 1, 124, 10, 2, 4]), (function (e, t, n, i, o, s) {
  7783. "use strict";
  7784. Object.defineProperty(t, "__esModule", {value: !0});
  7785. var a = function () {
  7786. function e(e) {
  7787. this._onDispose = new s.Emitter, this.onDispose = this._onDispose.event, this._item = e
  7788. }
  7789. return Object.defineProperty(e.prototype, "item", {
  7790. get: function () {
  7791. return this._item
  7792. }, enumerable: !0, configurable: !0
  7793. }), e.prototype.dispose = function () {
  7794. this._onDispose && (this._onDispose.fire(), this._onDispose.dispose(), this._onDispose = void 0)
  7795. }, e
  7796. }();
  7797. t.LockData = a;
  7798. var l = function () {
  7799. function e() {
  7800. this.locks = Object.create({})
  7801. }
  7802. return e.prototype.isLocked = function (e) {
  7803. return !!this.locks[e.id]
  7804. }, e.prototype.run = function (e, t) {
  7805. var n = this, i = this.getLock(e);
  7806. return i ? new Promise((function (o, r) {
  7807. s.Event.once(i.onDispose)((function () {
  7808. return n.run(e, t).then(o, r)
  7809. }))
  7810. })) : new Promise((function (i, o) {
  7811. if (e.isDisposed()) return o(new Error("Item is disposed."));
  7812. var r = n.locks[e.id] = new a(e);
  7813. return t().then((function (t) {
  7814. return delete n.locks[e.id], r.dispose(), t
  7815. })).then(i, o)
  7816. }))
  7817. }, e.prototype.getLock = function (e) {
  7818. var t
  7819. ;
  7820. for (t in this.locks) {
  7821. var n = this.locks[t];
  7822. if (e.intersects(n.item)) return n
  7823. }
  7824. return null
  7825. }, e
  7826. }();
  7827. t.Lock = l;
  7828. var u = function () {
  7829. function e() {
  7830. this._isDisposed = !1, this._onDidRevealItem = new s.EventMultiplexer, this.onDidRevealItem = this._onDidRevealItem.event, this._onExpandItem = new s.EventMultiplexer, this.onExpandItem = this._onExpandItem.event, this._onDidExpandItem = new s.EventMultiplexer, this.onDidExpandItem = this._onDidExpandItem.event, this._onCollapseItem = new s.EventMultiplexer, this.onCollapseItem = this._onCollapseItem.event, this._onDidCollapseItem = new s.EventMultiplexer, this.onDidCollapseItem = this._onDidCollapseItem.event, this._onDidAddTraitItem = new s.EventMultiplexer, this.onDidAddTraitItem = this._onDidAddTraitItem.event, this._onDidRemoveTraitItem = new s.EventMultiplexer, this.onDidRemoveTraitItem = this._onDidRemoveTraitItem.event, this._onDidRefreshItem = new s.EventMultiplexer, this.onDidRefreshItem = this._onDidRefreshItem.event, this._onRefreshItemChildren = new s.EventMultiplexer,
  7831. this.onRefreshItemChildren = this._onRefreshItemChildren.event, this._onDidRefreshItemChildren = new s.EventMultiplexer, this.onDidRefreshItemChildren = this._onDidRefreshItemChildren.event, this._onDidDisposeItem = new s.EventMultiplexer, this.onDidDisposeItem = this._onDidDisposeItem.event, this.items = {}
  7832. }
  7833. return e.prototype.register = function (e) {
  7834. n.ok(!this.isRegistered(e.id), "item already registered: " + e.id);
  7835. var t = o.combinedDisposable(this._onDidRevealItem.add(e.onDidReveal), this._onExpandItem.add(e.onExpand), this._onDidExpandItem.add(e.onDidExpand), this._onCollapseItem.add(e.onCollapse), this._onDidCollapseItem.add(e.onDidCollapse), this._onDidAddTraitItem.add(e.onDidAddTrait), this._onDidRemoveTraitItem.add(e.onDidRemoveTrait), this._onDidRefreshItem.add(e.onDidRefresh), this._onRefreshItemChildren.add(e.onRefreshChildren), this._onDidRefreshItemChildren.add(e.onDidRefreshChildren), this._onDidDisposeItem.add(e.onDidDispose));
  7836. this.items[e.id] = {item: e, disposable: t}
  7837. }, e.prototype.deregister = function (e) {
  7838. n.ok(this.isRegistered(e.id), "item not registered: " + e.id), this.items[e.id].disposable.dispose(), delete this.items[e.id]
  7839. }, e.prototype.isRegistered = function (e) {
  7840. return this.items.hasOwnProperty(e)
  7841. }, e.prototype.getItem = function (e) {
  7842. var t = this.items[e];
  7843. return t ? t.item : null
  7844. }, e.prototype.dispose = function () {
  7845. this.items = {}, this._onDidRevealItem.dispose(), this._onExpandItem.dispose(), this._onDidExpandItem.dispose(), this._onCollapseItem.dispose(), this._onDidCollapseItem.dispose(), this._onDidAddTraitItem.dispose(), this._onDidRemoveTraitItem.dispose(), this._onDidRefreshItem.dispose(), this._onRefreshItemChildren.dispose(), this._onDidRefreshItemChildren.dispose(), this._isDisposed = !0
  7846. }, e.prototype.isDisposed = function () {
  7847. return this._isDisposed
  7848. }, e
  7849. }();
  7850. t.ItemRegistry = u;
  7851. var d = function () {
  7852. function e(e, t, n, i, o) {
  7853. this._onDidCreate = new s.Emitter, this._onDidReveal = new s.Emitter, this.onDidReveal = this._onDidReveal.event, this._onExpand = new s.Emitter, this.onExpand = this._onExpand.event, this._onDidExpand = new s.Emitter,
  7854. this.onDidExpand = this._onDidExpand.event, this._onCollapse = new s.Emitter, this.onCollapse = this._onCollapse.event, this._onDidCollapse = new s.Emitter, this.onDidCollapse = this._onDidCollapse.event, this._onDidAddTrait = new s.Emitter, this.onDidAddTrait = this._onDidAddTrait.event, this._onDidRemoveTrait = new s.Emitter, this.onDidRemoveTrait = this._onDidRemoveTrait.event, this._onDidRefresh = new s.Emitter, this.onDidRefresh = this._onDidRefresh.event, this._onRefreshChildren = new s.Emitter, this.onRefreshChildren = this._onRefreshChildren.event, this._onDidRefreshChildren = new s.Emitter, this.onDidRefreshChildren = this._onDidRefreshChildren.event, this._onDidDispose = new s.Emitter, this.onDidDispose = this._onDidDispose.event, this.registry = t, this.context = n, this.lock = i, this.element = o, this.id = e, this.registry.register(this), this.doesHaveChildren = this.context.dataSource.hasChildren(this.context.tree, this.element), this.needsChildrenRefresh = !0, this.parent = null, this.previous = null, this.next = null, this.firstChild = null, this.lastChild = null, this.traits = {},
  7855. this.depth = 0, this.expanded = !(!this.context.dataSource.shouldAutoexpand || !this.context.dataSource.shouldAutoexpand(this.context.tree, o)), this._onDidCreate.fire(this), this.visible = this._isVisible(), this.height = this._getHeight(), this._isDisposed = !1
  7856. }
  7857. return e.prototype.getElement = function () {
  7858. return this.element
  7859. }, e.prototype.hasChildren = function () {
  7860. return this.doesHaveChildren
  7861. }, e.prototype.getDepth = function () {
  7862. return this.depth
  7863. }, e.prototype.isVisible = function () {
  7864. return this.visible
  7865. }, e.prototype.setVisible = function (e) {
  7866. this.visible = e
  7867. }, e.prototype.isExpanded = function () {
  7868. return this.expanded
  7869. }, e.prototype._setExpanded = function (e) {
  7870. this.expanded = e
  7871. }, e.prototype.reveal = function (e) {
  7872. void 0 === e && (e = null);
  7873. var t = {item: this, relativeTop: e};
  7874. this._onDidReveal.fire(t)
  7875. }, e.prototype.expand = function () {
  7876. var e = this;
  7877. return this.isExpanded() || !this.doesHaveChildren || this.lock.isLocked(this) ? Promise.resolve(!1) : this.lock.run(this, (function () {
  7878. if (e.isExpanded() || !e.doesHaveChildren) return Promise.resolve(!1);
  7879. var t = {item: e}
  7880. ;
  7881. return e._onExpand.fire(t), (e.needsChildrenRefresh ? e.refreshChildren(!1, !0, !0) : Promise.resolve(null)).then((function () {
  7882. return e._setExpanded(!0), e._onDidExpand.fire(t), !0
  7883. }))
  7884. })).then((function (t) {
  7885. return !e.isDisposed() && (e.context.options.autoExpandSingleChildren && t && null !== e.firstChild && e.firstChild === e.lastChild && e.firstChild.isVisible() ? e.firstChild.expand().then((function () {
  7886. return !0
  7887. })) : t)
  7888. }))
  7889. }, e.prototype.collapse = function (e) {
  7890. var t = this;
  7891. if (void 0 === e && (e = !1), e) {
  7892. var n = Promise.resolve(null);
  7893. return this.forEachChild((function (e) {
  7894. n = n.then((function () {
  7895. return e.collapse(!0)
  7896. }))
  7897. })), n.then((function () {
  7898. return t.collapse(!1)
  7899. }))
  7900. }
  7901. return !this.isExpanded() || this.lock.isLocked(this) ? Promise.resolve(!1) : this.lock.run(this, (function () {
  7902. var e = {item: t};
  7903. return t._onCollapse.fire(e), t._setExpanded(!1), t._onDidCollapse.fire(e), Promise.resolve(!0)
  7904. }))
  7905. }, e.prototype.addTrait = function (e) {
  7906. var t = {item: this, trait: e};
  7907. this.traits[e] = !0, this._onDidAddTrait.fire(t)
  7908. }, e.prototype.removeTrait = function (e) {
  7909. var t = {item: this, trait: e}
  7910. ;delete this.traits[e], this._onDidRemoveTrait.fire(t)
  7911. }, e.prototype.hasTrait = function (e) {
  7912. return this.traits[e] || !1
  7913. }, e.prototype.getAllTraits = function () {
  7914. var e, t = [];
  7915. for (e in this.traits) this.traits.hasOwnProperty(e) && this.traits[e] && t.push(e);
  7916. return t
  7917. }, e.prototype.getHeight = function () {
  7918. return this.height
  7919. }, e.prototype.refreshChildren = function (t, n, o) {
  7920. var r = this;
  7921. if (void 0 === n && (n = !1), void 0 === o && (o = !1), !o && !this.isExpanded()) {
  7922. var s = function (e) {
  7923. e.needsChildrenRefresh = !0, e.forEachChild(s)
  7924. };
  7925. return s(this), Promise.resolve(this)
  7926. }
  7927. this.needsChildrenRefresh = !1;
  7928. var a = function () {
  7929. var o = {item: r, isNested: n};
  7930. return r._onRefreshChildren.fire(o), (r.doesHaveChildren ? r.context.dataSource.getChildren(r.context.tree, r.element) : Promise.resolve([])).then((function (n) {
  7931. if (r.isDisposed() || r.registry.isDisposed()) return Promise.resolve(null);
  7932. if (!Array.isArray(n)) return Promise.reject(new Error("Please return an array of children."));
  7933. n = n ? n.slice(0) : [], n = r.sort(n);
  7934. for (var i = {}; null !== r.firstChild;) i[r.firstChild.id] = r.firstChild,
  7935. r.removeChild(r.firstChild);
  7936. for (var o = 0, s = n.length; o < s; o++) {
  7937. var a = n[o], l = r.context.dataSource.getId(r.context.tree, a),
  7938. u = i[l] || new e(l, r.registry, r.context, r.lock, a);
  7939. u.element = a, t && (u.needsChildrenRefresh = t), delete i[l], r.addChild(u)
  7940. }
  7941. for (var d in i) i.hasOwnProperty(d) && i[d].dispose();
  7942. return t ? Promise.all(r.mapEachChild((function (e) {
  7943. return e.doRefresh(t, !0)
  7944. }))) : Promise.all(r.mapEachChild((function (e) {
  7945. return e.isExpanded() && e.needsChildrenRefresh ? e.doRefresh(t, !0) : (e.updateVisibility(), Promise.resolve(null))
  7946. })))
  7947. })).then(void 0, i.onUnexpectedError).then((function () {
  7948. return r._onDidRefreshChildren.fire(o)
  7949. }))
  7950. };
  7951. return n ? a() : this.lock.run(this, a)
  7952. }, e.prototype.doRefresh = function (e, t) {
  7953. return void 0 === t && (t = !1), this.doesHaveChildren = this.context.dataSource.hasChildren(this.context.tree, this.element), this.height = this._getHeight(), this.updateVisibility(), this._onDidRefresh.fire(this), this.refreshChildren(e, t)
  7954. }, e.prototype.updateVisibility = function () {
  7955. this.setVisible(this._isVisible())
  7956. }, e.prototype.refresh = function (e) {
  7957. return this.doRefresh(e)
  7958. }, e.prototype.getNavigator = function () {
  7959. return new h(this)
  7960. }, e.prototype.intersects = function (e) {
  7961. return this.isAncestorOf(e) || e.isAncestorOf(this)
  7962. }, e.prototype.isAncestorOf = function (e) {
  7963. for (var t = e; t;) {
  7964. if (t.id === this.id) return !0;
  7965. t = t.parent
  7966. }
  7967. return !1
  7968. }, e.prototype.addChild = function (e, t) {
  7969. void 0 === t && (t = this.lastChild);
  7970. var n = null === this.firstChild, i = null === t, o = t === this.lastChild;
  7971. if (n) this.firstChild = this.lastChild = e, e.next = e.previous = null; else if (i) {
  7972. if (!this.firstChild) throw new Error("Invalid tree state");
  7973. this.firstChild.previous = e, e.next = this.firstChild, e.previous = null, this.firstChild = e
  7974. } else if (o) {
  7975. if (!this.lastChild) throw new Error("Invalid tree state");
  7976. this.lastChild.next = e, e.next = null, e.previous = this.lastChild, this.lastChild = e
  7977. } else {
  7978. if (e.previous = t, !t) throw new Error("Invalid tree state");
  7979. if (e.next = t.next, !t.next) throw new Error("Invalid tree state");
  7980. t.next.previous = e, t.next = e
  7981. }
  7982. e.parent = this, e.depth = this.depth + 1
  7983. }, e.prototype.removeChild = function (e) {
  7984. var t = this.firstChild === e, n = this.lastChild === e;
  7985. if (t && n) this.firstChild = this.lastChild = null; else if (t) {
  7986. if (!e.next) throw new Error("Invalid tree state");
  7987. e.next.previous = null, this.firstChild = e.next
  7988. } else if (n) {
  7989. if (!e.previous) throw new Error("Invalid tree state");
  7990. e.previous.next = null, this.lastChild = e.previous
  7991. } else {
  7992. if (!e.next) throw new Error("Invalid tree state");
  7993. if (e.next.previous = e.previous, !e.previous) throw new Error("Invalid tree state");
  7994. e.previous.next = e.next
  7995. }
  7996. e.parent = null, e.depth = NaN
  7997. }, e.prototype.forEachChild = function (e) {
  7998. for (var t, n = this.firstChild; n;) t = n.next, e(n), n = t
  7999. }, e.prototype.mapEachChild = function (e) {
  8000. var t = [];
  8001. return this.forEachChild((function (n) {
  8002. t.push(e(n))
  8003. })), t
  8004. }, e.prototype.sort = function (e) {
  8005. var t = this, n = this.context.sorter;
  8006. return n ? e.sort((function (e, i) {
  8007. return n.compare(t.context.tree, e, i)
  8008. })) : e
  8009. }, e.prototype._getHeight = function () {
  8010. return this.context.renderer ? this.context.renderer.getHeight(this.context.tree, this.element) : 0
  8011. }, e.prototype._isVisible = function () {
  8012. return !!this.context.filter && this.context.filter.isVisible(this.context.tree, this.element)
  8013. }, e.prototype.isDisposed = function () {
  8014. return this._isDisposed
  8015. }, e.prototype.dispose = function () {
  8016. this.forEachChild((function (e) {
  8017. return e.dispose()
  8018. })), this.parent = null, this.previous = null, this.next = null, this.firstChild = null, this.lastChild = null, this._onDidDispose.fire(this), this.registry.deregister(this), this._onDidCreate.dispose(), this._onDidReveal.dispose(), this._onExpand.dispose(), this._onDidExpand.dispose(), this._onCollapse.dispose(), this._onDidCollapse.dispose(), this._onDidAddTrait.dispose(), this._onDidRemoveTrait.dispose(), this._onDidRefresh.dispose(), this._onRefreshChildren.dispose(), this._onDidRefreshChildren.dispose(), this._onDidDispose.dispose(), this._isDisposed = !0
  8019. }, e
  8020. }();
  8021. t.Item = d;
  8022. var c = function (e) {
  8023. function t(t, n, i, o, r) {
  8024. return e.call(this, t, n, i, o, r) || this
  8025. }
  8026. return r(t, e), t.prototype.isVisible = function () {
  8027. return !1
  8028. }, t.prototype.setVisible = function (e) {
  8029. }, t.prototype.isExpanded = function () {
  8030. return !0
  8031. },
  8032. t.prototype._setExpanded = function (e) {
  8033. }, t.prototype._getHeight = function () {
  8034. return 0
  8035. }, t.prototype._isVisible = function () {
  8036. return !1
  8037. }, t
  8038. }(d), h = function () {
  8039. function e(e, t) {
  8040. void 0 === t && (t = !0), this.item = e, this.start = t ? e : null
  8041. }
  8042. return e.lastDescendantOf = function (t) {
  8043. return t ? t instanceof c ? e.lastDescendantOf(t.lastChild) : t.isVisible() ? t.isExpanded() && null !== t.lastChild ? e.lastDescendantOf(t.lastChild) : t : e.lastDescendantOf(t.previous) : null
  8044. }, e.prototype.current = function () {
  8045. return this.item || null
  8046. }, e.prototype.next = function () {
  8047. if (this.item) do {
  8048. if ((this.item instanceof c || this.item.isVisible() && this.item.isExpanded()) && this.item.firstChild) this.item = this.item.firstChild; else if (this.item === this.start) this.item = null; else {
  8049. for (; this.item && this.item !== this.start && !this.item.next;) this.item = this.item.parent;
  8050. this.item === this.start && (this.item = null), this.item = this.item ? this.item.next : null
  8051. }
  8052. } while (this.item && !this.item.isVisible());
  8053. return this.item || null
  8054. }, e.prototype.previous = function () {
  8055. if (this.item) do {
  8056. var t = e.lastDescendantOf(this.item.previous);
  8057. t ? this.item = t : this.item.parent && this.item.parent !== this.start && this.item.parent.isVisible() ? this.item = this.item.parent : this.item = null
  8058. } while (this.item && !this.item.isVisible());
  8059. return this.item || null
  8060. }, e.prototype.parent = function () {
  8061. if (this.item) {
  8062. var e = this.item.parent;
  8063. e && e !== this.start && e.isVisible() ? this.item = e : this.item = null
  8064. }
  8065. return this.item || null
  8066. }, e.prototype.first = function () {
  8067. return this.item = this.start, this.next(), this.item || null
  8068. }, e.prototype.last = function () {
  8069. return e.lastDescendantOf(this.start)
  8070. }, e
  8071. }();
  8072. t.TreeNavigator = h;
  8073. var p = function () {
  8074. function e(e) {
  8075. this.registry = new u, this.registryDisposable = o.Disposable.None, this._onSetInput = new s.Emitter, this.onSetInput = this._onSetInput.event, this._onDidSetInput = new s.Emitter, this.onDidSetInput = this._onDidSetInput.event, this._onRefresh = new s.Emitter, this.onRefresh = this._onRefresh.event, this._onDidRefresh = new s.Emitter, this.onDidRefresh = this._onDidRefresh.event, this._onDidHighlight = new s.Emitter,
  8076. this.onDidHighlight = this._onDidHighlight.event, this._onDidSelect = new s.Emitter, this.onDidSelect = this._onDidSelect.event, this._onDidFocus = new s.Emitter, this.onDidFocus = this._onDidFocus.event, this._onDidRevealItem = new s.Relay, this.onDidRevealItem = this._onDidRevealItem.event, this._onExpandItem = new s.Relay, this.onExpandItem = this._onExpandItem.event, this._onDidExpandItem = new s.Relay, this.onDidExpandItem = this._onDidExpandItem.event, this._onCollapseItem = new s.Relay, this.onCollapseItem = this._onCollapseItem.event, this._onDidCollapseItem = new s.Relay, this.onDidCollapseItem = this._onDidCollapseItem.event, this._onDidAddTraitItem = new s.Relay, this.onDidAddTraitItem = this._onDidAddTraitItem.event, this._onDidRemoveTraitItem = new s.Relay, this.onDidRemoveTraitItem = this._onDidRemoveTraitItem.event, this._onDidRefreshItem = new s.Relay, this.onDidRefreshItem = this._onDidRefreshItem.event, this._onRefreshItemChildren = new s.Relay, this.onRefreshItemChildren = this._onRefreshItemChildren.event, this._onDidRefreshItemChildren = new s.Relay,
  8077. this.onDidRefreshItemChildren = this._onDidRefreshItemChildren.event, this._onDidDisposeItem = new s.Relay, this.context = e, this.input = null, this.traitsToItems = {}
  8078. }
  8079. return e.prototype.setInput = function (e) {
  8080. var t = this, n = {item: this.input};
  8081. this._onSetInput.fire(n), this.setSelection([]), this.setFocus(), this.setHighlight(), this.lock = new l, this.input && this.input.dispose(), this.registry && (this.registry.dispose(), this.registryDisposable.dispose()), this.registry = new u, this._onDidRevealItem.input = this.registry.onDidRevealItem, this._onExpandItem.input = this.registry.onExpandItem, this._onDidExpandItem.input = this.registry.onDidExpandItem, this._onCollapseItem.input = this.registry.onCollapseItem, this._onDidCollapseItem.input = this.registry.onDidCollapseItem, this._onDidAddTraitItem.input = this.registry.onDidAddTraitItem, this._onDidRemoveTraitItem.input = this.registry.onDidRemoveTraitItem, this._onDidRefreshItem.input = this.registry.onDidRefreshItem, this._onRefreshItemChildren.input = this.registry.onRefreshItemChildren,
  8082. this._onDidRefreshItemChildren.input = this.registry.onDidRefreshItemChildren, this._onDidDisposeItem.input = this.registry.onDidDisposeItem, this.registryDisposable = this.registry.onDidDisposeItem((function (e) {
  8083. return e.getAllTraits().forEach((function (n) {
  8084. return delete t.traitsToItems[n][e.id]
  8085. }))
  8086. }));
  8087. var i = this.context.dataSource.getId(this.context.tree, e);
  8088. return this.input = new c(i, this.registry, this.context, this.lock, e), n = {item: this.input}, this._onDidSetInput.fire(n), this.refresh(this.input)
  8089. }, e.prototype.getInput = function () {
  8090. return this.input ? this.input.getElement() : null
  8091. }, e.prototype.refresh = function (e, t) {
  8092. var n = this;
  8093. void 0 === e && (e = null), void 0 === t && (t = !0);
  8094. var i = this.getItem(e);
  8095. if (!i) return Promise.resolve(null);
  8096. var o = {item: i, recursive: t};
  8097. return this._onRefresh.fire(o), i.refresh(t).then((function () {
  8098. n._onDidRefresh.fire(o)
  8099. }))
  8100. }, e.prototype.expand = function (e) {
  8101. var t = this.getItem(e);
  8102. return t ? t.expand() : Promise.resolve(!1)
  8103. }, e.prototype.collapse = function (e, t) {
  8104. void 0 === t && (t = !1);
  8105. var n = this.getItem(e)
  8106. ;
  8107. return n ? n.collapse(t) : Promise.resolve(!1)
  8108. }, e.prototype.toggleExpansion = function (e, t) {
  8109. return void 0 === t && (t = !1), this.isExpanded(e) ? this.collapse(e, t) : this.expand(e)
  8110. }, e.prototype.isExpanded = function (e) {
  8111. var t = this.getItem(e);
  8112. return !!t && t.isExpanded()
  8113. }, e.prototype.reveal = function (e, t) {
  8114. var n = this;
  8115. return void 0 === t && (t = null), this.resolveUnknownParentChain(e).then((function (e) {
  8116. var t = Promise.resolve(null);
  8117. return e.forEach((function (e) {
  8118. t = t.then((function () {
  8119. return n.expand(e)
  8120. }))
  8121. })), t
  8122. })).then((function () {
  8123. var i = n.getItem(e);
  8124. if (i) return i.reveal(t)
  8125. }))
  8126. }, e.prototype.resolveUnknownParentChain = function (e) {
  8127. var t = this;
  8128. return this.context.dataSource.getParent(this.context.tree, e).then((function (e) {
  8129. return e ? t.resolveUnknownParentChain(e).then((function (t) {
  8130. return t.push(e), t
  8131. })) : Promise.resolve([])
  8132. }))
  8133. }, e.prototype.setHighlight = function (e, t) {
  8134. this.setTraits("highlighted", e ? [e] : []);
  8135. var n = {highlight: this.getHighlight(), payload: t};
  8136. this._onDidHighlight.fire(n)
  8137. }, e.prototype.getHighlight = function (e) {
  8138. void 0 === e && (e = !1)
  8139. ;var t = this.getElementsWithTrait("highlighted", e);
  8140. return 0 === t.length ? null : t[0]
  8141. }, e.prototype.setSelection = function (e, t) {
  8142. this.setTraits("selected", e);
  8143. var n = {selection: this.getSelection(), payload: t};
  8144. this._onDidSelect.fire(n)
  8145. }, e.prototype.getSelection = function (e) {
  8146. return void 0 === e && (e = !1), this.getElementsWithTrait("selected", e)
  8147. }, e.prototype.setFocus = function (e, t) {
  8148. this.setTraits("focused", e ? [e] : []);
  8149. var n = {focus: this.getFocus(), payload: t};
  8150. this._onDidFocus.fire(n)
  8151. }, e.prototype.getFocus = function (e) {
  8152. void 0 === e && (e = !1);
  8153. var t = this.getElementsWithTrait("focused", e);
  8154. return 0 === t.length ? null : t[0]
  8155. }, e.prototype.focusNext = function (e, t) {
  8156. void 0 === e && (e = 1);
  8157. for (var n, i = this.getFocus() || this.input, o = this.getNavigator(i, !1), r = 0; r < e && (n = o.next()); r++) i = n;
  8158. this.setFocus(i, t)
  8159. }, e.prototype.focusPrevious = function (e, t) {
  8160. void 0 === e && (e = 1);
  8161. for (var n, i = this.getFocus() || this.input, o = this.getNavigator(i, !1), r = 0; r < e && (n = o.previous()); r++) i = n;
  8162. this.setFocus(i, t)
  8163. }, e.prototype.focusParent = function (e) {
  8164. var t = this.getFocus() || this.input, n = this.getNavigator(t, !1).parent();
  8165. n && this.setFocus(n, e)
  8166. }, e.prototype.focusFirstChild = function (e) {
  8167. var t = this.getItem(this.getFocus() || this.input), n = this.getNavigator(t, !1), i = n.next();
  8168. n.parent() === t && this.setFocus(i, e)
  8169. }, e.prototype.focusFirst = function (e, t) {
  8170. this.focusNth(0, e, t)
  8171. }, e.prototype.focusNth = function (e, t, n) {
  8172. for (var i = this.getParent(n), o = this.getNavigator(i), r = o.first(), s = 0; s < e; s++) r = o.next();
  8173. r && this.setFocus(r, t)
  8174. }, e.prototype.focusLast = function (e, t) {
  8175. var n, i = this.getParent(t);
  8176. t && i ? n = i.lastChild : n = this.getNavigator(i).last();
  8177. n && this.setFocus(n, e)
  8178. }, e.prototype.getParent = function (e) {
  8179. if (e) {
  8180. var t = this.getItem(e);
  8181. if (t && t.parent) return t.parent
  8182. }
  8183. return this.getItem(this.input)
  8184. }, e.prototype.getNavigator = function (e, t) {
  8185. return void 0 === e && (e = null), void 0 === t && (t = !0), new h(this.getItem(e), t)
  8186. }, e.prototype.getItem = function (e) {
  8187. return void 0 === e && (e = null),
  8188. null === e ? this.input : e instanceof d ? e : "string" == typeof e ? this.registry.getItem(e) : this.registry.getItem(this.context.dataSource.getId(this.context.tree, e))
  8189. }, e.prototype.removeTraits = function (e, t) {
  8190. var n, i, o = this.traitsToItems[e] || {};
  8191. if (0 === t.length) {
  8192. for (i in o) o.hasOwnProperty(i) && (n = o[i]).removeTrait(e);
  8193. delete this.traitsToItems[e]
  8194. } else for (var r = 0, s = t.length; r < s; r++) (n = this.getItem(t[r])) && (n.removeTrait(e), delete o[n.id])
  8195. }, e.prototype.setTraits = function (e, t) {
  8196. if (0 === t.length) this.removeTraits(e, t); else {
  8197. for (var n = {}, i = void 0, o = 0, r = t.length; o < r; o++) (i = this.getItem(t[o])) && (n[i.id] = i);
  8198. var s = this.traitsToItems[e] || {}, a = [], l = void 0;
  8199. for (l in s) s.hasOwnProperty(l) && (n.hasOwnProperty(l) ? delete n[l] : a.push(s[l]));
  8200. for (o = 0, r = a.length; o < r; o++) (i = a[o]).removeTrait(e), delete s[i.id];
  8201. for (l in n) n.hasOwnProperty(l) && ((i = n[l]).addTrait(e), s[l] = i);
  8202. this.traitsToItems[e] = s
  8203. }
  8204. }, e.prototype.getElementsWithTrait = function (e, t) {
  8205. var n, i = [], o = this.traitsToItems[e] || {}
  8206. ;
  8207. for (n in o) o.hasOwnProperty(n) && (o[n].isVisible() || t) && i.push(o[n].getElement());
  8208. return i
  8209. }, e.prototype.dispose = function () {
  8210. this.registry.dispose(), this._onSetInput.dispose(), this._onDidSetInput.dispose(), this._onRefresh.dispose(), this._onDidRefresh.dispose(), this._onDidHighlight.dispose(), this._onDidSelect.dispose(), this._onDidFocus.dispose(), this._onDidRevealItem.dispose(), this._onExpandItem.dispose(), this._onDidExpandItem.dispose(), this._onCollapseItem.dispose(), this._onDidCollapseItem.dispose(), this._onDidAddTraitItem.dispose(), this._onDidRemoveTraitItem.dispose(), this._onDidRefreshItem.dispose(), this._onRefreshItemChildren.dispose(), this._onDidRefreshItemChildren.dispose(), this._onDidDisposeItem.dispose()
  8211. }, e
  8212. }();
  8213. t.TreeModel = p
  8214. })), define(n[257], i([0, 1, 54]), (function (e, t, n) {
  8215. "use strict";
  8216. Object.defineProperty(t, "__esModule", {value: !0});
  8217. var i = function () {
  8218. function e() {
  8219. this.heightMap = [], this.indexes = {}
  8220. }
  8221. return e.prototype.getContentHeight = function () {
  8222. var e = this.heightMap[this.heightMap.length - 1]
  8223. ;
  8224. return e ? e.top + e.height : 0
  8225. }, e.prototype.onInsertItems = function (e, t) {
  8226. void 0 === t && (t = null);
  8227. var n, i, o, r, s = null, a = 0;
  8228. if (null === t) i = 0, r = 0; else {
  8229. if (i = this.indexes[t] + 1, !(n = this.heightMap[i - 1])) return void console.error("view item doesnt exist");
  8230. r = n.top + n.height
  8231. }
  8232. for (var l = this.heightMap.splice.bind(this.heightMap, i, 0), u = []; s = e.next();) (n = this.createViewItem(s)).top = r + a, this.indexes[s.id] = i++, u.push(n), a += n.height;
  8233. for (l.apply(this.heightMap, u), o = i; o < this.heightMap.length; o++) (n = this.heightMap[o]).top += a, this.indexes[n.model.id] = o;
  8234. for (o = u.length - 1; o >= 0; o--) this.onInsertItem(u[o]);
  8235. for (o = this.heightMap.length - 1; o >= i; o--) this.onRefreshItem(this.heightMap[o]);
  8236. return a
  8237. }, e.prototype.onInsertItem = function (e) {
  8238. }, e.prototype.onRemoveItems = function (e) {
  8239. for (var t, n = null, i = null, o = 0, r = 0; n = e.next();) {
  8240. if (o = this.indexes[n], !(t = this.heightMap[o])) return void console.error("view item doesnt exist");
  8241. r -= t.height, delete this.indexes[n], this.onRemoveItem(t), null === i && (i = o)
  8242. }
  8243. if (0 !== r && null !== i) for (this.heightMap.splice(i, o - i + 1),
  8244. o = i; o < this.heightMap.length; o++) (t = this.heightMap[o]).top += r, this.indexes[t.model.id] = o, this.onRefreshItem(t)
  8245. }, e.prototype.onRemoveItem = function (e) {
  8246. }, e.prototype.onRefreshItemSet = function (e) {
  8247. var t = this, i = e.sort((function (e, n) {
  8248. return t.indexes[e.id] - t.indexes[n.id]
  8249. }));
  8250. this.onRefreshItems(new n.ArrayIterator(i))
  8251. }, e.prototype.onRefreshItems = function (e) {
  8252. for (var t, n, i, o = null, r = null, s = 0; o = e.next();) {
  8253. for (i = this.indexes[o.id]; 0 !== s && null !== r && r < i; r++) (t = this.heightMap[r]).top += s, this.onRefreshItem(t);
  8254. t = this.heightMap[i], n = o.getHeight(), t.top += s, s += n - t.height, t.height = n, this.onRefreshItem(t, !0), r = i + 1
  8255. }
  8256. if (0 !== s && null !== r) for (; r < this.heightMap.length; r++) (t = this.heightMap[r]).top += s, this.onRefreshItem(t)
  8257. }, e.prototype.onRefreshItem = function (e, t) {
  8258. void 0 === t && (t = !1)
  8259. }, e.prototype.indexAt = function (e) {
  8260. for (var t, n, i = 0, o = this.heightMap.length; i < o;) if (t = Math.floor((i + o) / 2), e < (n = this.heightMap[t]).top) o = t; else {
  8261. if (!(e >= n.top + n.height)) return t;
  8262. if (i === t) break;
  8263. i = t
  8264. }
  8265. return this.heightMap.length
  8266. }, e.prototype.indexAfter = function (e) {
  8267. return Math.min(this.indexAt(e) + 1, this.heightMap.length)
  8268. }, e.prototype.itemAtIndex = function (e) {
  8269. return this.heightMap[e]
  8270. }, e.prototype.itemAfter = function (e) {
  8271. return this.heightMap[this.indexes[e.model.id] + 1] || null
  8272. }, e.prototype.createViewItem = function (e) {
  8273. throw new Error("not implemented")
  8274. }, e.prototype.dispose = function () {
  8275. this.heightMap = [], this.indexes = {}
  8276. }, e
  8277. }();
  8278. t.HeightMap = i
  8279. })), define(n[258], i([0, 1, 16, 182]), (function (e, t, n, i) {
  8280. "use strict";
  8281. function o(t, n) {
  8282. if (/^(http:)|(https:)|(file:)/.test(t)) {
  8283. var i = String(window.location),
  8284. o = i.substr(0, i.length - window.location.hash.length - window.location.search.length - window.location.pathname.length);
  8285. if (t.substring(0, o.length) !== o) {
  8286. var r = "vs/base/worker/defaultWorkerFactory.js", s = e.toUrl(r).slice(0, -r.length);
  8287. return "data:text/javascript;charset=utf-8," + encodeURIComponent("/*" + n + "*/self.MonacoEnvironment={baseUrl: '" + s + "'};importScripts('" + t + "');/*" + n + "*/")
  8288. }
  8289. }
  8290. return t + "#" + n
  8291. }
  8292. Object.defineProperty(t, "__esModule", {value: !0}), t.getWorkerBootstrapUrl = o;
  8293. var r = function () {
  8294. function t(t, i, r, s, a) {
  8295. this.id = i;
  8296. var l = function (t, i) {
  8297. if (n.globals.MonacoEnvironment) {
  8298. if ("function" == typeof n.globals.MonacoEnvironment.getWorker) return n.globals.MonacoEnvironment.getWorker(t, i);
  8299. if ("function" == typeof n.globals.MonacoEnvironment.getWorkerUrl) return new Worker(n.globals.MonacoEnvironment.getWorkerUrl(t, i))
  8300. }
  8301. if ("function" == typeof e) {
  8302. var r = o(e.toUrl("./" + t), i);
  8303. return new Worker(r, {name: i})
  8304. }
  8305. throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")
  8306. }("workerMain.js", r);
  8307. "function" == typeof l.then ? this.worker = l : this.worker = Promise.resolve(l), this.postMessage(t, []), this.worker.then((function (e) {
  8308. e.onmessage = function (e) {
  8309. s(e.data)
  8310. }, e.onmessageerror = a, "function" == typeof e.addEventListener && e.addEventListener("error", a)
  8311. }))
  8312. }
  8313. return t.prototype.getId = function () {
  8314. return this.id
  8315. }, t.prototype.postMessage = function (e, t) {
  8316. this.worker && this.worker.then((function (n) {
  8317. return n.postMessage(e, t)
  8318. }))
  8319. }, t.prototype.dispose = function () {
  8320. this.worker && this.worker.then((function (e) {
  8321. return e.terminate()
  8322. })), this.worker = null
  8323. }, t
  8324. }(), s = function () {
  8325. function e(e) {
  8326. this._label = e, this._webWorkerFailedBeforeError = !1
  8327. }
  8328. return e.prototype.create = function (t, n, o) {
  8329. var s = this, a = ++e.LAST_WORKER_ID;
  8330. if (this._webWorkerFailedBeforeError) throw this._webWorkerFailedBeforeError;
  8331. return new r(t, a, this._label || "anonymous" + a, n, (function (e) {
  8332. i.logOnceWebWorkerWarning(e), s._webWorkerFailedBeforeError = e, o(e)
  8333. }))
  8334. }, e.LAST_WORKER_ID = 0, e
  8335. }();
  8336. t.DefaultWorkerFactory = s
  8337. })), define(n[259], i([9]), {}), define(n[260], i([9]), {}), define(n[261], i([9]), {}), define(n[138], i([0, 1, 6, 47, 27, 4, 31, 261]), (function (e, t, n, i, o, s, a) {
  8338. "use strict";
  8339. Object.defineProperty(t, "__esModule", {value: !0});
  8340. var l = {
  8341. inputActiveOptionBorder: o.Color.fromHex("#007ACC00"),
  8342. inputActiveOptionBackground: o.Color.fromHex("#0E639C50")
  8343. }, u = function (e) {
  8344. function t(t) {
  8345. var n = e.call(this) || this;
  8346. return n._onChange = n._register(new s.Emitter), n.onChange = n._onChange.event, n._onKeyDown = n._register(new s.Emitter), n.onKeyDown = n._onKeyDown.event, n._opts = a.deepClone(t), a.mixin(n._opts, l, !1),
  8347. n._checked = n._opts.isChecked, n.domNode = document.createElement("div"), n.domNode.title = n._opts.title, n.domNode.className = "monaco-custom-checkbox codicon " + (n._opts.actionClassName || "") + " " + (n._checked ? "checked" : "unchecked"), n.domNode.tabIndex = 0, n.domNode.setAttribute("role", "checkbox"), n.domNode.setAttribute("aria-checked", String(n._checked)), n.domNode.setAttribute("aria-label", n._opts.title), n.applyStyles(), n.onclick(n.domNode, (function (e) {
  8348. n.checked = !n._checked, n._onChange.fire(!1), e.preventDefault()
  8349. })), n.ignoreGesture(n.domNode), n.onkeydown(n.domNode, (function (e) {
  8350. if (10 === e.keyCode || 3 === e.keyCode) return n.checked = !n._checked, n._onChange.fire(!0), void e.preventDefault();
  8351. n._onKeyDown.fire(e)
  8352. })), n
  8353. }
  8354. return r(t, e), Object.defineProperty(t.prototype, "enabled", {
  8355. get: function () {
  8356. return "true" !== this.domNode.getAttribute("aria-disabled")
  8357. }, enumerable: !0, configurable: !0
  8358. }), t.prototype.focus = function () {
  8359. this.domNode.focus()
  8360. }, Object.defineProperty(t.prototype, "checked", {
  8361. get: function () {
  8362. return this._checked
  8363. }, set: function (e) {
  8364. this._checked = e, this.domNode.setAttribute("aria-checked", String(this._checked)), this._checked ? this.domNode.classList.add("checked") : this.domNode.classList.remove("checked"), this.applyStyles()
  8365. }, enumerable: !0, configurable: !0
  8366. }), t.prototype.width = function () {
  8367. return 22
  8368. }, t.prototype.style = function (e) {
  8369. e.inputActiveOptionBorder && (this._opts.inputActiveOptionBorder = e.inputActiveOptionBorder), e.inputActiveOptionBackground && (this._opts.inputActiveOptionBackground = e.inputActiveOptionBackground), this.applyStyles()
  8370. }, t.prototype.applyStyles = function () {
  8371. this.domNode && (this.domNode.style.borderColor = this._checked && this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder.toString() : "transparent", this.domNode.style.backgroundColor = this._checked && this._opts.inputActiveOptionBackground ? this._opts.inputActiveOptionBackground.toString() : "transparent")
  8372. }, t.prototype.enable = function () {
  8373. this.domNode.tabIndex = 0, this.domNode.setAttribute("aria-disabled", String(!1))
  8374. }, t.prototype.disable = function () {
  8375. n.removeTabIndexAndUpdateFocus(this.domNode), this.domNode.setAttribute("aria-disabled", String(!0))
  8376. }, t
  8377. }(i.Widget);
  8378. t.Checkbox = u
  8379. })), define(n[262], i([9]), {}), define(n[263], i([9]), {}), define(n[183], i([0, 1, 262, 263]), (function (e, t) {
  8380. "use strict";
  8381. Object.defineProperty(t, "__esModule", {value: !0})
  8382. })), define(n[264], i([9]), {}), define(n[265], i([0, 1, 6, 16, 2, 103, 88, 264]), (function (e, t, n, i, o, s, a) {
  8383. "use strict";
  8384. function l(e, t, n) {
  8385. var i = n.offset + n.size;
  8386. return 0 === n.position ? t <= e - i ? i : t <= n.offset ? n.offset - t : Math.max(e - t, 0) : t <= n.offset ? n.offset - t : t <= e - i ? i : 0
  8387. }
  8388. Object.defineProperty(t, "__esModule", {value: !0}), t.layout = l;
  8389. var u = function (e) {
  8390. function t(t) {
  8391. var i = e.call(this) || this;
  8392. return i.container = null, i.delegate = null, i.toDisposeOnClean = o.Disposable.None, i.toDisposeOnSetContainer = o.Disposable.None, i.view = n.$(".context-view"), n.hide(i.view), i.setContainer(t), i._register(o.toDisposable((function () {
  8393. return i.setContainer(null)
  8394. }))), i
  8395. }
  8396. return r(t, e), t.prototype.setContainer = function (e) {
  8397. var i = this
  8398. ;
  8399. if (this.container && (this.toDisposeOnSetContainer.dispose(), this.container.removeChild(this.view), this.container = null), e) {
  8400. this.container = e, this.container.appendChild(this.view);
  8401. var r = new o.DisposableStore;
  8402. t.BUBBLE_UP_EVENTS.forEach((function (e) {
  8403. r.add(n.addStandardDisposableListener(i.container, e, (function (e) {
  8404. i.onDOMEvent(e, !1)
  8405. })))
  8406. })), t.BUBBLE_DOWN_EVENTS.forEach((function (e) {
  8407. r.add(n.addStandardDisposableListener(i.container, e, (function (e) {
  8408. i.onDOMEvent(e, !0)
  8409. }), !0))
  8410. })), this.toDisposeOnSetContainer = r
  8411. }
  8412. }, t.prototype.show = function (e) {
  8413. this.isVisible() && this.hide(), n.clearNode(this.view), this.view.className = "context-view", this.view.style.top = "0px", this.view.style.left = "0px", n.show(this.view), this.toDisposeOnClean = e.render(this.view) || o.Disposable.None, this.delegate = e, this.doLayout(), this.delegate.focus && this.delegate.focus()
  8414. }, t.prototype.layout = function () {
  8415. this.isVisible() && (!1 !== this.delegate.canRelayout || i.isIOS && a.BrowserFeatures.pointerEvents ? (this.delegate.layout && this.delegate.layout(),
  8416. this.doLayout()) : this.hide())
  8417. }, t.prototype.doLayout = function () {
  8418. if (this.isVisible()) {
  8419. var e, t = this.delegate.getAnchor();
  8420. if (n.isHTMLElement(t)) {
  8421. var i = n.getDomNodePagePosition(t);
  8422. e = {top: i.top, left: i.left, width: i.width, height: i.height}
  8423. } else e = {top: t.y, left: t.x, width: t.width || 1, height: t.height || 2};
  8424. var o, r = n.getTotalWidth(this.view), a = n.getTotalHeight(this.view),
  8425. u = this.delegate.anchorPosition || 0, d = this.delegate.anchorAlignment || 0,
  8426. c = {offset: e.top - window.pageYOffset, size: e.height, position: 0 === u ? 0 : 1};
  8427. o = 0 === d ? {offset: e.left, size: 0, position: 0} : {
  8428. offset: e.left + e.width,
  8429. size: 0,
  8430. position: 1
  8431. };
  8432. var h = l(window.innerHeight, a, c) + window.pageYOffset;
  8433. s.Range.intersects({start: h, end: h + a}, {
  8434. start: c.offset,
  8435. end: c.offset + c.size
  8436. }) && (o.size = e.width, 1 === d && (o.offset = e.left));
  8437. var p = l(window.innerWidth, r, o);
  8438. n.removeClasses(this.view, "top", "bottom", "left", "right"), n.addClass(this.view, 0 === u ? "bottom" : "top"), n.addClass(this.view, 0 === d ? "left" : "right");
  8439. var g = n.getDomNodePagePosition(this.container);
  8440. this.view.style.top = h - g.top + "px",
  8441. this.view.style.left = p - g.left + "px", this.view.style.width = "initial"
  8442. }
  8443. }, t.prototype.hide = function (e) {
  8444. var t = this.delegate;
  8445. this.delegate = null, (null == t ? void 0 : t.onHide) && t.onHide(e), this.toDisposeOnClean.dispose(), n.hide(this.view)
  8446. }, t.prototype.isVisible = function () {
  8447. return !!this.delegate
  8448. }, t.prototype.onDOMEvent = function (e, t) {
  8449. this.delegate && (this.delegate.onDOMEvent ? this.delegate.onDOMEvent(e, document.activeElement) : t && !n.isAncestor(e.target, this.container) && this.hide())
  8450. }, t.prototype.dispose = function () {
  8451. this.hide(), e.prototype.dispose.call(this)
  8452. }, t.BUBBLE_UP_EVENTS = ["click", "keydown", "focus", "blur"], t.BUBBLE_DOWN_EVENTS = ["click"], t
  8453. }(o.Disposable);
  8454. t.ContextView = u
  8455. })), define(n[266], i([9]), {}), define(n[267], i([0, 1, 6, 5, 27, 31, 266]), (function (e, t, n, i, o, r) {
  8456. "use strict";
  8457. Object.defineProperty(t, "__esModule", {value: !0});
  8458. var s = {badgeBackground: o.Color.fromHex("#4D4D4D"), badgeForeground: o.Color.fromHex("#FFFFFF")},
  8459. a = function () {
  8460. function e(e, t) {
  8461. this.count = 0, this.options = t || Object.create(null), r.mixin(this.options, s, !1),
  8462. this.badgeBackground = this.options.badgeBackground, this.badgeForeground = this.options.badgeForeground, this.badgeBorder = this.options.badgeBorder, this.element = n.append(e, n.$(".monaco-count-badge")), this.countFormat = this.options.countFormat || "{0}", this.titleFormat = this.options.titleFormat || "", this.setCount(this.options.count || 0)
  8463. }
  8464. return e.prototype.setCount = function (e) {
  8465. this.count = e, this.render()
  8466. }, e.prototype.setTitleFormat = function (e) {
  8467. this.titleFormat = e, this.render()
  8468. }, e.prototype.render = function () {
  8469. this.element.textContent = i.format(this.countFormat, this.count), this.element.title = i.format(this.titleFormat, this.count), this.applyStyles()
  8470. }, e.prototype.style = function (e) {
  8471. this.badgeBackground = e.badgeBackground, this.badgeForeground = e.badgeForeground, this.badgeBorder = e.badgeBorder, this.applyStyles()
  8472. }, e.prototype.applyStyles = function () {
  8473. if (this.element) {
  8474. var e = this.badgeBackground ? this.badgeBackground.toString() : "",
  8475. t = this.badgeForeground ? this.badgeForeground.toString() : "",
  8476. n = this.badgeBorder ? this.badgeBorder.toString() : ""
  8477. ;this.element.style.backgroundColor = e, this.element.style.color = t, this.element.style.borderWidth = n ? "1px" : "", this.element.style.borderStyle = n ? "solid" : "", this.element.style.borderColor = n
  8478. }
  8479. }, e
  8480. }();
  8481. t.CountBadge = a
  8482. })), define(n[184], i([9]), {}), define(n[268], i([9]), {}), define(n[139], i([0, 1, 6, 133, 2, 103, 31, 268]), (function (e, t, n, i, o, s, a) {
  8483. "use strict";
  8484. Object.defineProperty(t, "__esModule", {value: !0});
  8485. var l = function () {
  8486. function e(e) {
  8487. this._element = e
  8488. }
  8489. return Object.defineProperty(e.prototype, "element", {
  8490. get: function () {
  8491. return this._element
  8492. }, enumerable: !0, configurable: !0
  8493. }), Object.defineProperty(e.prototype, "textContent", {
  8494. set: function (e) {
  8495. this.disposed || e === this._textContent || (this._textContent = e, this._element.textContent = e)
  8496. }, enumerable: !0, configurable: !0
  8497. }), Object.defineProperty(e.prototype, "className", {
  8498. set: function (e) {
  8499. this.disposed || e === this._className || (this._className = e, this._element.className = e)
  8500. }, enumerable: !0, configurable: !0
  8501. }), Object.defineProperty(e.prototype, "title", {
  8502. set: function (e) {
  8503. this.disposed || e === this._title || (this._title = e, this._title ? this._element.title = e : this._element.removeAttribute("title"))
  8504. }, enumerable: !0, configurable: !0
  8505. }), Object.defineProperty(e.prototype, "empty", {
  8506. set: function (e) {
  8507. this.disposed || e === this._empty || (this._empty = e, this._element.style.marginLeft = e ? "0" : "")
  8508. }, enumerable: !0, configurable: !0
  8509. }), e.prototype.dispose = function () {
  8510. this.disposed = !0
  8511. }, e
  8512. }(), u = function (e) {
  8513. function t(t, o) {
  8514. var r = e.call(this) || this;
  8515. r.domNode = r._register(new l(n.append(t, n.$(".monaco-icon-label"))));
  8516. var s = n.append(r.domNode.element, n.$(".monaco-icon-label-container")),
  8517. a = n.append(s, n.$("span.monaco-icon-name-container"));
  8518. return r.descriptionContainer = r._register(new l(n.append(s, n.$("span.monaco-icon-description-container")))), (null == o ? void 0 : o.supportHighlights) ? r.nameNode = new c(a, !!o.supportCodicons) : r.nameNode = new d(a), (null == o ? void 0 : o.supportDescriptionHighlights) ? r.descriptionNodeFactory = function () {
  8519. return new i.HighlightedLabel(n.append(r.descriptionContainer.element, n.$("span.label-description")), !!o.supportCodicons)
  8520. } : r.descriptionNodeFactory = function () {
  8521. return r._register(new l(n.append(r.descriptionContainer.element, n.$("span.label-description"))))
  8522. }, r
  8523. }
  8524. return r(t, e), t.prototype.setLabel = function (e, t, n) {
  8525. var o = ["monaco-icon-label"];
  8526. n && (n.extraClasses && o.push.apply(o, n.extraClasses), n.italic && o.push("italic")), this.domNode.className = o.join(" "), this.domNode.title = (null == n ? void 0 : n.title) || "", this.nameNode.setLabel(e, n), (t || this.descriptionNode) && (this.descriptionNode || (this.descriptionNode = this.descriptionNodeFactory()), this.descriptionNode instanceof i.HighlightedLabel ? (this.descriptionNode.set(t || "", n ? n.descriptionMatches : void 0), (null == n ? void 0 : n.descriptionTitle) ? this.descriptionNode.element.title = n.descriptionTitle : this.descriptionNode.element.removeAttribute("title")) : (this.descriptionNode.textContent = t || "", this.descriptionNode.title = (null == n ? void 0 : n.descriptionTitle) || "",
  8527. this.descriptionNode.empty = !t))
  8528. }, t
  8529. }(o.Disposable);
  8530. t.IconLabel = u;
  8531. var d = function () {
  8532. function e(e) {
  8533. this.container = e, this.label = void 0, this.singleLabel = void 0
  8534. }
  8535. return e.prototype.setLabel = function (e, t) {
  8536. if (this.label !== e || !a.equals(this.options, t)) if (this.label = e, this.options = t, "string" == typeof e) this.singleLabel || (this.container.innerHTML = "", n.removeClass(this.container, "multiple"), this.singleLabel = n.append(this.container, n.$("a.label-name", {id: null == t ? void 0 : t.domId}))), this.singleLabel.textContent = e; else {
  8537. this.container.innerHTML = "", n.addClass(this.container, "multiple"), this.singleLabel = void 0;
  8538. for (var i = 0; i < e.length; i++) {
  8539. var o = e[i], r = (null == t ? void 0 : t.domId) && (null == t ? void 0 : t.domId) + "_" + i;
  8540. n.append(this.container, n.$("a.label-name", {
  8541. id: r,
  8542. "data-icon-label-count": e.length,
  8543. "data-icon-label-index": i
  8544. }, o)), i < e.length - 1 && n.append(this.container, n.$("span.label-separator", void 0, (null == t ? void 0 : t.separator) || "/"))
  8545. }
  8546. }
  8547. }, e
  8548. }();
  8549. var c = function () {
  8550. function e(e, t) {
  8551. this.container = e, this.supportCodicons = t, this.label = void 0,
  8552. this.singleLabel = void 0
  8553. }
  8554. return e.prototype.setLabel = function (e, t) {
  8555. if (this.label !== e || !a.equals(this.options, t)) if (this.label = e, this.options = t, "string" == typeof e) this.singleLabel || (this.container.innerHTML = "", n.removeClass(this.container, "multiple"), this.singleLabel = new i.HighlightedLabel(n.append(this.container, n.$("a.label-name", {id: null == t ? void 0 : t.domId})), this.supportCodicons)), this.singleLabel.set(e, null == t ? void 0 : t.matches, null == t ? void 0 : t.title, null == t ? void 0 : t.labelEscapeNewLines); else {
  8556. this.container.innerHTML = "", n.addClass(this.container, "multiple"), this.singleLabel = void 0;
  8557. for (var o = (null == t ? void 0 : t.separator) || "/", r = function (e, t, n) {
  8558. if (n) {
  8559. var i = 0;
  8560. return e.map((function (e) {
  8561. var o = {start: i, end: i + e.length}, r = n.map((function (e) {
  8562. return s.Range.intersect(o, e)
  8563. })).filter((function (e) {
  8564. return !s.Range.isEmpty(e)
  8565. })).map((function (e) {
  8566. var t = e.start, n = e.end;
  8567. return {start: t - i, end: n - i}
  8568. }));
  8569. return i = o.end + t.length, r
  8570. }))
  8571. }
  8572. }(e, o, null == t ? void 0 : t.matches), l = 0; l < e.length; l++) {
  8573. var u = e[l], d = r ? r[l] : void 0,
  8574. c = (null == t ? void 0 : t.domId) && (null == t ? void 0 : t.domId) + "_" + l,
  8575. h = n.$("a.label-name", {
  8576. id: c,
  8577. "data-icon-label-count": e.length,
  8578. "data-icon-label-index": l
  8579. });
  8580. new i.HighlightedLabel(n.append(this.container, h), this.supportCodicons).set(u, d, null == t ? void 0 : t.title, null == t ? void 0 : t.labelEscapeNewLines), l < e.length - 1 && n.append(h, n.$("span.label-separator", void 0, o))
  8581. }
  8582. }
  8583. }, e
  8584. }()
  8585. })), define(n[269], i([9]), {}), define(n[270], i([9]), {}), define(n[271], i([9]), {}), define(n[272], i([9]), {}), define(n[273], i([9]), {}), define(n[274], i([0, 1, 2, 27, 31, 6, 15, 273]), (function (e, t, n, i, o, s, a) {
  8586. "use strict";
  8587. Object.defineProperty(t, "__esModule", {value: !0});
  8588. var l = {progressBarBackground: i.Color.fromHex("#0E70C0")}, u = function (e) {
  8589. function t(t, n) {
  8590. var i = e.call(this) || this;
  8591. return i.options = n || Object.create(null), o.mixin(i.options, l, !1), i.workedVal = 0, i.progressBarBackground = i.options.progressBarBackground, i._register(i.showDelayedScheduler = new a.RunOnceScheduler((function () {
  8592. return s.show(i.element)
  8593. }), 0)), i.create(t), i
  8594. }
  8595. return r(t, e),
  8596. t.prototype.create = function (e) {
  8597. this.element = document.createElement("div"), s.addClass(this.element, "monaco-progress-container"), e.appendChild(this.element), this.bit = document.createElement("div"), s.addClass(this.bit, "progress-bit"), this.element.appendChild(this.bit), this.applyStyles()
  8598. }, t.prototype.off = function () {
  8599. this.bit.style.width = "inherit", this.bit.style.opacity = "1", s.removeClasses(this.element, "active", "infinite", "discrete"), this.workedVal = 0, this.totalWork = void 0
  8600. }, t.prototype.stop = function () {
  8601. return this.doDone(!1)
  8602. }, t.prototype.doDone = function (e) {
  8603. var t = this;
  8604. return s.addClass(this.element, "done"), s.hasClass(this.element, "infinite") ? (this.bit.style.opacity = "0", e ? setTimeout((function () {
  8605. return t.off()
  8606. }), 200) : this.off()) : (this.bit.style.width = "inherit", e ? setTimeout((function () {
  8607. return t.off()
  8608. }), 200) : this.off()), this
  8609. }, t.prototype.hide = function () {
  8610. s.hide(this.element), this.showDelayedScheduler.cancel()
  8611. }, t.prototype.style = function (e) {
  8612. this.progressBarBackground = e.progressBarBackground, this.applyStyles()
  8613. },
  8614. t.prototype.applyStyles = function () {
  8615. if (this.bit) {
  8616. var e = this.progressBarBackground ? this.progressBarBackground.toString() : "";
  8617. this.bit.style.backgroundColor = e
  8618. }
  8619. }, t
  8620. }(n.Disposable);
  8621. t.ProgressBar = u
  8622. })), define(n[275], i([9]), {});
  8623. a = this && this.__spreadArrays || function () {
  8624. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  8625. var i = Array(e), o = 0;
  8626. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  8627. return i
  8628. };
  8629. define(n[104], i([0, 1, 2, 24, 16, 21, 57, 45, 4, 6, 52, 275]), (function (e, t, n, i, o, s, l, u, d, c, h) {
  8630. "use strict";
  8631. Object.defineProperty(t, "__esModule", {value: !0});
  8632. var p = !1, g = function (e) {
  8633. function t(t, r, s) {
  8634. void 0 === s && (s = {});
  8635. var a = e.call(this) || this;
  8636. return a._state = 3, a._onDidEnablementChange = a._register(new d.Emitter), a.onDidEnablementChange = a._onDidEnablementChange.event, a._onDidStart = a._register(new d.Emitter), a.onDidStart = a._onDidStart.event, a._onDidChange = a._register(new d.Emitter), a.onDidChange = a._onDidChange.event, a._onDidReset = a._register(new d.Emitter), a.onDidReset = a._onDidReset.event,
  8637. a._onDidEnd = a._register(new d.Emitter), a.onDidEnd = a._onDidEnd.event, a.linkedSash = void 0, a.orthogonalStartSashDisposables = a._register(new n.DisposableStore), a.orthogonalEndSashDisposables = a._register(new n.DisposableStore), a.el = c.append(t, c.$(".monaco-sash")), o.isMacintosh && c.addClass(a.el, "mac"), a._register(h.domEvent(a.el, "mousedown")(a.onMouseDown, a)), a._register(h.domEvent(a.el, "dblclick")(a.onMouseDoubleClick, a)), a._register(l.Gesture.addTarget(a.el)), a._register(h.domEvent(a.el, l.EventType.Start)(a.onTouchStart, a)), i.isIPad && c.addClass(a.el, "touch"), a.setOrientation(s.orientation || 0), a.hidden = !1, a.layoutProvider = r, a.orthogonalStartSash = s.orthogonalStartSash, a.orthogonalEndSash = s.orthogonalEndSash, c.toggleClass(a.el, "debug", p), a
  8638. }
  8639. return r(t, e), Object.defineProperty(t.prototype, "state", {
  8640. get: function () {
  8641. return this._state
  8642. }, set: function (e) {
  8643. this._state !== e && (c.toggleClass(this.el, "disabled", 0 === e), c.toggleClass(this.el, "minimum", 1 === e), c.toggleClass(this.el, "maximum", 2 === e), this._state = e,
  8644. this._onDidEnablementChange.fire(e))
  8645. }, enumerable: !0, configurable: !0
  8646. }), Object.defineProperty(t.prototype, "orthogonalStartSash", {
  8647. get: function () {
  8648. return this._orthogonalStartSash
  8649. }, set: function (e) {
  8650. this.orthogonalStartSashDisposables.clear(), e ? (this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange, this)), this.onOrthogonalStartSashEnablementChange(e.state)) : this.onOrthogonalStartSashEnablementChange(0), this._orthogonalStartSash = e
  8651. }, enumerable: !0, configurable: !0
  8652. }), Object.defineProperty(t.prototype, "orthogonalEndSash", {
  8653. get: function () {
  8654. return this._orthogonalEndSash
  8655. }, set: function (e) {
  8656. this.orthogonalEndSashDisposables.clear(), e ? (this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange, this)), this.onOrthogonalEndSashEnablementChange(e.state)) : this.onOrthogonalEndSashEnablementChange(0), this._orthogonalEndSash = e
  8657. }, enumerable: !0, configurable: !0
  8658. }), t.prototype.setOrientation = function (e) {
  8659. this.orientation = e,
  8660. 1 === this.orientation ? (c.addClass(this.el, "horizontal"), c.removeClass(this.el, "vertical")) : (c.removeClass(this.el, "horizontal"), c.addClass(this.el, "vertical")), this.layoutProvider && this.layout()
  8661. }, t.prototype.onMouseDown = function (e) {
  8662. var t = this;
  8663. c.EventHelper.stop(e, !1);
  8664. var i = !1;
  8665. if (!e.__orthogonalSashEvent) {
  8666. var r = this.getOrthogonalSash(e);
  8667. r && (i = !0, e.__orthogonalSashEvent = !0, r.onMouseDown(e))
  8668. }
  8669. if (this.linkedSash && !e.__linkedSashEvent && (e.__linkedSashEvent = !0, this.linkedSash.onMouseDown(e)), this.state) {
  8670. for (var s = a(c.getElementsByTagName("iframe"), c.getElementsByTagName("webview")), l = 0, d = s; l < d.length; l++) {
  8671. d[l].style.pointerEvents = "none"
  8672. }
  8673. var p = new u.StandardMouseEvent(e), g = p.posx, f = p.posy, m = p.altKey,
  8674. v = {startX: g, currentX: g, startY: f, currentY: f, altKey: m};
  8675. c.addClass(this.el, "active"), this._onDidStart.fire(v);
  8676. var _ = c.createStyleSheet(this.el), y = function () {
  8677. var e = ""
  8678. ;e = i ? "all-scroll" : 1 === t.orientation ? 1 === t.state ? "s-resize" : 2 === t.state ? "n-resize" : o.isMacintosh ? "row-resize" : "ns-resize" : 1 === t.state ? "e-resize" : 2 === t.state ? "w-resize" : o.isMacintosh ? "col-resize" : "ew-resize", _.innerHTML = "* { cursor: " + e + " !important; }"
  8679. }, C = new n.DisposableStore;
  8680. y(), i || this.onDidEnablementChange(y, null, C);
  8681. h.domEvent(window, "mousemove")((function (e) {
  8682. c.EventHelper.stop(e, !1);
  8683. var n = new u.StandardMouseEvent(e),
  8684. i = {startX: g, currentX: n.posx, startY: f, currentY: n.posy, altKey: m};
  8685. t._onDidChange.fire(i)
  8686. }), null, C), h.domEvent(window, "mouseup")((function (e) {
  8687. c.EventHelper.stop(e, !1), t.el.removeChild(_), c.removeClass(t.el, "active"), t._onDidEnd.fire(), C.dispose();
  8688. for (var n = 0, i = s; n < i.length; n++) {
  8689. i[n].style.pointerEvents = "auto"
  8690. }
  8691. }), null, C)
  8692. }
  8693. }, t.prototype.onMouseDoubleClick = function (e) {
  8694. var t = this.getOrthogonalSash(e);
  8695. t && t._onDidReset.fire(), this.linkedSash && this.linkedSash._onDidReset.fire(), this._onDidReset.fire()
  8696. }, t.prototype.onTouchStart = function (e) {
  8697. var t = this;
  8698. c.EventHelper.stop(e)
  8699. ;var i = [], o = e.pageX, r = e.pageY, a = e.altKey;
  8700. this._onDidStart.fire({
  8701. startX: o,
  8702. currentX: o,
  8703. startY: r,
  8704. currentY: r,
  8705. altKey: a
  8706. }), i.push(c.addDisposableListener(this.el, l.EventType.Change, (function (e) {
  8707. s.isNumber(e.pageX) && s.isNumber(e.pageY) && t._onDidChange.fire({
  8708. startX: o,
  8709. currentX: e.pageX,
  8710. startY: r,
  8711. currentY: e.pageY,
  8712. altKey: a
  8713. })
  8714. }))), i.push(c.addDisposableListener(this.el, l.EventType.End, (function (e) {
  8715. t._onDidEnd.fire(), n.dispose(i)
  8716. })))
  8717. }, t.prototype.layout = function () {
  8718. var e = i.isIPad ? 20 : 4;
  8719. if (0 === this.orientation) {
  8720. var t = this.layoutProvider;
  8721. this.el.style.left = t.getVerticalSashLeft(this) - e / 2 + "px", t.getVerticalSashTop && (this.el.style.top = t.getVerticalSashTop(this) + "px"), t.getVerticalSashHeight && (this.el.style.height = t.getVerticalSashHeight(this) + "px")
  8722. } else {
  8723. var n = this.layoutProvider;
  8724. this.el.style.top = n.getHorizontalSashTop(this) - e / 2 + "px", n.getHorizontalSashLeft && (this.el.style.left = n.getHorizontalSashLeft(this) + "px"), n.getHorizontalSashWidth && (this.el.style.width = n.getHorizontalSashWidth(this) + "px")
  8725. }
  8726. }, t.prototype.hide = function () {
  8727. this.hidden = !0, this.el.style.display = "none", this.el.setAttribute("aria-hidden", "true")
  8728. }, t.prototype.onOrthogonalStartSashEnablementChange = function (e) {
  8729. c.toggleClass(this.el, "orthogonal-start", 0 !== e)
  8730. }, t.prototype.onOrthogonalEndSashEnablementChange = function (e) {
  8731. c.toggleClass(this.el, "orthogonal-end", 0 !== e)
  8732. }, t.prototype.getOrthogonalSash = function (e) {
  8733. if (0 === this.orientation) {
  8734. if (e.offsetY <= 4) return this.orthogonalStartSash;
  8735. if (e.offsetY >= this.el.clientHeight - 4) return this.orthogonalEndSash
  8736. } else {
  8737. if (e.offsetX <= 4) return this.orthogonalStartSash;
  8738. if (e.offsetX >= this.el.clientWidth - 4) return this.orthogonalEndSash
  8739. }
  8740. }, t.prototype.dispose = function () {
  8741. e.prototype.dispose.call(this), this.el.remove()
  8742. }, t
  8743. }(n.Disposable);
  8744. t.Sash = g
  8745. })), define(n[276], i([9]), {}), define(n[53], i([0, 1, 24, 6, 28, 45, 250, 251, 47, 15, 4, 2, 16, 176, 276]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g) {
  8746. "use strict";
  8747. Object.defineProperty(t, "__esModule", {value: !0});
  8748. var f = function (e, t, n) {
  8749. this.timestamp = e, this.deltaX = t, this.deltaY = n, this.score = 0
  8750. }, m = function () {
  8751. function e() {
  8752. this._capacity = 5, this._memory = [], this._front = -1, this._rear = -1
  8753. }
  8754. return e.prototype.isPhysicalMouseWheel = function () {
  8755. if (-1 === this._front && -1 === this._rear) return !1;
  8756. for (var e = 1, t = 0, n = 1, i = this._rear; ;) {
  8757. var o = i === this._front ? e : Math.pow(2, -n);
  8758. if (e -= o, t += this._memory[i].score * o, i === this._front) break;
  8759. i = (this._capacity + i - 1) % this._capacity, n++
  8760. }
  8761. return t <= .5
  8762. }, e.prototype.accept = function (e, t, n) {
  8763. var i = new f(e, t, n);
  8764. i.score = this._computeScore(i), -1 === this._front && -1 === this._rear ? (this._memory[0] = i, this._front = 0, this._rear = 0) : (this._rear = (this._rear + 1) % this._capacity, this._rear === this._front && (this._front = (this._front + 1) % this._capacity), this._memory[this._rear] = i)
  8765. }, e.prototype._computeScore = function (e) {
  8766. if (Math.abs(e.deltaX) > 0 && Math.abs(e.deltaY) > 0) return 1;
  8767. var t = .5;
  8768. -1 === this._front && -1 === this._rear || this._memory[this._rear];
  8769. return (Math.abs(e.deltaX - Math.round(e.deltaX)) > 0 || Math.abs(e.deltaY - Math.round(e.deltaY)) > 0) && (t += .25), Math.min(Math.max(t, 0), 1)
  8770. }, e.INSTANCE = new e, e
  8771. }();
  8772. t.MouseWheelClassifier = m;
  8773. var v = function (e) {
  8774. function t(t, n, i) {
  8775. var r = e.call(this) || this;
  8776. r._onScroll = r._register(new c.Emitter), r.onScroll = r._onScroll.event, t.style.overflow = "hidden", r._options = b(n), r._scrollable = i, r._register(r._scrollable.onScroll((function (e) {
  8777. r._onDidScroll(e), r._onScroll.fire(e)
  8778. })));
  8779. var s = {
  8780. onMouseWheel: function (e) {
  8781. return r._onMouseWheel(e)
  8782. }, onDragStart: function () {
  8783. return r._onDragStart()
  8784. }, onDragEnd: function () {
  8785. return r._onDragEnd()
  8786. }
  8787. };
  8788. return r._verticalScrollbar = r._register(new l.VerticalScrollbar(r._scrollable, r._options, s)), r._horizontalScrollbar = r._register(new a.HorizontalScrollbar(r._scrollable, r._options, s)), r._domNode = document.createElement("div"), r._domNode.className = "monaco-scrollable-element " + r._options.className, r._domNode.setAttribute("role", "presentation"), r._domNode.style.position = "relative", r._domNode.style.overflow = "hidden", r._domNode.appendChild(t), r._domNode.appendChild(r._horizontalScrollbar.domNode.domNode), r._domNode.appendChild(r._verticalScrollbar.domNode.domNode),
  8789. r._options.useShadows ? (r._leftShadowDomNode = o.createFastDomNode(document.createElement("div")), r._leftShadowDomNode.setClassName("shadow"), r._domNode.appendChild(r._leftShadowDomNode.domNode), r._topShadowDomNode = o.createFastDomNode(document.createElement("div")), r._topShadowDomNode.setClassName("shadow"), r._domNode.appendChild(r._topShadowDomNode.domNode), r._topLeftShadowDomNode = o.createFastDomNode(document.createElement("div")), r._topLeftShadowDomNode.setClassName("shadow top-left-corner"), r._domNode.appendChild(r._topLeftShadowDomNode.domNode)) : (r._leftShadowDomNode = null, r._topShadowDomNode = null, r._topLeftShadowDomNode = null), r._listenOnDomNode = r._options.listenOnDomNode || r._domNode, r._mouseWheelToDispose = [], r._setListeningToMouseWheel(r._options.handleMouseWheel), r.onmouseover(r._listenOnDomNode, (function (e) {
  8790. return r._onMouseOver(e)
  8791. })), r.onnonbubblingmouseout(r._listenOnDomNode, (function (e) {
  8792. return r._onMouseOut(e)
  8793. })), r._hideTimeout = r._register(new d.TimeoutTimer), r._isDragging = !1, r._mouseIsOver = !1,
  8794. r._shouldRender = !0, r._revealOnScroll = !0, r
  8795. }
  8796. return r(t, e), t.prototype.dispose = function () {
  8797. this._mouseWheelToDispose = h.dispose(this._mouseWheelToDispose), e.prototype.dispose.call(this)
  8798. }, t.prototype.getDomNode = function () {
  8799. return this._domNode
  8800. }, t.prototype.getOverviewRulerLayoutInfo = function () {
  8801. return {parent: this._domNode, insertBefore: this._verticalScrollbar.domNode.domNode}
  8802. }, t.prototype.delegateVerticalScrollbarMouseDown = function (e) {
  8803. this._verticalScrollbar.delegateMouseDown(e)
  8804. }, t.prototype.getScrollDimensions = function () {
  8805. return this._scrollable.getScrollDimensions()
  8806. }, t.prototype.setScrollDimensions = function (e) {
  8807. this._scrollable.setScrollDimensions(e)
  8808. }, t.prototype.updateClassName = function (e) {
  8809. this._options.className = e, p.isMacintosh && (this._options.className += " mac"), this._domNode.className = "monaco-scrollable-element " + this._options.className
  8810. }, t.prototype.updateOptions = function (e) {
  8811. var t = b(e);
  8812. this._options.handleMouseWheel = t.handleMouseWheel, this._options.mouseWheelScrollSensitivity = t.mouseWheelScrollSensitivity,
  8813. this._options.fastScrollSensitivity = t.fastScrollSensitivity, this._setListeningToMouseWheel(this._options.handleMouseWheel), this._options.lazyRender || this._render()
  8814. }, t.prototype._setListeningToMouseWheel = function (e) {
  8815. var t = this;
  8816. if (this._mouseWheelToDispose.length > 0 !== e && (this._mouseWheelToDispose = h.dispose(this._mouseWheelToDispose), e)) {
  8817. this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode, n.isEdgeOrIE ? "mousewheel" : "wheel", (function (e) {
  8818. t._onMouseWheel(new s.StandardWheelEvent(e))
  8819. }), {passive: !1}))
  8820. }
  8821. }, t.prototype._onMouseWheel = function (e) {
  8822. var t, n = m.INSTANCE;
  8823. if (n.accept(Date.now(), e.deltaX, e.deltaY), e.deltaY || e.deltaX) {
  8824. var i = e.deltaY * this._options.mouseWheelScrollSensitivity,
  8825. o = e.deltaX * this._options.mouseWheelScrollSensitivity;
  8826. this._options.flipAxes && (i = (t = [o, i])[0], o = t[1]);
  8827. var r = !p.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;
  8828. !this._options.scrollYToX && !r || o || (o = i, i = 0), e.browserEvent && e.browserEvent.altKey && (o *= this._options.fastScrollSensitivity,
  8829. i *= this._options.fastScrollSensitivity);
  8830. var s = this._scrollable.getFutureScrollPosition(), a = {};
  8831. if (i) {
  8832. var l = s.scrollTop - 50 * i;
  8833. this._verticalScrollbar.writeScrollPosition(a, l)
  8834. }
  8835. if (o) {
  8836. var u = s.scrollLeft - 50 * o;
  8837. this._horizontalScrollbar.writeScrollPosition(a, u)
  8838. }
  8839. if (a = this._scrollable.validateScrollPosition(a), s.scrollLeft !== a.scrollLeft || s.scrollTop !== a.scrollTop) this._options.mouseWheelSmoothScroll && n.isPhysicalMouseWheel() ? this._scrollable.setScrollPositionSmooth(a) : this._scrollable.setScrollPositionNow(a), this._shouldRender = !0
  8840. }
  8841. (this._options.alwaysConsumeMouseWheel || this._shouldRender) && (e.preventDefault(), e.stopPropagation())
  8842. }, t.prototype._onDidScroll = function (e) {
  8843. this._shouldRender = this._horizontalScrollbar.onDidScroll(e) || this._shouldRender, this._shouldRender = this._verticalScrollbar.onDidScroll(e) || this._shouldRender, this._options.useShadows && (this._shouldRender = !0), this._revealOnScroll && this._reveal(), this._options.lazyRender || this._render()
  8844. }, t.prototype.renderNow = function () {
  8845. if (!this._options.lazyRender) throw new Error("Please use `lazyRender` together with `renderNow`!");
  8846. this._render()
  8847. }, t.prototype._render = function () {
  8848. if (this._shouldRender && (this._shouldRender = !1, this._horizontalScrollbar.render(), this._verticalScrollbar.render(), this._options.useShadows)) {
  8849. var e = this._scrollable.getCurrentScrollPosition(), t = e.scrollTop > 0, n = e.scrollLeft > 0;
  8850. this._leftShadowDomNode.setClassName("shadow" + (n ? " left" : "")), this._topShadowDomNode.setClassName("shadow" + (t ? " top" : "")), this._topLeftShadowDomNode.setClassName("shadow top-left-corner" + (t ? " top" : "") + (n ? " left" : ""))
  8851. }
  8852. }, t.prototype._onDragStart = function () {
  8853. this._isDragging = !0, this._reveal()
  8854. }, t.prototype._onDragEnd = function () {
  8855. this._isDragging = !1, this._hide()
  8856. }, t.prototype._onMouseOut = function (e) {
  8857. this._mouseIsOver = !1, this._hide()
  8858. }, t.prototype._onMouseOver = function (e) {
  8859. this._mouseIsOver = !0, this._reveal()
  8860. }, t.prototype._reveal = function () {
  8861. this._verticalScrollbar.beginReveal(), this._horizontalScrollbar.beginReveal(), this._scheduleHide()
  8862. },
  8863. t.prototype._hide = function () {
  8864. this._mouseIsOver || this._isDragging || (this._verticalScrollbar.beginHide(), this._horizontalScrollbar.beginHide())
  8865. }, t.prototype._scheduleHide = function () {
  8866. var e = this;
  8867. this._mouseIsOver || this._isDragging || this._hideTimeout.cancelAndSet((function () {
  8868. return e._hide()
  8869. }), 500)
  8870. }, t
  8871. }(u.Widget);
  8872. t.AbstractScrollableElement = v;
  8873. var _ = function (e) {
  8874. function t(t, n) {
  8875. var o = this;
  8876. (n = n || {}).mouseWheelSmoothScroll = !1;
  8877. var r = new g.Scrollable(0, (function (e) {
  8878. return i.scheduleAtNextAnimationFrame(e)
  8879. }));
  8880. return (o = e.call(this, t, n, r) || this)._register(r), o
  8881. }
  8882. return r(t, e), t.prototype.setScrollPosition = function (e) {
  8883. this._scrollable.setScrollPositionNow(e)
  8884. }, t.prototype.getScrollPosition = function () {
  8885. return this._scrollable.getCurrentScrollPosition()
  8886. }, t
  8887. }(v);
  8888. t.ScrollableElement = _;
  8889. var y = function (e) {
  8890. function t(t, n, i) {
  8891. return e.call(this, t, n, i) || this
  8892. }
  8893. return r(t, e), t
  8894. }(v);
  8895. t.SmoothScrollableElement = y;
  8896. var C = function (e) {
  8897. function t(t, n) {
  8898. var i = e.call(this, t, n) || this;
  8899. return i._element = t, i.onScroll((function (e) {
  8900. e.scrollTopChanged && (i._element.scrollTop = e.scrollTop), e.scrollLeftChanged && (i._element.scrollLeft = e.scrollLeft)
  8901. })), i.scanDomNode(), i
  8902. }
  8903. return r(t, e), t.prototype.scanDomNode = function () {
  8904. this.setScrollDimensions({
  8905. width: this._element.clientWidth,
  8906. scrollWidth: this._element.scrollWidth,
  8907. height: this._element.clientHeight,
  8908. scrollHeight: this._element.scrollHeight
  8909. }), this.setScrollPosition({scrollLeft: this._element.scrollLeft, scrollTop: this._element.scrollTop})
  8910. }, t
  8911. }(_);
  8912. function b(e) {
  8913. var t = {
  8914. lazyRender: void 0 !== e.lazyRender && e.lazyRender,
  8915. className: void 0 !== e.className ? e.className : "",
  8916. useShadows: void 0 === e.useShadows || e.useShadows,
  8917. handleMouseWheel: void 0 === e.handleMouseWheel || e.handleMouseWheel,
  8918. flipAxes: void 0 !== e.flipAxes && e.flipAxes,
  8919. alwaysConsumeMouseWheel: void 0 !== e.alwaysConsumeMouseWheel && e.alwaysConsumeMouseWheel,
  8920. scrollYToX: void 0 !== e.scrollYToX && e.scrollYToX,
  8921. mouseWheelScrollSensitivity: void 0 !== e.mouseWheelScrollSensitivity ? e.mouseWheelScrollSensitivity : 1,
  8922. fastScrollSensitivity: void 0 !== e.fastScrollSensitivity ? e.fastScrollSensitivity : 5,
  8923. mouseWheelSmoothScroll: void 0 === e.mouseWheelSmoothScroll || e.mouseWheelSmoothScroll,
  8924. arrowSize: void 0 !== e.arrowSize ? e.arrowSize : 11,
  8925. listenOnDomNode: void 0 !== e.listenOnDomNode ? e.listenOnDomNode : null,
  8926. horizontal: void 0 !== e.horizontal ? e.horizontal : 1,
  8927. horizontalScrollbarSize: void 0 !== e.horizontalScrollbarSize ? e.horizontalScrollbarSize : 10,
  8928. horizontalSliderSize: void 0 !== e.horizontalSliderSize ? e.horizontalSliderSize : 0,
  8929. horizontalHasArrows: void 0 !== e.horizontalHasArrows && e.horizontalHasArrows,
  8930. vertical: void 0 !== e.vertical ? e.vertical : 1,
  8931. verticalScrollbarSize: void 0 !== e.verticalScrollbarSize ? e.verticalScrollbarSize : 10,
  8932. verticalHasArrows: void 0 !== e.verticalHasArrows && e.verticalHasArrows,
  8933. verticalSliderSize: void 0 !== e.verticalSliderSize ? e.verticalSliderSize : 0
  8934. };
  8935. return t.horizontalSliderSize = void 0 !== e.horizontalSliderSize ? e.horizontalSliderSize : t.horizontalScrollbarSize,
  8936. t.verticalSliderSize = void 0 !== e.verticalSliderSize ? e.verticalSliderSize : t.verticalScrollbarSize, p.isMacintosh && (t.className += " mac"), t
  8937. }
  8938. t.DomScrollableElement = C
  8939. }));
  8940. a = this && this.__spreadArrays || function () {
  8941. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  8942. var i = Array(e), o = 0;
  8943. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  8944. return i
  8945. };
  8946. define(n[140], i([0, 1, 31, 2, 57, 6, 4, 52, 53, 246, 249, 101, 103, 19, 98, 15, 24]), (function (e, t, n, i, o, r, s, l, u, d, c, p, g, f, m, v, _) {
  8947. "use strict";
  8948. Object.defineProperty(t, "__esModule", {value: !0});
  8949. var y = {
  8950. useShadows: !0,
  8951. verticalScrollMode: 1,
  8952. setRowLineHeight: !0,
  8953. supportDynamicHeights: !1,
  8954. dnd: {
  8955. getDragElements: function (e) {
  8956. return [e]
  8957. }, getDragURI: function () {
  8958. return null
  8959. }, onDragStart: function () {
  8960. }, onDragOver: function () {
  8961. return !1
  8962. }, drop: function () {
  8963. }
  8964. },
  8965. horizontalScrolling: !1
  8966. }, C = function () {
  8967. function e(e) {
  8968. this.elements = e
  8969. }
  8970. return e.prototype.update = function () {
  8971. }, e.prototype.getData = function () {
  8972. return this.elements
  8973. }, e
  8974. }();
  8975. t.ElementsDragAndDropData = C;
  8976. var b = function () {
  8977. function e(e) {
  8978. this.elements = e
  8979. }
  8980. return e.prototype.update = function () {
  8981. }, e.prototype.getData = function () {
  8982. return this.elements
  8983. }, e
  8984. }();
  8985. t.ExternalElementsDragAndDropData = b;
  8986. var S = function () {
  8987. function e() {
  8988. this.types = [], this.files = []
  8989. }
  8990. return e.prototype.update = function (e) {
  8991. var t;
  8992. if (e.types && (t = this.types).splice.apply(t, a([0, this.types.length], e.types)), e.files) {
  8993. this.files.splice(0, this.files.length);
  8994. for (var n = 0; n < e.files.length; n++) {
  8995. var i = e.files.item(n);
  8996. i && (i.size || i.type) && this.files.push(i)
  8997. }
  8998. }
  8999. }, e.prototype.getData = function () {
  9000. return {types: this.types, files: this.files}
  9001. }, e
  9002. }();
  9003. t.DesktopDragAndDropData = S;
  9004. var w = function () {
  9005. function e(t, a, h, p) {
  9006. var g = this;
  9007. if (void 0 === p && (p = y), this.virtualDelegate = a, this.domId = "list_id_" + ++e.InstanceCount, this.renderers = new Map, this.renderWidth = 0, this._scrollHeight = 0, this.scrollableElementUpdateDisposable = null, this.scrollableElementWidthDelayer = new v.Delayer(50), this.splicing = !1, this.dragOverAnimationStopDisposable = i.Disposable.None, this.dragOverMouseY = 0, this.canDrop = !1,
  9008. this.currentDragFeedbackDisposable = i.Disposable.None, this.onDragLeaveTimeout = i.Disposable.None, this.disposables = new i.DisposableStore, this._onDidChangeContentHeight = new s.Emitter, p.horizontalScrolling && p.supportDynamicHeights) throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");
  9009. this.items = [], this.itemId = 0, this.rangeMap = new d.RangeMap;
  9010. for (var f = 0, m = h; f < m.length; f++) {
  9011. var _ = m[f];
  9012. this.renderers.set(_.templateId, _)
  9013. }
  9014. this.cache = this.disposables.add(new c.RowCache(this.renderers)), this.lastRenderTop = 0, this.lastRenderHeight = 0, this.domNode = document.createElement("div"), this.domNode.className = "monaco-list", r.addClass(this.domNode, this.domId), this.domNode.tabIndex = 0, r.toggleClass(this.domNode, "mouse-support", "boolean" != typeof p.mouseSupport || p.mouseSupport), this.horizontalScrolling = n.getOrDefault(p, (function (e) {
  9015. return e.horizontalScrolling
  9016. }), y.horizontalScrolling), r.toggleClass(this.domNode, "horizontal-scrolling", this.horizontalScrolling),
  9017. this.additionalScrollHeight = void 0 === p.additionalScrollHeight ? 0 : p.additionalScrollHeight, this.ariaProvider = p.ariaProvider || {
  9018. getSetSize: function (e, t, n) {
  9019. return n
  9020. }, getPosInSet: function (e, t) {
  9021. return t + 1
  9022. }
  9023. }, this.rowsContainer = document.createElement("div"), this.rowsContainer.className = "monaco-list-rows", this.rowsContainer.style.transform = "translate3d(0px, 0px, 0px)", this.disposables.add(o.Gesture.addTarget(this.rowsContainer)), this.scrollableElement = this.disposables.add(new u.ScrollableElement(this.rowsContainer, {
  9024. alwaysConsumeMouseWheel: !0,
  9025. horizontal: this.horizontalScrolling ? 1 : 2,
  9026. vertical: n.getOrDefault(p, (function (e) {
  9027. return e.verticalScrollMode
  9028. }), y.verticalScrollMode),
  9029. useShadows: n.getOrDefault(p, (function (e) {
  9030. return e.useShadows
  9031. }), y.useShadows)
  9032. })), this.domNode.appendChild(this.scrollableElement.getDomNode()), t.appendChild(this.domNode), this.scrollableElement.onScroll(this.onScroll, this, this.disposables), l.domEvent(this.rowsContainer, o.EventType.Change)(this.onTouchChange, this, this.disposables),
  9033. l.domEvent(this.scrollableElement.getDomNode(), "scroll")((function (e) {
  9034. return e.target.scrollTop = 0
  9035. }), null, this.disposables), s.Event.map(l.domEvent(this.domNode, "dragover"), (function (e) {
  9036. return g.toDragEvent(e)
  9037. }))(this.onDragOver, this, this.disposables), s.Event.map(l.domEvent(this.domNode, "drop"), (function (e) {
  9038. return g.toDragEvent(e)
  9039. }))(this.onDrop, this, this.disposables), l.domEvent(this.domNode, "dragleave")(this.onDragLeave, this, this.disposables), l.domEvent(window, "dragend")(this.onDragEnd, this, this.disposables), this.setRowLineHeight = n.getOrDefault(p, (function (e) {
  9040. return e.setRowLineHeight
  9041. }), y.setRowLineHeight), this.supportDynamicHeights = n.getOrDefault(p, (function (e) {
  9042. return e.supportDynamicHeights
  9043. }), y.supportDynamicHeights), this.dnd = n.getOrDefault(p, (function (e) {
  9044. return e.dnd
  9045. }), y.dnd), this.layout()
  9046. }
  9047. return Object.defineProperty(e.prototype, "contentHeight", {
  9048. get: function () {
  9049. return this.rangeMap.size
  9050. }, enumerable: !0, configurable: !0
  9051. }), e.prototype.splice = function (e, t, n) {
  9052. if (void 0 === n && (n = []),
  9053. this.splicing) throw new Error("Can't run recursive splices.");
  9054. this.splicing = !0;
  9055. try {
  9056. return this._splice(e, t, n)
  9057. } finally {
  9058. this.splicing = !1, this._onDidChangeContentHeight.fire(this.contentHeight)
  9059. }
  9060. }, e.prototype._splice = function (e, t, n) {
  9061. var o, r = this;
  9062. void 0 === n && (n = []);
  9063. for (var s = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight), l = {
  9064. start: e,
  9065. end: e + t
  9066. }, u = g.Range.intersect(s, l), c = u.start; c < u.end; c++) this.removeItemFromDOM(c);
  9067. var h, p = {start: e + t, end: this.items.length}, f = g.Range.intersect(p, s),
  9068. m = g.Range.relativeComplement(p, s), v = n.map((function (e) {
  9069. return {
  9070. id: String(r.itemId++),
  9071. element: e,
  9072. templateId: r.virtualDelegate.getTemplateId(e),
  9073. size: r.virtualDelegate.getHeight(e),
  9074. width: void 0,
  9075. hasDynamicHeight: !!r.virtualDelegate.hasDynamicHeight && r.virtualDelegate.hasDynamicHeight(e),
  9076. lastDynamicHeightWidth: void 0,
  9077. row: null,
  9078. uri: void 0,
  9079. dropTarget: !1,
  9080. dragStartDisposable: i.Disposable.None
  9081. }
  9082. }));
  9083. 0 === e && t >= this.items.length ? (this.rangeMap = new d.RangeMap, this.rangeMap.splice(0, 0, v), this.items = v, h = []) : (this.rangeMap.splice(e, t, v),
  9084. h = (o = this.items).splice.apply(o, a([e, t], v)));
  9085. var _ = n.length - t, y = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight),
  9086. C = d.shift(f, _), b = g.Range.intersect(y, C);
  9087. for (c = b.start; c < b.end; c++) this.updateItemInDOM(this.items[c], c);
  9088. for (var S = 0, w = g.Range.relativeComplement(C, y); S < w.length; S++) for (c = (M = w[S]).start; c < M.end; c++) this.removeItemFromDOM(c);
  9089. for (var E = m.map((function (e) {
  9090. return d.shift(e, _)
  9091. })), L = {start: e, end: e + n.length}, D = a([L], E).map((function (e) {
  9092. return g.Range.intersect(y, e)
  9093. })), N = this.getNextToLastElement(D), x = 0, I = D; x < I.length; x++) {
  9094. var M;
  9095. for (c = (M = I[x]).start; c < M.end; c++) this.insertItemInDOM(c, N)
  9096. }
  9097. return this.eventuallyUpdateScrollDimensions(), this.supportDynamicHeights && this._rerender(this.scrollTop, this.renderHeight), h.map((function (e) {
  9098. return e.element
  9099. }))
  9100. }, e.prototype.eventuallyUpdateScrollDimensions = function () {
  9101. var e = this;
  9102. this._scrollHeight = this.contentHeight, this.rowsContainer.style.height = this._scrollHeight + "px",
  9103. this.scrollableElementUpdateDisposable || (this.scrollableElementUpdateDisposable = r.scheduleAtNextAnimationFrame((function () {
  9104. e.scrollableElement.setScrollDimensions({scrollHeight: e.scrollHeight}), e.updateScrollWidth(), e.scrollableElementUpdateDisposable = null
  9105. })))
  9106. }, e.prototype.eventuallyUpdateScrollWidth = function () {
  9107. var e = this;
  9108. this.horizontalScrolling && this.scrollableElementWidthDelayer.trigger((function () {
  9109. return e.updateScrollWidth()
  9110. }))
  9111. }, e.prototype.updateScrollWidth = function () {
  9112. if (this.horizontalScrolling) {
  9113. 0 === this.items.length && this.scrollableElement.setScrollDimensions({scrollWidth: 0});
  9114. for (var e = 0, t = 0, n = this.items; t < n.length; t++) {
  9115. var i = n[t];
  9116. void 0 !== i.width && (e = Math.max(e, i.width))
  9117. }
  9118. this.scrollWidth = e, this.scrollableElement.setScrollDimensions({scrollWidth: e + 10})
  9119. }
  9120. }, e.prototype.rerender = function () {
  9121. if (this.supportDynamicHeights) {
  9122. for (var e = 0, t = this.items; e < t.length; e++) {
  9123. t[e].lastDynamicHeightWidth = void 0
  9124. }
  9125. this._rerender(this.lastRenderTop, this.lastRenderHeight)
  9126. }
  9127. }, Object.defineProperty(e.prototype, "length", {
  9128. get: function () {
  9129. return this.items.length
  9130. }, enumerable: !0, configurable: !0
  9131. }), Object.defineProperty(e.prototype, "renderHeight", {
  9132. get: function () {
  9133. return this.scrollableElement.getScrollDimensions().height
  9134. }, enumerable: !0, configurable: !0
  9135. }), e.prototype.element = function (e) {
  9136. return this.items[e].element
  9137. }, e.prototype.domElement = function (e) {
  9138. var t = this.items[e].row;
  9139. return t && t.domNode
  9140. }, e.prototype.elementHeight = function (e) {
  9141. return this.items[e].size
  9142. }, e.prototype.elementTop = function (e) {
  9143. return this.rangeMap.positionAt(e)
  9144. }, e.prototype.indexAt = function (e) {
  9145. return this.rangeMap.indexAt(e)
  9146. }, e.prototype.indexAfter = function (e) {
  9147. return this.rangeMap.indexAfter(e)
  9148. }, e.prototype.layout = function (e, t) {
  9149. var n = {height: "number" == typeof e ? e : r.getContentHeight(this.domNode)};
  9150. this.scrollableElementUpdateDisposable && (this.scrollableElementUpdateDisposable.dispose(), this.scrollableElementUpdateDisposable = null, n.scrollHeight = this.scrollHeight), this.scrollableElement.setScrollDimensions(n), void 0 !== t && (this.renderWidth = t,
  9151. this.supportDynamicHeights && this._rerender(this.scrollTop, this.renderHeight), this.horizontalScrolling && this.scrollableElement.setScrollDimensions({width: "number" == typeof t ? t : r.getContentWidth(this.domNode)}))
  9152. }, e.prototype.render = function (e, t, n, i) {
  9153. for (var o = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight), r = this.getRenderRange(e, t), s = g.Range.relativeComplement(r, o), a = g.Range.relativeComplement(o, r), l = this.getNextToLastElement(s), u = 0, d = s; u < d.length; u++) for (var c = (f = d[u]).start; c < f.end; c++) this.insertItemInDOM(c, l);
  9154. for (var h = 0, p = a; h < p.length; h++) {
  9155. var f;
  9156. for (c = (f = p[h]).start; c < f.end; c++) this.removeItemFromDOM(c)
  9157. }
  9158. this.rowsContainer.style.left = "-" + n + "px", this.rowsContainer.style.top = "-" + e + "px", this.horizontalScrolling && (this.rowsContainer.style.width = Math.max(i, this.renderWidth) + "px"), this.lastRenderTop = e, this.lastRenderHeight = t
  9159. }, e.prototype.insertItemInDOM = function (e, t) {
  9160. var n = this, i = this.items[e];
  9161. if (!i.row) {
  9162. i.row = this.cache.alloc(i.templateId)
  9163. ;var o = this.ariaProvider.getRole ? this.ariaProvider.getRole(i.element) : "treeitem";
  9164. i.row.domNode.setAttribute("role", o);
  9165. var r = this.ariaProvider.isChecked ? this.ariaProvider.isChecked(i.element) : void 0;
  9166. void 0 !== r && i.row.domNode.setAttribute("aria-checked", String(r))
  9167. }
  9168. i.row.domNode.parentElement || (t ? this.rowsContainer.insertBefore(i.row.domNode, t) : this.rowsContainer.appendChild(i.row.domNode)), this.updateItemInDOM(i, e);
  9169. var s = this.renderers.get(i.templateId);
  9170. if (!s) throw new Error("No renderer found for template id " + i.templateId);
  9171. s && s.renderElement(i.element, e, i.row.templateData, i.size);
  9172. var a = this.dnd.getDragURI(i.element);
  9173. if (i.dragStartDisposable.dispose(), i.row.domNode.draggable = !!a, a) {
  9174. var u = l.domEvent(i.row.domNode, "dragstart");
  9175. i.dragStartDisposable = u((function (e) {
  9176. return n.onDragStart(i.element, a, e)
  9177. }))
  9178. }
  9179. this.horizontalScrolling && (this.measureItemWidth(i), this.eventuallyUpdateScrollWidth())
  9180. }, e.prototype.measureItemWidth = function (e) {
  9181. if (e.row && e.row.domNode) {
  9182. e.row.domNode.style.width = _.isFirefox ? "-moz-fit-content" : "fit-content", e.width = r.getContentWidth(e.row.domNode);
  9183. var t = window.getComputedStyle(e.row.domNode);
  9184. t.paddingLeft && (e.width += parseFloat(t.paddingLeft)), t.paddingRight && (e.width += parseFloat(t.paddingRight)), e.row.domNode.style.width = ""
  9185. }
  9186. }, e.prototype.updateItemInDOM = function (e, t) {
  9187. e.row.domNode.style.top = this.elementTop(t) + "px", e.row.domNode.style.height = e.size + "px", this.setRowLineHeight && (e.row.domNode.style.lineHeight = e.size + "px"), e.row.domNode.setAttribute("data-index", "" + t), e.row.domNode.setAttribute("data-last-element", t === this.length - 1 ? "true" : "false"), e.row.domNode.setAttribute("aria-setsize", String(this.ariaProvider.getSetSize(e.element, t, this.length))), e.row.domNode.setAttribute("aria-posinset", String(this.ariaProvider.getPosInSet(e.element, t))), e.row.domNode.setAttribute("id", this.getElementDomId(t)), r.toggleClass(e.row.domNode, "drop-target", e.dropTarget)
  9188. }, e.prototype.removeItemFromDOM = function (e) {
  9189. var t = this.items[e]
  9190. ;t.dragStartDisposable.dispose();
  9191. var n = this.renderers.get(t.templateId);
  9192. n && n.disposeElement && n.disposeElement(t.element, e, t.row.templateData, t.size), this.cache.release(t.row), t.row = null, this.horizontalScrolling && this.eventuallyUpdateScrollWidth()
  9193. }, e.prototype.getScrollTop = function () {
  9194. return this.scrollableElement.getScrollPosition().scrollTop
  9195. }, e.prototype.setScrollTop = function (e) {
  9196. this.scrollableElementUpdateDisposable && (this.scrollableElementUpdateDisposable.dispose(), this.scrollableElementUpdateDisposable = null, this.scrollableElement.setScrollDimensions({scrollHeight: this.scrollHeight})), this.scrollableElement.setScrollPosition({scrollTop: e})
  9197. }, Object.defineProperty(e.prototype, "scrollTop", {
  9198. get: function () {
  9199. return this.getScrollTop()
  9200. }, set: function (e) {
  9201. this.setScrollTop(e)
  9202. }, enumerable: !0, configurable: !0
  9203. }), Object.defineProperty(e.prototype, "scrollHeight", {
  9204. get: function () {
  9205. return this._scrollHeight + (this.horizontalScrolling ? 10 : 0) + this.additionalScrollHeight
  9206. }, enumerable: !0, configurable: !0
  9207. }),
  9208. Object.defineProperty(e.prototype, "onMouseClick", {
  9209. get: function () {
  9210. var e = this;
  9211. return s.Event.map(l.domEvent(this.domNode, "click"), (function (t) {
  9212. return e.toMouseEvent(t)
  9213. }))
  9214. }, enumerable: !0, configurable: !0
  9215. }), Object.defineProperty(e.prototype, "onMouseDblClick", {
  9216. get: function () {
  9217. var e = this;
  9218. return s.Event.map(l.domEvent(this.domNode, "dblclick"), (function (t) {
  9219. return e.toMouseEvent(t)
  9220. }))
  9221. }, enumerable: !0, configurable: !0
  9222. }), Object.defineProperty(e.prototype, "onMouseMiddleClick", {
  9223. get: function () {
  9224. var e = this;
  9225. return s.Event.filter(s.Event.map(l.domEvent(this.domNode, "auxclick"), (function (t) {
  9226. return e.toMouseEvent(t)
  9227. })), (function (e) {
  9228. return 1 === e.browserEvent.button
  9229. }))
  9230. }, enumerable: !0, configurable: !0
  9231. }), Object.defineProperty(e.prototype, "onMouseDown", {
  9232. get: function () {
  9233. var e = this;
  9234. return s.Event.map(l.domEvent(this.domNode, "mousedown"), (function (t) {
  9235. return e.toMouseEvent(t)
  9236. }))
  9237. }, enumerable: !0, configurable: !0
  9238. }), Object.defineProperty(e.prototype, "onContextMenu", {
  9239. get: function () {
  9240. var e = this
  9241. ;
  9242. return s.Event.map(l.domEvent(this.domNode, "contextmenu"), (function (t) {
  9243. return e.toMouseEvent(t)
  9244. }))
  9245. }, enumerable: !0, configurable: !0
  9246. }), Object.defineProperty(e.prototype, "onTouchStart", {
  9247. get: function () {
  9248. var e = this;
  9249. return s.Event.map(l.domEvent(this.domNode, "touchstart"), (function (t) {
  9250. return e.toTouchEvent(t)
  9251. }))
  9252. }, enumerable: !0, configurable: !0
  9253. }), Object.defineProperty(e.prototype, "onTap", {
  9254. get: function () {
  9255. var e = this;
  9256. return s.Event.map(l.domEvent(this.rowsContainer, o.EventType.Tap), (function (t) {
  9257. return e.toGestureEvent(t)
  9258. }))
  9259. }, enumerable: !0, configurable: !0
  9260. }), e.prototype.toMouseEvent = function (e) {
  9261. var t = this.getItemIndexFromEventTarget(e.target || null), n = void 0 === t ? void 0 : this.items[t];
  9262. return {browserEvent: e, index: t, element: n && n.element}
  9263. }, e.prototype.toTouchEvent = function (e) {
  9264. var t = this.getItemIndexFromEventTarget(e.target || null), n = void 0 === t ? void 0 : this.items[t];
  9265. return {browserEvent: e, index: t, element: n && n.element}
  9266. }, e.prototype.toGestureEvent = function (e) {
  9267. var t = this.getItemIndexFromEventTarget(e.initialTarget || null),
  9268. n = void 0 === t ? void 0 : this.items[t];
  9269. return {browserEvent: e, index: t, element: n && n.element}
  9270. }, e.prototype.toDragEvent = function (e) {
  9271. var t = this.getItemIndexFromEventTarget(e.target || null), n = void 0 === t ? void 0 : this.items[t];
  9272. return {browserEvent: e, index: t, element: n && n.element}
  9273. }, e.prototype.onScroll = function (e) {
  9274. try {
  9275. this.render(e.scrollTop, e.height, e.scrollLeft, e.scrollWidth), this.supportDynamicHeights && this._rerender(e.scrollTop, e.height)
  9276. } catch (t) {
  9277. throw console.error("Got bad scroll event:", e), t
  9278. }
  9279. }, e.prototype.onTouchChange = function (e) {
  9280. e.preventDefault(), e.stopPropagation(), this.scrollTop -= e.translationY
  9281. }, e.prototype.onDragStart = function (e, t, n) {
  9282. if (n.dataTransfer) {
  9283. var i = this.dnd.getDragElements(e);
  9284. if (n.dataTransfer.effectAllowed = "copyMove", n.dataTransfer.setData(m.DataTransfers.RESOURCES, JSON.stringify([t])), n.dataTransfer.setDragImage) {
  9285. var o = void 0;
  9286. this.dnd.getDragLabel && (o = this.dnd.getDragLabel(i, n)), void 0 === o && (o = String(i.length))
  9287. ;var s = r.$(".monaco-drag-image");
  9288. s.textContent = o, document.body.appendChild(s), n.dataTransfer.setDragImage(s, -10, -10), setTimeout((function () {
  9289. return document.body.removeChild(s)
  9290. }), 0)
  9291. }
  9292. this.currentDragData = new C(i), m.StaticDND.CurrentDragAndDropData = new b(i), this.dnd.onDragStart && this.dnd.onDragStart(this.currentDragData, n)
  9293. }
  9294. }, e.prototype.onDragOver = function (e) {
  9295. var t = this;
  9296. if (e.browserEvent.preventDefault(), this.onDragLeaveTimeout.dispose(), m.StaticDND.CurrentDragAndDropData && "vscode-ui" === m.StaticDND.CurrentDragAndDropData.getData()) return !1;
  9297. if (this.setupDragAndDropScrollTopAnimation(e.browserEvent), !e.browserEvent.dataTransfer) return !1;
  9298. if (!this.currentDragData) if (m.StaticDND.CurrentDragAndDropData) this.currentDragData = m.StaticDND.CurrentDragAndDropData; else {
  9299. if (!e.browserEvent.dataTransfer.types) return !1;
  9300. this.currentDragData = new S
  9301. }
  9302. var n, o, s, a = this.dnd.onDragOver(this.currentDragData, e.element, e.index, e.browserEvent);
  9303. if (this.canDrop = "boolean" == typeof a ? a : a.accept,
  9304. !this.canDrop) return this.currentDragFeedback = void 0, this.currentDragFeedbackDisposable.dispose(), !1;
  9305. if (e.browserEvent.dataTransfer.dropEffect = "boolean" != typeof a && 0 === a.effect ? "copy" : "move", n = "boolean" != typeof a && a.feedback ? a.feedback : void 0 === e.index ? [-1] : [e.index], n = -1 === (n = f.distinct(n).filter((function (e) {
  9306. return e >= -1 && e < t.length
  9307. })).sort((function (e, t) {
  9308. return e - t
  9309. })))[0] ? [-1] : n, o = this.currentDragFeedback, s = n, Array.isArray(o) && Array.isArray(s) ? f.equals(o, s) : o === s) return !0;
  9310. if (this.currentDragFeedback = n, this.currentDragFeedbackDisposable.dispose(), -1 === n[0]) r.addClass(this.domNode, "drop-target"), r.addClass(this.rowsContainer, "drop-target"), this.currentDragFeedbackDisposable = i.toDisposable((function () {
  9311. r.removeClass(t.domNode, "drop-target"), r.removeClass(t.rowsContainer, "drop-target")
  9312. })); else {
  9313. for (var l = 0, u = n; l < u.length; l++) {
  9314. var d = u[l], c = this.items[d];
  9315. c.dropTarget = !0, c.row && c.row.domNode && r.addClass(c.row.domNode, "drop-target")
  9316. }
  9317. this.currentDragFeedbackDisposable = i.toDisposable((function () {
  9318. for (var e = 0, i = n; e < i.length; e++) {
  9319. var o = i[e], s = t.items[o];
  9320. s.dropTarget = !1, s.row && s.row.domNode && r.removeClass(s.row.domNode, "drop-target")
  9321. }
  9322. }))
  9323. }
  9324. return !0
  9325. }, e.prototype.onDragLeave = function () {
  9326. var e = this;
  9327. this.onDragLeaveTimeout.dispose(), this.onDragLeaveTimeout = v.disposableTimeout((function () {
  9328. return e.clearDragOverFeedback()
  9329. }), 100)
  9330. }, e.prototype.onDrop = function (e) {
  9331. if (this.canDrop) {
  9332. var t = this.currentDragData;
  9333. this.teardownDragAndDropScrollTopAnimation(), this.clearDragOverFeedback(), this.currentDragData = void 0, m.StaticDND.CurrentDragAndDropData = void 0, t && e.browserEvent.dataTransfer && (e.browserEvent.preventDefault(), t.update(e.browserEvent.dataTransfer), this.dnd.drop(t, e.element, e.index, e.browserEvent))
  9334. }
  9335. }, e.prototype.onDragEnd = function (e) {
  9336. this.canDrop = !1, this.teardownDragAndDropScrollTopAnimation(), this.clearDragOverFeedback(), this.currentDragData = void 0, m.StaticDND.CurrentDragAndDropData = void 0, this.dnd.onDragEnd && this.dnd.onDragEnd(e)
  9337. }, e.prototype.clearDragOverFeedback = function () {
  9338. this.currentDragFeedback = void 0,
  9339. this.currentDragFeedbackDisposable.dispose(), this.currentDragFeedbackDisposable = i.Disposable.None
  9340. }, e.prototype.setupDragAndDropScrollTopAnimation = function (e) {
  9341. var t = this;
  9342. if (!this.dragOverAnimationDisposable) {
  9343. var n = r.getTopLeftOffset(this.domNode).top;
  9344. this.dragOverAnimationDisposable = r.animate(this.animateDragAndDropScrollTop.bind(this, n))
  9345. }
  9346. this.dragOverAnimationStopDisposable.dispose(), this.dragOverAnimationStopDisposable = v.disposableTimeout((function () {
  9347. t.dragOverAnimationDisposable && (t.dragOverAnimationDisposable.dispose(), t.dragOverAnimationDisposable = void 0)
  9348. }), 1e3), this.dragOverMouseY = e.pageY
  9349. }, e.prototype.animateDragAndDropScrollTop = function (e) {
  9350. if (void 0 !== this.dragOverMouseY) {
  9351. var t = this.dragOverMouseY - e, n = this.renderHeight - 35;
  9352. t < 35 ? this.scrollTop += Math.max(-14, Math.floor(.3 * (t - 35))) : t > n && (this.scrollTop += Math.min(14, Math.floor(.3 * (t - n))))
  9353. }
  9354. }, e.prototype.teardownDragAndDropScrollTopAnimation = function () {
  9355. this.dragOverAnimationStopDisposable.dispose(),
  9356. this.dragOverAnimationDisposable && (this.dragOverAnimationDisposable.dispose(), this.dragOverAnimationDisposable = void 0)
  9357. }, e.prototype.getItemIndexFromEventTarget = function (e) {
  9358. for (var t = e; t instanceof HTMLElement && t !== this.rowsContainer;) {
  9359. var n = t.getAttribute("data-index");
  9360. if (n) {
  9361. var i = Number(n);
  9362. if (!isNaN(i)) return i
  9363. }
  9364. t = t.parentElement
  9365. }
  9366. }, e.prototype.getRenderRange = function (e, t) {
  9367. return {start: this.rangeMap.indexAt(e), end: this.rangeMap.indexAfter(e + t - 1)}
  9368. }, e.prototype._rerender = function (e, t) {
  9369. var n, i, o = this.getRenderRange(e, t);
  9370. e === this.elementTop(o.start) ? (n = o.start, i = 0) : o.end - o.start > 1 && (n = o.start + 1, i = this.elementTop(n) - e);
  9371. for (var r = 0; ;) {
  9372. for (var s = this.getRenderRange(e, t), a = !1, l = s.start; l < s.end; l++) {
  9373. var u = this.probeDynamicHeight(l);
  9374. 0 !== u && this.rangeMap.splice(l, 1, [this.items[l]]), r += u, a = a || 0 !== u
  9375. }
  9376. if (!a) {
  9377. 0 !== r && this.eventuallyUpdateScrollDimensions();
  9378. for (var d = 0, c = g.Range.relativeComplement(o, s); d < c.length; d++) for (l = (f = c[d]).start; l < f.end; l++) this.items[l].row && this.removeItemFromDOM(l)
  9379. ;
  9380. for (var h = 0, p = g.Range.relativeComplement(s, o); h < p.length; h++) {
  9381. var f;
  9382. for (l = (f = p[h]).start; l < f.end; l++) {
  9383. var m = l + 1, v = m < this.items.length ? this.items[m].row : null,
  9384. _ = v ? v.domNode : null;
  9385. this.insertItemInDOM(l, _)
  9386. }
  9387. }
  9388. for (l = s.start; l < s.end; l++) this.items[l].row && this.updateItemInDOM(this.items[l], l);
  9389. return "number" == typeof n && (this.scrollTop = this.elementTop(n) - i), void this._onDidChangeContentHeight.fire(this.contentHeight)
  9390. }
  9391. }
  9392. }, e.prototype.probeDynamicHeight = function (e) {
  9393. var t = this.items[e];
  9394. if (!t.hasDynamicHeight || t.lastDynamicHeightWidth === this.renderWidth) return 0;
  9395. var n = t.size, i = this.cache.alloc(t.templateId);
  9396. i.domNode.style.height = "", this.rowsContainer.appendChild(i.domNode);
  9397. var o = this.renderers.get(t.templateId);
  9398. return o && (o.renderElement(t.element, e, i.templateData, void 0), o.disposeElement && o.disposeElement(t.element, e, i.templateData, void 0)), t.size = i.domNode.offsetHeight, this.virtualDelegate.setDynamicHeight && this.virtualDelegate.setDynamicHeight(t.element, t.size), t.lastDynamicHeightWidth = this.renderWidth,
  9399. this.rowsContainer.removeChild(i.domNode), this.cache.release(i), t.size - n
  9400. }, e.prototype.getNextToLastElement = function (e) {
  9401. var t = e[e.length - 1];
  9402. if (!t) return null;
  9403. var n = this.items[t.end];
  9404. return n && n.row ? n.row.domNode : null
  9405. }, e.prototype.getElementDomId = function (e) {
  9406. return this.domId + "_" + e
  9407. }, e.prototype.dispose = function () {
  9408. if (this.items) {
  9409. for (var e = 0, t = this.items; e < t.length; e++) {
  9410. var n = t[e];
  9411. if (n.row) {
  9412. var o = this.renderers.get(n.row.templateId);
  9413. o && o.disposeTemplate(n.row.templateData)
  9414. }
  9415. }
  9416. this.items = []
  9417. }
  9418. this.domNode && this.domNode.parentNode && this.domNode.parentNode.removeChild(this.domNode), i.dispose(this.disposables)
  9419. }, e.InstanceCount = 0, h([p.memoize], e.prototype, "onMouseClick", null), h([p.memoize], e.prototype, "onMouseDblClick", null), h([p.memoize], e.prototype, "onMouseMiddleClick", null), h([p.memoize], e.prototype, "onMouseDown", null), h([p.memoize], e.prototype, "onContextMenu", null), h([p.memoize], e.prototype, "onTouchStart", null), h([p.memoize], e.prototype, "onTap", null), e
  9420. }();
  9421. t.ListView = w
  9422. })),
  9423. define(n[277], i([0, 1, 16, 24, 2, 6, 126, 57, 5, 45, 56, 255, 54, 53, 257, 254, 4, 98, 137, 15]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C) {
  9424. "use strict";
  9425. Object.defineProperty(t, "__esModule", {value: !0});
  9426. var b = function () {
  9427. function e(e) {
  9428. this.context = e, this._cache = {"": []}
  9429. }
  9430. return e.prototype.alloc = function (e) {
  9431. var t = this.cache(e).pop();
  9432. if (!t) {
  9433. var n = document.createElement("div");
  9434. n.className = "content";
  9435. var i = document.createElement("div");
  9436. i.appendChild(n);
  9437. var o = null;
  9438. try {
  9439. o = this.context.renderer.renderTemplate(this.context.tree, e, n)
  9440. } catch (e) {
  9441. console.error("Tree usage error: exception while rendering template"), console.error(e)
  9442. }
  9443. t = {element: i, templateId: e, templateData: o}
  9444. }
  9445. return t
  9446. }, e.prototype.release = function (e, t) {
  9447. !function (e) {
  9448. try {
  9449. e.parentElement.removeChild(e)
  9450. } catch (e) {
  9451. }
  9452. }(t.element), this.cache(e).push(t)
  9453. }, e.prototype.cache = function (e) {
  9454. return this._cache[e] || (this._cache[e] = [])
  9455. }, e.prototype.garbageCollect = function () {
  9456. var e = this;
  9457. this._cache && Object.keys(this._cache).forEach((function (t) {
  9458. e._cache[t].forEach((function (n) {
  9459. e.context.renderer.disposeTemplate(e.context.tree, t, n.templateData), n.element = null, n.templateData = null
  9460. })), delete e._cache[t]
  9461. }))
  9462. }, e.prototype.dispose = function () {
  9463. this.garbageCollect(), this._cache = null
  9464. }, e
  9465. }();
  9466. t.RowCache = b;
  9467. var S = function () {
  9468. function e(e, t) {
  9469. var n = this;
  9470. this.width = 0, this.needsRender = !1, this.uri = null, this.unbindDragStart = o.Disposable.None, this._draggable = !1, this.context = e, this.model = t, this.id = this.model.id, this.row = null, this.top = 0, this.height = t.getHeight(), this._styles = {}, t.getAllTraits().forEach((function (e) {
  9471. return n._styles[e] = !0
  9472. })), t.isExpanded() && this.addClass("expanded")
  9473. }
  9474. return Object.defineProperty(e.prototype, "expanded", {
  9475. set: function (e) {
  9476. e ? this.addClass("expanded") : this.removeClass("expanded")
  9477. }, enumerable: !0, configurable: !0
  9478. }), Object.defineProperty(e.prototype, "loading", {
  9479. set: function (e) {
  9480. e ? this.addClass("codicon-loading") : this.removeClass("codicon-loading")
  9481. }, enumerable: !0, configurable: !0
  9482. }), Object.defineProperty(e.prototype, "draggable", {
  9483. get: function () {
  9484. return this._draggable
  9485. }, set: function (e) {
  9486. this._draggable = e, this.render(!0)
  9487. }, enumerable: !0, configurable: !0
  9488. }), Object.defineProperty(e.prototype, "dropTarget", {
  9489. set: function (e) {
  9490. e ? this.addClass("drop-target") : this.removeClass("drop-target")
  9491. }, enumerable: !0, configurable: !0
  9492. }), Object.defineProperty(e.prototype, "element", {
  9493. get: function () {
  9494. return this.row && this.row.element
  9495. }, enumerable: !0, configurable: !0
  9496. }), Object.defineProperty(e.prototype, "templateId", {
  9497. get: function () {
  9498. return this._templateId || (this._templateId = this.context.renderer.getTemplateId && this.context.renderer.getTemplateId(this.context.tree, this.model.getElement()))
  9499. }, enumerable: !0, configurable: !0
  9500. }), e.prototype.addClass = function (e) {
  9501. this._styles[e] = !0, this.render(!0)
  9502. }, e.prototype.removeClass = function (e) {
  9503. delete this._styles[e], this.render(!0)
  9504. }, e.prototype.render = function (e) {
  9505. var t = this;
  9506. if (void 0 === e && (e = !1), this.model && this.element) {
  9507. var n = ["monaco-tree-row"];
  9508. n.push.apply(n, Object.keys(this._styles)), this.model.hasChildren() && n.push("has-children"), this.element.className = n.join(" "),
  9509. this.element.draggable = this.draggable, this.element.style.height = this.height + "px", this.element.setAttribute("role", "treeitem");
  9510. var o = this.context.accessibilityProvider,
  9511. r = o.getAriaLabel(this.context.tree, this.model.getElement());
  9512. if (r && this.element.setAttribute("aria-label", r), o.getPosInSet && o.getSetSize && (this.element.setAttribute("aria-setsize", o.getSetSize()), this.element.setAttribute("aria-posinset", o.getPosInSet(this.context.tree, this.model.getElement()))), this.model.hasTrait("focused")) {
  9513. var a = u.safeBtoa(this.model.id);
  9514. this.element.setAttribute("aria-selected", "true"), this.element.setAttribute("id", a)
  9515. } else this.element.setAttribute("aria-selected", "false"), this.element.removeAttribute("id");
  9516. this.model.hasChildren() ? this.element.setAttribute("aria-expanded", String(!!this._styles.expanded)) : this.element.removeAttribute("aria-expanded"), this.element.setAttribute("aria-level", String(this.model.getDepth())),
  9517. this.context.options.paddingOnRow ? this.element.style.paddingLeft = this.context.options.twistiePixels + (this.model.getDepth() - 1) * this.context.options.indentPixels + "px" : (this.element.style.paddingLeft = (this.model.getDepth() - 1) * this.context.options.indentPixels + "px", this.row.element.firstElementChild.style.paddingLeft = this.context.options.twistiePixels + "px");
  9518. var l = this.context.dnd.getDragURI(this.context.tree, this.model.getElement());
  9519. if (l !== this.uri && (this.unbindDragStart && this.unbindDragStart.dispose(), l ? (this.uri = l, this.draggable = !0, this.unbindDragStart = s.addDisposableListener(this.element, "dragstart", (function (e) {
  9520. t.onDragStart(e)
  9521. }))) : this.uri = null), !e && this.element) {
  9522. var d = 0;
  9523. if (this.context.horizontalScrolling) {
  9524. var c = window.getComputedStyle(this.element);
  9525. d = parseFloat(c.paddingLeft)
  9526. }
  9527. this.context.horizontalScrolling && (this.element.style.width = i.isFirefox ? "-moz-fit-content" : "fit-content");
  9528. try {
  9529. this.context.renderer.renderElement(this.context.tree, this.model.getElement(), this.templateId, this.row.templateData)
  9530. } catch (e) {
  9531. console.error("Tree usage error: exception while rendering element"), console.error(e)
  9532. }
  9533. this.context.horizontalScrolling && (this.width = s.getContentWidth(this.element) + d, this.element.style.width = "")
  9534. }
  9535. }
  9536. }, e.prototype.insertInDOM = function (e, t) {
  9537. if (this.row || (this.row = this.context.cache.alloc(this.templateId), this.element[E.BINDING] = this), !this.element.parentElement) {
  9538. if (null === t) e.appendChild(this.element); else try {
  9539. e.insertBefore(this.element, t)
  9540. } catch (t) {
  9541. console.warn("Failed to locate previous tree element"), e.appendChild(this.element)
  9542. }
  9543. this.render()
  9544. }
  9545. }, e.prototype.removeFromDOM = function () {
  9546. this.row && (this.unbindDragStart.dispose(), this.uri = null, this.element[E.BINDING] = null, this.context.cache.release(this.templateId, this.row), this.row = null)
  9547. }, e.prototype.dispose = function () {
  9548. this.row = null
  9549. }, e
  9550. }();
  9551. t.ViewItem = S;
  9552. var w = function (e) {
  9553. function t(t, n, i) {
  9554. var o = e.call(this, t, n) || this;
  9555. return o.row = {element: i, templateData: null, templateId: null}, o
  9556. }
  9557. return r(t, e), t.prototype.render = function () {
  9558. if (this.model && this.element) {
  9559. var e = ["monaco-tree-wrapper"];
  9560. e.push.apply(e, Object.keys(this._styles)), this.model.hasChildren() && e.push("has-children"), this.element.className = e.join(" ")
  9561. }
  9562. }, t.prototype.insertInDOM = function (e, t) {
  9563. }, t.prototype.removeFromDOM = function () {
  9564. }, t
  9565. }(S);
  9566. var E = function (e) {
  9567. function t(n, r) {
  9568. var a = e.call(this) || this;
  9569. a.model = null, a.lastPointerType = "", a.lastClickTimeStamp = 0, a.contentWidthUpdateDelayer = new C.Delayer(50), a.isRefreshing = !1, a.refreshingPreviousChildrenIds = {}, a.currentDragAndDropData = null, a.currentDropTarget = null, a.currentDropTargets = null, a.currentDropDisposable = o.Disposable.None, a.gestureDisposable = o.Disposable.None, a.dragAndDropScrollInterval = null, a.dragAndDropScrollTimeout = null, a.dragAndDropMouseY = null, a.highlightedItemWasDraggable = !1, a.onHiddenScrollTop = null, a._onDOMFocus = new v.Emitter, a.onDOMFocus = a._onDOMFocus.event, a._onDOMBlur = new v.Emitter, a._onDidScroll = new v.Emitter, t.counter++, a.instance = t.counter;
  9570. var u = void 0 === n.options.horizontalScrollMode ? 2 : n.options.horizontalScrollMode;
  9571. a.horizontalScrolling = 2 !== u,
  9572. a.context = {
  9573. dataSource: n.dataSource,
  9574. renderer: n.renderer,
  9575. controller: n.controller,
  9576. dnd: n.dnd,
  9577. filter: n.filter,
  9578. sorter: n.sorter,
  9579. tree: n.tree,
  9580. accessibilityProvider: n.accessibilityProvider,
  9581. options: n.options,
  9582. cache: new b(n),
  9583. horizontalScrolling: a.horizontalScrolling
  9584. }, a.modelListeners = [], a.viewListeners = [], a.items = {}, a.domNode = document.createElement("div"), a.domNode.className = "monaco-tree no-focused-item monaco-tree-instance-" + a.instance, a.domNode.tabIndex = n.options.preventRootFocus ? -1 : 0, a.styleElement = s.createStyleSheet(a.domNode), a.treeStyler = n.styler || new y.DefaultTreestyler(a.styleElement, "monaco-tree-instance-" + a.instance), a.domNode.setAttribute("role", "tree"), a.context.options.ariaLabel && a.domNode.setAttribute("aria-label", a.context.options.ariaLabel), a.context.options.alwaysFocused && s.addClass(a.domNode, "focused"), a.context.options.paddingOnRow || s.addClass(a.domNode, "no-row-padding"), a.wrapper = document.createElement("div"), a.wrapper.className = "monaco-tree-wrapper",
  9585. a.scrollableElement = new g.ScrollableElement(a.wrapper, {
  9586. alwaysConsumeMouseWheel: !0,
  9587. horizontal: u,
  9588. vertical: void 0 !== n.options.verticalScrollMode ? n.options.verticalScrollMode : 1,
  9589. useShadows: n.options.useShadows
  9590. }), a.scrollableElement.onScroll((function (e) {
  9591. a.render(e.scrollTop, e.height, e.scrollLeft, e.width, e.scrollWidth), a._onDidScroll.fire()
  9592. })), i.isIE ? (a.wrapper.style.msTouchAction = "none", a.wrapper.style.msContentZooming = "none") : a.gestureDisposable = l.Gesture.addTarget(a.wrapper), a.rowsContainer = document.createElement("div"), a.rowsContainer.className = "monaco-tree-rows", n.options.showTwistie && (a.rowsContainer.className += " show-twisties");
  9593. var d = s.trackFocus(a.domNode);
  9594. return a.viewListeners.push(d.onDidFocus((function () {
  9595. return a.onFocus()
  9596. }))), a.viewListeners.push(d.onDidBlur((function () {
  9597. return a.onBlur()
  9598. }))), a.viewListeners.push(d), a.viewListeners.push(s.addDisposableListener(a.domNode, "keydown", (function (e) {
  9599. return a.onKeyDown(e)
  9600. }))), a.viewListeners.push(s.addDisposableListener(a.domNode, "keyup", (function (e) {
  9601. return a.onKeyUp(e)
  9602. }))), a.viewListeners.push(s.addDisposableListener(a.domNode, "mousedown", (function (e) {
  9603. return a.onMouseDown(e)
  9604. }))), a.viewListeners.push(s.addDisposableListener(a.domNode, "mouseup", (function (e) {
  9605. return a.onMouseUp(e)
  9606. }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, "auxclick", (function (e) {
  9607. e && 1 === e.button && a.onMouseMiddleClick(e)
  9608. }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, "click", (function (e) {
  9609. return a.onClick(e)
  9610. }))), a.viewListeners.push(s.addDisposableListener(a.domNode, "contextmenu", (function (e) {
  9611. return a.onContextMenu(e)
  9612. }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, l.EventType.Tap, (function (e) {
  9613. return a.onTap(e)
  9614. }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, l.EventType.Change, (function (e) {
  9615. return a.onTouchChange(e)
  9616. }))), i.isIE && (a.viewListeners.push(s.addDisposableListener(a.wrapper, "MSPointerDown", (function (e) {
  9617. return a.onMsPointerDown(e)
  9618. }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, "MSGestureTap", (function (e) {
  9619. return a.onMsGestureTap(e)
  9620. }))), a.viewListeners.push(s.addDisposableThrottledListener(a.wrapper, "MSGestureChange", (function (e) {
  9621. return a.onThrottledMsGestureChange(e)
  9622. }), (function (e, t) {
  9623. t.stopPropagation(), t.preventDefault();
  9624. var n = {translationY: t.translationY, translationX: t.translationX};
  9625. return e && (n.translationY += e.translationY, n.translationX += e.translationX), n
  9626. })))), a.viewListeners.push(s.addDisposableListener(window, "dragover", (function (e) {
  9627. return a.onDragOver(e)
  9628. }))), a.viewListeners.push(s.addDisposableListener(a.wrapper, "drop", (function (e) {
  9629. return a.onDrop(e)
  9630. }))), a.viewListeners.push(s.addDisposableListener(window, "dragend", (function (e) {
  9631. return a.onDragEnd(e)
  9632. }))), a.viewListeners.push(s.addDisposableListener(window, "dragleave", (function (e) {
  9633. return a.onDragOver(e)
  9634. }))), a.wrapper.appendChild(a.rowsContainer), a.domNode.appendChild(a.scrollableElement.getDomNode()), r.appendChild(a.domNode), a.lastRenderTop = 0, a.lastRenderHeight = 0, a.didJustPressContextMenuKey = !1, a.currentDropTarget = null, a.currentDropTargets = [],
  9635. a.shouldInvalidateDropReaction = !1, a.dragAndDropScrollInterval = null, a.dragAndDropScrollTimeout = null, a.onRowsChanged(), a.layout(), a.setupMSGesture(), a.applyStyles(n.options), a
  9636. }
  9637. return r(t, e), t.prototype.applyStyles = function (e) {
  9638. this.treeStyler.style(e)
  9639. }, t.prototype.createViewItem = function (e) {
  9640. return new S(this.context, e)
  9641. }, t.prototype.getHTMLElement = function () {
  9642. return this.domNode
  9643. }, t.prototype.focus = function () {
  9644. this.domNode.focus()
  9645. }, t.prototype.isFocused = function () {
  9646. return document.activeElement === this.domNode
  9647. }, t.prototype.blur = function () {
  9648. this.domNode.blur()
  9649. }, t.prototype.setupMSGesture = function () {
  9650. var e = this;
  9651. window.MSGesture && (this.msGesture = new MSGesture, setTimeout((function () {
  9652. return e.msGesture.target = e.wrapper
  9653. }), 100))
  9654. }, t.prototype.isTreeVisible = function () {
  9655. return null === this.onHiddenScrollTop
  9656. }, t.prototype.layout = function (e, t) {
  9657. this.isTreeVisible() && (this.viewHeight = e || s.getContentHeight(this.wrapper), this.scrollHeight = this.getContentHeight(),
  9658. this.horizontalScrolling && (this.viewWidth = t || s.getContentWidth(this.wrapper)))
  9659. }, t.prototype.render = function (e, t, n, i, o) {
  9660. var r, s, a = e, l = e + t, u = this.lastRenderTop + this.lastRenderHeight;
  9661. for (r = this.indexAfter(l) - 1, s = this.indexAt(Math.max(u, a)); r >= s; r--) this.insertItemInDOM(this.itemAtIndex(r));
  9662. for (r = Math.min(this.indexAt(this.lastRenderTop), this.indexAfter(l)) - 1, s = this.indexAt(a); r >= s; r--) this.insertItemInDOM(this.itemAtIndex(r));
  9663. for (r = this.indexAt(this.lastRenderTop), s = Math.min(this.indexAt(a), this.indexAfter(u)); r < s; r++) this.removeItemFromDOM(this.itemAtIndex(r));
  9664. for (r = Math.max(this.indexAfter(l), this.indexAt(this.lastRenderTop)), s = this.indexAfter(u); r < s; r++) this.removeItemFromDOM(this.itemAtIndex(r));
  9665. var d = this.itemAtIndex(this.indexAt(a));
  9666. d && (this.rowsContainer.style.top = d.top - a + "px"), this.horizontalScrolling && (this.rowsContainer.style.left = -n + "px", this.rowsContainer.style.width = Math.max(o, i) + "px"), this.lastRenderTop = a, this.lastRenderHeight = l - a
  9667. }, t.prototype.setModel = function (e) {
  9668. this.releaseModel(), this.model = e,
  9669. this.model.onRefresh(this.onRefreshing, this, this.modelListeners), this.model.onDidRefresh(this.onRefreshed, this, this.modelListeners), this.model.onSetInput(this.onClearingInput, this, this.modelListeners), this.model.onDidSetInput(this.onSetInput, this, this.modelListeners), this.model.onDidFocus(this.onModelFocusChange, this, this.modelListeners), this.model.onRefreshItemChildren(this.onItemChildrenRefreshing, this, this.modelListeners), this.model.onDidRefreshItemChildren(this.onItemChildrenRefreshed, this, this.modelListeners), this.model.onDidRefreshItem(this.onItemRefresh, this, this.modelListeners), this.model.onExpandItem(this.onItemExpanding, this, this.modelListeners), this.model.onDidExpandItem(this.onItemExpanded, this, this.modelListeners), this.model.onCollapseItem(this.onItemCollapsing, this, this.modelListeners), this.model.onDidRevealItem(this.onItemReveal, this, this.modelListeners), this.model.onDidAddTraitItem(this.onItemAddTrait, this, this.modelListeners),
  9670. this.model.onDidRemoveTraitItem(this.onItemRemoveTrait, this, this.modelListeners)
  9671. }, t.prototype.onRefreshing = function () {
  9672. this.isRefreshing = !0
  9673. }, t.prototype.onRefreshed = function () {
  9674. this.isRefreshing = !1, this.onRowsChanged()
  9675. }, t.prototype.onRowsChanged = function (e) {
  9676. void 0 === e && (e = this.scrollTop), this.isRefreshing || (this.scrollTop = e, this.updateScrollWidth())
  9677. }, t.prototype.updateScrollWidth = function () {
  9678. var e = this;
  9679. this.horizontalScrolling && this.contentWidthUpdateDelayer.trigger((function () {
  9680. for (var t = 0, n = 0, i = Object.keys(e.items); n < i.length; n++) {
  9681. var o = i[n];
  9682. t = Math.max(t, e.items[o].width)
  9683. }
  9684. e.scrollWidth = t + 10
  9685. }))
  9686. }, t.prototype.focusNextPage = function (e) {
  9687. var t = this, n = this.indexAt(this.scrollTop + this.viewHeight);
  9688. n = 0 === n ? 0 : n - 1;
  9689. var i = this.itemAtIndex(n).model.getElement();
  9690. if (this.model.getFocus() !== i) this.model.setFocus(i, e); else {
  9691. var o = this.scrollTop;
  9692. this.scrollTop += this.viewHeight, this.scrollTop !== o && setTimeout((function () {
  9693. t.focusNextPage(e)
  9694. }), 0)
  9695. }
  9696. }, t.prototype.focusPreviousPage = function (e) {
  9697. var t, n = this
  9698. ;t = 0 === this.scrollTop ? this.indexAt(this.scrollTop) : this.indexAfter(this.scrollTop - 1);
  9699. var i = this.itemAtIndex(t).model.getElement();
  9700. if (this.model.getFocus() !== i) this.model.setFocus(i, e); else {
  9701. var o = this.scrollTop;
  9702. this.scrollTop -= this.viewHeight, this.scrollTop !== o && setTimeout((function () {
  9703. n.focusPreviousPage(e)
  9704. }), 0)
  9705. }
  9706. }, Object.defineProperty(t.prototype, "viewHeight", {
  9707. get: function () {
  9708. return this.scrollableElement.getScrollDimensions().height
  9709. }, set: function (e) {
  9710. this.scrollableElement.setScrollDimensions({height: e})
  9711. }, enumerable: !0, configurable: !0
  9712. }), Object.defineProperty(t.prototype, "scrollHeight", {
  9713. set: function (e) {
  9714. e += this.horizontalScrolling ? 10 : 0, this.scrollableElement.setScrollDimensions({scrollHeight: e})
  9715. }, enumerable: !0, configurable: !0
  9716. }), Object.defineProperty(t.prototype, "viewWidth", {
  9717. get: function () {
  9718. return this.scrollableElement.getScrollDimensions().width
  9719. }, set: function (e) {
  9720. this.scrollableElement.setScrollDimensions({width: e})
  9721. }, enumerable: !0, configurable: !0
  9722. }), Object.defineProperty(t.prototype, "scrollWidth", {
  9723. set: function (e) {
  9724. this.scrollableElement.setScrollDimensions({scrollWidth: e})
  9725. }, enumerable: !0, configurable: !0
  9726. }), Object.defineProperty(t.prototype, "scrollTop", {
  9727. get: function () {
  9728. return this.scrollableElement.getScrollPosition().scrollTop
  9729. }, set: function (e) {
  9730. var t = this.getContentHeight() + (this.horizontalScrolling ? 10 : 0);
  9731. this.scrollableElement.setScrollDimensions({scrollHeight: t}), this.scrollableElement.setScrollPosition({scrollTop: e})
  9732. }, enumerable: !0, configurable: !0
  9733. }), t.prototype.onClearingInput = function (e) {
  9734. var t = e.item;
  9735. t && (this.onRemoveItems(new p.MappedIterator(t.getNavigator(), (function (e) {
  9736. return e && e.id
  9737. }))), this.onRowsChanged())
  9738. }, t.prototype.onSetInput = function (e) {
  9739. this.context.cache.garbageCollect(), this.inputItem = new w(this.context, e.item, this.wrapper)
  9740. }, t.prototype.onItemChildrenRefreshing = function (e) {
  9741. var n = e.item, i = this.items[n.id];
  9742. if (i && this.context.options.showLoading && (i.loadingTimer = setTimeout((function () {
  9743. i.loadingTimer = 0, i.loading = !0
  9744. }), t.LOADING_DECORATION_DELAY)), !e.isNested) {
  9745. for (var o = [], r = n.getNavigator(), s = void 0; s = r.next();) o.push(s.id);
  9746. this.refreshingPreviousChildrenIds[n.id] = o
  9747. }
  9748. }, t.prototype.onItemChildrenRefreshed = function (e) {
  9749. var t = this, n = e.item, i = this.items[n.id];
  9750. if (i && (i.loadingTimer && (clearTimeout(i.loadingTimer), i.loadingTimer = 0), i.loading = !1), !e.isNested) {
  9751. for (var o = this.refreshingPreviousChildrenIds[n.id], r = [], s = n.getNavigator(), l = void 0; l = s.next();) r.push(l);
  9752. var u = Math.abs(o.length - r.length) > 1e3, d = [], c = !1;
  9753. if (!u) c = (d = new a.LcsDiff({
  9754. getElements: function () {
  9755. return o
  9756. }
  9757. }, {
  9758. getElements: function () {
  9759. return r.map((function (e) {
  9760. return e.id
  9761. }))
  9762. }
  9763. }, null).ComputeDiff(!1).changes).some((function (e) {
  9764. if (e.modifiedLength > 0) for (var n = e.modifiedStart, i = e.modifiedStart + e.modifiedLength; n < i; n++) if (t.items.hasOwnProperty(r[n].id)) return !0;
  9765. return !1
  9766. }));
  9767. if (!u && !c && d.length < 50) for (var h = 0, g = d; h < g.length; h++) {
  9768. var f = g[h];
  9769. if (f.originalLength > 0 && this.onRemoveItems(new p.ArrayIterator(o, f.originalStart, f.originalStart + f.originalLength)), f.modifiedLength > 0) {
  9770. var m = r[f.modifiedStart - 1] || n
  9771. ;m = m.getDepth() > 0 ? m : null, this.onInsertItems(new p.ArrayIterator(r, f.modifiedStart, f.modifiedStart + f.modifiedLength), m ? m.id : null)
  9772. }
  9773. } else (u || d.length) && (this.onRemoveItems(new p.ArrayIterator(o)), this.onInsertItems(new p.ArrayIterator(r), n.getDepth() > 0 ? n.id : null));
  9774. (u || d.length) && this.onRowsChanged()
  9775. }
  9776. }, t.prototype.onItemRefresh = function (e) {
  9777. this.onItemsRefresh([e])
  9778. }, t.prototype.onItemsRefresh = function (e) {
  9779. var t = this;
  9780. this.onRefreshItemSet(e.filter((function (e) {
  9781. return t.items.hasOwnProperty(e.id)
  9782. }))), this.onRowsChanged()
  9783. }, t.prototype.onItemExpanding = function (e) {
  9784. var t = this.items[e.item.id];
  9785. t && (t.expanded = !0)
  9786. }, t.prototype.onItemExpanded = function (e) {
  9787. var t = e.item, n = this.items[t.id];
  9788. if (n) {
  9789. n.expanded = !0;
  9790. var i = this.onInsertItems(t.getNavigator(), t.id) || 0, o = this.scrollTop;
  9791. n.top + n.height <= this.scrollTop && (o += i), this.onRowsChanged(o)
  9792. }
  9793. }, t.prototype.onItemCollapsing = function (e) {
  9794. var t = e.item, n = this.items[t.id];
  9795. n && (n.expanded = !1, this.onRemoveItems(new p.MappedIterator(t.getNavigator(), (function (e) {
  9796. return e && e.id
  9797. }))),
  9798. this.onRowsChanged())
  9799. }, t.prototype.onItemReveal = function (e) {
  9800. var t = e.item, n = e.relativeTop, i = this.items[t.id];
  9801. if (i) if (null !== n) {
  9802. n = (n = n < 0 ? 0 : n) > 1 ? 1 : n;
  9803. var o = i.height - this.viewHeight;
  9804. this.scrollTop = o * n + i.top
  9805. } else {
  9806. var r = i.top + i.height, s = this.scrollTop + this.viewHeight;
  9807. i.top < this.scrollTop ? this.scrollTop = i.top : r >= s && (this.scrollTop = r - this.viewHeight)
  9808. }
  9809. }, t.prototype.onItemAddTrait = function (e) {
  9810. var t = e.item, n = e.trait, i = this.items[t.id];
  9811. i && i.addClass(n), "highlighted" === n && (s.addClass(this.domNode, n), i && (this.highlightedItemWasDraggable = !!i.draggable, i.draggable && (i.draggable = !1)))
  9812. }, t.prototype.onItemRemoveTrait = function (e) {
  9813. var t = e.item, n = e.trait, i = this.items[t.id];
  9814. i && i.removeClass(n), "highlighted" === n && (s.removeClass(this.domNode, n), this.highlightedItemWasDraggable && (i.draggable = !0), this.highlightedItemWasDraggable = !1)
  9815. }, t.prototype.onModelFocusChange = function () {
  9816. var e = this.model && this.model.getFocus();
  9817. s.toggleClass(this.domNode, "no-focused-item", !e),
  9818. e ? this.domNode.setAttribute("aria-activedescendant", u.safeBtoa(this.context.dataSource.getId(this.context.tree, e))) : this.domNode.removeAttribute("aria-activedescendant")
  9819. }, t.prototype.onInsertItem = function (e) {
  9820. var t = this;
  9821. e.onDragStart = function (n) {
  9822. t.onDragStart(e, n)
  9823. }, e.needsRender = !0, this.refreshViewItem(e), this.items[e.id] = e
  9824. }, t.prototype.onRefreshItem = function (e, t) {
  9825. void 0 === t && (t = !1), e.needsRender = e.needsRender || t, this.refreshViewItem(e)
  9826. }, t.prototype.onRemoveItem = function (e) {
  9827. this.removeItemFromDOM(e), e.dispose(), delete this.items[e.id]
  9828. }, t.prototype.refreshViewItem = function (e) {
  9829. e.render(), this.shouldBeRendered(e) ? this.insertItemInDOM(e) : this.removeItemFromDOM(e)
  9830. }, t.prototype.onClick = function (e) {
  9831. if (!this.lastPointerType || "mouse" === this.lastPointerType) {
  9832. var t = new d.StandardMouseEvent(e), n = this.getItemAround(t.target);
  9833. n && (i.isIE && Date.now() - this.lastClickTimeStamp < 300 && (t.detail = 2), this.lastClickTimeStamp = Date.now(), this.context.controller.onClick(this.context.tree, n.model.getElement(), t))
  9834. }
  9835. },
  9836. t.prototype.onMouseMiddleClick = function (e) {
  9837. if (this.context.controller.onMouseMiddleClick) {
  9838. var t = new d.StandardMouseEvent(e), n = this.getItemAround(t.target);
  9839. n && this.context.controller.onMouseMiddleClick(this.context.tree, n.model.getElement(), t)
  9840. }
  9841. }, t.prototype.onMouseDown = function (e) {
  9842. if (this.didJustPressContextMenuKey = !1, this.context.controller.onMouseDown && (!this.lastPointerType || "mouse" === this.lastPointerType)) {
  9843. var t = new d.StandardMouseEvent(e);
  9844. if (!(t.ctrlKey && n.isNative && n.isMacintosh)) {
  9845. var i = this.getItemAround(t.target);
  9846. i && this.context.controller.onMouseDown(this.context.tree, i.model.getElement(), t)
  9847. }
  9848. }
  9849. }, t.prototype.onMouseUp = function (e) {
  9850. if (this.context.controller.onMouseUp && (!this.lastPointerType || "mouse" === this.lastPointerType)) {
  9851. var t = new d.StandardMouseEvent(e);
  9852. if (!(t.ctrlKey && n.isNative && n.isMacintosh)) {
  9853. var i = this.getItemAround(t.target);
  9854. i && this.context.controller.onMouseUp(this.context.tree, i.model.getElement(), t)
  9855. }
  9856. }
  9857. }, t.prototype.onTap = function (e) {
  9858. var t = this.getItemAround(e.initialTarget)
  9859. ;t && this.context.controller.onTap(this.context.tree, t.model.getElement(), e)
  9860. }, t.prototype.onTouchChange = function (e) {
  9861. e.preventDefault(), e.stopPropagation(), this.scrollTop -= e.translationY
  9862. }, t.prototype.onContextMenu = function (e) {
  9863. var t, n;
  9864. if (e instanceof KeyboardEvent || this.didJustPressContextMenuKey) {
  9865. this.didJustPressContextMenuKey = !1;
  9866. var i = new c.StandardKeyboardEvent(e), o = void 0;
  9867. if (n = this.model.getFocus()) {
  9868. var r = this.context.dataSource.getId(this.context.tree, n), a = this.items[r];
  9869. o = s.getDomNodePagePosition(a.element)
  9870. } else n = this.model.getInput(), o = s.getDomNodePagePosition(this.inputItem.element);
  9871. t = new m.KeyboardContextMenuEvent(o.left + o.width, o.top, i)
  9872. } else {
  9873. var l = new d.StandardMouseEvent(e), u = this.getItemAround(l.target);
  9874. if (!u) return;
  9875. n = u.model.getElement(), t = new m.MouseContextMenuEvent(l)
  9876. }
  9877. this.context.controller.onContextMenu(this.context.tree, n, t)
  9878. }, t.prototype.onKeyDown = function (e) {
  9879. var t = new c.StandardKeyboardEvent(e);
  9880. this.didJustPressContextMenuKey = 58 === t.keyCode || t.shiftKey && 68 === t.keyCode,
  9881. t.target && t.target.tagName && "input" === t.target.tagName.toLowerCase() || (this.didJustPressContextMenuKey && (t.preventDefault(), t.stopPropagation()), this.context.controller.onKeyDown(this.context.tree, t))
  9882. }, t.prototype.onKeyUp = function (e) {
  9883. this.didJustPressContextMenuKey && this.onContextMenu(e), this.didJustPressContextMenuKey = !1, this.context.controller.onKeyUp(this.context.tree, new c.StandardKeyboardEvent(e))
  9884. }, t.prototype.onDragStart = function (e, t) {
  9885. if (!this.model.getHighlight()) {
  9886. var n, i = e.model.getElement(), o = this.model.getSelection();
  9887. if (n = o.indexOf(i) > -1 ? o : [i], t.dataTransfer.effectAllowed = "copyMove", t.dataTransfer.setData(_.DataTransfers.RESOURCES, JSON.stringify([e.uri])), t.dataTransfer.setDragImage) {
  9888. var r = void 0;
  9889. r = this.context.dnd.getDragLabel ? this.context.dnd.getDragLabel(this.context.tree, n) : String(n.length);
  9890. var s = document.createElement("div");
  9891. s.className = "monaco-tree-drag-image", s.textContent = r, document.body.appendChild(s), t.dataTransfer.setDragImage(s, -10, -10), setTimeout((function () {
  9892. return document.body.removeChild(s)
  9893. }), 0)
  9894. }
  9895. this.currentDragAndDropData = new h.ElementsDragAndDropData(n), _.StaticDND.CurrentDragAndDropData = new h.ExternalElementsDragAndDropData(n), this.context.dnd.onDragStart(this.context.tree, this.currentDragAndDropData, new d.DragMouseEvent(t))
  9896. }
  9897. }, t.prototype.setupDragAndDropScrollInterval = function () {
  9898. var e = this, t = s.getTopLeftOffset(this.wrapper).top;
  9899. this.dragAndDropScrollInterval || (this.dragAndDropScrollInterval = window.setInterval((function () {
  9900. if (null !== e.dragAndDropMouseY) {
  9901. var n = e.dragAndDropMouseY - t, i = 0, o = e.viewHeight - 35;
  9902. n < 35 ? i = Math.max(-14, .2 * (n - 35)) : n > o && (i = Math.min(14, .2 * (n - o))), e.scrollTop += i
  9903. }
  9904. }), 10), this.cancelDragAndDropScrollTimeout(), this.dragAndDropScrollTimeout = window.setTimeout((function () {
  9905. e.cancelDragAndDropScrollInterval(), e.dragAndDropScrollTimeout = null
  9906. }), 1e3))
  9907. }, t.prototype.cancelDragAndDropScrollInterval = function () {
  9908. this.dragAndDropScrollInterval && (window.clearInterval(this.dragAndDropScrollInterval), this.dragAndDropScrollInterval = null),
  9909. this.cancelDragAndDropScrollTimeout()
  9910. }, t.prototype.cancelDragAndDropScrollTimeout = function () {
  9911. this.dragAndDropScrollTimeout && (window.clearTimeout(this.dragAndDropScrollTimeout), this.dragAndDropScrollTimeout = null)
  9912. }, t.prototype.onDragOver = function (e) {
  9913. var t = this;
  9914. e.preventDefault();
  9915. var n, i = new d.DragMouseEvent(e), r = this.getItemAround(i.target);
  9916. if (!r || 0 === i.posx && 0 === i.posy && i.browserEvent.type === s.EventType.DRAG_LEAVE) return this.currentDropTarget && (this.currentDropTargets.forEach((function (e) {
  9917. return e.dropTarget = !1
  9918. })), this.currentDropTargets = [], this.currentDropDisposable.dispose()), this.cancelDragAndDropScrollInterval(), this.currentDropTarget = null, this.currentDropElement = null, this.dragAndDropMouseY = null, !1;
  9919. if (this.setupDragAndDropScrollInterval(), this.dragAndDropMouseY = i.posy, !this.currentDragAndDropData) if (_.StaticDND.CurrentDragAndDropData) this.currentDragAndDropData = _.StaticDND.CurrentDragAndDropData; else {
  9920. if (!i.dataTransfer.types) return !1;
  9921. this.currentDragAndDropData = new h.DesktopDragAndDropData
  9922. }
  9923. this.currentDragAndDropData.update(i.browserEvent.dataTransfer);
  9924. var a, l = r.model;
  9925. do {
  9926. if (n = l ? l.getElement() : this.model.getInput(), !(a = this.context.dnd.onDragOver(this.context.tree, this.currentDragAndDropData, n, i)) || 1 !== a.bubble) break;
  9927. l = l && l.parent
  9928. } while (l);
  9929. if (!l) return this.currentDropElement = null, !1;
  9930. var u = a && a.accept;
  9931. u ? (this.currentDropElement = l.getElement(), i.preventDefault(), i.dataTransfer.dropEffect = 0 === a.effect ? "copy" : "move") : this.currentDropElement = null;
  9932. var c, p, g = l.id === this.inputItem.id ? this.inputItem : this.items[l.id];
  9933. if ((this.shouldInvalidateDropReaction || this.currentDropTarget !== g || (c = this.currentDropElementReaction, p = a, !(!c && !p || c && p && c.accept === p.accept && c.bubble === p.bubble && c.effect === p.effect))) && (this.shouldInvalidateDropReaction = !1, this.currentDropTarget && (this.currentDropTargets.forEach((function (e) {
  9934. return e.dropTarget = !1
  9935. })), this.currentDropTargets = [], this.currentDropDisposable.dispose()), this.currentDropTarget = g, this.currentDropElementReaction = a, u)) {
  9936. if (this.currentDropTarget && (this.currentDropTarget.dropTarget = !0, this.currentDropTargets.push(this.currentDropTarget)), 0 === a.bubble) for (var f = l.getNavigator(), m = void 0; m = f.next();) (r = this.items[m.id]) && (r.dropTarget = !0, this.currentDropTargets.push(r));
  9937. if (a.autoExpand) {
  9938. var v = C.timeout(500);
  9939. this.currentDropDisposable = o.toDisposable((function () {
  9940. return v.cancel()
  9941. })), v.then((function () {
  9942. return t.context.tree.expand(t.currentDropElement)
  9943. })).then((function () {
  9944. return t.shouldInvalidateDropReaction = !0
  9945. }))
  9946. }
  9947. }
  9948. return !0
  9949. }, t.prototype.onDrop = function (e) {
  9950. if (this.currentDropElement) {
  9951. var t = new d.DragMouseEvent(e);
  9952. t.preventDefault(), this.currentDragAndDropData.update(t.browserEvent.dataTransfer), this.context.dnd.drop(this.context.tree, this.currentDragAndDropData, this.currentDropElement, t), this.onDragEnd(e)
  9953. }
  9954. this.cancelDragAndDropScrollInterval()
  9955. }, t.prototype.onDragEnd = function (e) {
  9956. this.currentDropTarget && (this.currentDropTargets.forEach((function (e) {
  9957. return e.dropTarget = !1
  9958. })), this.currentDropTargets = []),
  9959. this.currentDropDisposable.dispose(), this.cancelDragAndDropScrollInterval(), this.currentDragAndDropData = null, _.StaticDND.CurrentDragAndDropData = void 0, this.currentDropElement = null, this.currentDropTarget = null, this.dragAndDropMouseY = null
  9960. }, t.prototype.onFocus = function () {
  9961. this.context.options.alwaysFocused || s.addClass(this.domNode, "focused"), this._onDOMFocus.fire()
  9962. }, t.prototype.onBlur = function () {
  9963. this.context.options.alwaysFocused || s.removeClass(this.domNode, "focused"), this.domNode.removeAttribute("aria-activedescendant"), this._onDOMBlur.fire()
  9964. }, t.prototype.onMsPointerDown = function (e) {
  9965. if (this.msGesture) {
  9966. var t = e.pointerType;
  9967. t !== (e.MSPOINTER_TYPE_MOUSE || "mouse") ? t === (e.MSPOINTER_TYPE_TOUCH || "touch") && (this.lastPointerType = "touch", e.stopPropagation(), e.preventDefault(), this.msGesture.addPointer(e.pointerId)) : this.lastPointerType = "mouse"
  9968. }
  9969. }, t.prototype.onThrottledMsGestureChange = function (e) {
  9970. this.scrollTop -= e.translationY
  9971. }, t.prototype.onMsGestureTap = function (e) {
  9972. e.initialTarget = document.elementFromPoint(e.clientX, e.clientY), this.onTap(e)
  9973. }, t.prototype.insertItemInDOM = function (e) {
  9974. var t = null, n = this.itemAfter(e);
  9975. n && n.element && (t = n.element), e.insertInDOM(this.rowsContainer, t)
  9976. }, t.prototype.removeItemFromDOM = function (e) {
  9977. e && e.removeFromDOM()
  9978. }, t.prototype.shouldBeRendered = function (e) {
  9979. return e.top < this.lastRenderTop + this.lastRenderHeight && e.top + e.height > this.lastRenderTop
  9980. }, t.prototype.getItemAround = function (e) {
  9981. var n = this.inputItem, i = e;
  9982. do {
  9983. if (i[t.BINDING] && (n = i[t.BINDING]), i === this.wrapper || i === this.domNode) return n;
  9984. if (i === this.scrollableElement.getDomNode() || i === document.body) return
  9985. } while (i = i.parentElement)
  9986. }, t.prototype.releaseModel = function () {
  9987. this.model && (this.modelListeners = o.dispose(this.modelListeners), this.model = null)
  9988. }, t.prototype.dispose = function () {
  9989. var t = this;
  9990. this.scrollableElement.dispose(), this.releaseModel(), this.viewListeners = o.dispose(this.viewListeners), this._onDOMFocus.dispose(), this._onDOMBlur.dispose(),
  9991. this.domNode.parentNode && this.domNode.parentNode.removeChild(this.domNode), this.items && Object.keys(this.items).forEach((function (e) {
  9992. return t.items[e].removeFromDOM()
  9993. })), this.context.cache && this.context.cache.dispose(), this.gestureDisposable.dispose(), e.prototype.dispose.call(this)
  9994. }, t.BINDING = "monaco-tree-row", t.LOADING_DECORATION_DELAY = 800, t.counter = 0, t
  9995. }(f.HeightMap);
  9996. t.TreeView = E
  9997. })), define(n[278], i([9]), {});
  9998. var p;
  9999. a = this && this.__spreadArrays || function () {
  10000. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  10001. var i = Array(e), o = 0;
  10002. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  10003. return i
  10004. };
  10005. define(n[279], i([0, 1, 2, 4, 21, 6, 131, 19, 104, 27, 52, 278]), (function (e, t, n, i, o, s, l, u, d, c, h) {
  10006. "use strict";
  10007. Object.defineProperty(t, "__esModule", {value: !0});
  10008. var p, g = {separatorBorder: c.Color.transparent}, f = function () {
  10009. function e(e, t, n, i) {
  10010. this.container = e, this.view = t, this.disposable = i, this._cachedVisibleSize = void 0, "number" == typeof n ? (this._size = n, this._cachedVisibleSize = void 0,
  10011. s.addClass(e, "visible")) : (this._size = 0, this._cachedVisibleSize = n.cachedVisibleSize)
  10012. }
  10013. return Object.defineProperty(e.prototype, "size", {
  10014. get: function () {
  10015. return this._size
  10016. }, set: function (e) {
  10017. this._size = e
  10018. }, enumerable: !0, configurable: !0
  10019. }), Object.defineProperty(e.prototype, "visible", {
  10020. get: function () {
  10021. return void 0 === this._cachedVisibleSize
  10022. }, enumerable: !0, configurable: !0
  10023. }), e.prototype.setVisible = function (e, t) {
  10024. e !== this.visible && (e ? (this.size = l.clamp(this._cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize), this._cachedVisibleSize = void 0) : (this._cachedVisibleSize = "number" == typeof t ? t : this.size, this.size = 0), s.toggleClass(this.container, "visible", e), this.view.setVisible && this.view.setVisible(e))
  10025. }, Object.defineProperty(e.prototype, "minimumSize", {
  10026. get: function () {
  10027. return this.visible ? this.view.minimumSize : 0
  10028. }, enumerable: !0, configurable: !0
  10029. }), Object.defineProperty(e.prototype, "viewMinimumSize", {
  10030. get: function () {
  10031. return this.view.minimumSize
  10032. }, enumerable: !0, configurable: !0
  10033. }), Object.defineProperty(e.prototype, "maximumSize", {
  10034. get: function () {
  10035. return this.visible ? this.view.maximumSize : 0
  10036. }, enumerable: !0, configurable: !0
  10037. }), Object.defineProperty(e.prototype, "viewMaximumSize", {
  10038. get: function () {
  10039. return this.view.maximumSize
  10040. }, enumerable: !0, configurable: !0
  10041. }), Object.defineProperty(e.prototype, "priority", {
  10042. get: function () {
  10043. return this.view.priority
  10044. }, enumerable: !0, configurable: !0
  10045. }), Object.defineProperty(e.prototype, "snap", {
  10046. get: function () {
  10047. return !!this.view.snap
  10048. }, enumerable: !0, configurable: !0
  10049. }), Object.defineProperty(e.prototype, "enabled", {
  10050. set: function (e) {
  10051. this.container.style.pointerEvents = e ? null : "none"
  10052. }, enumerable: !0, configurable: !0
  10053. }), e.prototype.layout = function (e, t) {
  10054. this.layoutContainer(e), this.view.layout(this.size, e, t)
  10055. }, e.prototype.dispose = function () {
  10056. return this.disposable.dispose(), this.view
  10057. }, e
  10058. }(), m = function (e) {
  10059. function t() {
  10060. return null !== e && e.apply(this, arguments) || this
  10061. }
  10062. return r(t, e), t.prototype.layoutContainer = function (e) {
  10063. this.container.style.top = e + "px", this.container.style.height = this.size + "px"
  10064. }, t
  10065. }(f), v = function (e) {
  10066. function t() {
  10067. return null !== e && e.apply(this, arguments) || this
  10068. }
  10069. return r(t, e), t.prototype.layoutContainer = function (e) {
  10070. this.container.style.left = e + "px", this.container.style.width = this.size + "px"
  10071. }, t
  10072. }(f);
  10073. !function (e) {
  10074. e[e.Idle = 0] = "Idle", e[e.Busy = 1] = "Busy"
  10075. }(p || (p = {})), function (e) {
  10076. e.Distribute = {type: "distribute"}, e.Split = function (e) {
  10077. return {type: "split", index: e}
  10078. }, e.Invisible = function (e) {
  10079. return {type: "invisible", cachedVisibleSize: e}
  10080. }
  10081. }(t.Sizing || (t.Sizing = {}));
  10082. var _ = function (e) {
  10083. function t(t, n) {
  10084. void 0 === n && (n = {});
  10085. var r = e.call(this) || this;
  10086. return r.size = 0, r.contentSize = 0, r.proportions = void 0, r.viewItems = [], r.sashItems = [], r.state = p.Idle, r._onDidSashChange = r._register(new i.Emitter), r.onDidSashChange = r._onDidSashChange.event, r._onDidSashReset = r._register(new i.Emitter), r._startSnappingEnabled = !0, r._endSnappingEnabled = !0, r.orientation = o.isUndefined(n.orientation) ? 0 : n.orientation, r.inverseAltBehavior = !!n.inverseAltBehavior, r.proportionalLayout = !!o.isUndefined(n.proportionalLayout) || !!n.proportionalLayout, r.el = document.createElement("div"),
  10087. s.addClass(r.el, "monaco-split-view2"), s.addClass(r.el, 0 === r.orientation ? "vertical" : "horizontal"), t.appendChild(r.el), r.sashContainer = s.append(r.el, s.$(".sash-container")), r.viewContainer = s.append(r.el, s.$(".split-view-container")), r.style(n.styles || g), n.descriptor && (r.size = n.descriptor.size, n.descriptor.views.forEach((function (e, t) {
  10088. var n = o.isUndefined(e.visible) || e.visible ? e.size : {
  10089. type: "invisible",
  10090. cachedVisibleSize: e.size
  10091. }, i = e.view;
  10092. r.doAddView(i, n, t, !0)
  10093. })), r.contentSize = r.viewItems.reduce((function (e, t) {
  10094. return e + t.size
  10095. }), 0), r.saveProportions()), r
  10096. }
  10097. return r(t, e), Object.defineProperty(t.prototype, "orthogonalStartSash", {
  10098. get: function () {
  10099. return this._orthogonalStartSash
  10100. }, set: function (e) {
  10101. for (var t = 0, n = this.sashItems; t < n.length; t++) {
  10102. n[t].sash.orthogonalStartSash = e
  10103. }
  10104. this._orthogonalStartSash = e
  10105. }, enumerable: !0, configurable: !0
  10106. }), Object.defineProperty(t.prototype, "orthogonalEndSash", {
  10107. get: function () {
  10108. return this._orthogonalEndSash
  10109. }, set: function (e) {
  10110. for (var t = 0, n = this.sashItems; t < n.length; t++) {
  10111. n[t].sash.orthogonalEndSash = e
  10112. }
  10113. this._orthogonalEndSash = e
  10114. }, enumerable: !0, configurable: !0
  10115. }), Object.defineProperty(t.prototype, "startSnappingEnabled", {
  10116. get: function () {
  10117. return this._startSnappingEnabled
  10118. }, set: function (e) {
  10119. this._startSnappingEnabled !== e && (this._startSnappingEnabled = e, this.updateSashEnablement())
  10120. }, enumerable: !0, configurable: !0
  10121. }), Object.defineProperty(t.prototype, "endSnappingEnabled", {
  10122. get: function () {
  10123. return this._endSnappingEnabled
  10124. }, set: function (e) {
  10125. this._endSnappingEnabled !== e && (this._endSnappingEnabled = e, this.updateSashEnablement())
  10126. }, enumerable: !0, configurable: !0
  10127. }), t.prototype.style = function (e) {
  10128. e.separatorBorder.isTransparent() ? (s.removeClass(this.el, "separator-border"), this.el.style.removeProperty("--separator-border")) : (s.addClass(this.el, "separator-border"), this.el.style.setProperty("--separator-border", e.separatorBorder.toString()))
  10129. }, t.prototype.addView = function (e, t, n) {
  10130. void 0 === n && (n = this.viewItems.length), this.doAddView(e, t, n, !1)
  10131. }, t.prototype.layout = function (e, t) {
  10132. var n = this, i = Math.max(this.size, this.contentSize);
  10133. if (this.size = e,
  10134. this.layoutContext = t, this.proportions) for (var o = 0; o < this.viewItems.length; o++) {
  10135. var r = this.viewItems[o];
  10136. r.size = l.clamp(Math.round(this.proportions[o] * e), r.minimumSize, r.maximumSize)
  10137. } else {
  10138. var s = u.range(this.viewItems.length), a = s.filter((function (e) {
  10139. return 1 === n.viewItems[e].priority
  10140. })), d = s.filter((function (e) {
  10141. return 2 === n.viewItems[e].priority
  10142. }));
  10143. this.resize(this.viewItems.length - 1, e - i, void 0, a, d)
  10144. }
  10145. this.distributeEmptySpace(), this.layoutViews()
  10146. }, t.prototype.saveProportions = function () {
  10147. var e = this;
  10148. this.proportionalLayout && this.contentSize > 0 && (this.proportions = this.viewItems.map((function (t) {
  10149. return t.size / e.contentSize
  10150. })))
  10151. }, t.prototype.onSashStart = function (e) {
  10152. for (var t = this, i = e.sash, o = e.start, r = e.alt, s = 0, a = this.viewItems; s < a.length; s++) {
  10153. a[s].enabled = !1
  10154. }
  10155. var l = u.firstIndex(this.sashItems, (function (e) {
  10156. return e.sash === i
  10157. })), d = n.combinedDisposable(h.domEvent(document.body, "keydown")((function (e) {
  10158. return c(t.sashDragState.current, e.altKey)
  10159. })), h.domEvent(document.body, "keyup")((function () {
  10160. return c(t.sashDragState.current, !1)
  10161. }))), c = function (e, n) {
  10162. var i, o, r = t.viewItems.map((function (e) {
  10163. return e.size
  10164. })), s = Number.NEGATIVE_INFINITY, a = Number.POSITIVE_INFINITY;
  10165. (t.inverseAltBehavior && (n = !n), n) && (l === t.sashItems.length - 1 ? (s = ((b = t.viewItems[l]).minimumSize - b.size) / 2, a = (b.maximumSize - b.size) / 2) : (s = ((b = t.viewItems[l + 1]).size - b.maximumSize) / 2, a = (b.size - b.minimumSize) / 2));
  10166. if (!n) {
  10167. var c = u.range(l, -1), h = u.range(l + 1, t.viewItems.length), p = c.reduce((function (e, n) {
  10168. return e + (t.viewItems[n].minimumSize - r[n])
  10169. }), 0), g = c.reduce((function (e, n) {
  10170. return e + (t.viewItems[n].viewMaximumSize - r[n])
  10171. }), 0), f = 0 === h.length ? Number.POSITIVE_INFINITY : h.reduce((function (e, n) {
  10172. return e + (r[n] - t.viewItems[n].minimumSize)
  10173. }), 0), m = 0 === h.length ? Number.NEGATIVE_INFINITY : h.reduce((function (e, n) {
  10174. return e + (r[n] - t.viewItems[n].viewMaximumSize)
  10175. }), 0), v = Math.max(p, m), _ = Math.min(f, g), y = t.findFirstSnapIndex(c),
  10176. C = t.findFirstSnapIndex(h);
  10177. if ("number" == typeof y) {
  10178. var b = t.viewItems[y], S = Math.floor(b.viewMinimumSize / 2);
  10179. i = {index: y, limitDelta: b.visible ? v - S : v + S, size: b.size}
  10180. }
  10181. if ("number" == typeof C) {
  10182. b = t.viewItems[C], S = Math.floor(b.viewMinimumSize / 2);
  10183. o = {index: C, limitDelta: b.visible ? _ + S : _ - S, size: b.size}
  10184. }
  10185. }
  10186. t.sashDragState = {
  10187. start: e,
  10188. current: e,
  10189. index: l,
  10190. sizes: r,
  10191. minDelta: s,
  10192. maxDelta: a,
  10193. alt: n,
  10194. snapBefore: i,
  10195. snapAfter: o,
  10196. disposable: d
  10197. }
  10198. };
  10199. c(o, r)
  10200. }, t.prototype.onSashChange = function (e) {
  10201. var t = e.current, n = this.sashDragState, i = n.index, o = n.start, r = n.sizes, s = n.alt,
  10202. a = n.minDelta, l = n.maxDelta, u = n.snapBefore, d = n.snapAfter;
  10203. this.sashDragState.current = t;
  10204. var c = t - o, h = this.resize(i, c, r, void 0, void 0, a, l, u, d);
  10205. if (s) {
  10206. var p = i === this.sashItems.length - 1, g = this.viewItems.map((function (e) {
  10207. return e.size
  10208. })), f = p ? i : i + 1, m = this.viewItems[f], v = m.size - m.maximumSize,
  10209. _ = m.size - m.minimumSize, y = p ? i - 1 : i + 1;
  10210. this.resize(y, -h, g, void 0, void 0, v, _)
  10211. }
  10212. this.distributeEmptySpace(), this.layoutViews()
  10213. }, t.prototype.onSashEnd = function (e) {
  10214. this._onDidSashChange.fire(e), this.sashDragState.disposable.dispose(), this.saveProportions();
  10215. for (var t = 0, n = this.viewItems; t < n.length; t++) {
  10216. n[t].enabled = !0
  10217. }
  10218. }, t.prototype.onViewChange = function (e, t) {
  10219. var n = this.viewItems.indexOf(e)
  10220. ;n < 0 || n >= this.viewItems.length || (t = "number" == typeof t ? t : e.size, t = l.clamp(t, e.minimumSize, e.maximumSize), this.inverseAltBehavior && n > 0 ? (this.resize(n - 1, Math.floor((e.size - t) / 2)), this.distributeEmptySpace(), this.layoutViews()) : (e.size = t, this.relayout([n], void 0)))
  10221. }, t.prototype.resizeView = function (e, t) {
  10222. var n = this;
  10223. if (this.state !== p.Idle) throw new Error("Cant modify splitview");
  10224. if (this.state = p.Busy, !(e < 0 || e >= this.viewItems.length)) {
  10225. var i = u.range(this.viewItems.length).filter((function (t) {
  10226. return t !== e
  10227. })), o = a(i.filter((function (e) {
  10228. return 1 === n.viewItems[e].priority
  10229. })), [e]), r = i.filter((function (e) {
  10230. return 2 === n.viewItems[e].priority
  10231. })), s = this.viewItems[e];
  10232. t = Math.round(t), t = l.clamp(t, s.minimumSize, Math.min(s.maximumSize, this.size)), s.size = t, this.relayout(o, r), this.state = p.Idle
  10233. }
  10234. }, t.prototype.distributeViewSizes = function () {
  10235. for (var e = this, t = [], n = 0, i = 0, o = this.viewItems; i < o.length; i++) {
  10236. (d = o[i]).maximumSize - d.minimumSize > 0 && (t.push(d), n += d.size)
  10237. }
  10238. for (var r = Math.floor(n / t.length), s = 0, a = t; s < a.length; s++) {
  10239. var d
  10240. ;(d = a[s]).size = l.clamp(r, d.minimumSize, d.maximumSize)
  10241. }
  10242. var c = u.range(this.viewItems.length), h = c.filter((function (t) {
  10243. return 1 === e.viewItems[t].priority
  10244. })), p = c.filter((function (t) {
  10245. return 2 === e.viewItems[t].priority
  10246. }));
  10247. this.relayout(h, p)
  10248. }, t.prototype.getViewSize = function (e) {
  10249. return e < 0 || e >= this.viewItems.length ? -1 : this.viewItems[e].size
  10250. }, t.prototype.doAddView = function (e, t, o, r) {
  10251. var a = this;
  10252. if (void 0 === o && (o = this.viewItems.length), this.state !== p.Idle) throw new Error("Cant modify splitview");
  10253. this.state = p.Busy;
  10254. var l = s.$(".split-view-view");
  10255. o === this.viewItems.length ? this.viewContainer.appendChild(l) : this.viewContainer.insertBefore(l, this.viewContainer.children.item(o));
  10256. var c, h = e.onDidChange((function (e) {
  10257. return a.onViewChange(y, e)
  10258. })), g = n.toDisposable((function () {
  10259. return a.viewContainer.removeChild(l)
  10260. })), f = n.combinedDisposable(h, g);
  10261. c = "number" == typeof t ? t : "split" === t.type ? this.getViewSize(t.index) / 2 : "invisible" === t.type ? {cachedVisibleSize: t.cachedVisibleSize} : e.minimumSize
  10262. ;var _, y = 0 === this.orientation ? new m(l, e, c, f) : new v(l, e, c, f);
  10263. if (this.viewItems.splice(o, 0, y), this.viewItems.length > 1) {
  10264. var C = 0 === this.orientation ? 1 : 0, b = 0 === this.orientation ? {
  10265. getHorizontalSashTop: function (e) {
  10266. return a.getSashPosition(e)
  10267. }
  10268. } : {
  10269. getVerticalSashLeft: function (e) {
  10270. return a.getSashPosition(e)
  10271. }
  10272. }, S = new d.Sash(this.sashContainer, b, {
  10273. orientation: C,
  10274. orthogonalStartSash: this.orthogonalStartSash,
  10275. orthogonalEndSash: this.orthogonalEndSash
  10276. }), w = 0 === this.orientation ? function (e) {
  10277. return {sash: S, start: e.startY, current: e.currentY, alt: e.altKey}
  10278. } : function (e) {
  10279. return {sash: S, start: e.startX, current: e.currentX, alt: e.altKey}
  10280. }, E = i.Event.map(S.onDidStart, w)(this.onSashStart, this),
  10281. L = i.Event.map(S.onDidChange, w)(this.onSashChange, this),
  10282. D = i.Event.map(S.onDidEnd, (function () {
  10283. return u.firstIndex(a.sashItems, (function (e) {
  10284. return e.sash === S
  10285. }))
  10286. }))(this.onSashEnd, this), N = S.onDidReset((function () {
  10287. var e = u.firstIndex(a.sashItems, (function (e) {
  10288. return e.sash === S
  10289. })), t = u.range(e, -1), n = u.range(e + 1, a.viewItems.length), i = a.findFirstSnapIndex(t),
  10290. o = a.findFirstSnapIndex(n);
  10291. ("number" != typeof i || a.viewItems[i].visible) && ("number" != typeof o || a.viewItems[o].visible) && a._onDidSashReset.fire(e)
  10292. })), x = n.combinedDisposable(E, L, D, N, S), I = {sash: S, disposable: x};
  10293. this.sashItems.splice(o - 1, 0, I)
  10294. }
  10295. l.appendChild(e.element), "number" != typeof t && "split" === t.type && (_ = [t.index]), r || this.relayout([o], _), this.state = p.Idle, r || "number" == typeof t || "distribute" !== t.type || this.distributeViewSizes()
  10296. }, t.prototype.relayout = function (e, t) {
  10297. var n = this.viewItems.reduce((function (e, t) {
  10298. return e + t.size
  10299. }), 0);
  10300. this.resize(this.viewItems.length - 1, this.size - n, void 0, e, t), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions()
  10301. }, t.prototype.resize = function (e, t, n, i, o, r, s, a, d) {
  10302. var c = this;
  10303. if (void 0 === n && (n = this.viewItems.map((function (e) {
  10304. return e.size
  10305. }))), void 0 === r && (r = Number.NEGATIVE_INFINITY), void 0 === s && (s = Number.POSITIVE_INFINITY), e < 0 || e >= this.viewItems.length) return 0
  10306. ;
  10307. var h = u.range(e, -1), p = u.range(e + 1, this.viewItems.length);
  10308. if (o) for (var g = 0, f = o; g < f.length; g++) {
  10309. var m = f[g];
  10310. u.pushToStart(h, m), u.pushToStart(p, m)
  10311. }
  10312. if (i) for (var v = 0, _ = i; v < _.length; v++) {
  10313. var y = _[v];
  10314. u.pushToEnd(h, y), u.pushToEnd(p, y)
  10315. }
  10316. var C = h.map((function (e) {
  10317. return c.viewItems[e]
  10318. })), b = h.map((function (e) {
  10319. return n[e]
  10320. })), S = p.map((function (e) {
  10321. return c.viewItems[e]
  10322. })), w = p.map((function (e) {
  10323. return n[e]
  10324. })), E = h.reduce((function (e, t) {
  10325. return e + (c.viewItems[t].minimumSize - n[t])
  10326. }), 0), L = h.reduce((function (e, t) {
  10327. return e + (c.viewItems[t].maximumSize - n[t])
  10328. }), 0), D = 0 === p.length ? Number.POSITIVE_INFINITY : p.reduce((function (e, t) {
  10329. return e + (n[t] - c.viewItems[t].minimumSize)
  10330. }), 0), N = 0 === p.length ? Number.NEGATIVE_INFINITY : p.reduce((function (e, t) {
  10331. return e + (n[t] - c.viewItems[t].maximumSize)
  10332. }), 0), x = Math.max(E, N, r), I = Math.min(D, L, s), M = !1;
  10333. if (a) {
  10334. var k = this.viewItems[a.index];
  10335. M = (T = t >= a.limitDelta) !== k.visible, k.setVisible(T, a.size)
  10336. }
  10337. if (!M && d) {
  10338. var T;
  10339. k = this.viewItems[d.index];
  10340. M = (T = t < d.limitDelta) !== k.visible, k.setVisible(T, d.size)
  10341. }
  10342. if (M) return this.resize(e, t, n, i, o, r, s);
  10343. for (var R = 0, O = t = l.clamp(t, x, I); R < C.length; R++) {
  10344. var P = C[R];
  10345. O -= (F = l.clamp(b[R] + O, P.minimumSize, P.maximumSize)) - b[R], P.size = F
  10346. }
  10347. R = 0;
  10348. for (var A = t; R < S.length; R++) {
  10349. var F;
  10350. P = S[R];
  10351. A += (F = l.clamp(w[R] - A, P.minimumSize, P.maximumSize)) - w[R], P.size = F
  10352. }
  10353. return t
  10354. }, t.prototype.distributeEmptySpace = function (e) {
  10355. for (var t = this, n = this.viewItems.reduce((function (e, t) {
  10356. return e + t.size
  10357. }), 0), i = this.size - n, o = u.range(this.viewItems.length - 1, -1), r = o.filter((function (e) {
  10358. return 1 === t.viewItems[e].priority
  10359. })), s = 0, a = o.filter((function (e) {
  10360. return 2 === t.viewItems[e].priority
  10361. })); s < a.length; s++) {
  10362. var d = a[s];
  10363. u.pushToStart(o, d)
  10364. }
  10365. for (var c = 0, h = r; c < h.length; c++) {
  10366. d = h[c];
  10367. u.pushToEnd(o, d)
  10368. }
  10369. "number" == typeof e && u.pushToEnd(o, e);
  10370. for (var p = 0; 0 !== i && p < o.length; p++) {
  10371. var g = this.viewItems[o[p]], f = l.clamp(g.size + i, g.minimumSize, g.maximumSize);
  10372. i -= f - g.size, g.size = f
  10373. }
  10374. }, t.prototype.layoutViews = function () {
  10375. this.contentSize = this.viewItems.reduce((function (e, t) {
  10376. return e + t.size
  10377. }), 0);
  10378. for (var e = 0, t = 0, n = this.viewItems; t < n.length; t++) {
  10379. var i = n[t]
  10380. ;i.layout(e, this.layoutContext), e += i.size
  10381. }
  10382. this.sashItems.forEach((function (e) {
  10383. return e.sash.layout()
  10384. })), this.updateSashEnablement()
  10385. }, t.prototype.updateSashEnablement = function () {
  10386. var e = !1, t = this.viewItems.map((function (t) {
  10387. return e = t.size - t.minimumSize > 0 || e
  10388. }));
  10389. e = !1;
  10390. var n = this.viewItems.map((function (t) {
  10391. return e = t.maximumSize - t.size > 0 || e
  10392. })), i = a(this.viewItems).reverse();
  10393. e = !1;
  10394. var o = i.map((function (t) {
  10395. return e = t.size - t.minimumSize > 0 || e
  10396. })).reverse();
  10397. e = !1;
  10398. for (var r = i.map((function (t) {
  10399. return e = t.maximumSize - t.size > 0 || e
  10400. })).reverse(), s = 0, l = 0; l < this.sashItems.length; l++) {
  10401. var d = this.sashItems[l].sash;
  10402. s += this.viewItems[l].size;
  10403. var c = !(t[l] && r[l + 1]), h = !(n[l] && o[l + 1]);
  10404. if (c && h) {
  10405. var p = u.range(l, -1), g = u.range(l + 1, this.viewItems.length),
  10406. f = this.findFirstSnapIndex(p), m = this.findFirstSnapIndex(g),
  10407. v = "number" == typeof f && !this.viewItems[f].visible,
  10408. _ = "number" == typeof m && !this.viewItems[m].visible;
  10409. v && o[l] && (s > 0 || this.startSnappingEnabled) ? d.state = 1 : _ && t[l] && (s < this.contentSize || this.endSnappingEnabled) ? d.state = 2 : d.state = 0
  10410. } else d.state = c && !h ? 1 : !c && h ? 2 : 3
  10411. }
  10412. }, t.prototype.getSashPosition = function (e) {
  10413. for (var t = 0, n = 0; n < this.sashItems.length; n++) if (t += this.viewItems[n].size, this.sashItems[n].sash === e) return Math.min(t, this.contentSize - 2);
  10414. return 0
  10415. }, t.prototype.findFirstSnapIndex = function (e) {
  10416. for (var t = 0, n = e; t < n.length; t++) {
  10417. var i = n[t];
  10418. if ((s = this.viewItems[i]).visible && s.snap) return i
  10419. }
  10420. for (var o = 0, r = e; o < r.length; o++) {
  10421. var s;
  10422. i = r[o];
  10423. if ((s = this.viewItems[i]).visible && s.maximumSize - s.minimumSize > 0) return;
  10424. if (!s.visible && s.snap) return i
  10425. }
  10426. }, t.prototype.dispose = function () {
  10427. e.prototype.dispose.call(this), this.viewItems.forEach((function (e) {
  10428. return e.dispose()
  10429. })), this.viewItems = [], this.sashItems.forEach((function (e) {
  10430. return e.disposable.dispose()
  10431. })), this.sashItems = []
  10432. }, t
  10433. }(n.Disposable);
  10434. t.SplitView = _
  10435. })), define(n[280], i([9]), {}), define(n[281], i([9]), {}), define(n[282], i([9]), {}), define(n[283], i([0, 1, 137, 256, 277, 4, 27, 31, 282]), (function (e, t, n, i, o, r, s, a) {
  10436. "use strict";
  10437. Object.defineProperty(t, "__esModule", {value: !0});
  10438. var l = function (e, t, i) {
  10439. if (void 0 === i && (i = {}),
  10440. this.tree = e, this.configuration = t, this.options = i, !t.dataSource) throw new Error("You must provide a Data Source to the tree.");
  10441. this.dataSource = t.dataSource, this.renderer = t.renderer, this.controller = t.controller || new n.DefaultController({
  10442. clickBehavior: 1,
  10443. keyboardSupport: "boolean" != typeof i.keyboardSupport || i.keyboardSupport
  10444. }), this.dnd = t.dnd || new n.DefaultDragAndDrop, this.filter = t.filter || new n.DefaultFilter, this.sorter = t.sorter, this.accessibilityProvider = t.accessibilityProvider || new n.DefaultAccessibilityProvider, this.styler = t.styler
  10445. };
  10446. t.TreeContext = l;
  10447. var u = {
  10448. listFocusBackground: s.Color.fromHex("#073655"),
  10449. listActiveSelectionBackground: s.Color.fromHex("#0E639C"),
  10450. listActiveSelectionForeground: s.Color.fromHex("#FFFFFF"),
  10451. listFocusAndSelectionBackground: s.Color.fromHex("#094771"),
  10452. listFocusAndSelectionForeground: s.Color.fromHex("#FFFFFF"),
  10453. listInactiveSelectionBackground: s.Color.fromHex("#3F3F46"),
  10454. listHoverBackground: s.Color.fromHex("#2A2D2E"),
  10455. listDropBackground: s.Color.fromHex("#383B3D")
  10456. }, d = function () {
  10457. function e(e, t, n) {
  10458. void 0 === n && (n = {}), this._onDidChangeFocus = new r.Relay, this.onDidChangeFocus = this._onDidChangeFocus.event, this._onDidChangeSelection = new r.Relay, this.onDidChangeSelection = this._onDidChangeSelection.event, this._onHighlightChange = new r.Relay, this._onDidExpandItem = new r.Relay, this._onDidCollapseItem = new r.Relay, this._onDispose = new r.Emitter, this.onDidDispose = this._onDispose.event, this.container = e, a.mixin(n, u, !1), n.twistiePixels = "number" == typeof n.twistiePixels ? n.twistiePixels : 32, n.showTwistie = !1 !== n.showTwistie, n.indentPixels = "number" == typeof n.indentPixels ? n.indentPixels : 12, n.alwaysFocused = !0 === n.alwaysFocused, n.useShadows = !1 !== n.useShadows, n.paddingOnRow = !1 !== n.paddingOnRow, n.showLoading = !1 !== n.showLoading, this.context = new l(this, t, n), this.model = new i.TreeModel(this.context), this.view = new o.TreeView(this.context, this.container), this.view.setModel(this.model), this._onDidChangeFocus.input = this.model.onDidFocus, this._onDidChangeSelection.input = this.model.onDidSelect,
  10459. this._onHighlightChange.input = this.model.onDidHighlight, this._onDidExpandItem.input = this.model.onDidExpandItem, this._onDidCollapseItem.input = this.model.onDidCollapseItem
  10460. }
  10461. return e.prototype.style = function (e) {
  10462. this.view.applyStyles(e)
  10463. }, Object.defineProperty(e.prototype, "onDidFocus", {
  10464. get: function () {
  10465. return this.view.onDOMFocus
  10466. }, enumerable: !0, configurable: !0
  10467. }), e.prototype.getHTMLElement = function () {
  10468. return this.view.getHTMLElement()
  10469. }, e.prototype.layout = function (e, t) {
  10470. this.view.layout(e, t)
  10471. }, e.prototype.domFocus = function () {
  10472. this.view.focus()
  10473. }, e.prototype.isDOMFocused = function () {
  10474. return this.view.isFocused()
  10475. }, e.prototype.domBlur = function () {
  10476. this.view.blur()
  10477. }, e.prototype.setInput = function (e) {
  10478. return this.model.setInput(e)
  10479. }, e.prototype.getInput = function () {
  10480. return this.model.getInput()
  10481. }, e.prototype.expand = function (e) {
  10482. return this.model.expand(e)
  10483. }, e.prototype.collapse = function (e, t) {
  10484. return void 0 === t && (t = !1), this.model.collapse(e, t)
  10485. }, e.prototype.toggleExpansion = function (e, t) {
  10486. return void 0 === t && (t = !1), this.model.toggleExpansion(e, t)
  10487. }, e.prototype.isExpanded = function (e) {
  10488. return this.model.isExpanded(e)
  10489. }, e.prototype.reveal = function (e, t) {
  10490. return void 0 === t && (t = null), this.model.reveal(e, t)
  10491. }, e.prototype.getHighlight = function () {
  10492. return this.model.getHighlight()
  10493. }, e.prototype.clearHighlight = function (e) {
  10494. this.model.setHighlight(null, e)
  10495. }, e.prototype.setSelection = function (e, t) {
  10496. this.model.setSelection(e, t)
  10497. }, e.prototype.getSelection = function () {
  10498. return this.model.getSelection()
  10499. }, e.prototype.clearSelection = function (e) {
  10500. this.model.setSelection([], e)
  10501. }, e.prototype.setFocus = function (e, t) {
  10502. this.model.setFocus(e, t)
  10503. }, e.prototype.getFocus = function () {
  10504. return this.model.getFocus()
  10505. }, e.prototype.focusNext = function (e, t) {
  10506. this.model.focusNext(e, t)
  10507. }, e.prototype.focusPrevious = function (e, t) {
  10508. this.model.focusPrevious(e, t)
  10509. }, e.prototype.focusParent = function (e) {
  10510. this.model.focusParent(e)
  10511. }, e.prototype.focusFirstChild = function (e) {
  10512. this.model.focusFirstChild(e)
  10513. }, e.prototype.focusFirst = function (e, t) {
  10514. this.model.focusFirst(e, t)
  10515. }, e.prototype.focusNth = function (e, t) {
  10516. this.model.focusNth(e, t)
  10517. },
  10518. e.prototype.focusLast = function (e, t) {
  10519. this.model.focusLast(e, t)
  10520. }, e.prototype.focusNextPage = function (e) {
  10521. this.view.focusNextPage(e)
  10522. }, e.prototype.focusPreviousPage = function (e) {
  10523. this.view.focusPreviousPage(e)
  10524. }, e.prototype.clearFocus = function (e) {
  10525. this.model.setFocus(null, e)
  10526. }, e.prototype.dispose = function () {
  10527. this._onDispose.fire(), this.model.dispose(), this.view.dispose(), this._onDidChangeFocus.dispose(), this._onDidChangeSelection.dispose(), this._onHighlightChange.dispose(), this._onDidExpandItem.dispose(), this._onDidCollapseItem.dispose(), this._onDispose.dispose()
  10528. }, e
  10529. }();
  10530. t.Tree = d
  10531. })), define(n[284], i([9]), {}), define(n[285], i([9]), {}), define(n[286], i([9]), {}), define(n[287], i([9]), {}), define(n[288], i([9]), {}), define(n[289], i([9]), {}), define(n[290], i([9]), {}), define(n[291], i([9]), {}), define(n[292], i([9]), {}), define(n[293], i([9]), {}), define(n[294], i([9]), {}), define(n[295], i([9]), {}), define(n[296], i([9]), {}), define(n[297], i([9]), {}), define(n[298], i([9]), {}), define(n[299], i([9]), {}), define(n[300], i([9]), {}),
  10532. define(n[301], i([9]), {}), define(n[302], i([9]), {}), define(n[303], i([9]), {}), define(n[304], i([9]), {}), define(n[305], i([9]), {}), define(n[306], i([9]), {}), define(n[307], i([9]), {}), define(n[308], i([9]), {}), define(n[309], i([9]), {}), define(n[310], i([9]), {}), define(n[311], i([9]), {}), define(n[312], i([9]), {}), define(n[313], i([9]), {}), define(n[314], i([9]), {}), define(n[315], i([9]), {}), define(n[316], i([9]), {}), define(n[317], i([9]), {}), define(n[318], i([9]), {}), define(n[319], i([9]), {}), define(n[320], i([9]), {}), define(n[321], i([9]), {}), define(n[322], i([9]), {}), define(n[323], i([9]), {}), define(n[324], i([9]), {}), define(n[325], i([9]), {}), define(n[326], i([9]), {}), define(n[327], i([9]), {}), define(n[328], i([9]), {}), define(n[329], i([9]), {}), define(n[330], i([9]), {}), define(n[331], i([9]), {}), define(n[332], i([9]), {}), define(n[333], i([0, 1]), (function (e, t) {
  10533. "use strict";
  10534. Object.defineProperty(t, "__esModule", {value: !0});
  10535. var n = function () {
  10536. function e(e, t) {
  10537. this.chr = e, this.type = t, this.width = 0
  10538. }
  10539. return e.prototype.fulfill = function (e) {
  10540. this.width = e
  10541. }, e
  10542. }();
  10543. t.CharWidthRequest = n;
  10544. var i = function () {
  10545. function e(e, t) {
  10546. this._bareFontInfo = e, this._requests = t, this._container = null, this._testElements = null
  10547. }
  10548. return e.prototype.read = function () {
  10549. this._createDomElements(), document.body.appendChild(this._container), this._readFromDomElements(), document.body.removeChild(this._container), this._container = null, this._testElements = null
  10550. }, e.prototype._createDomElements = function () {
  10551. var t = document.createElement("div");
  10552. t.style.position = "absolute", t.style.top = "-50000px", t.style.width = "50000px";
  10553. var n = document.createElement("div");
  10554. n.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(), n.style.fontWeight = this._bareFontInfo.fontWeight, n.style.fontSize = this._bareFontInfo.fontSize + "px", n.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, n.style.lineHeight = this._bareFontInfo.lineHeight + "px", n.style.letterSpacing = this._bareFontInfo.letterSpacing + "px", t.appendChild(n);
  10555. var i = document.createElement("div");
  10556. i.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(),
  10557. i.style.fontWeight = "bold", i.style.fontSize = this._bareFontInfo.fontSize + "px", i.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, i.style.lineHeight = this._bareFontInfo.lineHeight + "px", i.style.letterSpacing = this._bareFontInfo.letterSpacing + "px", t.appendChild(i);
  10558. var o = document.createElement("div");
  10559. o.style.fontFamily = this._bareFontInfo.getMassagedFontFamily(), o.style.fontWeight = this._bareFontInfo.fontWeight, o.style.fontSize = this._bareFontInfo.fontSize + "px", o.style.fontFeatureSettings = this._bareFontInfo.fontFeatureSettings, o.style.lineHeight = this._bareFontInfo.lineHeight + "px", o.style.letterSpacing = this._bareFontInfo.letterSpacing + "px", o.style.fontStyle = "italic", t.appendChild(o);
  10560. for (var r = [], s = 0, a = this._requests; s < a.length; s++) {
  10561. var l = a[s], u = void 0;
  10562. 0 === l.type && (u = n), 2 === l.type && (u = i), 1 === l.type && (u = o), u.appendChild(document.createElement("br"));
  10563. var d = document.createElement("span");
  10564. e._render(d, l), u.appendChild(d), r.push(d)
  10565. }
  10566. this._container = t, this._testElements = r
  10567. }, e._render = function (e, t) {
  10568. if (" " === t.chr) {
  10569. for (var n = "&#160;", i = 0; i < 8; i++) n += n;
  10570. e.innerHTML = n
  10571. } else {
  10572. var o = t.chr;
  10573. for (i = 0; i < 8; i++) o += o;
  10574. e.textContent = o
  10575. }
  10576. }, e.prototype._readFromDomElements = function () {
  10577. for (var e = 0, t = this._requests.length; e < t; e++) {
  10578. var n = this._requests[e], i = this._testElements[e];
  10579. n.fulfill(i.offsetWidth / 256)
  10580. }
  10581. }, e
  10582. }();
  10583. t.readCharWidths = function (e, t) {
  10584. new i(e, t).read()
  10585. }
  10586. })), define(n[185], i([0, 1, 2, 6]), (function (e, t, n, i) {
  10587. "use strict";
  10588. Object.defineProperty(t, "__esModule", {value: !0});
  10589. var o = function (e) {
  10590. function t(t, n, i) {
  10591. var o = e.call(this) || this;
  10592. return o.referenceDomElement = t, o.changeCallback = i, o.width = -1, o.height = -1, o.mutationObserver = null, o.windowSizeListener = null, o.measureReferenceDomElement(!1, n), o
  10593. }
  10594. return r(t, e), t.prototype.dispose = function () {
  10595. this.stopObserving(), e.prototype.dispose.call(this)
  10596. }, t.prototype.getWidth = function () {
  10597. return this.width
  10598. }, t.prototype.getHeight = function () {
  10599. return this.height
  10600. }, t.prototype.startObserving = function () {
  10601. var e = this;
  10602. !this.mutationObserver && this.referenceDomElement && (this.mutationObserver = new MutationObserver((function () {
  10603. return e._onDidMutate()
  10604. })), this.mutationObserver.observe(this.referenceDomElement, {attributes: !0})), this.windowSizeListener || (this.windowSizeListener = i.addDisposableListener(window, "resize", (function () {
  10605. return e._onDidResizeWindow()
  10606. })))
  10607. }, t.prototype.stopObserving = function () {
  10608. this.mutationObserver && (this.mutationObserver.disconnect(), this.mutationObserver = null), this.windowSizeListener && (this.windowSizeListener.dispose(), this.windowSizeListener = null)
  10609. }, t.prototype.observe = function (e) {
  10610. this.measureReferenceDomElement(!0, e)
  10611. }, t.prototype._onDidMutate = function () {
  10612. this.measureReferenceDomElement(!0)
  10613. }, t.prototype._onDidResizeWindow = function () {
  10614. this.measureReferenceDomElement(!0)
  10615. }, t.prototype.measureReferenceDomElement = function (e, t) {
  10616. var n = 0, i = 0;
  10617. t ? (n = t.width, i = t.height) : this.referenceDomElement && (n = this.referenceDomElement.clientWidth, i = this.referenceDomElement.clientHeight), n = Math.max(5, n), i = Math.max(5, i), this.width === n && this.height === i || (this.width = n, this.height = i, e && this.changeCallback())
  10618. }, t
  10619. }(n.Disposable)
  10620. ;t.ElementSizeObserver = o
  10621. })), define(n[141], i([0, 1, 6, 78, 45, 2]), (function (e, t, n, i, o, s) {
  10622. "use strict";
  10623. Object.defineProperty(t, "__esModule", {value: !0});
  10624. var a = function () {
  10625. function e(e, t) {
  10626. this.x = e, this.y = t
  10627. }
  10628. return e.prototype.toClientCoordinates = function () {
  10629. return new l(this.x - n.StandardWindow.scrollX, this.y - n.StandardWindow.scrollY)
  10630. }, e
  10631. }();
  10632. t.PageCoordinates = a;
  10633. var l = function () {
  10634. function e(e, t) {
  10635. this.clientX = e, this.clientY = t
  10636. }
  10637. return e.prototype.toPageCoordinates = function () {
  10638. return new a(this.clientX + n.StandardWindow.scrollX, this.clientY + n.StandardWindow.scrollY)
  10639. }, e
  10640. }();
  10641. t.ClientCoordinates = l;
  10642. var u = function (e, t, n, i) {
  10643. this.x = e, this.y = t, this.width = n, this.height = i
  10644. };
  10645. function d(e) {
  10646. var t = n.getDomNodePagePosition(e);
  10647. return new u(t.left, t.top, t.width, t.height)
  10648. }
  10649. t.EditorPagePosition = u, t.createEditorPagePosition = d;
  10650. var c = function (e) {
  10651. function t(t, n) {
  10652. var i = e.call(this, t) || this;
  10653. return i.pos = new a(i.posx, i.posy), i.editorPos = d(n), i
  10654. }
  10655. return r(t, e), t
  10656. }(o.StandardMouseEvent);
  10657. t.EditorMouseEvent = c;
  10658. var h = function () {
  10659. function e(e) {
  10660. this._editorViewDomNode = e
  10661. }
  10662. return e.prototype._create = function (e) {
  10663. return new c(e, this._editorViewDomNode)
  10664. }, e.prototype.onContextMenu = function (e, t) {
  10665. var i = this;
  10666. return n.addDisposableListener(e, "contextmenu", (function (e) {
  10667. t(i._create(e))
  10668. }))
  10669. }, e.prototype.onMouseUp = function (e, t) {
  10670. var i = this;
  10671. return n.addDisposableListener(e, "mouseup", (function (e) {
  10672. t(i._create(e))
  10673. }))
  10674. }, e.prototype.onMouseDown = function (e, t) {
  10675. var i = this;
  10676. return n.addDisposableListener(e, "mousedown", (function (e) {
  10677. t(i._create(e))
  10678. }))
  10679. }, e.prototype.onMouseLeave = function (e, t) {
  10680. var i = this;
  10681. return n.addDisposableNonBubblingMouseOutListener(e, (function (e) {
  10682. t(i._create(e))
  10683. }))
  10684. }, e.prototype.onMouseMoveThrottled = function (e, t, i, o) {
  10685. var r = this;
  10686. return n.addDisposableThrottledListener(e, "mousemove", t, (function (e, t) {
  10687. return i(e, r._create(t))
  10688. }), o)
  10689. }, e
  10690. }();
  10691. t.EditorMouseEventFactory = h;
  10692. var p = function () {
  10693. function e(e) {
  10694. this._editorViewDomNode = e
  10695. }
  10696. return e.prototype._create = function (e) {
  10697. return new c(e, this._editorViewDomNode)
  10698. }, e.prototype.onPointerUp = function (e, t) {
  10699. var i = this
  10700. ;
  10701. return n.addDisposableListener(e, "pointerup", (function (e) {
  10702. t(i._create(e))
  10703. }))
  10704. }, e.prototype.onPointerDown = function (e, t) {
  10705. var i = this;
  10706. return n.addDisposableListener(e, "pointerdown", (function (e) {
  10707. t(i._create(e))
  10708. }))
  10709. }, e.prototype.onPointerLeave = function (e, t) {
  10710. var i = this;
  10711. return n.addDisposableNonBubblingPointerOutListener(e, (function (e) {
  10712. t(i._create(e))
  10713. }))
  10714. }, e.prototype.onPointerMoveThrottled = function (e, t, i, o) {
  10715. var r = this;
  10716. return n.addDisposableThrottledListener(e, "pointermove", t, (function (e, t) {
  10717. return i(e, r._create(t))
  10718. }), o)
  10719. }, e
  10720. }();
  10721. t.EditorPointerEventFactory = p;
  10722. var g = function (e) {
  10723. function t(t) {
  10724. var n = e.call(this) || this;
  10725. return n._editorViewDomNode = t, n._globalMouseMoveMonitor = n._register(new i.GlobalMouseMoveMonitor), n._keydownListener = null, n
  10726. }
  10727. return r(t, e), t.prototype.startMonitoring = function (e, t, i, o, r) {
  10728. var s = this;
  10729. this._keydownListener = n.addStandardDisposableListener(document, "keydown", (function (e) {
  10730. e.toKeybinding().isModifierKey() || s._globalMouseMoveMonitor.stopMonitoring(!0)
  10731. }), !0)
  10732. ;this._globalMouseMoveMonitor.startMonitoring(e, t, (function (e, t) {
  10733. return i(e, new c(t, s._editorViewDomNode))
  10734. }), o, (function () {
  10735. s._keydownListener.dispose(), r()
  10736. }))
  10737. }, t
  10738. }(s.Disposable);
  10739. t.GlobalEditorMouseMoveMonitor = g
  10740. })), define(n[334], i([0, 1, 4, 2]), (function (e, t, n, i) {
  10741. "use strict";
  10742. Object.defineProperty(t, "__esModule", {value: !0});
  10743. var o = function (e) {
  10744. function t() {
  10745. var t = e.call(this) || this;
  10746. return t._onCodeEditorAdd = t._register(new n.Emitter), t.onCodeEditorAdd = t._onCodeEditorAdd.event, t._onCodeEditorRemove = t._register(new n.Emitter), t.onCodeEditorRemove = t._onCodeEditorRemove.event, t._onDiffEditorAdd = t._register(new n.Emitter), t._onDiffEditorRemove = t._register(new n.Emitter), t._codeEditors = Object.create(null), t._diffEditors = Object.create(null), t
  10747. }
  10748. return r(t, e), t.prototype.addCodeEditor = function (e) {
  10749. this._codeEditors[e.getId()] = e, this._onCodeEditorAdd.fire(e)
  10750. }, t.prototype.removeCodeEditor = function (e) {
  10751. delete this._codeEditors[e.getId()] && this._onCodeEditorRemove.fire(e)
  10752. }, t.prototype.listCodeEditors = function () {
  10753. var e = this
  10754. ;
  10755. return Object.keys(this._codeEditors).map((function (t) {
  10756. return e._codeEditors[t]
  10757. }))
  10758. }, t.prototype.addDiffEditor = function (e) {
  10759. this._diffEditors[e.getId()] = e, this._onDiffEditorAdd.fire(e)
  10760. }, t.prototype.removeDiffEditor = function (e) {
  10761. delete this._diffEditors[e.getId()] && this._onDiffEditorRemove.fire(e)
  10762. }, t.prototype.listDiffEditors = function () {
  10763. var e = this;
  10764. return Object.keys(this._diffEditors).map((function (t) {
  10765. return e._diffEditors[t]
  10766. }))
  10767. }, t.prototype.getFocusedCodeEditor = function () {
  10768. for (var e = null, t = 0, n = this.listCodeEditors(); t < n.length; t++) {
  10769. var i = n[t];
  10770. if (i.hasTextFocus()) return i;
  10771. i.hasWidgetFocus() && (e = i)
  10772. }
  10773. return e
  10774. }, t
  10775. }(i.Disposable);
  10776. t.AbstractCodeEditorService = o
  10777. })), define(n[186], i([0, 1]), (function (e, t) {
  10778. "use strict";
  10779. Object.defineProperty(t, "__esModule", {value: !0}), t.allCharCodes = function () {
  10780. for (var e = [], t = 32; t <= 126; t++) e.push(t);
  10781. return e.push(65533), e
  10782. }(), t.getCharIndex = function (e, t) {
  10783. return (e -= 32) < 0 || e > 96 ? t <= 2 ? (e + 96) % 96 : 95 : e
  10784. }
  10785. })), define(n[335], i([0, 1, 186]), (function (e, t, n) {
  10786. "use strict";
  10787. Object.defineProperty(t, "__esModule", {
  10788. value: !0
  10789. });
  10790. var i = function () {
  10791. function e(t, n) {
  10792. this.scale = n, this.charDataNormal = e.soften(t, .8), this.charDataLight = e.soften(t, 50 / 60)
  10793. }
  10794. return e.soften = function (e, t) {
  10795. for (var n = new Uint8ClampedArray(e.length), i = 0, o = e.length; i < o; i++) n[i] = e[i] * t;
  10796. return n
  10797. }, e.prototype.renderChar = function (e, t, i, o, r, s, a, l) {
  10798. var u = 1 * this.scale, d = 2 * this.scale;
  10799. if (t + u > e.width || i + d > e.height) console.warn("bad render request outside image data"); else for (var c = l ? this.charDataLight : this.charDataNormal, h = n.getCharIndex(o, a), p = 4 * e.width, g = s.r, f = s.g, m = s.b, v = r.r - g, _ = r.g - f, y = r.b - m, C = e.data, b = h * u * d, S = i * p + 4 * t, w = 0; w < d; w++) {
  10800. for (var E = S, L = 0; L < u; L++) {
  10801. var D = c[b++] / 255;
  10802. C[E++] = g + v * D, C[E++] = f + _ * D, C[E++] = m + y * D, E++
  10803. }
  10804. S += p
  10805. }
  10806. }, e.prototype.blockRenderChar = function (e, t, n, i, o, r) {
  10807. var s = 1 * this.scale, a = 2 * this.scale;
  10808. if (t + s > e.width || n + a > e.height) console.warn("bad render request outside image data"); else for (var l = 4 * e.width, u = o.r, d = o.g, c = o.b, h = u + .5 * (i.r - u), p = d + .5 * (i.g - d), g = c + .5 * (i.b - c), f = e.data, m = n * l + 4 * t, v = 0; v < a; v++) {
  10809. for (var _ = m, y = 0; y < s; y++) f[_++] = h, f[_++] = p, f[_++] = g, _++;
  10810. m += l
  10811. }
  10812. }, e
  10813. }();
  10814. t.MinimapCharRenderer = i
  10815. })), define(n[336], i([0, 1, 102]), (function (e, t, n) {
  10816. "use strict";
  10817. Object.defineProperty(t, "__esModule", {value: !0});
  10818. var i = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15},
  10819. o = function (e) {
  10820. for (var t = new Uint8ClampedArray(e.length / 2), n = 0; n < e.length; n += 2) t[n >> 1] = i[e[n]] << 4 | 15 & i[e[n + 1]];
  10821. return t
  10822. };
  10823. t.prebakedMiniMaps = {
  10824. 1: n.once((function () {
  10825. return o("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")
  10826. })), 2: n.once((function () {
  10827. return o("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")
  10828. }))
  10829. }
  10830. })), define(n[337], i([0, 1, 335, 186, 336]), (function (e, t, n, i, o) {
  10831. "use strict";
  10832. Object.defineProperty(t, "__esModule", {value: !0});
  10833. var r = function () {
  10834. function e() {
  10835. }
  10836. return e.create = function (t, i) {
  10837. return this.lastCreated && t === this.lastCreated.scale && i === this.lastFontFamily ? this.lastCreated : (r = o.prebakedMiniMaps[t] ? new n.MinimapCharRenderer(o.prebakedMiniMaps[t](), t) : e.createFromSampleData(e.createSampleData(i).data, t), this.lastFontFamily = i, this.lastCreated = r, r);
  10838. var r
  10839. }, e.createSampleData = function (e) {
  10840. var t = document.createElement("canvas"), n = t.getContext("2d");
  10841. t.style.height = "16px", t.height = 16, t.width = 960, t.style.width = "960px", n.fillStyle = "#ffffff", n.font = "bold 16px " + e, n.textBaseline = "middle";
  10842. for (var o = 0, r = 0, s = i.allCharCodes; r < s.length; r++) {
  10843. var a = s[r];
  10844. n.fillText(String.fromCharCode(a), o, 8), o += 10
  10845. }
  10846. return n.getImageData(0, 0, 960, 16)
  10847. }, e.createFromSampleData = function (t, i) {
  10848. if (61440 !== t.length) throw new Error("Unexpected source in MinimapCharRenderer");
  10849. var o = e._downsample(t, i);
  10850. return new n.MinimapCharRenderer(o, i)
  10851. },
  10852. e._downsampleChar = function (e, t, n, i, o) {
  10853. for (var r = 1 * o, s = 2 * o, a = i, l = 0, u = 0; u < s; u++) for (var d = u / s * 16, c = (u + 1) / s * 16, h = 0; h < r; h++) {
  10854. for (var p = h / r * 10, g = (h + 1) / r * 10, f = 0, m = 0, v = d; v < c; v++) for (var _ = t + 3840 * Math.floor(v), y = 1 - (v - Math.floor(v)), C = p; C < g; C++) {
  10855. var b = 1 - (C - Math.floor(C)), S = _ + 4 * Math.floor(C), w = b * y;
  10856. m += w, f += e[S] * e[S + 3] / 255 * w
  10857. }
  10858. var E = f / m;
  10859. l = Math.max(l, E), n[a++] = E
  10860. }
  10861. return l
  10862. }, e._downsample = function (e, t) {
  10863. for (var n = 2 * t * 1 * t, i = 96 * n, o = new Uint8ClampedArray(i), r = 0, s = 0, a = 0, l = 0; l < 96; l++) a = Math.max(a, this._downsampleChar(e, s, o, r, t)), r += n, s += 40;
  10864. if (a > 0) for (var u = 255 / a, d = 0; d < i; d++) o[d] *= u;
  10865. return o
  10866. }, e
  10867. }();
  10868. t.MinimapCharRendererFactory = r
  10869. })), define(n[105], i([0, 1, 4]), (function (e, t, n) {
  10870. "use strict";
  10871. Object.defineProperty(t, "__esModule", {value: !0}), t.EditorZoom = new (function () {
  10872. function e() {
  10873. this._zoomLevel = 0, this._onDidChangeZoomLevel = new n.Emitter, this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event
  10874. }
  10875. return e.prototype.getZoomLevel = function () {
  10876. return this._zoomLevel
  10877. }, e.prototype.setZoomLevel = function (e) {
  10878. e = Math.min(Math.max(-5, e), 20),
  10879. this._zoomLevel !== e && (this._zoomLevel = e, this._onDidChangeZoomLevel.fire(this._zoomLevel))
  10880. }, e
  10881. }())
  10882. })), define(n[142], i([0, 1, 16, 105]), (function (e, t, n, i) {
  10883. "use strict";
  10884. Object.defineProperty(t, "__esModule", {value: !0});
  10885. var o = n.isMacintosh ? 1.5 : 1.35, s = function () {
  10886. function e(e) {
  10887. this.zoomLevel = e.zoomLevel, this.fontFamily = String(e.fontFamily), this.fontWeight = String(e.fontWeight), this.fontSize = e.fontSize, this.fontFeatureSettings = e.fontFeatureSettings, this.lineHeight = 0 | e.lineHeight, this.letterSpacing = e.letterSpacing
  10888. }
  10889. return e.createFromValidatedSettings = function (t, n, i) {
  10890. var o = t.get(33), r = t.get(37), s = t.get(36), a = t.get(35), l = t.get(49), u = t.get(46);
  10891. return e._create(o, r, s, a, l, u, n, i)
  10892. }, e._create = function (t, n, r, s, a, l, u, d) {
  10893. 0 === a ? a = Math.round(o * r) : a < 8 && (a = 8);
  10894. var c = 1 + (d ? 0 : .1 * i.EditorZoom.getZoomLevel());
  10895. return new e({
  10896. zoomLevel: u,
  10897. fontFamily: t,
  10898. fontWeight: n,
  10899. fontSize: r *= c,
  10900. fontFeatureSettings: s,
  10901. lineHeight: a *= c,
  10902. letterSpacing: l
  10903. })
  10904. }, e.prototype.getId = function () {
  10905. return this.zoomLevel + "-" + this.fontFamily + "-" + this.fontWeight + "-" + this.fontSize + "-" + this.fontFeatureSettings + "-" + this.lineHeight + "-" + this.letterSpacing
  10906. }, e.prototype.getMassagedFontFamily = function () {
  10907. return /[,"']/.test(this.fontFamily) ? this.fontFamily : /[+ ]/.test(this.fontFamily) ? '"' + this.fontFamily + '"' : this.fontFamily
  10908. }, e
  10909. }();
  10910. t.BareFontInfo = s;
  10911. var a = function (e) {
  10912. function t(t, n) {
  10913. var i = e.call(this, t) || this;
  10914. return i.isTrusted = n, i.isMonospace = t.isMonospace, i.typicalHalfwidthCharacterWidth = t.typicalHalfwidthCharacterWidth, i.typicalFullwidthCharacterWidth = t.typicalFullwidthCharacterWidth, i.canUseHalfwidthRightwardsArrow = t.canUseHalfwidthRightwardsArrow, i.spaceWidth = t.spaceWidth, i.middotWidth = t.middotWidth, i.maxDigitWidth = t.maxDigitWidth, i
  10915. }
  10916. return r(t, e), t.prototype.equals = function (e) {
  10917. return this.fontFamily === e.fontFamily && this.fontWeight === e.fontWeight && this.fontSize === e.fontSize && this.fontFeatureSettings === e.fontFeatureSettings && this.lineHeight === e.lineHeight && this.letterSpacing === e.letterSpacing && this.typicalHalfwidthCharacterWidth === e.typicalHalfwidthCharacterWidth && this.typicalFullwidthCharacterWidth === e.typicalFullwidthCharacterWidth && this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && this.spaceWidth === e.spaceWidth && this.middotWidth === e.middotWidth && this.maxDigitWidth === e.maxDigitWidth
  10918. }, t
  10919. }(s);
  10920. t.FontInfo = a
  10921. })), define(n[79], i([0, 1, 179]), (function (e, t, n) {
  10922. "use strict";
  10923. Object.defineProperty(t, "__esModule", {value: !0});
  10924. var i = function () {
  10925. function e(t) {
  10926. var i = n.toUint8(t);
  10927. this._defaultValue = i, this._asciiMap = e._createAsciiMap(i), this._map = new Map
  10928. }
  10929. return e._createAsciiMap = function (e) {
  10930. for (var t = new Uint8Array(256), n = 0; n < 256; n++) t[n] = e;
  10931. return t
  10932. }, e.prototype.set = function (e, t) {
  10933. var i = n.toUint8(t);
  10934. e >= 0 && e < 256 ? this._asciiMap[e] = i : this._map.set(e, i)
  10935. }, e.prototype.get = function (e) {
  10936. return e >= 0 && e < 256 ? this._asciiMap[e] : this._map.get(e) || this._defaultValue
  10937. }, e
  10938. }();
  10939. t.CharacterClassifier = i;
  10940. var o = function () {
  10941. function e() {
  10942. this._actual = new i(0)
  10943. }
  10944. return e.prototype.add = function (e) {
  10945. this._actual.set(e, 1)
  10946. }, e.prototype.has = function (e) {
  10947. return 1 === this._actual.get(e)
  10948. }, e
  10949. }();
  10950. t.CharacterSet = o
  10951. })), define(n[89], i([0, 1, 79]), (function (e, t, n) {
  10952. "use strict";
  10953. Object.defineProperty(t, "__esModule", {value: !0});
  10954. var i, o, s = function (e) {
  10955. function t(t) {
  10956. for (var n = e.call(this, 0) || this, i = 0, o = t.length; i < o; i++) n.set(t.charCodeAt(i), 2);
  10957. return n.set(32, 1), n.set(9, 1), n
  10958. }
  10959. return r(t, e), t
  10960. }(n.CharacterClassifier);
  10961. t.WordCharacterClassifier = s, t.getMapForWordSeparators = (i = function (e) {
  10962. return new s(e)
  10963. }, o = {}, function (e) {
  10964. return o.hasOwnProperty(e) || (o[e] = i(e)), o[e]
  10965. })
  10966. })), define(n[13], i([0, 1]), (function (e, t) {
  10967. "use strict";
  10968. Object.defineProperty(t, "__esModule", {value: !0});
  10969. var n = function () {
  10970. function e(e, t) {
  10971. this.lineNumber = e, this.column = t
  10972. }
  10973. return e.prototype.with = function (t, n) {
  10974. return void 0 === t && (t = this.lineNumber), void 0 === n && (n = this.column),
  10975. t === this.lineNumber && n === this.column ? this : new e(t, n)
  10976. }, e.prototype.delta = function (e, t) {
  10977. return void 0 === e && (e = 0), void 0 === t && (t = 0), this.with(this.lineNumber + e, this.column + t)
  10978. }, e.prototype.equals = function (t) {
  10979. return e.equals(this, t)
  10980. }, e.equals = function (e, t) {
  10981. return !e && !t || !!e && !!t && e.lineNumber === t.lineNumber && e.column === t.column
  10982. }, e.prototype.isBefore = function (t) {
  10983. return e.isBefore(this, t)
  10984. }, e.isBefore = function (e, t) {
  10985. return e.lineNumber < t.lineNumber || !(t.lineNumber < e.lineNumber) && e.column < t.column
  10986. }, e.prototype.isBeforeOrEqual = function (t) {
  10987. return e.isBeforeOrEqual(this, t)
  10988. }, e.isBeforeOrEqual = function (e, t) {
  10989. return e.lineNumber < t.lineNumber || !(t.lineNumber < e.lineNumber) && e.column <= t.column
  10990. }, e.compare = function (e, t) {
  10991. var n = 0 | e.lineNumber, i = 0 | t.lineNumber;
  10992. return n === i ? (0 | e.column) - (0 | t.column) : n - i
  10993. }, e.prototype.clone = function () {
  10994. return new e(this.lineNumber, this.column)
  10995. }, e.prototype.toString = function () {
  10996. return "(" + this.lineNumber + "," + this.column + ")"
  10997. }, e.lift = function (t) {
  10998. return new e(t.lineNumber, t.column)
  10999. }, e.isIPosition = function (e) {
  11000. return e && "number" == typeof e.lineNumber && "number" == typeof e.column
  11001. }, e
  11002. }();
  11003. t.Position = n
  11004. })), define(n[3], i([0, 1, 13]), (function (e, t, n) {
  11005. "use strict";
  11006. Object.defineProperty(t, "__esModule", {value: !0});
  11007. var i = function () {
  11008. function e(e, t, n, i) {
  11009. e > n || e === n && t > i ? (this.startLineNumber = n, this.startColumn = i, this.endLineNumber = e, this.endColumn = t) : (this.startLineNumber = e, this.startColumn = t, this.endLineNumber = n, this.endColumn = i)
  11010. }
  11011. return e.prototype.isEmpty = function () {
  11012. return e.isEmpty(this)
  11013. }, e.isEmpty = function (e) {
  11014. return e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn
  11015. }, e.prototype.containsPosition = function (t) {
  11016. return e.containsPosition(this, t)
  11017. }, e.containsPosition = function (e, t) {
  11018. return !(t.lineNumber < e.startLineNumber || t.lineNumber > e.endLineNumber) && (!(t.lineNumber === e.startLineNumber && t.column < e.startColumn) && !(t.lineNumber === e.endLineNumber && t.column > e.endColumn))
  11019. }, e.prototype.containsRange = function (t) {
  11020. return e.containsRange(this, t)
  11021. }, e.containsRange = function (e, t) {
  11022. return !(t.startLineNumber < e.startLineNumber || t.endLineNumber < e.startLineNumber) && (!(t.startLineNumber > e.endLineNumber || t.endLineNumber > e.endLineNumber) && (!(t.startLineNumber === e.startLineNumber && t.startColumn < e.startColumn) && !(t.endLineNumber === e.endLineNumber && t.endColumn > e.endColumn)))
  11023. }, e.prototype.strictContainsRange = function (t) {
  11024. return e.strictContainsRange(this, t)
  11025. }, e.strictContainsRange = function (e, t) {
  11026. return !(t.startLineNumber < e.startLineNumber || t.endLineNumber < e.startLineNumber) && (!(t.startLineNumber > e.endLineNumber || t.endLineNumber > e.endLineNumber) && (!(t.startLineNumber === e.startLineNumber && t.startColumn <= e.startColumn) && !(t.endLineNumber === e.endLineNumber && t.endColumn >= e.endColumn)))
  11027. }, e.prototype.plusRange = function (t) {
  11028. return e.plusRange(this, t)
  11029. }, e.plusRange = function (t, n) {
  11030. var i, o, r, s;
  11031. return n.startLineNumber < t.startLineNumber ? (i = n.startLineNumber, o = n.startColumn) : n.startLineNumber === t.startLineNumber ? (i = n.startLineNumber, o = Math.min(n.startColumn, t.startColumn)) : (i = t.startLineNumber, o = t.startColumn),
  11032. n.endLineNumber > t.endLineNumber ? (r = n.endLineNumber, s = n.endColumn) : n.endLineNumber === t.endLineNumber ? (r = n.endLineNumber, s = Math.max(n.endColumn, t.endColumn)) : (r = t.endLineNumber, s = t.endColumn), new e(i, o, r, s)
  11033. }, e.prototype.intersectRanges = function (t) {
  11034. return e.intersectRanges(this, t)
  11035. }, e.intersectRanges = function (t, n) {
  11036. var i = t.startLineNumber, o = t.startColumn, r = t.endLineNumber, s = t.endColumn,
  11037. a = n.startLineNumber, l = n.startColumn, u = n.endLineNumber, d = n.endColumn;
  11038. return i < a ? (i = a, o = l) : i === a && (o = Math.max(o, l)), r > u ? (r = u, s = d) : r === u && (s = Math.min(s, d)), i > r ? null : i === r && o > s ? null : new e(i, o, r, s)
  11039. }, e.prototype.equalsRange = function (t) {
  11040. return e.equalsRange(this, t)
  11041. }, e.equalsRange = function (e, t) {
  11042. return !!e && !!t && e.startLineNumber === t.startLineNumber && e.startColumn === t.startColumn && e.endLineNumber === t.endLineNumber && e.endColumn === t.endColumn
  11043. }, e.prototype.getEndPosition = function () {
  11044. return new n.Position(this.endLineNumber, this.endColumn)
  11045. }, e.prototype.getStartPosition = function () {
  11046. return new n.Position(this.startLineNumber, this.startColumn)
  11047. },
  11048. e.prototype.toString = function () {
  11049. return "[" + this.startLineNumber + "," + this.startColumn + " -> " + this.endLineNumber + "," + this.endColumn + "]"
  11050. }, e.prototype.setEndPosition = function (t, n) {
  11051. return new e(this.startLineNumber, this.startColumn, t, n)
  11052. }, e.prototype.setStartPosition = function (t, n) {
  11053. return new e(t, n, this.endLineNumber, this.endColumn)
  11054. }, e.prototype.collapseToStart = function () {
  11055. return e.collapseToStart(this)
  11056. }, e.collapseToStart = function (t) {
  11057. return new e(t.startLineNumber, t.startColumn, t.startLineNumber, t.startColumn)
  11058. }, e.fromPositions = function (t, n) {
  11059. return void 0 === n && (n = t), new e(t.lineNumber, t.column, n.lineNumber, n.column)
  11060. }, e.lift = function (t) {
  11061. return t ? new e(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : null
  11062. }, e.isIRange = function (e) {
  11063. return e && "number" == typeof e.startLineNumber && "number" == typeof e.startColumn && "number" == typeof e.endLineNumber && "number" == typeof e.endColumn
  11064. }, e.areIntersectingOrTouching = function (e, t) {
  11065. return !(e.endLineNumber < t.startLineNumber || e.endLineNumber === t.startLineNumber && e.endColumn < t.startColumn) && !(t.endLineNumber < e.startLineNumber || t.endLineNumber === e.startLineNumber && t.endColumn < e.startColumn)
  11066. }, e.areIntersecting = function (e, t) {
  11067. return !(e.endLineNumber < t.startLineNumber || e.endLineNumber === t.startLineNumber && e.endColumn <= t.startColumn) && !(t.endLineNumber < e.startLineNumber || t.endLineNumber === e.startLineNumber && t.endColumn <= e.startColumn)
  11068. }, e.compareRangesUsingStarts = function (e, t) {
  11069. if (e && t) {
  11070. var n = 0 | e.startLineNumber, i = 0 | t.startLineNumber;
  11071. if (n === i) {
  11072. var o = 0 | e.startColumn, r = 0 | t.startColumn;
  11073. if (o === r) {
  11074. var s = 0 | e.endLineNumber, a = 0 | t.endLineNumber;
  11075. return s === a ? (0 | e.endColumn) - (0 | t.endColumn) : s - a
  11076. }
  11077. return o - r
  11078. }
  11079. return n - i
  11080. }
  11081. return (e ? 1 : 0) - (t ? 1 : 0)
  11082. }, e.compareRangesUsingEnds = function (e, t) {
  11083. return e.endLineNumber === t.endLineNumber ? e.endColumn === t.endColumn ? e.startLineNumber === t.startLineNumber ? e.startColumn - t.startColumn : e.startLineNumber - t.startLineNumber : e.endColumn - t.endColumn : e.endLineNumber - t.endLineNumber
  11084. },
  11085. e.spansMultipleLines = function (e) {
  11086. return e.endLineNumber > e.startLineNumber
  11087. }, e
  11088. }();
  11089. t.Range = i
  11090. })), define(n[187], i([0, 1, 5, 13, 3]), (function (e, t, n, i, o) {
  11091. "use strict";
  11092. Object.defineProperty(t, "__esModule", {value: !0});
  11093. var r = function () {
  11094. function e(e, t, n, i, o) {
  11095. this.value = e, this.selectionStart = t, this.selectionEnd = n, this.selectionStartPosition = i, this.selectionEndPosition = o
  11096. }
  11097. return e.prototype.toString = function () {
  11098. return "[ <" + this.value + ">, selectionStart: " + this.selectionStart + ", selectionEnd: " + this.selectionEnd + "]"
  11099. }, e.readFromTextArea = function (t) {
  11100. return new e(t.getValue(), t.getSelectionStart(), t.getSelectionEnd(), null, null)
  11101. }, e.prototype.collapseSelection = function () {
  11102. return new e(this.value, this.value.length, this.value.length, null, null)
  11103. }, e.prototype.writeToTextArea = function (e, t, n) {
  11104. t.setValue(e, this.value), n && t.setSelectionRange(e, this.selectionStart, this.selectionEnd)
  11105. }, e.prototype.deduceEditorPosition = function (e) {
  11106. if (e <= this.selectionStart) {
  11107. var t = this.value.substring(e, this.selectionStart)
  11108. ;
  11109. return this._finishDeduceEditorPosition(this.selectionStartPosition, t, -1)
  11110. }
  11111. if (e >= this.selectionEnd) {
  11112. t = this.value.substring(this.selectionEnd, e);
  11113. return this._finishDeduceEditorPosition(this.selectionEndPosition, t, 1)
  11114. }
  11115. var n = this.value.substring(this.selectionStart, e);
  11116. if (-1 === n.indexOf(String.fromCharCode(8230))) return this._finishDeduceEditorPosition(this.selectionStartPosition, n, 1);
  11117. var i = this.value.substring(e, this.selectionEnd);
  11118. return this._finishDeduceEditorPosition(this.selectionEndPosition, i, -1)
  11119. }, e.prototype._finishDeduceEditorPosition = function (e, t, n) {
  11120. for (var i = 0, o = -1; -1 !== (o = t.indexOf("\n", o + 1));) i++;
  11121. return [e, n * t.length, i]
  11122. }, e.selectedText = function (t) {
  11123. return new e(t, 0, t.length, null, null)
  11124. }, e.deduceInput = function (e, t, i) {
  11125. if (!e) return {text: "", replaceCharCnt: 0};
  11126. var o = e.value, r = e.selectionStart, s = e.selectionEnd, a = t.value, l = t.selectionStart,
  11127. u = t.selectionEnd, d = o.substring(s), c = a.substring(u), h = n.commonSuffixLength(d, c);
  11128. a = a.substring(0, a.length - h)
  11129. ;var p = (o = o.substring(0, o.length - h)).substring(0, r), g = a.substring(0, l),
  11130. f = n.commonPrefixLength(p, g);
  11131. if (a = a.substring(f), o = o.substring(f), l -= f, r -= f, u -= f, s -= f, i && l === u && o.length > 0) {
  11132. var m = null;
  11133. if (l === a.length ? n.startsWith(a, o) && (m = a.substring(o.length)) : n.endsWith(a, o) && (m = a.substring(0, a.length - o.length)), null !== m && m.length > 0 && (/\uFE0F/.test(m) || n.containsEmoji(m))) return {
  11134. text: m,
  11135. replaceCharCnt: 0
  11136. }
  11137. }
  11138. return l === u ? o === a && 0 === r && s === o.length && l === a.length && -1 === a.indexOf("\n") && n.containsFullWidthCharacter(a) ? {
  11139. text: "",
  11140. replaceCharCnt: 0
  11141. } : {text: a, replaceCharCnt: p.length - f} : {text: a, replaceCharCnt: s - r}
  11142. }, e.EMPTY = new e("", 0, 0, null, null), e
  11143. }();
  11144. t.TextAreaState = r;
  11145. var s = function () {
  11146. function e() {
  11147. }
  11148. return e._getPageOfLine = function (e, t) {
  11149. return Math.floor((e - 1) / t)
  11150. }, e._getRangeForPage = function (e, t) {
  11151. var n = e * t, i = n + 1, r = n + t;
  11152. return new o.Range(i, 1, r + 1, 1)
  11153. }, e.fromEditorSelection = function (t, n, s, a, l) {
  11154. var u, d = e._getPageOfLine(s.startLineNumber, a), c = e._getRangeForPage(d, a),
  11155. h = e._getPageOfLine(s.endLineNumber, a), p = e._getRangeForPage(h, a),
  11156. g = c.intersectRanges(new o.Range(1, 1, s.startLineNumber, s.startColumn)),
  11157. f = n.getValueInRange(g, 1), m = n.getLineCount(), v = n.getLineMaxColumn(m),
  11158. _ = p.intersectRanges(new o.Range(s.endLineNumber, s.endColumn, m, v)), y = n.getValueInRange(_, 1);
  11159. if (d === h || d + 1 === h) u = n.getValueInRange(s, 1); else {
  11160. var C = c.intersectRanges(s), b = p.intersectRanges(s);
  11161. u = n.getValueInRange(C, 1) + String.fromCharCode(8230) + n.getValueInRange(b, 1)
  11162. }
  11163. if (l) {
  11164. f.length > 500 && (f = f.substring(f.length - 500, f.length)), y.length > 500 && (y = y.substring(0, 500)), u.length > 1e3 && (u = u.substring(0, 500) + String.fromCharCode(8230) + u.substring(u.length - 500, u.length))
  11165. }
  11166. return new r(f + u + y, f.length, f.length + u.length, new i.Position(s.startLineNumber, s.startColumn), new i.Position(s.endLineNumber, s.endColumn))
  11167. }, e
  11168. }();
  11169. t.PagedScreenReaderStrategy = s
  11170. })), define(n[188], i([0, 1, 124, 4, 2, 31, 3]), (function (e, t, n, i, o, s, a) {
  11171. "use strict";
  11172. Object.defineProperty(t, "__esModule", {
  11173. value: !0
  11174. });
  11175. var l = {followsCaret: !0, ignoreCharChanges: !0, alwaysRevealFirst: !0}, u = function (e) {
  11176. function t(t, n) {
  11177. void 0 === n && (n = {});
  11178. var o = e.call(this) || this;
  11179. return o._onDidUpdate = o._register(new i.Emitter), o._editor = t, o._options = s.mixin(n, l, !1), o.disposed = !1, o.nextIdx = -1, o.ranges = [], o.ignoreSelectionChange = !1, o.revealFirst = Boolean(o._options.alwaysRevealFirst), o._register(o._editor.onDidDispose((function () {
  11180. return o.dispose()
  11181. }))), o._register(o._editor.onDidUpdateDiff((function () {
  11182. return o._onDiffUpdated()
  11183. }))), o._options.followsCaret && o._register(o._editor.getModifiedEditor().onDidChangeCursorPosition((function (e) {
  11184. o.ignoreSelectionChange || (o.nextIdx = -1)
  11185. }))), o._options.alwaysRevealFirst && o._register(o._editor.getModifiedEditor().onDidChangeModel((function (e) {
  11186. o.revealFirst = !0
  11187. }))), o._init(), o
  11188. }
  11189. return r(t, e), t.prototype._init = function () {
  11190. this._editor.getLineChanges()
  11191. }, t.prototype._onDiffUpdated = function () {
  11192. this._init(), this._compute(this._editor.getLineChanges()),
  11193. this.revealFirst && null !== this._editor.getLineChanges() && (this.revealFirst = !1, this.nextIdx = -1, this.next(1))
  11194. }, t.prototype._compute = function (e) {
  11195. var t = this;
  11196. this.ranges = [], e && e.forEach((function (e) {
  11197. !t._options.ignoreCharChanges && e.charChanges ? e.charChanges.forEach((function (e) {
  11198. t.ranges.push({
  11199. rhs: !0,
  11200. range: new a.Range(e.modifiedStartLineNumber, e.modifiedStartColumn, e.modifiedEndLineNumber, e.modifiedEndColumn)
  11201. })
  11202. })) : t.ranges.push({
  11203. rhs: !0,
  11204. range: new a.Range(e.modifiedStartLineNumber, 1, e.modifiedStartLineNumber, 1)
  11205. })
  11206. })), this.ranges.sort((function (e, t) {
  11207. return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition()) ? -1 : t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition()) ? 1 : 0
  11208. })), this._onDidUpdate.fire(this)
  11209. }, t.prototype._initIdx = function (e) {
  11210. var t = !1, n = this._editor.getPosition();
  11211. if (n) {
  11212. for (var i = 0, o = this.ranges.length; i < o && !t; i++) {
  11213. var r = this.ranges[i].range;
  11214. n.isBeforeOrEqual(r.getStartPosition()) && (this.nextIdx = i + (e ? 0 : -1), t = !0)
  11215. }
  11216. t || (this.nextIdx = e ? 0 : this.ranges.length - 1),
  11217. this.nextIdx < 0 && (this.nextIdx = this.ranges.length - 1)
  11218. } else this.nextIdx = 0
  11219. }, t.prototype._move = function (e, t) {
  11220. if (n.ok(!this.disposed, "Illegal State - diff navigator has been disposed"), this.canNavigate()) {
  11221. -1 === this.nextIdx ? this._initIdx(e) : e ? (this.nextIdx += 1, this.nextIdx >= this.ranges.length && (this.nextIdx = 0)) : (this.nextIdx -= 1, this.nextIdx < 0 && (this.nextIdx = this.ranges.length - 1));
  11222. var i = this.ranges[this.nextIdx];
  11223. this.ignoreSelectionChange = !0;
  11224. try {
  11225. var o = i.range.getStartPosition();
  11226. this._editor.setPosition(o), this._editor.revealPositionInCenter(o, t)
  11227. } finally {
  11228. this.ignoreSelectionChange = !1
  11229. }
  11230. }
  11231. }, t.prototype.canNavigate = function () {
  11232. return this.ranges && this.ranges.length > 0
  11233. }, t.prototype.next = function (e) {
  11234. void 0 === e && (e = 0), this._move(!0, e)
  11235. }, t.prototype.previous = function (e) {
  11236. void 0 === e && (e = 0), this._move(!1, e)
  11237. }, t.prototype.dispose = function () {
  11238. e.prototype.dispose.call(this), this.ranges = [], this.disposed = !0
  11239. }, t
  11240. }(o.Disposable);
  11241. t.DiffNavigator = u
  11242. })), define(n[58], i([0, 1, 3]), (function (e, t, n) {
  11243. "use strict";
  11244. Object.defineProperty(t, "__esModule", {
  11245. value: !0
  11246. });
  11247. var i = function () {
  11248. function e() {
  11249. }
  11250. return e.insert = function (e, t) {
  11251. return {
  11252. range: new n.Range(e.lineNumber, e.column, e.lineNumber, e.column),
  11253. text: t,
  11254. forceMoveMarkers: !0
  11255. }
  11256. }, e.delete = function (e) {
  11257. return {range: e, text: null}
  11258. }, e.replace = function (e, t) {
  11259. return {range: e, text: t}
  11260. }, e.replaceMove = function (e, t) {
  11261. return {range: e, text: t, forceMoveMarkers: !0}
  11262. }, e
  11263. }();
  11264. t.EditOperation = i
  11265. })), define(n[338], i([0, 1, 5, 58, 3]), (function (e, t, n, i, o) {
  11266. "use strict";
  11267. Object.defineProperty(t, "__esModule", {value: !0});
  11268. var r = function () {
  11269. function e(e, t) {
  11270. this._selection = e, this._cursors = t, this._selectionId = null
  11271. }
  11272. return e.prototype.getEditOperations = function (e, t) {
  11273. for (var n = s(e, this._cursors), i = 0, o = n.length; i < o; i++) {
  11274. var r = n[i];
  11275. t.addEditOperation(r.range, r.text)
  11276. }
  11277. this._selectionId = t.trackSelection(this._selection)
  11278. }, e.prototype.computeCursorState = function (e, t) {
  11279. return t.getTrackedSelection(this._selectionId)
  11280. }, e
  11281. }();
  11282. function s(e, t) {
  11283. t.sort((function (e, t) {
  11284. return e.lineNumber === t.lineNumber ? e.column - t.column : e.lineNumber - t.lineNumber
  11285. }))
  11286. ;
  11287. for (var r = t.length - 2; r >= 0; r--) t[r].lineNumber === t[r + 1].lineNumber && t.splice(r, 1);
  11288. for (var s = [], a = 0, l = 0, u = t.length, d = 1, c = e.getLineCount(); d <= c; d++) {
  11289. var h = e.getLineContent(d), p = h.length + 1, g = 0;
  11290. if (!(l < u && t[l].lineNumber === d && (g = t[l].column, l++, g === p)) && 0 !== h.length) {
  11291. var f = n.lastNonWhitespaceIndex(h), m = 0;
  11292. if (-1 === f) m = 1; else {
  11293. if (f === h.length - 1) continue;
  11294. m = f + 2
  11295. }
  11296. m = Math.max(g, m), s[a++] = i.EditOperation.delete(new o.Range(d, m, d, p))
  11297. }
  11298. }
  11299. return s
  11300. }
  11301. t.TrimTrailingWhitespaceCommand = r, t.trimTrailingWhitespace = s
  11302. })), define(n[339], i([0, 1]), (function (e, t) {
  11303. "use strict";
  11304. Object.defineProperty(t, "__esModule", {value: !0});
  11305. var n = function () {
  11306. function e(t, n, i, o) {
  11307. this.r = e._clamp(t), this.g = e._clamp(n), this.b = e._clamp(i), this.a = e._clamp(o)
  11308. }
  11309. return e._clamp = function (e) {
  11310. return e < 0 ? 0 : e > 255 ? 255 : 0 | e
  11311. }, e.Empty = new e(0, 0, 0, 0), e
  11312. }();
  11313. t.RGBA8 = n
  11314. })), define(n[22], i([0, 1, 13, 3]), (function (e, t, n, i) {
  11315. "use strict";
  11316. Object.defineProperty(t, "__esModule", {value: !0});
  11317. var o = function (e) {
  11318. function t(t, n, i, o) {
  11319. var r = e.call(this, t, n, i, o) || this;
  11320. return r.selectionStartLineNumber = t,
  11321. r.selectionStartColumn = n, r.positionLineNumber = i, r.positionColumn = o, r
  11322. }
  11323. return r(t, e), t.prototype.toString = function () {
  11324. return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]"
  11325. }, t.prototype.equalsSelection = function (e) {
  11326. return t.selectionsEqual(this, e)
  11327. }, t.selectionsEqual = function (e, t) {
  11328. return e.selectionStartLineNumber === t.selectionStartLineNumber && e.selectionStartColumn === t.selectionStartColumn && e.positionLineNumber === t.positionLineNumber && e.positionColumn === t.positionColumn
  11329. }, t.prototype.getDirection = function () {
  11330. return this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn ? 0 : 1
  11331. }, t.prototype.setEndPosition = function (e, n) {
  11332. return 0 === this.getDirection() ? new t(this.startLineNumber, this.startColumn, e, n) : new t(e, n, this.startLineNumber, this.startColumn)
  11333. }, t.prototype.getPosition = function () {
  11334. return new n.Position(this.positionLineNumber, this.positionColumn)
  11335. }, t.prototype.setStartPosition = function (e, n) {
  11336. return 0 === this.getDirection() ? new t(e, n, this.endLineNumber, this.endColumn) : new t(this.endLineNumber, this.endColumn, e, n)
  11337. }, t.fromPositions = function (e, n) {
  11338. return void 0 === n && (n = e), new t(e.lineNumber, e.column, n.lineNumber, n.column)
  11339. }, t.liftSelection = function (e) {
  11340. return new t(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn)
  11341. }, t.selectionsArrEqual = function (e, t) {
  11342. if (e && !t || !e && t) return !1;
  11343. if (!e && !t) return !0;
  11344. if (e.length !== t.length) return !1;
  11345. for (var n = 0, i = e.length; n < i; n++) if (!this.selectionsEqual(e[n], t[n])) return !1;
  11346. return !0
  11347. }, t.isISelection = function (e) {
  11348. return e && "number" == typeof e.selectionStartLineNumber && "number" == typeof e.selectionStartColumn && "number" == typeof e.positionLineNumber && "number" == typeof e.positionColumn
  11349. }, t.createWithDirection = function (e, n, i, o, r) {
  11350. return 0 === r ? new t(e, n, i, o) : new t(i, o, e, n)
  11351. }, t
  11352. }(i.Range);
  11353. t.Selection = o
  11354. })), define(n[189], i([0, 1, 24, 6, 15, 4, 2, 16, 5, 187, 22, 88]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
  11355. "use strict";
  11356. Object.defineProperty(t, "__esModule", {value: !0}),
  11357. t.CopyOptions = {forceCopyWithSyntaxHighlighting: !1};
  11358. var p = function () {
  11359. function e() {
  11360. this._lastState = null
  11361. }
  11362. return e.prototype.set = function (e, t) {
  11363. this._lastState = {lastCopiedValue: e, data: t}
  11364. }, e.prototype.get = function (e) {
  11365. return this._lastState && this._lastState.lastCopiedValue === e ? this._lastState.data : (this._lastState = null, null)
  11366. }, e.INSTANCE = new e, e
  11367. }(), g = function (e) {
  11368. function t(t, r) {
  11369. var a = e.call(this) || this;
  11370. a.textArea = r, a._onFocus = a._register(new s.Emitter), a.onFocus = a._onFocus.event, a._onBlur = a._register(new s.Emitter), a.onBlur = a._onBlur.event, a._onKeyDown = a._register(new s.Emitter), a.onKeyDown = a._onKeyDown.event, a._onKeyUp = a._register(new s.Emitter), a.onKeyUp = a._onKeyUp.event, a._onCut = a._register(new s.Emitter), a.onCut = a._onCut.event, a._onPaste = a._register(new s.Emitter), a.onPaste = a._onPaste.event, a._onType = a._register(new s.Emitter), a.onType = a._onType.event, a._onCompositionStart = a._register(new s.Emitter), a.onCompositionStart = a._onCompositionStart.event, a._onCompositionUpdate = a._register(new s.Emitter),
  11371. a.onCompositionUpdate = a._onCompositionUpdate.event, a._onCompositionEnd = a._register(new s.Emitter), a.onCompositionEnd = a._onCompositionEnd.event, a._onSelectionChangeRequest = a._register(new s.Emitter), a.onSelectionChangeRequest = a._onSelectionChangeRequest.event, a._host = t, a._textArea = a._register(new m(r)), a._asyncTriggerCut = a._register(new o.RunOnceScheduler((function () {
  11372. return a._onCut.fire()
  11373. }), 0)), a._textAreaState = d.TextAreaState.EMPTY, a._selectionChangeListener = null, a.writeScreenReaderContent("ctor"), a._hasFocus = !1, a._isDoingComposition = !1, a._nextCommand = 0, a._register(i.addStandardDisposableListener(r.domNode, "keydown", (function (e) {
  11374. !a._isDoingComposition || 109 !== e.keyCode && 1 !== e.keyCode || e.stopPropagation(), e.equals(9) && e.preventDefault(), a._onKeyDown.fire(e)
  11375. }))), a._register(i.addStandardDisposableListener(r.domNode, "keyup", (function (e) {
  11376. a._onKeyUp.fire(e)
  11377. }))), a._register(i.addDisposableListener(r.domNode, "compositionstart", (function (e) {
  11378. a._isDoingComposition || (a._isDoingComposition = !0,
  11379. n.isEdgeOrIE || a._setAndWriteTextAreaState("compositionstart", d.TextAreaState.EMPTY), a._onCompositionStart.fire())
  11380. })));
  11381. var c = function (e) {
  11382. var t = a._textAreaState, n = d.TextAreaState.readFromTextArea(a._textArea);
  11383. return [n, d.TextAreaState.deduceInput(t, n, e)]
  11384. }, h = function (e) {
  11385. var t = a._textAreaState, n = d.TextAreaState.selectedText(e);
  11386. return [n, {text: n.value, replaceCharCnt: t.selectionEnd - t.selectionStart}]
  11387. }, p = function (e) {
  11388. return !(!n.isEdgeOrIE || "ja" !== e) || !(!n.isIE || 0 !== e.indexOf("zh-Han"))
  11389. };
  11390. return a._register(i.addDisposableListener(r.domNode, "compositionupdate", (function (e) {
  11391. if (p(e.locale)) {
  11392. var t = c(!1), n = t[0], i = t[1];
  11393. return a._textAreaState = n, a._onType.fire(i), void a._onCompositionUpdate.fire(e)
  11394. }
  11395. var o = h(e.data), r = o[0], s = o[1];
  11396. a._textAreaState = r, a._onType.fire(s), a._onCompositionUpdate.fire(e)
  11397. }))), a._register(i.addDisposableListener(r.domNode, "compositionend", (function (e) {
  11398. if (a._isDoingComposition) {
  11399. if (p(e.locale)) {
  11400. var t = c(!1), i = t[0], o = t[1];
  11401. a._textAreaState = i, a._onType.fire(o)
  11402. } else {
  11403. var r = h(e.data);
  11404. i = r[0], o = r[1]
  11405. ;a._textAreaState = i, a._onType.fire(o)
  11406. }
  11407. (n.isEdgeOrIE || n.isChrome) && (a._textAreaState = d.TextAreaState.readFromTextArea(a._textArea)), a._isDoingComposition && (a._isDoingComposition = !1, a._onCompositionEnd.fire())
  11408. }
  11409. }))), a._register(i.addDisposableListener(r.domNode, "input", (function () {
  11410. if (a._textArea.setIgnoreSelectionChangeTime("received input event"), !a._isDoingComposition) {
  11411. var e = c(l.isMacintosh), t = e[0], n = e[1];
  11412. 0 === n.replaceCharCnt && 1 === n.text.length && u.isHighSurrogate(n.text.charCodeAt(0)) || (a._textAreaState = t, 0 === a._nextCommand ? "" !== n.text && a._onType.fire(n) : ("" === n.text && 0 === n.replaceCharCnt || a._firePaste(n.text, null), a._nextCommand = 0))
  11413. }
  11414. }))), a._register(i.addDisposableListener(r.domNode, "cut", (function (e) {
  11415. a._textArea.setIgnoreSelectionChangeTime("received cut event"), a._ensureClipboardGetsEditorSelection(e), a._asyncTriggerCut.schedule()
  11416. }))), a._register(i.addDisposableListener(r.domNode, "copy", (function (e) {
  11417. a._ensureClipboardGetsEditorSelection(e)
  11418. }))),
  11419. a._register(i.addDisposableListener(r.domNode, "paste", (function (e) {
  11420. if (a._textArea.setIgnoreSelectionChangeTime("received paste event"), f.canUseTextData(e)) {
  11421. var t = f.getTextData(e), n = t[0], i = t[1];
  11422. "" !== n && a._firePaste(n, i)
  11423. } else a._textArea.getSelectionStart() !== a._textArea.getSelectionEnd() && a._setAndWriteTextAreaState("paste", d.TextAreaState.EMPTY), a._nextCommand = 1
  11424. }))), a._register(i.addDisposableListener(r.domNode, "focus", (function () {
  11425. a._setHasFocus(!0)
  11426. }))), a._register(i.addDisposableListener(r.domNode, "blur", (function () {
  11427. a._setHasFocus(!1)
  11428. }))), a
  11429. }
  11430. return r(t, e), t.prototype._installSelectionChangeListener = function () {
  11431. var e = this, t = 0;
  11432. return i.addDisposableListener(document, "selectionchange", (function (i) {
  11433. if (e._hasFocus && !e._isDoingComposition && n.isChrome && l.isWindows) {
  11434. var o = Date.now(), r = o - t;
  11435. if (t = o, !(r < 5)) {
  11436. var s = o - e._textArea.getIgnoreSelectionChangeTime();
  11437. if (e._textArea.resetSelectionChangeTime(), !(s < 100) && e._textAreaState.selectionStartPosition && e._textAreaState.selectionEndPosition) {
  11438. var a = e._textArea.getValue()
  11439. ;
  11440. if (e._textAreaState.value === a) {
  11441. var u = e._textArea.getSelectionStart(), d = e._textArea.getSelectionEnd();
  11442. if (e._textAreaState.selectionStart !== u || e._textAreaState.selectionEnd !== d) {
  11443. var h = e._textAreaState.deduceEditorPosition(u),
  11444. p = e._host.deduceModelPosition(h[0], h[1], h[2]),
  11445. g = e._textAreaState.deduceEditorPosition(d),
  11446. f = e._host.deduceModelPosition(g[0], g[1], g[2]),
  11447. m = new c.Selection(p.lineNumber, p.column, f.lineNumber, f.column);
  11448. e._onSelectionChangeRequest.fire(m)
  11449. }
  11450. }
  11451. }
  11452. }
  11453. }
  11454. }))
  11455. }, t.prototype.dispose = function () {
  11456. e.prototype.dispose.call(this), this._selectionChangeListener && (this._selectionChangeListener.dispose(), this._selectionChangeListener = null)
  11457. }, t.prototype.focusTextArea = function () {
  11458. this._setHasFocus(!0), this.refreshFocusState()
  11459. }, t.prototype.isFocused = function () {
  11460. return this._hasFocus
  11461. }, t.prototype.refreshFocusState = function () {
  11462. var e = i.getShadowRoot(this.textArea.domNode)
  11463. ;e ? this._setHasFocus(e.activeElement === this.textArea.domNode) : i.isInDOM(this.textArea.domNode) ? this._setHasFocus(document.activeElement === this.textArea.domNode) : this._setHasFocus(!1)
  11464. }, t.prototype._setHasFocus = function (e) {
  11465. this._hasFocus !== e && (this._hasFocus = e, this._selectionChangeListener && (this._selectionChangeListener.dispose(), this._selectionChangeListener = null), this._hasFocus && (this._selectionChangeListener = this._installSelectionChangeListener()), this._hasFocus && (n.isEdge ? this._setAndWriteTextAreaState("focusgain", d.TextAreaState.EMPTY) : this.writeScreenReaderContent("focusgain")), this._hasFocus ? this._onFocus.fire() : this._onBlur.fire())
  11466. }, t.prototype._setAndWriteTextAreaState = function (e, t) {
  11467. this._hasFocus || (t = t.collapseSelection()), t.writeToTextArea(e, this._textArea, this._hasFocus), this._textAreaState = t
  11468. }, t.prototype.writeScreenReaderContent = function (e) {
  11469. this._isDoingComposition || this._setAndWriteTextAreaState(e, this._host.getScreenReaderContent(this._textAreaState))
  11470. },
  11471. t.prototype._ensureClipboardGetsEditorSelection = function (e) {
  11472. var t = this._host.getDataToCopy(f.canUseTextData(e) && h.BrowserFeatures.clipboard.richText), i = {
  11473. version: 1,
  11474. isFromEmptySelection: t.isFromEmptySelection,
  11475. multicursorText: t.multicursorText,
  11476. mode: t.mode
  11477. };
  11478. p.INSTANCE.set(n.isFirefox ? t.text.replace(/\r\n/g, "\n") : t.text, i), f.canUseTextData(e) ? f.setTextData(e, t.text, t.html, i) : this._setAndWriteTextAreaState("copy or cut", d.TextAreaState.selectedText(t.text))
  11479. }, t.prototype._firePaste = function (e, t) {
  11480. t || (t = p.INSTANCE.get(e)), this._onPaste.fire({text: e, metadata: t})
  11481. }, t
  11482. }(a.Disposable);
  11483. t.TextAreaInput = g;
  11484. var f = function () {
  11485. function e() {
  11486. }
  11487. return e.canUseTextData = function (e) {
  11488. return !!e.clipboardData || !!window.clipboardData
  11489. }, e.getTextData = function (e) {
  11490. if (e.clipboardData) {
  11491. e.preventDefault();
  11492. var t = e.clipboardData.getData("text/plain"), n = null,
  11493. i = e.clipboardData.getData("vscode-editor-data");
  11494. if ("string" == typeof i) try {
  11495. 1 !== (n = JSON.parse(i)).version && (n = null)
  11496. } catch (e) {
  11497. }
  11498. return [t, n]
  11499. }
  11500. if (window.clipboardData) return e.preventDefault(),
  11501. [t = window.clipboardData.getData("Text"), null];
  11502. throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")
  11503. }, e.setTextData = function (e, t, n, i) {
  11504. if (e.clipboardData) return e.clipboardData.setData("text/plain", t), "string" == typeof n && e.clipboardData.setData("text/html", n), e.clipboardData.setData("vscode-editor-data", JSON.stringify(i)), void e.preventDefault();
  11505. if (window.clipboardData) return window.clipboardData.setData("Text", t), void e.preventDefault();
  11506. throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")
  11507. }, e
  11508. }(), m = function (e) {
  11509. function t(t) {
  11510. var n = e.call(this) || this;
  11511. return n._actual = t, n._ignoreSelectionChangeTime = 0, n
  11512. }
  11513. return r(t, e), t.prototype.setIgnoreSelectionChangeTime = function (e) {
  11514. this._ignoreSelectionChangeTime = Date.now()
  11515. }, t.prototype.getIgnoreSelectionChangeTime = function () {
  11516. return this._ignoreSelectionChangeTime
  11517. }, t.prototype.resetSelectionChangeTime = function () {
  11518. this._ignoreSelectionChangeTime = 0
  11519. }, t.prototype.getValue = function () {
  11520. return this._actual.domNode.value
  11521. },
  11522. t.prototype.setValue = function (e, t) {
  11523. var n = this._actual.domNode;
  11524. n.value !== t && (this.setIgnoreSelectionChangeTime("setValue"), n.value = t)
  11525. }, t.prototype.getSelectionStart = function () {
  11526. return this._actual.domNode.selectionStart
  11527. }, t.prototype.getSelectionEnd = function () {
  11528. return this._actual.domNode.selectionEnd
  11529. }, t.prototype.setSelectionRange = function (e, t, o) {
  11530. var r = this._actual.domNode, s = i.getShadowRoot(r),
  11531. a = (s ? s.activeElement : document.activeElement) === r, l = r.selectionStart, u = r.selectionEnd;
  11532. if (a && l === t && u === o) n.isFirefox && window.parent !== window && r.focus(); else {
  11533. if (a) return this.setIgnoreSelectionChangeTime("setSelectionRange"), r.setSelectionRange(t, o), void (n.isFirefox && window.parent !== window && r.focus());
  11534. try {
  11535. var d = i.saveParentsScrollTop(r);
  11536. this.setIgnoreSelectionChangeTime("setSelectionRange"), r.focus(), r.setSelectionRange(t, o), i.restoreParentsScrollTop(r, d)
  11537. } catch (e) {
  11538. }
  11539. }
  11540. }, t
  11541. }(a.Disposable)
  11542. })), define(n[80], i([0, 1, 22]), (function (e, t, n) {
  11543. "use strict";
  11544. Object.defineProperty(t, "__esModule", {value: !0});
  11545. var i = function () {
  11546. function e(e, t, n) {
  11547. void 0 === n && (n = !1), this._range = e, this._text = t, this.insertsAutoWhitespace = n
  11548. }
  11549. return e.prototype.getEditOperations = function (e, t) {
  11550. t.addTrackedEditOperation(this._range, this._text)
  11551. }, e.prototype.computeCursorState = function (e, t) {
  11552. var i = t.getInverseEditOperations()[0].range;
  11553. return new n.Selection(i.endLineNumber, i.endColumn, i.endLineNumber, i.endColumn)
  11554. }, e
  11555. }();
  11556. t.ReplaceCommand = i;
  11557. var o = function () {
  11558. function e(e, t) {
  11559. this._range = e, this._text = t
  11560. }
  11561. return e.prototype.getEditOperations = function (e, t) {
  11562. t.addTrackedEditOperation(this._range, this._text)
  11563. }, e.prototype.computeCursorState = function (e, t) {
  11564. var i = t.getInverseEditOperations()[0].range;
  11565. return new n.Selection(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn)
  11566. }, e
  11567. }();
  11568. t.ReplaceCommandThatSelectsText = o;
  11569. var r = function () {
  11570. function e(e, t, n) {
  11571. void 0 === n && (n = !1), this._range = e, this._text = t, this.insertsAutoWhitespace = n
  11572. }
  11573. return e.prototype.getEditOperations = function (e, t) {
  11574. t.addTrackedEditOperation(this._range, this._text)
  11575. }, e.prototype.computeCursorState = function (e, t) {
  11576. var i = t.getInverseEditOperations()[0].range;
  11577. return new n.Selection(i.startLineNumber, i.startColumn, i.startLineNumber, i.startColumn)
  11578. }, e
  11579. }();
  11580. t.ReplaceCommandWithoutChangingPosition = r;
  11581. var s = function () {
  11582. function e(e, t, n, i, o) {
  11583. void 0 === o && (o = !1), this._range = e, this._text = t, this._columnDeltaOffset = i, this._lineNumberDeltaOffset = n, this.insertsAutoWhitespace = o
  11584. }
  11585. return e.prototype.getEditOperations = function (e, t) {
  11586. t.addTrackedEditOperation(this._range, this._text)
  11587. }, e.prototype.computeCursorState = function (e, t) {
  11588. var i = t.getInverseEditOperations()[0].range;
  11589. return new n.Selection(i.endLineNumber + this._lineNumberDeltaOffset, i.endColumn + this._columnDeltaOffset, i.endLineNumber + this._lineNumberDeltaOffset, i.endColumn + this._columnDeltaOffset)
  11590. }, e
  11591. }();
  11592. t.ReplaceCommandWithOffsetCursorState = s;
  11593. var a = function () {
  11594. function e(e, t, n, i) {
  11595. void 0 === i && (i = !1), this._range = e, this._text = t, this._initialSelection = n, this._forceMoveMarkers = i, this._selectionId = null
  11596. }
  11597. return e.prototype.getEditOperations = function (e, t) {
  11598. t.addTrackedEditOperation(this._range, this._text, this._forceMoveMarkers), this._selectionId = t.trackSelection(this._initialSelection)
  11599. }, e.prototype.computeCursorState = function (e, t) {
  11600. return t.getTrackedSelection(this._selectionId)
  11601. }, e
  11602. }();
  11603. t.ReplaceCommandThatPreservesSelection = a
  11604. })), define(n[340], i([0, 1, 3, 22]), (function (e, t, n, i) {
  11605. "use strict";
  11606. Object.defineProperty(t, "__esModule", {value: !0});
  11607. var o = function () {
  11608. function e(e, t, n) {
  11609. this._range = e, this._charBeforeSelection = t, this._charAfterSelection = n
  11610. }
  11611. return e.prototype.getEditOperations = function (e, t) {
  11612. t.addTrackedEditOperation(new n.Range(this._range.startLineNumber, this._range.startColumn, this._range.startLineNumber, this._range.startColumn), this._charBeforeSelection), t.addTrackedEditOperation(new n.Range(this._range.endLineNumber, this._range.endColumn, this._range.endLineNumber, this._range.endColumn), this._charAfterSelection)
  11613. }, e.prototype.computeCursorState = function (e, t) {
  11614. var n = t.getInverseEditOperations(), o = n[0].range, r = n[1].range
  11615. ;
  11616. return new i.Selection(o.endLineNumber, o.endColumn, r.endLineNumber, r.endColumn - this._charAfterSelection.length)
  11617. }, e
  11618. }();
  11619. t.SurroundSelectionCommand = o
  11620. })), define(n[106], i([0, 1, 5]), (function (e, t, n) {
  11621. "use strict";
  11622. Object.defineProperty(t, "__esModule", {value: !0}), "undefined" != typeof TextDecoder ? t.createStringBuilder = function (e) {
  11623. return new i(e)
  11624. } : t.createStringBuilder = function (e) {
  11625. return new o
  11626. };
  11627. var i = function () {
  11628. function e(e) {
  11629. this._decoder = new TextDecoder("UTF-16LE"), this._capacity = 0 | e, this._buffer = new Uint16Array(this._capacity), this._completedStrings = null, this._bufferLength = 0
  11630. }
  11631. return e.prototype.reset = function () {
  11632. this._completedStrings = null, this._bufferLength = 0
  11633. }, e.prototype.build = function () {
  11634. return null !== this._completedStrings ? (this._flushBuffer(), this._completedStrings.join("")) : this._buildBuffer()
  11635. }, e.prototype._buildBuffer = function () {
  11636. if (0 === this._bufferLength) return "";
  11637. var e = new Uint16Array(this._buffer.buffer, 0, this._bufferLength);
  11638. return this._decoder.decode(e)
  11639. }, e.prototype._flushBuffer = function () {
  11640. var e = this._buildBuffer();
  11641. this._bufferLength = 0, null === this._completedStrings ? this._completedStrings = [e] : this._completedStrings[this._completedStrings.length] = e
  11642. }, e.prototype.write1 = function (e) {
  11643. var t = this._capacity - this._bufferLength;
  11644. t <= 1 && (0 === t || n.isHighSurrogate(e)) && this._flushBuffer(), this._buffer[this._bufferLength++] = e
  11645. }, e.prototype.appendASCII = function (e) {
  11646. this._bufferLength === this._capacity && this._flushBuffer(), this._buffer[this._bufferLength++] = e
  11647. }, e.prototype.appendASCIIString = function (e) {
  11648. var t = e.length;
  11649. if (this._bufferLength + t >= this._capacity) return this._flushBuffer(), void (this._completedStrings[this._completedStrings.length] = e);
  11650. for (var n = 0; n < t; n++) this._buffer[this._bufferLength++] = e.charCodeAt(n)
  11651. }, e
  11652. }(), o = function () {
  11653. function e() {
  11654. this._pieces = [], this._piecesLen = 0
  11655. }
  11656. return e.prototype.reset = function () {
  11657. this._pieces = [], this._piecesLen = 0
  11658. }, e.prototype.build = function () {
  11659. return this._pieces.join("")
  11660. }, e.prototype.write1 = function (e) {
  11661. this._pieces[this._piecesLen++] = String.fromCharCode(e)
  11662. },
  11663. e.prototype.appendASCII = function (e) {
  11664. this._pieces[this._piecesLen++] = String.fromCharCode(e)
  11665. }, e.prototype.appendASCIIString = function (e) {
  11666. this._pieces[this._piecesLen++] = e
  11667. }, e
  11668. }()
  11669. })), define(n[143], i([0, 1, 28, 106]), (function (e, t, n, i) {
  11670. "use strict";
  11671. Object.defineProperty(t, "__esModule", {value: !0});
  11672. var o = function () {
  11673. function e(e) {
  11674. this._createLine = e, this._set(1, [])
  11675. }
  11676. return e.prototype.flush = function () {
  11677. this._set(1, [])
  11678. }, e.prototype._set = function (e, t) {
  11679. this._lines = t, this._rendLineNumberStart = e
  11680. }, e.prototype._get = function () {
  11681. return {rendLineNumberStart: this._rendLineNumberStart, lines: this._lines}
  11682. }, e.prototype.getStartLineNumber = function () {
  11683. return this._rendLineNumberStart
  11684. }, e.prototype.getEndLineNumber = function () {
  11685. return this._rendLineNumberStart + this._lines.length - 1
  11686. }, e.prototype.getCount = function () {
  11687. return this._lines.length
  11688. }, e.prototype.getLine = function (e) {
  11689. var t = e - this._rendLineNumberStart;
  11690. if (t < 0 || t >= this._lines.length) throw new Error("Illegal value for lineNumber");
  11691. return this._lines[t]
  11692. }, e.prototype.onLinesDeleted = function (e, t) {
  11693. if (0 === this.getCount()) return null;
  11694. var n = this.getStartLineNumber(), i = this.getEndLineNumber();
  11695. if (t < n) {
  11696. var o = t - e + 1;
  11697. return this._rendLineNumberStart -= o, null
  11698. }
  11699. if (e > i) return null;
  11700. for (var r = 0, s = 0, a = n; a <= i; a++) {
  11701. var l = a - this._rendLineNumberStart;
  11702. e <= a && a <= t && (0 === s ? (r = l, s = 1) : s++)
  11703. }
  11704. if (e < n) {
  11705. var u = 0;
  11706. u = t < n ? t - e + 1 : n - e, this._rendLineNumberStart -= u
  11707. }
  11708. return this._lines.splice(r, s)
  11709. }, e.prototype.onLinesChanged = function (e, t) {
  11710. if (0 === this.getCount()) return !1;
  11711. for (var n = this.getStartLineNumber(), i = this.getEndLineNumber(), o = !1, r = e; r <= t; r++) r >= n && r <= i && (this._lines[r - this._rendLineNumberStart].onContentChanged(), o = !0);
  11712. return o
  11713. }, e.prototype.onLinesInserted = function (e, t) {
  11714. if (0 === this.getCount()) return null;
  11715. var n = t - e + 1, i = this.getStartLineNumber(), o = this.getEndLineNumber();
  11716. if (e <= i) return this._rendLineNumberStart += n, null;
  11717. if (e > o) return null;
  11718. if (n + e > o) return this._lines.splice(e - this._rendLineNumberStart, o - e + 1);
  11719. for (var r = [], s = 0; s < n; s++) r[s] = this._createLine()
  11720. ;
  11721. var a = e - this._rendLineNumberStart, l = this._lines.slice(0, a),
  11722. u = this._lines.slice(a, this._lines.length - n),
  11723. d = this._lines.slice(this._lines.length - n, this._lines.length);
  11724. return this._lines = l.concat(r).concat(u), d
  11725. }, e.prototype.onTokensChanged = function (e) {
  11726. if (0 === this.getCount()) return !1;
  11727. for (var t = this.getStartLineNumber(), n = this.getEndLineNumber(), i = !1, o = 0, r = e.length; o < r; o++) {
  11728. var s = e[o];
  11729. if (!(s.toLineNumber < t || s.fromLineNumber > n)) for (var a = Math.max(t, s.fromLineNumber), l = Math.min(n, s.toLineNumber), u = a; u <= l; u++) {
  11730. var d = u - this._rendLineNumberStart;
  11731. this._lines[d].onTokensChanged(), i = !0
  11732. }
  11733. }
  11734. return i
  11735. }, e
  11736. }();
  11737. t.RenderedLinesCollection = o;
  11738. var r = function () {
  11739. function e(e) {
  11740. var t = this;
  11741. this._host = e, this.domNode = this._createDomNode(), this._linesCollection = new o((function () {
  11742. return t._host.createVisibleLine()
  11743. }))
  11744. }
  11745. return e.prototype._createDomNode = function () {
  11746. var e = n.createFastDomNode(document.createElement("div"));
  11747. return e.setClassName("view-layer"), e.setPosition("absolute"), e.domNode.setAttribute("role", "presentation"),
  11748. e.domNode.setAttribute("aria-hidden", "true"), e
  11749. }, e.prototype.onConfigurationChanged = function (e) {
  11750. return !!e.hasChanged(107)
  11751. }, e.prototype.onFlushed = function (e) {
  11752. return this._linesCollection.flush(), !0
  11753. }, e.prototype.onLinesChanged = function (e) {
  11754. return this._linesCollection.onLinesChanged(e.fromLineNumber, e.toLineNumber)
  11755. }, e.prototype.onLinesDeleted = function (e) {
  11756. var t = this._linesCollection.onLinesDeleted(e.fromLineNumber, e.toLineNumber);
  11757. if (t) for (var n = 0, i = t.length; n < i; n++) {
  11758. var o = t[n].getDomNode();
  11759. o && this.domNode.domNode.removeChild(o)
  11760. }
  11761. return !0
  11762. }, e.prototype.onLinesInserted = function (e) {
  11763. var t = this._linesCollection.onLinesInserted(e.fromLineNumber, e.toLineNumber);
  11764. if (t) for (var n = 0, i = t.length; n < i; n++) {
  11765. var o = t[n].getDomNode();
  11766. o && this.domNode.domNode.removeChild(o)
  11767. }
  11768. return !0
  11769. }, e.prototype.onScrollChanged = function (e) {
  11770. return e.scrollTopChanged
  11771. }, e.prototype.onTokensChanged = function (e) {
  11772. return this._linesCollection.onTokensChanged(e.ranges)
  11773. }, e.prototype.onZonesChanged = function (e) {
  11774. return !0
  11775. }, e.prototype.getStartLineNumber = function () {
  11776. return this._linesCollection.getStartLineNumber()
  11777. }, e.prototype.getEndLineNumber = function () {
  11778. return this._linesCollection.getEndLineNumber()
  11779. }, e.prototype.getVisibleLine = function (e) {
  11780. return this._linesCollection.getLine(e)
  11781. }, e.prototype.renderLines = function (e) {
  11782. var t = this._linesCollection._get(), n = new s(this.domNode.domNode, this._host, e),
  11783. i = {rendLineNumberStart: t.rendLineNumberStart, lines: t.lines, linesLength: t.lines.length},
  11784. o = n.render(i, e.startLineNumber, e.endLineNumber, e.relativeVerticalOffset);
  11785. this._linesCollection._set(o.rendLineNumberStart, o.lines)
  11786. }, e
  11787. }();
  11788. t.VisibleLinesCollection = r;
  11789. var s = function () {
  11790. function e(e, t, n) {
  11791. this.domNode = e, this.host = t, this.viewportData = n
  11792. }
  11793. return e.prototype.render = function (e, t, n, i) {
  11794. var o = {
  11795. rendLineNumberStart: e.rendLineNumberStart,
  11796. lines: e.lines.slice(0),
  11797. linesLength: e.linesLength
  11798. };
  11799. if (o.rendLineNumberStart + o.linesLength - 1 < t || n < o.rendLineNumberStart) {
  11800. o.rendLineNumberStart = t, o.linesLength = n - t + 1, o.lines = [];
  11801. for (var r = t; r <= n; r++) o.lines[r - t] = this.host.createVisibleLine()
  11802. ;
  11803. return this._finishRendering(o, !0, i), o
  11804. }
  11805. if (this._renderUntouchedLines(o, Math.max(t - o.rendLineNumberStart, 0), Math.min(n - o.rendLineNumberStart, o.linesLength - 1), i, t), o.rendLineNumberStart > t) (l = t) <= (s = Math.min(n, o.rendLineNumberStart - 1)) && (this._insertLinesBefore(o, l, s, i, t), o.linesLength += s - l + 1); else if (o.rendLineNumberStart < t) {
  11806. (a = Math.min(o.linesLength, t - o.rendLineNumberStart)) > 0 && (this._removeLinesBefore(o, a), o.linesLength -= a)
  11807. }
  11808. if (o.rendLineNumberStart = t, o.rendLineNumberStart + o.linesLength - 1 < n) (l = o.rendLineNumberStart + o.linesLength) <= (s = n) && (this._insertLinesAfter(o, l, s, i, t), o.linesLength += s - l + 1); else if (o.rendLineNumberStart + o.linesLength - 1 > n) {
  11809. var s, a, l = Math.max(0, n - o.rendLineNumberStart + 1);
  11810. (a = (s = o.linesLength - 1) - l + 1) > 0 && (this._removeLinesAfter(o, a), o.linesLength -= a)
  11811. }
  11812. return this._finishRendering(o, !1, i), o
  11813. }, e.prototype._renderUntouchedLines = function (e, t, n, i, o) {
  11814. for (var r = e.rendLineNumberStart, s = e.lines, a = t; a <= n; a++) {
  11815. var l = r + a;
  11816. s[a].layoutLine(l, i[l - o])
  11817. }
  11818. }, e.prototype._insertLinesBefore = function (e, t, n, i, o) {
  11819. for (var r = [], s = 0, a = t; a <= n; a++) r[s++] = this.host.createVisibleLine();
  11820. e.lines = r.concat(e.lines)
  11821. }, e.prototype._removeLinesBefore = function (e, t) {
  11822. for (var n = 0; n < t; n++) {
  11823. var i = e.lines[n].getDomNode();
  11824. i && this.domNode.removeChild(i)
  11825. }
  11826. e.lines.splice(0, t)
  11827. }, e.prototype._insertLinesAfter = function (e, t, n, i, o) {
  11828. for (var r = [], s = 0, a = t; a <= n; a++) r[s++] = this.host.createVisibleLine();
  11829. e.lines = e.lines.concat(r)
  11830. }, e.prototype._removeLinesAfter = function (e, t) {
  11831. for (var n = e.linesLength - t, i = 0; i < t; i++) {
  11832. var o = e.lines[n + i].getDomNode();
  11833. o && this.domNode.removeChild(o)
  11834. }
  11835. e.lines.splice(n, t)
  11836. }, e.prototype._finishRenderingNewLines = function (e, t, n, i) {
  11837. var o = this.domNode.lastChild;
  11838. t || !o ? this.domNode.innerHTML = n : o.insertAdjacentHTML("afterend", n);
  11839. for (var r = this.domNode.lastChild, s = e.linesLength - 1; s >= 0; s--) {
  11840. var a = e.lines[s];
  11841. i[s] && (a.setDomNode(r), r = r.previousSibling)
  11842. }
  11843. }, e.prototype._finishRenderingInvalidLines = function (e, t, n) {
  11844. var i = document.createElement("div");
  11845. i.innerHTML = t;
  11846. for (var o = 0; o < e.linesLength; o++) {
  11847. var r = e.lines[o];
  11848. if (n[o]) {
  11849. var s = i.firstChild, a = r.getDomNode();
  11850. a.parentNode.replaceChild(s, a), r.setDomNode(s)
  11851. }
  11852. }
  11853. }, e.prototype._finishRendering = function (t, n, i) {
  11854. var o = e._sb, r = t.linesLength, s = t.lines, a = t.rendLineNumberStart, l = [];
  11855. o.reset();
  11856. for (var u = !1, d = 0; d < r; d++) {
  11857. var c = s[d];
  11858. if (l[d] = !1, !c.getDomNode()) c.renderLine(d + a, i[d], this.viewportData, o) && (l[d] = !0, u = !0)
  11859. }
  11860. u && this._finishRenderingNewLines(t, n, o.build(), l), o.reset();
  11861. var h = !1, p = [];
  11862. for (d = 0; d < r; d++) {
  11863. c = s[d];
  11864. if (p[d] = !1, !l[d]) c.renderLine(d + a, i[d], this.viewportData, o) && (p[d] = !0, h = !0)
  11865. }
  11866. h && this._finishRenderingInvalidLines(t, o.build(), p)
  11867. }, e._sb = i.createStringBuilder(1e5), e
  11868. }()
  11869. })), define(n[107], i([0, 1]), (function (e, t) {
  11870. "use strict";
  11871. Object.defineProperty(t, "__esModule", {value: !0});
  11872. var n = function () {
  11873. function e(e, t, n) {
  11874. this.offset = 0 | e, this.type = t, this.language = n
  11875. }
  11876. return e.prototype.toString = function () {
  11877. return "(" + this.offset + ", " + this.type + ")"
  11878. }, e
  11879. }();
  11880. t.Token = n;
  11881. var i = function (e, t) {
  11882. this.tokens = e, this.endState = t
  11883. };
  11884. t.TokenizationResult = i;
  11885. var o = function (e, t) {
  11886. this.tokens = e, this.endState = t
  11887. };
  11888. t.TokenizationResult2 = o
  11889. })), define(n[341], i([0, 1, 126, 5]), (function (e, t, n, i) {
  11890. "use strict";
  11891. Object.defineProperty(t, "__esModule", {value: !0});
  11892. var o = 3;
  11893. function r(e, t, i, o) {
  11894. return new n.LcsDiff(e, t, i).ComputeDiff(o)
  11895. }
  11896. var s = function () {
  11897. function e(e) {
  11898. for (var t = [], n = [], i = 0, o = e.length; i < o; i++) t[i] = c(e[i], 1), n[i] = h(e[i], 1);
  11899. this.lines = e, this._startColumns = t, this._endColumns = n
  11900. }
  11901. return e.prototype.getElements = function () {
  11902. for (var e = [], t = 0, n = this.lines.length; t < n; t++) e[t] = this.lines[t].substring(this._startColumns[t] - 1, this._endColumns[t] - 1);
  11903. return e
  11904. }, e.prototype.getStartLineNumber = function (e) {
  11905. return e + 1
  11906. }, e.prototype.getEndLineNumber = function (e) {
  11907. return e + 1
  11908. }, e.prototype.createCharSequence = function (e, t, n) {
  11909. for (var i = [], o = [], r = [], s = 0, l = t; l <= n; l++) for (var u = this.lines[l], d = e ? this._startColumns[l] : 1, c = e ? this._endColumns[l] : u.length + 1, h = d; h < c; h++) i[s] = u.charCodeAt(h - 1), o[s] = l + 1, r[s] = h, s++;
  11910. return new a(i, o, r)
  11911. }, e
  11912. }(), a = function () {
  11913. function e(e, t, n) {
  11914. this._charCodes = e, this._lineNumbers = t, this._columns = n
  11915. }
  11916. return e.prototype.getElements = function () {
  11917. return this._charCodes
  11918. }, e.prototype.getStartLineNumber = function (e) {
  11919. return this._lineNumbers[e]
  11920. }, e.prototype.getStartColumn = function (e) {
  11921. return this._columns[e]
  11922. }, e.prototype.getEndLineNumber = function (e) {
  11923. return this._lineNumbers[e]
  11924. }, e.prototype.getEndColumn = function (e) {
  11925. return this._columns[e] + 1
  11926. }, e
  11927. }(), l = function () {
  11928. function e(e, t, n, i, o, r, s, a) {
  11929. this.originalStartLineNumber = e, this.originalStartColumn = t, this.originalEndLineNumber = n, this.originalEndColumn = i, this.modifiedStartLineNumber = o, this.modifiedStartColumn = r, this.modifiedEndLineNumber = s, this.modifiedEndColumn = a
  11930. }
  11931. return e.createFromDiffChange = function (t, n, i) {
  11932. var o, r, s, a, l, u, d, c;
  11933. return 0 === t.originalLength ? (o = 0, r = 0, s = 0, a = 0) : (o = n.getStartLineNumber(t.originalStart), r = n.getStartColumn(t.originalStart), s = n.getEndLineNumber(t.originalStart + t.originalLength - 1), a = n.getEndColumn(t.originalStart + t.originalLength - 1)), 0 === t.modifiedLength ? (l = 0, u = 0, d = 0, c = 0) : (l = i.getStartLineNumber(t.modifiedStart), u = i.getStartColumn(t.modifiedStart),
  11934. d = i.getEndLineNumber(t.modifiedStart + t.modifiedLength - 1), c = i.getEndColumn(t.modifiedStart + t.modifiedLength - 1)), new e(o, r, s, a, l, u, d, c)
  11935. }, e
  11936. }();
  11937. var u = function () {
  11938. function e(e, t, n, i, o) {
  11939. this.originalStartLineNumber = e, this.originalEndLineNumber = t, this.modifiedStartLineNumber = n, this.modifiedEndLineNumber = i, this.charChanges = o
  11940. }
  11941. return e.createFromDiffResult = function (t, n, i, s, a, u, d) {
  11942. var c, h, p, g, f = void 0;
  11943. if (0 === n.originalLength ? (c = i.getStartLineNumber(n.originalStart) - 1, h = 0) : (c = i.getStartLineNumber(n.originalStart), h = i.getEndLineNumber(n.originalStart + n.originalLength - 1)), 0 === n.modifiedLength ? (p = s.getStartLineNumber(n.modifiedStart) - 1, g = 0) : (p = s.getStartLineNumber(n.modifiedStart), g = s.getEndLineNumber(n.modifiedStart + n.modifiedLength - 1)), u && n.originalLength > 0 && n.originalLength < 20 && n.modifiedLength > 0 && n.modifiedLength < 20 && a()) {
  11944. var m = i.createCharSequence(t, n.originalStart, n.originalStart + n.originalLength - 1),
  11945. v = s.createCharSequence(t, n.modifiedStart, n.modifiedStart + n.modifiedLength - 1),
  11946. _ = r(m, v, a, !0).changes;
  11947. d && (_ = function (e) {
  11948. if (e.length <= 1) return e;
  11949. for (var t = [e[0]], n = t[0], i = 1, r = e.length; i < r; i++) {
  11950. var s = e[i], a = s.originalStart - (n.originalStart + n.originalLength),
  11951. l = s.modifiedStart - (n.modifiedStart + n.modifiedLength);
  11952. Math.min(a, l) < o ? (n.originalLength = s.originalStart + s.originalLength - n.originalStart, n.modifiedLength = s.modifiedStart + s.modifiedLength - n.modifiedStart) : (t.push(s), n = s)
  11953. }
  11954. return t
  11955. }(_)), f = [];
  11956. for (var y = 0, C = _.length; y < C; y++) f.push(l.createFromDiffChange(_[y], m, v))
  11957. }
  11958. return new e(c, h, p, g, f)
  11959. }, e
  11960. }(), d = function () {
  11961. function e(e, t, n) {
  11962. this.shouldComputeCharChanges = n.shouldComputeCharChanges, this.shouldPostProcessCharChanges = n.shouldPostProcessCharChanges, this.shouldIgnoreTrimWhitespace = n.shouldIgnoreTrimWhitespace, this.shouldMakePrettyDiff = n.shouldMakePrettyDiff, this.originalLines = e, this.modifiedLines = t, this.original = new s(e), this.modified = new s(t), this.continueLineDiff = p(n.maxComputationTime), this.continueCharDiff = p(0 === n.maxComputationTime ? 0 : Math.min(n.maxComputationTime, 5e3))
  11963. }
  11964. return e.prototype.computeDiff = function () {
  11965. if (1 === this.original.lines.length && 0 === this.original.lines[0].length) return {
  11966. quitEarly: !1,
  11967. changes: [{
  11968. originalStartLineNumber: 1,
  11969. originalEndLineNumber: 1,
  11970. modifiedStartLineNumber: 1,
  11971. modifiedEndLineNumber: this.modified.lines.length,
  11972. charChanges: [{
  11973. modifiedEndColumn: 0,
  11974. modifiedEndLineNumber: 0,
  11975. modifiedStartColumn: 0,
  11976. modifiedStartLineNumber: 0,
  11977. originalEndColumn: 0,
  11978. originalEndLineNumber: 0,
  11979. originalStartColumn: 0,
  11980. originalStartLineNumber: 0
  11981. }]
  11982. }]
  11983. };
  11984. if (1 === this.modified.lines.length && 0 === this.modified.lines[0].length) return {
  11985. quitEarly: !1,
  11986. changes: [{
  11987. originalStartLineNumber: 1,
  11988. originalEndLineNumber: this.original.lines.length,
  11989. modifiedStartLineNumber: 1,
  11990. modifiedEndLineNumber: 1,
  11991. charChanges: [{
  11992. modifiedEndColumn: 0,
  11993. modifiedEndLineNumber: 0,
  11994. modifiedStartColumn: 0,
  11995. modifiedStartLineNumber: 0,
  11996. originalEndColumn: 0,
  11997. originalEndLineNumber: 0,
  11998. originalStartColumn: 0,
  11999. originalStartLineNumber: 0
  12000. }]
  12001. }]
  12002. };
  12003. var e = r(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff),
  12004. t = e.changes, n = e.quitEarly;
  12005. if (this.shouldIgnoreTrimWhitespace) {
  12006. for (var i = [], o = 0, s = t.length; o < s; o++) i.push(u.createFromDiffResult(this.shouldIgnoreTrimWhitespace, t[o], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges));
  12007. return {quitEarly: n, changes: i}
  12008. }
  12009. for (var a = [], l = 0, d = 0, p = (o = -1, t.length); o < p; o++) {
  12010. for (var g = o + 1 < p ? t[o + 1] : null, f = g ? g.originalStart : this.originalLines.length, m = g ? g.modifiedStart : this.modifiedLines.length; l < f && d < m;) {
  12011. var v = this.originalLines[l], _ = this.modifiedLines[d];
  12012. if (v !== _) {
  12013. for (var y = c(v, 1), C = c(_, 1); y > 1 && C > 1;) {
  12014. if (v.charCodeAt(y - 2) !== _.charCodeAt(C - 2)) break;
  12015. y--, C--
  12016. }
  12017. (y > 1 || C > 1) && this._pushTrimWhitespaceCharChange(a, l + 1, 1, y, d + 1, 1, C);
  12018. for (var b = h(v, 1), S = h(_, 1), w = v.length + 1, E = _.length + 1; b < w && S < E;) {
  12019. if (v.charCodeAt(b - 1) !== v.charCodeAt(S - 1)) break;
  12020. b++, S++
  12021. }
  12022. (b < w || S < E) && this._pushTrimWhitespaceCharChange(a, l + 1, b, w, d + 1, S, E)
  12023. }
  12024. l++, d++
  12025. }
  12026. g && (a.push(u.createFromDiffResult(this.shouldIgnoreTrimWhitespace, g, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)),
  12027. l += g.originalLength, d += g.modifiedLength)
  12028. }
  12029. return {quitEarly: n, changes: a}
  12030. }, e.prototype._pushTrimWhitespaceCharChange = function (e, t, n, i, o, r, s) {
  12031. if (!this._mergeTrimWhitespaceCharChange(e, t, n, i, o, r, s)) {
  12032. var a = void 0;
  12033. this.shouldComputeCharChanges && (a = [new l(t, n, t, i, o, r, o, s)]), e.push(new u(t, t, o, o, a))
  12034. }
  12035. }, e.prototype._mergeTrimWhitespaceCharChange = function (e, t, n, i, o, r, s) {
  12036. var a = e.length;
  12037. if (0 === a) return !1;
  12038. var u = e[a - 1];
  12039. return 0 !== u.originalEndLineNumber && 0 !== u.modifiedEndLineNumber && (u.originalEndLineNumber + 1 === t && u.modifiedEndLineNumber + 1 === o && (u.originalEndLineNumber = t, u.modifiedEndLineNumber = o, this.shouldComputeCharChanges && u.charChanges && u.charChanges.push(new l(t, n, t, i, o, r, o, s)), !0))
  12040. }, e
  12041. }();
  12042. function c(e, t) {
  12043. var n = i.firstNonWhitespaceIndex(e);
  12044. return -1 === n ? t : n + 1
  12045. }
  12046. function h(e, t) {
  12047. var n = i.lastNonWhitespaceIndex(e);
  12048. return -1 === n ? t : n + 2
  12049. }
  12050. function p(e) {
  12051. if (0 === e) return function () {
  12052. return !0
  12053. };
  12054. var t = Date.now();
  12055. return function () {
  12056. return Date.now() - t < e
  12057. }
  12058. }
  12059. t.DiffComputer = d
  12060. })), define(n[190], i([0, 1]), (function (e, t) {
  12061. "use strict"
  12062. ;Object.defineProperty(t, "__esModule", {value: !0});
  12063. var n = function () {
  12064. function e(e, t, n, i, o, r) {
  12065. this.id = e, this.label = t, this.alias = n, this._precondition = i, this._run = o, this._contextKeyService = r
  12066. }
  12067. return e.prototype.isSupported = function () {
  12068. return this._contextKeyService.contextMatchesRules(this._precondition)
  12069. }, e.prototype.run = function () {
  12070. if (!this.isSupported()) return Promise.resolve(void 0);
  12071. var e = this._run();
  12072. return e || Promise.resolve(void 0)
  12073. }, e
  12074. }();
  12075. t.InternalEditorAction = n
  12076. })), define(n[68], i([0, 1]), (function (e, t) {
  12077. "use strict";
  12078. Object.defineProperty(t, "__esModule", {value: !0}), t.isThemeColor = function (e) {
  12079. return e && "string" == typeof e.id
  12080. }, t.EditorType = {
  12081. ICodeEditor: "vs.editor.ICodeEditor",
  12082. IDiffEditor: "vs.editor.IDiffEditor"
  12083. }, t.Handler = {
  12084. ExecuteCommand: "executeCommand",
  12085. ExecuteCommands: "executeCommands",
  12086. Type: "type",
  12087. ReplacePreviousChar: "replacePreviousChar",
  12088. CompositionStart: "compositionStart",
  12089. CompositionEnd: "compositionEnd",
  12090. Paste: "paste",
  12091. Cut: "cut",
  12092. Undo: "undo",
  12093. Redo: "redo"
  12094. }
  12095. })), define(n[108], i([0, 1, 68]), (function (e, t, n) {
  12096. "use strict"
  12097. ;Object.defineProperty(t, "__esModule", {value: !0}), t.isCodeEditor = function (e) {
  12098. return !(!e || "function" != typeof e.getEditorType) && e.getEditorType() === n.EditorType.ICodeEditor
  12099. }
  12100. })), define(n[48], i([0, 1]), (function (e, t) {
  12101. "use strict";
  12102. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  12103. e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = "Right", e[e.Full = 7] = "Full"
  12104. }(t.OverviewRulerLane || (t.OverviewRulerLane = {})), function (e) {
  12105. e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter"
  12106. }(t.MinimapPosition || (t.MinimapPosition = {}));
  12107. var n = function () {
  12108. function e(e) {
  12109. this.tabSize = Math.max(1, 0 | e.tabSize), this.indentSize = 0 | e.tabSize, this.insertSpaces = Boolean(e.insertSpaces), this.defaultEOL = 0 | e.defaultEOL, this.trimAutoWhitespace = Boolean(e.trimAutoWhitespace)
  12110. }
  12111. return e.prototype.equals = function (e) {
  12112. return this.tabSize === e.tabSize && this.indentSize === e.indentSize && this.insertSpaces === e.insertSpaces && this.defaultEOL === e.defaultEOL && this.trimAutoWhitespace === e.trimAutoWhitespace
  12113. }, e.prototype.createChangeEvent = function (e) {
  12114. return {
  12115. tabSize: this.tabSize !== e.tabSize,
  12116. indentSize: this.indentSize !== e.indentSize,
  12117. insertSpaces: this.insertSpaces !== e.insertSpaces,
  12118. trimAutoWhitespace: this.trimAutoWhitespace !== e.trimAutoWhitespace
  12119. }
  12120. }, e
  12121. }();
  12122. t.TextModelResolvedOptions = n;
  12123. var i = function (e, t) {
  12124. this.range = e, this.matches = t
  12125. };
  12126. t.FindMatch = i;
  12127. var o = function (e, t, n) {
  12128. this.reverseEdits = e, this.changes = t, this.trimAutoWhitespaceLineNumbers = n
  12129. };
  12130. t.ApplyEditsResult = o
  12131. })), define(n[342], i([0, 1, 10]), (function (e, t, n) {
  12132. "use strict";
  12133. Object.defineProperty(t, "__esModule", {value: !0});
  12134. var i = function () {
  12135. function e(e, t) {
  12136. this.beforeVersionId = e, this.beforeCursorState = t, this.afterCursorState = null, this.afterVersionId = -1, this.editOperations = []
  12137. }
  12138. return e.prototype.undo = function (e) {
  12139. for (var t = this.editOperations.length - 1; t >= 0; t--) this.editOperations[t] = {operations: e.applyEdits(this.editOperations[t].operations)}
  12140. }, e.prototype.redo = function (e) {
  12141. for (var t = 0; t < this.editOperations.length; t++) this.editOperations[t] = {operations: e.applyEdits(this.editOperations[t].operations)}
  12142. }, e
  12143. }();
  12144. function o(e) {
  12145. return "\n" === e.getEOL() ? 0 : 1
  12146. }
  12147. var r = function () {
  12148. function e(e, t) {
  12149. this.beforeVersionId = e, this.beforeCursorState = null, this.afterCursorState = null, this.afterVersionId = -1, this.eol = t
  12150. }
  12151. return e.prototype.undo = function (e) {
  12152. var t = o(e);
  12153. e.setEOL(this.eol), this.eol = t
  12154. }, e.prototype.redo = function (e) {
  12155. var t = o(e);
  12156. e.setEOL(this.eol), this.eol = t
  12157. }, e
  12158. }(), s = function () {
  12159. function e(e) {
  12160. this.model = e, this.currentOpenStackElement = null, this.past = [], this.future = []
  12161. }
  12162. return e.prototype.pushStackElement = function () {
  12163. null !== this.currentOpenStackElement && (this.past.push(this.currentOpenStackElement), this.currentOpenStackElement = null)
  12164. }, e.prototype.clear = function () {
  12165. this.currentOpenStackElement = null, this.past = [], this.future = []
  12166. }, e.prototype.pushEOL = function (e) {
  12167. this.future = [], this.currentOpenStackElement && this.pushStackElement();
  12168. var t = o(this.model), n = new r(this.model.getAlternativeVersionId(), t);
  12169. this.model.setEOL(e), n.afterVersionId = this.model.getVersionId(), this.currentOpenStackElement = n, this.pushStackElement()
  12170. }, e.prototype.pushEditOperation = function (t, n, o) {
  12171. this.future = [];
  12172. var r = null;
  12173. this.currentOpenStackElement && (this.currentOpenStackElement instanceof i ? r = this.currentOpenStackElement : this.pushStackElement()), this.currentOpenStackElement || (r = new i(this.model.getAlternativeVersionId(), t), this.currentOpenStackElement = r);
  12174. var s = {operations: this.model.applyEdits(n)};
  12175. return r.editOperations.push(s), r.afterCursorState = e._computeCursorState(o, s.operations), r.afterVersionId = this.model.getVersionId(), r.afterCursorState
  12176. }, e._computeCursorState = function (e, t) {
  12177. try {
  12178. return e ? e(t) : null
  12179. } catch (e) {
  12180. return n.onUnexpectedError(e), null
  12181. }
  12182. }, e.prototype.undo = function () {
  12183. if (this.pushStackElement(), this.past.length > 0) {
  12184. var e = this.past.pop();
  12185. try {
  12186. e.undo(this.model)
  12187. } catch (e) {
  12188. return n.onUnexpectedError(e), this.clear(), null
  12189. }
  12190. return this.future.push(e), {selections: e.beforeCursorState, recordedVersionId: e.beforeVersionId}
  12191. }
  12192. return null
  12193. }, e.prototype.canUndo = function () {
  12194. return this.past.length > 0 || null !== this.currentOpenStackElement
  12195. }, e.prototype.redo = function () {
  12196. if (this.future.length > 0) {
  12197. var e = this.future.pop()
  12198. ;
  12199. try {
  12200. e.redo(this.model)
  12201. } catch (e) {
  12202. return n.onUnexpectedError(e), this.clear(), null
  12203. }
  12204. return this.past.push(e), {selections: e.afterCursorState, recordedVersionId: e.afterVersionId}
  12205. }
  12206. return null
  12207. }, e.prototype.canRedo = function () {
  12208. return this.future.length > 0
  12209. }, e
  12210. }();
  12211. t.EditStack = s
  12212. })), define(n[343], i([0, 1]), (function (e, t) {
  12213. "use strict";
  12214. Object.defineProperty(t, "__esModule", {value: !0});
  12215. var n = function () {
  12216. this.spacesDiff = 0, this.looksLikeAlignment = !1
  12217. };
  12218. function i(e, t, n, i, o) {
  12219. var r;
  12220. for (o.spacesDiff = 0, o.looksLikeAlignment = !1, r = 0; r < t && r < i; r++) {
  12221. if (e.charCodeAt(r) !== n.charCodeAt(r)) break
  12222. }
  12223. for (var s = 0, a = 0, l = r; l < t; l++) {
  12224. 32 === e.charCodeAt(l) ? s++ : a++
  12225. }
  12226. var u = 0, d = 0;
  12227. for (l = r; l < i; l++) {
  12228. 32 === n.charCodeAt(l) ? u++ : d++
  12229. }
  12230. if (!(s > 0 && a > 0 || u > 0 && d > 0)) {
  12231. var c = Math.abs(a - d), h = Math.abs(s - u);
  12232. if (0 === c) return o.spacesDiff = h, void (h > 0 && 0 <= u - 1 && u - 1 < e.length && u < n.length && 32 !== n.charCodeAt(u) && 32 === e.charCodeAt(u - 1) && 44 === e.charCodeAt(e.length - 1) && (o.looksLikeAlignment = !0));
  12233. h % c != 0 || (o.spacesDiff = h / c)
  12234. }
  12235. }
  12236. t.guessIndentation = function (e, t, o) {
  12237. for (var r = Math.min(e.getLineCount(), 1e4), s = 0, a = 0, l = "", u = 0, d = [0, 0, 0, 0, 0, 0, 0, 0, 0], c = new n, h = 1; h <= r; h++) {
  12238. for (var p = e.getLineLength(h), g = e.getLineContent(h), f = p <= 65536, m = !1, v = 0, _ = 0, y = 0, C = 0, b = p; C < b; C++) {
  12239. var S = f ? g.charCodeAt(C) : e.getLineCharCode(h, C);
  12240. if (9 === S) y++; else {
  12241. if (32 !== S) {
  12242. m = !0, v = C;
  12243. break
  12244. }
  12245. _++
  12246. }
  12247. }
  12248. if (m && (y > 0 ? s++ : _ > 1 && a++, i(l, u, g, v, c), !c.looksLikeAlignment || o && t === c.spacesDiff)) {
  12249. var w = c.spacesDiff;
  12250. w <= 8 && d[w]++, l = g, u = v
  12251. }
  12252. }
  12253. var E = o;
  12254. s !== a && (E = s < a);
  12255. var L = t;
  12256. if (E) {
  12257. var D = E ? 0 : .1 * r;
  12258. [2, 4, 6, 8, 3, 5, 7].forEach((function (e) {
  12259. var t = d[e];
  12260. t > D && (D = t, L = e)
  12261. })), 4 === L && d[4] > 0 && d[2] > 0 && d[2] >= d[4] / 2 && (L = 2)
  12262. }
  12263. return {insertSpaces: E, tabSize: L}
  12264. }
  12265. })), define(n[344], i([0, 1]), (function (e, t) {
  12266. "use strict";
  12267. function n(e) {
  12268. return (1 & e.metadata) >>> 0
  12269. }
  12270. function i(e, t) {
  12271. e.metadata = 254 & e.metadata | t << 0
  12272. }
  12273. function o(e) {
  12274. return (2 & e.metadata) >>> 1 == 1
  12275. }
  12276. function r(e, t) {
  12277. e.metadata = 253 & e.metadata | (t ? 1 : 0) << 1
  12278. }
  12279. function s(e) {
  12280. return (4 & e.metadata) >>> 2 == 1
  12281. }
  12282. function a(e, t) {
  12283. e.metadata = 251 & e.metadata | (t ? 1 : 0) << 2
  12284. }
  12285. function l(e, t) {
  12286. e.metadata = 247 & e.metadata | (t ? 1 : 0) << 3
  12287. }
  12288. function u(e, t) {
  12289. e.metadata = 207 & e.metadata | t << 4
  12290. }
  12291. function d(e, t) {
  12292. e.metadata = 191 & e.metadata | (t ? 1 : 0) << 6
  12293. }
  12294. Object.defineProperty(t, "__esModule", {value: !0}), t.getNodeColor = n, t.getNodeIsInOverviewRuler = function (e) {
  12295. return (8 & e.metadata) >>> 3 == 1
  12296. };
  12297. var c = function () {
  12298. function e(e, t, n) {
  12299. this.metadata = 0, this.parent = this, this.left = this, this.right = this, i(this, 1), this.start = t, this.end = n, this.delta = 0, this.maxEnd = n, this.id = e, this.ownerId = 0, this.options = null, a(this, !1), u(this, 1), l(this, !1), d(this, !1), this.cachedVersionId = 0, this.cachedAbsoluteStart = t, this.cachedAbsoluteEnd = n, this.range = null, r(this, !1)
  12300. }
  12301. return e.prototype.reset = function (e, t, n, i) {
  12302. this.start = t, this.end = n, this.maxEnd = n, this.cachedVersionId = e, this.cachedAbsoluteStart = t, this.cachedAbsoluteEnd = n, this.range = i
  12303. }, e.prototype.setOptions = function (e) {
  12304. this.options = e;
  12305. var t = this.options.className;
  12306. a(this, "squiggly-error" === t || "squiggly-warning" === t || "squiggly-info" === t), u(this, this.options.stickiness), l(this, !(!this.options.overviewRuler || !this.options.overviewRuler.color)),
  12307. d(this, this.options.collapseOnReplaceEdit)
  12308. }, e.prototype.setCachedOffsets = function (e, t, n) {
  12309. this.cachedVersionId !== n && (this.range = null), this.cachedVersionId = n, this.cachedAbsoluteStart = e, this.cachedAbsoluteEnd = t
  12310. }, e.prototype.detach = function () {
  12311. this.parent = null, this.left = null, this.right = null
  12312. }, e
  12313. }();
  12314. t.IntervalNode = c, t.SENTINEL = new c(null, 0, 0), t.SENTINEL.parent = t.SENTINEL, t.SENTINEL.left = t.SENTINEL, t.SENTINEL.right = t.SENTINEL, i(t.SENTINEL, 0);
  12315. var h = function () {
  12316. function e() {
  12317. this.root = t.SENTINEL, this.requestNormalizeDelta = !1
  12318. }
  12319. return e.prototype.intervalSearch = function (e, n, i, a, l) {
  12320. return this.root === t.SENTINEL ? [] : function (e, n, i, a, l, u) {
  12321. var d = e.root, c = 0, h = 0, p = 0, g = [], f = 0;
  12322. for (; d !== t.SENTINEL;) if (o(d)) r(d.left, !1), r(d.right, !1), d === d.parent.right && (c -= d.parent.delta), d = d.parent; else {
  12323. if (!o(d.left)) {
  12324. if (c + d.maxEnd < n) {
  12325. r(d, !0);
  12326. continue
  12327. }
  12328. if (d.left !== t.SENTINEL) {
  12329. d = d.left;
  12330. continue
  12331. }
  12332. }
  12333. if ((h = c + d.start) > i) r(d, !0); else {
  12334. if ((p = c + d.end) >= n) {
  12335. d.setCachedOffsets(h, p, u);
  12336. var m = !0;
  12337. a && d.ownerId && d.ownerId !== a && (m = !1), l && s(d) && (m = !1), m && (g[f++] = d)
  12338. }
  12339. r(d, !0), d.right === t.SENTINEL || o(d.right) || (c += d.delta, d = d.right)
  12340. }
  12341. }
  12342. return r(e.root, !1), g
  12343. }(this, e, n, i, a, l)
  12344. }, e.prototype.search = function (e, n, i) {
  12345. return this.root === t.SENTINEL ? [] : function (e, n, i, a) {
  12346. var l = e.root, u = 0, d = 0, c = 0, h = [], p = 0;
  12347. for (; l !== t.SENTINEL;) if (o(l)) r(l.left, !1), r(l.right, !1), l === l.parent.right && (u -= l.parent.delta), l = l.parent; else if (l.left === t.SENTINEL || o(l.left)) {
  12348. d = u + l.start, c = u + l.end, l.setCachedOffsets(d, c, a);
  12349. var g = !0;
  12350. n && l.ownerId && l.ownerId !== n && (g = !1), i && s(l) && (g = !1), g && (h[p++] = l), r(l, !0), l.right === t.SENTINEL || o(l.right) || (u += l.delta, l = l.right)
  12351. } else l = l.left;
  12352. return r(e.root, !1), h
  12353. }(this, e, n, i)
  12354. }, e.prototype.collectNodesFromOwner = function (e) {
  12355. return function (e, n) {
  12356. var i = e.root, s = [], a = 0;
  12357. for (; i !== t.SENTINEL;) o(i) ? (r(i.left, !1), r(i.right, !1), i = i.parent) : i.left === t.SENTINEL || o(i.left) ? (i.ownerId === n && (s[a++] = i), r(i, !0), i.right === t.SENTINEL || o(i.right) || (i = i.right)) : i = i.left;
  12358. return r(e.root, !1), s
  12359. }(this, e)
  12360. }, e.prototype.collectNodesPostOrder = function () {
  12361. return function (e) {
  12362. var n = e.root, i = [], s = 0
  12363. ;
  12364. for (; n !== t.SENTINEL;) o(n) ? (r(n.left, !1), r(n.right, !1), n = n.parent) : n.left === t.SENTINEL || o(n.left) ? n.right === t.SENTINEL || o(n.right) ? (i[s++] = n, r(n, !0)) : n = n.right : n = n.left;
  12365. return r(e.root, !1), i
  12366. }(this)
  12367. }, e.prototype.insert = function (e) {
  12368. f(this, e), this._normalizeDeltaIfNecessary()
  12369. }, e.prototype.delete = function (e) {
  12370. m(this, e), this._normalizeDeltaIfNecessary()
  12371. }, e.prototype.resolveNode = function (e, t) {
  12372. for (var n = e, i = 0; e !== this.root;) e === e.parent.right && (i += e.parent.delta), e = e.parent;
  12373. var o = n.start + i, r = n.end + i;
  12374. n.setCachedOffsets(o, r, t)
  12375. }, e.prototype.acceptReplace = function (e, n, i, s) {
  12376. for (var a = function (e, n, i) {
  12377. var s = e.root, a = 0, l = 0, u = 0, d = [], c = 0;
  12378. for (; s !== t.SENTINEL;) if (o(s)) r(s.left, !1), r(s.right, !1), s === s.parent.right && (a -= s.parent.delta), s = s.parent; else {
  12379. if (!o(s.left)) {
  12380. if (a + s.maxEnd < n) {
  12381. r(s, !0);
  12382. continue
  12383. }
  12384. if (s.left !== t.SENTINEL) {
  12385. s = s.left;
  12386. continue
  12387. }
  12388. }
  12389. (l = a + s.start) > i ? r(s, !0) : ((u = a + s.end) >= n && (s.setCachedOffsets(l, u, 0), d[c++] = s), r(s, !0), s.right === t.SENTINEL || o(s.right) || (a += s.delta, s = s.right))
  12390. }
  12391. return r(e.root, !1), d
  12392. }(this, e, e + n), l = 0, u = a.length; l < u; l++) {
  12393. m(this, d = a[l])
  12394. }
  12395. this._normalizeDeltaIfNecessary(), function (e, n, i, s) {
  12396. var a = e.root, l = 0, u = s - (i - n);
  12397. for (; a !== t.SENTINEL;) if (o(a)) r(a.left, !1), r(a.right, !1), a === a.parent.right && (l -= a.parent.delta), b(a), a = a.parent; else {
  12398. if (!o(a.left)) {
  12399. if (l + a.maxEnd < n) {
  12400. r(a, !0);
  12401. continue
  12402. }
  12403. if (a.left !== t.SENTINEL) {
  12404. a = a.left;
  12405. continue
  12406. }
  12407. }
  12408. l + a.start > i ? (a.start += u, a.end += u, a.delta += u, (a.delta < -1073741824 || a.delta > 1073741824) && (e.requestNormalizeDelta = !0), r(a, !0)) : (r(a, !0), a.right === t.SENTINEL || o(a.right) || (l += a.delta, a = a.right))
  12409. }
  12410. r(e.root, !1)
  12411. }(this, e, e + n, i), this._normalizeDeltaIfNecessary();
  12412. for (l = 0, u = a.length; l < u; l++) {
  12413. var d;
  12414. (d = a[l]).start = d.cachedAbsoluteStart, d.end = d.cachedAbsoluteEnd, g(d, e, e + n, i, s), d.maxEnd = d.end, f(this, d)
  12415. }
  12416. this._normalizeDeltaIfNecessary()
  12417. }, e.prototype._normalizeDeltaIfNecessary = function () {
  12418. this.requestNormalizeDelta && (this.requestNormalizeDelta = !1, function (e) {
  12419. var n = e.root, i = 0;
  12420. for (; n !== t.SENTINEL;) n.left === t.SENTINEL || o(n.left) ? n.right === t.SENTINEL || o(n.right) ? (n.start = i + n.start, n.end = i + n.end,
  12421. n.delta = 0, b(n), r(n, !0), r(n.left, !1), r(n.right, !1), n === n.parent.right && (i -= n.parent.delta), n = n.parent) : (i += n.delta, n = n.right) : n = n.left;
  12422. r(e.root, !1)
  12423. }(this))
  12424. }, e
  12425. }();
  12426. function p(e, t, n, i) {
  12427. return e < n || !(e > n) && (1 !== i && (2 === i || t))
  12428. }
  12429. function g(e, t, n, i, o) {
  12430. var r = function (e) {
  12431. return (48 & e.metadata) >>> 4
  12432. }(e), s = 0 === r || 2 === r, a = 1 === r || 2 === r, l = n - t, u = i, d = Math.min(l, u), c = e.start,
  12433. h = !1, g = e.end, f = !1;
  12434. t <= c && g <= n && function (e) {
  12435. return (64 & e.metadata) >>> 6 == 1
  12436. }(e) && (e.start = t, h = !0, e.end = t, f = !0);
  12437. var m = o ? 1 : l > 0 ? 2 : 0;
  12438. if (!h && p(c, s, t, m) && (h = !0), !f && p(g, a, t, m) && (f = !0), d > 0 && !o) {
  12439. m = l > u ? 2 : 0;
  12440. !h && p(c, s, t + d, m) && (h = !0), !f && p(g, a, t + d, m) && (f = !0)
  12441. }
  12442. m = o ? 1 : 0;
  12443. !h && p(c, s, n, m) && (e.start = t + u, h = !0), !f && p(g, a, n, m) && (e.end = t + u, f = !0);
  12444. var v = u - l;
  12445. h || (e.start = Math.max(0, c + v)), f || (e.end = Math.max(0, g + v)), e.start > e.end && (e.end = e.start)
  12446. }
  12447. function f(e, o) {
  12448. if (e.root === t.SENTINEL) return o.parent = t.SENTINEL, o.left = t.SENTINEL, o.right = t.SENTINEL, i(o, 0), e.root = o, e.root;
  12449. !function (e, n) {
  12450. var o = 0, r = e.root, s = n.start, a = n.end;
  12451. for (; ;) {
  12452. if (w(s, a, r.start + o, r.end + o) < 0) {
  12453. if (r.left === t.SENTINEL) {
  12454. n.start -= o,
  12455. n.end -= o, n.maxEnd -= o, r.left = n;
  12456. break
  12457. }
  12458. r = r.left
  12459. } else {
  12460. if (r.right === t.SENTINEL) {
  12461. n.start -= o + r.delta, n.end -= o + r.delta, n.maxEnd -= o + r.delta, r.right = n;
  12462. break
  12463. }
  12464. o += r.delta, r = r.right
  12465. }
  12466. }
  12467. n.parent = r, n.left = t.SENTINEL, n.right = t.SENTINEL, i(n, 1)
  12468. }(e, o), S(o.parent);
  12469. for (var r = o; r !== e.root && 1 === n(r.parent);) {
  12470. var s;
  12471. if (r.parent === r.parent.parent.left) 1 === n(s = r.parent.parent.right) ? (i(r.parent, 0), i(s, 0), i(r.parent.parent, 1), r = r.parent.parent) : (r === r.parent.right && _(e, r = r.parent), i(r.parent, 0), i(r.parent.parent, 1), y(e, r.parent.parent)); else 1 === n(s = r.parent.parent.left) ? (i(r.parent, 0), i(s, 0), i(r.parent.parent, 1), r = r.parent.parent) : (r === r.parent.left && y(e, r = r.parent), i(r.parent, 0), i(r.parent.parent, 1), _(e, r.parent.parent))
  12472. }
  12473. return i(e.root, 0), o
  12474. }
  12475. function m(e, o) {
  12476. var r, s;
  12477. if (o.left === t.SENTINEL ? (s = o, (r = o.right).delta += o.delta, (r.delta < -1073741824 || r.delta > 1073741824) && (e.requestNormalizeDelta = !0), r.start += o.delta, r.end += o.delta) : o.right === t.SENTINEL ? (r = o.left, s = o) : ((r = (s = function (e) {
  12478. for (; e.left !== t.SENTINEL;) e = e.left;
  12479. return e
  12480. }(o.right)).right).start += s.delta, r.end += s.delta, r.delta += s.delta, (r.delta < -1073741824 || r.delta > 1073741824) && (e.requestNormalizeDelta = !0), s.start += o.delta, s.end += o.delta, s.delta = o.delta, (s.delta < -1073741824 || s.delta > 1073741824) && (e.requestNormalizeDelta = !0)), s === e.root) return e.root = r, i(r, 0), o.detach(), v(), b(r), void (e.root.parent = t.SENTINEL);
  12481. var a, l = 1 === n(s);
  12482. if (s === s.parent.left ? s.parent.left = r : s.parent.right = r, s === o ? r.parent = s.parent : (s.parent === o ? r.parent = s : r.parent = s.parent, s.left = o.left, s.right = o.right, s.parent = o.parent, i(s, n(o)), o === e.root ? e.root = s : o === o.parent.left ? o.parent.left = s : o.parent.right = s, s.left !== t.SENTINEL && (s.left.parent = s), s.right !== t.SENTINEL && (s.right.parent = s)), o.detach(), l) return S(r.parent), s !== o && (S(s), S(s.parent)), void v();
  12483. for (S(r), S(r.parent), s !== o && (S(s), S(s.parent)); r !== e.root && 0 === n(r);) r === r.parent.left ? (1 === n(a = r.parent.right) && (i(a, 0), i(r.parent, 1), _(e, r.parent), a = r.parent.right), 0 === n(a.left) && 0 === n(a.right) ? (i(a, 1), r = r.parent) : (0 === n(a.right) && (i(a.left, 0), i(a, 1), y(e, a),
  12484. a = r.parent.right), i(a, n(r.parent)), i(r.parent, 0), i(a.right, 0), _(e, r.parent), r = e.root)) : (1 === n(a = r.parent.left) && (i(a, 0), i(r.parent, 1), y(e, r.parent), a = r.parent.left), 0 === n(a.left) && 0 === n(a.right) ? (i(a, 1), r = r.parent) : (0 === n(a.left) && (i(a.right, 0), i(a, 1), _(e, a), a = r.parent.left), i(a, n(r.parent)), i(r.parent, 0), i(a.left, 0), y(e, r.parent), r = e.root));
  12485. i(r, 0), v()
  12486. }
  12487. function v() {
  12488. t.SENTINEL.parent = t.SENTINEL, t.SENTINEL.delta = 0, t.SENTINEL.start = 0, t.SENTINEL.end = 0
  12489. }
  12490. function _(e, n) {
  12491. var i = n.right;
  12492. i.delta += n.delta, (i.delta < -1073741824 || i.delta > 1073741824) && (e.requestNormalizeDelta = !0), i.start += n.delta, i.end += n.delta, n.right = i.left, i.left !== t.SENTINEL && (i.left.parent = n), i.parent = n.parent, n.parent === t.SENTINEL ? e.root = i : n === n.parent.left ? n.parent.left = i : n.parent.right = i, i.left = n, n.parent = i, b(n), b(i)
  12493. }
  12494. function y(e, n) {
  12495. var i = n.left;
  12496. n.delta -= i.delta, (n.delta < -1073741824 || n.delta > 1073741824) && (e.requestNormalizeDelta = !0), n.start -= i.delta, n.end -= i.delta, n.left = i.right, i.right !== t.SENTINEL && (i.right.parent = n), i.parent = n.parent,
  12497. n.parent === t.SENTINEL ? e.root = i : n === n.parent.right ? n.parent.right = i : n.parent.left = i, i.right = n, n.parent = i, b(n), b(i)
  12498. }
  12499. function C(e) {
  12500. var n = e.end;
  12501. if (e.left !== t.SENTINEL) {
  12502. var i = e.left.maxEnd;
  12503. i > n && (n = i)
  12504. }
  12505. if (e.right !== t.SENTINEL) {
  12506. var o = e.right.maxEnd + e.delta;
  12507. o > n && (n = o)
  12508. }
  12509. return n
  12510. }
  12511. function b(e) {
  12512. e.maxEnd = C(e)
  12513. }
  12514. function S(e) {
  12515. for (; e !== t.SENTINEL;) {
  12516. var n = C(e);
  12517. if (e.maxEnd === n) return;
  12518. e.maxEnd = n, e = e.parent
  12519. }
  12520. }
  12521. function w(e, t, n, i) {
  12522. return e === n ? t - i : e - n
  12523. }
  12524. t.IntervalTree = h, t.nodeAcceptEdit = g, t.recomputeMaxEnd = b, t.intervalCompare = w
  12525. })), define(n[345], i([0, 1]), (function (e, t) {
  12526. "use strict";
  12527. Object.defineProperty(t, "__esModule", {value: !0});
  12528. var n = function () {
  12529. function e(e, t) {
  12530. this.piece = e, this.color = t, this.size_left = 0, this.lf_left = 0, this.parent = this, this.left = this, this.right = this
  12531. }
  12532. return e.prototype.next = function () {
  12533. if (this.right !== t.SENTINEL) return i(this.right);
  12534. for (var e = this; e.parent !== t.SENTINEL && e.parent.left !== e;) e = e.parent;
  12535. return e.parent === t.SENTINEL ? t.SENTINEL : e.parent
  12536. }, e.prototype.prev = function () {
  12537. if (this.left !== t.SENTINEL) return o(this.left)
  12538. ;
  12539. for (var e = this; e.parent !== t.SENTINEL && e.parent.right !== e;) e = e.parent;
  12540. return e.parent === t.SENTINEL ? t.SENTINEL : e.parent
  12541. }, e.prototype.detach = function () {
  12542. this.parent = null, this.left = null, this.right = null
  12543. }, e
  12544. }();
  12545. function i(e) {
  12546. for (; e.left !== t.SENTINEL;) e = e.left;
  12547. return e
  12548. }
  12549. function o(e) {
  12550. for (; e.right !== t.SENTINEL;) e = e.right;
  12551. return e
  12552. }
  12553. function r(e) {
  12554. return e === t.SENTINEL ? 0 : e.size_left + e.piece.length + r(e.right)
  12555. }
  12556. function s(e) {
  12557. return e === t.SENTINEL ? 0 : e.lf_left + e.piece.lineFeedCnt + s(e.right)
  12558. }
  12559. function a() {
  12560. t.SENTINEL.parent = t.SENTINEL
  12561. }
  12562. function l(e, n) {
  12563. var i = n.right;
  12564. i.size_left += n.size_left + (n.piece ? n.piece.length : 0), i.lf_left += n.lf_left + (n.piece ? n.piece.lineFeedCnt : 0), n.right = i.left, i.left !== t.SENTINEL && (i.left.parent = n), i.parent = n.parent, n.parent === t.SENTINEL ? e.root = i : n.parent.left === n ? n.parent.left = i : n.parent.right = i, i.left = n, n.parent = i
  12565. }
  12566. function u(e, n) {
  12567. var i = n.left;
  12568. n.left = i.right, i.right !== t.SENTINEL && (i.right.parent = n), i.parent = n.parent, n.size_left -= i.size_left + (i.piece ? i.piece.length : 0),
  12569. n.lf_left -= i.lf_left + (i.piece ? i.piece.lineFeedCnt : 0), n.parent === t.SENTINEL ? e.root = i : n === n.parent.right ? n.parent.right = i : n.parent.left = i, i.right = n, n.parent = i
  12570. }
  12571. function d(e, n, i, o) {
  12572. for (; n !== e.root && n !== t.SENTINEL;) n.parent.left === n && (n.parent.size_left += i, n.parent.lf_left += o), n = n.parent
  12573. }
  12574. function c(e, t) {
  12575. var n = 0, i = 0;
  12576. if (t !== e.root) {
  12577. if (0 === n) {
  12578. for (; t !== e.root && t === t.parent.right;) t = t.parent;
  12579. if (t === e.root) return;
  12580. n = r((t = t.parent).left) - t.size_left, i = s(t.left) - t.lf_left, t.size_left += n, t.lf_left += i
  12581. }
  12582. for (; t !== e.root && (0 !== n || 0 !== i);) t.parent.left === t && (t.parent.size_left += n, t.parent.lf_left += i), t = t.parent
  12583. }
  12584. }
  12585. t.TreeNode = n, t.SENTINEL = new n(null, 0), t.SENTINEL.parent = t.SENTINEL, t.SENTINEL.left = t.SENTINEL, t.SENTINEL.right = t.SENTINEL, t.SENTINEL.color = 0, t.leftest = i, t.righttest = o, t.calculateSize = r, t.calculateLF = s, t.resetSentinel = a, t.leftRotate = l, t.rightRotate = u, t.rbDelete = function (e, n) {
  12586. var o, h;
  12587. if (o = n.left === t.SENTINEL ? (h = n).right : n.right === t.SENTINEL ? (h = n).left : (h = i(n.right)).right, h === e.root) return e.root = o, o.color = 0, n.detach(), a(),
  12588. void (e.root.parent = t.SENTINEL);
  12589. var p = 1 === h.color;
  12590. if (h === h.parent.left ? h.parent.left = o : h.parent.right = o, h === n ? (o.parent = h.parent, c(e, o)) : (h.parent === n ? o.parent = h : o.parent = h.parent, c(e, o), h.left = n.left, h.right = n.right, h.parent = n.parent, h.color = n.color, n === e.root ? e.root = h : n === n.parent.left ? n.parent.left = h : n.parent.right = h, h.left !== t.SENTINEL && (h.left.parent = h), h.right !== t.SENTINEL && (h.right.parent = h), h.size_left = n.size_left, h.lf_left = n.lf_left, c(e, h)), n.detach(), o.parent.left === o) {
  12591. var g = r(o), f = s(o);
  12592. if (g !== o.parent.size_left || f !== o.parent.lf_left) {
  12593. var m = g - o.parent.size_left, v = f - o.parent.lf_left;
  12594. o.parent.size_left = g, o.parent.lf_left = f, d(e, o.parent, m, v)
  12595. }
  12596. }
  12597. if (c(e, o.parent), p) a(); else {
  12598. for (var _; o !== e.root && 0 === o.color;) o === o.parent.left ? (1 === (_ = o.parent.right).color && (_.color = 0, o.parent.color = 1, l(e, o.parent), _ = o.parent.right), 0 === _.left.color && 0 === _.right.color ? (_.color = 1, o = o.parent) : (0 === _.right.color && (_.left.color = 0, _.color = 1, u(e, _), _ = o.parent.right), _.color = o.parent.color, o.parent.color = 0, _.right.color = 0,
  12599. l(e, o.parent), o = e.root)) : (1 === (_ = o.parent.left).color && (_.color = 0, o.parent.color = 1, u(e, o.parent), _ = o.parent.left), 0 === _.left.color && 0 === _.right.color ? (_.color = 1, o = o.parent) : (0 === _.left.color && (_.right.color = 0, _.color = 1, l(e, _), _ = o.parent.left), _.color = o.parent.color, o.parent.color = 0, _.left.color = 0, u(e, o.parent), o = e.root));
  12600. o.color = 0, a()
  12601. }
  12602. }, t.fixInsert = function (e, t) {
  12603. for (c(e, t); t !== e.root && 1 === t.parent.color;) {
  12604. var n;
  12605. if (t.parent === t.parent.parent.left) 1 === (n = t.parent.parent.right).color ? (t.parent.color = 0, n.color = 0, t.parent.parent.color = 1, t = t.parent.parent) : (t === t.parent.right && l(e, t = t.parent), t.parent.color = 0, t.parent.parent.color = 1, u(e, t.parent.parent)); else 1 === (n = t.parent.parent.left).color ? (t.parent.color = 0, n.color = 0, t.parent.parent.color = 1, t = t.parent.parent) : (t === t.parent.left && u(e, t = t.parent), t.parent.color = 0, t.parent.parent.color = 1, l(e, t.parent.parent))
  12606. }
  12607. e.root.color = 0
  12608. }, t.updateTreeMetadata = d, t.recomputeTreeMetadata = c
  12609. })), define(n[346], i([0, 1]), (function (e, t) {
  12610. "use strict";
  12611. Object.defineProperty(t, "__esModule", {
  12612. value: !0
  12613. });
  12614. var n = function () {
  12615. this.changeType = 1
  12616. };
  12617. t.ModelRawFlush = n;
  12618. var i = function (e, t) {
  12619. this.changeType = 2, this.lineNumber = e, this.detail = t
  12620. };
  12621. t.ModelRawLineChanged = i;
  12622. var o = function (e, t) {
  12623. this.changeType = 3, this.fromLineNumber = e, this.toLineNumber = t
  12624. };
  12625. t.ModelRawLinesDeleted = o;
  12626. var r = function (e, t, n) {
  12627. this.changeType = 4, this.fromLineNumber = e, this.toLineNumber = t, this.detail = n
  12628. };
  12629. t.ModelRawLinesInserted = r;
  12630. var s = function () {
  12631. this.changeType = 5
  12632. };
  12633. t.ModelRawEOLChanged = s;
  12634. var a = function () {
  12635. function e(e, t, n, i) {
  12636. this.changes = e, this.versionId = t, this.isUndoing = n, this.isRedoing = i
  12637. }
  12638. return e.prototype.containsEvent = function (e) {
  12639. for (var t = 0, n = this.changes.length; t < n; t++) {
  12640. if (this.changes[t].changeType === e) return !0
  12641. }
  12642. return !1
  12643. }, e.merge = function (t, n) {
  12644. return new e([].concat(t.changes).concat(n.changes), n.versionId, t.isUndoing || n.isUndoing, t.isRedoing || n.isRedoing)
  12645. }, e
  12646. }();
  12647. t.ModelRawContentChangedEvent = a;
  12648. var l = function () {
  12649. function e(e, t) {
  12650. this.rawContentChangedEvent = e, this.contentChangedEvent = t
  12651. }
  12652. return e.prototype.merge = function (t) {
  12653. var n = a.merge(this.rawContentChangedEvent, t.rawContentChangedEvent),
  12654. i = e._mergeChangeEvents(this.contentChangedEvent, t.contentChangedEvent);
  12655. return new e(n, i)
  12656. }, e._mergeChangeEvents = function (e, t) {
  12657. return {
  12658. changes: [].concat(e.changes).concat(t.changes),
  12659. eol: t.eol,
  12660. versionId: t.versionId,
  12661. isUndoing: e.isUndoing || t.isUndoing,
  12662. isRedoing: e.isRedoing || t.isRedoing,
  12663. isFlush: e.isFlush || t.isFlush
  12664. }
  12665. }, e
  12666. }();
  12667. t.InternalModelContentChangeEvent = l
  12668. })), define(n[144], i([0, 1, 5, 89, 13, 3, 48]), (function (e, t, n, i, o, r, s) {
  12669. "use strict";
  12670. Object.defineProperty(t, "__esModule", {value: !0});
  12671. var a = function () {
  12672. function e(e, t, n, i) {
  12673. this.searchString = e, this.isRegex = t, this.matchCase = n, this.wordSeparators = i
  12674. }
  12675. return e.prototype.parseSearchRequest = function () {
  12676. if ("" === this.searchString) return null;
  12677. var e;
  12678. e = this.isRegex ? l(this.searchString) : this.searchString.indexOf("\n") >= 0;
  12679. var t = null;
  12680. try {
  12681. t = n.createRegExp(this.searchString, this.isRegex, {
  12682. matchCase: this.matchCase,
  12683. wholeWord: !1,
  12684. multiline: e,
  12685. global: !0,
  12686. unicode: !0
  12687. })
  12688. } catch (e) {
  12689. return null
  12690. }
  12691. if (!t) return null;
  12692. var o = !this.isRegex && !e
  12693. ;
  12694. return o && this.searchString.toLowerCase() !== this.searchString.toUpperCase() && (o = this.matchCase), new u(t, this.wordSeparators ? i.getMapForWordSeparators(this.wordSeparators) : null, o ? this.searchString : null)
  12695. }, e
  12696. }();
  12697. function l(e) {
  12698. if (!e || 0 === e.length) return !1;
  12699. for (var t = 0, n = e.length; t < n; t++) {
  12700. if (92 === e.charCodeAt(t)) {
  12701. if (++t >= n) break;
  12702. var i = e.charCodeAt(t);
  12703. if (110 === i || 114 === i || 87 === i || 119 === i) return !0
  12704. }
  12705. }
  12706. return !1
  12707. }
  12708. t.SearchParams = a, t.isMultilineRegexSource = l;
  12709. var u = function (e, t, n) {
  12710. this.regex = e, this.wordSeparators = t, this.simpleSearch = n
  12711. };
  12712. function d(e, t, n) {
  12713. if (!n) return new s.FindMatch(e, null);
  12714. for (var i = [], o = 0, r = t.length; o < r; o++) i[o] = t[o];
  12715. return new s.FindMatch(e, i)
  12716. }
  12717. t.SearchData = u, t.createFindMatch = d;
  12718. var c = function () {
  12719. function e(e) {
  12720. for (var t = [], n = 0, i = 0, o = e.length; i < o; i++) 10 === e.charCodeAt(i) && (t[n++] = i);
  12721. this._lineFeedsOffsets = t
  12722. }
  12723. return e.prototype.findLineFeedCountBeforeOffset = function (e) {
  12724. var t = this._lineFeedsOffsets, n = 0, i = t.length - 1;
  12725. if (-1 === i) return 0;
  12726. if (e <= t[0]) return 0;
  12727. for (; n < i;) {
  12728. var o = n + ((i - n) / 2 >> 0)
  12729. ;t[o] >= e ? i = o - 1 : t[o + 1] >= e ? (n = o, i = o) : n = o + 1
  12730. }
  12731. return n + 1
  12732. }, e
  12733. }(), h = function () {
  12734. function e() {
  12735. }
  12736. return e.findMatches = function (e, t, n, i, o) {
  12737. var r = t.parseSearchRequest();
  12738. return r ? r.regex.multiline ? this._doFindMatchesMultiline(e, n, new g(r.wordSeparators, r.regex), i, o) : this._doFindMatchesLineByLine(e, n, r, i, o) : []
  12739. }, e._getMultilineMatchRange = function (e, t, n, i, o, s) {
  12740. var a, l, u = 0;
  12741. if (a = i ? t + o + (u = i.findLineFeedCountBeforeOffset(o)) : t + o, i) {
  12742. var d = i.findLineFeedCountBeforeOffset(o + s.length) - u;
  12743. l = a + s.length + d
  12744. } else l = a + s.length;
  12745. var c = e.getPositionAt(a), h = e.getPositionAt(l);
  12746. return new r.Range(c.lineNumber, c.column, h.lineNumber, h.column)
  12747. }, e._doFindMatchesMultiline = function (e, t, n, i, o) {
  12748. var r, s = e.getOffsetAt(t.getStartPosition()), a = e.getValueInRange(t, 1),
  12749. l = "\r\n" === e.getEOL() ? new c(a) : null, u = [], h = 0;
  12750. for (n.reset(0); r = n.next(a);) if (u[h++] = d(this._getMultilineMatchRange(e, s, a, l, r.index, r[0]), r, i), h >= o) return u;
  12751. return u
  12752. }, e._doFindMatchesLineByLine = function (e, t, n, i, o) {
  12753. var r = [], s = 0;
  12754. if (t.startLineNumber === t.endLineNumber) {
  12755. var a = e.getLineContent(t.startLineNumber).substring(t.startColumn - 1, t.endColumn - 1);
  12756. return s = this._findMatchesInLine(n, a, t.startLineNumber, t.startColumn - 1, s, r, i, o), r
  12757. }
  12758. var l = e.getLineContent(t.startLineNumber).substring(t.startColumn - 1);
  12759. s = this._findMatchesInLine(n, l, t.startLineNumber, t.startColumn - 1, s, r, i, o);
  12760. for (var u = t.startLineNumber + 1; u < t.endLineNumber && s < o; u++) s = this._findMatchesInLine(n, e.getLineContent(u), u, 0, s, r, i, o);
  12761. if (s < o) {
  12762. var d = e.getLineContent(t.endLineNumber).substring(0, t.endColumn - 1);
  12763. s = this._findMatchesInLine(n, d, t.endLineNumber, 0, s, r, i, o)
  12764. }
  12765. return r
  12766. }, e._findMatchesInLine = function (e, t, n, i, o, a, l, u) {
  12767. var c = e.wordSeparators;
  12768. if (!l && e.simpleSearch) {
  12769. for (var h = e.simpleSearch, f = h.length, m = t.length, v = -f; -1 !== (v = t.indexOf(h, v + f));) if ((!c || p(c, t, m, v, f)) && (a[o++] = new s.FindMatch(new r.Range(n, v + 1 + i, n, v + 1 + f + i), null), o >= u)) return o;
  12770. return o
  12771. }
  12772. var _, y = new g(e.wordSeparators, e.regex);
  12773. y.reset(0);
  12774. do {
  12775. if ((_ = y.next(t)) && (a[o++] = d(new r.Range(n, _.index + 1 + i, n, _.index + 1 + _[0].length + i), _, l), o >= u)) return o
  12776. } while (_);
  12777. return o
  12778. },
  12779. e.findNextMatch = function (e, t, n, i) {
  12780. var o = t.parseSearchRequest();
  12781. if (!o) return null;
  12782. var r = new g(o.wordSeparators, o.regex);
  12783. return o.regex.multiline ? this._doFindNextMatchMultiline(e, n, r, i) : this._doFindNextMatchLineByLine(e, n, r, i)
  12784. }, e._doFindNextMatchMultiline = function (e, t, n, i) {
  12785. var s = new o.Position(t.lineNumber, 1), a = e.getOffsetAt(s), l = e.getLineCount(),
  12786. u = e.getValueInRange(new r.Range(s.lineNumber, s.column, l, e.getLineMaxColumn(l)), 1),
  12787. h = "\r\n" === e.getEOL() ? new c(u) : null;
  12788. n.reset(t.column - 1);
  12789. var p = n.next(u);
  12790. return p ? d(this._getMultilineMatchRange(e, a, u, h, p.index, p[0]), p, i) : 1 !== t.lineNumber || 1 !== t.column ? this._doFindNextMatchMultiline(e, new o.Position(1, 1), n, i) : null
  12791. }, e._doFindNextMatchLineByLine = function (e, t, n, i) {
  12792. var o = e.getLineCount(), r = t.lineNumber, s = e.getLineContent(r),
  12793. a = this._findFirstMatchInLine(n, s, r, t.column, i);
  12794. if (a) return a;
  12795. for (var l = 1; l <= o; l++) {
  12796. var u = (r + l - 1) % o, d = e.getLineContent(u + 1),
  12797. c = this._findFirstMatchInLine(n, d, u + 1, 1, i);
  12798. if (c) return c
  12799. }
  12800. return null
  12801. }, e._findFirstMatchInLine = function (e, t, n, i, o) {
  12802. e.reset(i - 1)
  12803. ;var s = e.next(t);
  12804. return s ? d(new r.Range(n, s.index + 1, n, s.index + 1 + s[0].length), s, o) : null
  12805. }, e.findPreviousMatch = function (e, t, n, i) {
  12806. var o = t.parseSearchRequest();
  12807. if (!o) return null;
  12808. var r = new g(o.wordSeparators, o.regex);
  12809. return o.regex.multiline ? this._doFindPreviousMatchMultiline(e, n, r, i) : this._doFindPreviousMatchLineByLine(e, n, r, i)
  12810. }, e._doFindPreviousMatchMultiline = function (e, t, n, i) {
  12811. var s = this._doFindMatchesMultiline(e, new r.Range(1, 1, t.lineNumber, t.column), n, i, 9990);
  12812. if (s.length > 0) return s[s.length - 1];
  12813. var a = e.getLineCount();
  12814. return t.lineNumber !== a || t.column !== e.getLineMaxColumn(a) ? this._doFindPreviousMatchMultiline(e, new o.Position(a, e.getLineMaxColumn(a)), n, i) : null
  12815. }, e._doFindPreviousMatchLineByLine = function (e, t, n, i) {
  12816. var o = e.getLineCount(), r = t.lineNumber, s = e.getLineContent(r).substring(0, t.column - 1),
  12817. a = this._findLastMatchInLine(n, s, r, i);
  12818. if (a) return a;
  12819. for (var l = 1; l <= o; l++) {
  12820. var u = (o + r - l - 1) % o, d = e.getLineContent(u + 1),
  12821. c = this._findLastMatchInLine(n, d, u + 1, i);
  12822. if (c) return c
  12823. }
  12824. return null
  12825. }, e._findLastMatchInLine = function (e, t, n, i) {
  12826. var o, s = null;
  12827. for (e.reset(0); o = e.next(t);) s = d(new r.Range(n, o.index + 1, n, o.index + 1 + o[0].length), o, i);
  12828. return s
  12829. }, e
  12830. }();
  12831. function p(e, t, n, i, o) {
  12832. return function (e, t, n, i, o) {
  12833. if (0 === i) return !0;
  12834. var r = t.charCodeAt(i - 1);
  12835. if (0 !== e.get(r)) return !0;
  12836. if (13 === r || 10 === r) return !0;
  12837. if (o > 0) {
  12838. var s = t.charCodeAt(i);
  12839. if (0 !== e.get(s)) return !0
  12840. }
  12841. return !1
  12842. }(e, t, 0, i, o) && function (e, t, n, i, o) {
  12843. if (i + o === n) return !0;
  12844. var r = t.charCodeAt(i + o);
  12845. if (0 !== e.get(r)) return !0;
  12846. if (13 === r || 10 === r) return !0;
  12847. if (o > 0) {
  12848. var s = t.charCodeAt(i + o - 1);
  12849. if (0 !== e.get(s)) return !0
  12850. }
  12851. return !1
  12852. }(e, t, n, i, o)
  12853. }
  12854. t.TextModelSearch = h, t.isValidMatch = p;
  12855. var g = function () {
  12856. function e(e, t) {
  12857. this._wordSeparators = e, this._searchRegex = t, this._prevMatchStartIndex = -1, this._prevMatchLength = 0
  12858. }
  12859. return e.prototype.reset = function (e) {
  12860. this._searchRegex.lastIndex = e, this._prevMatchStartIndex = -1, this._prevMatchLength = 0
  12861. }, e.prototype.next = function (e) {
  12862. var t, n = e.length;
  12863. do {
  12864. if (this._prevMatchStartIndex + this._prevMatchLength === n) return null;
  12865. if (!(t = this._searchRegex.exec(e))) return null;
  12866. var i = t.index, o = t[0].length
  12867. ;
  12868. if (i === this._prevMatchStartIndex && o === this._prevMatchLength) {
  12869. if (0 === o) {
  12870. this._searchRegex.lastIndex += 1;
  12871. continue
  12872. }
  12873. return null
  12874. }
  12875. if (this._prevMatchStartIndex = i, this._prevMatchLength = o, !this._wordSeparators || p(this._wordSeparators, e, n, i, o)) return t
  12876. } while (t);
  12877. return null
  12878. }, e
  12879. }();
  12880. t.Searcher = g
  12881. })), define(n[191], i([0, 1, 13, 3, 48, 345, 144]), (function (e, t, n, i, o, r, s) {
  12882. "use strict";
  12883. function a(e) {
  12884. var t;
  12885. return (t = e[e.length - 1] < 65536 ? new Uint16Array(e.length) : new Uint32Array(e.length)).set(e, 0), t
  12886. }
  12887. Object.defineProperty(t, "__esModule", {value: !0}), t.AverageBufferSize = 65535, t.createUintArray = a;
  12888. var l = function (e, t, n, i, o) {
  12889. this.lineStarts = e, this.cr = t, this.lf = n, this.crlf = i, this.isBasicASCII = o
  12890. };
  12891. function u(e, t) {
  12892. void 0 === t && (t = !0);
  12893. for (var n = [0], i = 1, o = 0, r = e.length; o < r; o++) {
  12894. var s = e.charCodeAt(o);
  12895. 13 === s ? o + 1 < r && 10 === e.charCodeAt(o + 1) ? (n[i++] = o + 2, o++) : n[i++] = o + 1 : 10 === s && (n[i++] = o + 1)
  12896. }
  12897. return t ? a(n) : n
  12898. }
  12899. t.LineStarts = l, t.createLineStartsFast = u, t.createLineStarts = function (e, t) {
  12900. e.length = 0, e[0] = 0;
  12901. for (var n = 1, i = 0, o = 0, r = 0, s = !0, u = 0, d = t.length; u < d; u++) {
  12902. var c = t.charCodeAt(u);
  12903. 13 === c ? u + 1 < d && 10 === t.charCodeAt(u + 1) ? (r++, e[n++] = u + 2, u++) : (i++, e[n++] = u + 1) : 10 === c ? (o++, e[n++] = u + 1) : s && 9 !== c && (c < 32 || c > 126) && (s = !1)
  12904. }
  12905. var h = new l(a(e), i, o, r, s);
  12906. return e.length = 0, h
  12907. };
  12908. var d = function (e, t, n, i, o) {
  12909. this.bufferIndex = e, this.start = t, this.end = n, this.lineFeedCnt = i, this.length = o
  12910. };
  12911. t.Piece = d;
  12912. var c = function (e, t) {
  12913. this.buffer = e, this.lineStarts = t
  12914. };
  12915. t.StringBuffer = c;
  12916. var h = function () {
  12917. function e(e) {
  12918. this._limit = e, this._cache = []
  12919. }
  12920. return e.prototype.get = function (e) {
  12921. for (var t = this._cache.length - 1; t >= 0; t--) {
  12922. var n = this._cache[t];
  12923. if (n.nodeStartOffset <= e && n.nodeStartOffset + n.node.piece.length >= e) return n
  12924. }
  12925. return null
  12926. }, e.prototype.get2 = function (e) {
  12927. for (var t = this._cache.length - 1; t >= 0; t--) {
  12928. var n = this._cache[t];
  12929. if (n.nodeStartLineNumber && n.nodeStartLineNumber < e && n.nodeStartLineNumber + n.node.piece.lineFeedCnt >= e) return n
  12930. }
  12931. return null
  12932. }, e.prototype.set = function (e) {
  12933. this._cache.length >= this._limit && this._cache.shift(), this._cache.push(e)
  12934. }, e.prototype.valdiate = function (e) {
  12935. for (var t = !1, n = this._cache, i = 0; i < n.length; i++) {
  12936. var o = n[i];
  12937. (null === o.node.parent || o.nodeStartOffset >= e) && (n[i] = null, t = !0)
  12938. }
  12939. if (t) {
  12940. for (var r = [], s = 0, a = n; s < a.length; s++) {
  12941. var l = a[s];
  12942. null !== l && r.push(l)
  12943. }
  12944. this._cache = r
  12945. }
  12946. }, e
  12947. }(), p = function () {
  12948. function e(e, t, n) {
  12949. this.create(e, t, n)
  12950. }
  12951. return e.prototype.create = function (e, t, n) {
  12952. this._buffers = [new c("", [0])], this._lastChangeBufferPos = {
  12953. line: 0,
  12954. column: 0
  12955. }, this.root = r.SENTINEL, this._lineCnt = 1, this._length = 0, this._EOL = t, this._EOLLength = t.length, this._EOLNormalized = n;
  12956. for (var i = null, o = 0, s = e.length; o < s; o++) if (e[o].buffer.length > 0) {
  12957. e[o].lineStarts || (e[o].lineStarts = u(e[o].buffer));
  12958. var a = new d(o + 1, {line: 0, column: 0}, {
  12959. line: e[o].lineStarts.length - 1,
  12960. column: e[o].buffer.length - e[o].lineStarts[e[o].lineStarts.length - 1]
  12961. }, e[o].lineStarts.length - 1, e[o].buffer.length);
  12962. this._buffers.push(e[o]), i = this.rbInsertRight(i, a)
  12963. }
  12964. this._searchCache = new h(1), this._lastVisitedLine = {
  12965. lineNumber: 0,
  12966. value: ""
  12967. }, this.computeBufferMetadata()
  12968. }, e.prototype.normalizeEOL = function (e) {
  12969. var n = this, i = t.AverageBufferSize, o = i - Math.floor(i / 3), r = 2 * o, s = "", a = 0, l = []
  12970. ;
  12971. if (this.iterate(this.root, (function (t) {
  12972. var i = n.getNodeContent(t), d = i.length;
  12973. if (a <= o || a + d < r) return s += i, a += d, !0;
  12974. var h = s.replace(/\r\n|\r|\n/g, e);
  12975. return l.push(new c(h, u(h))), s = i, a = d, !0
  12976. })), a > 0) {
  12977. var d = s.replace(/\r\n|\r|\n/g, e);
  12978. l.push(new c(d, u(d)))
  12979. }
  12980. this.create(l, e, !0)
  12981. }, e.prototype.getEOL = function () {
  12982. return this._EOL
  12983. }, e.prototype.setEOL = function (e) {
  12984. this._EOL = e, this._EOLLength = this._EOL.length, this.normalizeEOL(e)
  12985. }, e.prototype.getOffsetAt = function (e, t) {
  12986. for (var n = 0, i = this.root; i !== r.SENTINEL;) if (i.left !== r.SENTINEL && i.lf_left + 1 >= e) i = i.left; else {
  12987. if (i.lf_left + i.piece.lineFeedCnt + 1 >= e) return (n += i.size_left) + (this.getAccumulatedValue(i, e - i.lf_left - 2) + t - 1);
  12988. e -= i.lf_left + i.piece.lineFeedCnt, n += i.size_left + i.piece.length, i = i.right
  12989. }
  12990. return n
  12991. }, e.prototype.getPositionAt = function (e) {
  12992. e = Math.floor(e), e = Math.max(0, e);
  12993. for (var t = this.root, i = 0, o = e; t !== r.SENTINEL;) if (0 !== t.size_left && t.size_left >= e) t = t.left; else {
  12994. if (t.size_left + t.piece.length >= e) {
  12995. var s = this.getIndexOf(t, e - t.size_left);
  12996. if (i += t.lf_left + s.index, 0 === s.index) {
  12997. var a = o - this.getOffsetAt(i + 1, 1);
  12998. return new n.Position(i + 1, a + 1)
  12999. }
  13000. return new n.Position(i + 1, s.remainder + 1)
  13001. }
  13002. if (e -= t.size_left + t.piece.length, i += t.lf_left + t.piece.lineFeedCnt, t.right === r.SENTINEL) {
  13003. a = o - e - this.getOffsetAt(i + 1, 1);
  13004. return new n.Position(i + 1, a + 1)
  13005. }
  13006. t = t.right
  13007. }
  13008. return new n.Position(1, 1)
  13009. }, e.prototype.getValueInRange = function (e, t) {
  13010. if (e.startLineNumber === e.endLineNumber && e.startColumn === e.endColumn) return "";
  13011. var n = this.nodeAt2(e.startLineNumber, e.startColumn), i = this.nodeAt2(e.endLineNumber, e.endColumn),
  13012. o = this.getValueInRange2(n, i);
  13013. return t ? t === this._EOL && this._EOLNormalized && t === this.getEOL() && this._EOLNormalized ? o : o.replace(/\r\n|\r|\n/g, t) : o
  13014. }, e.prototype.getValueInRange2 = function (e, t) {
  13015. if (e.node === t.node) {
  13016. var n = e.node, i = this._buffers[n.piece.bufferIndex].buffer,
  13017. o = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
  13018. return i.substring(o + e.remainder, o + t.remainder)
  13019. }
  13020. var s = e.node, a = this._buffers[s.piece.bufferIndex].buffer,
  13021. l = this.offsetInBuffer(s.piece.bufferIndex, s.piece.start),
  13022. u = a.substring(l + e.remainder, l + s.piece.length);
  13023. for (s = s.next(); s !== r.SENTINEL;) {
  13024. var d = this._buffers[s.piece.bufferIndex].buffer,
  13025. c = this.offsetInBuffer(s.piece.bufferIndex, s.piece.start);
  13026. if (s === t.node) {
  13027. u += d.substring(c, c + t.remainder);
  13028. break
  13029. }
  13030. u += d.substr(c, s.piece.length), s = s.next()
  13031. }
  13032. return u
  13033. }, e.prototype.getLinesContent = function () {
  13034. var e = this, t = [], n = 0, i = "", o = !1;
  13035. return this.iterate(this.root, (function (s) {
  13036. if (s === r.SENTINEL) return !0;
  13037. var a = s.piece, l = a.length;
  13038. if (0 === l) return !0;
  13039. var u = e._buffers[a.bufferIndex].buffer, d = e._buffers[a.bufferIndex].lineStarts,
  13040. c = a.start.line, h = a.end.line, p = d[c] + a.start.column;
  13041. if (o && (10 === u.charCodeAt(p) && (p++, l--), t[n++] = i, i = "", o = !1, 0 === l)) return !0;
  13042. if (c === h) return e._EOLNormalized || 13 !== u.charCodeAt(p + l - 1) ? i += u.substr(p, l) : (o = !0, i += u.substr(p, l - 1)), !0;
  13043. i += e._EOLNormalized ? u.substring(p, Math.max(p, d[c + 1] - e._EOLLength)) : u.substring(p, d[c + 1]).replace(/(\r\n|\r|\n)$/, ""), t[n++] = i
  13044. ;
  13045. for (var g = c + 1; g < h; g++) i = e._EOLNormalized ? u.substring(d[g], d[g + 1] - e._EOLLength) : u.substring(d[g], d[g + 1]).replace(/(\r\n|\r|\n)$/, ""), t[n++] = i;
  13046. return e._EOLNormalized || 13 !== u.charCodeAt(d[h] + a.end.column - 1) ? i = u.substr(d[h], a.end.column) : (o = !0, 0 === a.end.column ? n-- : i = u.substr(d[h], a.end.column - 1)), !0
  13047. })), o && (t[n++] = i, i = ""), t[n++] = i, t
  13048. }, e.prototype.getLength = function () {
  13049. return this._length
  13050. }, e.prototype.getLineCount = function () {
  13051. return this._lineCnt
  13052. }, e.prototype.getLineContent = function (e) {
  13053. return this._lastVisitedLine.lineNumber === e ? this._lastVisitedLine.value : (this._lastVisitedLine.lineNumber = e, e === this._lineCnt ? this._lastVisitedLine.value = this.getLineRawContent(e) : this._EOLNormalized ? this._lastVisitedLine.value = this.getLineRawContent(e, this._EOLLength) : this._lastVisitedLine.value = this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/, ""), this._lastVisitedLine.value)
  13054. }, e.prototype.getLineCharCode = function (e, t) {
  13055. var n = this.nodeAt2(e, t + 1);
  13056. if (n.remainder === n.node.piece.length) {
  13057. var i = n.node.next();
  13058. if (!i) return 0
  13059. ;
  13060. var o = this._buffers[i.piece.bufferIndex],
  13061. r = this.offsetInBuffer(i.piece.bufferIndex, i.piece.start);
  13062. return o.buffer.charCodeAt(r)
  13063. }
  13064. o = this._buffers[n.node.piece.bufferIndex];
  13065. var s = (r = this.offsetInBuffer(n.node.piece.bufferIndex, n.node.piece.start)) + n.remainder;
  13066. return o.buffer.charCodeAt(s)
  13067. }, e.prototype.getLineLength = function (e) {
  13068. if (e === this.getLineCount()) {
  13069. var t = this.getOffsetAt(e, 1);
  13070. return this.getLength() - t
  13071. }
  13072. return this.getOffsetAt(e + 1, 1) - this.getOffsetAt(e, 1) - this._EOLLength
  13073. }, e.prototype.findMatchesInNode = function (e, t, n, o, r, a, l, u, d, c, h) {
  13074. var p, g, f, m = this._buffers[e.piece.bufferIndex],
  13075. v = this.offsetInBuffer(e.piece.bufferIndex, e.piece.start),
  13076. _ = this.offsetInBuffer(e.piece.bufferIndex, r), y = this.offsetInBuffer(e.piece.bufferIndex, a),
  13077. C = {line: 0, column: 0};
  13078. t._wordSeparators ? (g = m.buffer.substring(_, y), f = function (e) {
  13079. return e + _
  13080. }, t.reset(-1)) : (g = m.buffer, f = function (e) {
  13081. return e
  13082. }, t.reset(_));
  13083. do {
  13084. if (p = t.next(g)) {
  13085. if (f(p.index) >= y) return c;
  13086. this.positionInBuffer(e, f(p.index) - v, C)
  13087. ;var b = this.getLineFeedCnt(e.piece.bufferIndex, r, C),
  13088. S = C.line === r.line ? C.column - r.column + o : C.column + 1, w = S + p[0].length;
  13089. if (h[c++] = s.createFindMatch(new i.Range(n + b, S, n + b, w), p, u), f(p.index) + p[0].length >= y) return c;
  13090. if (c >= d) return c
  13091. }
  13092. } while (p);
  13093. return c
  13094. }, e.prototype.findMatchesLineByLine = function (e, t, n, i) {
  13095. var o = [], r = 0, a = new s.Searcher(t.wordSeparators, t.regex),
  13096. l = this.nodeAt2(e.startLineNumber, e.startColumn);
  13097. if (null === l) return [];
  13098. var u = this.nodeAt2(e.endLineNumber, e.endColumn);
  13099. if (null === u) return [];
  13100. var d = this.positionInBuffer(l.node, l.remainder), c = this.positionInBuffer(u.node, u.remainder);
  13101. if (l.node === u.node) return this.findMatchesInNode(l.node, a, e.startLineNumber, e.startColumn, d, c, t, n, i, r, o), o;
  13102. for (var h = e.startLineNumber, p = l.node; p !== u.node;) {
  13103. var g = this.getLineFeedCnt(p.piece.bufferIndex, d, p.piece.end);
  13104. if (g >= 1) {
  13105. var f = this._buffers[p.piece.bufferIndex].lineStarts,
  13106. m = this.offsetInBuffer(p.piece.bufferIndex, p.piece.start), v = f[d.line + g],
  13107. _ = h === e.startLineNumber ? e.startColumn : 1
  13108. ;
  13109. if ((r = this.findMatchesInNode(p, a, h, _, d, this.positionInBuffer(p, v - m), t, n, i, r, o)) >= i) return o;
  13110. h += g
  13111. }
  13112. var y = h === e.startLineNumber ? e.startColumn - 1 : 0;
  13113. if (h === e.endLineNumber) {
  13114. var C = this.getLineContent(h).substring(y, e.endColumn - 1);
  13115. return r = this._findMatchesInLine(t, a, C, e.endLineNumber, y, r, o, n, i), o
  13116. }
  13117. if ((r = this._findMatchesInLine(t, a, this.getLineContent(h).substr(y), h, y, r, o, n, i)) >= i) return o;
  13118. h++, p = (l = this.nodeAt2(h, 1)).node, d = this.positionInBuffer(l.node, l.remainder)
  13119. }
  13120. if (h === e.endLineNumber) {
  13121. var b = h === e.startLineNumber ? e.startColumn - 1 : 0;
  13122. C = this.getLineContent(h).substring(b, e.endColumn - 1);
  13123. return r = this._findMatchesInLine(t, a, C, e.endLineNumber, b, r, o, n, i), o
  13124. }
  13125. var S = h === e.startLineNumber ? e.startColumn : 1;
  13126. return r = this.findMatchesInNode(u.node, a, h, S, d, c, t, n, i, r, o), o
  13127. }, e.prototype._findMatchesInLine = function (e, t, n, r, a, l, u, d, c) {
  13128. var h, p = e.wordSeparators;
  13129. if (!d && e.simpleSearch) {
  13130. for (var g = e.simpleSearch, f = g.length, m = n.length, v = -f; -1 !== (v = n.indexOf(g, v + f));) if ((!p || s.isValidMatch(p, n, m, v, f)) && (u[l++] = new o.FindMatch(new i.Range(r, v + 1 + a, r, v + 1 + f + a), null), l >= c)) return l;
  13131. return l
  13132. }
  13133. t.reset(0);
  13134. do {
  13135. if ((h = t.next(n)) && (u[l++] = s.createFindMatch(new i.Range(r, h.index + 1 + a, r, h.index + 1 + h[0].length + a), h, d), l >= c)) return l
  13136. } while (h);
  13137. return l
  13138. }, e.prototype.insert = function (e, n, i) {
  13139. if (void 0 === i && (i = !1), this._EOLNormalized = this._EOLNormalized && i, this._lastVisitedLine.lineNumber = 0, this._lastVisitedLine.value = "", this.root !== r.SENTINEL) {
  13140. var o = this.nodeAt(e), s = o.node, a = o.remainder, l = o.nodeStartOffset, u = s.piece,
  13141. c = u.bufferIndex, h = this.positionInBuffer(s, a);
  13142. if (0 === s.piece.bufferIndex && u.end.line === this._lastChangeBufferPos.line && u.end.column === this._lastChangeBufferPos.column && l + u.length === e && n.length < t.AverageBufferSize) return this.appendToNode(s, n), void this.computeBufferMetadata();
  13143. if (l === e) this.insertContentToNodeLeft(n, s), this._searchCache.valdiate(e); else if (l + s.piece.length > e) {
  13144. var p = [],
  13145. g = new d(u.bufferIndex, h, u.end, this.getLineFeedCnt(u.bufferIndex, h, u.end), this.offsetInBuffer(c, u.end) - this.offsetInBuffer(c, h));
  13146. if (this.shouldCheckCRLF() && this.endWithCR(n)) if (10 === this.nodeCharCodeAt(s, a)) {
  13147. var f = {line: g.start.line + 1, column: 0};
  13148. g = new d(g.bufferIndex, f, g.end, this.getLineFeedCnt(g.bufferIndex, f, g.end), g.length - 1), n += "\n"
  13149. }
  13150. if (this.shouldCheckCRLF() && this.startWithLF(n)) if (13 === this.nodeCharCodeAt(s, a - 1)) {
  13151. var m = this.positionInBuffer(s, a - 1);
  13152. this.deleteNodeTail(s, m), n = "\r" + n, 0 === s.piece.length && p.push(s)
  13153. } else this.deleteNodeTail(s, h); else this.deleteNodeTail(s, h);
  13154. var v = this.createNewPieces(n);
  13155. g.length > 0 && this.rbInsertRight(s, g);
  13156. for (var _ = s, y = 0; y < v.length; y++) _ = this.rbInsertRight(_, v[y]);
  13157. this.deleteNodes(p)
  13158. } else this.insertContentToNodeRight(n, s)
  13159. } else {
  13160. var C = this.createNewPieces(n);
  13161. for (s = this.rbInsertLeft(null, C[0]), y = 1; y < C.length; y++) s = this.rbInsertRight(s, C[y])
  13162. }
  13163. this.computeBufferMetadata()
  13164. }, e.prototype.delete = function (e, t) {
  13165. if (this._lastVisitedLine.lineNumber = 0, this._lastVisitedLine.value = "",
  13166. !(t <= 0 || this.root === r.SENTINEL)) {
  13167. var n = this.nodeAt(e), i = this.nodeAt(e + t), o = n.node, s = i.node;
  13168. if (o === s) {
  13169. var a = this.positionInBuffer(o, n.remainder), l = this.positionInBuffer(o, i.remainder);
  13170. if (n.nodeStartOffset === e) {
  13171. if (t === o.piece.length) {
  13172. var u = o.next();
  13173. return r.rbDelete(this, o), this.validateCRLFWithPrevNode(u), void this.computeBufferMetadata()
  13174. }
  13175. return this.deleteNodeHead(o, l), this._searchCache.valdiate(e), this.validateCRLFWithPrevNode(o), void this.computeBufferMetadata()
  13176. }
  13177. return n.nodeStartOffset + o.piece.length === e + t ? (this.deleteNodeTail(o, a), this.validateCRLFWithNextNode(o), void this.computeBufferMetadata()) : (this.shrinkNode(o, a, l), void this.computeBufferMetadata())
  13178. }
  13179. var d = [], c = this.positionInBuffer(o, n.remainder);
  13180. this.deleteNodeTail(o, c), this._searchCache.valdiate(e), 0 === o.piece.length && d.push(o);
  13181. var h = this.positionInBuffer(s, i.remainder);
  13182. this.deleteNodeHead(s, h), 0 === s.piece.length && d.push(s);
  13183. for (var p = o.next(); p !== r.SENTINEL && p !== s; p = p.next()) d.push(p);
  13184. var g = 0 === o.piece.length ? o.prev() : o;
  13185. this.deleteNodes(d),
  13186. this.validateCRLFWithNextNode(g), this.computeBufferMetadata()
  13187. }
  13188. }, e.prototype.insertContentToNodeLeft = function (e, t) {
  13189. var n = [];
  13190. if (this.shouldCheckCRLF() && this.endWithCR(e) && this.startWithLF(t)) {
  13191. var i = t.piece, o = {line: i.start.line + 1, column: 0},
  13192. s = new d(i.bufferIndex, o, i.end, this.getLineFeedCnt(i.bufferIndex, o, i.end), i.length - 1);
  13193. t.piece = s, e += "\n", r.updateTreeMetadata(this, t, -1, -1), 0 === t.piece.length && n.push(t)
  13194. }
  13195. for (var a = this.createNewPieces(e), l = this.rbInsertLeft(t, a[a.length - 1]), u = a.length - 2; u >= 0; u--) l = this.rbInsertLeft(l, a[u]);
  13196. this.validateCRLFWithPrevNode(l), this.deleteNodes(n)
  13197. }, e.prototype.insertContentToNodeRight = function (e, t) {
  13198. this.adjustCarriageReturnFromNext(e, t) && (e += "\n");
  13199. for (var n = this.createNewPieces(e), i = this.rbInsertRight(t, n[0]), o = i, r = 1; r < n.length; r++) o = this.rbInsertRight(o, n[r]);
  13200. this.validateCRLFWithPrevNode(i)
  13201. }, e.prototype.positionInBuffer = function (e, t, n) {
  13202. for (var i = e.piece, o = e.piece.bufferIndex, r = this._buffers[o].lineStarts, s = r[i.start.line] + i.start.column + t, a = i.start.line, l = i.end.line, u = 0, d = 0, c = 0; a <= l && (c = r[u = a + (l - a) / 2 | 0], u !== l);) if (d = r[u + 1], s < c) l = u - 1; else {
  13203. if (!(s >= d)) break;
  13204. a = u + 1
  13205. }
  13206. return n ? (n.line = u, n.column = s - c, null) : {line: u, column: s - c}
  13207. }, e.prototype.getLineFeedCnt = function (e, t, n) {
  13208. if (0 === n.column) return n.line - t.line;
  13209. var i = this._buffers[e].lineStarts;
  13210. if (n.line === i.length - 1) return n.line - t.line;
  13211. var o = i[n.line + 1], r = i[n.line] + n.column;
  13212. if (o > r + 1) return n.line - t.line;
  13213. var s = r - 1;
  13214. return 13 === this._buffers[e].buffer.charCodeAt(s) ? n.line - t.line + 1 : n.line - t.line
  13215. }, e.prototype.offsetInBuffer = function (e, t) {
  13216. return this._buffers[e].lineStarts[t.line] + t.column
  13217. }, e.prototype.deleteNodes = function (e) {
  13218. for (var t = 0; t < e.length; t++) r.rbDelete(this, e[t])
  13219. }, e.prototype.createNewPieces = function (e) {
  13220. if (e.length > t.AverageBufferSize) {
  13221. for (var n = []; e.length > t.AverageBufferSize;) {
  13222. var i = e.charCodeAt(t.AverageBufferSize - 1), o = void 0;
  13223. 13 === i || i >= 55296 && i <= 56319 ? (o = e.substring(0, t.AverageBufferSize - 1),
  13224. e = e.substring(t.AverageBufferSize - 1)) : (o = e.substring(0, t.AverageBufferSize), e = e.substring(t.AverageBufferSize));
  13225. var r = u(o);
  13226. n.push(new d(this._buffers.length, {line: 0, column: 0}, {
  13227. line: r.length - 1,
  13228. column: o.length - r[r.length - 1]
  13229. }, r.length - 1, o.length)), this._buffers.push(new c(o, r))
  13230. }
  13231. var s = u(e);
  13232. return n.push(new d(this._buffers.length, {line: 0, column: 0}, {
  13233. line: s.length - 1,
  13234. column: e.length - s[s.length - 1]
  13235. }, s.length - 1, e.length)), this._buffers.push(new c(e, s)), n
  13236. }
  13237. var a = this._buffers[0].buffer.length, l = u(e, !1), h = this._lastChangeBufferPos;
  13238. if (this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 1] === a && 0 !== a && this.startWithLF(e) && this.endWithCR(this._buffers[0].buffer)) {
  13239. this._lastChangeBufferPos = {
  13240. line: this._lastChangeBufferPos.line,
  13241. column: this._lastChangeBufferPos.column + 1
  13242. }, h = this._lastChangeBufferPos;
  13243. for (var p = 0; p < l.length; p++) l[p] += a + 1;
  13244. this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(l.slice(1)), this._buffers[0].buffer += "_" + e, a += 1
  13245. } else {
  13246. if (0 !== a) for (p = 0; p < l.length; p++) l[p] += a
  13247. ;
  13248. this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(l.slice(1)), this._buffers[0].buffer += e
  13249. }
  13250. var g = this._buffers[0].buffer.length, f = this._buffers[0].lineStarts.length - 1,
  13251. m = {line: f, column: g - this._buffers[0].lineStarts[f]},
  13252. v = new d(0, h, m, this.getLineFeedCnt(0, h, m), g - a);
  13253. return this._lastChangeBufferPos = m, [v]
  13254. }, e.prototype.getLineRawContent = function (e, t) {
  13255. void 0 === t && (t = 0);
  13256. var n = this.root, i = "", o = this._searchCache.get2(e);
  13257. if (o) {
  13258. n = o.node;
  13259. var s = this.getAccumulatedValue(n, e - o.nodeStartLineNumber - 1),
  13260. a = this._buffers[n.piece.bufferIndex].buffer,
  13261. l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
  13262. if (o.nodeStartLineNumber + n.piece.lineFeedCnt !== e) {
  13263. var u = this.getAccumulatedValue(n, e - o.nodeStartLineNumber);
  13264. return a.substring(l + s, l + u - t)
  13265. }
  13266. i = a.substring(l + s, l + n.piece.length)
  13267. } else for (var d = 0, c = e; n !== r.SENTINEL;) if (n.left !== r.SENTINEL && n.lf_left >= e - 1) n = n.left; else {
  13268. if (n.lf_left + n.piece.lineFeedCnt > e - 1) {
  13269. s = this.getAccumulatedValue(n, e - n.lf_left - 2), u = this.getAccumulatedValue(n, e - n.lf_left - 1),
  13270. a = this._buffers[n.piece.bufferIndex].buffer, l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
  13271. return d += n.size_left, this._searchCache.set({
  13272. node: n,
  13273. nodeStartOffset: d,
  13274. nodeStartLineNumber: c - (e - 1 - n.lf_left)
  13275. }), a.substring(l + s, l + u - t)
  13276. }
  13277. if (n.lf_left + n.piece.lineFeedCnt === e - 1) {
  13278. s = this.getAccumulatedValue(n, e - n.lf_left - 2), a = this._buffers[n.piece.bufferIndex].buffer, l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
  13279. i = a.substring(l + s, l + n.piece.length);
  13280. break
  13281. }
  13282. e -= n.lf_left + n.piece.lineFeedCnt, d += n.size_left + n.piece.length, n = n.right
  13283. }
  13284. for (n = n.next(); n !== r.SENTINEL;) {
  13285. a = this._buffers[n.piece.bufferIndex].buffer;
  13286. if (n.piece.lineFeedCnt > 0) {
  13287. u = this.getAccumulatedValue(n, 0), l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
  13288. return i += a.substring(l, l + u - t)
  13289. }
  13290. l = this.offsetInBuffer(n.piece.bufferIndex, n.piece.start);
  13291. i += a.substr(l, n.piece.length), n = n.next()
  13292. }
  13293. return i
  13294. }, e.prototype.computeBufferMetadata = function () {
  13295. for (var e = this.root, t = 1, n = 0; e !== r.SENTINEL;) t += e.lf_left + e.piece.lineFeedCnt, n += e.size_left + e.piece.length,
  13296. e = e.right;
  13297. this._lineCnt = t, this._length = n, this._searchCache.valdiate(this._length)
  13298. }, e.prototype.getIndexOf = function (e, t) {
  13299. var n = e.piece, i = this.positionInBuffer(e, t), o = i.line - n.start.line;
  13300. if (this.offsetInBuffer(n.bufferIndex, n.end) - this.offsetInBuffer(n.bufferIndex, n.start) === t) {
  13301. var r = this.getLineFeedCnt(e.piece.bufferIndex, n.start, i);
  13302. if (r !== o) return {index: r, remainder: 0}
  13303. }
  13304. return {index: o, remainder: i.column}
  13305. }, e.prototype.getAccumulatedValue = function (e, t) {
  13306. if (t < 0) return 0;
  13307. var n = e.piece, i = this._buffers[n.bufferIndex].lineStarts, o = n.start.line + t + 1;
  13308. return o > n.end.line ? i[n.end.line] + n.end.column - i[n.start.line] - n.start.column : i[o] - i[n.start.line] - n.start.column
  13309. }, e.prototype.deleteNodeTail = function (e, t) {
  13310. var n = e.piece, i = n.lineFeedCnt, o = this.offsetInBuffer(n.bufferIndex, n.end), s = t,
  13311. a = this.offsetInBuffer(n.bufferIndex, s), l = this.getLineFeedCnt(n.bufferIndex, n.start, s),
  13312. u = l - i, c = a - o, h = n.length + c;
  13313. e.piece = new d(n.bufferIndex, n.start, s, l, h), r.updateTreeMetadata(this, e, c, u)
  13314. }, e.prototype.deleteNodeHead = function (e, t) {
  13315. var n = e.piece, i = n.lineFeedCnt, o = this.offsetInBuffer(n.bufferIndex, n.start), s = t,
  13316. a = this.getLineFeedCnt(n.bufferIndex, s, n.end), l = a - i,
  13317. u = o - this.offsetInBuffer(n.bufferIndex, s), c = n.length + u;
  13318. e.piece = new d(n.bufferIndex, s, n.end, a, c), r.updateTreeMetadata(this, e, u, l)
  13319. }, e.prototype.shrinkNode = function (e, t, n) {
  13320. var i = e.piece, o = i.start, s = i.end, a = i.length, l = i.lineFeedCnt, u = t,
  13321. c = this.getLineFeedCnt(i.bufferIndex, i.start, u),
  13322. h = this.offsetInBuffer(i.bufferIndex, t) - this.offsetInBuffer(i.bufferIndex, o);
  13323. e.piece = new d(i.bufferIndex, i.start, u, c, h), r.updateTreeMetadata(this, e, h - a, c - l);
  13324. var p = new d(i.bufferIndex, n, s, this.getLineFeedCnt(i.bufferIndex, n, s), this.offsetInBuffer(i.bufferIndex, s) - this.offsetInBuffer(i.bufferIndex, n)),
  13325. g = this.rbInsertRight(e, p);
  13326. this.validateCRLFWithPrevNode(g)
  13327. }, e.prototype.appendToNode = function (e, t) {
  13328. this.adjustCarriageReturnFromNext(t, e) && (t += "\n");
  13329. var n = this.shouldCheckCRLF() && this.startWithLF(t) && this.endWithCR(e),
  13330. i = this._buffers[0].buffer.length;
  13331. this._buffers[0].buffer += t
  13332. ;
  13333. for (var o = u(t, !1), s = 0; s < o.length; s++) o[s] += i;
  13334. if (n) {
  13335. var a = this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 2];
  13336. this._buffers[0].lineStarts.pop(), this._lastChangeBufferPos = {
  13337. line: this._lastChangeBufferPos.line - 1,
  13338. column: i - a
  13339. }
  13340. }
  13341. this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(o.slice(1));
  13342. var l = this._buffers[0].lineStarts.length - 1,
  13343. c = {line: l, column: this._buffers[0].buffer.length - this._buffers[0].lineStarts[l]},
  13344. h = e.piece.length + t.length, p = e.piece.lineFeedCnt,
  13345. g = this.getLineFeedCnt(0, e.piece.start, c), f = g - p;
  13346. e.piece = new d(e.piece.bufferIndex, e.piece.start, c, g, h), this._lastChangeBufferPos = c, r.updateTreeMetadata(this, e, t.length, f)
  13347. }, e.prototype.nodeAt = function (e) {
  13348. var t = this.root, n = this._searchCache.get(e);
  13349. if (n) return {node: n.node, nodeStartOffset: n.nodeStartOffset, remainder: e - n.nodeStartOffset};
  13350. for (var i = 0; t !== r.SENTINEL;) if (t.size_left > e) t = t.left; else {
  13351. if (t.size_left + t.piece.length >= e) {
  13352. i += t.size_left;
  13353. var o = {node: t, remainder: e - t.size_left, nodeStartOffset: i};
  13354. return this._searchCache.set(o), o
  13355. }
  13356. e -= t.size_left + t.piece.length, i += t.size_left + t.piece.length, t = t.right
  13357. }
  13358. return null
  13359. }, e.prototype.nodeAt2 = function (e, t) {
  13360. for (var n = this.root, i = 0; n !== r.SENTINEL;) if (n.left !== r.SENTINEL && n.lf_left >= e - 1) n = n.left; else {
  13361. if (n.lf_left + n.piece.lineFeedCnt > e - 1) {
  13362. var o = this.getAccumulatedValue(n, e - n.lf_left - 2),
  13363. s = this.getAccumulatedValue(n, e - n.lf_left - 1);
  13364. return i += n.size_left, {node: n, remainder: Math.min(o + t - 1, s), nodeStartOffset: i}
  13365. }
  13366. if (n.lf_left + n.piece.lineFeedCnt === e - 1) {
  13367. if ((o = this.getAccumulatedValue(n, e - n.lf_left - 2)) + t - 1 <= n.piece.length) return {
  13368. node: n,
  13369. remainder: o + t - 1,
  13370. nodeStartOffset: i
  13371. };
  13372. t -= n.piece.length - o;
  13373. break
  13374. }
  13375. e -= n.lf_left + n.piece.lineFeedCnt, i += n.size_left + n.piece.length, n = n.right
  13376. }
  13377. for (n = n.next(); n !== r.SENTINEL;) {
  13378. if (n.piece.lineFeedCnt > 0) {
  13379. s = this.getAccumulatedValue(n, 0);
  13380. var a = this.offsetOfNode(n);
  13381. return {node: n, remainder: Math.min(t - 1, s), nodeStartOffset: a}
  13382. }
  13383. if (n.piece.length >= t - 1) return {
  13384. node: n,
  13385. remainder: t - 1,
  13386. nodeStartOffset: this.offsetOfNode(n)
  13387. };
  13388. t -= n.piece.length, n = n.next()
  13389. }
  13390. return null
  13391. }, e.prototype.nodeCharCodeAt = function (e, t) {
  13392. if (e.piece.lineFeedCnt < 1) return -1;
  13393. var n = this._buffers[e.piece.bufferIndex],
  13394. i = this.offsetInBuffer(e.piece.bufferIndex, e.piece.start) + t;
  13395. return n.buffer.charCodeAt(i)
  13396. }, e.prototype.offsetOfNode = function (e) {
  13397. if (!e) return 0;
  13398. for (var t = e.size_left; e !== this.root;) e.parent.right === e && (t += e.parent.size_left + e.parent.piece.length), e = e.parent;
  13399. return t
  13400. }, e.prototype.shouldCheckCRLF = function () {
  13401. return !(this._EOLNormalized && "\n" === this._EOL)
  13402. }, e.prototype.startWithLF = function (e) {
  13403. if ("string" == typeof e) return 10 === e.charCodeAt(0);
  13404. if (e === r.SENTINEL || 0 === e.piece.lineFeedCnt) return !1;
  13405. var t = e.piece, n = this._buffers[t.bufferIndex].lineStarts, i = t.start.line,
  13406. o = n[i] + t.start.column;
  13407. return i !== n.length - 1 && (!(n[i + 1] > o + 1) && 10 === this._buffers[t.bufferIndex].buffer.charCodeAt(o))
  13408. }, e.prototype.endWithCR = function (e) {
  13409. return "string" == typeof e ? 13 === e.charCodeAt(e.length - 1) : e !== r.SENTINEL && 0 !== e.piece.lineFeedCnt && 13 === this.nodeCharCodeAt(e, e.piece.length - 1)
  13410. }, e.prototype.validateCRLFWithPrevNode = function (e) {
  13411. if (this.shouldCheckCRLF() && this.startWithLF(e)) {
  13412. var t = e.prev();
  13413. this.endWithCR(t) && this.fixCRLF(t, e)
  13414. }
  13415. }, e.prototype.validateCRLFWithNextNode = function (e) {
  13416. if (this.shouldCheckCRLF() && this.endWithCR(e)) {
  13417. var t = e.next();
  13418. this.startWithLF(t) && this.fixCRLF(e, t)
  13419. }
  13420. }, e.prototype.fixCRLF = function (e, t) {
  13421. var n, i = [], o = this._buffers[e.piece.bufferIndex].lineStarts;
  13422. n = 0 === e.piece.end.column ? {
  13423. line: e.piece.end.line - 1,
  13424. column: o[e.piece.end.line] - o[e.piece.end.line - 1] - 1
  13425. } : {line: e.piece.end.line, column: e.piece.end.column - 1};
  13426. var s = e.piece.length - 1, a = e.piece.lineFeedCnt - 1;
  13427. e.piece = new d(e.piece.bufferIndex, e.piece.start, n, a, s), r.updateTreeMetadata(this, e, -1, -1), 0 === e.piece.length && i.push(e);
  13428. var l = {line: t.piece.start.line + 1, column: 0}, u = t.piece.length - 1,
  13429. c = this.getLineFeedCnt(t.piece.bufferIndex, l, t.piece.end);
  13430. t.piece = new d(t.piece.bufferIndex, l, t.piece.end, c, u), r.updateTreeMetadata(this, t, -1, -1), 0 === t.piece.length && i.push(t);
  13431. var h = this.createNewPieces("\r\n");
  13432. this.rbInsertRight(e, h[0]);
  13433. for (var p = 0; p < i.length; p++) r.rbDelete(this, i[p])
  13434. },
  13435. e.prototype.adjustCarriageReturnFromNext = function (e, t) {
  13436. if (this.shouldCheckCRLF() && this.endWithCR(e)) {
  13437. var n = t.next();
  13438. if (this.startWithLF(n)) {
  13439. if (e += "\n", 1 === n.piece.length) r.rbDelete(this, n); else {
  13440. var i = n.piece, o = {line: i.start.line + 1, column: 0}, s = i.length - 1,
  13441. a = this.getLineFeedCnt(i.bufferIndex, o, i.end);
  13442. n.piece = new d(i.bufferIndex, o, i.end, a, s), r.updateTreeMetadata(this, n, -1, -1)
  13443. }
  13444. return !0
  13445. }
  13446. }
  13447. return !1
  13448. }, e.prototype.iterate = function (e, t) {
  13449. if (e === r.SENTINEL) return t(r.SENTINEL);
  13450. var n = this.iterate(e.left, t);
  13451. return n ? t(e) && this.iterate(e.right, t) : n
  13452. }, e.prototype.getNodeContent = function (e) {
  13453. if (e === r.SENTINEL) return "";
  13454. var t = this._buffers[e.piece.bufferIndex], n = e.piece,
  13455. i = this.offsetInBuffer(n.bufferIndex, n.start), o = this.offsetInBuffer(n.bufferIndex, n.end);
  13456. return t.buffer.substring(i, o)
  13457. }, e.prototype.rbInsertRight = function (e, t) {
  13458. var n = new r.TreeNode(t, 1);
  13459. if (n.left = r.SENTINEL, n.right = r.SENTINEL, n.parent = r.SENTINEL, n.size_left = 0, n.lf_left = 0, this.root === r.SENTINEL) this.root = n, n.color = 0; else if (e.right === r.SENTINEL) e.right = n,
  13460. n.parent = e; else {
  13461. var i = r.leftest(e.right);
  13462. i.left = n, n.parent = i
  13463. }
  13464. return r.fixInsert(this, n), n
  13465. }, e.prototype.rbInsertLeft = function (e, t) {
  13466. var n = new r.TreeNode(t, 1);
  13467. if (n.left = r.SENTINEL, n.right = r.SENTINEL, n.parent = r.SENTINEL, n.size_left = 0, n.lf_left = 0, this.root === r.SENTINEL) this.root = n, n.color = 0; else if (e.left === r.SENTINEL) e.left = n, n.parent = e; else {
  13468. var i = r.righttest(e.left);
  13469. i.right = n, n.parent = i
  13470. }
  13471. return r.fixInsert(this, n), n
  13472. }, e
  13473. }();
  13474. t.PieceTreeBase = p
  13475. })), define(n[347], i([0, 1, 5, 3, 48, 191]), (function (e, t, n, i, o, r) {
  13476. "use strict";
  13477. Object.defineProperty(t, "__esModule", {value: !0});
  13478. var s = function () {
  13479. function e(e, t, n, i, o, s) {
  13480. this._BOM = t, this._mightContainNonBasicASCII = !o, this._mightContainRTL = i, this._pieceTree = new r.PieceTreeBase(e, n, s)
  13481. }
  13482. return e.prototype.mightContainRTL = function () {
  13483. return this._mightContainRTL
  13484. }, e.prototype.mightContainNonBasicASCII = function () {
  13485. return this._mightContainNonBasicASCII
  13486. }, e.prototype.getBOM = function () {
  13487. return this._BOM
  13488. }, e.prototype.getEOL = function () {
  13489. return this._pieceTree.getEOL()
  13490. },
  13491. e.prototype.getOffsetAt = function (e, t) {
  13492. return this._pieceTree.getOffsetAt(e, t)
  13493. }, e.prototype.getPositionAt = function (e) {
  13494. return this._pieceTree.getPositionAt(e)
  13495. }, e.prototype.getRangeAt = function (e, t) {
  13496. var n = e + t, o = this.getPositionAt(e), r = this.getPositionAt(n);
  13497. return new i.Range(o.lineNumber, o.column, r.lineNumber, r.column)
  13498. }, e.prototype.getValueInRange = function (e, t) {
  13499. if (void 0 === t && (t = 0), e.isEmpty()) return "";
  13500. var n = this._getEndOfLine(t);
  13501. return this._pieceTree.getValueInRange(e, n)
  13502. }, e.prototype.getValueLengthInRange = function (e, t) {
  13503. if (void 0 === t && (t = 0), e.isEmpty()) return 0;
  13504. if (e.startLineNumber === e.endLineNumber) return e.endColumn - e.startColumn;
  13505. var n = this.getOffsetAt(e.startLineNumber, e.startColumn);
  13506. return this.getOffsetAt(e.endLineNumber, e.endColumn) - n
  13507. }, e.prototype.getCharacterCountInRange = function (e, t) {
  13508. if (void 0 === t && (t = 0), this._mightContainNonBasicASCII) {
  13509. for (var i = 0, o = e.startLineNumber, r = e.endLineNumber, s = o; s <= r; s++) for (var a = this.getLineContent(s), l = s === o ? e.startColumn - 1 : 0, u = s === r ? e.endColumn - 1 : a.length, d = l; d < u; d++) n.isHighSurrogate(a.charCodeAt(d)) ? (i += 1, d += 1) : i += 1;
  13510. return i += this._getEndOfLine(t).length * (r - o)
  13511. }
  13512. return this.getValueLengthInRange(e, t)
  13513. }, e.prototype.getLength = function () {
  13514. return this._pieceTree.getLength()
  13515. }, e.prototype.getLineCount = function () {
  13516. return this._pieceTree.getLineCount()
  13517. }, e.prototype.getLinesContent = function () {
  13518. return this._pieceTree.getLinesContent()
  13519. }, e.prototype.getLineContent = function (e) {
  13520. return this._pieceTree.getLineContent(e)
  13521. }, e.prototype.getLineCharCode = function (e, t) {
  13522. return this._pieceTree.getLineCharCode(e, t)
  13523. }, e.prototype.getLineLength = function (e) {
  13524. return this._pieceTree.getLineLength(e)
  13525. }, e.prototype.getLineFirstNonWhitespaceColumn = function (e) {
  13526. var t = n.firstNonWhitespaceIndex(this.getLineContent(e));
  13527. return -1 === t ? 0 : t + 1
  13528. }, e.prototype.getLineLastNonWhitespaceColumn = function (e) {
  13529. var t = n.lastNonWhitespaceIndex(this.getLineContent(e))
  13530. ;
  13531. return -1 === t ? 0 : t + 2
  13532. }, e.prototype._getEndOfLine = function (e) {
  13533. switch (e) {
  13534. case 1:
  13535. return "\n";
  13536. case 2:
  13537. return "\r\n";
  13538. case 0:
  13539. return this.getEOL()
  13540. }
  13541. throw new Error("Unknown EOL preference")
  13542. }, e.prototype.setEOL = function (e) {
  13543. this._pieceTree.setEOL(e)
  13544. }, e.prototype.applyEdits = function (t, i) {
  13545. for (var r = this._mightContainRTL, s = this._mightContainNonBasicASCII, a = !0, l = [], u = 0; u < t.length; u++) {
  13546. var d = t[u];
  13547. a && d._isTracked && (a = !1);
  13548. var c = d.range;
  13549. !r && d.text && (r = n.containsRTL(d.text)), !s && d.text && (s = !n.isBasicASCII(d.text)), l[u] = {
  13550. sortIndex: u,
  13551. identifier: d.identifier || null,
  13552. range: c,
  13553. rangeOffset: this.getOffsetAt(c.startLineNumber, c.startColumn),
  13554. rangeLength: this.getValueLengthInRange(c),
  13555. lines: d.text ? d.text.split(/\r\n|\r|\n/) : null,
  13556. forceMoveMarkers: Boolean(d.forceMoveMarkers),
  13557. isAutoWhitespaceEdit: d.isAutoWhitespaceEdit || !1
  13558. }
  13559. }
  13560. l.sort(e._sortOpsAscending);
  13561. for (var h = !1, p = (u = 0, l.length - 1); u < p; u++) {
  13562. var g = l[u].range.getEndPosition(), f = l[u + 1].range.getStartPosition();
  13563. if (f.isBeforeOrEqual(g)) {
  13564. if (f.isBefore(g)) throw new Error("Overlapping ranges are not allowed!");
  13565. h = !0
  13566. }
  13567. }
  13568. a && (l = this._reduceOperations(l));
  13569. var m = e._getInverseEditRanges(l), v = [];
  13570. for (u = 0; u < l.length; u++) {
  13571. d = l[u];
  13572. var _ = m[u];
  13573. if (i && d.isAutoWhitespaceEdit && d.range.isEmpty()) for (var y = _.startLineNumber; y <= _.endLineNumber; y++) {
  13574. var C = "";
  13575. y === _.startLineNumber && (C = this.getLineContent(d.range.startLineNumber), -1 !== n.firstNonWhitespaceIndex(C)) || v.push({
  13576. lineNumber: y,
  13577. oldContent: C
  13578. })
  13579. }
  13580. }
  13581. var b = [];
  13582. for (u = 0; u < l.length; u++) {
  13583. d = l[u], _ = m[u];
  13584. b[u] = {
  13585. sortIndex: d.sortIndex,
  13586. identifier: d.identifier,
  13587. range: _,
  13588. text: this.getValueInRange(d.range),
  13589. forceMoveMarkers: d.forceMoveMarkers
  13590. }
  13591. }
  13592. h || b.sort((function (e, t) {
  13593. return e.sortIndex - t.sortIndex
  13594. })), this._mightContainRTL = r, this._mightContainNonBasicASCII = s;
  13595. var S = this._doApplyEdits(l), w = null;
  13596. if (i && v.length > 0) {
  13597. v.sort((function (e, t) {
  13598. return t.lineNumber - e.lineNumber
  13599. })), w = [];
  13600. u = 0;
  13601. for (var E = v.length; u < E; u++) {
  13602. y = v[u].lineNumber;
  13603. if (!(u > 0 && v[u - 1].lineNumber === y)) {
  13604. var L = v[u].oldContent, D = this.getLineContent(y)
  13605. ;0 !== D.length && D !== L && -1 === n.firstNonWhitespaceIndex(D) && w.push(y)
  13606. }
  13607. }
  13608. }
  13609. return new o.ApplyEditsResult(b, S, w)
  13610. }, e.prototype._reduceOperations = function (e) {
  13611. return e.length < 1e3 ? e : [this._toSingleEditOperation(e)]
  13612. }, e.prototype._toSingleEditOperation = function (e) {
  13613. for (var t = !1, n = e[0].range, o = e[e.length - 1].range, r = new i.Range(n.startLineNumber, n.startColumn, o.endLineNumber, o.endColumn), s = n.startLineNumber, a = n.startColumn, l = [], u = 0, d = e.length; u < d; u++) {
  13614. var c = e[u], h = c.range;
  13615. t = t || c.forceMoveMarkers;
  13616. for (var p = s; p < h.startLineNumber; p++) p === s ? l.push(this.getLineContent(p).substring(a - 1)) : (l.push("\n"), l.push(this.getLineContent(p)));
  13617. if (h.startLineNumber === s ? l.push(this.getLineContent(h.startLineNumber).substring(a - 1, h.startColumn - 1)) : (l.push("\n"), l.push(this.getLineContent(h.startLineNumber).substring(0, h.startColumn - 1))), c.lines) for (var g = 0, f = c.lines.length; g < f; g++) 0 !== g && l.push("\n"), l.push(c.lines[g]);
  13618. s = c.range.endLineNumber, a = c.range.endColumn
  13619. }
  13620. return {
  13621. sortIndex: 0,
  13622. identifier: e[0].identifier,
  13623. range: r,
  13624. rangeOffset: this.getOffsetAt(r.startLineNumber, r.startColumn),
  13625. rangeLength: this.getValueLengthInRange(r, 0),
  13626. lines: l.join("").split("\n"),
  13627. forceMoveMarkers: t,
  13628. isAutoWhitespaceEdit: !1
  13629. }
  13630. }, e.prototype._doApplyEdits = function (t) {
  13631. t.sort(e._sortOpsDescending);
  13632. for (var n = [], o = 0; o < t.length; o++) {
  13633. var r = t[o], s = r.range.startLineNumber, a = r.range.startColumn, l = r.range.endLineNumber,
  13634. u = r.range.endColumn;
  13635. if (s !== l || a !== u || r.lines && 0 !== r.lines.length) {
  13636. var d = l - s, c = r.lines ? r.lines.length - 1 : 0, h = Math.min(d, c),
  13637. p = r.lines ? r.lines.join(this.getEOL()) : "";
  13638. if (p ? (this._pieceTree.delete(r.rangeOffset, r.rangeLength), this._pieceTree.insert(r.rangeOffset, p, !0)) : this._pieceTree.delete(r.rangeOffset, r.rangeLength), h < c) {
  13639. for (var g = [], f = h + 1; f <= c; f++) g.push(r.lines[f]);
  13640. g[g.length - 1] = this.getLineContent(s + c - 1)
  13641. }
  13642. var m = new i.Range(s, a, l, u);
  13643. n.push({
  13644. range: m,
  13645. rangeLength: r.rangeLength,
  13646. text: p,
  13647. rangeOffset: r.rangeOffset,
  13648. forceMoveMarkers: r.forceMoveMarkers
  13649. })
  13650. }
  13651. }
  13652. return n
  13653. }, e.prototype.findMatchesLineByLine = function (e, t, n, i) {
  13654. return this._pieceTree.findMatchesLineByLine(e, t, n, i)
  13655. }, e._getInverseEditRanges = function (e) {
  13656. for (var t = [], n = 0, o = 0, r = null, s = 0, a = e.length; s < a; s++) {
  13657. var l = e[s], u = void 0, d = void 0;
  13658. r ? r.range.endLineNumber === l.range.startLineNumber ? (u = n, d = o + (l.range.startColumn - r.range.endColumn)) : (u = n + (l.range.startLineNumber - r.range.endLineNumber), d = l.range.startColumn) : (u = l.range.startLineNumber, d = l.range.startColumn);
  13659. var c = void 0;
  13660. if (l.lines && l.lines.length > 0) {
  13661. var h = l.lines.length, p = l.lines[0], g = l.lines[h - 1];
  13662. c = 1 === h ? new i.Range(u, d, u, d + p.length) : new i.Range(u, d, u + h - 1, g.length + 1)
  13663. } else c = new i.Range(u, d, u, d);
  13664. n = c.endLineNumber, o = c.endColumn, t.push(c), r = l
  13665. }
  13666. return t
  13667. }, e._sortOpsAscending = function (e, t) {
  13668. var n = i.Range.compareRangesUsingEnds(e.range, t.range);
  13669. return 0 === n ? e.sortIndex - t.sortIndex : n
  13670. }, e._sortOpsDescending = function (e, t) {
  13671. var n = i.Range.compareRangesUsingEnds(e.range, t.range);
  13672. return 0 === n ? t.sortIndex - e.sortIndex : -n
  13673. }, e
  13674. }();
  13675. t.PieceTreeTextBuffer = s
  13676. })), define(n[348], i([0, 1, 5, 191, 347]), (function (e, t, n, i, o) {
  13677. "use strict"
  13678. ;Object.defineProperty(t, "__esModule", {value: !0});
  13679. var r = function () {
  13680. function e(e, t, n, i, o, r, s, a) {
  13681. this._chunks = e, this._bom = t, this._cr = n, this._lf = i, this._crlf = o, this._containsRTL = r, this._isBasicASCII = s, this._normalizeEOL = a
  13682. }
  13683. return e.prototype._getEOL = function (e) {
  13684. var t = this._cr + this._lf + this._crlf, n = this._cr + this._crlf;
  13685. return 0 === t ? 1 === e ? "\n" : "\r\n" : n > t / 2 ? "\r\n" : "\n"
  13686. }, e.prototype.create = function (e) {
  13687. var t = this._getEOL(e), n = this._chunks;
  13688. if (this._normalizeEOL && ("\r\n" === t && (this._cr > 0 || this._lf > 0) || "\n" === t && (this._cr > 0 || this._crlf > 0))) for (var r = 0, s = n.length; r < s; r++) {
  13689. var a = n[r].buffer.replace(/\r\n|\r|\n/g, t), l = i.createLineStartsFast(a);
  13690. n[r] = new i.StringBuffer(a, l)
  13691. }
  13692. return new o.PieceTreeTextBuffer(n, this._bom, t, this._containsRTL, this._isBasicASCII, this._normalizeEOL)
  13693. }, e
  13694. }();
  13695. t.PieceTreeTextBufferFactory = r;
  13696. var s = function () {
  13697. function e() {
  13698. this.chunks = [], this.BOM = "", this._hasPreviousChar = !1, this._previousChar = 0, this._tmpLineStarts = [], this.cr = 0, this.lf = 0, this.crlf = 0, this.containsRTL = !1, this.isBasicASCII = !0
  13699. }
  13700. return e.prototype.acceptChunk = function (e) {
  13701. if (0 !== e.length) {
  13702. 0 === this.chunks.length && n.startsWithUTF8BOM(e) && (this.BOM = n.UTF8_BOM_CHARACTER, e = e.substr(1));
  13703. var t = e.charCodeAt(e.length - 1);
  13704. 13 === t || t >= 55296 && t <= 56319 ? (this._acceptChunk1(e.substr(0, e.length - 1), !1), this._hasPreviousChar = !0, this._previousChar = t) : (this._acceptChunk1(e, !1), this._hasPreviousChar = !1, this._previousChar = t)
  13705. }
  13706. }, e.prototype._acceptChunk1 = function (e, t) {
  13707. (t || 0 !== e.length) && (this._hasPreviousChar ? this._acceptChunk2(String.fromCharCode(this._previousChar) + e) : this._acceptChunk2(e))
  13708. }, e.prototype._acceptChunk2 = function (e) {
  13709. var t = i.createLineStarts(this._tmpLineStarts, e);
  13710. this.chunks.push(new i.StringBuffer(e, t.lineStarts)), this.cr += t.cr, this.lf += t.lf, this.crlf += t.crlf, this.isBasicASCII && (this.isBasicASCII = t.isBasicASCII), this.isBasicASCII || this.containsRTL || (this.containsRTL = n.containsRTL(e))
  13711. }, e.prototype.finish = function (e) {
  13712. return void 0 === e && (e = !0), this._finish(), new r(this.chunks, this.BOM, this.cr, this.lf, this.crlf, this.containsRTL, this.isBasicASCII, e)
  13713. }, e.prototype._finish = function () {
  13714. if (0 === this.chunks.length && this._acceptChunk1("", !0), this._hasPreviousChar) {
  13715. this._hasPreviousChar = !1;
  13716. var e = this.chunks[this.chunks.length - 1];
  13717. e.buffer += String.fromCharCode(this._previousChar);
  13718. var t = i.createLineStartsFast(e.buffer);
  13719. e.lineStarts = t, 13 === this._previousChar && this.cr++
  13720. }
  13721. }, e
  13722. }();
  13723. t.PieceTreeTextBufferBuilder = s
  13724. })), define(n[109], i([0, 1]), (function (e, t) {
  13725. "use strict";
  13726. Object.defineProperty(t, "__esModule", {value: !0}), t.USUAL_WORD_SEPARATORS = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?", t.DEFAULT_WORD_REGEXP = function (e) {
  13727. void 0 === e && (e = "");
  13728. for (var n = "(-?\\d*\\.\\d\\w*)|([^", i = 0, o = t.USUAL_WORD_SEPARATORS; i < o.length; i++) {
  13729. var r = o[i];
  13730. e.indexOf(r) >= 0 || (n += "\\" + r)
  13731. }
  13732. return n += "\\s]+)", new RegExp(n, "g")
  13733. }(), t.ensureValidWordDefinition = function (e) {
  13734. var n = t.DEFAULT_WORD_REGEXP;
  13735. if (e && e instanceof RegExp) if (e.global) n = e; else {
  13736. var i = "g";
  13737. e.ignoreCase && (i += "i"), e.multiline && (i += "m"), e.unicode && (i += "u"), n = new RegExp(e.source, i)
  13738. }
  13739. return n.lastIndex = 0, n
  13740. }, t.getWordAtText = function (e, t, n, i) {
  13741. t.lastIndex = 0
  13742. ;var o = t.exec(n);
  13743. if (!o) return null;
  13744. var r = o[0].indexOf(" ") >= 0 ? function (e, t, n, i) {
  13745. var o, r = e - 1 - i;
  13746. for (t.lastIndex = 0; o = t.exec(n);) {
  13747. var s = o.index || 0;
  13748. if (s > r) return null;
  13749. if (t.lastIndex >= r) return {word: o[0], startColumn: i + 1 + s, endColumn: i + 1 + t.lastIndex}
  13750. }
  13751. return null
  13752. }(e, t, n, i) : function (e, t, n, i) {
  13753. var o, r = e - 1 - i, s = n.lastIndexOf(" ", r - 1) + 1;
  13754. for (t.lastIndex = s; o = t.exec(n);) {
  13755. var a = o.index || 0;
  13756. if (a <= r && t.lastIndex >= r) return {
  13757. word: o[0],
  13758. startColumn: i + 1 + a,
  13759. endColumn: i + 1 + t.lastIndex
  13760. }
  13761. }
  13762. return null
  13763. }(e, t, n, i);
  13764. return t.lastIndex = 0, r
  13765. }
  13766. })), define(n[349], i([0, 1]), (function (e, t) {
  13767. "use strict";
  13768. Object.defineProperty(t, "__esModule", {value: !0});
  13769. var n = function () {
  13770. function e(e) {
  13771. this._languageIdentifier = e
  13772. }
  13773. return e.prototype.getId = function () {
  13774. return this._languageIdentifier.language
  13775. }, e
  13776. }();
  13777. t.FrankensteinMode = n
  13778. })), define(n[90], i([0, 1]), (function (e, t) {
  13779. "use strict";
  13780. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  13781. e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent"
  13782. }(t.IndentAction || (t.IndentAction = {}))
  13783. ;var n = function () {
  13784. function e(e) {
  13785. if (this.open = e.open, this.close = e.close, this._standardTokenMask = 0, Array.isArray(e.notIn)) for (var t = 0, n = e.notIn.length; t < n; t++) {
  13786. switch (e.notIn[t]) {
  13787. case"string":
  13788. this._standardTokenMask |= 2;
  13789. break;
  13790. case"comment":
  13791. this._standardTokenMask |= 1;
  13792. break;
  13793. case"regex":
  13794. this._standardTokenMask |= 4
  13795. }
  13796. }
  13797. }
  13798. return e.prototype.isOK = function (e) {
  13799. return 0 == (this._standardTokenMask & e)
  13800. }, e
  13801. }();
  13802. t.StandardAutoClosingPairConditional = n
  13803. })), define(n[350], i([0, 1, 178]), (function (e, t, n) {
  13804. "use strict";
  13805. Object.defineProperty(t, "__esModule", {value: !0}), t.score = function e(t, i, o, r) {
  13806. if (Array.isArray(t)) {
  13807. for (var s = 0, a = 0, l = t; a < l.length; a++) {
  13808. var u = e(l[a], i, o, r);
  13809. if (10 === u) return u;
  13810. u > s && (s = u)
  13811. }
  13812. return s
  13813. }
  13814. if ("string" == typeof t) return r ? "*" === t ? 5 : t === o ? 10 : 0 : 0;
  13815. if (t) {
  13816. var d = t.language, c = t.pattern, h = t.scheme, p = t.hasAccessToAllModels;
  13817. if (!r && !p) return 0;
  13818. s = 0;
  13819. if (h) if (h === i.scheme) s = 10; else {
  13820. if ("*" !== h) return 0;
  13821. s = 5
  13822. }
  13823. if (d) if (d === o) s = 10; else {
  13824. if ("*" !== d) return 0;
  13825. s = Math.max(s, 5)
  13826. }
  13827. if (c) {
  13828. if (c !== i.fsPath && !n.match(c, i.fsPath)) return 0;
  13829. s = 10
  13830. }
  13831. return s
  13832. }
  13833. return 0
  13834. }
  13835. })), define(n[351], i([0, 1, 79]), (function (e, t, n) {
  13836. "use strict";
  13837. Object.defineProperty(t, "__esModule", {value: !0});
  13838. var i = function () {
  13839. function e(e, t, n) {
  13840. for (var i = new Uint8Array(e * t), o = 0, r = e * t; o < r; o++) i[o] = n;
  13841. this._data = i, this.rows = e, this.cols = t
  13842. }
  13843. return e.prototype.get = function (e, t) {
  13844. return this._data[e * this.cols + t]
  13845. }, e.prototype.set = function (e, t, n) {
  13846. this._data[e * this.cols + t] = n
  13847. }, e
  13848. }();
  13849. t.Uint8Matrix = i;
  13850. var o = function () {
  13851. function e(e) {
  13852. for (var t = 0, n = 0, o = 0, r = e.length; o < r; o++) {
  13853. var s = e[o], a = s[0];
  13854. (d = s[1]) > t && (t = d), a > n && (n = a), (c = s[2]) > n && (n = c)
  13855. }
  13856. var l = new i(++n, ++t, 0);
  13857. for (o = 0, r = e.length; o < r; o++) {
  13858. var u = e[o], d = (a = u[0], u[1]), c = u[2];
  13859. l.set(a, d, c)
  13860. }
  13861. this._states = l, this._maxCharCode = t
  13862. }
  13863. return e.prototype.nextState = function (e, t) {
  13864. return t < 0 || t >= this._maxCharCode ? 0 : this._states.get(e, t)
  13865. }, e
  13866. }();
  13867. t.StateMachine = o;
  13868. var r = null;
  13869. var s = null;
  13870. var a = function () {
  13871. function e() {
  13872. }
  13873. return e._createLink = function (e, t, n, i, o) {
  13874. var r = o - 1;
  13875. do {
  13876. var s = t.charCodeAt(r);
  13877. if (2 !== e.get(s)) break;
  13878. r--
  13879. } while (r > i);
  13880. if (i > 0) {
  13881. var a = t.charCodeAt(i - 1), l = t.charCodeAt(r)
  13882. ;(40 === a && 41 === l || 91 === a && 93 === l || 123 === a && 125 === l) && r--
  13883. }
  13884. return {
  13885. range: {startLineNumber: n, startColumn: i + 1, endLineNumber: n, endColumn: r + 2},
  13886. url: t.substring(i, r + 1)
  13887. }
  13888. }, e.computeLinks = function (t, i) {
  13889. void 0 === i && (null === r && (r = new o([[1, 104, 2], [1, 72, 2], [1, 102, 6], [1, 70, 6], [2, 116, 3], [2, 84, 3], [3, 116, 4], [3, 84, 4], [4, 112, 5], [4, 80, 5], [5, 115, 9], [5, 83, 9], [5, 58, 10], [6, 105, 7], [6, 73, 7], [7, 108, 8], [7, 76, 8], [8, 101, 9], [8, 69, 9], [9, 58, 10], [10, 47, 11], [11, 47, 12]])), i = r);
  13890. for (var a = function () {
  13891. if (null === s) {
  13892. s = new n.CharacterClassifier(0);
  13893. for (var e = 0; e < " \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length; e++) s.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e), 1);
  13894. for (e = 0; e < ".,;".length; e++) s.set(".,;".charCodeAt(e), 2)
  13895. }
  13896. return s
  13897. }(), l = [], u = 1, d = t.getLineCount(); u <= d; u++) {
  13898. for (var c = t.getLineContent(u), h = c.length, p = 0, g = 0, f = 0, m = 1, v = !1, _ = !1, y = !1; p < h;) {
  13899. var C = !1, b = c.charCodeAt(p);
  13900. if (13 === m) {
  13901. var S = void 0;
  13902. switch (b) {
  13903. case 40:
  13904. v = !0, S = 0;
  13905. break;
  13906. case 41:
  13907. S = v ? 0 : 1;
  13908. break;
  13909. case 91:
  13910. _ = !0, S = 0;
  13911. break;
  13912. case 93:
  13913. S = _ ? 0 : 1;
  13914. break;
  13915. case 123:
  13916. y = !0, S = 0;
  13917. break
  13918. ;
  13919. case 125:
  13920. S = y ? 0 : 1;
  13921. break;
  13922. case 39:
  13923. S = 34 === f || 96 === f ? 0 : 1;
  13924. break;
  13925. case 34:
  13926. S = 39 === f || 96 === f ? 0 : 1;
  13927. break;
  13928. case 96:
  13929. S = 39 === f || 34 === f ? 0 : 1;
  13930. break;
  13931. case 42:
  13932. S = 42 === f ? 1 : 0;
  13933. break;
  13934. case 124:
  13935. S = 124 === f ? 1 : 0;
  13936. break;
  13937. default:
  13938. S = a.get(b)
  13939. }
  13940. 1 === S && (l.push(e._createLink(a, c, u, g, p)), C = !0)
  13941. } else if (12 === m) {
  13942. S = void 0;
  13943. 91 === b ? (_ = !0, S = 0) : S = a.get(b), 1 === S ? C = !0 : m = 13
  13944. } else 0 === (m = i.nextState(m, b)) && (C = !0);
  13945. C && (m = 1, v = !1, _ = !1, y = !1, g = p + 1, f = b), p++
  13946. }
  13947. 13 === m && l.push(e._createLink(a, c, u, g, h))
  13948. }
  13949. return l
  13950. }, e
  13951. }();
  13952. t.LinkComputer = a, t.computeLinks = function (e) {
  13953. return e && "function" == typeof e.getLineCount && "function" == typeof e.getLineContent ? a.computeLinks(e) : []
  13954. }
  13955. })), define(n[145], i([0, 1]), (function (e, t) {
  13956. "use strict";
  13957. Object.defineProperty(t, "__esModule", {value: !0}), t.createScopedLineTokens = function (e, t) {
  13958. for (var i = e.getCount(), o = e.findTokenIndexAtOffset(t), r = e.getLanguageId(o), s = o; s + 1 < i && e.getLanguageId(s + 1) === r;) s++;
  13959. for (var a = o; a > 0 && e.getLanguageId(a - 1) === r;) a--;
  13960. return new n(e, r, a, s + 1, e.getStartOffset(a), e.getEndOffset(s))
  13961. };
  13962. var n = function () {
  13963. function e(e, t, n, i, o, r) {
  13964. this._actual = e,
  13965. this.languageId = t, this._firstTokenIndex = n, this._lastTokenIndex = i, this.firstCharOffset = o, this._lastCharOffset = r
  13966. }
  13967. return e.prototype.getLineContent = function () {
  13968. return this._actual.getLineContent().substring(this.firstCharOffset, this._lastCharOffset)
  13969. }, e.prototype.getActualLineContentBefore = function (e) {
  13970. return this._actual.getLineContent().substring(0, this.firstCharOffset + e)
  13971. }, e.prototype.getTokenCount = function () {
  13972. return this._lastTokenIndex - this._firstTokenIndex
  13973. }, e.prototype.findTokenIndexAtOffset = function (e) {
  13974. return this._actual.findTokenIndexAtOffset(e + this.firstCharOffset) - this._firstTokenIndex
  13975. }, e.prototype.getStandardTokenType = function (e) {
  13976. return this._actual.getStandardTokenType(e + this._firstTokenIndex)
  13977. }, e
  13978. }();
  13979. t.ScopedLineTokens = n, t.ignoreBracketsInToken = function (e) {
  13980. return 0 != (7 & e)
  13981. }
  13982. })), define(n[352], i([0, 1, 90]), (function (e, t, n) {
  13983. "use strict";
  13984. Object.defineProperty(t, "__esModule", {value: !0});
  13985. var i = function () {
  13986. function e(t) {
  13987. if (t.autoClosingPairs ? this._autoClosingPairs = t.autoClosingPairs.map((function (e) {
  13988. return new n.StandardAutoClosingPairConditional(e)
  13989. })) : t.brackets ? this._autoClosingPairs = t.brackets.map((function (e) {
  13990. return new n.StandardAutoClosingPairConditional({open: e[0], close: e[1]})
  13991. })) : this._autoClosingPairs = [], t.__electricCharacterSupport && t.__electricCharacterSupport.docComment) {
  13992. var i = t.__electricCharacterSupport.docComment;
  13993. this._autoClosingPairs.push(new n.StandardAutoClosingPairConditional({
  13994. open: i.open,
  13995. close: i.close || ""
  13996. }))
  13997. }
  13998. this._autoCloseBefore = "string" == typeof t.autoCloseBefore ? t.autoCloseBefore : e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED, this._surroundingPairs = t.surroundingPairs || this._autoClosingPairs
  13999. }
  14000. return e.prototype.getAutoClosingPairs = function () {
  14001. return this._autoClosingPairs
  14002. }, e.prototype.getAutoCloseBeforeSet = function () {
  14003. return this._autoCloseBefore
  14004. }, e.shouldAutoClosePair = function (e, t, n) {
  14005. if (0 === t.getTokenCount()) return !0;
  14006. var i = t.findTokenIndexAtOffset(n - 2), o = t.getStandardTokenType(i);
  14007. return e.isOK(o)
  14008. }, e.prototype.getSurroundingPairs = function () {
  14009. return this._surroundingPairs
  14010. },
  14011. e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED = ";:.,=}])> \n\t", e
  14012. }();
  14013. t.CharacterPairSupport = i
  14014. })),define(n[353], i([0, 1]), (function (e, t) {
  14015. "use strict";
  14016. Object.defineProperty(t, "__esModule", {value: !0});
  14017. var n = function () {
  14018. function e(e) {
  14019. this._indentationRules = e
  14020. }
  14021. return e.prototype.shouldIncrease = function (e) {
  14022. return !!(this._indentationRules && this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(e))
  14023. }, e.prototype.shouldDecrease = function (e) {
  14024. return !!(this._indentationRules && this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(e))
  14025. }, e.prototype.shouldIndentNextLine = function (e) {
  14026. return !!(this._indentationRules && this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(e))
  14027. }, e.prototype.shouldIgnore = function (e) {
  14028. return !!(this._indentationRules && this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(e))
  14029. }, e.prototype.getIndentMetadata = function (e) {
  14030. var t = 0
  14031. ;
  14032. return this.shouldIncrease(e) && (t += 1), this.shouldDecrease(e) && (t += 2), this.shouldIndentNextLine(e) && (t += 4), this.shouldIgnore(e) && (t += 8), t
  14033. }, e
  14034. }();
  14035. t.IndentRulesSupport = n
  14036. })),define(n[354], i([0, 1]), (function (e, t) {
  14037. "use strict";
  14038. Object.defineProperty(t, "__esModule", {value: !0});
  14039. var n = function () {
  14040. function e() {
  14041. this._defaultValueSet = [["true", "false"], ["True", "False"], ["Private", "Public", "Friend", "ReadOnly", "Partial", "Protected", "WriteOnly"], ["public", "protected", "private"]]
  14042. }
  14043. return e.prototype.navigateValueSet = function (e, t, n, i, o) {
  14044. var r;
  14045. if (e && t && (r = this.doNavigateValueSet(t, o))) return {range: e, value: r};
  14046. if (n && i && (r = this.doNavigateValueSet(i, o))) return {range: n, value: r};
  14047. return null
  14048. }, e.prototype.doNavigateValueSet = function (e, t) {
  14049. var n = this.numberReplace(e, t);
  14050. return null !== n ? n : this.textReplace(e, t)
  14051. }, e.prototype.numberReplace = function (e, t) {
  14052. var n = Math.pow(10, e.length - (e.lastIndexOf(".") + 1)), i = Number(e), o = parseFloat(e);
  14053. return isNaN(i) || isNaN(o) || i !== o ? null : 0 !== i || t ? (i = Math.floor(i * n), i += t ? n : -n, String(i / n)) : null
  14054. },
  14055. e.prototype.textReplace = function (e, t) {
  14056. return this.valueSetsReplace(this._defaultValueSet, e, t)
  14057. }, e.prototype.valueSetsReplace = function (e, t, n) {
  14058. for (var i = null, o = 0, r = e.length; null === i && o < r; o++) i = this.valueSetReplace(e[o], t, n);
  14059. return i
  14060. }, e.prototype.valueSetReplace = function (e, t, n) {
  14061. var i = e.indexOf(t);
  14062. return i >= 0 ? ((i += n ? 1 : -1) < 0 ? i = e.length - 1 : i %= e.length, e[i]) : null
  14063. }, e.INSTANCE = new e, e
  14064. }();
  14065. t.BasicInplaceReplace = n
  14066. })),define(n[355], i([0, 1, 10, 5, 90]), (function (e, t, n, i, o) {
  14067. "use strict";
  14068. Object.defineProperty(t, "__esModule", {value: !0});
  14069. var r = function () {
  14070. function e(t) {
  14071. var n = this;
  14072. (t = t || {}).brackets = t.brackets || [["(", ")"], ["{", "}"], ["[", "]"]], this._brackets = [], t.brackets.forEach((function (t) {
  14073. var i = e._createOpenBracketRegExp(t[0]), o = e._createCloseBracketRegExp(t[1]);
  14074. i && o && n._brackets.push({open: t[0], openRegExp: i, close: t[1], closeRegExp: o})
  14075. })), this._regExpRules = t.onEnterRules || []
  14076. }
  14077. return e.prototype.onEnter = function (e, t, n, i) {
  14078. if (e >= 3) for (var r = 0, s = this._regExpRules.length; r < s; r++) {
  14079. var a = this._regExpRules[r];
  14080. if ([{reg: a.beforeText, text: n}, {
  14081. reg: a.afterText, text: i
  14082. }, {reg: a.oneLineAboveText, text: t}].every((function (e) {
  14083. return !e.reg || e.reg.test(e.text)
  14084. }))) return a.action
  14085. }
  14086. if (e >= 2 && n.length > 0 && i.length > 0) for (r = 0, s = this._brackets.length; r < s; r++) {
  14087. if ((l = this._brackets[r]).openRegExp.test(n) && l.closeRegExp.test(i)) return {indentAction: o.IndentAction.IndentOutdent}
  14088. }
  14089. if (e >= 2 && n.length > 0) for (r = 0, s = this._brackets.length; r < s; r++) {
  14090. var l;
  14091. if ((l = this._brackets[r]).openRegExp.test(n)) return {indentAction: o.IndentAction.Indent}
  14092. }
  14093. return null
  14094. }, e._createOpenBracketRegExp = function (t) {
  14095. var n = i.escapeRegExpCharacters(t);
  14096. return /\B/.test(n.charAt(0)) || (n = "\\b" + n), n += "\\s*$", e._safeRegExp(n)
  14097. }, e._createCloseBracketRegExp = function (t) {
  14098. var n = i.escapeRegExpCharacters(t);
  14099. return /\B/.test(n.charAt(n.length - 1)) || (n += "\\b"), n = "^\\s*" + n, e._safeRegExp(n)
  14100. }, e._safeRegExp = function (e) {
  14101. try {
  14102. return new RegExp(e)
  14103. } catch (e) {
  14104. return n.onUnexpectedError(e), null
  14105. }
  14106. }, e
  14107. }();
  14108. t.OnEnterSupport = r
  14109. })),define(n[146], i([0, 1, 5, 3]), (function (e, t, n, i) {
  14110. "use strict";
  14111. Object.defineProperty(t, "__esModule", {value: !0})
  14112. ;var o = function () {
  14113. function e(t, n, i, o, r, s) {
  14114. this.languageIdentifier = t, this.index = n, this.open = i, this.close = o, this.forwardRegex = r, this.reversedRegex = s, this._openSet = e._toSet(this.open), this._closeSet = e._toSet(this.close)
  14115. }
  14116. return e.prototype.isOpen = function (e) {
  14117. return this._openSet.has(e)
  14118. }, e.prototype.isClose = function (e) {
  14119. return this._closeSet.has(e)
  14120. }, e._toSet = function (e) {
  14121. for (var t = new Set, n = 0, i = e; n < i.length; n++) {
  14122. var o = i[n];
  14123. t.add(o)
  14124. }
  14125. return t
  14126. }, e
  14127. }();
  14128. t.RichEditBracket = o;
  14129. var r = function (e, t) {
  14130. var n = function (e) {
  14131. var t = e.length;
  14132. e = e.map((function (e) {
  14133. return [e[0].toLowerCase(), e[1].toLowerCase()]
  14134. }));
  14135. for (var n = [], i = 0; i < t; i++) n[i] = i;
  14136. var o = function (e, t) {
  14137. var n = e[0], i = e[1], o = t[0], r = t[1];
  14138. return n === o || n === r || i === o || i === r
  14139. }, r = function (e, i) {
  14140. for (var o = Math.min(e, i), r = Math.max(e, i), s = 0; s < t; s++) n[s] === r && (n[s] = o)
  14141. };
  14142. for (i = 0; i < t; i++) for (var s = e[i], a = i + 1; a < t; a++) o(s, e[a]) && r(n[i], n[a]);
  14143. for (var l = [], u = 0; u < t; u++) {
  14144. var d = [], c = [];
  14145. for (i = 0; i < t; i++) if (n[i] === u) {
  14146. var h = e[i], p = h[0], g = h[1];
  14147. d.push(p), c.push(g)
  14148. }
  14149. d.length > 0 && l.push({open: d, close: c})
  14150. }
  14151. return l
  14152. }(t);
  14153. this.brackets = n.map((function (t, i) {
  14154. return new o(e, i, t.open, t.close, function (e, t, n, i) {
  14155. var o = [];
  14156. o = (o = o.concat(e)).concat(t);
  14157. for (var r = 0, u = o.length; r < u; r++) s(o[r], n, i, o);
  14158. return (o = l(o)).sort(a), o.reverse(), d(o)
  14159. }(t.open, t.close, n, i), function (e, t, n, i) {
  14160. var o = [];
  14161. o = (o = o.concat(e)).concat(t);
  14162. for (var r = 0, u = o.length; r < u; r++) s(o[r], n, i, o);
  14163. return (o = l(o)).sort(a), o.reverse(), d(o.map(p))
  14164. }(t.open, t.close, n, i))
  14165. })), this.forwardRegex = function (e) {
  14166. for (var t = [], n = 0, i = e; n < i.length; n++) {
  14167. for (var o = i[n], r = 0, s = o.open; r < s.length; r++) {
  14168. var a = s[r];
  14169. t.push(a)
  14170. }
  14171. for (var u = 0, c = o.close; u < c.length; u++) {
  14172. var h = c[u];
  14173. t.push(h)
  14174. }
  14175. }
  14176. return d(t = l(t))
  14177. }(this.brackets), this.reversedRegex = function (e) {
  14178. for (var t = [], n = 0, i = e; n < i.length; n++) {
  14179. for (var o = i[n], r = 0, s = o.open; r < s.length; r++) {
  14180. var a = s[r];
  14181. t.push(a)
  14182. }
  14183. for (var u = 0, c = o.close; u < c.length; u++) {
  14184. var h = c[u];
  14185. t.push(h)
  14186. }
  14187. }
  14188. return d((t = l(t)).map(p))
  14189. }(this.brackets), this.textIsBracket = {}, this.textIsOpenBracket = {}, this.maxBracketLength = 0;
  14190. for (var i = 0, r = this.brackets; i < r.length; i++) {
  14191. for (var u = r[i], c = 0, h = u.open; c < h.length; c++) {
  14192. var g = h[c];
  14193. this.textIsBracket[g] = u, this.textIsOpenBracket[g] = !0, this.maxBracketLength = Math.max(this.maxBracketLength, g.length)
  14194. }
  14195. for (var f = 0, m = u.close; f < m.length; f++) {
  14196. var v = m[f];
  14197. this.textIsBracket[v] = u, this.textIsOpenBracket[v] = !1, this.maxBracketLength = Math.max(this.maxBracketLength, v.length)
  14198. }
  14199. }
  14200. };
  14201. function s(e, t, n, i) {
  14202. for (var o = 0, r = t.length; o < r; o++) if (o !== n) {
  14203. for (var s = t[o], a = 0, l = s.open; a < l.length; a++) {
  14204. var u = l[a];
  14205. u.indexOf(e) >= 0 && i.push(u)
  14206. }
  14207. for (var d = 0, c = s.close; d < c.length; d++) {
  14208. var h = c[d];
  14209. h.indexOf(e) >= 0 && i.push(h)
  14210. }
  14211. }
  14212. }
  14213. function a(e, t) {
  14214. return e.length - t.length
  14215. }
  14216. function l(e) {
  14217. if (e.length <= 1) return e;
  14218. for (var t = [], n = new Set, i = 0, o = e; i < o.length; i++) {
  14219. var r = o[i];
  14220. n.has(r) || (t.push(r), n.add(r))
  14221. }
  14222. return t
  14223. }
  14224. function u(e) {
  14225. var t = /^[\w ]+$/.test(e);
  14226. return e = n.escapeRegExpCharacters(e), t ? "\\b" + e + "\\b" : e
  14227. }
  14228. function d(e) {
  14229. var t = "(" + e.map(u).join(")|(") + ")";
  14230. return n.createRegExp(t, !0)
  14231. }
  14232. t.RichEditBrackets = r;
  14233. var c, h, p = (c = null, h = null, function (e) {
  14234. return c !== e && (h = function (e) {
  14235. for (var t = "", n = e.length - 1; n >= 0; n--) t += e.charAt(n);
  14236. return t
  14237. }(c = e)), h
  14238. }), g = function () {
  14239. function e() {
  14240. }
  14241. return e._findPrevBracketInText = function (e, t, n, o) {
  14242. var r = n.match(e);
  14243. if (!r) return null;
  14244. var s = n.length - (r.index || 0), a = r[0].length, l = o + s;
  14245. return new i.Range(t, l - a + 1, t, l + 1)
  14246. }, e.findPrevBracketInRange = function (e, t, n, i, o) {
  14247. var r = p(n).substring(n.length - o, n.length - i);
  14248. return this._findPrevBracketInText(e, t, r, i)
  14249. }, e.findNextBracketInText = function (e, t, n, o) {
  14250. var r = n.match(e);
  14251. if (!r) return null;
  14252. var s = r.index || 0, a = r[0].length;
  14253. if (0 === a) return null;
  14254. var l = o + s;
  14255. return new i.Range(t, l + 1, t, l + 1 + a)
  14256. }, e.findNextBracketInRange = function (e, t, n, i, o) {
  14257. var r = n.substring(i, o);
  14258. return this.findNextBracketInText(e, t, r, i)
  14259. }, e
  14260. }();
  14261. t.BracketsUtils = g
  14262. })),define(n[356], i([0, 1, 145, 146]), (function (e, t, n, i) {
  14263. "use strict";
  14264. Object.defineProperty(t, "__esModule", {value: !0});
  14265. var o = function () {
  14266. function e(e) {
  14267. this._richEditBrackets = e
  14268. }
  14269. return e.prototype.getElectricCharacters = function () {
  14270. var e = []
  14271. ;
  14272. if (this._richEditBrackets) for (var t = 0, n = this._richEditBrackets.brackets; t < n.length; t++) for (var i = 0, o = n[t].close; i < o.length; i++) {
  14273. var r = o[i], s = r.charAt(r.length - 1);
  14274. e.push(s)
  14275. }
  14276. return e = e.filter((function (e, t, n) {
  14277. return n.indexOf(e) === t
  14278. }))
  14279. }, e.prototype.onElectricCharacter = function (e, t, o) {
  14280. if (!this._richEditBrackets || 0 === this._richEditBrackets.brackets.length) return null;
  14281. var r = t.findTokenIndexAtOffset(o - 1);
  14282. if (n.ignoreBracketsInToken(t.getStandardTokenType(r))) return null;
  14283. var s = this._richEditBrackets.reversedRegex, a = t.getLineContent().substring(0, o - 1) + e,
  14284. l = i.BracketsUtils.findPrevBracketInRange(s, 1, a, 0, a.length);
  14285. if (!l) return null;
  14286. var u = a.substring(l.startColumn - 1, l.endColumn - 1).toLowerCase();
  14287. if (this._richEditBrackets.textIsOpenBracket[u]) return null;
  14288. var d = t.getActualLineContentBefore(l.startColumn - 1);
  14289. return /^\s*$/.test(d) ? {matchOpenBracket: u} : null
  14290. }, e
  14291. }();
  14292. t.BracketElectricCharacterSupport = o
  14293. })),define(n[41], i([0, 1, 4, 2, 5, 109, 90, 145, 352, 356, 353, 355, 146]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h) {
  14294. "use strict"
  14295. ;Object.defineProperty(t, "__esModule", {value: !0});
  14296. var p = function () {
  14297. function e(t, n, i) {
  14298. this._languageIdentifier = t, this._brackets = null, this._electricCharacter = null;
  14299. var o = null;
  14300. n && (o = n._conf), this._conf = e._mergeConf(o, i), this._onEnterSupport = this._conf.brackets || this._conf.indentationRules || this._conf.onEnterRules ? new c.OnEnterSupport(this._conf) : null, this.comments = e._handleComments(this._conf), this.characterPair = new l.CharacterPairSupport(this._conf), this.wordDefinition = this._conf.wordPattern || r.DEFAULT_WORD_REGEXP, this.indentationRules = this._conf.indentationRules, this._conf.indentationRules ? this.indentRulesSupport = new d.IndentRulesSupport(this._conf.indentationRules) : this.indentRulesSupport = null, this.foldingRules = this._conf.folding || {}
  14301. }
  14302. return Object.defineProperty(e.prototype, "brackets", {
  14303. get: function () {
  14304. return !this._brackets && this._conf.brackets && (this._brackets = new h.RichEditBrackets(this._languageIdentifier, this._conf.brackets)), this._brackets
  14305. }, enumerable: !0, configurable: !0
  14306. }),
  14307. Object.defineProperty(e.prototype, "electricCharacter", {
  14308. get: function () {
  14309. return this._electricCharacter || (this._electricCharacter = new u.BracketElectricCharacterSupport(this.brackets)), this._electricCharacter
  14310. }, enumerable: !0, configurable: !0
  14311. }), e.prototype.onEnter = function (e, t, n, i) {
  14312. return this._onEnterSupport ? this._onEnterSupport.onEnter(e, t, n, i) : null
  14313. }, e._mergeConf = function (e, t) {
  14314. return {
  14315. comments: e ? t.comments || e.comments : t.comments,
  14316. brackets: e ? t.brackets || e.brackets : t.brackets,
  14317. wordPattern: e ? t.wordPattern || e.wordPattern : t.wordPattern,
  14318. indentationRules: e ? t.indentationRules || e.indentationRules : t.indentationRules,
  14319. onEnterRules: e ? t.onEnterRules || e.onEnterRules : t.onEnterRules,
  14320. autoClosingPairs: e ? t.autoClosingPairs || e.autoClosingPairs : t.autoClosingPairs,
  14321. surroundingPairs: e ? t.surroundingPairs || e.surroundingPairs : t.surroundingPairs,
  14322. autoCloseBefore: e ? t.autoCloseBefore || e.autoCloseBefore : t.autoCloseBefore,
  14323. folding: e ? t.folding || e.folding : t.folding,
  14324. __electricCharacterSupport: e ? t.__electricCharacterSupport || e.__electricCharacterSupport : t.__electricCharacterSupport
  14325. }
  14326. }, e._handleComments = function (e) {
  14327. var t = e.comments;
  14328. if (!t) return null;
  14329. var n = {};
  14330. if (t.lineComment && (n.lineCommentToken = t.lineComment), t.blockComment) {
  14331. var i = t.blockComment, o = i[0], r = i[1];
  14332. n.blockCommentStartToken = o, n.blockCommentEndToken = r
  14333. }
  14334. return n
  14335. }, e
  14336. }();
  14337. t.RichEditSupport = p;
  14338. var g = function (e) {
  14339. this.languageIdentifier = e
  14340. };
  14341. t.LanguageConfigurationChangeEvent = g;
  14342. var f = function () {
  14343. function e() {
  14344. this._entries = new Map, this._onDidChange = new n.Emitter, this.onDidChange = this._onDidChange.event
  14345. }
  14346. return e.prototype.register = function (e, t) {
  14347. var n = this, o = this._getRichEditSupport(e.id), r = new p(e, o, t);
  14348. return this._entries.set(e.id, r), this._onDidChange.fire(new g(e)), i.toDisposable((function () {
  14349. n._entries.get(e.id) === r && (n._entries.set(e.id, o), n._onDidChange.fire(new g(e)))
  14350. }))
  14351. }, e.prototype._getRichEditSupport = function (e) {
  14352. return this._entries.get(e)
  14353. }, e.prototype._getElectricCharacterSupport = function (e) {
  14354. var t = this._getRichEditSupport(e);
  14355. return t && t.electricCharacter || null
  14356. }, e.prototype.getElectricCharacters = function (e) {
  14357. var t = this._getElectricCharacterSupport(e);
  14358. return t ? t.getElectricCharacters() : []
  14359. }, e.prototype.onElectricCharacter = function (e, t, n) {
  14360. var i = a.createScopedLineTokens(t, n - 1), o = this._getElectricCharacterSupport(i.languageId);
  14361. return o ? o.onElectricCharacter(e, i, n - i.firstCharOffset) : null
  14362. }, e.prototype.getComments = function (e) {
  14363. var t = this._getRichEditSupport(e);
  14364. return t && t.comments || null
  14365. }, e.prototype._getCharacterPairSupport = function (e) {
  14366. var t = this._getRichEditSupport(e);
  14367. return t && t.characterPair || null
  14368. }, e.prototype.getAutoClosingPairs = function (e) {
  14369. var t = this._getCharacterPairSupport(e);
  14370. return t ? t.getAutoClosingPairs() : []
  14371. }, e.prototype.getAutoCloseBeforeSet = function (e) {
  14372. var t = this._getCharacterPairSupport(e);
  14373. return t ? t.getAutoCloseBeforeSet() : l.CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED
  14374. }, e.prototype.getSurroundingPairs = function (e) {
  14375. var t = this._getCharacterPairSupport(e)
  14376. ;
  14377. return t ? t.getSurroundingPairs() : []
  14378. }, e.prototype.shouldAutoClosePair = function (e, t, n) {
  14379. var i = a.createScopedLineTokens(t, n - 1);
  14380. return l.CharacterPairSupport.shouldAutoClosePair(e, i, n - i.firstCharOffset)
  14381. }, e.prototype.getWordDefinition = function (e) {
  14382. var t = this._getRichEditSupport(e);
  14383. return t ? r.ensureValidWordDefinition(t.wordDefinition || null) : r.ensureValidWordDefinition(null)
  14384. }, e.prototype.getFoldingRules = function (e) {
  14385. var t = this._getRichEditSupport(e);
  14386. return t ? t.foldingRules : {}
  14387. }, e.prototype.getIndentRulesSupport = function (e) {
  14388. var t = this._getRichEditSupport(e);
  14389. return t && t.indentRulesSupport || null
  14390. }, e.prototype.getPrecedingValidLine = function (e, t, n) {
  14391. var i = e.getLanguageIdAtPosition(t, 0);
  14392. if (t > 1) {
  14393. var o = void 0, r = -1;
  14394. for (o = t - 1; o >= 1; o--) {
  14395. if (e.getLanguageIdAtPosition(o, 0) !== i) return r;
  14396. var s = e.getLineContent(o);
  14397. if (!n.shouldIgnore(s) && !/^\s+$/.test(s) && "" !== s) return o;
  14398. r = o
  14399. }
  14400. }
  14401. return -1
  14402. }, e.prototype.getInheritIndentForLine = function (e, t, n, i) {
  14403. if (void 0 === i && (i = !0), e < 4) return null;
  14404. var r = this.getIndentRulesSupport(t.getLanguageIdentifier().id)
  14405. ;
  14406. if (!r) return null;
  14407. if (n <= 1) return {indentation: "", action: null};
  14408. var a = this.getPrecedingValidLine(t, n, r);
  14409. if (a < 0) return null;
  14410. if (a < 1) return {indentation: "", action: null};
  14411. var l = t.getLineContent(a);
  14412. if (r.shouldIncrease(l) || r.shouldIndentNextLine(l)) return {
  14413. indentation: o.getLeadingWhitespace(l),
  14414. action: s.IndentAction.Indent,
  14415. line: a
  14416. };
  14417. if (r.shouldDecrease(l)) return {indentation: o.getLeadingWhitespace(l), action: null, line: a};
  14418. if (1 === a) return {indentation: o.getLeadingWhitespace(t.getLineContent(a)), action: null, line: a};
  14419. var u = a - 1, d = r.getIndentMetadata(t.getLineContent(u));
  14420. if (!(3 & d) && 4 & d) {
  14421. for (var c = 0, h = u - 1; h > 0; h--) if (!r.shouldIndentNextLine(t.getLineContent(h))) {
  14422. c = h;
  14423. break
  14424. }
  14425. return {indentation: o.getLeadingWhitespace(t.getLineContent(c + 1)), action: null, line: c + 1}
  14426. }
  14427. if (i) return {indentation: o.getLeadingWhitespace(t.getLineContent(a)), action: null, line: a};
  14428. for (h = a; h > 0; h--) {
  14429. var p = t.getLineContent(h);
  14430. if (r.shouldIncrease(p)) return {
  14431. indentation: o.getLeadingWhitespace(p),
  14432. action: s.IndentAction.Indent,
  14433. line: h
  14434. };
  14435. if (r.shouldIndentNextLine(p)) {
  14436. c = 0
  14437. ;
  14438. for (var g = h - 1; g > 0; g--) if (!r.shouldIndentNextLine(t.getLineContent(h))) {
  14439. c = g;
  14440. break
  14441. }
  14442. return {indentation: o.getLeadingWhitespace(t.getLineContent(c + 1)), action: null, line: c + 1}
  14443. }
  14444. if (r.shouldDecrease(p)) return {indentation: o.getLeadingWhitespace(p), action: null, line: h}
  14445. }
  14446. return {indentation: o.getLeadingWhitespace(t.getLineContent(1)), action: null, line: 1}
  14447. }, e.prototype.getGoodIndentForLine = function (e, t, n, i, r) {
  14448. if (e < 4) return null;
  14449. var a = this._getRichEditSupport(n);
  14450. if (!a) return null;
  14451. var l = this.getIndentRulesSupport(n);
  14452. if (!l) return null;
  14453. var u = this.getInheritIndentForLine(e, t, i), d = t.getLineContent(i);
  14454. if (u) {
  14455. var c = u.line;
  14456. if (void 0 !== c) {
  14457. var h = a.onEnter(e, "", t.getLineContent(c), "");
  14458. if (h) {
  14459. var p = o.getLeadingWhitespace(t.getLineContent(c));
  14460. return h.removeText && (p = p.substring(0, p.length - h.removeText)), h.indentAction === s.IndentAction.Indent || h.indentAction === s.IndentAction.IndentOutdent ? p = r.shiftIndent(p) : h.indentAction === s.IndentAction.Outdent && (p = r.unshiftIndent(p)), l.shouldDecrease(d) && (p = r.unshiftIndent(p)),
  14461. h.appendText && (p += h.appendText), o.getLeadingWhitespace(p)
  14462. }
  14463. }
  14464. return l.shouldDecrease(d) ? u.action === s.IndentAction.Indent ? u.indentation : r.unshiftIndent(u.indentation) : u.action === s.IndentAction.Indent ? r.shiftIndent(u.indentation) : u.indentation
  14465. }
  14466. return null
  14467. }, e.prototype.getIndentForEnter = function (e, t, n, i) {
  14468. if (e < 4) return null;
  14469. t.forceTokenization(n.startLineNumber);
  14470. var r, l, u = t.getLineTokens(n.startLineNumber), d = a.createScopedLineTokens(u, n.startColumn - 1),
  14471. c = d.getLineContent(), h = !1;
  14472. (d.firstCharOffset > 0 && u.getLanguageId(0) !== d.languageId ? (h = !0, r = c.substr(0, n.startColumn - 1 - d.firstCharOffset)) : r = u.getLineContent().substring(0, n.startColumn - 1), n.isEmpty()) ? l = c.substr(n.startColumn - 1 - d.firstCharOffset) : l = this.getScopedLineTokens(t, n.endLineNumber, n.endColumn).getLineContent().substr(n.endColumn - 1 - d.firstCharOffset);
  14473. var p = this.getIndentRulesSupport(d.languageId);
  14474. if (!p) return null;
  14475. var g = r, f = o.getLeadingWhitespace(r), m = {
  14476. getLineTokens: function (e) {
  14477. return t.getLineTokens(e)
  14478. }, getLanguageIdentifier: function () {
  14479. return t.getLanguageIdentifier()
  14480. }, getLanguageIdAtPosition: function (e, n) {
  14481. return t.getLanguageIdAtPosition(e, n)
  14482. }, getLineContent: function (e) {
  14483. return e === n.startLineNumber ? g : t.getLineContent(e)
  14484. }
  14485. }, v = o.getLeadingWhitespace(u.getLineContent()),
  14486. _ = this.getInheritIndentForLine(e, m, n.startLineNumber + 1);
  14487. if (!_) {
  14488. var y = h ? v : f;
  14489. return {beforeEnter: y, afterEnter: y}
  14490. }
  14491. var C = h ? v : _.indentation;
  14492. return _.action === s.IndentAction.Indent && (C = i.shiftIndent(C)), p.shouldDecrease(l) && (C = i.unshiftIndent(C)), {
  14493. beforeEnter: h ? v : f,
  14494. afterEnter: C
  14495. }
  14496. }, e.prototype.getIndentActionForType = function (e, t, n, i, o) {
  14497. if (e < 4) return null;
  14498. var r = this.getScopedLineTokens(t, n.startLineNumber, n.startColumn),
  14499. a = this.getIndentRulesSupport(r.languageId);
  14500. if (!a) return null;
  14501. var l, u = r.getLineContent(), d = u.substr(0, n.startColumn - 1 - r.firstCharOffset);
  14502. n.isEmpty() ? l = u.substr(n.startColumn - 1 - r.firstCharOffset) : l = this.getScopedLineTokens(t, n.endLineNumber, n.endColumn).getLineContent().substr(n.endColumn - 1 - r.firstCharOffset);
  14503. if (!a.shouldDecrease(d + l) && a.shouldDecrease(d + i + l)) {
  14504. var c = this.getInheritIndentForLine(e, t, n.startLineNumber, !1);
  14505. if (!c) return null;
  14506. var h = c.indentation;
  14507. return c.action !== s.IndentAction.Indent && (h = o.unshiftIndent(h)), h
  14508. }
  14509. return null
  14510. }, e.prototype.getIndentMetadata = function (e, t) {
  14511. var n = this.getIndentRulesSupport(e.getLanguageIdentifier().id);
  14512. return n ? t < 1 || t > e.getLineCount() ? null : n.getIndentMetadata(e.getLineContent(t)) : null
  14513. }, e.prototype.getEnterAction = function (e, t, n) {
  14514. var i = this.getScopedLineTokens(t, n.startLineNumber, n.startColumn),
  14515. o = this._getRichEditSupport(i.languageId);
  14516. if (!o) return null;
  14517. var r, a = i.getLineContent(), l = a.substr(0, n.startColumn - 1 - i.firstCharOffset);
  14518. n.isEmpty() ? r = a.substr(n.startColumn - 1 - i.firstCharOffset) : r = this.getScopedLineTokens(t, n.endLineNumber, n.endColumn).getLineContent().substr(n.endColumn - 1 - i.firstCharOffset);
  14519. var u = "";
  14520. if (n.startLineNumber > 1 && 0 === i.firstCharOffset) {
  14521. var d = this.getScopedLineTokens(t, n.startLineNumber - 1);
  14522. d.languageId === i.languageId && (u = d.getLineContent())
  14523. }
  14524. var c = o.onEnter(e, u, l, r);
  14525. if (!c) return null
  14526. ;
  14527. var h = c.indentAction, p = c.appendText, g = c.removeText || 0;
  14528. p || (p = h === s.IndentAction.Indent || h === s.IndentAction.IndentOutdent ? "\t" : "");
  14529. var f = this.getIndentationAtPosition(t, n.startLineNumber, n.startColumn);
  14530. return g && (f = f.substring(0, f.length - g)), {
  14531. indentAction: h,
  14532. appendText: p,
  14533. removeText: g,
  14534. indentation: f
  14535. }
  14536. }, e.prototype.getIndentationAtPosition = function (e, t, n) {
  14537. var i = e.getLineContent(t), r = o.getLeadingWhitespace(i);
  14538. return r.length > n - 1 && (r = r.substring(0, n - 1)), r
  14539. }, e.prototype.getScopedLineTokens = function (e, t, n) {
  14540. e.forceTokenization(t);
  14541. var i = e.getLineTokens(t), o = void 0 === n ? e.getLineMaxColumn(t) - 1 : n - 1;
  14542. return a.createScopedLineTokens(i, o)
  14543. }, e.prototype.getBracketsSupport = function (e) {
  14544. var t = this._getRichEditSupport(e);
  14545. return t && t.brackets || null
  14546. }, e
  14547. }();
  14548. t.LanguageConfigurationRegistryImpl = f, t.LanguageConfigurationRegistry = new f
  14549. })),define(n[357], i([0, 1, 27]), (function (e, t, n) {
  14550. "use strict";
  14551. Object.defineProperty(t, "__esModule", {value: !0});
  14552. var i = function (e, t, n, i, o) {
  14553. this.token = e, this.index = t, this.fontStyle = n, this.foreground = i,
  14554. this.background = o
  14555. };
  14556. function o(e) {
  14557. if (!e || !Array.isArray(e)) return [];
  14558. for (var t = [], n = 0, o = 0, r = e.length; o < r; o++) {
  14559. var s = e[o], a = -1;
  14560. if ("string" == typeof s.fontStyle) {
  14561. a = 0;
  14562. for (var l = s.fontStyle.split(" "), u = 0, d = l.length; u < d; u++) {
  14563. switch (l[u]) {
  14564. case"italic":
  14565. a |= 1;
  14566. break;
  14567. case"bold":
  14568. a |= 2;
  14569. break;
  14570. case"underline":
  14571. a |= 4
  14572. }
  14573. }
  14574. }
  14575. var c = null;
  14576. "string" == typeof s.foreground && (c = s.foreground);
  14577. var h = null;
  14578. "string" == typeof s.background && (h = s.background), t[n++] = new i(s.token || "", o, a, c, h)
  14579. }
  14580. return t
  14581. }
  14582. function r(e, t) {
  14583. e.sort((function (e, t) {
  14584. var n = c(e.token, t.token);
  14585. return 0 !== n ? n : e.index - t.index
  14586. }));
  14587. for (var n = 0, i = "000000", o = "ffffff"; e.length >= 1 && "" === e[0].token;) {
  14588. var r = e.shift();
  14589. -1 !== r.fontStyle && (n = r.fontStyle), null !== r.foreground && (i = r.foreground), null !== r.background && (o = r.background)
  14590. }
  14591. for (var s = new a, u = 0, d = t; u < d.length; u++) {
  14592. var g = d[u];
  14593. s.getId(g)
  14594. }
  14595. for (var f = s.getId(i), m = s.getId(o), v = new h(n, f, m), _ = new p(v), y = 0, C = e.length; y < C; y++) {
  14596. var b = e[y];
  14597. _.insert(b.token, b.fontStyle, s.getId(b.foreground), s.getId(b.background))
  14598. }
  14599. return new l(s, _)
  14600. }
  14601. t.ParsedTokenThemeRule = i,
  14602. t.parseTokenTheme = o;
  14603. var s = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/, a = function () {
  14604. function e() {
  14605. this._lastColorId = 0, this._id2color = [], this._color2id = new Map
  14606. }
  14607. return e.prototype.getId = function (e) {
  14608. if (null === e) return 0;
  14609. var t = e.match(s);
  14610. if (!t) throw new Error("Illegal value for token color: " + e);
  14611. e = t[1].toUpperCase();
  14612. var i = this._color2id.get(e);
  14613. return i || (i = ++this._lastColorId, this._color2id.set(e, i), this._id2color[i] = n.Color.fromHex("#" + e), i)
  14614. }, e.prototype.getColorMap = function () {
  14615. return this._id2color.slice(0)
  14616. }, e
  14617. }();
  14618. t.ColorMap = a;
  14619. var l = function () {
  14620. function e(e, t) {
  14621. this._colorMap = e, this._root = t, this._cache = new Map
  14622. }
  14623. return e.createFromRawTokenTheme = function (e, t) {
  14624. return this.createFromParsedTokenTheme(o(e), t)
  14625. }, e.createFromParsedTokenTheme = function (e, t) {
  14626. return r(e, t)
  14627. }, e.prototype.getColorMap = function () {
  14628. return this._colorMap.getColorMap()
  14629. }, e.prototype._match = function (e) {
  14630. return this._root.match(e)
  14631. }, e.prototype.match = function (e, t) {
  14632. var n = this._cache.get(t);
  14633. if (void 0 === n) {
  14634. var i = this._match(t), o = d(t);
  14635. n = (i.metadata | o << 8) >>> 0,
  14636. this._cache.set(t, n)
  14637. }
  14638. return (n | e << 0) >>> 0
  14639. }, e
  14640. }();
  14641. t.TokenTheme = l;
  14642. var u = /\b(comment|string|regex|regexp)\b/;
  14643. function d(e) {
  14644. var t = e.match(u);
  14645. if (!t) return 0;
  14646. switch (t[1]) {
  14647. case"comment":
  14648. return 1;
  14649. case"string":
  14650. return 2;
  14651. case"regex":
  14652. case"regexp":
  14653. return 4
  14654. }
  14655. throw new Error("Unexpected match for standard token type!")
  14656. }
  14657. function c(e, t) {
  14658. return e < t ? -1 : e > t ? 1 : 0
  14659. }
  14660. t.toStandardTokenType = d, t.strcmp = c;
  14661. var h = function () {
  14662. function e(e, t, n) {
  14663. this._fontStyle = e, this._foreground = t, this._background = n, this.metadata = (this._fontStyle << 11 | this._foreground << 14 | this._background << 23) >>> 0
  14664. }
  14665. return e.prototype.clone = function () {
  14666. return new e(this._fontStyle, this._foreground, this._background)
  14667. }, e.prototype.acceptOverwrite = function (e, t, n) {
  14668. -1 !== e && (this._fontStyle = e), 0 !== t && (this._foreground = t), 0 !== n && (this._background = n), this.metadata = (this._fontStyle << 11 | this._foreground << 14 | this._background << 23) >>> 0
  14669. }, e
  14670. }();
  14671. t.ThemeTrieElementRule = h;
  14672. var p = function () {
  14673. function e(e) {
  14674. this._mainRule = e, this._children = new Map
  14675. }
  14676. return e.prototype.match = function (e) {
  14677. if ("" === e) return this._mainRule;
  14678. var t, n, i = e.indexOf(".");
  14679. -1 === i ? (t = e, n = "") : (t = e.substring(0, i), n = e.substring(i + 1));
  14680. var o = this._children.get(t);
  14681. return void 0 !== o ? o.match(n) : this._mainRule
  14682. }, e.prototype.insert = function (t, n, i, o) {
  14683. if ("" !== t) {
  14684. var r, s, a = t.indexOf(".");
  14685. -1 === a ? (r = t, s = "") : (r = t.substring(0, a), s = t.substring(a + 1));
  14686. var l = this._children.get(r);
  14687. void 0 === l && (l = new e(this._mainRule.clone()), this._children.set(r, l)), l.insert(s, n, i, o)
  14688. } else this._mainRule.acceptOverwrite(n, i, o)
  14689. }, e
  14690. }();
  14691. t.ThemeTrieElement = p, t.generateTokensCSSForColorMap = function (e) {
  14692. for (var t = [], n = 1, i = e.length; n < i; n++) {
  14693. var o = e[n];
  14694. t[n] = ".mtk" + n + " { color: " + o + "; }"
  14695. }
  14696. return t.push(".mtki { font-style: italic; }"), t.push(".mtkb { font-weight: bold; }"), t.push(".mtku { text-decoration: underline; text-underline-position: under; }"), t.join("\n")
  14697. }
  14698. })),define(n[358], i([0, 1, 4, 2, 21, 38]), (function (e, t, n, i, o, r) {
  14699. "use strict";
  14700. Object.defineProperty(t, "__esModule", {value: !0});
  14701. var s = function () {
  14702. function e() {
  14703. this._map = new Map, this._promises = new Map,
  14704. this._onDidChange = new n.Emitter, this.onDidChange = this._onDidChange.event, this._colorMap = null
  14705. }
  14706. return e.prototype.fire = function (e) {
  14707. this._onDidChange.fire({changedLanguages: e, changedColorMap: !1})
  14708. }, e.prototype.register = function (e, t) {
  14709. var n = this;
  14710. return this._map.set(e, t), this.fire([e]), i.toDisposable((function () {
  14711. n._map.get(e) === t && (n._map.delete(e), n.fire([e]))
  14712. }))
  14713. }, e.prototype.registerPromise = function (e, t) {
  14714. var n = this, o = null, r = !1;
  14715. return this._promises.set(e, t.then((function (t) {
  14716. n._promises.delete(e), !r && t && (o = n.register(e, t))
  14717. }))), i.toDisposable((function () {
  14718. r = !0, o && o.dispose()
  14719. }))
  14720. }, e.prototype.getPromise = function (e) {
  14721. var t = this, n = this.get(e);
  14722. if (n) return Promise.resolve(n);
  14723. var i = this._promises.get(e);
  14724. return i ? i.then((function (n) {
  14725. return t.get(e)
  14726. })) : null
  14727. }, e.prototype.get = function (e) {
  14728. return o.withUndefinedAsNull(this._map.get(e))
  14729. }, e.prototype.setColorMap = function (e) {
  14730. this._colorMap = e, this._onDidChange.fire({changedLanguages: r.keys(this._map), changedColorMap: !0})
  14731. }, e.prototype.getColorMap = function () {
  14732. return this._colorMap
  14733. },
  14734. e.prototype.getDefaultBackground = function () {
  14735. return this._colorMap && this._colorMap.length > 2 ? this._colorMap[2] : null
  14736. }, e
  14737. }();
  14738. t.TokenizationRegistryImpl = s
  14739. })),
  14740. /*!
  14741. Copyright (c) 2014 Taylor Hakes
  14742. Copyright (c) 2014 Forbes Lindesay
  14743. */
  14744. p = function () {
  14745. "use strict";
  14746. function e(e) {
  14747. var t = this.constructor;
  14748. return this.then((function (n) {
  14749. return t.resolve(e()).then((function () {
  14750. return n
  14751. }))
  14752. }), (function (n) {
  14753. return t.resolve(e()).then((function () {
  14754. return t.reject(n)
  14755. }))
  14756. }))
  14757. }
  14758. var t = setTimeout;
  14759. function n() {
  14760. }
  14761. function i(e) {
  14762. if (!(this instanceof i)) throw new TypeError("Promises must be constructed via new");
  14763. if ("function" != typeof e) throw new TypeError("not a function");
  14764. this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], u(e, this)
  14765. }
  14766. function o(e, t) {
  14767. for (; 3 === e._state;) e = e._value;
  14768. 0 !== e._state ? (e._handled = !0, i._immediateFn((function () {
  14769. var n = 1 === e._state ? t.onFulfilled : t.onRejected;
  14770. if (null !== n) {
  14771. var i;
  14772. try {
  14773. i = n(e._value)
  14774. } catch (e) {
  14775. return void s(t.promise, e)
  14776. }
  14777. r(t.promise, i)
  14778. } else (1 === e._state ? r : s)(t.promise, e._value)
  14779. }))) : e._deferreds.push(t)
  14780. }
  14781. function r(e, t) {
  14782. try {
  14783. if (t === e) throw new TypeError("A promise cannot be resolved with itself.");
  14784. if (t && ("object" == typeof t || "function" == typeof t)) {
  14785. var n = t.then;
  14786. if (t instanceof i) return e._state = 3, e._value = t, void a(e)
  14787. ;
  14788. if ("function" == typeof n) return void u((o = n, r = t, function () {
  14789. o.apply(r, arguments)
  14790. }), e)
  14791. }
  14792. e._state = 1, e._value = t, a(e)
  14793. } catch (t) {
  14794. s(e, t)
  14795. }
  14796. var o, r
  14797. }
  14798. function s(e, t) {
  14799. e._state = 2, e._value = t, a(e)
  14800. }
  14801. function a(e) {
  14802. 2 === e._state && 0 === e._deferreds.length && i._immediateFn((function () {
  14803. e._handled || i._unhandledRejectionFn(e._value)
  14804. }));
  14805. for (var t = 0, n = e._deferreds.length; t < n; t++) o(e, e._deferreds[t]);
  14806. e._deferreds = null
  14807. }
  14808. function l(e, t, n) {
  14809. this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.promise = n
  14810. }
  14811. function u(e, t) {
  14812. var n = !1;
  14813. try {
  14814. e((function (e) {
  14815. n || (n = !0, r(t, e))
  14816. }), (function (e) {
  14817. n || (n = !0, s(t, e))
  14818. }))
  14819. } catch (e) {
  14820. if (n) return;
  14821. n = !0, s(t, e)
  14822. }
  14823. }
  14824. i.prototype.catch = function (e) {
  14825. return this.then(null, e)
  14826. }, i.prototype.then = function (e, t) {
  14827. var i = new this.constructor(n);
  14828. return o(this, new l(e, t, i)), i
  14829. }, i.prototype.finally = e, i.all = function (e) {
  14830. return new i((function (t, n) {
  14831. if (!e || void 0 === e.length) throw new TypeError("Promise.all accepts an array");
  14832. var i = Array.prototype.slice.call(e);
  14833. if (0 === i.length) return t([]);
  14834. var o = i.length
  14835. ;
  14836. function r(e, s) {
  14837. try {
  14838. if (s && ("object" == typeof s || "function" == typeof s)) {
  14839. var a = s.then;
  14840. if ("function" == typeof a) return void a.call(s, (function (t) {
  14841. r(e, t)
  14842. }), n)
  14843. }
  14844. i[e] = s, 0 == --o && t(i)
  14845. } catch (e) {
  14846. n(e)
  14847. }
  14848. }
  14849. for (var s = 0; s < i.length; s++) r(s, i[s])
  14850. }))
  14851. }, i.resolve = function (e) {
  14852. return e && "object" == typeof e && e.constructor === i ? e : new i((function (t) {
  14853. t(e)
  14854. }))
  14855. }, i.reject = function (e) {
  14856. return new i((function (t, n) {
  14857. n(e)
  14858. }))
  14859. }, i.race = function (e) {
  14860. return new i((function (t, n) {
  14861. for (var i = 0, o = e.length; i < o; i++) e[i].then(t, n)
  14862. }))
  14863. }, i._immediateFn = "function" == typeof setImmediate && function (e) {
  14864. setImmediate(e)
  14865. } || function (e) {
  14866. t(e, 0)
  14867. }, i._unhandledRejectionFn = function (e) {
  14868. "undefined" != typeof console && console && console.warn("Possible Unhandled Promise Rejection:", e)
  14869. };
  14870. var d = function () {
  14871. if ("undefined" != typeof self) return self;
  14872. if ("undefined" != typeof window) return window;
  14873. if ("undefined" != typeof global) return global;
  14874. throw new Error("unable to locate global object")
  14875. }();
  14876. "Promise" in d ? d.Promise.prototype.finally || (d.Promise.prototype.finally = e) : d.Promise = i
  14877. },
  14878. "object" == typeof exports && "undefined" != typeof module ? p() : "function" == typeof define && define.amd ? define("vs/editor/common/standalone/promise-polyfill/polyfill", p) : p(),define(n[147], i([0, 1]), (function (e, t) {
  14879. "use strict";
  14880. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  14881. e[e.Unknown = 0] = "Unknown", e[e.Disabled = 1] = "Disabled", e[e.Enabled = 2] = "Enabled"
  14882. }(t.AccessibilitySupport || (t.AccessibilitySupport = {})), function (e) {
  14883. e[e.KeepWhitespace = 1] = "KeepWhitespace", e[e.InsertAsSnippet = 4] = "InsertAsSnippet"
  14884. }(t.CompletionItemInsertTextRule || (t.CompletionItemInsertTextRule = {})), function (e) {
  14885. e[e.Method = 0] = "Method", e[e.Function = 1] = "Function", e[e.Constructor = 2] = "Constructor", e[e.Field = 3] = "Field", e[e.Variable = 4] = "Variable", e[e.Class = 5] = "Class", e[e.Struct = 6] = "Struct", e[e.Interface = 7] = "Interface", e[e.Module = 8] = "Module", e[e.Property = 9] = "Property", e[e.Event = 10] = "Event", e[e.Operator = 11] = "Operator", e[e.Unit = 12] = "Unit", e[e.Value = 13] = "Value", e[e.Constant = 14] = "Constant", e[e.Enum = 15] = "Enum", e[e.EnumMember = 16] = "EnumMember",
  14886. e[e.Keyword = 17] = "Keyword", e[e.Text = 18] = "Text", e[e.Color = 19] = "Color", e[e.File = 20] = "File", e[e.Reference = 21] = "Reference", e[e.Customcolor = 22] = "Customcolor", e[e.Folder = 23] = "Folder", e[e.TypeParameter = 24] = "TypeParameter", e[e.Snippet = 25] = "Snippet"
  14887. }(t.CompletionItemKind || (t.CompletionItemKind = {})), function (e) {
  14888. e[e.Deprecated = 1] = "Deprecated"
  14889. }(t.CompletionItemTag || (t.CompletionItemTag = {})), function (e) {
  14890. e[e.Invoke = 0] = "Invoke", e[e.TriggerCharacter = 1] = "TriggerCharacter", e[e.TriggerForIncompleteCompletions = 2] = "TriggerForIncompleteCompletions"
  14891. }(t.CompletionTriggerKind || (t.CompletionTriggerKind = {})), function (e) {
  14892. e[e.EXACT = 0] = "EXACT", e[e.ABOVE = 1] = "ABOVE", e[e.BELOW = 2] = "BELOW"
  14893. }(t.ContentWidgetPositionPreference || (t.ContentWidgetPositionPreference = {})), function (e) {
  14894. e[e.NotSet = 0] = "NotSet", e[e.ContentFlush = 1] = "ContentFlush", e[e.RecoverFromMarkers = 2] = "RecoverFromMarkers", e[e.Explicit = 3] = "Explicit", e[e.Paste = 4] = "Paste", e[e.Undo = 5] = "Undo", e[e.Redo = 6] = "Redo"
  14895. }(t.CursorChangeReason || (t.CursorChangeReason = {})), function (e) {
  14896. e[e.LF = 1] = "LF",
  14897. e[e.CRLF = 2] = "CRLF"
  14898. }(t.DefaultEndOfLine || (t.DefaultEndOfLine = {})), function (e) {
  14899. e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write"
  14900. }(t.DocumentHighlightKind || (t.DocumentHighlightKind = {})), function (e) {
  14901. e[e.None = 0] = "None", e[e.Keep = 1] = "Keep", e[e.Brackets = 2] = "Brackets", e[e.Advanced = 3] = "Advanced", e[e.Full = 4] = "Full"
  14902. }(t.EditorAutoIndentStrategy || (t.EditorAutoIndentStrategy = {})), function (e) {
  14903. e[e.acceptSuggestionOnCommitCharacter = 0] = "acceptSuggestionOnCommitCharacter", e[e.acceptSuggestionOnEnter = 1] = "acceptSuggestionOnEnter", e[e.accessibilitySupport = 2] = "accessibilitySupport", e[e.accessibilityPageSize = 3] = "accessibilityPageSize", e[e.ariaLabel = 4] = "ariaLabel", e[e.autoClosingBrackets = 5] = "autoClosingBrackets", e[e.autoClosingOvertype = 6] = "autoClosingOvertype", e[e.autoClosingQuotes = 7] = "autoClosingQuotes", e[e.autoIndent = 8] = "autoIndent", e[e.automaticLayout = 9] = "automaticLayout", e[e.autoSurround = 10] = "autoSurround", e[e.codeLens = 11] = "codeLens", e[e.colorDecorators = 12] = "colorDecorators", e[e.comments = 13] = "comments",
  14904. e[e.contextmenu = 14] = "contextmenu", e[e.copyWithSyntaxHighlighting = 15] = "copyWithSyntaxHighlighting", e[e.cursorBlinking = 16] = "cursorBlinking", e[e.cursorSmoothCaretAnimation = 17] = "cursorSmoothCaretAnimation", e[e.cursorStyle = 18] = "cursorStyle", e[e.cursorSurroundingLines = 19] = "cursorSurroundingLines", e[e.cursorSurroundingLinesStyle = 20] = "cursorSurroundingLinesStyle", e[e.cursorWidth = 21] = "cursorWidth", e[e.disableLayerHinting = 22] = "disableLayerHinting", e[e.disableMonospaceOptimizations = 23] = "disableMonospaceOptimizations", e[e.dragAndDrop = 24] = "dragAndDrop", e[e.emptySelectionClipboard = 25] = "emptySelectionClipboard", e[e.extraEditorClassName = 26] = "extraEditorClassName", e[e.fastScrollSensitivity = 27] = "fastScrollSensitivity", e[e.find = 28] = "find", e[e.fixedOverflowWidgets = 29] = "fixedOverflowWidgets", e[e.folding = 30] = "folding", e[e.foldingStrategy = 31] = "foldingStrategy", e[e.foldingHighlight = 32] = "foldingHighlight", e[e.fontFamily = 33] = "fontFamily", e[e.fontInfo = 34] = "fontInfo", e[e.fontLigatures = 35] = "fontLigatures", e[e.fontSize = 36] = "fontSize",
  14905. e[e.fontWeight = 37] = "fontWeight", e[e.formatOnPaste = 38] = "formatOnPaste", e[e.formatOnType = 39] = "formatOnType", e[e.glyphMargin = 40] = "glyphMargin", e[e.gotoLocation = 41] = "gotoLocation", e[e.hideCursorInOverviewRuler = 42] = "hideCursorInOverviewRuler", e[e.highlightActiveIndentGuide = 43] = "highlightActiveIndentGuide", e[e.hover = 44] = "hover", e[e.inDiffEditor = 45] = "inDiffEditor", e[e.letterSpacing = 46] = "letterSpacing", e[e.lightbulb = 47] = "lightbulb", e[e.lineDecorationsWidth = 48] = "lineDecorationsWidth", e[e.lineHeight = 49] = "lineHeight", e[e.lineNumbers = 50] = "lineNumbers", e[e.lineNumbersMinChars = 51] = "lineNumbersMinChars", e[e.links = 52] = "links", e[e.matchBrackets = 53] = "matchBrackets", e[e.minimap = 54] = "minimap", e[e.mouseStyle = 55] = "mouseStyle", e[e.mouseWheelScrollSensitivity = 56] = "mouseWheelScrollSensitivity", e[e.mouseWheelZoom = 57] = "mouseWheelZoom", e[e.multiCursorMergeOverlapping = 58] = "multiCursorMergeOverlapping", e[e.multiCursorModifier = 59] = "multiCursorModifier", e[e.multiCursorPaste = 60] = "multiCursorPaste",
  14906. e[e.occurrencesHighlight = 61] = "occurrencesHighlight", e[e.overviewRulerBorder = 62] = "overviewRulerBorder", e[e.overviewRulerLanes = 63] = "overviewRulerLanes", e[e.parameterHints = 64] = "parameterHints", e[e.peekWidgetDefaultFocus = 65] = "peekWidgetDefaultFocus", e[e.quickSuggestions = 66] = "quickSuggestions", e[e.quickSuggestionsDelay = 67] = "quickSuggestionsDelay", e[e.readOnly = 68] = "readOnly", e[e.renderControlCharacters = 69] = "renderControlCharacters", e[e.renderIndentGuides = 70] = "renderIndentGuides", e[e.renderFinalNewline = 71] = "renderFinalNewline", e[e.renderLineHighlight = 72] = "renderLineHighlight", e[e.renderValidationDecorations = 73] = "renderValidationDecorations", e[e.renderWhitespace = 74] = "renderWhitespace", e[e.revealHorizontalRightPadding = 75] = "revealHorizontalRightPadding", e[e.roundedSelection = 76] = "roundedSelection", e[e.rulers = 77] = "rulers", e[e.scrollbar = 78] = "scrollbar", e[e.scrollBeyondLastColumn = 79] = "scrollBeyondLastColumn", e[e.scrollBeyondLastLine = 80] = "scrollBeyondLastLine", e[e.selectionClipboard = 81] = "selectionClipboard",
  14907. e[e.selectionHighlight = 82] = "selectionHighlight", e[e.selectOnLineNumbers = 83] = "selectOnLineNumbers", e[e.showFoldingControls = 84] = "showFoldingControls", e[e.showUnused = 85] = "showUnused", e[e.snippetSuggestions = 86] = "snippetSuggestions", e[e.smoothScrolling = 87] = "smoothScrolling", e[e.stopRenderingLineAfter = 88] = "stopRenderingLineAfter", e[e.suggest = 89] = "suggest", e[e.suggestFontSize = 90] = "suggestFontSize", e[e.suggestLineHeight = 91] = "suggestLineHeight", e[e.suggestOnTriggerCharacters = 92] = "suggestOnTriggerCharacters", e[e.suggestSelection = 93] = "suggestSelection", e[e.tabCompletion = 94] = "tabCompletion", e[e.useTabStops = 95] = "useTabStops", e[e.wordSeparators = 96] = "wordSeparators", e[e.wordWrap = 97] = "wordWrap", e[e.wordWrapBreakAfterCharacters = 98] = "wordWrapBreakAfterCharacters", e[e.wordWrapBreakBeforeCharacters = 99] = "wordWrapBreakBeforeCharacters", e[e.wordWrapColumn = 100] = "wordWrapColumn",e[e.wordWrapMinified = 101] = "wordWrapMinified",e[e.wrappingIndent = 102] = "wrappingIndent",e[e.wrappingStrategy = 103] = "wrappingStrategy",
  14908. e[e.editorClassName = 104] = "editorClassName",e[e.pixelRatio = 105] = "pixelRatio",e[e.tabFocusMode = 106] = "tabFocusMode",e[e.layoutInfo = 107] = "layoutInfo",e[e.wrappingInfo = 108] = "wrappingInfo"
  14909. }(t.EditorOption || (t.EditorOption = {})), function (e) {
  14910. e[e.TextDefined = 0] = "TextDefined", e[e.LF = 1] = "LF", e[e.CRLF = 2] = "CRLF"
  14911. }(t.EndOfLinePreference || (t.EndOfLinePreference = {})), function (e) {
  14912. e[e.LF = 0] = "LF", e[e.CRLF = 1] = "CRLF"
  14913. }(t.EndOfLineSequence || (t.EndOfLineSequence = {})), function (e) {
  14914. e[e.None = 0] = "None", e[e.Indent = 1] = "Indent", e[e.IndentOutdent = 2] = "IndentOutdent", e[e.Outdent = 3] = "Outdent"
  14915. }(t.IndentAction || (t.IndentAction = {})), function (e) {
  14916. e[e.Unknown = 0] = "Unknown", e[e.Backspace = 1] = "Backspace", e[e.Tab = 2] = "Tab", e[e.Enter = 3] = "Enter", e[e.Shift = 4] = "Shift", e[e.Ctrl = 5] = "Ctrl", e[e.Alt = 6] = "Alt", e[e.PauseBreak = 7] = "PauseBreak", e[e.CapsLock = 8] = "CapsLock", e[e.Escape = 9] = "Escape", e[e.Space = 10] = "Space", e[e.PageUp = 11] = "PageUp", e[e.PageDown = 12] = "PageDown", e[e.End = 13] = "End", e[e.Home = 14] = "Home", e[e.LeftArrow = 15] = "LeftArrow", e[e.UpArrow = 16] = "UpArrow",
  14917. e[e.RightArrow = 17] = "RightArrow", e[e.DownArrow = 18] = "DownArrow", e[e.Insert = 19] = "Insert", e[e.Delete = 20] = "Delete", e[e.KEY_0 = 21] = "KEY_0", e[e.KEY_1 = 22] = "KEY_1", e[e.KEY_2 = 23] = "KEY_2", e[e.KEY_3 = 24] = "KEY_3", e[e.KEY_4 = 25] = "KEY_4", e[e.KEY_5 = 26] = "KEY_5", e[e.KEY_6 = 27] = "KEY_6", e[e.KEY_7 = 28] = "KEY_7", e[e.KEY_8 = 29] = "KEY_8", e[e.KEY_9 = 30] = "KEY_9", e[e.KEY_A = 31] = "KEY_A", e[e.KEY_B = 32] = "KEY_B", e[e.KEY_C = 33] = "KEY_C", e[e.KEY_D = 34] = "KEY_D", e[e.KEY_E = 35] = "KEY_E", e[e.KEY_F = 36] = "KEY_F", e[e.KEY_G = 37] = "KEY_G", e[e.KEY_H = 38] = "KEY_H", e[e.KEY_I = 39] = "KEY_I", e[e.KEY_J = 40] = "KEY_J", e[e.KEY_K = 41] = "KEY_K", e[e.KEY_L = 42] = "KEY_L", e[e.KEY_M = 43] = "KEY_M", e[e.KEY_N = 44] = "KEY_N", e[e.KEY_O = 45] = "KEY_O", e[e.KEY_P = 46] = "KEY_P", e[e.KEY_Q = 47] = "KEY_Q", e[e.KEY_R = 48] = "KEY_R", e[e.KEY_S = 49] = "KEY_S", e[e.KEY_T = 50] = "KEY_T", e[e.KEY_U = 51] = "KEY_U", e[e.KEY_V = 52] = "KEY_V", e[e.KEY_W = 53] = "KEY_W", e[e.KEY_X = 54] = "KEY_X", e[e.KEY_Y = 55] = "KEY_Y", e[e.KEY_Z = 56] = "KEY_Z", e[e.Meta = 57] = "Meta", e[e.ContextMenu = 58] = "ContextMenu", e[e.F1 = 59] = "F1", e[e.F2 = 60] = "F2", e[e.F3 = 61] = "F3", e[e.F4 = 62] = "F4",
  14918. e[e.F5 = 63] = "F5", e[e.F6 = 64] = "F6", e[e.F7 = 65] = "F7", e[e.F8 = 66] = "F8", e[e.F9 = 67] = "F9", e[e.F10 = 68] = "F10", e[e.F11 = 69] = "F11", e[e.F12 = 70] = "F12", e[e.F13 = 71] = "F13", e[e.F14 = 72] = "F14", e[e.F15 = 73] = "F15", e[e.F16 = 74] = "F16", e[e.F17 = 75] = "F17", e[e.F18 = 76] = "F18", e[e.F19 = 77] = "F19", e[e.NumLock = 78] = "NumLock", e[e.ScrollLock = 79] = "ScrollLock", e[e.US_SEMICOLON = 80] = "US_SEMICOLON", e[e.US_EQUAL = 81] = "US_EQUAL", e[e.US_COMMA = 82] = "US_COMMA", e[e.US_MINUS = 83] = "US_MINUS", e[e.US_DOT = 84] = "US_DOT", e[e.US_SLASH = 85] = "US_SLASH", e[e.US_BACKTICK = 86] = "US_BACKTICK", e[e.US_OPEN_SQUARE_BRACKET = 87] = "US_OPEN_SQUARE_BRACKET", e[e.US_BACKSLASH = 88] = "US_BACKSLASH", e[e.US_CLOSE_SQUARE_BRACKET = 89] = "US_CLOSE_SQUARE_BRACKET", e[e.US_QUOTE = 90] = "US_QUOTE", e[e.OEM_8 = 91] = "OEM_8", e[e.OEM_102 = 92] = "OEM_102", e[e.NUMPAD_0 = 93] = "NUMPAD_0", e[e.NUMPAD_1 = 94] = "NUMPAD_1", e[e.NUMPAD_2 = 95] = "NUMPAD_2", e[e.NUMPAD_3 = 96] = "NUMPAD_3", e[e.NUMPAD_4 = 97] = "NUMPAD_4", e[e.NUMPAD_5 = 98] = "NUMPAD_5", e[e.NUMPAD_6 = 99] = "NUMPAD_6", e[e.NUMPAD_7 = 100] = "NUMPAD_7",e[e.NUMPAD_8 = 101] = "NUMPAD_8",
  14919. e[e.NUMPAD_9 = 102] = "NUMPAD_9",e[e.NUMPAD_MULTIPLY = 103] = "NUMPAD_MULTIPLY",e[e.NUMPAD_ADD = 104] = "NUMPAD_ADD",e[e.NUMPAD_SEPARATOR = 105] = "NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT = 106] = "NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL = 107] = "NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE = 108] = "NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION = 109] = "KEY_IN_COMPOSITION",e[e.ABNT_C1 = 110] = "ABNT_C1",e[e.ABNT_C2 = 111] = "ABNT_C2",e[e.MAX_VALUE = 112] = "MAX_VALUE"
  14920. }(t.KeyCode || (t.KeyCode = {})), function (e) {
  14921. e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = "Warning", e[e.Error = 8] = "Error"
  14922. }(t.MarkerSeverity || (t.MarkerSeverity = {})), function (e) {
  14923. e[e.Unnecessary = 1] = "Unnecessary", e[e.Deprecated = 2] = "Deprecated"
  14924. }(t.MarkerTag || (t.MarkerTag = {})), function (e) {
  14925. e[e.Inline = 1] = "Inline", e[e.Gutter = 2] = "Gutter"
  14926. }(t.MinimapPosition || (t.MinimapPosition = {})), function (e) {
  14927. e[e.UNKNOWN = 0] = "UNKNOWN", e[e.TEXTAREA = 1] = "TEXTAREA", e[e.GUTTER_GLYPH_MARGIN = 2] = "GUTTER_GLYPH_MARGIN", e[e.GUTTER_LINE_NUMBERS = 3] = "GUTTER_LINE_NUMBERS", e[e.GUTTER_LINE_DECORATIONS = 4] = "GUTTER_LINE_DECORATIONS",
  14928. e[e.GUTTER_VIEW_ZONE = 5] = "GUTTER_VIEW_ZONE", e[e.CONTENT_TEXT = 6] = "CONTENT_TEXT", e[e.CONTENT_EMPTY = 7] = "CONTENT_EMPTY", e[e.CONTENT_VIEW_ZONE = 8] = "CONTENT_VIEW_ZONE", e[e.CONTENT_WIDGET = 9] = "CONTENT_WIDGET", e[e.OVERVIEW_RULER = 10] = "OVERVIEW_RULER", e[e.SCROLLBAR = 11] = "SCROLLBAR", e[e.OVERLAY_WIDGET = 12] = "OVERLAY_WIDGET", e[e.OUTSIDE_EDITOR = 13] = "OUTSIDE_EDITOR"
  14929. }(t.MouseTargetType || (t.MouseTargetType = {})), function (e) {
  14930. e[e.TOP_RIGHT_CORNER = 0] = "TOP_RIGHT_CORNER", e[e.BOTTOM_RIGHT_CORNER = 1] = "BOTTOM_RIGHT_CORNER", e[e.TOP_CENTER = 2] = "TOP_CENTER"
  14931. }(t.OverlayWidgetPositionPreference || (t.OverlayWidgetPositionPreference = {})), function (e) {
  14932. e[e.Left = 1] = "Left", e[e.Center = 2] = "Center", e[e.Right = 4] = "Right", e[e.Full = 7] = "Full"
  14933. }(t.OverviewRulerLane || (t.OverviewRulerLane = {})), function (e) {
  14934. e[e.Off = 0] = "Off", e[e.On = 1] = "On", e[e.Relative = 2] = "Relative", e[e.Interval = 3] = "Interval", e[e.Custom = 4] = "Custom"
  14935. }(t.RenderLineNumbersType || (t.RenderLineNumbersType = {})), function (e) {
  14936. e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Blocks = 2] = "Blocks"
  14937. }(t.RenderMinimap || (t.RenderMinimap = {})), function (e) {
  14938. e[e.Smooth = 0] = "Smooth", e[e.Immediate = 1] = "Immediate"
  14939. }(t.ScrollType || (t.ScrollType = {})), function (e) {
  14940. e[e.Auto = 1] = "Auto", e[e.Hidden = 2] = "Hidden", e[e.Visible = 3] = "Visible"
  14941. }(t.ScrollbarVisibility || (t.ScrollbarVisibility = {})), function (e) {
  14942. e[e.LTR = 0] = "LTR", e[e.RTL = 1] = "RTL"
  14943. }(t.SelectionDirection || (t.SelectionDirection = {})), function (e) {
  14944. e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange"
  14945. }(t.SignatureHelpTriggerKind || (t.SignatureHelpTriggerKind = {})), function (e) {
  14946. e[e.File = 0] = "File", e[e.Module = 1] = "Module", e[e.Namespace = 2] = "Namespace", e[e.Package = 3] = "Package", e[e.Class = 4] = "Class", e[e.Method = 5] = "Method", e[e.Property = 6] = "Property", e[e.Field = 7] = "Field", e[e.Constructor = 8] = "Constructor", e[e.Enum = 9] = "Enum", e[e.Interface = 10] = "Interface", e[e.Function = 11] = "Function", e[e.Variable = 12] = "Variable", e[e.Constant = 13] = "Constant", e[e.String = 14] = "String", e[e.Number = 15] = "Number", e[e.Boolean = 16] = "Boolean", e[e.Array = 17] = "Array",
  14947. e[e.Object = 18] = "Object", e[e.Key = 19] = "Key", e[e.Null = 20] = "Null", e[e.EnumMember = 21] = "EnumMember", e[e.Struct = 22] = "Struct", e[e.Event = 23] = "Event", e[e.Operator = 24] = "Operator", e[e.TypeParameter = 25] = "TypeParameter"
  14948. }(t.SymbolKind || (t.SymbolKind = {})), function (e) {
  14949. e[e.Deprecated = 1] = "Deprecated"
  14950. }(t.SymbolTag || (t.SymbolTag = {})), function (e) {
  14951. e[e.Hidden = 0] = "Hidden", e[e.Blink = 1] = "Blink", e[e.Smooth = 2] = "Smooth", e[e.Phase = 3] = "Phase", e[e.Expand = 4] = "Expand", e[e.Solid = 5] = "Solid"
  14952. }(t.TextEditorCursorBlinkingStyle || (t.TextEditorCursorBlinkingStyle = {})), function (e) {
  14953. e[e.Line = 1] = "Line", e[e.Block = 2] = "Block", e[e.Underline = 3] = "Underline", e[e.LineThin = 4] = "LineThin", e[e.BlockOutline = 5] = "BlockOutline", e[e.UnderlineThin = 6] = "UnderlineThin"
  14954. }(t.TextEditorCursorStyle || (t.TextEditorCursorStyle = {})), function (e) {
  14955. e[e.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges", e[e.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges", e[e.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore",
  14956. e[e.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter"
  14957. }(t.TrackedRangeStickiness || (t.TrackedRangeStickiness = {})), function (e) {
  14958. e[e.None = 0] = "None", e[e.Same = 1] = "Same", e[e.Indent = 2] = "Indent", e[e.DeepIndent = 3] = "DeepIndent"
  14959. }(t.WrappingIndent || (t.WrappingIndent = {}))
  14960. })),define(n[192], i([0, 1, 26, 4, 36, 25, 13, 3, 22, 107, 147, 614]), (function (e, t, n, i, o, r, s, a, l, u, d) {
  14961. "use strict";
  14962. Object.defineProperty(t, "__esModule", {value: !0});
  14963. var c = function () {
  14964. function e() {
  14965. }
  14966. return e.chord = function (e, t) {
  14967. return o.KeyChord(e, t)
  14968. }, e.CtrlCmd = 2048, e.Shift = 1024, e.Alt = 512, e.WinCtrl = 256, e
  14969. }();
  14970. t.KeyMod = c, t.createMonacoBaseAPI = function () {
  14971. return {
  14972. editor: void 0,
  14973. languages: void 0,
  14974. CancellationTokenSource: n.CancellationTokenSource,
  14975. Emitter: i.Emitter,
  14976. KeyCode: d.KeyCode,
  14977. KeyMod: c,
  14978. Position: s.Position,
  14979. Range: a.Range,
  14980. Selection: l.Selection,
  14981. SelectionDirection: d.SelectionDirection,
  14982. MarkerSeverity: d.MarkerSeverity,
  14983. MarkerTag: d.MarkerTag,
  14984. Uri: r.URI,
  14985. Token: u.Token
  14986. }
  14987. }
  14988. })),define(n[193], i([0, 1]), (function (e, t) {
  14989. "use strict";
  14990. Object.defineProperty(t, "__esModule", {value: !0})
  14991. ;var n = function () {
  14992. function e(e, t, n) {
  14993. this.from = 0 | e, this.to = 0 | t, this.colorId = 0 | n
  14994. }
  14995. return e.compare = function (e, t) {
  14996. return e.colorId === t.colorId ? e.from === t.from ? e.to - t.to : e.from - t.from : e.colorId - t.colorId
  14997. }, e
  14998. }();
  14999. t.ColorZone = n;
  15000. var i = function () {
  15001. function e(e, t, n) {
  15002. this.startLineNumber = e, this.endLineNumber = t, this.color = n, this._colorZone = null
  15003. }
  15004. return e.compare = function (e, t) {
  15005. return e.color === t.color ? e.startLineNumber === t.startLineNumber ? e.endLineNumber - t.endLineNumber : e.startLineNumber - t.startLineNumber : e.color < t.color ? -1 : 1
  15006. }, e.prototype.setColorZone = function (e) {
  15007. this._colorZone = e
  15008. }, e.prototype.getColorZones = function () {
  15009. return this._colorZone
  15010. }, e
  15011. }();
  15012. t.OverviewRulerZone = i;
  15013. var o = function () {
  15014. function e(e) {
  15015. this._getVerticalOffsetForLine = e, this._zones = [], this._colorZonesInvalid = !1, this._lineHeight = 0, this._domWidth = 0, this._domHeight = 0, this._outerHeight = 0, this._pixelRatio = 1, this._lastAssignedId = 0, this._color2Id = Object.create(null), this._id2Color = []
  15016. }
  15017. return e.prototype.getId2Color = function () {
  15018. return this._id2Color
  15019. },
  15020. e.prototype.setZones = function (e) {
  15021. this._zones = e, this._zones.sort(i.compare)
  15022. }, e.prototype.setLineHeight = function (e) {
  15023. return this._lineHeight !== e && (this._lineHeight = e, this._colorZonesInvalid = !0, !0)
  15024. }, e.prototype.setPixelRatio = function (e) {
  15025. this._pixelRatio = e, this._colorZonesInvalid = !0
  15026. }, e.prototype.getDOMWidth = function () {
  15027. return this._domWidth
  15028. }, e.prototype.getCanvasWidth = function () {
  15029. return this._domWidth * this._pixelRatio
  15030. }, e.prototype.setDOMWidth = function (e) {
  15031. return this._domWidth !== e && (this._domWidth = e, this._colorZonesInvalid = !0, !0)
  15032. }, e.prototype.getDOMHeight = function () {
  15033. return this._domHeight
  15034. }, e.prototype.getCanvasHeight = function () {
  15035. return this._domHeight * this._pixelRatio
  15036. }, e.prototype.setDOMHeight = function (e) {
  15037. return this._domHeight !== e && (this._domHeight = e, this._colorZonesInvalid = !0, !0)
  15038. }, e.prototype.getOuterHeight = function () {
  15039. return this._outerHeight
  15040. }, e.prototype.setOuterHeight = function (e) {
  15041. return this._outerHeight !== e && (this._outerHeight = e, this._colorZonesInvalid = !0, !0)
  15042. }, e.prototype.resolveColorZones = function () {
  15043. for (var e = this._colorZonesInvalid, t = Math.floor(this._lineHeight), i = Math.floor(this.getCanvasHeight()), o = i / Math.floor(this._outerHeight), r = Math.floor(4 * this._pixelRatio / 2), s = [], a = 0, l = this._zones.length; a < l; a++) {
  15044. var u = this._zones[a];
  15045. if (!e) {
  15046. var d = u.getColorZones();
  15047. if (d) {
  15048. s.push(d);
  15049. continue
  15050. }
  15051. }
  15052. var c = Math.floor(o * this._getVerticalOffsetForLine(u.startLineNumber)),
  15053. h = Math.floor(o * (this._getVerticalOffsetForLine(u.endLineNumber) + t)),
  15054. p = Math.floor((c + h) / 2), g = h - p;
  15055. g < r && (g = r), p - g < 0 && (p = g), p + g > i && (p = i - g);
  15056. var f = u.color, m = this._color2Id[f];
  15057. m || (m = ++this._lastAssignedId, this._color2Id[f] = m, this._id2Color[m] = f);
  15058. var v = new n(p - g, p + g, m);
  15059. u.setColorZone(v), s.push(v)
  15060. }
  15061. return this._colorZonesInvalid = !1, s.sort(n.compare), s
  15062. }, e
  15063. }();
  15064. t.OverviewZoneManager = o
  15065. })),define(n[91], i([0, 1]), (function (e, t) {
  15066. "use strict";
  15067. Object.defineProperty(t, "__esModule", {value: !0});
  15068. var n = function () {
  15069. function e(e, t) {
  15070. this._viewLayout = e, this.viewportData = t, this.scrollWidth = this._viewLayout.getScrollWidth(), this.scrollHeight = this._viewLayout.getScrollHeight(),
  15071. this.visibleRange = this.viewportData.visibleRange, this.bigNumbersDelta = this.viewportData.bigNumbersDelta;
  15072. var n = this._viewLayout.getCurrentViewport();
  15073. this.scrollTop = n.top, this.scrollLeft = n.left, this.viewportWidth = n.width, this.viewportHeight = n.height
  15074. }
  15075. return e.prototype.getScrolledTopFromAbsoluteTop = function (e) {
  15076. return e - this.scrollTop
  15077. }, e.prototype.getVerticalOffsetForLineNumber = function (e) {
  15078. return this._viewLayout.getVerticalOffsetForLineNumber(e)
  15079. }, e.prototype.getDecorationsInViewport = function () {
  15080. return this.viewportData.getDecorationsInViewport()
  15081. }, e
  15082. }();
  15083. t.RestrictedRenderingContext = n;
  15084. var i = function (e) {
  15085. function t(t, n, i) {
  15086. var o = e.call(this, t, n) || this;
  15087. return o._viewLines = i, o
  15088. }
  15089. return r(t, e), t.prototype.linesVisibleRangesForRange = function (e, t) {
  15090. return this._viewLines.linesVisibleRangesForRange(e, t)
  15091. }, t.prototype.visibleRangeForPosition = function (e) {
  15092. return this._viewLines.visibleRangeForPosition(e)
  15093. }, t
  15094. }(n);
  15095. t.RenderingContext = i;
  15096. var o = function (e, t, n) {
  15097. this.outsideRenderedLine = e, this.lineNumber = t, this.ranges = n
  15098. }
  15099. ;t.LineVisibleRanges = o;
  15100. var s = function () {
  15101. function e(e, t) {
  15102. this.left = Math.round(e), this.width = Math.round(t)
  15103. }
  15104. return e.prototype.toString = function () {
  15105. return "[" + this.left + "," + this.width + "]"
  15106. }, e
  15107. }();
  15108. t.HorizontalRange = s;
  15109. var a = function (e, t) {
  15110. this.outsideRenderedLine = e, this.left = Math.round(t)
  15111. };
  15112. t.HorizontalPosition = a;
  15113. var l = function (e, t) {
  15114. this.outsideRenderedLine = e, this.ranges = t
  15115. };
  15116. t.VisibleRanges = l
  15117. })),define(n[359], i([0, 1, 91]), (function (e, t, n) {
  15118. "use strict";
  15119. Object.defineProperty(t, "__esModule", {value: !0});
  15120. var i = function () {
  15121. function e(e, t) {
  15122. this.left = e, this.width = t
  15123. }
  15124. return e.prototype.toString = function () {
  15125. return "[" + this.left + "," + this.width + "]"
  15126. }, e.compare = function (e, t) {
  15127. return e.left - t.left
  15128. }, e
  15129. }(), o = function () {
  15130. function e() {
  15131. }
  15132. return e._createRange = function () {
  15133. return this._handyReadyRange || (this._handyReadyRange = document.createRange()), this._handyReadyRange
  15134. }, e._detachRange = function (e, t) {
  15135. e.selectNodeContents(t)
  15136. }, e._readClientRects = function (e, t, n, i, o) {
  15137. var r = this._createRange();
  15138. try {
  15139. return r.setStart(e, t), r.setEnd(n, i), r.getClientRects()
  15140. } catch (e) {
  15141. return null
  15142. } finally {
  15143. this._detachRange(r, o)
  15144. }
  15145. }, e._mergeAdjacentRanges = function (e) {
  15146. if (1 === e.length) return [new n.HorizontalRange(e[0].left, e[0].width)];
  15147. e.sort(i.compare);
  15148. for (var t = [], o = 0, r = e[0].left, s = e[0].width, a = 1, l = e.length; a < l; a++) {
  15149. var u = e[a], d = u.left, c = u.width;
  15150. r + s + .9 >= d ? s = Math.max(s, d + c - r) : (t[o++] = new n.HorizontalRange(r, s), r = d, s = c)
  15151. }
  15152. return t[o++] = new n.HorizontalRange(r, s), t
  15153. }, e._createHorizontalRangesFromClientRects = function (e, t) {
  15154. if (!e || 0 === e.length) return null;
  15155. for (var n = [], o = 0, r = e.length; o < r; o++) {
  15156. var s = e[o];
  15157. n[o] = new i(Math.max(0, s.left - t), s.width)
  15158. }
  15159. return this._mergeAdjacentRanges(n)
  15160. }, e.readHorizontalRanges = function (e, t, n, i, o, r, s) {
  15161. var a = e.children.length - 1;
  15162. if (0 > a) return null;
  15163. (t = Math.min(a, Math.max(0, t))) !== (i = Math.min(a, Math.max(0, i))) && i > 0 && 0 === o && (i--, o = 1073741824);
  15164. var l = e.children[t].firstChild, u = e.children[i].firstChild;
  15165. if (l && u || (!l && 0 === n && t > 0 && (l = e.children[t - 1].firstChild, n = 1073741824), !u && 0 === o && i > 0 && (u = e.children[i - 1].firstChild, o = 1073741824)), !l || !u) return null
  15166. ;
  15167. n = Math.min(l.textContent.length, Math.max(0, n)), o = Math.min(u.textContent.length, Math.max(0, o));
  15168. var d = this._readClientRects(l, n, u, o, s);
  15169. return this._createHorizontalRangesFromClientRects(d, r)
  15170. }, e
  15171. }();
  15172. t.RangeUtil = o
  15173. })),define(n[360], i([0, 1]), (function (e, t) {
  15174. "use strict";
  15175. Object.defineProperty(t, "__esModule", {value: !0});
  15176. var n = function () {
  15177. function e(e, t, n, i) {
  15178. this.configuration = e, this.theme = t, this.model = n, this.viewLayout = n.viewLayout, this.privateViewEventBus = i
  15179. }
  15180. return e.prototype.addEventHandler = function (e) {
  15181. this.privateViewEventBus.addEventHandler(e)
  15182. }, e.prototype.removeEventHandler = function (e) {
  15183. this.privateViewEventBus.removeEventHandler(e)
  15184. }, e
  15185. }();
  15186. t.ViewContext = n
  15187. })),define(n[361], i([0, 1]), (function (e, t) {
  15188. "use strict";
  15189. Object.defineProperty(t, "__esModule", {value: !0});
  15190. var n = function () {
  15191. function e(e) {
  15192. this._eventHandlerGateKeeper = e, this._eventHandlers = [], this._eventQueue = null, this._isConsumingQueue = !1
  15193. }
  15194. return e.prototype.addEventHandler = function (e) {
  15195. for (var t = 0, n = this._eventHandlers.length; t < n; t++) this._eventHandlers[t] === e && console.warn("Detected duplicate listener in ViewEventDispatcher", e);
  15196. this._eventHandlers.push(e)
  15197. }, e.prototype.removeEventHandler = function (e) {
  15198. for (var t = 0; t < this._eventHandlers.length; t++) if (this._eventHandlers[t] === e) {
  15199. this._eventHandlers.splice(t, 1);
  15200. break
  15201. }
  15202. }, e.prototype.emit = function (e) {
  15203. this._eventQueue ? this._eventQueue.push(e) : this._eventQueue = [e], this._isConsumingQueue || this.consumeQueue()
  15204. }, e.prototype.emitMany = function (e) {
  15205. this._eventQueue ? this._eventQueue = this._eventQueue.concat(e) : this._eventQueue = e, this._isConsumingQueue || this.consumeQueue()
  15206. }, e.prototype.consumeQueue = function () {
  15207. var e = this;
  15208. this._eventHandlerGateKeeper((function () {
  15209. try {
  15210. e._isConsumingQueue = !0, e._doConsumeQueue()
  15211. } finally {
  15212. e._isConsumingQueue = !1
  15213. }
  15214. }))
  15215. }, e.prototype._doConsumeQueue = function () {
  15216. for (; this._eventQueue;) {
  15217. var e = this._eventQueue;
  15218. this._eventQueue = null;
  15219. for (var t = this._eventHandlers.slice(0), n = 0, i = t.length; n < i; n++) t[n].handleEvents(e)
  15220. }
  15221. }, e
  15222. }();
  15223. t.ViewEventDispatcher = n
  15224. })),define(n[81], i([0, 1, 10, 2]), (function (e, t, n, i) {
  15225. "use strict";
  15226. Object.defineProperty(t, "__esModule", {value: !0});
  15227. var o = function () {
  15228. function e(e) {
  15229. this.type = 1, this._source = e
  15230. }
  15231. return e.prototype.hasChanged = function (e) {
  15232. return this._source.hasChanged(e)
  15233. }, e
  15234. }();
  15235. t.ViewConfigurationChangedEvent = o;
  15236. var s = function (e) {
  15237. this.type = 2, this.contentWidth = e.contentWidth, this.contentHeight = e.contentHeight, this.contentWidthChanged = e.contentWidthChanged, this.contentHeightChanged = e.contentHeightChanged
  15238. };
  15239. t.ViewContentSizeChangedEvent = s;
  15240. var a = function (e, t) {
  15241. this.type = 3, this.selections = e, this.modelSelections = t
  15242. };
  15243. t.ViewCursorStateChangedEvent = a;
  15244. var l = function () {
  15245. this.type = 4
  15246. };
  15247. t.ViewDecorationsChangedEvent = l;
  15248. var u = function () {
  15249. this.type = 5
  15250. };
  15251. t.ViewFlushedEvent = u;
  15252. var d = function (e) {
  15253. this.type = 6, this.isFocused = e
  15254. };
  15255. t.ViewFocusChangedEvent = d;
  15256. var c = function () {
  15257. this.type = 7
  15258. };
  15259. t.ViewLanguageConfigurationEvent = c;
  15260. var h = function () {
  15261. this.type = 8
  15262. };
  15263. t.ViewLineMappingChangedEvent = h;
  15264. var p = function (e, t) {
  15265. this.type = 9, this.fromLineNumber = e, this.toLineNumber = t
  15266. }
  15267. ;t.ViewLinesChangedEvent = p;
  15268. var g = function (e, t) {
  15269. this.type = 10, this.fromLineNumber = e, this.toLineNumber = t
  15270. };
  15271. t.ViewLinesDeletedEvent = g;
  15272. var f = function (e, t) {
  15273. this.type = 11, this.fromLineNumber = e, this.toLineNumber = t
  15274. };
  15275. t.ViewLinesInsertedEvent = f;
  15276. var m = function (e, t, n, i, o) {
  15277. this.type = 12, this.source = e, this.range = t, this.verticalType = n, this.revealHorizontal = i, this.scrollType = o
  15278. };
  15279. t.ViewRevealRangeRequestEvent = m;
  15280. var v = function (e) {
  15281. this.type = 13, this.scrollWidth = e.scrollWidth, this.scrollLeft = e.scrollLeft, this.scrollHeight = e.scrollHeight, this.scrollTop = e.scrollTop, this.scrollWidthChanged = e.scrollWidthChanged, this.scrollLeftChanged = e.scrollLeftChanged, this.scrollHeightChanged = e.scrollHeightChanged, this.scrollTopChanged = e.scrollTopChanged
  15282. };
  15283. t.ViewScrollChangedEvent = v;
  15284. var _ = function () {
  15285. this.type = 14
  15286. };
  15287. t.ViewThemeChangedEvent = _;
  15288. var y = function (e) {
  15289. this.type = 15, this.ranges = e
  15290. };
  15291. t.ViewTokensChangedEvent = y;
  15292. var C = function () {
  15293. this.type = 16
  15294. };
  15295. t.ViewTokensColorsChangedEvent = C;
  15296. var b = function () {
  15297. this.type = 17
  15298. };
  15299. t.ViewZonesChangedEvent = b;
  15300. var S = function (e) {
  15301. function t() {
  15302. var t = e.call(this) || this;
  15303. return t._listeners = [], t._collector = null, t._collectorCnt = 0, t
  15304. }
  15305. return r(t, e), t.prototype.dispose = function () {
  15306. this._listeners = [], e.prototype.dispose.call(this)
  15307. }, t.prototype._beginEmit = function () {
  15308. return this._collectorCnt++, 1 === this._collectorCnt && (this._collector = new w), this._collector
  15309. }, t.prototype._endEmit = function () {
  15310. if (this._collectorCnt--, 0 === this._collectorCnt) {
  15311. var e = this._collector.finalize();
  15312. this._collector = null, e.length > 0 && this._emit(e)
  15313. }
  15314. }, t.prototype._emit = function (e) {
  15315. for (var t = this._listeners.slice(0), n = 0, i = t.length; n < i; n++) E(t[n], e)
  15316. }, t.prototype.addEventListener = function (e) {
  15317. var t = this;
  15318. return this._listeners.push(e), i.toDisposable((function () {
  15319. for (var n = t._listeners, i = 0, o = n.length; i < o; i++) if (n[i] === e) {
  15320. n.splice(i, 1);
  15321. break
  15322. }
  15323. }))
  15324. }, t
  15325. }(i.Disposable);
  15326. t.ViewEventEmitter = S;
  15327. var w = function () {
  15328. function e() {
  15329. this._eventsLen = 0, this._events = [], this._eventsLen = 0
  15330. }
  15331. return e.prototype.emit = function (e) {
  15332. this._events[this._eventsLen++] = e
  15333. }, e.prototype.finalize = function () {
  15334. var e = this._events
  15335. ;
  15336. return this._events = [], e
  15337. }, e
  15338. }();
  15339. function E(e, t) {
  15340. try {
  15341. e(t)
  15342. } catch (e) {
  15343. n.onUnexpectedError(e)
  15344. }
  15345. }
  15346. t.ViewEventsCollector = w
  15347. })),define(n[148], i([0, 1, 5]), (function (e, t, n) {
  15348. "use strict";
  15349. Object.defineProperty(t, "__esModule", {value: !0});
  15350. var i = function () {
  15351. function e(e, t, n, i) {
  15352. this.startColumn = e, this.endColumn = t, this.className = n, this.type = i
  15353. }
  15354. return e._equals = function (e, t) {
  15355. return e.startColumn === t.startColumn && e.endColumn === t.endColumn && e.className === t.className && e.type === t.type
  15356. }, e.equalsArr = function (t, n) {
  15357. var i = t.length;
  15358. if (i !== n.length) return !1;
  15359. for (var o = 0; o < i; o++) if (!e._equals(t[o], n[o])) return !1;
  15360. return !0
  15361. }, e.filter = function (t, n, i, o) {
  15362. if (0 === t.length) return [];
  15363. for (var r = [], s = 0, a = 0, l = t.length; a < l; a++) {
  15364. var u = t[a], d = u.range;
  15365. if (!(d.endLineNumber < n || d.startLineNumber > n) && (!d.isEmpty() || 0 !== u.type && 3 !== u.type)) {
  15366. var c = d.startLineNumber === n ? d.startColumn : i,
  15367. h = d.endLineNumber === n ? d.endColumn : o;
  15368. r[s++] = new e(c, h, u.inlineClassName, u.type)
  15369. }
  15370. }
  15371. return r
  15372. }, e.compare = function (e, t) {
  15373. return e.startColumn === t.startColumn ? e.endColumn === t.endColumn ? e.className < t.className ? -1 : e.className > t.className ? 1 : 0 : e.endColumn - t.endColumn : e.startColumn - t.startColumn
  15374. }, e
  15375. }();
  15376. t.LineDecoration = i;
  15377. var o = function (e, t, n) {
  15378. this.startOffset = e, this.endOffset = t, this.className = n
  15379. };
  15380. t.DecorationSegment = o;
  15381. var r = function () {
  15382. function e() {
  15383. this.stopOffsets = [], this.classNames = [], this.count = 0
  15384. }
  15385. return e.prototype.consumeLowerThan = function (e, t, n) {
  15386. for (; this.count > 0 && this.stopOffsets[0] < e;) {
  15387. for (var i = 0; i + 1 < this.count && this.stopOffsets[i] === this.stopOffsets[i + 1];) i++;
  15388. n.push(new o(t, this.stopOffsets[i], this.classNames.join(" "))), t = this.stopOffsets[i] + 1, this.stopOffsets.splice(0, i + 1), this.classNames.splice(0, i + 1), this.count -= i + 1
  15389. }
  15390. return this.count > 0 && t < e && (n.push(new o(t, e - 1, this.classNames.join(" "))), t = e), t
  15391. }, e.prototype.insert = function (e, t) {
  15392. if (0 === this.count || this.stopOffsets[this.count - 1] <= e) this.stopOffsets.push(e), this.classNames.push(t); else for (var n = 0; n < this.count; n++) if (this.stopOffsets[n] >= e) {
  15393. this.stopOffsets.splice(n, 0, e),
  15394. this.classNames.splice(n, 0, t);
  15395. break
  15396. }
  15397. this.count++
  15398. }, e
  15399. }(), s = function () {
  15400. function e() {
  15401. }
  15402. return e.normalize = function (e, t) {
  15403. if (0 === t.length) return [];
  15404. for (var i = [], o = new r, s = 0, a = 0, l = t.length; a < l; a++) {
  15405. var u = t[a], d = u.startColumn, c = u.endColumn, h = u.className;
  15406. if (d > 1) {
  15407. var p = e.charCodeAt(d - 2);
  15408. n.isHighSurrogate(p) && d--
  15409. }
  15410. if (c > 1) {
  15411. p = e.charCodeAt(c - 2);
  15412. n.isHighSurrogate(p) && c--
  15413. }
  15414. var g = d - 1, f = c - 2;
  15415. s = o.consumeLowerThan(g, s, i), 0 === o.count && (s = g), o.insert(f, h)
  15416. }
  15417. return o.consumeLowerThan(1073741824, s, i), i
  15418. }, e
  15419. }();
  15420. t.LineDecorationsNormalizer = s
  15421. })),define(n[362], i([0, 1, 5]), (function (e, t, n) {
  15422. "use strict";
  15423. Object.defineProperty(t, "__esModule", {value: !0});
  15424. var i = function () {
  15425. function e() {
  15426. this._hasPending = !1, this._inserts = [], this._changes = [], this._removes = []
  15427. }
  15428. return e.prototype.insert = function (e) {
  15429. this._hasPending = !0, this._inserts.push(e)
  15430. }, e.prototype.change = function (e) {
  15431. this._hasPending = !0, this._changes.push(e)
  15432. }, e.prototype.remove = function (e) {
  15433. this._hasPending = !0, this._removes.push(e)
  15434. }, e.prototype.mustCommit = function () {
  15435. return this._hasPending
  15436. },
  15437. e.prototype.commit = function (e) {
  15438. if (this._hasPending) {
  15439. var t = this._inserts, n = this._changes, i = this._removes;
  15440. this._hasPending = !1, this._inserts = [], this._changes = [], this._removes = [], e._commitPendingChanges(t, n, i)
  15441. }
  15442. }, e
  15443. }(), o = function (e, t, n, i, o) {
  15444. this.id = e, this.afterLineNumber = t, this.ordinal = n, this.height = i, this.minWidth = o, this.prefixSum = 0
  15445. };
  15446. t.EditorWhitespace = o;
  15447. var r = function () {
  15448. function e(t, o) {
  15449. this._instanceId = n.singleLetterHash(++e.INSTANCE_COUNT), this._pendingChanges = new i, this._lastWhitespaceId = 0, this._arr = [], this._prefixSumValidIndex = -1, this._minWidth = -1, this._lineCount = t, this._lineHeight = o
  15450. }
  15451. return e.findInsertionIndex = function (e, t, n) {
  15452. for (var i = 0, o = e.length; i < o;) {
  15453. var r = i + o >>> 1;
  15454. t === e[r].afterLineNumber ? n < e[r].ordinal ? o = r : i = r + 1 : t < e[r].afterLineNumber ? o = r : i = r + 1
  15455. }
  15456. return i
  15457. }, e.prototype.setLineHeight = function (e) {
  15458. this._checkPendingChanges(), this._lineHeight = e
  15459. }, e.prototype.onFlushed = function (e) {
  15460. this._checkPendingChanges(), this._lineCount = e
  15461. }, e.prototype.changeWhitespace = function (e) {
  15462. var t = this;
  15463. try {
  15464. return e({
  15465. insertWhitespace: function (e, n, i, r) {
  15466. e |= 0, n |= 0, i |= 0, r |= 0;
  15467. var s = t._instanceId + ++t._lastWhitespaceId;
  15468. return t._pendingChanges.insert(new o(s, e, n, i, r)), s
  15469. }, changeOneWhitespace: function (e, n, i) {
  15470. n |= 0, i |= 0, t._pendingChanges.change({id: e, newAfterLineNumber: n, newHeight: i})
  15471. }, removeWhitespace: function (e) {
  15472. t._pendingChanges.remove({id: e})
  15473. }
  15474. })
  15475. } finally {
  15476. this._pendingChanges.commit(this)
  15477. }
  15478. }, e.prototype._commitPendingChanges = function (e, t, n) {
  15479. if ((e.length > 0 || n.length > 0) && (this._minWidth = -1), e.length + t.length + n.length <= 1) {
  15480. for (var i = 0, o = e; i < o.length; i++) {
  15481. var r = o[i];
  15482. this._insertWhitespace(r)
  15483. }
  15484. for (var s = 0, a = t; s < a.length; s++) {
  15485. var l = a[s];
  15486. this._changeOneWhitespace(l.id, l.newAfterLineNumber, l.newHeight)
  15487. }
  15488. for (var u = 0, d = n; u < d.length; u++) {
  15489. var c = d[u], h = this._findWhitespaceIndex(c.id);
  15490. -1 !== h && this._removeWhitespace(h)
  15491. }
  15492. } else {
  15493. for (var p = new Set, g = 0, f = n; g < f.length; g++) {
  15494. c = f[g];
  15495. p.add(c.id)
  15496. }
  15497. for (var m = new Map, v = 0, _ = t; v < _.length; v++) {
  15498. l = _[v];
  15499. m.set(l.id, l)
  15500. }
  15501. var y = function (e) {
  15502. for (var t = [], n = 0, i = e; n < i.length; n++) {
  15503. var o = i[n];
  15504. if (!p.has(o.id)) {
  15505. if (m.has(o.id)) {
  15506. var r = m.get(o.id);
  15507. o.afterLineNumber = r.newAfterLineNumber, o.height = r.newHeight
  15508. }
  15509. t.push(o)
  15510. }
  15511. }
  15512. return t
  15513. }, C = y(this._arr).concat(y(e));
  15514. C.sort((function (e, t) {
  15515. return e.afterLineNumber === t.afterLineNumber ? e.ordinal - t.ordinal : e.afterLineNumber - t.afterLineNumber
  15516. })), this._arr = C, this._prefixSumValidIndex = -1
  15517. }
  15518. }, e.prototype._checkPendingChanges = function () {
  15519. this._pendingChanges.mustCommit() && this._pendingChanges.commit(this)
  15520. }, e.prototype._insertWhitespace = function (t) {
  15521. var n = e.findInsertionIndex(this._arr, t.afterLineNumber, t.ordinal);
  15522. this._arr.splice(n, 0, t), this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, n - 1)
  15523. }, e.prototype._findWhitespaceIndex = function (e) {
  15524. for (var t = this._arr, n = 0, i = t.length; n < i; n++) if (t[n].id === e) return n;
  15525. return -1
  15526. }, e.prototype._changeOneWhitespace = function (e, t, n) {
  15527. var i = this._findWhitespaceIndex(e);
  15528. if (-1 !== i && (this._arr[i].height !== n && (this._arr[i].height = n, this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, i - 1)), this._arr[i].afterLineNumber !== t)) {
  15529. var o = this._arr[i];
  15530. this._removeWhitespace(i),
  15531. o.afterLineNumber = t, this._insertWhitespace(o)
  15532. }
  15533. }, e.prototype._removeWhitespace = function (e) {
  15534. this._arr.splice(e, 1), this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, e - 1)
  15535. }, e.prototype.onLinesDeleted = function (e, t) {
  15536. this._checkPendingChanges(), e |= 0, t |= 0, this._lineCount -= t - e + 1;
  15537. for (var n = 0, i = this._arr.length; n < i; n++) {
  15538. var o = this._arr[n].afterLineNumber;
  15539. e <= o && o <= t ? this._arr[n].afterLineNumber = e - 1 : o > t && (this._arr[n].afterLineNumber -= t - e + 1)
  15540. }
  15541. }, e.prototype.onLinesInserted = function (e, t) {
  15542. this._checkPendingChanges(), e |= 0, t |= 0, this._lineCount += t - e + 1;
  15543. for (var n = 0, i = this._arr.length; n < i; n++) {
  15544. e <= this._arr[n].afterLineNumber && (this._arr[n].afterLineNumber += t - e + 1)
  15545. }
  15546. }, e.prototype.getWhitespacesTotalHeight = function () {
  15547. return this._checkPendingChanges(), 0 === this._arr.length ? 0 : this.getWhitespacesAccumulatedHeight(this._arr.length - 1)
  15548. }, e.prototype.getWhitespacesAccumulatedHeight = function (e) {
  15549. this._checkPendingChanges(), e |= 0;
  15550. var t = Math.max(0, this._prefixSumValidIndex + 1);
  15551. 0 === t && (this._arr[0].prefixSum = this._arr[0].height, t++)
  15552. ;
  15553. for (var n = t; n <= e; n++) this._arr[n].prefixSum = this._arr[n - 1].prefixSum + this._arr[n].height;
  15554. return this._prefixSumValidIndex = Math.max(this._prefixSumValidIndex, e), this._arr[e].prefixSum
  15555. }, e.prototype.getLinesTotalHeight = function () {
  15556. return this._checkPendingChanges(), this._lineHeight * this._lineCount + this.getWhitespacesTotalHeight()
  15557. }, e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber = function (e) {
  15558. this._checkPendingChanges(), e |= 0;
  15559. var t = this._findLastWhitespaceBeforeLineNumber(e);
  15560. return -1 === t ? 0 : this.getWhitespacesAccumulatedHeight(t)
  15561. }, e.prototype._findLastWhitespaceBeforeLineNumber = function (e) {
  15562. e |= 0;
  15563. for (var t = this._arr, n = 0, i = t.length - 1; n <= i;) {
  15564. var o = n + ((i - n | 0) / 2 | 0) | 0;
  15565. if (t[o].afterLineNumber < e) {
  15566. if (o + 1 >= t.length || t[o + 1].afterLineNumber >= e) return o;
  15567. n = o + 1 | 0
  15568. } else i = o - 1 | 0
  15569. }
  15570. return -1
  15571. }, e.prototype._findFirstWhitespaceAfterLineNumber = function (e) {
  15572. e |= 0;
  15573. var t = this._findLastWhitespaceBeforeLineNumber(e) + 1;
  15574. return t < this._arr.length ? t : -1
  15575. }, e.prototype.getFirstWhitespaceIndexAfterLineNumber = function (e) {
  15576. return this._checkPendingChanges(), e |= 0, this._findFirstWhitespaceAfterLineNumber(e)
  15577. }, e.prototype.getVerticalOffsetForLineNumber = function (e) {
  15578. return this._checkPendingChanges(), ((e |= 0) > 1 ? this._lineHeight * (e - 1) : 0) + this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)
  15579. }, e.prototype.getWhitespaceMinWidth = function () {
  15580. if (this._checkPendingChanges(), -1 === this._minWidth) {
  15581. for (var e = 0, t = 0, n = this._arr.length; t < n; t++) e = Math.max(e, this._arr[t].minWidth);
  15582. this._minWidth = e
  15583. }
  15584. return this._minWidth
  15585. }, e.prototype.isAfterLines = function (e) {
  15586. return this._checkPendingChanges(), e > this.getLinesTotalHeight()
  15587. }, e.prototype.getLineNumberAtOrAfterVerticalOffset = function (e) {
  15588. if (this._checkPendingChanges(), (e |= 0) < 0) return 1;
  15589. for (var t = 0 | this._lineCount, n = this._lineHeight, i = 1, o = t; i < o;) {
  15590. var r = (i + o) / 2 | 0, s = 0 | this.getVerticalOffsetForLineNumber(r);
  15591. if (e >= s + n) i = r + 1; else {
  15592. if (e >= s) return r;
  15593. o = r
  15594. }
  15595. }
  15596. return i > t ? t : i
  15597. }, e.prototype.getLinesViewportData = function (e, t) {
  15598. this._checkPendingChanges(), e |= 0, t |= 0
  15599. ;var n, i, o = this._lineHeight, r = 0 | this.getLineNumberAtOrAfterVerticalOffset(e),
  15600. s = 0 | this.getVerticalOffsetForLineNumber(r), a = 0 | this._lineCount,
  15601. l = 0 | this.getFirstWhitespaceIndexAfterLineNumber(r), u = 0 | this.getWhitespacesCount();
  15602. -1 === l ? (l = u, i = a + 1, n = 0) : (i = 0 | this.getAfterLineNumberForWhitespaceIndex(l), n = 0 | this.getHeightForWhitespaceIndex(l));
  15603. var d = s, c = d, h = 0;
  15604. s >= 5e5 && (h = 5e5 * Math.floor(s / 5e5), c -= h = Math.floor(h / o) * o);
  15605. for (var p = [], g = e + (t - e) / 2, f = -1, m = r; m <= a; m++) {
  15606. if (-1 === f) {
  15607. (d <= g && g < d + o || d > g) && (f = m)
  15608. }
  15609. for (d += o, p[m - r] = c, c += o; i === m;) c += n, d += n, ++l >= u ? i = a + 1 : (i = 0 | this.getAfterLineNumberForWhitespaceIndex(l), n = 0 | this.getHeightForWhitespaceIndex(l));
  15610. if (d >= t) {
  15611. a = m;
  15612. break
  15613. }
  15614. }
  15615. -1 === f && (f = a);
  15616. var v = 0 | this.getVerticalOffsetForLineNumber(a), _ = r, y = a;
  15617. return _ < y && s < e && _++, _ < y && v + o > t && y--, {
  15618. bigNumbersDelta: h,
  15619. startLineNumber: r,
  15620. endLineNumber: a,
  15621. relativeVerticalOffset: p,
  15622. centeredLineNumber: f,
  15623. completelyVisibleStartLineNumber: _,
  15624. completelyVisibleEndLineNumber: y
  15625. }
  15626. }, e.prototype.getVerticalOffsetForWhitespaceIndex = function (e) {
  15627. this._checkPendingChanges(), e |= 0
  15628. ;var t = this.getAfterLineNumberForWhitespaceIndex(e);
  15629. return (t >= 1 ? this._lineHeight * t : 0) + (e > 0 ? this.getWhitespacesAccumulatedHeight(e - 1) : 0)
  15630. }, e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset = function (e) {
  15631. this._checkPendingChanges(), e |= 0;
  15632. var t = 0, n = this.getWhitespacesCount() - 1;
  15633. if (n < 0) return -1;
  15634. if (e >= this.getVerticalOffsetForWhitespaceIndex(n) + this.getHeightForWhitespaceIndex(n)) return -1;
  15635. for (; t < n;) {
  15636. var i = Math.floor((t + n) / 2), o = this.getVerticalOffsetForWhitespaceIndex(i);
  15637. if (e >= o + this.getHeightForWhitespaceIndex(i)) t = i + 1; else {
  15638. if (e >= o) return i;
  15639. n = i
  15640. }
  15641. }
  15642. return t
  15643. }, e.prototype.getWhitespaceAtVerticalOffset = function (e) {
  15644. this._checkPendingChanges(), e |= 0;
  15645. var t = this.getWhitespaceIndexAtOrAfterVerticallOffset(e);
  15646. if (t < 0) return null;
  15647. if (t >= this.getWhitespacesCount()) return null;
  15648. var n = this.getVerticalOffsetForWhitespaceIndex(t);
  15649. if (n > e) return null;
  15650. var i = this.getHeightForWhitespaceIndex(t);
  15651. return {
  15652. id: this.getIdForWhitespaceIndex(t),
  15653. afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(t),
  15654. verticalOffset: n,
  15655. height: i
  15656. }
  15657. },
  15658. e.prototype.getWhitespaceViewportData = function (e, t) {
  15659. this._checkPendingChanges(), e |= 0, t |= 0;
  15660. var n = this.getWhitespaceIndexAtOrAfterVerticallOffset(e), i = this.getWhitespacesCount() - 1;
  15661. if (n < 0) return [];
  15662. for (var o = [], r = n; r <= i; r++) {
  15663. var s = this.getVerticalOffsetForWhitespaceIndex(r), a = this.getHeightForWhitespaceIndex(r);
  15664. if (s >= t) break;
  15665. o.push({
  15666. id: this.getIdForWhitespaceIndex(r),
  15667. afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(r),
  15668. verticalOffset: s,
  15669. height: a
  15670. })
  15671. }
  15672. return o
  15673. }, e.prototype.getWhitespaces = function () {
  15674. return this._checkPendingChanges(), this._arr.slice(0)
  15675. }, e.prototype.getWhitespacesCount = function () {
  15676. return this._checkPendingChanges(), this._arr.length
  15677. }, e.prototype.getIdForWhitespaceIndex = function (e) {
  15678. return this._checkPendingChanges(), e |= 0, this._arr[e].id
  15679. }, e.prototype.getAfterLineNumberForWhitespaceIndex = function (e) {
  15680. return this._checkPendingChanges(), e |= 0, this._arr[e].afterLineNumber
  15681. }, e.prototype.getHeightForWhitespaceIndex = function (e) {
  15682. return this._checkPendingChanges(), e |= 0, this._arr[e].height
  15683. }, e.INSTANCE_COUNT = 0, e
  15684. }();
  15685. t.LinesLayout = r
  15686. })),define(n[110], i([0, 1, 5, 106, 148]), (function (e, t, n, i, o) {
  15687. "use strict";
  15688. Object.defineProperty(t, "__esModule", {value: !0});
  15689. var r = function (e, t) {
  15690. this.endIndex = e, this.type = t
  15691. }, s = function () {
  15692. function e(e, t) {
  15693. this.startOffset = e, this.endOffset = t
  15694. }
  15695. return e.prototype.equals = function (e) {
  15696. return this.startOffset === e.startOffset && this.endOffset === e.endOffset
  15697. }, e
  15698. }();
  15699. t.LineRange = s;
  15700. var a = function () {
  15701. function e(e, t, n, i, o, r, s, a, l, u, d, c, h, p, g, f, m, v) {
  15702. this.useMonospaceOptimizations = e, this.canUseHalfwidthRightwardsArrow = t, this.lineContent = n, this.continuesWithWrappedLine = i, this.isBasicASCII = o, this.containsRTL = r, this.fauxIndentLength = s, this.lineTokens = a, this.lineDecorations = l, this.tabSize = u, this.startVisibleColumn = d, this.spaceWidth = c, this.middotWidth = h, this.stopRenderingLineAfter = p, this.renderWhitespace = "all" === g ? 3 : "boundary" === g ? 1 : "selection" === g ? 2 : 0, this.renderControlCharacters = f, this.fontLigatures = m, this.selectionsOnLine = v && v.sort((function (e, t) {
  15703. return e.startOffset < t.startOffset ? -1 : 1
  15704. }))
  15705. }
  15706. return e.prototype.sameSelection = function (e) {
  15707. if (null === this.selectionsOnLine) return null === e;
  15708. if (null === e) return !1;
  15709. if (e.length !== this.selectionsOnLine.length) return !1;
  15710. for (var t = 0; t < this.selectionsOnLine.length; t++) if (!this.selectionsOnLine[t].equals(e[t])) return !1;
  15711. return !0
  15712. }, e.prototype.equals = function (e) {
  15713. return this.useMonospaceOptimizations === e.useMonospaceOptimizations && this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && this.lineContent === e.lineContent && this.continuesWithWrappedLine === e.continuesWithWrappedLine && this.isBasicASCII === e.isBasicASCII && this.containsRTL === e.containsRTL && this.fauxIndentLength === e.fauxIndentLength && this.tabSize === e.tabSize && this.startVisibleColumn === e.startVisibleColumn && this.spaceWidth === e.spaceWidth && this.stopRenderingLineAfter === e.stopRenderingLineAfter && this.renderWhitespace === e.renderWhitespace && this.renderControlCharacters === e.renderControlCharacters && this.fontLigatures === e.fontLigatures && o.LineDecoration.equalsArr(this.lineDecorations, e.lineDecorations) && this.lineTokens.equals(e.lineTokens) && this.sameSelection(e.selectionsOnLine)
  15714. }, e
  15715. }();
  15716. t.RenderLineInput = a;
  15717. var l = function () {
  15718. function e(e, t) {
  15719. this.length = e, this._data = new Uint32Array(this.length), this._absoluteOffsets = new Uint32Array(this.length)
  15720. }
  15721. return e.getPartIndex = function (e) {
  15722. return (4294901760 & e) >>> 16
  15723. },
  15724. e.getCharIndex = function (e) {
  15725. return (65535 & e) >>> 0
  15726. }, e.prototype.setPartData = function (e, t, n, i) {
  15727. var o = (t << 16 | n << 0) >>> 0;
  15728. this._data[e] = o, this._absoluteOffsets[e] = i + n
  15729. }, e.prototype.getAbsoluteOffsets = function () {
  15730. return this._absoluteOffsets
  15731. }, e.prototype.charOffsetToPartData = function (e) {
  15732. return 0 === this.length ? 0 : e < 0 ? this._data[0] : e >= this.length ? this._data[this.length - 1] : this._data[e]
  15733. }, e.prototype.partDataToCharOffset = function (t, n, i) {
  15734. if (0 === this.length) return 0;
  15735. for (var o = (t << 16 | i << 0) >>> 0, r = 0, s = this.length - 1; r + 1 < s;) {
  15736. var a = r + s >>> 1, l = this._data[a];
  15737. if (l === o) return a;
  15738. l > o ? s = a : r = a
  15739. }
  15740. if (r === s) return r;
  15741. var u = this._data[r], d = this._data[s];
  15742. if (u === o) return r;
  15743. if (d === o) return s;
  15744. var c = e.getPartIndex(u);
  15745. return i - e.getCharIndex(u) <= (c !== e.getPartIndex(d) ? n : e.getCharIndex(d)) - i ? r : s
  15746. }, e
  15747. }();
  15748. t.CharacterMapping = l;
  15749. var u = function (e, t, n) {
  15750. this.characterMapping = e, this.containsRTL = t, this.containsForeignElements = n
  15751. };
  15752. function d(e, t) {
  15753. if (0 === e.lineContent.length) {
  15754. var i = 0, s = "<span><span> </span></span>";
  15755. if (e.lineDecorations.length > 0) {
  15756. for (var a = [], d = [], c = 0, p = e.lineDecorations.length; c < p; c++) {
  15757. var g = e.lineDecorations[c];
  15758. 1 === g.type && (a.push(e.lineDecorations[c].className), i |= 1), 2 === g.type && (d.push(e.lineDecorations[c].className), i |= 2)
  15759. }
  15760. if (0 !== i) s = "<span>" + (a.length > 0 ? '<span class="' + a.join(" ") + '"></span>' : "") + (d.length > 0 ? '<span class="' + d.join(" ") + '"></span>' : "") + "</span>"
  15761. }
  15762. return t.appendASCIIString(s), new u(new l(0, 0), !1, i)
  15763. }
  15764. return function (e, t) {
  15765. var i = e.fontIsMonospace, o = e.canUseHalfwidthRightwardsArrow, r = e.containsForeignElements,
  15766. s = e.lineContent, a = e.len, d = e.isOverflowing, c = e.parts, h = e.fauxIndentLength,
  15767. p = e.tabSize, g = e.startVisibleColumn, f = e.containsRTL, m = e.spaceWidth, v = e.middotWidth,
  15768. _ = e.renderWhitespace, y = e.renderControlCharacters, C = v > m ? 11825 : 183,
  15769. b = new l(a + 1, c.length), S = 0, w = g, E = 0, L = 0, D = 0;
  15770. t.appendASCIIString("<span>");
  15771. for (var N = 0, x = c.length; N < x; N++) {
  15772. D += L;
  15773. var I = c[N], M = I.endIndex, k = I.type, T = 0 !== _ && k.indexOf("vs-whitespace") >= 0;
  15774. if (E = 0, t.appendASCIIString('<span class="'), t.appendASCIIString(k), t.appendASCII(34), T) {
  15775. for (var R = 0, O = S, P = w; O < M; O++) {
  15776. var A = s.charCodeAt(O);
  15777. R += F = 0 | (9 === A ? p - P % p : 1), O >= h && (P += F)
  15778. }
  15779. if (!i) !("vs-whitespace" === k) && r || (t.appendASCIIString(' style="display:inline-block;width:'), t.appendASCIIString(String(m * R)), t.appendASCIIString('px"'));
  15780. for (t.appendASCII(62); S < M; S++) {
  15781. b.setPartData(S, N, E, D);
  15782. A = s.charCodeAt(S);
  15783. var F = void 0;
  15784. if (9 === A) {
  15785. F = p - w % p | 0, !o || F > 1 ? t.write1(8594) : t.write1(65515);
  15786. for (var W = 2; W <= F; W++) t.write1(160)
  15787. } else F = 1, t.write1(C);
  15788. E += F, S >= h && (w += F)
  15789. }
  15790. L = R
  15791. } else {
  15792. R = 0;
  15793. for (f && t.appendASCIIString(' dir="ltr"'), t.appendASCII(62); S < M; S++) {
  15794. b.setPartData(S, N, E, D);
  15795. A = s.charCodeAt(S);
  15796. var B = 1;
  15797. F = 1;
  15798. switch (A) {
  15799. case 9:
  15800. F = B = p - w % p;
  15801. for (W = 1; W <= B; W++) t.write1(160);
  15802. break;
  15803. case 32:
  15804. t.write1(160);
  15805. break;
  15806. case 60:
  15807. t.appendASCIIString("&lt;");
  15808. break;
  15809. case 62:
  15810. t.appendASCIIString("&gt;");
  15811. break;
  15812. case 38:
  15813. t.appendASCIIString("&amp;");
  15814. break;
  15815. case 0:
  15816. t.appendASCIIString("&#00;");
  15817. break;
  15818. case 65279:
  15819. case 8232:
  15820. t.write1(65533);
  15821. break;
  15822. default:
  15823. n.isFullWidthCharacter(A) && F++, y && A < 32 ? t.write1(9216 + A) : t.write1(A)
  15824. }
  15825. E += B, R += B, S >= h && (w += F)
  15826. }
  15827. L = R
  15828. }
  15829. t.appendASCIIString("</span>")
  15830. }
  15831. b.setPartData(a, c.length - 1, E, D), d && t.appendASCIIString("<span>&hellip;</span>");
  15832. return t.appendASCIIString("</span>"), new u(b, f, r)
  15833. }(function (e) {
  15834. var t, i, s = e.useMonospaceOptimizations, a = e.lineContent;
  15835. -1 !== e.stopRenderingLineAfter && e.stopRenderingLineAfter < a.length ? (t = !0, i = e.stopRenderingLineAfter) : (t = !1, i = a.length);
  15836. var l = function (e, t, n) {
  15837. var i = [], o = 0;
  15838. t > 0 && (i[o++] = new r(t, ""));
  15839. for (var s = 0, a = e.getCount(); s < a; s++) {
  15840. var l = e.getEndOffset(s);
  15841. if (!(l <= t)) {
  15842. var u = e.getClassName(s);
  15843. if (l >= n) {
  15844. i[o++] = new r(n, u);
  15845. break
  15846. }
  15847. i[o++] = new r(l, u)
  15848. }
  15849. }
  15850. return i
  15851. }(e.lineTokens, e.fauxIndentLength, i);
  15852. (3 === e.renderWhitespace || 1 === e.renderWhitespace || 2 === e.renderWhitespace && e.selectionsOnLine) && (l = function (e, t, i, o, s, a, l, u, d, c) {
  15853. var h, p = [], g = 0, f = 0, m = o[f].type, v = o[f].endIndex, _ = o.length,
  15854. y = n.firstNonWhitespaceIndex(e);
  15855. -1 === y ? (y = t, h = t) : h = n.lastNonWhitespaceIndex(e);
  15856. for (var C = !1, b = 0, S = d && d[b], w = l % a, E = s; E < t; E++) {
  15857. var L = e.charCodeAt(E);
  15858. S && E >= S.endOffset && (b++, S = d && d[b]);
  15859. var D = void 0;
  15860. if (E < y || E > h) D = !0; else if (9 === L) D = !0; else if (32 === L) if (c) if (C) D = !0; else {
  15861. var N = E + 1 < t ? e.charCodeAt(E + 1) : 0;
  15862. D = 32 === N || 9 === N
  15863. } else D = !0; else D = !1;
  15864. D && d && (D = !!S && S.startOffset <= E && S.endOffset > E), C ? (!D || !u && w >= a) && (p[g++] = new r(E, "vs-whitespace"), w %= a) : (E === v || D && E > s) && (p[g++] = new r(E, m), w %= a), 9 === L ? w = a : n.isFullWidthCharacter(L) ? w += 2 : w++, C = D, E === v && ++f < _ && (m = o[f].type, v = o[f].endIndex)
  15865. }
  15866. var x = !1;
  15867. if (C) if (i && c) {
  15868. var I = t > 0 ? e.charCodeAt(t - 1) : 0, M = t > 1 ? e.charCodeAt(t - 2) : 0;
  15869. 32 === I && 32 !== M && 9 !== M || (x = !0)
  15870. } else x = !0;
  15871. return p[g++] = new r(t, x ? "vs-whitespace" : m), p
  15872. }(a, i, e.continuesWithWrappedLine, l, e.fauxIndentLength, e.tabSize, e.startVisibleColumn, s, e.selectionsOnLine, 1 === e.renderWhitespace));
  15873. var u = 0;
  15874. if (e.lineDecorations.length > 0) {
  15875. for (var d = 0, c = e.lineDecorations.length; d < c; d++) {
  15876. var p = e.lineDecorations[d];
  15877. 3 === p.type ? u |= 1 : 1 === p.type ? u |= 1 : 2 === p.type && (u |= 2)
  15878. }
  15879. l = function (e, t, n, i) {
  15880. i.sort(o.LineDecoration.compare);
  15881. for (var s = o.LineDecorationsNormalizer.normalize(e, i), a = s.length, l = 0, u = [], d = 0, c = 0, h = 0, p = n.length; h < p; h++) {
  15882. for (var g = n[h], f = g.endIndex, m = g.type; l < a && s[l].startOffset < f;) {
  15883. var v = s[l]
  15884. ;
  15885. if (v.startOffset > c && (c = v.startOffset, u[d++] = new r(c, m)), !(v.endOffset + 1 <= f)) {
  15886. c = f, u[d++] = new r(c, m + " " + v.className);
  15887. break
  15888. }
  15889. c = v.endOffset + 1, u[d++] = new r(c, m + " " + v.className), l++
  15890. }
  15891. f > c && (c = f, u[d++] = new r(c, m))
  15892. }
  15893. var _ = n[n.length - 1].endIndex;
  15894. if (l < a && s[l].startOffset === _) {
  15895. for (var y = []; l < a && s[l].startOffset === _;) y.push(s[l].className), l++;
  15896. u[d++] = new r(c, y.join(" "))
  15897. }
  15898. return u
  15899. }(a, 0, l, e.lineDecorations)
  15900. }
  15901. e.containsRTL || (l = function (e, t, n) {
  15902. var i = 0, o = [], s = 0;
  15903. if (n) for (var a = 0, l = t.length; a < l; a++) {
  15904. var u = (g = t[a]).endIndex;
  15905. if (i + 50 < u) {
  15906. for (var d = g.type, c = -1, h = i, p = i; p < u; p++) 32 === e.charCodeAt(p) && (c = p), -1 !== c && p - h >= 50 && (o[s++] = new r(c + 1, d), h = c + 1, c = -1);
  15907. h !== u && (o[s++] = new r(u, d))
  15908. } else o[s++] = g;
  15909. i = u
  15910. } else for (a = 0, l = t.length; a < l; a++) {
  15911. var g = t[a], f = (u = g.endIndex) - i;
  15912. if (f > 50) {
  15913. d = g.type;
  15914. var m = Math.ceil(f / 50);
  15915. for (p = 1; p < m; p++) {
  15916. var v = i + 50 * p;
  15917. o[s++] = new r(v, d)
  15918. }
  15919. o[s++] = new r(u, d)
  15920. } else o[s++] = g;
  15921. i = u
  15922. }
  15923. return o
  15924. }(a, l, !e.isBasicASCII || e.fontLigatures))
  15925. ;
  15926. return new h(s, e.canUseHalfwidthRightwardsArrow, a, i, t, l, u, e.fauxIndentLength, e.tabSize, e.startVisibleColumn, e.containsRTL, e.spaceWidth, e.middotWidth, e.renderWhitespace, e.renderControlCharacters)
  15927. }(e), t)
  15928. }
  15929. t.RenderLineOutput = u, t.renderViewLine = d;
  15930. var c = function (e, t, n, i) {
  15931. this.characterMapping = e, this.html = t, this.containsRTL = n, this.containsForeignElements = i
  15932. };
  15933. t.RenderLineOutput2 = c, t.renderViewLine2 = function (e) {
  15934. var t = i.createStringBuilder(1e4), n = d(e, t);
  15935. return new c(n.characterMapping, t.build(), n.containsRTL, n.containsForeignElements)
  15936. };
  15937. var h = function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g) {
  15938. this.fontIsMonospace = e, this.canUseHalfwidthRightwardsArrow = t, this.lineContent = n, this.len = i, this.isOverflowing = o, this.parts = r, this.containsForeignElements = s, this.fauxIndentLength = a, this.tabSize = l, this.startVisibleColumn = u, this.containsRTL = d, this.spaceWidth = c, this.middotWidth = h, this.renderWhitespace = p, this.renderControlCharacters = g
  15939. }
  15940. })),define(n[363], i([0, 1, 3]), (function (e, t, n) {
  15941. "use strict";
  15942. Object.defineProperty(t, "__esModule", {value: !0})
  15943. ;var i = function () {
  15944. function e(e, t, i, o) {
  15945. this.selections = e, this.startLineNumber = 0 | t.startLineNumber, this.endLineNumber = 0 | t.endLineNumber, this.relativeVerticalOffset = t.relativeVerticalOffset, this.bigNumbersDelta = 0 | t.bigNumbersDelta, this.whitespaceViewportData = i, this._model = o, this.visibleRange = new n.Range(t.startLineNumber, this._model.getLineMinColumn(t.startLineNumber), t.endLineNumber, this._model.getLineMaxColumn(t.endLineNumber))
  15946. }
  15947. return e.prototype.getViewLineRenderingData = function (e) {
  15948. return this._model.getViewLineRenderingData(this.visibleRange, e)
  15949. }, e.prototype.getDecorationsInViewport = function () {
  15950. return this._model.getDecorationsInViewport(this.visibleRange)
  15951. }, e
  15952. }();
  15953. t.ViewportData = i
  15954. })),define(n[194], i([0, 1, 179]), (function (e, t, n) {
  15955. "use strict";
  15956. Object.defineProperty(t, "__esModule", {value: !0});
  15957. var i = function (e, t) {
  15958. this.index = e, this.remainder = t
  15959. };
  15960. t.PrefixSumIndexOfResult = i;
  15961. var o = function () {
  15962. function e(e) {
  15963. this.values = e, this.prefixSum = new Uint32Array(e.length), this.prefixSumValidIndex = new Int32Array(1),
  15964. this.prefixSumValidIndex[0] = -1
  15965. }
  15966. return e.prototype.insertValues = function (e, t) {
  15967. e = n.toUint32(e);
  15968. var i = this.values, o = this.prefixSum, r = t.length;
  15969. return 0 !== r && (this.values = new Uint32Array(i.length + r), this.values.set(i.subarray(0, e), 0), this.values.set(i.subarray(e), e + r), this.values.set(t, e), e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - 1), this.prefixSum = new Uint32Array(this.values.length), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(o.subarray(0, this.prefixSumValidIndex[0] + 1)), !0)
  15970. }, e.prototype.changeValue = function (e, t) {
  15971. return e = n.toUint32(e), t = n.toUint32(t), this.values[e] !== t && (this.values[e] = t, e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - 1), !0)
  15972. }, e.prototype.removeValues = function (e, t) {
  15973. e = n.toUint32(e), t = n.toUint32(t);
  15974. var i = this.values, o = this.prefixSum;
  15975. if (e >= i.length) return !1;
  15976. var r = i.length - e;
  15977. return t >= r && (t = r), 0 !== t && (this.values = new Uint32Array(i.length - t), this.values.set(i.subarray(0, e), 0), this.values.set(i.subarray(e + t), e),
  15978. this.prefixSum = new Uint32Array(this.values.length), e - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = e - 1), this.prefixSumValidIndex[0] >= 0 && this.prefixSum.set(o.subarray(0, this.prefixSumValidIndex[0] + 1)), !0)
  15979. }, e.prototype.getTotalValue = function () {
  15980. return 0 === this.values.length ? 0 : this._getAccumulatedValue(this.values.length - 1)
  15981. }, e.prototype.getAccumulatedValue = function (e) {
  15982. return e < 0 ? 0 : (e = n.toUint32(e), this._getAccumulatedValue(e))
  15983. }, e.prototype._getAccumulatedValue = function (e) {
  15984. if (e <= this.prefixSumValidIndex[0]) return this.prefixSum[e];
  15985. var t = this.prefixSumValidIndex[0] + 1;
  15986. 0 === t && (this.prefixSum[0] = this.values[0], t++), e >= this.values.length && (e = this.values.length - 1);
  15987. for (var n = t; n <= e; n++) this.prefixSum[n] = this.prefixSum[n - 1] + this.values[n];
  15988. return this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], e), this.prefixSum[e]
  15989. }, e.prototype.getIndexOf = function (e) {
  15990. e = Math.floor(e), this.getTotalValue();
  15991. for (var t = 0, n = this.values.length - 1, o = 0, r = 0, s = 0; t <= n;) if (o = t + (n - t) / 2 | 0,
  15992. e < (s = (r = this.prefixSum[o]) - this.values[o])) n = o - 1; else {
  15993. if (!(e >= r)) break;
  15994. t = o + 1
  15995. }
  15996. return new i(o, e - s)
  15997. }, e
  15998. }();
  15999. t.PrefixSumComputer = o
  16000. })),define(n[364], i([0, 1, 13, 194]), (function (e, t, n, i) {
  16001. "use strict";
  16002. Object.defineProperty(t, "__esModule", {value: !0});
  16003. var o = function () {
  16004. function e(e, t, n, i) {
  16005. this._uri = e, this._lines = t, this._eol = n, this._versionId = i, this._lineStarts = null
  16006. }
  16007. return e.prototype.dispose = function () {
  16008. this._lines.length = 0
  16009. }, e.prototype.getText = function () {
  16010. return this._lines.join(this._eol)
  16011. }, e.prototype.onEvents = function (e) {
  16012. e.eol && e.eol !== this._eol && (this._eol = e.eol, this._lineStarts = null);
  16013. for (var t = 0, i = e.changes; t < i.length; t++) {
  16014. var o = i[t];
  16015. this._acceptDeleteRange(o.range), this._acceptInsertText(new n.Position(o.range.startLineNumber, o.range.startColumn), o.text)
  16016. }
  16017. this._versionId = e.versionId
  16018. }, e.prototype._ensureLineStarts = function () {
  16019. if (!this._lineStarts) {
  16020. for (var e = this._eol.length, t = this._lines.length, n = new Uint32Array(t), o = 0; o < t; o++) n[o] = this._lines[o].length + e;
  16021. this._lineStarts = new i.PrefixSumComputer(n)
  16022. }
  16023. },
  16024. e.prototype._setLineText = function (e, t) {
  16025. this._lines[e] = t, this._lineStarts && this._lineStarts.changeValue(e, this._lines[e].length + this._eol.length)
  16026. }, e.prototype._acceptDeleteRange = function (e) {
  16027. if (e.startLineNumber !== e.endLineNumber) this._setLineText(e.startLineNumber - 1, this._lines[e.startLineNumber - 1].substring(0, e.startColumn - 1) + this._lines[e.endLineNumber - 1].substring(e.endColumn - 1)), this._lines.splice(e.startLineNumber, e.endLineNumber - e.startLineNumber), this._lineStarts && this._lineStarts.removeValues(e.startLineNumber, e.endLineNumber - e.startLineNumber); else {
  16028. if (e.startColumn === e.endColumn) return;
  16029. this._setLineText(e.startLineNumber - 1, this._lines[e.startLineNumber - 1].substring(0, e.startColumn - 1) + this._lines[e.startLineNumber - 1].substring(e.endColumn - 1))
  16030. }
  16031. }, e.prototype._acceptInsertText = function (e, t) {
  16032. if (0 !== t.length) {
  16033. var n = t.split(/\r\n|\r|\n/);
  16034. if (1 !== n.length) {
  16035. n[n.length - 1] += this._lines[e.lineNumber - 1].substring(e.column - 1), this._setLineText(e.lineNumber - 1, this._lines[e.lineNumber - 1].substring(0, e.column - 1) + n[0])
  16036. ;
  16037. for (var i = new Uint32Array(n.length - 1), o = 1; o < n.length; o++) this._lines.splice(e.lineNumber + o - 1, 0, n[o]), i[o - 1] = n[o].length + this._eol.length;
  16038. this._lineStarts && this._lineStarts.insertValues(e.lineNumber, i)
  16039. } else this._setLineText(e.lineNumber - 1, this._lines[e.lineNumber - 1].substring(0, e.column - 1) + n[0] + this._lines[e.lineNumber - 1].substring(e.column - 1))
  16040. }
  16041. }, e
  16042. }();
  16043. t.MirrorTextModel = o
  16044. })),define(n[365], i([0, 1, 19, 126, 54, 16, 25, 13, 3, 341, 364, 109, 351, 354, 192, 21]), (function (e, t, n, i, o, s, a, l, u, h, p, g, f, m, v, _) {
  16045. "use strict";
  16046. Object.defineProperty(t, "__esModule", {value: !0});
  16047. var y = function (e) {
  16048. function t() {
  16049. return null !== e && e.apply(this, arguments) || this
  16050. }
  16051. return r(t, e), Object.defineProperty(t.prototype, "uri", {
  16052. get: function () {
  16053. return this._uri
  16054. }, enumerable: !0, configurable: !0
  16055. }), Object.defineProperty(t.prototype, "version", {
  16056. get: function () {
  16057. return this._versionId
  16058. }, enumerable: !0, configurable: !0
  16059. }), Object.defineProperty(t.prototype, "eol", {
  16060. get: function () {
  16061. return this._eol
  16062. }, enumerable: !0, configurable: !0
  16063. }), t.prototype.getValue = function () {
  16064. return this.getText()
  16065. }, t.prototype.getLinesContent = function () {
  16066. return this._lines.slice(0)
  16067. }, t.prototype.getLineCount = function () {
  16068. return this._lines.length
  16069. }, t.prototype.getLineContent = function (e) {
  16070. return this._lines[e - 1]
  16071. }, t.prototype.getWordAtPosition = function (e, t) {
  16072. var n = g.getWordAtText(e.column, g.ensureValidWordDefinition(t), this._lines[e.lineNumber - 1], 0);
  16073. return n ? new u.Range(e.lineNumber, n.startColumn, e.lineNumber, n.endColumn) : null
  16074. }, t.prototype.createWordIterator = function (e) {
  16075. var t, n, i = this, r = 0, s = 0, a = [], l = function () {
  16076. if (s < a.length) {
  16077. var u = n.substring(a[s].start, a[s].end);
  16078. return s += 1, t ? t.value = u : t = {done: !1, value: u}, t
  16079. }
  16080. return r >= i._lines.length ? o.FIN : (n = i._lines[r], a = i._wordenize(n, e), s = 0, r += 1, l())
  16081. };
  16082. return {next: l}
  16083. }, t.prototype.getLineWords = function (e, t) {
  16084. for (var n = this._lines[e - 1], i = [], o = 0, r = this._wordenize(n, t); o < r.length; o++) {
  16085. var s = r[o];
  16086. i.push({word: n.substring(s.start, s.end), startColumn: s.start + 1, endColumn: s.end + 1})
  16087. }
  16088. return i
  16089. }, t.prototype._wordenize = function (e, t) {
  16090. var n, i = []
  16091. ;
  16092. for (t.lastIndex = 0; (n = t.exec(e)) && 0 !== n[0].length;) i.push({
  16093. start: n.index,
  16094. end: n.index + n[0].length
  16095. });
  16096. return i
  16097. }, t.prototype.getValueInRange = function (e) {
  16098. if ((e = this._validateRange(e)).startLineNumber === e.endLineNumber) return this._lines[e.startLineNumber - 1].substring(e.startColumn - 1, e.endColumn - 1);
  16099. var t = this._eol, n = e.startLineNumber - 1, i = e.endLineNumber - 1, o = [];
  16100. o.push(this._lines[n].substring(e.startColumn - 1));
  16101. for (var r = n + 1; r < i; r++) o.push(this._lines[r]);
  16102. return o.push(this._lines[i].substring(0, e.endColumn - 1)), o.join(t)
  16103. }, t.prototype.offsetAt = function (e) {
  16104. return e = this._validatePosition(e), this._ensureLineStarts(), this._lineStarts.getAccumulatedValue(e.lineNumber - 2) + (e.column - 1)
  16105. }, t.prototype.positionAt = function (e) {
  16106. e = Math.floor(e), e = Math.max(0, e), this._ensureLineStarts();
  16107. var t = this._lineStarts.getIndexOf(e), n = this._lines[t.index].length;
  16108. return {lineNumber: 1 + t.index, column: 1 + Math.min(t.remainder, n)}
  16109. }, t.prototype._validateRange = function (e) {
  16110. var t = this._validatePosition({
  16111. lineNumber: e.startLineNumber, column: e.startColumn
  16112. }), n = this._validatePosition({lineNumber: e.endLineNumber, column: e.endColumn});
  16113. return t.lineNumber !== e.startLineNumber || t.column !== e.startColumn || n.lineNumber !== e.endLineNumber || n.column !== e.endColumn ? {
  16114. startLineNumber: t.lineNumber,
  16115. startColumn: t.column,
  16116. endLineNumber: n.lineNumber,
  16117. endColumn: n.column
  16118. } : e
  16119. }, t.prototype._validatePosition = function (e) {
  16120. if (!l.Position.isIPosition(e)) throw new Error("bad position");
  16121. var t = e.lineNumber, n = e.column, i = !1;
  16122. if (t < 1) t = 1, n = 1, i = !0; else if (t > this._lines.length) t = this._lines.length, n = this._lines[t - 1].length + 1, i = !0; else {
  16123. var o = this._lines[t - 1].length + 1;
  16124. n < 1 ? (n = 1, i = !0) : n > o && (n = o, i = !0)
  16125. }
  16126. return i ? {lineNumber: t, column: n} : e
  16127. }, t
  16128. }(p.MirrorTextModel), C = function () {
  16129. function t(e, t) {
  16130. this._host = e, this._models = Object.create(null), this._foreignModuleFactory = t, this._foreignModule = null
  16131. }
  16132. return t.prototype.dispose = function () {
  16133. this._models = Object.create(null)
  16134. }, t.prototype._getModel = function (e) {
  16135. return this._models[e]
  16136. }, t.prototype._getModels = function () {
  16137. var e = this, t = []
  16138. ;
  16139. return Object.keys(this._models).forEach((function (n) {
  16140. return t.push(e._models[n])
  16141. })), t
  16142. }, t.prototype.acceptNewModel = function (e) {
  16143. this._models[e.url] = new y(a.URI.parse(e.url), e.lines, e.EOL, e.versionId)
  16144. }, t.prototype.acceptModelChanged = function (e, t) {
  16145. this._models[e] && this._models[e].onEvents(t)
  16146. }, t.prototype.acceptRemovedModel = function (e) {
  16147. this._models[e] && delete this._models[e]
  16148. }, t.prototype.computeDiff = function (e, t, n, i) {
  16149. return d(this, void 0, void 0, (function () {
  16150. var o, r, s, a, l, u, d;
  16151. return c(this, (function (c) {
  16152. return o = this._getModel(e), r = this._getModel(t), o && r ? (s = o.getLinesContent(), a = r.getLinesContent(), l = new h.DiffComputer(s, a, {
  16153. shouldComputeCharChanges: !0,
  16154. shouldPostProcessCharChanges: !0,
  16155. shouldIgnoreTrimWhitespace: n,
  16156. shouldMakePrettyDiff: !0,
  16157. maxComputationTime: i
  16158. }), u = l.computeDiff(), d = !(u.changes.length > 0) && this._modelsAreIdentical(o, r), [2, {
  16159. quitEarly: u.quitEarly,
  16160. identical: d,
  16161. changes: u.changes
  16162. }]) : [2, null]
  16163. }))
  16164. }))
  16165. }, t.prototype._modelsAreIdentical = function (e, t) {
  16166. var n = e.getLineCount();
  16167. if (n !== t.getLineCount()) return !1
  16168. ;
  16169. for (var i = 1; i <= n; i++) {
  16170. if (e.getLineContent(i) !== t.getLineContent(i)) return !1
  16171. }
  16172. return !0
  16173. }, t.prototype.computeMoreMinimalEdits = function (e, o) {
  16174. return d(this, void 0, void 0, (function () {
  16175. var r, s, a, l, d, h, p, g, f, m, v, _, y, C, b, S, w, E;
  16176. return c(this, (function (c) {
  16177. if (!(r = this._getModel(e))) return [2, o];
  16178. for (s = [], a = void 0, o = n.mergeSort(o, (function (e, t) {
  16179. return e.range && t.range ? u.Range.compareRangesUsingStarts(e.range, t.range) : (e.range ? 0 : 1) - (t.range ? 0 : 1)
  16180. })), l = 0, d = o; l < d.length; l++) if (h = d[l], p = h.range, g = h.text, "number" == typeof (f = h.eol) && (a = f), (!u.Range.isEmpty(p) || g) && (m = r.getValueInRange(p), g = g.replace(/\r\n|\n|\r/g, r.eol), m !== g)) if (Math.max(g.length, m.length) > t._diffLimit) s.push({
  16181. range: p,
  16182. text: g
  16183. }); else for (v = i.stringDiff(m, g, !1), _ = r.offsetAt(u.Range.lift(p).getStartPosition()), y = 0, C = v; y < C.length; y++) b = C[y], S = r.positionAt(_ + b.originalStart), w = r.positionAt(_ + b.originalStart + b.originalLength), E = {
  16184. text: g.substr(b.modifiedStart, b.modifiedLength), range: {
  16185. startLineNumber: S.lineNumber, startColumn: S.column, endLineNumber: w.lineNumber,
  16186. endColumn: w.column
  16187. }
  16188. }, r.getValueInRange(E.range) !== E.text && s.push(E);
  16189. return "number" == typeof a && s.push({
  16190. eol: a,
  16191. text: "",
  16192. range: {startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0}
  16193. }), [2, s]
  16194. }))
  16195. }))
  16196. }, t.prototype.computeLinks = function (e) {
  16197. return d(this, void 0, void 0, (function () {
  16198. var t;
  16199. return c(this, (function (n) {
  16200. return (t = this._getModel(e)) ? [2, f.computeLinks(t)] : [2, null]
  16201. }))
  16202. }))
  16203. }, t.prototype.textualSuggest = function (e, n, i, o) {
  16204. return d(this, void 0, void 0, (function () {
  16205. var r, s, a, l, u, d, h, p;
  16206. return c(this, (function (c) {
  16207. if (!(r = this._getModel(e))) return [2, null];
  16208. for (s = [], a = new Set, l = new RegExp(i, o), (u = r.getWordAtPosition(n, l)) && a.add(r.getValueInRange(u)), d = r.createWordIterator(l), h = d.next(); !h.done && a.size <= t._suggestionsLimit; h = d.next()) p = h.value, a.has(p) || (a.add(p), isNaN(Number(p)) && s.push(p));
  16209. return [2, s]
  16210. }))
  16211. }))
  16212. }, t.prototype.computeWordRanges = function (e, t, n, i) {
  16213. return d(this, void 0, void 0, (function () {
  16214. var o, r, s, a, l, u, d, h, p;
  16215. return c(this, (function (c) {
  16216. if (!(o = this._getModel(e))) return [2, Object.create(null)];
  16217. for (r = new RegExp(n, i),
  16218. s = Object.create(null), a = t.startLineNumber; a < t.endLineNumber; a++) for (l = o.getLineWords(a, r), u = 0, d = l; u < d.length; u++) h = d[u], isNaN(Number(h.word)) && ((p = s[h.word]) || (p = [], s[h.word] = p), p.push({
  16219. startLineNumber: a,
  16220. startColumn: h.startColumn,
  16221. endLineNumber: a,
  16222. endColumn: h.endColumn
  16223. }));
  16224. return [2, s]
  16225. }))
  16226. }))
  16227. }, t.prototype.navigateValueSet = function (e, t, n, i, o) {
  16228. return d(this, void 0, void 0, (function () {
  16229. var r, s, a, l, u;
  16230. return c(this, (function (d) {
  16231. return (r = this._getModel(e)) ? (s = new RegExp(i, o), t.startColumn === t.endColumn && (t = {
  16232. startLineNumber: t.startLineNumber,
  16233. startColumn: t.startColumn,
  16234. endLineNumber: t.endLineNumber,
  16235. endColumn: t.endColumn + 1
  16236. }), a = r.getValueInRange(t), (l = r.getWordAtPosition({
  16237. lineNumber: t.startLineNumber,
  16238. column: t.startColumn
  16239. }, s)) ? (u = r.getValueInRange(l), [2, m.BasicInplaceReplace.INSTANCE.navigateValueSet(t, a, l, u, n)]) : [2, null]) : [2, null]
  16240. }))
  16241. }))
  16242. }, t.prototype.loadForeignModule = function (t, n, i) {
  16243. var o = this, r = {
  16244. host: _.createProxyObject(i, (function (e, t) {
  16245. return o._host.fhr(e, t)
  16246. })), getMirrorModels: function () {
  16247. return o._getModels()
  16248. }
  16249. }
  16250. ;
  16251. return this._foreignModuleFactory ? (this._foreignModule = this._foreignModuleFactory(r, n), Promise.resolve(_.getAllMethodNames(this._foreignModule))) : new Promise((function (i, s) {
  16252. e([t], (function (e) {
  16253. o._foreignModule = e.create(r, n), i(_.getAllMethodNames(o._foreignModule))
  16254. }), s)
  16255. }))
  16256. }, t.prototype.fmr = function (e, t) {
  16257. if (!this._foreignModule || "function" != typeof this._foreignModule[e]) return Promise.reject(new Error("Missing requestHandler or method: " + e));
  16258. try {
  16259. return Promise.resolve(this._foreignModule[e].apply(this._foreignModule, t))
  16260. } catch (e) {
  16261. return Promise.reject(e)
  16262. }
  16263. }, t._diffLimit = 1e5, t._suggestionsLimit = 1e4, t
  16264. }();
  16265. t.EditorSimpleWorker = C, t.create = function (e) {
  16266. return new C(e, null)
  16267. }, "function" == typeof importScripts && (s.globals.monaco = v.createMonacoBaseAPI())
  16268. })),define(n[92], i([0, 1, 2]), (function (e, t, n) {
  16269. "use strict";
  16270. Object.defineProperty(t, "__esModule", {value: !0});
  16271. var i = function (e) {
  16272. function t() {
  16273. var t = e.call(this) || this;
  16274. return t._shouldRender = !0, t
  16275. }
  16276. return r(t, e), t.prototype.shouldRender = function () {
  16277. return this._shouldRender
  16278. },
  16279. t.prototype.forceShouldRender = function () {
  16280. this._shouldRender = !0
  16281. }, t.prototype.setShouldRender = function () {
  16282. this._shouldRender = !0
  16283. }, t.prototype.onDidRender = function () {
  16284. this._shouldRender = !1
  16285. }, t.prototype.onConfigurationChanged = function (e) {
  16286. return !1
  16287. }, t.prototype.onContentSizeChanged = function (e) {
  16288. return !1
  16289. }, t.prototype.onCursorStateChanged = function (e) {
  16290. return !1
  16291. }, t.prototype.onDecorationsChanged = function (e) {
  16292. return !1
  16293. }, t.prototype.onFlushed = function (e) {
  16294. return !1
  16295. }, t.prototype.onFocusChanged = function (e) {
  16296. return !1
  16297. }, t.prototype.onLanguageConfigurationChanged = function (e) {
  16298. return !1
  16299. }, t.prototype.onLineMappingChanged = function (e) {
  16300. return !1
  16301. }, t.prototype.onLinesChanged = function (e) {
  16302. return !1
  16303. }, t.prototype.onLinesDeleted = function (e) {
  16304. return !1
  16305. }, t.prototype.onLinesInserted = function (e) {
  16306. return !1
  16307. }, t.prototype.onRevealRangeRequest = function (e) {
  16308. return !1
  16309. }, t.prototype.onScrollChanged = function (e) {
  16310. return !1
  16311. }, t.prototype.onThemeChanged = function (e) {
  16312. return !1
  16313. }, t.prototype.onTokensChanged = function (e) {
  16314. return !1
  16315. }, t.prototype.onTokensColorsChanged = function (e) {
  16316. return !1
  16317. }, t.prototype.onZonesChanged = function (e) {
  16318. return !1
  16319. }, t.prototype.handleEvents = function (e) {
  16320. for (var t = !1, n = 0, i = e.length; n < i; n++) {
  16321. var o = e[n];
  16322. switch (o.type) {
  16323. case 1:
  16324. this.onConfigurationChanged(o) && (t = !0);
  16325. break;
  16326. case 2:
  16327. this.onContentSizeChanged(o) && (t = !0);
  16328. break;
  16329. case 3:
  16330. this.onCursorStateChanged(o) && (t = !0);
  16331. break;
  16332. case 4:
  16333. this.onDecorationsChanged(o) && (t = !0);
  16334. break;
  16335. case 5:
  16336. this.onFlushed(o) && (t = !0);
  16337. break;
  16338. case 6:
  16339. this.onFocusChanged(o) && (t = !0);
  16340. break;
  16341. case 7:
  16342. this.onLanguageConfigurationChanged(o) && (t = !0);
  16343. break;
  16344. case 8:
  16345. this.onLineMappingChanged(o) && (t = !0);
  16346. break;
  16347. case 9:
  16348. this.onLinesChanged(o) && (t = !0);
  16349. break;
  16350. case 10:
  16351. this.onLinesDeleted(o) && (t = !0);
  16352. break;
  16353. case 11:
  16354. this.onLinesInserted(o) && (t = !0);
  16355. break;
  16356. case 12:
  16357. this.onRevealRangeRequest(o) && (t = !0);
  16358. break;
  16359. case 13:
  16360. this.onScrollChanged(o) && (t = !0);
  16361. break;
  16362. case 15:
  16363. this.onTokensChanged(o) && (t = !0);
  16364. break;
  16365. case 14:
  16366. this.onThemeChanged(o) && (t = !0);
  16367. break;
  16368. case 16:
  16369. this.onTokensColorsChanged(o) && (t = !0);
  16370. break;
  16371. case 17:
  16372. this.onZonesChanged(o) && (t = !0);
  16373. break;
  16374. default:
  16375. console.info("View received unknown event: "), console.info(o)
  16376. }
  16377. }
  16378. t && (this._shouldRender = !0)
  16379. }, t
  16380. }(n.Disposable);
  16381. t.ViewEventHandler = i
  16382. })),define(n[82], i([0, 1, 92]), (function (e, t, n) {
  16383. "use strict";
  16384. Object.defineProperty(t, "__esModule", {value: !0});
  16385. var i = function (e) {
  16386. function t() {
  16387. return null !== e && e.apply(this, arguments) || this
  16388. }
  16389. return r(t, e), t
  16390. }(n.ViewEventHandler);
  16391. t.DynamicViewOverlay = i
  16392. })),define(n[37], i([0, 1, 28, 92]), (function (e, t, n, i) {
  16393. "use strict";
  16394. Object.defineProperty(t, "__esModule", {value: !0});
  16395. var o = function (e) {
  16396. function t(t) {
  16397. var n = e.call(this) || this;
  16398. return n._context = t, n._context.addEventHandler(n), n
  16399. }
  16400. return r(t, e), t.prototype.dispose = function () {
  16401. this._context.removeEventHandler(this), e.prototype.dispose.call(this)
  16402. }, t
  16403. }(i.ViewEventHandler);
  16404. t.ViewPart = o;
  16405. var s = function () {
  16406. function e() {
  16407. }
  16408. return e.write = function (e, t) {
  16409. n.FastDomNode, e.setAttribute("data-mprt", String(t))
  16410. }, e.read = function (e) {
  16411. var t = e.getAttribute("data-mprt");
  16412. return null === t ? 0 : parseInt(t, 10)
  16413. }, e.collect = function (e, t) {
  16414. for (var n = [], i = 0; e && e !== document.body && e !== t;) e.nodeType === e.ELEMENT_NODE && (n[i++] = this.read(e)), e = e.parentElement;
  16415. for (var o = new Uint8Array(i), r = 0; r < i; r++) o[r] = n[i - r - 1];
  16416. return o
  16417. }, e
  16418. }();
  16419. t.PartFingerprints = s
  16420. })),define(n[366], i([0, 1, 6, 28, 37]), (function (e, t, n, i, o) {
  16421. "use strict";
  16422. Object.defineProperty(t, "__esModule", {value: !0});
  16423. var s = function (e, t) {
  16424. this.top = e, this.left = t
  16425. }, a = function (e) {
  16426. function t(t, n) {
  16427. var r = e.call(this, t) || this;
  16428. return r._viewDomNode = n, r._widgets = {}, r.domNode = i.createFastDomNode(document.createElement("div")), o.PartFingerprints.write(r.domNode, 1), r.domNode.setClassName("contentWidgets"), r.domNode.setPosition("absolute"), r.domNode.setTop(0), r.overflowingContentWidgetsDomNode = i.createFastDomNode(document.createElement("div")), o.PartFingerprints.write(r.overflowingContentWidgetsDomNode, 2), r.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"), r
  16429. }
  16430. return r(t, e), t.prototype.dispose = function () {
  16431. e.prototype.dispose.call(this), this._widgets = {}
  16432. }, t.prototype.onConfigurationChanged = function (e) {
  16433. for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
  16434. var i = n[t];
  16435. this._widgets[i].onConfigurationChanged(e)
  16436. }
  16437. return !0
  16438. }, t.prototype.onDecorationsChanged = function (e) {
  16439. return !0
  16440. }, t.prototype.onFlushed = function (e) {
  16441. return !0
  16442. }, t.prototype.onLineMappingChanged = function (e) {
  16443. for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
  16444. var i = n[t];
  16445. this._widgets[i].onLineMappingChanged(e)
  16446. }
  16447. return !0
  16448. }, t.prototype.onLinesChanged = function (e) {
  16449. return !0
  16450. }, t.prototype.onLinesDeleted = function (e) {
  16451. return !0
  16452. }, t.prototype.onLinesInserted = function (e) {
  16453. return !0
  16454. }, t.prototype.onScrollChanged = function (e) {
  16455. return !0
  16456. }, t.prototype.onZonesChanged = function (e) {
  16457. return !0
  16458. }, t.prototype.addWidget = function (e) {
  16459. var t = new l(this._context, this._viewDomNode, e);
  16460. this._widgets[t.id] = t, t.allowEditorOverflow ? this.overflowingContentWidgetsDomNode.appendChild(t.domNode) : this.domNode.appendChild(t.domNode), this.setShouldRender()
  16461. }, t.prototype.setWidgetPosition = function (e, t, n) {
  16462. this._widgets[e.getId()].setPosition(t, n), this.setShouldRender()
  16463. },
  16464. t.prototype.removeWidget = function (e) {
  16465. var t = e.getId();
  16466. if (this._widgets.hasOwnProperty(t)) {
  16467. var n = this._widgets[t];
  16468. delete this._widgets[t];
  16469. var i = n.domNode.domNode;
  16470. i.parentNode.removeChild(i), i.removeAttribute("monaco-visible-content-widget"), this.setShouldRender()
  16471. }
  16472. }, t.prototype.shouldSuppressMouseDownOnWidget = function (e) {
  16473. return !!this._widgets.hasOwnProperty(e) && this._widgets[e].suppressMouseDown
  16474. }, t.prototype.onBeforeRender = function (e) {
  16475. for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
  16476. var i = n[t];
  16477. this._widgets[i].onBeforeRender(e)
  16478. }
  16479. }, t.prototype.prepareRender = function (e) {
  16480. for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
  16481. var i = n[t];
  16482. this._widgets[i].prepareRender(e)
  16483. }
  16484. }, t.prototype.render = function (e) {
  16485. for (var t = 0, n = Object.keys(this._widgets); t < n.length; t++) {
  16486. var i = n[t];
  16487. this._widgets[i].render(e)
  16488. }
  16489. }, t
  16490. }(o.ViewPart);
  16491. t.ViewContentWidgets = a;
  16492. var l = function () {
  16493. function e(e, t, n) {
  16494. this._context = e, this._viewDomNode = t, this._actual = n, this.domNode = i.createFastDomNode(this._actual.getDomNode()), this.id = this._actual.getId(),
  16495. this.allowEditorOverflow = this._actual.allowEditorOverflow || !1, this.suppressMouseDown = this._actual.suppressMouseDown || !1;
  16496. var o = this._context.configuration.options, r = o.get(107);
  16497. this._fixedOverflowWidgets = o.get(29), this._contentWidth = r.contentWidth, this._contentLeft = r.contentLeft, this._lineHeight = o.get(49), this._range = null, this._viewRange = null, this._preference = [], this._cachedDomNodeClientWidth = -1, this._cachedDomNodeClientHeight = -1, this._maxWidth = this._getMaxWidth(), this._isVisible = !1, this._renderData = null, this.domNode.setPosition(this._fixedOverflowWidgets && this.allowEditorOverflow ? "fixed" : "absolute"), this.domNode.setVisibility("hidden"), this.domNode.setAttribute("widgetId", this.id), this.domNode.setMaxWidth(this._maxWidth)
  16498. }
  16499. return e.prototype.onConfigurationChanged = function (e) {
  16500. var t = this._context.configuration.options;
  16501. if (this._lineHeight = t.get(49), e.hasChanged(107)) {
  16502. var n = t.get(107);
  16503. this._contentLeft = n.contentLeft, this._contentWidth = n.contentWidth, this._maxWidth = this._getMaxWidth()
  16504. }
  16505. },
  16506. e.prototype.onLineMappingChanged = function (e) {
  16507. this._setPosition(this._range)
  16508. }, e.prototype._setPosition = function (e) {
  16509. if (this._range = e, this._viewRange = null, this._range) {
  16510. var t = this._context.model.validateModelRange(this._range);
  16511. (this._context.model.coordinatesConverter.modelPositionIsVisible(t.getStartPosition()) || this._context.model.coordinatesConverter.modelPositionIsVisible(t.getEndPosition())) && (this._viewRange = this._context.model.coordinatesConverter.convertModelRangeToViewRange(t))
  16512. }
  16513. }, e.prototype._getMaxWidth = function () {
  16514. return this.allowEditorOverflow ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth : this._contentWidth
  16515. }, e.prototype.setPosition = function (e, t) {
  16516. this._setPosition(e), this._preference = t, this._cachedDomNodeClientWidth = -1, this._cachedDomNodeClientHeight = -1
  16517. }, e.prototype._layoutBoxInViewport = function (e, t, n, i, o) {
  16518. var r = e.top, s = r, a = t.top + this._lineHeight, l = r - i, u = s >= i, d = a,
  16519. c = o.viewportHeight - a >= i, h = e.left, p = t.left
  16520. ;
  16521. return h + n > o.scrollLeft + o.viewportWidth && (h = o.scrollLeft + o.viewportWidth - n), p + n > o.scrollLeft + o.viewportWidth && (p = o.scrollLeft + o.viewportWidth - n), h < o.scrollLeft && (h = o.scrollLeft), p < o.scrollLeft && (p = o.scrollLeft), {
  16522. fitsAbove: u,
  16523. aboveTop: l,
  16524. aboveLeft: h,
  16525. fitsBelow: c,
  16526. belowTop: d,
  16527. belowLeft: p
  16528. }
  16529. }, e.prototype._layoutHorizontalSegmentInPage = function (e, t, i, o) {
  16530. var r, s = Math.max(0, t.left - o), a = Math.min(t.left + t.width + o, e.width),
  16531. l = t.left + i - n.StandardWindow.scrollX;
  16532. l + o > a && (l -= r = l - (a - o), i -= r);
  16533. l < s && (l -= r = l - s, i -= r);
  16534. return [i, l]
  16535. }, e.prototype._layoutBoxInPage = function (e, t, i, o, r) {
  16536. var s = e.top - o, a = t.top + this._lineHeight,
  16537. l = n.getDomNodePagePosition(this._viewDomNode.domNode), u = l.top + s - n.StandardWindow.scrollY,
  16538. d = l.top + a - n.StandardWindow.scrollY, c = n.getClientArea(document.body),
  16539. h = this._layoutHorizontalSegmentInPage(c, l, e.left - r.scrollLeft + this._contentLeft, i),
  16540. p = h[0], g = h[1],
  16541. f = this._layoutHorizontalSegmentInPage(c, l, t.left - r.scrollLeft + this._contentLeft, i),
  16542. m = f[0], v = f[1], _ = u >= 22, y = d + o <= c.height - 22;
  16543. return this._fixedOverflowWidgets ? {
  16544. fitsAbove: _,
  16545. aboveTop: Math.max(u, 22), aboveLeft: g, fitsBelow: y, belowTop: d, belowLeft: v
  16546. } : {fitsAbove: _, aboveTop: Math.max(s, 22), aboveLeft: p, fitsBelow: y, belowTop: a, belowLeft: m}
  16547. }, e.prototype._prepareRenderWidgetAtExactPositionOverflowing = function (e) {
  16548. return new s(e.top, e.left + this._contentLeft)
  16549. }, e.prototype._getTopAndBottomLeft = function (e) {
  16550. if (!this._viewRange) return [null, null];
  16551. var t = e.linesVisibleRangesForRange(this._viewRange, !1);
  16552. if (!t || 0 === t.length) return [null, null];
  16553. for (var n = t[0], i = t[0], o = 0, r = t; o < r.length; o++) {
  16554. var a = r[o];
  16555. a.lineNumber < n.lineNumber && (n = a), a.lineNumber > i.lineNumber && (i = a)
  16556. }
  16557. for (var l = 1073741824, u = 0, d = n.ranges; u < d.length; u++) {
  16558. (g = d[u]).left < l && (l = g.left)
  16559. }
  16560. for (var c = 1073741824, h = 0, p = i.ranges; h < p.length; h++) {
  16561. var g;
  16562. (g = p[h]).left < c && (c = g.left)
  16563. }
  16564. var f = e.getVerticalOffsetForLineNumber(n.lineNumber) - e.scrollTop, m = new s(f, l),
  16565. v = e.getVerticalOffsetForLineNumber(i.lineNumber) - e.scrollTop;
  16566. return [m, new s(v, c)]
  16567. }, e.prototype._prepareRenderWidget = function (e) {
  16568. var t, n = this._getTopAndBottomLeft(e), i = n[0], o = n[1];
  16569. if (!i || !o) return null
  16570. ;
  16571. if (-1 === this._cachedDomNodeClientWidth || -1 === this._cachedDomNodeClientHeight) {
  16572. var r = this.domNode.domNode;
  16573. this._cachedDomNodeClientWidth = r.clientWidth, this._cachedDomNodeClientHeight = r.clientHeight
  16574. }
  16575. if (t = this.allowEditorOverflow ? this._layoutBoxInPage(i, o, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, e) : this._layoutBoxInViewport(i, o, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, e), this._preference) for (var a = 1; a <= 2; a++) for (var l = 0, u = this._preference; l < u.length; l++) {
  16576. var d = u[l];
  16577. if (1 === d) {
  16578. if (!t) return null;
  16579. if (2 === a || t.fitsAbove) return new s(t.aboveTop, t.aboveLeft)
  16580. } else {
  16581. if (2 !== d) return this.allowEditorOverflow ? this._prepareRenderWidgetAtExactPositionOverflowing(i) : i;
  16582. if (!t) return null;
  16583. if (2 === a || t.fitsBelow) return new s(t.belowTop, t.belowLeft)
  16584. }
  16585. }
  16586. return null
  16587. }, e.prototype.onBeforeRender = function (e) {
  16588. this._viewRange && this._preference && (this._viewRange.endLineNumber < e.startLineNumber || this._viewRange.startLineNumber > e.endLineNumber || this.domNode.setMaxWidth(this._maxWidth))
  16589. },
  16590. e.prototype.prepareRender = function (e) {
  16591. this._renderData = this._prepareRenderWidget(e)
  16592. }, e.prototype.render = function (e) {
  16593. this._renderData ? (this.allowEditorOverflow ? (this.domNode.setTop(this._renderData.top), this.domNode.setLeft(this._renderData.left)) : (this.domNode.setTop(this._renderData.top + e.scrollTop - e.bigNumbersDelta), this.domNode.setLeft(this._renderData.left)), this._isVisible || (this.domNode.setVisibility("inherit"), this.domNode.setAttribute("monaco-visible-content-widget", "true"), this._isVisible = !0)) : this._isVisible && (this.domNode.removeAttribute("monaco-visible-content-widget"), this._isVisible = !1, this.domNode.setVisibility("hidden"))
  16594. }, e
  16595. }()
  16596. })),define(n[367], i([0, 1, 82, 3, 91, 286]), (function (e, t, n, i, o) {
  16597. "use strict";
  16598. Object.defineProperty(t, "__esModule", {value: !0});
  16599. var s = function (e) {
  16600. function t(t) {
  16601. var n = e.call(this) || this;
  16602. n._context = t;
  16603. var i = n._context.configuration.options;
  16604. return n._lineHeight = i.get(49), n._typicalHalfwidthCharacterWidth = i.get(34).typicalHalfwidthCharacterWidth, n._renderResult = null,
  16605. n._context.addEventHandler(n), n
  16606. }
  16607. return r(t, e), t.prototype.dispose = function () {
  16608. this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
  16609. }, t.prototype.onConfigurationChanged = function (e) {
  16610. var t = this._context.configuration.options;
  16611. return this._lineHeight = t.get(49), this._typicalHalfwidthCharacterWidth = t.get(34).typicalHalfwidthCharacterWidth, !0
  16612. }, t.prototype.onDecorationsChanged = function (e) {
  16613. return !0
  16614. }, t.prototype.onFlushed = function (e) {
  16615. return !0
  16616. }, t.prototype.onLinesChanged = function (e) {
  16617. return !0
  16618. }, t.prototype.onLinesDeleted = function (e) {
  16619. return !0
  16620. }, t.prototype.onLinesInserted = function (e) {
  16621. return !0
  16622. }, t.prototype.onScrollChanged = function (e) {
  16623. return e.scrollTopChanged || e.scrollWidthChanged
  16624. }, t.prototype.onZonesChanged = function (e) {
  16625. return !0
  16626. }, t.prototype.prepareRender = function (e) {
  16627. for (var t = e.getDecorationsInViewport(), n = [], o = 0, r = 0, s = t.length; r < s; r++) {
  16628. var a = t[r];
  16629. a.options.className && (n[o++] = a)
  16630. }
  16631. n = n.sort((function (e, t) {
  16632. if (e.options.zIndex < t.options.zIndex) return -1
  16633. ;
  16634. if (e.options.zIndex > t.options.zIndex) return 1;
  16635. var n = e.options.className, o = t.options.className;
  16636. return n < o ? -1 : n > o ? 1 : i.Range.compareRangesUsingStarts(e.range, t.range)
  16637. }));
  16638. for (var l = e.visibleRange.startLineNumber, u = e.visibleRange.endLineNumber, d = [], c = l; c <= u; c++) {
  16639. d[c - l] = ""
  16640. }
  16641. this._renderWholeLineDecorations(e, n, d), this._renderNormalDecorations(e, n, d), this._renderResult = d
  16642. }, t.prototype._renderWholeLineDecorations = function (e, t, n) {
  16643. for (var i = String(this._lineHeight), o = e.visibleRange.startLineNumber, r = e.visibleRange.endLineNumber, s = 0, a = t.length; s < a; s++) {
  16644. var l = t[s];
  16645. if (l.options.isWholeLine) for (var u = '<div class="cdr ' + l.options.className + '" style="left:0;width:100%;height:' + i + 'px;"></div>', d = Math.max(l.range.startLineNumber, o), c = Math.min(l.range.endLineNumber, r), h = d; h <= c; h++) {
  16646. n[h - o] += u
  16647. }
  16648. }
  16649. }, t.prototype._renderNormalDecorations = function (e, t, n) {
  16650. for (var o = String(this._lineHeight), r = e.visibleRange.startLineNumber, s = null, a = !1, l = null, u = 0, d = t.length; u < d; u++) {
  16651. var c = t[u];
  16652. if (!c.options.isWholeLine) {
  16653. var h = c.options.className, p = Boolean(c.options.showIfCollapsed), g = c.range;
  16654. p && 1 === g.endColumn && g.endLineNumber !== g.startLineNumber && (g = new i.Range(g.startLineNumber, g.startColumn, g.endLineNumber - 1, this._context.model.getLineMaxColumn(g.endLineNumber - 1))), s === h && a === p && i.Range.areIntersectingOrTouching(l, g) ? l = i.Range.plusRange(l, g) : (null !== s && this._renderNormalDecoration(e, l, s, a, o, r, n), s = h, a = p, l = g)
  16655. }
  16656. }
  16657. null !== s && this._renderNormalDecoration(e, l, s, a, o, r, n)
  16658. }, t.prototype._renderNormalDecoration = function (e, t, n, i, r, s, a) {
  16659. var l = e.linesVisibleRangesForRange(t, "findMatch" === n);
  16660. if (l) for (var u = 0, d = l.length; u < d; u++) {
  16661. var c = l[u];
  16662. if (!c.outsideRenderedLine) {
  16663. var h = c.lineNumber - s;
  16664. if (i && 1 === c.ranges.length) {
  16665. var p = c.ranges[0];
  16666. 0 === p.width && (c.ranges[0] = new o.HorizontalRange(p.left, this._typicalHalfwidthCharacterWidth))
  16667. }
  16668. for (var g = 0, f = c.ranges.length; g < f; g++) {
  16669. var m = c.ranges[g],
  16670. v = '<div class="cdr ' + n + '" style="left:' + String(m.left) + "px;width:" + String(m.width) + "px;height:" + r + 'px;"></div>';
  16671. a[h] += v
  16672. }
  16673. }
  16674. }
  16675. }, t.prototype.render = function (e, t) {
  16676. if (!this._renderResult) return "";
  16677. var n = t - e;
  16678. return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
  16679. }, t
  16680. }(n.DynamicViewOverlay);
  16681. t.DecorationsOverlay = s
  16682. })),define(n[149], i([0, 1, 82, 287]), (function (e, t, n) {
  16683. "use strict";
  16684. Object.defineProperty(t, "__esModule", {value: !0});
  16685. var i = function (e, t, n) {
  16686. this.startLineNumber = +e, this.endLineNumber = +t, this.className = String(n)
  16687. };
  16688. t.DecorationToRender = i;
  16689. var o = function (e) {
  16690. function t() {
  16691. return null !== e && e.apply(this, arguments) || this
  16692. }
  16693. return r(t, e), t.prototype._render = function (e, t, n) {
  16694. for (var i = [], o = e; o <= t; o++) {
  16695. i[o - e] = []
  16696. }
  16697. if (0 === n.length) return i;
  16698. n.sort((function (e, t) {
  16699. return e.className === t.className ? e.startLineNumber === t.startLineNumber ? e.endLineNumber - t.endLineNumber : e.startLineNumber - t.startLineNumber : e.className < t.className ? -1 : 1
  16700. }));
  16701. for (var r = null, s = 0, a = 0, l = n.length; a < l; a++) {
  16702. var u = n[a], d = u.className, c = Math.max(u.startLineNumber, e) - e,
  16703. h = Math.min(u.endLineNumber, t) - e;
  16704. r === d ? (c = Math.max(s + 1, c), s = Math.max(s, h)) : (r = d, s = h);
  16705. for (var p = c; p <= s; p++) i[p].push(r)
  16706. }
  16707. return i
  16708. }, t
  16709. }(n.DynamicViewOverlay)
  16710. ;t.DedupOverlay = o;
  16711. var s = function (e) {
  16712. function t(t) {
  16713. var n = e.call(this) || this;
  16714. n._context = t;
  16715. var i = n._context.configuration.options, o = i.get(107);
  16716. return n._lineHeight = i.get(49), n._glyphMargin = i.get(40), n._glyphMarginLeft = o.glyphMarginLeft, n._glyphMarginWidth = o.glyphMarginWidth, n._renderResult = null, n._context.addEventHandler(n), n
  16717. }
  16718. return r(t, e), t.prototype.dispose = function () {
  16719. this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
  16720. }, t.prototype.onConfigurationChanged = function (e) {
  16721. var t = this._context.configuration.options, n = t.get(107);
  16722. return this._lineHeight = t.get(49), this._glyphMargin = t.get(40), this._glyphMarginLeft = n.glyphMarginLeft, this._glyphMarginWidth = n.glyphMarginWidth, !0
  16723. }, t.prototype.onDecorationsChanged = function (e) {
  16724. return !0
  16725. }, t.prototype.onFlushed = function (e) {
  16726. return !0
  16727. }, t.prototype.onLinesChanged = function (e) {
  16728. return !0
  16729. }, t.prototype.onLinesDeleted = function (e) {
  16730. return !0
  16731. }, t.prototype.onLinesInserted = function (e) {
  16732. return !0
  16733. }, t.prototype.onScrollChanged = function (e) {
  16734. return e.scrollTopChanged
  16735. }, t.prototype.onZonesChanged = function (e) {
  16736. return !0
  16737. }, t.prototype._getDecorations = function (e) {
  16738. for (var t = e.getDecorationsInViewport(), n = [], o = 0, r = 0, s = t.length; r < s; r++) {
  16739. var a = t[r], l = a.options.glyphMarginClassName;
  16740. l && (n[o++] = new i(a.range.startLineNumber, a.range.endLineNumber, l))
  16741. }
  16742. return n
  16743. }, t.prototype.prepareRender = function (e) {
  16744. if (this._glyphMargin) {
  16745. for (var t = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, i = this._render(t, n, this._getDecorations(e)), o = this._lineHeight.toString(), r = '" style="left:' + this._glyphMarginLeft.toString() + "px;width:" + this._glyphMarginWidth.toString() + "px;height:" + o + 'px;"></div>', s = [], a = t; a <= n; a++) {
  16746. var l = a - t, u = i[l];
  16747. 0 === u.length ? s[l] = "" : s[l] = '<div class="cgmr codicon ' + u.join(" ") + r
  16748. }
  16749. this._renderResult = s
  16750. } else this._renderResult = null
  16751. }, t.prototype.render = function (e, t) {
  16752. if (!this._renderResult) return "";
  16753. var n = t - e;
  16754. return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
  16755. }, t
  16756. }(o);
  16757. t.GlyphMarginOverlay = s
  16758. })),define(n[368], i([0, 1, 149, 291]), (function (e, t, n) {
  16759. "use strict";
  16760. Object.defineProperty(t, "__esModule", {value: !0});
  16761. var i = function (e) {
  16762. function t(t) {
  16763. var n = e.call(this) || this;
  16764. n._context = t;
  16765. var i = n._context.configuration.options.get(107);
  16766. return n._decorationsLeft = i.decorationsLeft, n._decorationsWidth = i.decorationsWidth, n._renderResult = null, n._context.addEventHandler(n), n
  16767. }
  16768. return r(t, e), t.prototype.dispose = function () {
  16769. this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
  16770. }, t.prototype.onConfigurationChanged = function (e) {
  16771. var t = this._context.configuration.options.get(107);
  16772. return this._decorationsLeft = t.decorationsLeft, this._decorationsWidth = t.decorationsWidth, !0
  16773. }, t.prototype.onDecorationsChanged = function (e) {
  16774. return !0
  16775. }, t.prototype.onFlushed = function (e) {
  16776. return !0
  16777. }, t.prototype.onLinesChanged = function (e) {
  16778. return !0
  16779. }, t.prototype.onLinesDeleted = function (e) {
  16780. return !0
  16781. }, t.prototype.onLinesInserted = function (e) {
  16782. return !0
  16783. }, t.prototype.onScrollChanged = function (e) {
  16784. return e.scrollTopChanged
  16785. }, t.prototype.onZonesChanged = function (e) {
  16786. return !0
  16787. },
  16788. t.prototype._getDecorations = function (e) {
  16789. for (var t = e.getDecorationsInViewport(), i = [], o = 0, r = 0, s = t.length; r < s; r++) {
  16790. var a = t[r], l = a.options.linesDecorationsClassName;
  16791. l && (i[o++] = new n.DecorationToRender(a.range.startLineNumber, a.range.endLineNumber, l))
  16792. }
  16793. return i
  16794. }, t.prototype.prepareRender = function (e) {
  16795. for (var t = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, i = this._render(t, n, this._getDecorations(e)), o = '" style="left:' + this._decorationsLeft.toString() + "px;width:" + this._decorationsWidth.toString() + 'px;"></div>', r = [], s = t; s <= n; s++) {
  16796. for (var a = s - t, l = i[a], u = "", d = 0, c = l.length; d < c; d++) u += '<div class="cldr ' + l[d] + o;
  16797. r[a] = u
  16798. }
  16799. this._renderResult = r
  16800. }, t.prototype.render = function (e, t) {
  16801. return this._renderResult ? this._renderResult[t - e] : ""
  16802. }, t
  16803. }(n.DedupOverlay);
  16804. t.LinesDecorationsOverlay = i
  16805. })),define(n[195], i([0, 1, 28, 37]), (function (e, t, n, i) {
  16806. "use strict";
  16807. Object.defineProperty(t, "__esModule", {value: !0});
  16808. var o = function (e) {
  16809. function t(i) {
  16810. var o = e.call(this, i) || this, r = o._context.configuration.options, s = r.get(107)
  16811. ;
  16812. return o._canUseLayerHinting = !r.get(22), o._contentLeft = s.contentLeft, o._glyphMarginLeft = s.glyphMarginLeft, o._glyphMarginWidth = s.glyphMarginWidth, o._domNode = n.createFastDomNode(document.createElement("div")), o._domNode.setClassName(t.OUTER_CLASS_NAME), o._domNode.setPosition("absolute"), o._domNode.setAttribute("role", "presentation"), o._domNode.setAttribute("aria-hidden", "true"), o._glyphMarginBackgroundDomNode = n.createFastDomNode(document.createElement("div")), o._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME), o._domNode.appendChild(o._glyphMarginBackgroundDomNode), o
  16813. }
  16814. return r(t, e), t.prototype.dispose = function () {
  16815. e.prototype.dispose.call(this)
  16816. }, t.prototype.getDomNode = function () {
  16817. return this._domNode
  16818. }, t.prototype.onConfigurationChanged = function (e) {
  16819. var t = this._context.configuration.options, n = t.get(107);
  16820. return this._canUseLayerHinting = !t.get(22), this._contentLeft = n.contentLeft, this._glyphMarginLeft = n.glyphMarginLeft, this._glyphMarginWidth = n.glyphMarginWidth, !0
  16821. }, t.prototype.onScrollChanged = function (t) {
  16822. return e.prototype.onScrollChanged.call(this, t) || t.scrollTopChanged
  16823. }, t.prototype.prepareRender = function (e) {
  16824. }, t.prototype.render = function (e) {
  16825. this._domNode.setLayerHinting(this._canUseLayerHinting), this._domNode.setContain("strict");
  16826. var t = e.scrollTop - e.bigNumbersDelta;
  16827. this._domNode.setTop(-t);
  16828. var n = Math.min(e.scrollHeight, 1e6);
  16829. this._domNode.setHeight(n), this._domNode.setWidth(this._contentLeft), this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft), this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth), this._glyphMarginBackgroundDomNode.setHeight(n)
  16830. }, t.CLASS_NAME = "glyph-margin", t.OUTER_CLASS_NAME = "margin", t
  16831. }(i.ViewPart);
  16832. t.Margin = o
  16833. })),define(n[369], i([0, 1, 149, 292]), (function (e, t, n) {
  16834. "use strict";
  16835. Object.defineProperty(t, "__esModule", {value: !0});
  16836. var i = function (e) {
  16837. function t(t) {
  16838. var n = e.call(this) || this;
  16839. return n._context = t, n._renderResult = null, n._context.addEventHandler(n), n
  16840. }
  16841. return r(t, e), t.prototype.dispose = function () {
  16842. this._context.removeEventHandler(this), this._renderResult = null,
  16843. e.prototype.dispose.call(this)
  16844. }, t.prototype.onConfigurationChanged = function (e) {
  16845. return !0
  16846. }, t.prototype.onDecorationsChanged = function (e) {
  16847. return !0
  16848. }, t.prototype.onFlushed = function (e) {
  16849. return !0
  16850. }, t.prototype.onLinesChanged = function (e) {
  16851. return !0
  16852. }, t.prototype.onLinesDeleted = function (e) {
  16853. return !0
  16854. }, t.prototype.onLinesInserted = function (e) {
  16855. return !0
  16856. }, t.prototype.onScrollChanged = function (e) {
  16857. return e.scrollTopChanged
  16858. }, t.prototype.onZonesChanged = function (e) {
  16859. return !0
  16860. }, t.prototype._getDecorations = function (e) {
  16861. for (var t = e.getDecorationsInViewport(), i = [], o = 0, r = 0, s = t.length; r < s; r++) {
  16862. var a = t[r], l = a.options.marginClassName;
  16863. l && (i[o++] = new n.DecorationToRender(a.range.startLineNumber, a.range.endLineNumber, l))
  16864. }
  16865. return i
  16866. }, t.prototype.prepareRender = function (e) {
  16867. for (var t = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber, i = this._render(t, n, this._getDecorations(e)), o = [], r = t; r <= n; r++) {
  16868. for (var s = r - t, a = i[s], l = "", u = 0, d = a.length; u < d; u++) l += '<div class="cmdr ' + a[u] + '" style=""></div>';
  16869. o[s] = l
  16870. }
  16871. this._renderResult = o
  16872. },
  16873. t.prototype.render = function (e, t) {
  16874. return this._renderResult ? this._renderResult[t - e] : ""
  16875. }, t
  16876. }(n.DedupOverlay);
  16877. t.MarginViewLineDecorationsOverlay = i
  16878. })),define(n[370], i([0, 1, 28, 37, 294]), (function (e, t, n, i) {
  16879. "use strict";
  16880. Object.defineProperty(t, "__esModule", {value: !0});
  16881. var o = function (e) {
  16882. function t(t) {
  16883. var o = e.call(this, t) || this, r = o._context.configuration.options.get(107);
  16884. return o._widgets = {}, o._verticalScrollbarWidth = r.verticalScrollbarWidth, o._minimapWidth = r.minimapWidth, o._horizontalScrollbarHeight = r.horizontalScrollbarHeight, o._editorHeight = r.height, o._editorWidth = r.width, o._domNode = n.createFastDomNode(document.createElement("div")), i.PartFingerprints.write(o._domNode, 4), o._domNode.setClassName("overlayWidgets"), o
  16885. }
  16886. return r(t, e), t.prototype.dispose = function () {
  16887. e.prototype.dispose.call(this), this._widgets = {}
  16888. }, t.prototype.getDomNode = function () {
  16889. return this._domNode
  16890. }, t.prototype.onConfigurationChanged = function (e) {
  16891. var t = this._context.configuration.options.get(107)
  16892. ;
  16893. return this._verticalScrollbarWidth = t.verticalScrollbarWidth, this._minimapWidth = t.minimapWidth, this._horizontalScrollbarHeight = t.horizontalScrollbarHeight, this._editorHeight = t.height, this._editorWidth = t.width, !0
  16894. }, t.prototype.addWidget = function (e) {
  16895. var t = n.createFastDomNode(e.getDomNode());
  16896. this._widgets[e.getId()] = {
  16897. widget: e,
  16898. preference: null,
  16899. domNode: t
  16900. }, t.setPosition("absolute"), t.setAttribute("widgetId", e.getId()), this._domNode.appendChild(t), this.setShouldRender()
  16901. }, t.prototype.setWidgetPosition = function (e, t) {
  16902. var n = this._widgets[e.getId()];
  16903. return n.preference !== t && (n.preference = t, this.setShouldRender(), !0)
  16904. }, t.prototype.removeWidget = function (e) {
  16905. var t = e.getId();
  16906. if (this._widgets.hasOwnProperty(t)) {
  16907. var n = this._widgets[t].domNode.domNode;
  16908. delete this._widgets[t], n.parentNode.removeChild(n), this.setShouldRender()
  16909. }
  16910. }, t.prototype._renderWidget = function (e) {
  16911. var t = e.domNode;
  16912. if (null !== e.preference) if (0 === e.preference) t.setTop(0), t.setRight(2 * this._verticalScrollbarWidth + this._minimapWidth); else if (1 === e.preference) {
  16913. var n = t.domNode.clientHeight;
  16914. t.setTop(this._editorHeight - n - 2 * this._horizontalScrollbarHeight), t.setRight(2 * this._verticalScrollbarWidth + this._minimapWidth)
  16915. } else 2 === e.preference && (t.setTop(0), t.domNode.style.right = "50%"); else t.unsetTop()
  16916. }, t.prototype.prepareRender = function (e) {
  16917. }, t.prototype.render = function (e) {
  16918. this._domNode.setWidth(this._editorWidth);
  16919. for (var t = Object.keys(this._widgets), n = 0, i = t.length; n < i; n++) {
  16920. var o = t[n];
  16921. this._renderWidget(this._widgets[o])
  16922. }
  16923. }, t
  16924. }(i.ViewPart);
  16925. t.ViewOverlayWidgets = o
  16926. })),define(n[371], i([0, 1, 28, 193, 92]), (function (e, t, n, i, o) {
  16927. "use strict";
  16928. Object.defineProperty(t, "__esModule", {value: !0});
  16929. var s = function (e) {
  16930. function t(t, o) {
  16931. var r = e.call(this) || this;
  16932. r._context = t;
  16933. var s = r._context.configuration.options;
  16934. return r._domNode = n.createFastDomNode(document.createElement("canvas")), r._domNode.setClassName(o), r._domNode.setPosition("absolute"), r._domNode.setLayerHinting(!0), r._domNode.setContain("strict"), r._zoneManager = new i.OverviewZoneManager((function (e) {
  16935. return r._context.viewLayout.getVerticalOffsetForLineNumber(e)
  16936. })), r._zoneManager.setDOMWidth(0), r._zoneManager.setDOMHeight(0), r._zoneManager.setOuterHeight(r._context.viewLayout.getScrollHeight()), r._zoneManager.setLineHeight(s.get(49)), r._zoneManager.setPixelRatio(s.get(105)), r._context.addEventHandler(r), r
  16937. }
  16938. return r(t, e), t.prototype.dispose = function () {
  16939. this._context.removeEventHandler(this), e.prototype.dispose.call(this)
  16940. }, t.prototype.onConfigurationChanged = function (e) {
  16941. var t = this._context.configuration.options;
  16942. return e.hasChanged(49) && (this._zoneManager.setLineHeight(t.get(49)), this._render()), e.hasChanged(105) && (this._zoneManager.setPixelRatio(t.get(105)), this._domNode.setWidth(this._zoneManager.getDOMWidth()), this._domNode.setHeight(this._zoneManager.getDOMHeight()), this._domNode.domNode.width = this._zoneManager.getCanvasWidth(), this._domNode.domNode.height = this._zoneManager.getCanvasHeight(), this._render()), !0
  16943. }, t.prototype.onFlushed = function (e) {
  16944. return this._render(), !0
  16945. },
  16946. t.prototype.onScrollChanged = function (e) {
  16947. return e.scrollHeightChanged && (this._zoneManager.setOuterHeight(e.scrollHeight), this._render()), !0
  16948. }, t.prototype.onZonesChanged = function (e) {
  16949. return this._render(), !0
  16950. }, t.prototype.getDomNode = function () {
  16951. return this._domNode.domNode
  16952. }, t.prototype.setLayout = function (e) {
  16953. this._domNode.setTop(e.top), this._domNode.setRight(e.right);
  16954. var t = !1;
  16955. t = this._zoneManager.setDOMWidth(e.width) || t, (t = this._zoneManager.setDOMHeight(e.height) || t) && (this._domNode.setWidth(this._zoneManager.getDOMWidth()), this._domNode.setHeight(this._zoneManager.getDOMHeight()), this._domNode.domNode.width = this._zoneManager.getCanvasWidth(), this._domNode.domNode.height = this._zoneManager.getCanvasHeight(), this._render())
  16956. }, t.prototype.setZones = function (e) {
  16957. this._zoneManager.setZones(e), this._render()
  16958. }, t.prototype._render = function () {
  16959. if (0 === this._zoneManager.getOuterHeight()) return !1
  16960. ;
  16961. var e = this._zoneManager.getCanvasWidth(), t = this._zoneManager.getCanvasHeight(),
  16962. n = this._zoneManager.resolveColorZones(), i = this._zoneManager.getId2Color(),
  16963. o = this._domNode.domNode.getContext("2d");
  16964. return o.clearRect(0, 0, e, t), n.length > 0 && this._renderOneLane(o, n, i, e), !0
  16965. }, t.prototype._renderOneLane = function (e, t, n, i) {
  16966. for (var o = 0, r = 0, s = 0, a = 0, l = t; a < l.length; a++) {
  16967. var u = l[a], d = u.colorId, c = u.from, h = u.to;
  16968. d !== o ? (e.fillRect(0, r, i, s - r), o = d, e.fillStyle = n[o], r = c, s = h) : s >= c ? s = Math.max(s, h) : (e.fillRect(0, r, i, s - r), r = c, s = h)
  16969. }
  16970. e.fillRect(0, r, i, s - r)
  16971. }, t
  16972. }(o.ViewEventHandler);
  16973. t.OverviewRuler = s
  16974. })),define(n[372], i([0, 1, 28, 10, 37, 13]), (function (e, t, n, i, o, s) {
  16975. "use strict";
  16976. Object.defineProperty(t, "__esModule", {value: !0});
  16977. var a = function () {
  16978. throw new Error("Invalid change accessor")
  16979. }, l = function (e) {
  16980. function t(t) {
  16981. var i = e.call(this, t) || this, o = i._context.configuration.options, r = o.get(107);
  16982. return i._lineHeight = o.get(49), i._contentWidth = r.contentWidth, i._contentLeft = r.contentLeft, i.domNode = n.createFastDomNode(document.createElement("div")),
  16983. i.domNode.setClassName("view-zones"), i.domNode.setPosition("absolute"), i.domNode.setAttribute("role", "presentation"), i.domNode.setAttribute("aria-hidden", "true"), i.marginDomNode = n.createFastDomNode(document.createElement("div")), i.marginDomNode.setClassName("margin-view-zones"), i.marginDomNode.setPosition("absolute"), i.marginDomNode.setAttribute("role", "presentation"), i.marginDomNode.setAttribute("aria-hidden", "true"), i._zones = {}, i
  16984. }
  16985. return r(t, e), t.prototype.dispose = function () {
  16986. e.prototype.dispose.call(this), this._zones = {}
  16987. }, t.prototype._recomputeWhitespacesProps = function () {
  16988. for (var e = this, t = this._context.viewLayout.getWhitespaces(), n = new Map, i = 0, o = t; i < o.length; i++) {
  16989. var r = o[i];
  16990. n.set(r.id, r)
  16991. }
  16992. return this._context.viewLayout.changeWhitespace((function (t) {
  16993. for (var i = !1, o = Object.keys(e._zones), r = 0, s = o.length; r < s; r++) {
  16994. var a = o[r], l = e._zones[a], u = e._computeWhitespaceProps(l.delegate), d = n.get(a)
  16995. ;!d || d.afterLineNumber === u.afterViewLineNumber && d.height === u.heightInPx || (t.changeOneWhitespace(a, u.afterViewLineNumber, u.heightInPx), e._safeCallOnComputedHeight(l.delegate, u.heightInPx), i = !0)
  16996. }
  16997. return i
  16998. }))
  16999. }, t.prototype.onConfigurationChanged = function (e) {
  17000. var t = this._context.configuration.options, n = t.get(107);
  17001. return this._lineHeight = t.get(49), this._contentWidth = n.contentWidth, this._contentLeft = n.contentLeft, e.hasChanged(49) && this._recomputeWhitespacesProps(), !0
  17002. }, t.prototype.onLineMappingChanged = function (e) {
  17003. var t = this._recomputeWhitespacesProps();
  17004. return t && this._context.viewLayout.onHeightMaybeChanged(), t
  17005. }, t.prototype.onLinesDeleted = function (e) {
  17006. return !0
  17007. }, t.prototype.onScrollChanged = function (e) {
  17008. return e.scrollTopChanged || e.scrollWidthChanged
  17009. }, t.prototype.onZonesChanged = function (e) {
  17010. return !0
  17011. }, t.prototype.onLinesInserted = function (e) {
  17012. return !0
  17013. }, t.prototype._getZoneOrdinal = function (e) {
  17014. return void 0 !== e.afterColumn ? e.afterColumn : 1e4
  17015. }, t.prototype._computeWhitespaceProps = function (e) {
  17016. if (0 === e.afterLineNumber) return {
  17017. afterViewLineNumber: 0, heightInPx: this._heightInPixels(e), minWidthInPx: this._minWidthInPixels(e)
  17018. };
  17019. var t, n;
  17020. if (void 0 !== e.afterColumn) t = this._context.model.validateModelPosition({
  17021. lineNumber: e.afterLineNumber,
  17022. column: e.afterColumn
  17023. }); else {
  17024. var i = this._context.model.validateModelPosition({
  17025. lineNumber: e.afterLineNumber,
  17026. column: 1
  17027. }).lineNumber;
  17028. t = new s.Position(i, this._context.model.getModelLineMaxColumn(i))
  17029. }
  17030. n = t.column === this._context.model.getModelLineMaxColumn(t.lineNumber) ? this._context.model.validateModelPosition({
  17031. lineNumber: t.lineNumber + 1,
  17032. column: 1
  17033. }) : this._context.model.validateModelPosition({lineNumber: t.lineNumber, column: t.column + 1});
  17034. var o = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),
  17035. r = this._context.model.coordinatesConverter.modelPositionIsVisible(n);
  17036. return {
  17037. afterViewLineNumber: o.lineNumber,
  17038. heightInPx: r ? this._heightInPixels(e) : 0,
  17039. minWidthInPx: this._minWidthInPixels(e)
  17040. }
  17041. }, t.prototype.changeViewZones = function (e) {
  17042. var t = this;
  17043. return this._context.viewLayout.changeWhitespace((function (n) {
  17044. var o = !1, r = {
  17045. addZone: function (e) {
  17046. return o = !0, t._addZone(n, e)
  17047. }, removeZone: function (e) {
  17048. e && (o = t._removeZone(n, e) || o)
  17049. }, layoutZone: function (e) {
  17050. e && (o = t._layoutZone(n, e) || o)
  17051. }
  17052. };
  17053. return function (e, t) {
  17054. try {
  17055. e(t)
  17056. } catch (e) {
  17057. i.onUnexpectedError(e)
  17058. }
  17059. }(e, r), r.addZone = a, r.removeZone = a, r.layoutZone = a, o
  17060. }))
  17061. }, t.prototype._addZone = function (e, t) {
  17062. var i = this._computeWhitespaceProps(t), o = {
  17063. whitespaceId: e.insertWhitespace(i.afterViewLineNumber, this._getZoneOrdinal(t), i.heightInPx, i.minWidthInPx),
  17064. delegate: t,
  17065. isVisible: !1,
  17066. domNode: n.createFastDomNode(t.domNode),
  17067. marginDomNode: t.marginDomNode ? n.createFastDomNode(t.marginDomNode) : null
  17068. };
  17069. return this._safeCallOnComputedHeight(o.delegate, i.heightInPx), o.domNode.setPosition("absolute"), o.domNode.domNode.style.width = "100%", o.domNode.setDisplay("none"), o.domNode.setAttribute("monaco-view-zone", o.whitespaceId), this.domNode.appendChild(o.domNode), o.marginDomNode && (o.marginDomNode.setPosition("absolute"), o.marginDomNode.domNode.style.width = "100%", o.marginDomNode.setDisplay("none"),
  17070. o.marginDomNode.setAttribute("monaco-view-zone", o.whitespaceId), this.marginDomNode.appendChild(o.marginDomNode)), this._zones[o.whitespaceId] = o, this.setShouldRender(), o.whitespaceId
  17071. }, t.prototype._removeZone = function (e, t) {
  17072. if (this._zones.hasOwnProperty(t)) {
  17073. var n = this._zones[t];
  17074. return delete this._zones[t], e.removeWhitespace(n.whitespaceId), n.domNode.removeAttribute("monaco-visible-view-zone"), n.domNode.removeAttribute("monaco-view-zone"), n.domNode.domNode.parentNode.removeChild(n.domNode.domNode), n.marginDomNode && (n.marginDomNode.removeAttribute("monaco-visible-view-zone"), n.marginDomNode.removeAttribute("monaco-view-zone"), n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)), this.setShouldRender(), !0
  17075. }
  17076. return !1
  17077. }, t.prototype._layoutZone = function (e, t) {
  17078. if (this._zones.hasOwnProperty(t)) {
  17079. var n = this._zones[t], i = this._computeWhitespaceProps(n.delegate);
  17080. return e.changeOneWhitespace(n.whitespaceId, i.afterViewLineNumber, i.heightInPx), this._safeCallOnComputedHeight(n.delegate, i.heightInPx),
  17081. this.setShouldRender(), !0
  17082. }
  17083. return !1
  17084. }, t.prototype.shouldSuppressMouseDownOnViewZone = function (e) {
  17085. if (this._zones.hasOwnProperty(e)) {
  17086. var t = this._zones[e];
  17087. return Boolean(t.delegate.suppressMouseDown)
  17088. }
  17089. return !1
  17090. }, t.prototype._heightInPixels = function (e) {
  17091. return "number" == typeof e.heightInPx ? e.heightInPx : "number" == typeof e.heightInLines ? this._lineHeight * e.heightInLines : this._lineHeight
  17092. }, t.prototype._minWidthInPixels = function (e) {
  17093. return "number" == typeof e.minWidthInPx ? e.minWidthInPx : 0
  17094. }, t.prototype._safeCallOnComputedHeight = function (e, t) {
  17095. if ("function" == typeof e.onComputedHeight) try {
  17096. e.onComputedHeight(t)
  17097. } catch (e) {
  17098. i.onUnexpectedError(e)
  17099. }
  17100. }, t.prototype._safeCallOnDomNodeTop = function (e, t) {
  17101. if ("function" == typeof e.onDomNodeTop) try {
  17102. e.onDomNodeTop(t)
  17103. } catch (e) {
  17104. i.onUnexpectedError(e)
  17105. }
  17106. }, t.prototype.prepareRender = function (e) {
  17107. }, t.prototype.render = function (e) {
  17108. for (var t = e.viewportData.whitespaceViewportData, n = {}, i = !1, o = 0, r = t.length; o < r; o++) n[t[o].id] = t[o], i = !0;
  17109. var s = Object.keys(this._zones);
  17110. for (o = 0, r = s.length; o < r; o++) {
  17111. var a = s[o], l = this._zones[a], u = 0, d = 0, c = "none";
  17112. n.hasOwnProperty(a) ? (u = n[a].verticalOffset - e.bigNumbersDelta, d = n[a].height, c = "block", l.isVisible || (l.domNode.setAttribute("monaco-visible-view-zone", "true"), l.isVisible = !0), this._safeCallOnDomNodeTop(l.delegate, e.getScrolledTopFromAbsoluteTop(n[a].verticalOffset))) : (l.isVisible && (l.domNode.removeAttribute("monaco-visible-view-zone"), l.isVisible = !1), this._safeCallOnDomNodeTop(l.delegate, e.getScrolledTopFromAbsoluteTop(-1e6))), l.domNode.setTop(u), l.domNode.setHeight(d), l.domNode.setDisplay(c), l.marginDomNode && (l.marginDomNode.setTop(u), l.marginDomNode.setHeight(d), l.marginDomNode.setDisplay(c))
  17113. }
  17114. i && (this.domNode.setWidth(Math.max(e.scrollWidth, this._contentWidth)), this.marginDomNode.setWidth(this._contentLeft))
  17115. }, t
  17116. }(o.ViewPart);
  17117. t.ViewZones = l
  17118. })),define(n[69], i([0, 1, 5]), (function (e, t, n) {
  17119. "use strict";
  17120. Object.defineProperty(t, "__esModule", {value: !0});
  17121. var i = function (e, t, n, i) {
  17122. this.top = 0 | e, this.left = 0 | t, this.width = 0 | n, this.height = 0 | i
  17123. };
  17124. t.Viewport = i;
  17125. var o = function (e, t) {
  17126. this.tabSize = e, this.data = t
  17127. };
  17128. t.MinimapLinesRenderingData = o;
  17129. var r = function (e, t, n, i, o, r) {
  17130. this.content = e, this.continuesWithWrappedLine = t, this.minColumn = n, this.maxColumn = i, this.startVisibleColumn = o, this.tokens = r
  17131. };
  17132. t.ViewLineData = r;
  17133. var s = function () {
  17134. function e(t, n, i, o, r, s, a, l, u, d) {
  17135. this.minColumn = t, this.maxColumn = n, this.content = i, this.continuesWithWrappedLine = o, this.isBasicASCII = e.isBasicASCII(i, s), this.containsRTL = e.containsRTL(i, this.isBasicASCII, r), this.tokens = a, this.inlineDecorations = l, this.tabSize = u, this.startVisibleColumn = d
  17136. }
  17137. return e.isBasicASCII = function (e, t) {
  17138. return !t || n.isBasicASCII(e)
  17139. }, e.containsRTL = function (e, t, i) {
  17140. return !(t || !i) && n.containsRTL(e)
  17141. }, e
  17142. }();
  17143. t.ViewLineRenderingData = s;
  17144. var a = function (e, t, n) {
  17145. this.range = e, this.inlineClassName = t, this.type = n
  17146. };
  17147. t.InlineDecoration = a;
  17148. var l = function (e, t) {
  17149. this.range = e, this.options = t
  17150. };
  17151. t.ViewModelDecoration = l
  17152. })),define(n[373], i([0, 1, 4, 2, 176, 362, 69]), (function (e, t, n, i, o, s, a) {
  17153. "use strict";
  17154. Object.defineProperty(t, "__esModule", {value: !0});
  17155. var l = function () {
  17156. function e(e, t, n, i) {
  17157. (e |= 0) < 0 && (e = 0), (t |= 0) < 0 && (t = 0), (n |= 0) < 0 && (n = 0), (i |= 0) < 0 && (i = 0), this.width = e, this.contentWidth = t, this.scrollWidth = Math.max(e, t), this.height = n, this.contentHeight = i, this.scrollHeight = Math.max(n, i)
  17158. }
  17159. return e.prototype.equals = function (e) {
  17160. return this.width === e.width && this.contentWidth === e.contentWidth && this.height === e.height && this.contentHeight === e.contentHeight
  17161. }, e
  17162. }(), u = function (e) {
  17163. function t(t, i) {
  17164. var r = e.call(this) || this;
  17165. return r._onDidContentSizeChange = r._register(new n.Emitter), r.onDidContentSizeChange = r._onDidContentSizeChange.event, r._dimensions = new l(0, 0, 0, 0), r._scrollable = r._register(new o.Scrollable(t, i)), r.onDidScroll = r._scrollable.onScroll, r
  17166. }
  17167. return r(t, e), t.prototype.getScrollable = function () {
  17168. return this._scrollable
  17169. }, t.prototype.setSmoothScrollDuration = function (e) {
  17170. this._scrollable.setSmoothScrollDuration(e)
  17171. }, t.prototype.validateScrollPosition = function (e) {
  17172. return this._scrollable.validateScrollPosition(e)
  17173. }, t.prototype.getScrollDimensions = function () {
  17174. return this._dimensions
  17175. },
  17176. t.prototype.setScrollDimensions = function (e) {
  17177. if (!this._dimensions.equals(e)) {
  17178. var t = this._dimensions;
  17179. this._dimensions = e, this._scrollable.setScrollDimensions({
  17180. width: e.width,
  17181. scrollWidth: e.scrollWidth,
  17182. height: e.height,
  17183. scrollHeight: e.scrollHeight
  17184. });
  17185. var n = t.contentWidth !== e.contentWidth, i = t.contentHeight !== e.contentHeight;
  17186. (n || i) && this._onDidContentSizeChange.fire({
  17187. contentWidth: e.contentWidth,
  17188. contentHeight: e.contentHeight,
  17189. contentWidthChanged: n,
  17190. contentHeightChanged: i
  17191. })
  17192. }
  17193. }, t.prototype.getFutureScrollPosition = function () {
  17194. return this._scrollable.getFutureScrollPosition()
  17195. }, t.prototype.getCurrentScrollPosition = function () {
  17196. return this._scrollable.getCurrentScrollPosition()
  17197. }, t.prototype.setScrollPositionNow = function (e) {
  17198. this._scrollable.setScrollPositionNow(e)
  17199. }, t.prototype.setScrollPositionSmooth = function (e) {
  17200. this._scrollable.setScrollPositionSmooth(e)
  17201. }, t
  17202. }(i.Disposable), d = function (e) {
  17203. function t(t, n, i) {
  17204. var o = e.call(this) || this;
  17205. o._configuration = t;
  17206. var r = o._configuration.options, a = r.get(107)
  17207. ;
  17208. return o._linesLayout = new s.LinesLayout(n, r.get(49)), o._scrollable = o._register(new u(0, i)), o._configureSmoothScrollDuration(), o._scrollable.setScrollDimensions(new l(a.contentWidth, 0, a.height, 0)), o.onDidScroll = o._scrollable.onDidScroll, o.onDidContentSizeChange = o._scrollable.onDidContentSizeChange, o._updateHeight(), o
  17209. }
  17210. return r(t, e), t.prototype.dispose = function () {
  17211. e.prototype.dispose.call(this)
  17212. }, t.prototype.getScrollable = function () {
  17213. return this._scrollable.getScrollable()
  17214. }, t.prototype.onHeightMaybeChanged = function () {
  17215. this._updateHeight()
  17216. }, t.prototype._configureSmoothScrollDuration = function () {
  17217. this._scrollable.setSmoothScrollDuration(this._configuration.options.get(87) ? 125 : 0)
  17218. }, t.prototype.onConfigurationChanged = function (e) {
  17219. var t = this._configuration.options;
  17220. if (e.hasChanged(49) && this._linesLayout.setLineHeight(t.get(49)), e.hasChanged(107)) {
  17221. var n = t.get(107), i = n.contentWidth, o = n.height, r = this._scrollable.getScrollDimensions(),
  17222. s = r.scrollWidth
  17223. ;this._scrollable.setScrollDimensions(new l(i, r.contentWidth, o, this._getContentHeight(i, o, s)))
  17224. } else this._updateHeight();
  17225. e.hasChanged(87) && this._configureSmoothScrollDuration()
  17226. }, t.prototype.onFlushed = function (e) {
  17227. this._linesLayout.onFlushed(e)
  17228. }, t.prototype.onLinesDeleted = function (e, t) {
  17229. this._linesLayout.onLinesDeleted(e, t)
  17230. }, t.prototype.onLinesInserted = function (e, t) {
  17231. this._linesLayout.onLinesInserted(e, t)
  17232. }, t.prototype._getHorizontalScrollbarHeight = function (e, t) {
  17233. var n = this._configuration.options.get(78);
  17234. return 2 === n.horizontal ? 0 : e >= t ? 0 : n.horizontalScrollbarSize
  17235. }, t.prototype._getContentHeight = function (e, t, n) {
  17236. var i = this._configuration.options, o = this._linesLayout.getLinesTotalHeight();
  17237. return i.get(80) ? o += t - i.get(49) : o += this._getHorizontalScrollbarHeight(e, n), o
  17238. }, t.prototype._updateHeight = function () {
  17239. var e = this._scrollable.getScrollDimensions(), t = e.width, n = e.height, i = e.scrollWidth;
  17240. this._scrollable.setScrollDimensions(new l(t, e.contentWidth, n, this._getContentHeight(t, n, i)))
  17241. }, t.prototype.getCurrentViewport = function () {
  17242. var e = this._scrollable.getScrollDimensions(), t = this._scrollable.getCurrentScrollPosition();
  17243. return new a.Viewport(t.scrollTop, t.scrollLeft, e.width, e.height)
  17244. }, t.prototype.getFutureViewport = function () {
  17245. var e = this._scrollable.getScrollDimensions(), t = this._scrollable.getFutureScrollPosition();
  17246. return new a.Viewport(t.scrollTop, t.scrollLeft, e.width, e.height)
  17247. }, t.prototype._computeContentWidth = function (e) {
  17248. var t = this._configuration.options, n = t.get(108), i = t.get(34);
  17249. if (n.isViewportWrapping) {
  17250. var o = t.get(107), r = t.get(54);
  17251. return e > o.contentWidth + i.typicalHalfwidthCharacterWidth && r.enabled && "right" === r.side ? e + o.verticalScrollbarWidth : e
  17252. }
  17253. var s = t.get(79) * i.typicalHalfwidthCharacterWidth, a = this._linesLayout.getWhitespaceMinWidth();
  17254. return Math.max(e + s, a)
  17255. }, t.prototype.onMaxLineWidthChanged = function (e) {
  17256. var t = this._scrollable.getScrollDimensions();
  17257. this._scrollable.setScrollDimensions(new l(t.width, this._computeContentWidth(e), t.height, t.contentHeight)), this._updateHeight()
  17258. }, t.prototype.saveState = function () {
  17259. var e = this._scrollable.getFutureScrollPosition(), t = e.scrollTop,
  17260. n = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);
  17261. return {
  17262. scrollTop: t,
  17263. scrollTopWithoutViewZones: t - this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),
  17264. scrollLeft: e.scrollLeft
  17265. }
  17266. }, t.prototype.changeWhitespace = function (e) {
  17267. return this._linesLayout.changeWhitespace(e)
  17268. }, t.prototype.getVerticalOffsetForLineNumber = function (e) {
  17269. return this._linesLayout.getVerticalOffsetForLineNumber(e)
  17270. }, t.prototype.isAfterLines = function (e) {
  17271. return this._linesLayout.isAfterLines(e)
  17272. }, t.prototype.getLineNumberAtVerticalOffset = function (e) {
  17273. return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)
  17274. }, t.prototype.getWhitespaceAtVerticalOffset = function (e) {
  17275. return this._linesLayout.getWhitespaceAtVerticalOffset(e)
  17276. }, t.prototype.getLinesViewportData = function () {
  17277. var e = this.getCurrentViewport();
  17278. return this._linesLayout.getLinesViewportData(e.top, e.top + e.height)
  17279. }, t.prototype.getLinesViewportDataAtScrollTop = function (e) {
  17280. var t = this._scrollable.getScrollDimensions()
  17281. ;
  17282. return e + t.height > t.scrollHeight && (e = t.scrollHeight - t.height), e < 0 && (e = 0), this._linesLayout.getLinesViewportData(e, e + t.height)
  17283. }, t.prototype.getWhitespaceViewportData = function () {
  17284. var e = this.getCurrentViewport();
  17285. return this._linesLayout.getWhitespaceViewportData(e.top, e.top + e.height)
  17286. }, t.prototype.getWhitespaces = function () {
  17287. return this._linesLayout.getWhitespaces()
  17288. }, t.prototype.getContentWidth = function () {
  17289. return this._scrollable.getScrollDimensions().contentWidth
  17290. }, t.prototype.getScrollWidth = function () {
  17291. return this._scrollable.getScrollDimensions().scrollWidth
  17292. }, t.prototype.getContentHeight = function () {
  17293. return this._scrollable.getScrollDimensions().contentHeight
  17294. }, t.prototype.getScrollHeight = function () {
  17295. return this._scrollable.getScrollDimensions().scrollHeight
  17296. }, t.prototype.getCurrentScrollLeft = function () {
  17297. return this._scrollable.getCurrentScrollPosition().scrollLeft
  17298. }, t.prototype.getCurrentScrollTop = function () {
  17299. return this._scrollable.getCurrentScrollPosition().scrollTop
  17300. }, t.prototype.validateScrollPosition = function (e) {
  17301. return this._scrollable.validateScrollPosition(e)
  17302. }, t.prototype.setScrollPositionNow = function (e) {
  17303. this._scrollable.setScrollPositionNow(e)
  17304. }, t.prototype.setScrollPositionSmooth = function (e) {
  17305. this._scrollable.setScrollPositionSmooth(e)
  17306. }, t.prototype.deltaScrollNow = function (e, t) {
  17307. var n = this._scrollable.getCurrentScrollPosition();
  17308. this._scrollable.setScrollPositionNow({scrollLeft: n.scrollLeft + e, scrollTop: n.scrollTop + t})
  17309. }, t
  17310. }(i.Disposable);
  17311. t.ViewLayout = d
  17312. })),define(n[374], i([0, 1, 3]), (function (e, t, n) {
  17313. "use strict";
  17314. Object.defineProperty(t, "__esModule", {value: !0});
  17315. var i = function () {
  17316. function e(e, t) {
  17317. this._selection = e, this._isMovingLeft = t, this._cutStartIndex = -1, this._cutEndIndex = -1, this._moved = !1, this._selectionId = null
  17318. }
  17319. return e.prototype.getEditOperations = function (e, t) {
  17320. var i = this._selection;
  17321. if (this._selectionId = t.trackSelection(i), i.startLineNumber === i.endLineNumber && (!this._isMovingLeft || 0 !== i.startColumn) && (this._isMovingLeft || i.endColumn !== e.getLineMaxColumn(i.startLineNumber))) {
  17322. var o, r, s, a = i.selectionStartLineNumber, l = e.getLineContent(a);
  17323. this._isMovingLeft ? (o = l.substring(0, i.startColumn - 2), r = l.substring(i.startColumn - 1, i.endColumn - 1), s = l.substring(i.startColumn - 2, i.startColumn - 1) + l.substring(i.endColumn - 1)) : (o = l.substring(0, i.startColumn - 1) + l.substring(i.endColumn - 1, i.endColumn), r = l.substring(i.startColumn - 1, i.endColumn - 1), s = l.substring(i.endColumn));
  17324. var u = o + r + s;
  17325. t.addEditOperation(new n.Range(a, 1, a, e.getLineMaxColumn(a)), null), t.addEditOperation(new n.Range(a, 1, a, 1), u), this._cutStartIndex = i.startColumn + (this._isMovingLeft ? -1 : 1), this._cutEndIndex = this._cutStartIndex + i.endColumn - i.startColumn, this._moved = !0
  17326. }
  17327. }, e.prototype.computeCursorState = function (e, t) {
  17328. var n = t.getTrackedSelection(this._selectionId);
  17329. return this._moved && (n = (n = n.setStartPosition(n.startLineNumber, this._cutStartIndex)).setEndPosition(n.startLineNumber, this._cutEndIndex)), n
  17330. }, e
  17331. }();
  17332. t.MoveCaretCommand = i
  17333. })),define(n[111], i([0, 1, 5]), (function (e, t, n) {
  17334. "use strict";
  17335. Object.defineProperty(t, "__esModule", {value: !0})
  17336. ;var i = function () {
  17337. function e(e) {
  17338. this.value = e
  17339. }
  17340. return e.prototype.equals = function (e) {
  17341. return this.value === e.value
  17342. }, e.prototype.contains = function (t) {
  17343. return this.equals(t) || "" === this.value || n.startsWith(t.value, this.value + e.sep)
  17344. }, e.prototype.intersects = function (e) {
  17345. return this.contains(e) || e.contains(this)
  17346. }, e.prototype.append = function (t) {
  17347. return new e(this.value + e.sep + t)
  17348. }, e.sep = ".", e.None = new e("@@none@@"), e.Empty = new e(""), e.QuickFix = new e("quickfix"), e.Refactor = new e("refactor"), e.Source = new e("source"), e.SourceOrganizeImports = e.Source.append("organizeImports"), e.SourceFixAll = e.Source.append("fixAll"), e
  17349. }();
  17350. function o(e, t, n) {
  17351. return !!t.contains(e) && (!n || !t.contains(n))
  17352. }
  17353. t.CodeActionKind = i, t.mayIncludeActionsOfKind = function (e, t) {
  17354. return !(e.include && !e.include.intersects(t)) && ((!e.excludes || !e.excludes.some((function (n) {
  17355. return o(t, n, e.include)
  17356. }))) && !(!e.includeSourceActions && i.Source.contains(t)))
  17357. }, t.filtersAction = function (e, t) {
  17358. var n = t.kind ? new i(t.kind) : void 0
  17359. ;
  17360. return !!(!e.include || n && e.include.contains(n)) && (!(e.excludes && n && e.excludes.some((function (t) {
  17361. return o(n, t, e.include)
  17362. }))) && (!(!e.includeSourceActions && n && i.Source.contains(n)) && !(e.onlyIncludePreferredActions && !t.isPreferred)))
  17363. };
  17364. var r = function () {
  17365. function e(e, t, n) {
  17366. this.kind = e, this.apply = t, this.preferred = n
  17367. }
  17368. return e.fromUser = function (t, n) {
  17369. return t && "object" == typeof t ? new e(e.getKindFromUser(t, n.kind), e.getApplyFromUser(t, n.apply), e.getPreferredUser(t)) : new e(n.kind, n.apply, !1)
  17370. }, e.getApplyFromUser = function (e, t) {
  17371. switch ("string" == typeof e.apply ? e.apply.toLowerCase() : "") {
  17372. case"first":
  17373. return "first";
  17374. case"never":
  17375. return "never";
  17376. case"ifsingle":
  17377. return "ifSingle";
  17378. default:
  17379. return t
  17380. }
  17381. }, e.getKindFromUser = function (e, t) {
  17382. return "string" == typeof e.kind ? new i(e.kind) : t
  17383. }, e.getPreferredUser = function (e) {
  17384. return "boolean" == typeof e.preferred && e.preferred
  17385. }, e
  17386. }();
  17387. t.CodeActionCommandArgs = r
  17388. })),define(n[375], i([0, 1, 4]), (function (e, t, n) {
  17389. "use strict";
  17390. Object.defineProperty(t, "__esModule", {value: !0});
  17391. var i = function () {
  17392. function e(e, t, i) {
  17393. this.presentationIndex = i, this._onColorFlushed = new n.Emitter, this.onColorFlushed = this._onColorFlushed.event, this._onDidChangeColor = new n.Emitter, this.onDidChangeColor = this._onDidChangeColor.event, this._onDidChangePresentation = new n.Emitter, this.onDidChangePresentation = this._onDidChangePresentation.event, this.originalColor = e, this._color = e, this._colorPresentations = t
  17394. }
  17395. return Object.defineProperty(e.prototype, "color", {
  17396. get: function () {
  17397. return this._color
  17398. }, set: function (e) {
  17399. this._color.equals(e) || (this._color = e, this._onDidChangeColor.fire(e))
  17400. }, enumerable: !0, configurable: !0
  17401. }), Object.defineProperty(e.prototype, "presentation", {
  17402. get: function () {
  17403. return this.colorPresentations[this.presentationIndex]
  17404. }, enumerable: !0, configurable: !0
  17405. }), Object.defineProperty(e.prototype, "colorPresentations", {
  17406. get: function () {
  17407. return this._colorPresentations
  17408. }, set: function (e) {
  17409. this._colorPresentations = e, this.presentationIndex > e.length - 1 && (this.presentationIndex = 0), this._onDidChangePresentation.fire(this.presentation)
  17410. }, enumerable: !0, configurable: !0
  17411. }),
  17412. e.prototype.selectNextColorPresentation = function () {
  17413. this.presentationIndex = (this.presentationIndex + 1) % this.colorPresentations.length, this.flushColor(), this._onDidChangePresentation.fire(this.presentation)
  17414. }, e.prototype.guessColorPresentation = function (e, t) {
  17415. for (var n = 0; n < this.colorPresentations.length; n++) if (t === this.colorPresentations[n].label) {
  17416. this.presentationIndex = n, this._onDidChangePresentation.fire(this.presentation);
  17417. break
  17418. }
  17419. }, e.prototype.flushColor = function () {
  17420. this._onColorFlushed.fire(this._color)
  17421. }, e
  17422. }();
  17423. t.ColorPickerModel = i
  17424. })),define(n[196], i([0, 1, 58, 13, 3, 22, 41]), (function (e, t, n, i, o, r, s) {
  17425. "use strict";
  17426. Object.defineProperty(t, "__esModule", {value: !0});
  17427. var a = function () {
  17428. function e(e, t) {
  17429. this._selection = e, this._insertSpace = t, this._usedEndToken = null
  17430. }
  17431. return e._haystackHasNeedleAtOffset = function (e, t, n) {
  17432. if (n < 0) return !1;
  17433. var i = t.length;
  17434. if (n + i > e.length) return !1;
  17435. for (var o = 0; o < i; o++) {
  17436. var r = e.charCodeAt(n + o), s = t.charCodeAt(o);
  17437. if (r !== s && !(r >= 65 && r <= 90 && r + 32 === s || s >= 65 && s <= 90 && s + 32 === r)) return !1
  17438. }
  17439. return !0
  17440. },
  17441. e.prototype._createOperationsForBlockComment = function (t, n, i, r, s, a) {
  17442. var l, u = t.startLineNumber, d = t.startColumn, c = t.endLineNumber, h = t.endColumn,
  17443. p = s.getLineContent(u), g = s.getLineContent(c), f = p.lastIndexOf(n, d - 1 + n.length),
  17444. m = g.indexOf(i, h - 1 - i.length);
  17445. if (-1 !== f && -1 !== m) if (u === c) {
  17446. p.substring(f + n.length, m).indexOf(i) >= 0 && (f = -1, m = -1)
  17447. } else {
  17448. var v = p.substring(f + n.length), _ = g.substring(0, m);
  17449. (v.indexOf(i) >= 0 || _.indexOf(i) >= 0) && (f = -1, m = -1)
  17450. }
  17451. -1 !== f && -1 !== m ? (r && f + n.length < p.length && 32 === p.charCodeAt(f + n.length) && (n += " "), r && m > 0 && 32 === g.charCodeAt(m - 1) && (i = " " + i, m -= 1), l = e._createRemoveBlockCommentOperations(new o.Range(u, f + n.length + 1, c, m + 1), n, i)) : (l = e._createAddBlockCommentOperations(t, n, i, this._insertSpace), this._usedEndToken = 1 === l.length ? i : null);
  17452. for (var y = 0, C = l; y < C.length; y++) {
  17453. var b = C[y];
  17454. a.addTrackedEditOperation(b.range, b.text)
  17455. }
  17456. }, e._createRemoveBlockCommentOperations = function (e, t, i) {
  17457. var r = []
  17458. ;
  17459. return o.Range.isEmpty(e) ? r.push(n.EditOperation.delete(new o.Range(e.startLineNumber, e.startColumn - t.length, e.endLineNumber, e.endColumn + i.length))) : (r.push(n.EditOperation.delete(new o.Range(e.startLineNumber, e.startColumn - t.length, e.startLineNumber, e.startColumn))), r.push(n.EditOperation.delete(new o.Range(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn + i.length)))), r
  17460. }, e._createAddBlockCommentOperations = function (e, t, r, s) {
  17461. var a = [];
  17462. return o.Range.isEmpty(e) ? a.push(n.EditOperation.replace(new o.Range(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn), t + " " + r)) : (a.push(n.EditOperation.insert(new i.Position(e.startLineNumber, e.startColumn), t + (s ? " " : ""))), a.push(n.EditOperation.insert(new i.Position(e.endLineNumber, e.endColumn), (s ? " " : "") + r))), a
  17463. }, e.prototype.getEditOperations = function (e, t) {
  17464. var n = this._selection.startLineNumber, i = this._selection.startColumn;
  17465. e.tokenizeIfCheap(n);
  17466. var o = e.getLanguageIdAtPosition(n, i), r = s.LanguageConfigurationRegistry.getComments(o)
  17467. ;r && r.blockCommentStartToken && r.blockCommentEndToken && this._createOperationsForBlockComment(this._selection, r.blockCommentStartToken, r.blockCommentEndToken, this._insertSpace, e, t)
  17468. }, e.prototype.computeCursorState = function (e, t) {
  17469. var n = t.getInverseEditOperations();
  17470. if (2 === n.length) {
  17471. var i = n[0], o = n[1];
  17472. return new r.Selection(i.range.endLineNumber, i.range.endColumn, o.range.startLineNumber, o.range.startColumn)
  17473. }
  17474. var s = n[0].range, a = this._usedEndToken ? -this._usedEndToken.length - 1 : 0;
  17475. return new r.Selection(s.endLineNumber, s.endColumn + a, s.endLineNumber, s.endColumn + a)
  17476. }, e
  17477. }();
  17478. t.BlockCommentCommand = a
  17479. })),define(n[376], i([0, 1, 5, 58, 13, 3, 22, 41, 196]), (function (e, t, n, i, o, r, s, a, l) {
  17480. "use strict";
  17481. Object.defineProperty(t, "__esModule", {value: !0});
  17482. var u = function () {
  17483. function e(e, t, n, i) {
  17484. this._selection = e, this._tabSize = t, this._type = n, this._insertSpace = i, this._selectionId = null, this._deltaColumn = 0, this._moveEndPositionDown = !1
  17485. }
  17486. return e._gatherPreflightCommentStrings = function (e, t, n) {
  17487. e.tokenizeIfCheap(t)
  17488. ;var i = e.getLanguageIdAtPosition(t, 1), o = a.LanguageConfigurationRegistry.getComments(i),
  17489. r = o ? o.lineCommentToken : null;
  17490. if (!r) return null;
  17491. for (var s = [], l = 0, u = n - t + 1; l < u; l++) s[l] = {
  17492. ignore: !1,
  17493. commentStr: r,
  17494. commentStrOffset: 0,
  17495. commentStrLength: r.length
  17496. };
  17497. return s
  17498. }, e._analyzeLines = function (e, t, i, o, r) {
  17499. var s, a = !0;
  17500. s = 0 === e || 1 !== e;
  17501. for (var u = 0, d = o.length; u < d; u++) {
  17502. var c = o[u], h = r + u, p = i.getLineContent(h), g = n.firstNonWhitespaceIndex(p);
  17503. if (-1 !== g) {
  17504. if (a = !1, c.ignore = !1, c.commentStrOffset = g, s && !l.BlockCommentCommand._haystackHasNeedleAtOffset(p, c.commentStr, g) && (0 === e ? s = !1 : 1 === e || (c.ignore = !0)), s && t) {
  17505. var f = g + c.commentStrLength;
  17506. f < p.length && 32 === p.charCodeAt(f) && (c.commentStrLength += 1)
  17507. }
  17508. } else c.ignore = !0, c.commentStrOffset = p.length
  17509. }
  17510. if (0 === e && a) {
  17511. s = !1;
  17512. for (u = 0, d = o.length; u < d; u++) o[u].ignore = !1
  17513. }
  17514. return {supported: !0, shouldRemoveComments: s, lines: o}
  17515. }, e._gatherPreflightData = function (t, n, i, o, r) {
  17516. var s = e._gatherPreflightCommentStrings(i, o, r);
  17517. return null === s ? {supported: !1} : e._analyzeLines(t, n, i, s, o)
  17518. }, e.prototype._executeLineComments = function (t, n, i, r) {
  17519. var s;
  17520. i.shouldRemoveComments ? s = e._createRemoveLineCommentsOperations(i.lines, r.startLineNumber) : (e._normalizeInsertionPoint(t, i.lines, r.startLineNumber, this._tabSize), s = this._createAddLineCommentsOperations(i.lines, r.startLineNumber));
  17521. for (var a = new o.Position(r.positionLineNumber, r.positionColumn), l = 0, u = s.length; l < u; l++) {
  17522. if (n.addEditOperation(s[l].range, s[l].text), s[l].range.isEmpty() && s[l].range.getStartPosition().equals(a)) t.getLineContent(a.lineNumber).length + 1 === a.column && (this._deltaColumn = (s[l].text || "").length)
  17523. }
  17524. this._selectionId = n.trackSelection(r)
  17525. }, e.prototype._attemptRemoveBlockComment = function (e, t, n, i) {
  17526. var o = t.startLineNumber, s = t.endLineNumber,
  17527. a = i.length + Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber), t.startColumn),
  17528. u = e.getLineContent(o).lastIndexOf(n, a - 1),
  17529. d = e.getLineContent(s).indexOf(i, t.endColumn - 1 - n.length);
  17530. return -1 !== u && -1 === d && (d = e.getLineContent(o).indexOf(i, u + n.length), s = o), -1 === u && -1 !== d && (u = e.getLineContent(s).lastIndexOf(n, d), o = s),
  17531. !t.isEmpty() || -1 !== u && -1 !== d || -1 !== (u = e.getLineContent(o).indexOf(n)) && (d = e.getLineContent(o).indexOf(i, u + n.length)), -1 !== u && 32 === e.getLineContent(o).charCodeAt(u + n.length) && (n += " "), -1 !== d && 32 === e.getLineContent(s).charCodeAt(d - 1) && (i = " " + i, d -= 1), -1 !== u && -1 !== d ? l.BlockCommentCommand._createRemoveBlockCommentOperations(new r.Range(o, u + n.length + 1, s, d + 1), n, i) : null
  17532. }, e.prototype._executeBlockComment = function (e, t, i) {
  17533. e.tokenizeIfCheap(i.startLineNumber);
  17534. var o = e.getLanguageIdAtPosition(i.startLineNumber, 1),
  17535. s = a.LanguageConfigurationRegistry.getComments(o);
  17536. if (s && s.blockCommentStartToken && s.blockCommentEndToken) {
  17537. var u = s.blockCommentStartToken, d = s.blockCommentEndToken,
  17538. c = this._attemptRemoveBlockComment(e, i, u, d);
  17539. if (!c) {
  17540. if (i.isEmpty()) {
  17541. var h = e.getLineContent(i.startLineNumber), p = n.firstNonWhitespaceIndex(h);
  17542. -1 === p && (p = h.length), c = l.BlockCommentCommand._createAddBlockCommentOperations(new r.Range(i.startLineNumber, p + 1, i.startLineNumber, h.length + 1), u, d, this._insertSpace)
  17543. } else c = l.BlockCommentCommand._createAddBlockCommentOperations(new r.Range(i.startLineNumber, e.getLineFirstNonWhitespaceColumn(i.startLineNumber), i.endLineNumber, e.getLineMaxColumn(i.endLineNumber)), u, d, this._insertSpace);
  17544. 1 === c.length && (this._deltaColumn = u.length + 1)
  17545. }
  17546. this._selectionId = t.trackSelection(i);
  17547. for (var g = 0, f = c; g < f.length; g++) {
  17548. var m = f[g];
  17549. t.addEditOperation(m.range, m.text)
  17550. }
  17551. }
  17552. }, e.prototype.getEditOperations = function (t, n) {
  17553. var i = this._selection;
  17554. this._moveEndPositionDown = !1, i.startLineNumber < i.endLineNumber && 1 === i.endColumn && (this._moveEndPositionDown = !0, i = i.setEndPosition(i.endLineNumber - 1, t.getLineMaxColumn(i.endLineNumber - 1)));
  17555. var o = e._gatherPreflightData(this._type, this._insertSpace, t, i.startLineNumber, i.endLineNumber);
  17556. return o.supported ? this._executeLineComments(t, n, o, i) : this._executeBlockComment(t, n, i)
  17557. }, e.prototype.computeCursorState = function (e, t) {
  17558. var n = t.getTrackedSelection(this._selectionId);
  17559. return this._moveEndPositionDown && (n = n.setEndPosition(n.endLineNumber + 1, 1)),
  17560. new s.Selection(n.selectionStartLineNumber, n.selectionStartColumn + this._deltaColumn, n.positionLineNumber, n.positionColumn + this._deltaColumn)
  17561. }, e._createRemoveLineCommentsOperations = function (e, t) {
  17562. for (var n = [], o = 0, s = e.length; o < s; o++) {
  17563. var a = e[o];
  17564. a.ignore || n.push(i.EditOperation.delete(new r.Range(t + o, a.commentStrOffset + 1, t + o, a.commentStrOffset + a.commentStrLength + 1)))
  17565. }
  17566. return n
  17567. }, e.prototype._createAddLineCommentsOperations = function (e, t) {
  17568. for (var n = [], r = this._insertSpace ? " " : "", s = 0, a = e.length; s < a; s++) {
  17569. var l = e[s];
  17570. l.ignore || n.push(i.EditOperation.insert(new o.Position(t + s, l.commentStrOffset + 1), l.commentStr + r))
  17571. }
  17572. return n
  17573. }, e.nextVisibleColumn = function (e, t, n, i) {
  17574. return n ? e + (t - e % t) : e + i
  17575. }, e._normalizeInsertionPoint = function (t, n, i, o) {
  17576. for (var r, s, a = 1073741824, l = 0, u = n.length; l < u; l++) if (!n[l].ignore) {
  17577. for (var d = t.getLineContent(i + l), c = 0, h = 0, p = n[l].commentStrOffset; c < a && h < p; h++) c = e.nextVisibleColumn(c, o, 9 === d.charCodeAt(h), 1);
  17578. c < a && (a = c)
  17579. }
  17580. a = Math.floor(a / o) * o;
  17581. for (l = 0, u = n.length; l < u; l++) if (!n[l].ignore) {
  17582. d = t.getLineContent(i + l), c = 0
  17583. ;
  17584. for (r = 0, s = n[l].commentStrOffset; c < a && r < s; r++) c = e.nextVisibleColumn(c, o, 9 === d.charCodeAt(r), 1);
  17585. n[l].commentStrOffset = c > a ? r - 1 : r
  17586. }
  17587. }, e
  17588. }();
  17589. t.LineCommentCommand = u
  17590. })),define(n[377], i([0, 1, 22, 3]), (function (e, t, n, i) {
  17591. "use strict";
  17592. Object.defineProperty(t, "__esModule", {value: !0});
  17593. var o = function () {
  17594. function e(e, t, n) {
  17595. this.selection = e, this.targetPosition = t, this.copy = n, this.targetSelection = null
  17596. }
  17597. return e.prototype.getEditOperations = function (e, t) {
  17598. var o = e.getValueInRange(this.selection);
  17599. this.copy || t.addEditOperation(this.selection, null), t.addEditOperation(new i.Range(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column), o),
  17600. !this.selection.containsPosition(this.targetPosition) || this.copy && (this.selection.getEndPosition().equals(this.targetPosition) || this.selection.getStartPosition().equals(this.targetPosition)) ? this.copy ? this.targetSelection = new n.Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.selection.endLineNumber - this.selection.startLineNumber + this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.targetPosition.lineNumber > this.selection.endLineNumber ? this.targetSelection = new n.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.targetPosition.lineNumber < this.selection.endLineNumber ? this.targetSelection = new n.Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber + this.selection.endLineNumber - this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : this.selection.endColumn) : this.selection.endColumn <= this.targetPosition.column ? this.targetSelection = new n.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, (this.selection.startLineNumber,
  17601. this.selection.endLineNumber, this.targetPosition.column - this.selection.endColumn + this.selection.startColumn), this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? this.targetPosition.column : this.selection.endColumn) : this.targetSelection = new n.Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column + this.selection.endColumn - this.selection.startColumn) : this.targetSelection = this.selection
  17602. }, e.prototype.computeCursorState = function (e, t) {
  17603. return this.targetSelection
  17604. }, e
  17605. }();
  17606. t.DragAndDropCommand = o
  17607. })),define(n[378], i([0, 1, 4, 2, 3]), (function (e, t, n, i, o) {
  17608. "use strict";
  17609. function s(e, t) {
  17610. return 1 === e || 2 !== e && t
  17611. }
  17612. Object.defineProperty(t, "__esModule", {value: !0});
  17613. var a = function (e) {
  17614. function t() {
  17615. var t = e.call(this) || this;
  17616. return t._onFindReplaceStateChange = t._register(new n.Emitter), t.onFindReplaceStateChange = t._onFindReplaceStateChange.event, t._searchString = "",
  17617. t._replaceString = "", t._isRevealed = !1, t._isReplaceRevealed = !1, t._isRegex = !1, t._isRegexOverride = 0, t._wholeWord = !1, t._wholeWordOverride = 0, t._matchCase = !1, t._matchCaseOverride = 0, t._preserveCase = !1, t._preserveCaseOverride = 0, t._searchScope = null, t._matchesPosition = 0, t._matchesCount = 0, t._currentMatch = null, t
  17618. }
  17619. return r(t, e), Object.defineProperty(t.prototype, "searchString", {
  17620. get: function () {
  17621. return this._searchString
  17622. }, enumerable: !0, configurable: !0
  17623. }), Object.defineProperty(t.prototype, "replaceString", {
  17624. get: function () {
  17625. return this._replaceString
  17626. }, enumerable: !0, configurable: !0
  17627. }), Object.defineProperty(t.prototype, "isRevealed", {
  17628. get: function () {
  17629. return this._isRevealed
  17630. }, enumerable: !0, configurable: !0
  17631. }), Object.defineProperty(t.prototype, "isReplaceRevealed", {
  17632. get: function () {
  17633. return this._isReplaceRevealed
  17634. }, enumerable: !0, configurable: !0
  17635. }), Object.defineProperty(t.prototype, "isRegex", {
  17636. get: function () {
  17637. return s(this._isRegexOverride, this._isRegex)
  17638. }, enumerable: !0, configurable: !0
  17639. }), Object.defineProperty(t.prototype, "wholeWord", {
  17640. get: function () {
  17641. return s(this._wholeWordOverride, this._wholeWord)
  17642. }, enumerable: !0, configurable: !0
  17643. }), Object.defineProperty(t.prototype, "matchCase", {
  17644. get: function () {
  17645. return s(this._matchCaseOverride, this._matchCase)
  17646. }, enumerable: !0, configurable: !0
  17647. }), Object.defineProperty(t.prototype, "preserveCase", {
  17648. get: function () {
  17649. return s(this._preserveCaseOverride, this._preserveCase)
  17650. }, enumerable: !0, configurable: !0
  17651. }), Object.defineProperty(t.prototype, "actualIsRegex", {
  17652. get: function () {
  17653. return this._isRegex
  17654. }, enumerable: !0, configurable: !0
  17655. }), Object.defineProperty(t.prototype, "actualWholeWord", {
  17656. get: function () {
  17657. return this._wholeWord
  17658. }, enumerable: !0, configurable: !0
  17659. }), Object.defineProperty(t.prototype, "actualMatchCase", {
  17660. get: function () {
  17661. return this._matchCase
  17662. }, enumerable: !0, configurable: !0
  17663. }), Object.defineProperty(t.prototype, "actualPreserveCase", {
  17664. get: function () {
  17665. return this._preserveCase
  17666. }, enumerable: !0, configurable: !0
  17667. }), Object.defineProperty(t.prototype, "searchScope", {
  17668. get: function () {
  17669. return this._searchScope
  17670. }, enumerable: !0, configurable: !0
  17671. }),
  17672. Object.defineProperty(t.prototype, "matchesPosition", {
  17673. get: function () {
  17674. return this._matchesPosition
  17675. }, enumerable: !0, configurable: !0
  17676. }), Object.defineProperty(t.prototype, "matchesCount", {
  17677. get: function () {
  17678. return this._matchesCount
  17679. }, enumerable: !0, configurable: !0
  17680. }), Object.defineProperty(t.prototype, "currentMatch", {
  17681. get: function () {
  17682. return this._currentMatch
  17683. }, enumerable: !0, configurable: !0
  17684. }), t.prototype.changeMatchInfo = function (e, t, n) {
  17685. var i = {
  17686. moveCursor: !1,
  17687. updateHistory: !1,
  17688. searchString: !1,
  17689. replaceString: !1,
  17690. isRevealed: !1,
  17691. isReplaceRevealed: !1,
  17692. isRegex: !1,
  17693. wholeWord: !1,
  17694. matchCase: !1,
  17695. preserveCase: !1,
  17696. searchScope: !1,
  17697. matchesPosition: !1,
  17698. matchesCount: !1,
  17699. currentMatch: !1
  17700. }, r = !1;
  17701. 0 === t && (e = 0), e > t && (e = t), this._matchesPosition !== e && (this._matchesPosition = e, i.matchesPosition = !0, r = !0), this._matchesCount !== t && (this._matchesCount = t, i.matchesCount = !0, r = !0), void 0 !== n && (o.Range.equalsRange(this._currentMatch, n) || (this._currentMatch = n, i.currentMatch = !0, r = !0)), r && this._onFindReplaceStateChange.fire(i)
  17702. }, t.prototype.change = function (e, t, n) {
  17703. void 0 === n && (n = !0);
  17704. var i = {
  17705. moveCursor: t,
  17706. updateHistory: n,
  17707. searchString: !1,
  17708. replaceString: !1,
  17709. isRevealed: !1,
  17710. isReplaceRevealed: !1,
  17711. isRegex: !1,
  17712. wholeWord: !1,
  17713. matchCase: !1,
  17714. preserveCase: !1,
  17715. searchScope: !1,
  17716. matchesPosition: !1,
  17717. matchesCount: !1,
  17718. currentMatch: !1
  17719. }, r = !1, s = this.isRegex, a = this.wholeWord, l = this.matchCase, u = this.preserveCase;
  17720. void 0 !== e.searchString && this._searchString !== e.searchString && (this._searchString = e.searchString, i.searchString = !0, r = !0), void 0 !== e.replaceString && this._replaceString !== e.replaceString && (this._replaceString = e.replaceString, i.replaceString = !0, r = !0), void 0 !== e.isRevealed && this._isRevealed !== e.isRevealed && (this._isRevealed = e.isRevealed, i.isRevealed = !0, r = !0), void 0 !== e.isReplaceRevealed && this._isReplaceRevealed !== e.isReplaceRevealed && (this._isReplaceRevealed = e.isReplaceRevealed, i.isReplaceRevealed = !0, r = !0), void 0 !== e.isRegex && (this._isRegex = e.isRegex), void 0 !== e.wholeWord && (this._wholeWord = e.wholeWord), void 0 !== e.matchCase && (this._matchCase = e.matchCase),
  17721. void 0 !== e.preserveCase && (this._preserveCase = e.preserveCase), void 0 !== e.searchScope && (o.Range.equalsRange(this._searchScope, e.searchScope) || (this._searchScope = e.searchScope, i.searchScope = !0, r = !0)), this._isRegexOverride = void 0 !== e.isRegexOverride ? e.isRegexOverride : 0, this._wholeWordOverride = void 0 !== e.wholeWordOverride ? e.wholeWordOverride : 0, this._matchCaseOverride = void 0 !== e.matchCaseOverride ? e.matchCaseOverride : 0, this._preserveCaseOverride = void 0 !== e.preserveCaseOverride ? e.preserveCaseOverride : 0, s !== this.isRegex && (r = !0, i.isRegex = !0), a !== this.wholeWord && (r = !0, i.wholeWord = !0), l !== this.matchCase && (r = !0, i.matchCase = !0), u !== this.preserveCase && (r = !0, i.preserveCase = !0), r && this._onFindReplaceStateChange.fire(i)
  17722. }, t
  17723. }(i.Disposable);
  17724. t.FindReplaceState = a
  17725. })),define(n[379], i([0, 1, 3]), (function (e, t, n) {
  17726. "use strict";
  17727. Object.defineProperty(t, "__esModule", {value: !0});
  17728. var i = function () {
  17729. function e(e, t, n) {
  17730. this._editorSelection = e, this._ranges = t, this._replaceStrings = n, this._trackedEditorSelectionId = null
  17731. }
  17732. return e.prototype.getEditOperations = function (e, t) {
  17733. if (this._ranges.length > 0) {
  17734. for (var i = [], o = 0; o < this._ranges.length; o++) i.push({
  17735. range: this._ranges[o],
  17736. text: this._replaceStrings[o]
  17737. });
  17738. i.sort((function (e, t) {
  17739. return n.Range.compareRangesUsingStarts(e.range, t.range)
  17740. }));
  17741. var r = [], s = i[0];
  17742. for (o = 1; o < i.length; o++) s.range.endLineNumber === i[o].range.startLineNumber && s.range.endColumn === i[o].range.startColumn ? (s.range = s.range.plusRange(i[o].range), s.text = s.text + i[o].text) : (r.push(s), s = i[o]);
  17743. r.push(s);
  17744. for (var a = 0, l = r; a < l.length; a++) {
  17745. var u = l[a];
  17746. t.addEditOperation(u.range, u.text)
  17747. }
  17748. }
  17749. this._trackedEditorSelectionId = t.trackSelection(this._editorSelection)
  17750. }, e.prototype.computeCursorState = function (e, t) {
  17751. return t.getTrackedSelection(this._trackedEditorSelectionId)
  17752. }, e
  17753. }();
  17754. t.ReplaceAllCommand = i
  17755. })),define(n[380], i([0, 1, 247]), (function (e, t, n) {
  17756. "use strict";
  17757. Object.defineProperty(t, "__esModule", {value: !0});
  17758. var i = function (e) {
  17759. this.staticValue = e, this.kind = 0
  17760. }, o = function (e) {
  17761. this.pieces = e, this.kind = 1
  17762. }, r = function () {
  17763. function e(e) {
  17764. e && 0 !== e.length ? 1 === e.length && null !== e[0].staticValue ? this._state = new i(e[0].staticValue) : this._state = new o(e) : this._state = new i("")
  17765. }
  17766. return e.fromStaticValue = function (t) {
  17767. return new e([s.staticValue(t)])
  17768. }, Object.defineProperty(e.prototype, "hasReplacementPatterns", {
  17769. get: function () {
  17770. return 1 === this._state.kind
  17771. }, enumerable: !0, configurable: !0
  17772. }), e.prototype.buildReplaceString = function (t, i) {
  17773. if (0 === this._state.kind) return i ? n.buildReplaceStringWithCasePreserved(t, this._state.staticValue) : this._state.staticValue;
  17774. for (var o = "", r = 0, s = this._state.pieces.length; r < s; r++) {
  17775. var a = this._state.pieces[r];
  17776. null === a.staticValue ? o += e._substitute(a.matchIndex, t) : o += a.staticValue
  17777. }
  17778. return o
  17779. }, e._substitute = function (e, t) {
  17780. if (null === t) return "";
  17781. if (0 === e) return t[0];
  17782. for (var n = ""; e > 0;) {
  17783. if (e < t.length) return (t[e] || "") + n;
  17784. n = String(e % 10) + n, e = Math.floor(e / 10)
  17785. }
  17786. return "$" + n
  17787. }, e
  17788. }();
  17789. t.ReplacePattern = r;
  17790. var s = function () {
  17791. function e(e, t) {
  17792. this.staticValue = e, this.matchIndex = t
  17793. }
  17794. return e.staticValue = function (t) {
  17795. return new e(t, -1)
  17796. }, e.matchIndex = function (t) {
  17797. return new e(null, t)
  17798. }, e
  17799. }();
  17800. t.ReplacePiece = s;
  17801. var a = function () {
  17802. function e(e) {
  17803. this._source = e, this._lastCharIndex = 0, this._result = [], this._resultLen = 0, this._currentStaticPiece = ""
  17804. }
  17805. return e.prototype.emitUnchanged = function (e) {
  17806. this._emitStatic(this._source.substring(this._lastCharIndex, e)), this._lastCharIndex = e
  17807. }, e.prototype.emitStatic = function (e, t) {
  17808. this._emitStatic(e), this._lastCharIndex = t
  17809. }, e.prototype._emitStatic = function (e) {
  17810. 0 !== e.length && (this._currentStaticPiece += e)
  17811. }, e.prototype.emitMatchIndex = function (e, t) {
  17812. 0 !== this._currentStaticPiece.length && (this._result[this._resultLen++] = s.staticValue(this._currentStaticPiece), this._currentStaticPiece = ""), this._result[this._resultLen++] = s.matchIndex(e), this._lastCharIndex = t
  17813. }, e.prototype.finalize = function () {
  17814. return this.emitUnchanged(this._source.length), 0 !== this._currentStaticPiece.length && (this._result[this._resultLen++] = s.staticValue(this._currentStaticPiece), this._currentStaticPiece = ""), new r(this._result)
  17815. }, e
  17816. }();
  17817. t.parseReplaceString = function (e) {
  17818. if (!e || 0 === e.length) return new r(null);
  17819. for (var t = new a(e), n = 0, i = e.length; n < i; n++) {
  17820. var o = e.charCodeAt(n);
  17821. if (92 !== o) {
  17822. if (36 === o) {
  17823. if (++n >= i) break;
  17824. if (36 === (u = e.charCodeAt(n))) {
  17825. t.emitUnchanged(n - 1), t.emitStatic("$", n + 1);
  17826. continue
  17827. }
  17828. if (48 === u || 38 === u) {
  17829. t.emitUnchanged(n - 1), t.emitMatchIndex(0, n + 1);
  17830. continue
  17831. }
  17832. if (49 <= u && u <= 57) {
  17833. var s = u - 48;
  17834. if (n + 1 < i) {
  17835. var l = e.charCodeAt(n + 1);
  17836. if (48 <= l && l <= 57) {
  17837. n++, s = 10 * s + (l - 48), t.emitUnchanged(n - 2), t.emitMatchIndex(s, n + 1);
  17838. continue
  17839. }
  17840. }
  17841. t.emitUnchanged(n - 1), t.emitMatchIndex(s, n + 1);
  17842. continue
  17843. }
  17844. }
  17845. } else {
  17846. if (++n >= i) break;
  17847. var u;
  17848. switch (u = e.charCodeAt(n)) {
  17849. case 92:
  17850. t.emitUnchanged(n - 1), t.emitStatic("\\", n + 1);
  17851. break;
  17852. case 110:
  17853. t.emitUnchanged(n - 1), t.emitStatic("\n", n + 1);
  17854. break;
  17855. case 116:
  17856. t.emitUnchanged(n - 1), t.emitStatic("\t", n + 1)
  17857. }
  17858. }
  17859. }
  17860. return t.finalize()
  17861. }
  17862. })),define(n[150], i([0, 1]), (function (e, t) {
  17863. "use strict";
  17864. Object.defineProperty(t, "__esModule", {value: !0}), t.MAX_FOLDING_REGIONS = 65535, t.MAX_LINE_NUMBER = 16777215;
  17865. var n = function () {
  17866. function e(e, n, i) {
  17867. if (e.length !== n.length || e.length > t.MAX_FOLDING_REGIONS) throw new Error("invalid startIndexes or endIndexes size");
  17868. this._startIndexes = e, this._endIndexes = n, this._collapseStates = new Uint32Array(Math.ceil(e.length / 32)), this._types = i, this._parentsComputed = !1
  17869. }
  17870. return e.prototype.ensureParentIndices = function () {
  17871. var e = this;
  17872. if (!this._parentsComputed) {
  17873. this._parentsComputed = !0;
  17874. for (var n = [], i = function (t, i) {
  17875. var o = n[n.length - 1];
  17876. return e.getStartLineNumber(o) <= t && e.getEndLineNumber(o) >= i
  17877. }, o = 0, r = this._startIndexes.length; o < r; o++) {
  17878. var s = this._startIndexes[o], a = this._endIndexes[o];
  17879. if (s > t.MAX_LINE_NUMBER || a > t.MAX_LINE_NUMBER) throw new Error("startLineNumber or endLineNumber must not exceed " + t.MAX_LINE_NUMBER);
  17880. for (; n.length > 0 && !i(s, a);) n.pop();
  17881. var l = n.length > 0 ? n[n.length - 1] : -1;
  17882. n.push(o), this._startIndexes[o] = s + ((255 & l) << 24), this._endIndexes[o] = a + ((65280 & l) << 16)
  17883. }
  17884. }
  17885. }, Object.defineProperty(e.prototype, "length", {
  17886. get: function () {
  17887. return this._startIndexes.length
  17888. }, enumerable: !0, configurable: !0
  17889. }), e.prototype.getStartLineNumber = function (e) {
  17890. return this._startIndexes[e] & t.MAX_LINE_NUMBER
  17891. }, e.prototype.getEndLineNumber = function (e) {
  17892. return this._endIndexes[e] & t.MAX_LINE_NUMBER
  17893. }, e.prototype.getType = function (e) {
  17894. return this._types ? this._types[e] : void 0
  17895. }, e.prototype.hasTypes = function () {
  17896. return !!this._types
  17897. }, e.prototype.isCollapsed = function (e) {
  17898. var t = e / 32 | 0, n = e % 32;
  17899. return 0 != (this._collapseStates[t] & 1 << n)
  17900. }, e.prototype.setCollapsed = function (e, t) {
  17901. var n = e / 32 | 0, i = e % 32, o = this._collapseStates[n];
  17902. this._collapseStates[n] = t ? o | 1 << i : o & ~(1 << i)
  17903. }, e.prototype.toRegion = function (e) {
  17904. return new i(this, e)
  17905. }, e.prototype.getParentIndex = function (e) {
  17906. this.ensureParentIndices();
  17907. var n = ((4278190080 & this._startIndexes[e]) >>> 24) + ((4278190080 & this._endIndexes[e]) >>> 16);
  17908. return n === t.MAX_FOLDING_REGIONS ? -1 : n
  17909. }, e.prototype.contains = function (e, t) {
  17910. return this.getStartLineNumber(e) <= t && this.getEndLineNumber(e) >= t
  17911. }, e.prototype.findIndex = function (e) {
  17912. var t = 0, n = this._startIndexes.length;
  17913. if (0 === n) return -1;
  17914. for (; t < n;) {
  17915. var i = Math.floor((t + n) / 2);
  17916. e < this.getStartLineNumber(i) ? n = i : t = i + 1
  17917. }
  17918. return t - 1
  17919. },
  17920. e.prototype.findRange = function (e) {
  17921. var t = this.findIndex(e);
  17922. if (t >= 0) {
  17923. if (this.getEndLineNumber(t) >= e) return t;
  17924. for (t = this.getParentIndex(t); -1 !== t;) {
  17925. if (this.contains(t, e)) return t;
  17926. t = this.getParentIndex(t)
  17927. }
  17928. }
  17929. return -1
  17930. }, e.prototype.toString = function () {
  17931. for (var e = [], t = 0; t < this.length; t++) e[t] = "[" + (this.isCollapsed(t) ? "+" : "-") + "] " + this.getStartLineNumber(t) + "/" + this.getEndLineNumber(t);
  17932. return e.join(", ")
  17933. }, e
  17934. }();
  17935. t.FoldingRegions = n;
  17936. var i = function () {
  17937. function e(e, t) {
  17938. this.ranges = e, this.index = t
  17939. }
  17940. return Object.defineProperty(e.prototype, "startLineNumber", {
  17941. get: function () {
  17942. return this.ranges.getStartLineNumber(this.index)
  17943. }, enumerable: !0, configurable: !0
  17944. }), Object.defineProperty(e.prototype, "endLineNumber", {
  17945. get: function () {
  17946. return this.ranges.getEndLineNumber(this.index)
  17947. }, enumerable: !0, configurable: !0
  17948. }), Object.defineProperty(e.prototype, "regionIndex", {
  17949. get: function () {
  17950. return this.index
  17951. }, enumerable: !0, configurable: !0
  17952. }), Object.defineProperty(e.prototype, "parentIndex", {
  17953. get: function () {
  17954. return this.ranges.getParentIndex(this.index)
  17955. },
  17956. enumerable: !0, configurable: !0
  17957. }), Object.defineProperty(e.prototype, "isCollapsed", {
  17958. get: function () {
  17959. return this.ranges.isCollapsed(this.index)
  17960. }, enumerable: !0, configurable: !0
  17961. }), e.prototype.containedBy = function (e) {
  17962. return e.startLineNumber <= this.startLineNumber && e.endLineNumber >= this.endLineNumber
  17963. }, e.prototype.containsLine = function (e) {
  17964. return this.startLineNumber <= e && e <= this.endLineNumber
  17965. }, e
  17966. }();
  17967. t.FoldingRegion = i
  17968. })),define(n[381], i([0, 1, 4, 150]), (function (e, t, n, i) {
  17969. "use strict";
  17970. Object.defineProperty(t, "__esModule", {value: !0});
  17971. var o = function () {
  17972. function e(e, t) {
  17973. this._updateEventEmitter = new n.Emitter, this.onDidChange = this._updateEventEmitter.event, this._textModel = e, this._decorationProvider = t, this._regions = new i.FoldingRegions(new Uint32Array(0), new Uint32Array(0)), this._editorDecorationIds = [], this._isInitialized = !1
  17974. }
  17975. return Object.defineProperty(e.prototype, "regions", {
  17976. get: function () {
  17977. return this._regions
  17978. }, enumerable: !0, configurable: !0
  17979. }), Object.defineProperty(e.prototype, "textModel", {
  17980. get: function () {
  17981. return this._textModel
  17982. },
  17983. enumerable: !0, configurable: !0
  17984. }), Object.defineProperty(e.prototype, "isInitialized", {
  17985. get: function () {
  17986. return this._isInitialized
  17987. }, enumerable: !0, configurable: !0
  17988. }), e.prototype.toggleCollapseState = function (e) {
  17989. var t = this;
  17990. if (e.length) {
  17991. var n = {};
  17992. this._decorationProvider.changeDecorations((function (i) {
  17993. for (var o = 0, r = e; o < r.length; o++) {
  17994. var s = r[o].regionIndex, a = t._editorDecorationIds[s];
  17995. if (a && !n[a]) {
  17996. n[a] = !0;
  17997. var l = !t._regions.isCollapsed(s);
  17998. t._regions.setCollapsed(s, l), i.changeDecorationOptions(a, t._decorationProvider.getDecorationOption(l))
  17999. }
  18000. }
  18001. })), this._updateEventEmitter.fire({model: this, collapseStateChanged: e})
  18002. }
  18003. }, e.prototype.update = function (e, t) {
  18004. var n = this;
  18005. void 0 === t && (t = []);
  18006. for (var i = [], o = function (o, r) {
  18007. var s = e.getStartLineNumber(o);
  18008. r && function (e, n) {
  18009. for (var i = 0, o = t; i < o.length; i++) {
  18010. var r = o[i];
  18011. if (e < r && r <= n) return !0
  18012. }
  18013. return !1
  18014. }(s, e.getEndLineNumber(o)) && (r = !1), e.setCollapsed(o, r);
  18015. var a = n._textModel.getLineMaxColumn(s),
  18016. l = {startLineNumber: s, startColumn: a, endLineNumber: s, endColumn: a};
  18017. i.push({
  18018. range: l,
  18019. options: n._decorationProvider.getDecorationOption(r)
  18020. })
  18021. }, r = 0, s = function () {
  18022. for (; r < n._regions.length;) {
  18023. var e = n._regions.isCollapsed(r);
  18024. if (r++, e) return r - 1
  18025. }
  18026. return -1
  18027. }, a = 0, l = s(); -1 !== l && a < e.length;) {
  18028. var u = this._textModel.getDecorationRange(this._editorDecorationIds[l]);
  18029. if (u) {
  18030. var d = u.startLineNumber;
  18031. if (this._textModel.getLineMaxColumn(d) === u.startColumn) for (; a < e.length;) {
  18032. var c = e.getStartLineNumber(a);
  18033. if (!(d >= c)) break;
  18034. o(a, d === c), a++
  18035. }
  18036. }
  18037. l = s()
  18038. }
  18039. for (; a < e.length;) o(a, !1), a++;
  18040. this._editorDecorationIds = this._decorationProvider.deltaDecorations(this._editorDecorationIds, i), this._regions = e, this._isInitialized = !0, this._updateEventEmitter.fire({model: this})
  18041. }, e.prototype.getMemento = function () {
  18042. for (var e = [], t = 0; t < this._regions.length; t++) if (this._regions.isCollapsed(t)) {
  18043. var n = this._textModel.getDecorationRange(this._editorDecorationIds[t]);
  18044. if (n) {
  18045. var i = n.startLineNumber,
  18046. o = n.endLineNumber + this._regions.getEndLineNumber(t) - this._regions.getStartLineNumber(t);
  18047. e.push({startLineNumber: i, endLineNumber: o})
  18048. }
  18049. }
  18050. if (e.length > 0) return e
  18051. },
  18052. e.prototype.applyMemento = function (e) {
  18053. if (Array.isArray(e)) {
  18054. for (var t = [], n = 0, i = e; n < i.length; n++) {
  18055. var o = i[n], r = this.getRegionAtLine(o.startLineNumber);
  18056. r && !r.isCollapsed && t.push(r)
  18057. }
  18058. this.toggleCollapseState(t)
  18059. }
  18060. }, e.prototype.dispose = function () {
  18061. this._decorationProvider.deltaDecorations(this._editorDecorationIds, [])
  18062. }, e.prototype.getAllRegionsAtLine = function (e, t) {
  18063. var n = [];
  18064. if (this._regions) for (var i = this._regions.findRange(e), o = 1; i >= 0;) {
  18065. var r = this._regions.toRegion(i);
  18066. t && !t(r, o) || n.push(r), o++, i = r.parentIndex
  18067. }
  18068. return n
  18069. }, e.prototype.getRegionAtLine = function (e) {
  18070. if (this._regions) {
  18071. var t = this._regions.findRange(e);
  18072. if (t >= 0) return this._regions.toRegion(t)
  18073. }
  18074. return null
  18075. }, e.prototype.getRegionsInside = function (e, t) {
  18076. var n = [], i = e ? e.regionIndex + 1 : 0, o = e ? e.endLineNumber : Number.MAX_VALUE;
  18077. if (t && 2 === t.length) for (var r = [], s = i, a = this._regions.length; s < a; s++) {
  18078. var l = this._regions.toRegion(s);
  18079. if (!(this._regions.getStartLineNumber(s) < o)) break;
  18080. for (; r.length > 0 && !l.containedBy(r[r.length - 1]);) r.pop();
  18081. r.push(l), t(l, r.length) && n.push(l)
  18082. } else for (s = i, a = this._regions.length; s < a; s++) {
  18083. l = this._regions.toRegion(s);
  18084. if (!(this._regions.getStartLineNumber(s) < o)) break;
  18085. t && !t(l) || n.push(l)
  18086. }
  18087. return n
  18088. }, e
  18089. }();
  18090. t.FoldingModel = o, t.toggleCollapseState = function (e, t, n) {
  18091. for (var i = [], o = function (n) {
  18092. var o = e.getRegionAtLine(n);
  18093. if (o) {
  18094. var r = !o.isCollapsed;
  18095. if (i.push(o), t > 1) {
  18096. var s = e.getRegionsInside(o, (function (e, n) {
  18097. return e.isCollapsed !== r && n < t
  18098. }));
  18099. i.push.apply(i, s)
  18100. }
  18101. }
  18102. }, r = 0, s = n; r < s.length; r++) {
  18103. o(s[r])
  18104. }
  18105. e.toggleCollapseState(i)
  18106. }, t.setCollapseStateLevelsDown = function (e, t, n, i) {
  18107. void 0 === n && (n = Number.MAX_VALUE);
  18108. var o = [];
  18109. if (i && i.length > 0) for (var r = 0, s = i; r < s.length; r++) {
  18110. var a = s[r], l = e.getRegionAtLine(a);
  18111. if (l && (l.isCollapsed !== t && o.push(l), n > 1)) {
  18112. var u = e.getRegionsInside(l, (function (e, i) {
  18113. return e.isCollapsed !== t && i < n
  18114. }));
  18115. o.push.apply(o, u)
  18116. }
  18117. } else {
  18118. u = e.getRegionsInside(null, (function (e, i) {
  18119. return e.isCollapsed !== t && i < n
  18120. }));
  18121. o.push.apply(o, u)
  18122. }
  18123. e.toggleCollapseState(o)
  18124. }, t.setCollapseStateLevelsUp = function (e, t, n, i) {
  18125. for (var o = [], r = 0, s = i; r < s.length; r++) {
  18126. var a = s[r], l = e.getAllRegionsAtLine(a, (function (e, i) {
  18127. return e.isCollapsed !== t && i <= n
  18128. }));
  18129. o.push.apply(o, l)
  18130. }
  18131. e.toggleCollapseState(o)
  18132. }, t.setCollapseStateUp = function (e, t, n) {
  18133. for (var i = [], o = 0, r = n; o < r.length; o++) {
  18134. var s = r[o], a = e.getAllRegionsAtLine(s, (function (e) {
  18135. return e.isCollapsed !== t
  18136. }));
  18137. a.length > 0 && i.push(a[0])
  18138. }
  18139. e.toggleCollapseState(i)
  18140. }, t.setCollapseStateAtLevel = function (e, t, n, i) {
  18141. var o = e.getRegionsInside(null, (function (e, o) {
  18142. return o === t && e.isCollapsed !== n && !i.some((function (t) {
  18143. return e.containsLine(t)
  18144. }))
  18145. }));
  18146. e.toggleCollapseState(o)
  18147. }, t.setCollapseStateForMatchingLines = function (e, t, n) {
  18148. for (var i = e.textModel, o = e.regions, r = [], s = o.length - 1; s >= 0; s--) if (n !== o.isCollapsed(s)) {
  18149. var a = o.getStartLineNumber(s);
  18150. t.test(i.getLineContent(a)) && r.push(o.toRegion(s))
  18151. }
  18152. e.toggleCollapseState(r)
  18153. }, t.setCollapseStateForType = function (e, t, n) {
  18154. for (var i = e.regions, o = [], r = i.length - 1; r >= 0; r--) n !== i.isCollapsed(r) && t === i.getType(r) && o.push(i.toRegion(r));
  18155. e.toggleCollapseState(o)
  18156. }
  18157. })),define(n[382], i([0, 1, 4, 3, 19]), (function (e, t, n, i, o) {
  18158. "use strict"
  18159. ;Object.defineProperty(t, "__esModule", {value: !0});
  18160. var r = function () {
  18161. function e(e) {
  18162. var t = this;
  18163. this._updateEventEmitter = new n.Emitter, this._foldingModel = e, this._foldingModelListener = e.onDidChange((function (e) {
  18164. return t.updateHiddenRanges()
  18165. })), this._hiddenRanges = [], e.regions.length && this.updateHiddenRanges()
  18166. }
  18167. return Object.defineProperty(e.prototype, "onDidChange", {
  18168. get: function () {
  18169. return this._updateEventEmitter.event
  18170. }, enumerable: !0, configurable: !0
  18171. }), Object.defineProperty(e.prototype, "hiddenRanges", {
  18172. get: function () {
  18173. return this._hiddenRanges
  18174. }, enumerable: !0, configurable: !0
  18175. }), e.prototype.updateHiddenRanges = function () {
  18176. for (var e = !1, t = [], n = 0, o = 0, r = Number.MAX_VALUE, s = -1, a = this._foldingModel.regions; n < a.length; n++) if (a.isCollapsed(n)) {
  18177. var l = a.getStartLineNumber(n) + 1, u = a.getEndLineNumber(n);
  18178. r <= l && u <= s || (!e && o < this._hiddenRanges.length && this._hiddenRanges[o].startLineNumber === l && this._hiddenRanges[o].endLineNumber === u ? (t.push(this._hiddenRanges[o]), o++) : (e = !0, t.push(new i.Range(l, 1, u, 1))), r = l, s = u)
  18179. }
  18180. (e || o < this._hiddenRanges.length) && this.applyHiddenRanges(t)
  18181. }, e.prototype.applyMemento = function (e) {
  18182. if (!Array.isArray(e) || 0 === e.length) return !1;
  18183. for (var t = [], n = 0, o = e; n < o.length; n++) {
  18184. var r = o[n];
  18185. if (!r.startLineNumber || !r.endLineNumber) return !1;
  18186. t.push(new i.Range(r.startLineNumber + 1, 1, r.endLineNumber, 1))
  18187. }
  18188. return this.applyHiddenRanges(t), !0
  18189. }, e.prototype.getMemento = function () {
  18190. return this._hiddenRanges.map((function (e) {
  18191. return {startLineNumber: e.startLineNumber - 1, endLineNumber: e.endLineNumber}
  18192. }))
  18193. }, e.prototype.applyHiddenRanges = function (e) {
  18194. this._hiddenRanges = e, this._updateEventEmitter.fire(e)
  18195. }, e.prototype.hasRanges = function () {
  18196. return this._hiddenRanges.length > 0
  18197. }, e.prototype.isHidden = function (e) {
  18198. return null !== s(this._hiddenRanges, e)
  18199. }, e.prototype.adjustSelections = function (e) {
  18200. for (var t = this, n = !1, i = this._foldingModel.textModel, o = null, r = function (e) {
  18201. return o && function (e, t) {
  18202. return e >= t.startLineNumber && e <= t.endLineNumber
  18203. }(e, o) || (o = s(t._hiddenRanges, e)), o ? o.startLineNumber - 1 : null
  18204. }, a = 0, l = e.length; a < l; a++) {
  18205. var u = e[a], d = r(u.startLineNumber);
  18206. d && (u = u.setStartPosition(d, i.getLineMaxColumn(d)), n = !0);
  18207. var c = r(u.endLineNumber);
  18208. c && (u = u.setEndPosition(c, i.getLineMaxColumn(c)), n = !0), e[a] = u
  18209. }
  18210. return n
  18211. }, e.prototype.dispose = function () {
  18212. this.hiddenRanges.length > 0 && (this._hiddenRanges = [], this._updateEventEmitter.fire(this._hiddenRanges)), this._foldingModelListener && (this._foldingModelListener.dispose(), this._foldingModelListener = null)
  18213. }, e
  18214. }();
  18215. function s(e, t) {
  18216. var n = o.findFirstInSorted(e, (function (e) {
  18217. return t < e.startLineNumber
  18218. })) - 1;
  18219. return n >= 0 && e[n].endLineNumber >= t ? e[n] : null
  18220. }
  18221. t.HiddenRangeModel = r
  18222. })),define(n[197], i([0, 1, 10, 150]), (function (e, t, n, i) {
  18223. "use strict";
  18224. Object.defineProperty(t, "__esModule", {value: !0});
  18225. var o = 5e3, r = {};
  18226. t.ID_SYNTAX_PROVIDER = "syntax";
  18227. var s = function () {
  18228. function e(e, n, i) {
  18229. void 0 === i && (i = o), this.editorModel = e, this.providers = n, this.limit = i, this.id = t.ID_SYNTAX_PROVIDER
  18230. }
  18231. return e.prototype.compute = function (e) {
  18232. var t = this;
  18233. return function (e, t, i) {
  18234. var o = null, s = e.map((function (e, s) {
  18235. return Promise.resolve(e.provideFoldingRanges(t, r, i)).then((function (e) {
  18236. if (!i.isCancellationRequested && Array.isArray(e)) {
  18237. Array.isArray(o) || (o = []);
  18238. for (var n = t.getLineCount(), r = 0, a = e; r < a.length; r++) {
  18239. var l = a[r];
  18240. l.start > 0 && l.end > l.start && l.end <= n && o.push({
  18241. start: l.start,
  18242. end: l.end,
  18243. rank: s,
  18244. kind: l.kind
  18245. })
  18246. }
  18247. }
  18248. }), n.onUnexpectedExternalError)
  18249. }));
  18250. return Promise.all(s).then((function (e) {
  18251. return o
  18252. }))
  18253. }(this.providers, this.editorModel, e).then((function (e) {
  18254. return e ? l(e, t.limit) : null
  18255. }))
  18256. }, e.prototype.dispose = function () {
  18257. }, e
  18258. }();
  18259. t.SyntaxRangeProvider = s;
  18260. var a = function () {
  18261. function e(e) {
  18262. this._startIndexes = [], this._endIndexes = [], this._nestingLevels = [], this._nestingLevelCounts = [], this._types = [], this._length = 0, this._foldingRangesLimit = e
  18263. }
  18264. return e.prototype.add = function (e, t, n, o) {
  18265. if (!(e > i.MAX_LINE_NUMBER || t > i.MAX_LINE_NUMBER)) {
  18266. var r = this._length;
  18267. this._startIndexes[r] = e, this._endIndexes[r] = t, this._nestingLevels[r] = o, this._types[r] = n, this._length++, o < 30 && (this._nestingLevelCounts[o] = (this._nestingLevelCounts[o] || 0) + 1)
  18268. }
  18269. },
  18270. e.prototype.toIndentRanges = function () {
  18271. if (this._length <= this._foldingRangesLimit) {
  18272. for (var e = new Uint32Array(this._length), t = new Uint32Array(this._length), n = 0; n < this._length; n++) e[n] = this._startIndexes[n], t[n] = this._endIndexes[n];
  18273. return new i.FoldingRegions(e, t, this._types)
  18274. }
  18275. var o = 0, r = this._nestingLevelCounts.length;
  18276. for (n = 0; n < this._nestingLevelCounts.length; n++) {
  18277. var s = this._nestingLevelCounts[n];
  18278. if (s) {
  18279. if (s + o > this._foldingRangesLimit) {
  18280. r = n;
  18281. break
  18282. }
  18283. o += s
  18284. }
  18285. }
  18286. e = new Uint32Array(this._foldingRangesLimit), t = new Uint32Array(this._foldingRangesLimit);
  18287. for (var a = [], l = (n = 0, 0); n < this._length; n++) {
  18288. var u = this._nestingLevels[n];
  18289. (u < r || u === r && o++ < this._foldingRangesLimit) && (e[l] = this._startIndexes[n], t[l] = this._endIndexes[n], a[l] = this._types[n], l++)
  18290. }
  18291. return new i.FoldingRegions(e, t, a)
  18292. }, e
  18293. }();
  18294. function l(e, t) {
  18295. for (var n = e.sort((function (e, t) {
  18296. var n = e.start - t.start;
  18297. return 0 === n && (n = e.rank - t.rank), n
  18298. })), i = new a(t), o = void 0, r = [], s = 0, l = n; s < l.length; s++) {
  18299. var u = l[s];
  18300. if (o) {
  18301. if (u.start > o.start) if (u.end <= o.end) r.push(o), o = u,
  18302. i.add(u.start, u.end, u.kind && u.kind.value, r.length); else {
  18303. if (u.start > o.end) {
  18304. do {
  18305. o = r.pop()
  18306. } while (o && u.start > o.end);
  18307. o && r.push(o), o = u
  18308. }
  18309. i.add(u.start, u.end, u.kind && u.kind.value, r.length)
  18310. }
  18311. } else o = u, i.add(u.start, u.end, u.kind && u.kind.value, r.length)
  18312. }
  18313. return i.toIndentRanges()
  18314. }
  18315. t.RangesCollector = a, t.sanitizeRanges = l
  18316. })),define(n[383], i([0, 1, 197]), (function (e, t, n) {
  18317. "use strict";
  18318. Object.defineProperty(t, "__esModule", {value: !0}), t.ID_INIT_PROVIDER = "init";
  18319. var i = function () {
  18320. function e(e, n, i, o) {
  18321. if (this.editorModel = e, this.id = t.ID_INIT_PROVIDER, n.length) {
  18322. this.decorationIds = e.deltaDecorations([], n.map((function (t) {
  18323. return {
  18324. range: {
  18325. startLineNumber: t.startLineNumber,
  18326. startColumn: 0,
  18327. endLineNumber: t.endLineNumber,
  18328. endColumn: e.getLineLength(t.endLineNumber)
  18329. }, options: {stickiness: 1}
  18330. }
  18331. }))), this.timeout = setTimeout(i, o)
  18332. }
  18333. }
  18334. return e.prototype.dispose = function () {
  18335. this.decorationIds && (this.editorModel.deltaDecorations(this.decorationIds, []), this.decorationIds = void 0), "number" == typeof this.timeout && (clearTimeout(this.timeout), this.timeout = void 0)
  18336. },
  18337. e.prototype.compute = function (e) {
  18338. var t = [];
  18339. if (this.decorationIds) for (var i = 0, o = this.decorationIds; i < o.length; i++) {
  18340. var r = o[i], s = this.editorModel.getDecorationRange(r);
  18341. s && t.push({start: s.startLineNumber, end: s.endLineNumber, rank: 1})
  18342. }
  18343. return Promise.resolve(n.sanitizeRanges(t, Number.MAX_VALUE))
  18344. }, e
  18345. }();
  18346. t.InitializingRangeProvider = i
  18347. })),define(n[198], i([0, 1, 58, 3]), (function (e, t, n, i) {
  18348. "use strict";
  18349. Object.defineProperty(t, "__esModule", {value: !0});
  18350. var o = function () {
  18351. function e() {
  18352. }
  18353. return e._handleEolEdits = function (e, t) {
  18354. for (var n = void 0, i = [], o = 0, r = t; o < r.length; o++) {
  18355. var s = r[o];
  18356. "number" == typeof s.eol && (n = s.eol), s.range && "string" == typeof s.text && i.push(s)
  18357. }
  18358. return "number" == typeof n && e.hasModel() && e.getModel().pushEOL(n), i
  18359. }, e._isFullModelReplaceEdit = function (e, t) {
  18360. if (!e.hasModel()) return !1;
  18361. var n = e.getModel(), i = n.validateRange(t.range);
  18362. return n.getFullModelRange().equalsRange(i)
  18363. }, e.execute = function (t, o) {
  18364. t.pushUndoStop();
  18365. var r = e._handleEolEdits(t, o)
  18366. ;1 === r.length && e._isFullModelReplaceEdit(t, r[0]) ? t.executeEdits("formatEditsCommand", r.map((function (e) {
  18367. return n.EditOperation.replace(i.Range.lift(e.range), e.text)
  18368. }))) : t.executeEdits("formatEditsCommand", r.map((function (e) {
  18369. return n.EditOperation.replaceMove(i.Range.lift(e.range), e.text)
  18370. }))), t.pushUndoStop()
  18371. }, e
  18372. }();
  18373. t.FormattingEdit = o
  18374. })),define(n[199], i([0, 1, 24, 2, 4, 16]), (function (e, t, n, i, o, s) {
  18375. "use strict";
  18376. function a(e, t) {
  18377. return !!e[t]
  18378. }
  18379. Object.defineProperty(t, "__esModule", {value: !0});
  18380. var l = function (e, t) {
  18381. this.target = e.target, this.hasTriggerModifier = a(e.event, t.triggerModifier), this.hasSideBySideModifier = a(e.event, t.triggerSideBySideModifier), this.isNoneOrSingleMouseDown = n.isIE || e.event.detail <= 1
  18382. };
  18383. t.ClickLinkMouseEvent = l;
  18384. var u = function (e, t) {
  18385. this.keyCodeIsTriggerKey = e.keyCode === t.triggerKey, this.keyCodeIsSideBySideKey = e.keyCode === t.triggerSideBySideKey, this.hasTriggerModifier = a(e, t.triggerModifier)
  18386. };
  18387. t.ClickLinkKeyboardEvent = u;
  18388. var d = function () {
  18389. function e(e, t, n, i) {
  18390. this.triggerKey = e, this.triggerModifier = t,
  18391. this.triggerSideBySideKey = n, this.triggerSideBySideModifier = i
  18392. }
  18393. return e.prototype.equals = function (e) {
  18394. return this.triggerKey === e.triggerKey && this.triggerModifier === e.triggerModifier && this.triggerSideBySideKey === e.triggerSideBySideKey && this.triggerSideBySideModifier === e.triggerSideBySideModifier
  18395. }, e
  18396. }();
  18397. function c(e) {
  18398. return "altKey" === e ? s.isMacintosh ? new d(57, "metaKey", 6, "altKey") : new d(5, "ctrlKey", 6, "altKey") : s.isMacintosh ? new d(6, "altKey", 57, "metaKey") : new d(6, "altKey", 5, "ctrlKey")
  18399. }
  18400. t.ClickLinkOptions = d;
  18401. var h = function (e) {
  18402. function t(t) {
  18403. var n = e.call(this) || this;
  18404. return n._onMouseMoveOrRelevantKeyDown = n._register(new o.Emitter), n.onMouseMoveOrRelevantKeyDown = n._onMouseMoveOrRelevantKeyDown.event, n._onExecute = n._register(new o.Emitter), n.onExecute = n._onExecute.event, n._onCancel = n._register(new o.Emitter), n.onCancel = n._onCancel.event, n._editor = t, n._opts = c(n._editor.getOption(59)), n.lastMouseMoveEvent = null, n.hasTriggerKeyOnMouseDown = !1, n._register(n._editor.onDidChangeConfiguration((function (e) {
  18405. if (e.hasChanged(59)) {
  18406. var t = c(n._editor.getOption(59));
  18407. if (n._opts.equals(t)) return;
  18408. n._opts = t, n.lastMouseMoveEvent = null, n.hasTriggerKeyOnMouseDown = !1, n._onCancel.fire()
  18409. }
  18410. }))), n._register(n._editor.onMouseMove((function (e) {
  18411. return n.onEditorMouseMove(new l(e, n._opts))
  18412. }))), n._register(n._editor.onMouseDown((function (e) {
  18413. return n.onEditorMouseDown(new l(e, n._opts))
  18414. }))), n._register(n._editor.onMouseUp((function (e) {
  18415. return n.onEditorMouseUp(new l(e, n._opts))
  18416. }))), n._register(n._editor.onKeyDown((function (e) {
  18417. return n.onEditorKeyDown(new u(e, n._opts))
  18418. }))), n._register(n._editor.onKeyUp((function (e) {
  18419. return n.onEditorKeyUp(new u(e, n._opts))
  18420. }))), n._register(n._editor.onMouseDrag((function () {
  18421. return n.resetHandler()
  18422. }))), n._register(n._editor.onDidChangeCursorSelection((function (e) {
  18423. return n.onDidChangeCursorSelection(e)
  18424. }))), n._register(n._editor.onDidChangeModel((function (e) {
  18425. return n.resetHandler()
  18426. }))), n._register(n._editor.onDidChangeModelContent((function () {
  18427. return n.resetHandler()
  18428. }))), n._register(n._editor.onDidScrollChange((function (e) {
  18429. (e.scrollTopChanged || e.scrollLeftChanged) && n.resetHandler()
  18430. }))), n
  18431. }
  18432. return r(t, e), t.prototype.onDidChangeCursorSelection = function (e) {
  18433. e.selection && e.selection.startColumn !== e.selection.endColumn && this.resetHandler()
  18434. }, t.prototype.onEditorMouseMove = function (e) {
  18435. this.lastMouseMoveEvent = e, this._onMouseMoveOrRelevantKeyDown.fire([e, null])
  18436. }, t.prototype.onEditorMouseDown = function (e) {
  18437. this.hasTriggerKeyOnMouseDown = e.hasTriggerModifier
  18438. }, t.prototype.onEditorMouseUp = function (e) {
  18439. this.hasTriggerKeyOnMouseDown && this._onExecute.fire(e)
  18440. }, t.prototype.onEditorKeyDown = function (e) {
  18441. this.lastMouseMoveEvent && (e.keyCodeIsTriggerKey || e.keyCodeIsSideBySideKey && e.hasTriggerModifier) ? this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]) : e.hasTriggerModifier && this._onCancel.fire()
  18442. }, t.prototype.onEditorKeyUp = function (e) {
  18443. e.keyCodeIsTriggerKey && this._onCancel.fire()
  18444. }, t.prototype.resetHandler = function () {
  18445. this.lastMouseMoveEvent = null, this.hasTriggerKeyOnMouseDown = !1, this._onCancel.fire()
  18446. }, t
  18447. }(i.Disposable);
  18448. t.ClickLinkGesture = h
  18449. })),
  18450. define(n[200], i([0, 1, 15, 10]), (function (e, t, n, i) {
  18451. "use strict";
  18452. Object.defineProperty(t, "__esModule", {value: !0});
  18453. var o = function () {
  18454. function e(e, t, i, o, r) {
  18455. var s = this;
  18456. this._computer = e, this._state = 0, this._hoverTime = r, this._firstWaitScheduler = new n.RunOnceScheduler((function () {
  18457. return s._triggerAsyncComputation()
  18458. }), 0), this._secondWaitScheduler = new n.RunOnceScheduler((function () {
  18459. return s._triggerSyncComputation()
  18460. }), 0), this._loadingMessageScheduler = new n.RunOnceScheduler((function () {
  18461. return s._showLoadingMessage()
  18462. }), 0), this._asyncComputationPromise = null, this._asyncComputationPromiseDone = !1, this._completeCallback = t, this._errorCallback = i, this._progressCallback = o
  18463. }
  18464. return e.prototype.setHoverTime = function (e) {
  18465. this._hoverTime = e
  18466. }, e.prototype._firstWaitTime = function () {
  18467. return this._hoverTime / 2
  18468. }, e.prototype._secondWaitTime = function () {
  18469. return this._hoverTime / 2
  18470. }, e.prototype._loadingMessageTime = function () {
  18471. return 3 * this._hoverTime
  18472. }, e.prototype._triggerAsyncComputation = function () {
  18473. var e = this;
  18474. this._state = 2,
  18475. this._secondWaitScheduler.schedule(this._secondWaitTime()), this._computer.computeAsync ? (this._asyncComputationPromiseDone = !1, this._asyncComputationPromise = n.createCancelablePromise((function (t) {
  18476. return e._computer.computeAsync(t)
  18477. })), this._asyncComputationPromise.then((function (t) {
  18478. e._asyncComputationPromiseDone = !0, e._withAsyncResult(t)
  18479. }), (function (t) {
  18480. return e._onError(t)
  18481. }))) : this._asyncComputationPromiseDone = !0
  18482. }, e.prototype._triggerSyncComputation = function () {
  18483. this._computer.computeSync && this._computer.onResult(this._computer.computeSync(), !0), this._asyncComputationPromiseDone ? (this._state = 0, this._onComplete(this._computer.getResult())) : (this._state = 3, this._onProgress(this._computer.getResult()))
  18484. }, e.prototype._showLoadingMessage = function () {
  18485. 3 === this._state && this._onProgress(this._computer.getResultWithLoadingMessage())
  18486. }, e.prototype._withAsyncResult = function (e) {
  18487. e && this._computer.onResult(e, !1), 3 === this._state && (this._state = 0, this._onComplete(this._computer.getResult()))
  18488. }, e.prototype._onComplete = function (e) {
  18489. this._completeCallback && this._completeCallback(e)
  18490. }, e.prototype._onError = function (e) {
  18491. this._errorCallback ? this._errorCallback(e) : i.onUnexpectedError(e)
  18492. }, e.prototype._onProgress = function (e) {
  18493. this._progressCallback && this._progressCallback(e)
  18494. }, e.prototype.start = function (e) {
  18495. if (0 === e) 0 === this._state && (this._state = 1, this._firstWaitScheduler.schedule(this._firstWaitTime()), this._loadingMessageScheduler.schedule(this._loadingMessageTime())); else switch (this._state) {
  18496. case 0:
  18497. this._triggerAsyncComputation(), this._secondWaitScheduler.cancel(), this._triggerSyncComputation();
  18498. break;
  18499. case 2:
  18500. this._secondWaitScheduler.cancel(), this._triggerSyncComputation()
  18501. }
  18502. }, e.prototype.cancel = function () {
  18503. this._loadingMessageScheduler.cancel(), 1 === this._state && this._firstWaitScheduler.cancel(), 2 === this._state && (this._secondWaitScheduler.cancel(), this._asyncComputationPromise && (this._asyncComputationPromise.cancel(), this._asyncComputationPromise = null)), 3 === this._state && this._asyncComputationPromise && (this._asyncComputationPromise.cancel(),
  18504. this._asyncComputationPromise = null), this._state = 0
  18505. }, e
  18506. }();
  18507. t.HoverOperation = o
  18508. }));
  18509. a = this && this.__spreadArrays || function () {
  18510. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  18511. var i = Array(e), o = 0;
  18512. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  18513. return i
  18514. };
  18515. define(n[201], i([0, 1, 6, 53, 47]), (function (e, t, n, i, o) {
  18516. "use strict";
  18517. Object.defineProperty(t, "__esModule", {value: !0});
  18518. var s = function (e) {
  18519. function t(t, n) {
  18520. var o = e.call(this) || this;
  18521. return o.allowEditorOverflow = !0, o._id = t, o._editor = n, o._isVisible = !1, o._stoleFocus = !1, o._containerDomNode = document.createElement("div"), o._containerDomNode.className = "monaco-editor-hover hidden", o._containerDomNode.tabIndex = 0, o._domNode = document.createElement("div"), o._domNode.className = "monaco-editor-hover-content", o.scrollbar = new i.DomScrollableElement(o._domNode, {}), o._register(o.scrollbar), o._containerDomNode.appendChild(o.scrollbar.getDomNode()), o.onkeydown(o._containerDomNode, (function (e) {
  18522. e.equals(9) && o.hide()
  18523. })),
  18524. o._register(o._editor.onDidChangeConfiguration((function (e) {
  18525. e.hasChanged(34) && o.updateFont()
  18526. }))), o._editor.onDidLayoutChange((function (e) {
  18527. return o.layout()
  18528. })), o.layout(), o._editor.addContentWidget(o), o._showAtPosition = null, o._showAtRange = null, o._stoleFocus = !1, o
  18529. }
  18530. return r(t, e), Object.defineProperty(t.prototype, "isVisible", {
  18531. get: function () {
  18532. return this._isVisible
  18533. }, set: function (e) {
  18534. this._isVisible = e, n.toggleClass(this._containerDomNode, "hidden", !this._isVisible)
  18535. }, enumerable: !0, configurable: !0
  18536. }), t.prototype.getId = function () {
  18537. return this._id
  18538. }, t.prototype.getDomNode = function () {
  18539. return this._containerDomNode
  18540. }, t.prototype.showAt = function (e, t, n) {
  18541. this._showAtPosition = e, this._showAtRange = t, this.isVisible = !0, this._editor.layoutContentWidget(this), this._editor.render(), this._stoleFocus = n, n && this._containerDomNode.focus()
  18542. }, t.prototype.hide = function () {
  18543. this.isVisible && (this.isVisible = !1, this._editor.layoutContentWidget(this), this._stoleFocus && this._editor.focus())
  18544. }, t.prototype.getPosition = function () {
  18545. return this.isVisible ? {
  18546. position: this._showAtPosition, range: this._showAtRange, preference: [1, 2]
  18547. } : null
  18548. }, t.prototype.dispose = function () {
  18549. this._editor.removeContentWidget(this), e.prototype.dispose.call(this)
  18550. }, t.prototype.updateFont = function () {
  18551. var e = this;
  18552. Array.prototype.slice.call(this._domNode.getElementsByClassName("code")).forEach((function (t) {
  18553. return e._editor.applyFontInfo(t)
  18554. }))
  18555. }, t.prototype.updateContents = function (e) {
  18556. this._domNode.textContent = "", this._domNode.appendChild(e), this.updateFont(), this._editor.layoutContentWidget(this), this.onContentsChange()
  18557. }, t.prototype.onContentsChange = function () {
  18558. this.scrollbar.scanDomNode()
  18559. }, t.prototype.layout = function () {
  18560. var e = Math.max(this._editor.getLayoutInfo().height / 4, 250), t = this._editor.getOption(34),
  18561. n = t.fontSize, i = t.lineHeight;
  18562. this._domNode.style.fontSize = n + "px", this._domNode.style.lineHeight = i + "px", this._domNode.style.maxHeight = e + "px", this._domNode.style.maxWidth = Math.max(.66 * this._editor.getLayoutInfo().width, 500) + "px"
  18563. }, t
  18564. }(o.Widget);
  18565. t.ContentHoverWidget = s;
  18566. var l = function (e) {
  18567. function t(t, n) {
  18568. var i = e.call(this) || this;
  18569. return i._id = t, i._editor = n, i._isVisible = !1, i._domNode = document.createElement("div"), i._domNode.className = "monaco-editor-hover hidden", i._domNode.setAttribute("aria-hidden", "true"), i._domNode.setAttribute("role", "presentation"), i._showAtLineNumber = -1, i._register(i._editor.onDidChangeConfiguration((function (e) {
  18570. e.hasChanged(34) && i.updateFont()
  18571. }))), i._editor.addOverlayWidget(i), i
  18572. }
  18573. return r(t, e), Object.defineProperty(t.prototype, "isVisible", {
  18574. get: function () {
  18575. return this._isVisible
  18576. }, set: function (e) {
  18577. this._isVisible = e, n.toggleClass(this._domNode, "hidden", !this._isVisible)
  18578. }, enumerable: !0, configurable: !0
  18579. }), t.prototype.getId = function () {
  18580. return this._id
  18581. }, t.prototype.getDomNode = function () {
  18582. return this._domNode
  18583. }, t.prototype.showAt = function (e) {
  18584. this._showAtLineNumber = e, this.isVisible || (this.isVisible = !0);
  18585. var t = this._editor.getLayoutInfo(), n = this._editor.getTopForLineNumber(this._showAtLineNumber),
  18586. i = this._editor.getScrollTop(), o = this._editor.getOption(49),
  18587. r = n - i - (this._domNode.clientHeight - o) / 2
  18588. ;this._domNode.style.left = t.glyphMarginLeft + t.glyphMarginWidth + "px", this._domNode.style.top = Math.max(Math.round(r), 0) + "px"
  18589. }, t.prototype.hide = function () {
  18590. this.isVisible && (this.isVisible = !1)
  18591. }, t.prototype.getPosition = function () {
  18592. return null
  18593. }, t.prototype.dispose = function () {
  18594. this._editor.removeOverlayWidget(this), e.prototype.dispose.call(this)
  18595. }, t.prototype.updateFont = function () {
  18596. var e = this, t = Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),
  18597. n = Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));
  18598. a(t, n).forEach((function (t) {
  18599. return e._editor.applyFontInfo(t)
  18600. }))
  18601. }, t.prototype.updateContents = function (e) {
  18602. this._domNode.textContent = "", this._domNode.appendChild(e), this.updateFont()
  18603. }, t
  18604. }(o.Widget);
  18605. t.GlyphHoverWidget = l
  18606. })), define(n[384], i([0, 1, 22]), (function (e, t, n) {
  18607. "use strict";
  18608. Object.defineProperty(t, "__esModule", {value: !0});
  18609. var i = function () {
  18610. function e(e, t, n) {
  18611. this._editRange = e, this._originalSelection = t, this._text = n
  18612. }
  18613. return e.prototype.getEditOperations = function (e, t) {
  18614. t.addTrackedEditOperation(this._editRange, this._text)
  18615. }, e.prototype.computeCursorState = function (e, t) {
  18616. var i = t.getInverseEditOperations()[0].range;
  18617. return this._originalSelection.isEmpty() ? new n.Selection(i.endLineNumber, Math.min(this._originalSelection.positionColumn, i.endColumn), i.endLineNumber, Math.min(this._originalSelection.positionColumn, i.endColumn)) : new n.Selection(i.endLineNumber, i.endColumn - this._text.length, i.endLineNumber, i.endColumn)
  18618. }, e
  18619. }();
  18620. t.InPlaceReplaceCommand = i
  18621. })), define(n[385], i([0, 1]), (function (e, t) {
  18622. "use strict";
  18623. Object.defineProperty(t, "__esModule", {value: !0}), t.getSpaceCnt = function (e, t) {
  18624. for (var n = 0, i = 0; i < e.length; i++) "\t" === e.charAt(i) ? n += t : n++;
  18625. return n
  18626. }, t.generateIndent = function (e, t, n) {
  18627. e = e < 0 ? 0 : e;
  18628. var i = "";
  18629. if (!n) {
  18630. var o = Math.floor(e / t);
  18631. e %= t;
  18632. for (var r = 0; r < o; r++) i += "\t"
  18633. }
  18634. for (r = 0; r < e; r++) i += " ";
  18635. return i
  18636. }
  18637. })), define(n[386], i([0, 1, 3, 22]), (function (e, t, n, i) {
  18638. "use strict";
  18639. Object.defineProperty(t, "__esModule", {value: !0});
  18640. var o = function () {
  18641. function e(e, t) {
  18642. this._selection = e, this._isCopyingDown = t,
  18643. this._selectionDirection = 0, this._selectionId = null, this._startLineNumberDelta = 0, this._endLineNumberDelta = 0
  18644. }
  18645. return e.prototype.getEditOperations = function (e, t) {
  18646. var i = this._selection;
  18647. this._startLineNumberDelta = 0, this._endLineNumberDelta = 0, i.startLineNumber < i.endLineNumber && 1 === i.endColumn && (this._endLineNumberDelta = 1, i = i.setEndPosition(i.endLineNumber - 1, e.getLineMaxColumn(i.endLineNumber - 1)));
  18648. for (var o = [], r = i.startLineNumber; r <= i.endLineNumber; r++) o.push(e.getLineContent(r));
  18649. var s = o.join("\n");
  18650. "" === s && this._isCopyingDown && (this._startLineNumberDelta++, this._endLineNumberDelta++), this._isCopyingDown ? t.addEditOperation(new n.Range(i.startLineNumber, 1, i.startLineNumber, 1), s + "\n") : t.addEditOperation(new n.Range(i.endLineNumber, e.getLineMaxColumn(i.endLineNumber), i.endLineNumber, e.getLineMaxColumn(i.endLineNumber)), "\n" + s), this._selectionId = t.trackSelection(i), this._selectionDirection = this._selection.getDirection()
  18651. }, e.prototype.computeCursorState = function (e, t) {
  18652. var n = t.getTrackedSelection(this._selectionId)
  18653. ;
  18654. if (0 !== this._startLineNumberDelta || 0 !== this._endLineNumberDelta) {
  18655. var o = n.startLineNumber, r = n.startColumn, s = n.endLineNumber, a = n.endColumn;
  18656. 0 !== this._startLineNumberDelta && (o += this._startLineNumberDelta, r = 1), 0 !== this._endLineNumberDelta && (s += this._endLineNumberDelta, a = 1), n = i.Selection.createWithDirection(o, r, s, a, this._selectionDirection)
  18657. }
  18658. return n
  18659. }, e
  18660. }();
  18661. t.CopyLinesCommand = o
  18662. })), define(n[387], i([0, 1, 58, 3]), (function (e, t, n, i) {
  18663. "use strict";
  18664. Object.defineProperty(t, "__esModule", {value: !0});
  18665. var o = function () {
  18666. function e(e, t) {
  18667. this.selection = e, this.descending = t, this.selectionId = null
  18668. }
  18669. return e.getCollator = function () {
  18670. return e._COLLATOR || (e._COLLATOR = new Intl.Collator), e._COLLATOR
  18671. }, e.prototype.getEditOperations = function (e, t) {
  18672. var o = function (e, t, o) {
  18673. var s = r(e, t, o);
  18674. if (!s) return null;
  18675. return n.EditOperation.replace(new i.Range(s.startLineNumber, 1, s.endLineNumber, e.getLineMaxColumn(s.endLineNumber)), s.after.join("\n"))
  18676. }(e, this.selection, this.descending);
  18677. o && t.addEditOperation(o.range, o.text),
  18678. this.selectionId = t.trackSelection(this.selection)
  18679. }, e.prototype.computeCursorState = function (e, t) {
  18680. return t.getTrackedSelection(this.selectionId)
  18681. }, e.canRun = function (e, t, n) {
  18682. if (null === e) return !1;
  18683. var i = r(e, t, n);
  18684. if (!i) return !1;
  18685. for (var o = 0, s = i.before.length; o < s; o++) if (i.before[o] !== i.after[o]) return !0;
  18686. return !1
  18687. }, e._COLLATOR = null, e
  18688. }();
  18689. function r(e, t, n) {
  18690. var i = t.startLineNumber, r = t.endLineNumber;
  18691. if (1 === t.endColumn && r--, i >= r) return null;
  18692. for (var s = [], a = i; a <= r; a++) s.push(e.getLineContent(a));
  18693. var l = s.slice(0);
  18694. return l.sort(o.getCollator().compare), !0 === n && (l = l.reverse()), {
  18695. startLineNumber: i,
  18696. endLineNumber: r,
  18697. before: s,
  18698. after: l
  18699. }
  18700. }
  18701. t.SortLinesCommand = o
  18702. })), define(n[202], i([0, 1, 13, 3, 76]), (function (e, t, n, i, o) {
  18703. "use strict";
  18704. Object.defineProperty(t, "__esModule", {value: !0});
  18705. var r = function () {
  18706. function e() {
  18707. }
  18708. return e.prototype.provideSelectionRanges = function (t, n) {
  18709. return d(this, void 0, void 0, (function () {
  18710. var i, o, r, s, a;
  18711. return c(this, (function (l) {
  18712. switch (l.label) {
  18713. case 0:
  18714. i = [], o = function (n) {
  18715. var o, r;
  18716. return c(this, (function (s) {
  18717. switch (s.label) {
  18718. case 0:
  18719. return o = [], i.push(o), r = new Map, [4, new Promise((function (i) {
  18720. return e._bracketsRightYield(i, 0, t, n, r)
  18721. }))];
  18722. case 1:
  18723. return s.sent(), [4, new Promise((function (i) {
  18724. return e._bracketsLeftYield(i, 0, t, n, r, o)
  18725. }))];
  18726. case 2:
  18727. return s.sent(), [2]
  18728. }
  18729. }))
  18730. }, r = 0, s = n, l.label = 1;
  18731. case 1:
  18732. return r < s.length ? (a = s[r], [5, o(a)]) : [3, 4];
  18733. case 2:
  18734. l.sent(), l.label = 3;
  18735. case 3:
  18736. return r++, [3, 1];
  18737. case 4:
  18738. return [2, i]
  18739. }
  18740. }))
  18741. }))
  18742. }, e._bracketsRightYield = function (t, n, i, r, s) {
  18743. for (var a = new Map, l = Date.now(); ;) {
  18744. if (n >= e._maxRounds) {
  18745. t();
  18746. break
  18747. }
  18748. if (!r) {
  18749. t();
  18750. break
  18751. }
  18752. var u = i.findNextBracket(r);
  18753. if (!u) {
  18754. t();
  18755. break
  18756. }
  18757. if (Date.now() - l > e._maxDuration) {
  18758. setTimeout((function () {
  18759. return e._bracketsRightYield(t, n + 1, i, r, s)
  18760. }));
  18761. break
  18762. }
  18763. var d = u.close[0];
  18764. if (u.isOpen) {
  18765. var c = a.has(d) ? a.get(d) : 0;
  18766. a.set(d, c + 1)
  18767. } else {
  18768. c = a.has(d) ? a.get(d) : 0;
  18769. if (c -= 1, a.set(d, Math.max(0, c)), c < 0) {
  18770. var h = s.get(d);
  18771. h || (h = new o.LinkedList, s.set(d, h)), h.push(u.range)
  18772. }
  18773. }
  18774. r = u.range.getEndPosition()
  18775. }
  18776. }, e._bracketsLeftYield = function (t, n, o, r, s, a) {
  18777. for (var l = new Map, u = Date.now(); ;) {
  18778. if (n >= e._maxRounds && 0 === s.size) {
  18779. t();
  18780. break
  18781. }
  18782. if (!r) {
  18783. t();
  18784. break
  18785. }
  18786. var d = o.findPrevBracket(r);
  18787. if (!d) {
  18788. t();
  18789. break
  18790. }
  18791. if (Date.now() - u > e._maxDuration) {
  18792. setTimeout((function () {
  18793. return e._bracketsLeftYield(t, n + 1, o, r, s, a)
  18794. }));
  18795. break
  18796. }
  18797. var c = d.close[0];
  18798. if (d.isOpen) {
  18799. m = l.has(c) ? l.get(c) : 0;
  18800. if (m -= 1, l.set(c, Math.max(0, m)), m < 0) {
  18801. var h = s.get(c);
  18802. if (h) {
  18803. var p = h.shift();
  18804. 0 === h.size && s.delete(c);
  18805. var g = i.Range.fromPositions(d.range.getEndPosition(), p.getStartPosition()),
  18806. f = i.Range.fromPositions(d.range.getStartPosition(), p.getEndPosition());
  18807. a.push({range: g}), a.push({range: f}), e._addBracketLeading(o, f, a)
  18808. }
  18809. }
  18810. } else {
  18811. var m = l.has(c) ? l.get(c) : 0;
  18812. l.set(c, m + 1)
  18813. }
  18814. r = d.range.getStartPosition()
  18815. }
  18816. }, e._addBracketLeading = function (e, t, o) {
  18817. if (t.startLineNumber !== t.endLineNumber) {
  18818. var r = t.startLineNumber, s = e.getLineFirstNonWhitespaceColumn(r);
  18819. 0 !== s && s !== t.startColumn && (o.push({range: i.Range.fromPositions(new n.Position(r, s), t.getEndPosition())}), o.push({range: i.Range.fromPositions(new n.Position(r, 1), t.getEndPosition())}));
  18820. var a = r - 1;
  18821. if (a > 0) {
  18822. var l = e.getLineFirstNonWhitespaceColumn(a)
  18823. ;l === t.startColumn && l !== e.getLineLastNonWhitespaceColumn(a) && (o.push({range: i.Range.fromPositions(new n.Position(a, l), t.getEndPosition())}), o.push({range: i.Range.fromPositions(new n.Position(a, 1), t.getEndPosition())}))
  18824. }
  18825. }
  18826. }, e._maxDuration = 30, e._maxRounds = 2, e
  18827. }();
  18828. t.BracketSelectionRangeProvider = r
  18829. })), define(n[388], i([0, 1, 3, 5]), (function (e, t, n, i) {
  18830. "use strict";
  18831. Object.defineProperty(t, "__esModule", {value: !0});
  18832. var o = function () {
  18833. function e() {
  18834. }
  18835. return e.prototype.provideSelectionRanges = function (e, t) {
  18836. for (var n = [], i = 0, o = t; i < o.length; i++) {
  18837. var r = o[i], s = [];
  18838. n.push(s), this._addInWordRanges(s, e, r), this._addWordRanges(s, e, r), this._addWhitespaceLine(s, e, r), s.push({range: e.getFullModelRange()})
  18839. }
  18840. return n
  18841. }, e.prototype._addInWordRanges = function (e, t, o) {
  18842. var r = t.getWordAtPosition(o);
  18843. if (r) {
  18844. for (var s = r.word, a = r.startColumn, l = o.column - a, u = l, d = l, c = 0; u >= 0; u--) {
  18845. if (95 === (h = s.charCodeAt(u)) || 45 === h) break;
  18846. if (i.isLowerAsciiLetter(h) && i.isUpperAsciiLetter(c)) break;
  18847. c = h
  18848. }
  18849. for (u += 1; d < s.length; d++) {
  18850. var h = s.charCodeAt(d)
  18851. ;
  18852. if (i.isUpperAsciiLetter(h) && i.isLowerAsciiLetter(c)) break;
  18853. if (95 === h || 45 === h) break;
  18854. c = h
  18855. }
  18856. u < d && e.push({range: new n.Range(o.lineNumber, a + u, o.lineNumber, a + d)})
  18857. }
  18858. }, e.prototype._addWordRanges = function (e, t, i) {
  18859. var o = t.getWordAtPosition(i);
  18860. o && e.push({range: new n.Range(i.lineNumber, o.startColumn, i.lineNumber, o.endColumn)})
  18861. }, e.prototype._addWhitespaceLine = function (e, t, i) {
  18862. t.getLineLength(i.lineNumber) > 0 && 0 === t.getLineFirstNonWhitespaceColumn(i.lineNumber) && 0 === t.getLineLastNonWhitespaceColumn(i.lineNumber) && e.push({range: new n.Range(i.lineNumber, 1, i.lineNumber, t.getLineMaxColumn(i.lineNumber))})
  18863. }, e
  18864. }();
  18865. t.WordSelectionRangeProvider = o
  18866. }));
  18867. a = this && this.__spreadArrays || function () {
  18868. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  18869. var i = Array(e), o = 0;
  18870. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  18871. return i
  18872. };
  18873. define(n[151], i([0, 1]), (function (e, t) {
  18874. "use strict";
  18875. var n;
  18876. Object.defineProperty(t, "__esModule", {value: !0});
  18877. var i = function () {
  18878. function e() {
  18879. this.value = "", this.pos = 0
  18880. }
  18881. return e.isDigitCharacter = function (e) {
  18882. return e >= 48 && e <= 57
  18883. }, e.isVariableCharacter = function (e) {
  18884. return 95 === e || e >= 97 && e <= 122 || e >= 65 && e <= 90
  18885. }, e.prototype.text = function (e) {
  18886. this.value = e, this.pos = 0
  18887. }, e.prototype.tokenText = function (e) {
  18888. return this.value.substr(e.pos, e.len)
  18889. }, e.prototype.next = function () {
  18890. if (this.pos >= this.value.length) return {type: 14, pos: this.pos, len: 0};
  18891. var t, n = this.pos, i = 0, o = this.value.charCodeAt(n);
  18892. if ("number" == typeof (t = e._table[o])) return this.pos += 1, {type: t, pos: n, len: 1};
  18893. if (e.isDigitCharacter(o)) {
  18894. t = 8;
  18895. do {
  18896. i += 1, o = this.value.charCodeAt(n + i)
  18897. } while (e.isDigitCharacter(o));
  18898. return this.pos += i, {type: t, pos: n, len: i}
  18899. }
  18900. if (e.isVariableCharacter(o)) {
  18901. t = 9;
  18902. do {
  18903. o = this.value.charCodeAt(n + ++i)
  18904. } while (e.isVariableCharacter(o) || e.isDigitCharacter(o));
  18905. return this.pos += i, {type: t, pos: n, len: i}
  18906. }
  18907. t = 10;
  18908. do {
  18909. i += 1, o = this.value.charCodeAt(n + i)
  18910. } while (!isNaN(o) && void 0 === e._table[o] && !e.isDigitCharacter(o) && !e.isVariableCharacter(o));
  18911. return this.pos += i, {type: t, pos: n, len: i}
  18912. }, e._table = ((n = {})[36] = 0, n[58] = 1, n[44] = 2, n[123] = 3, n[125] = 4, n[92] = 5,
  18913. n[47] = 6, n[124] = 7, n[43] = 11, n[45] = 12, n[63] = 13, n), e
  18914. }();
  18915. t.Scanner = i;
  18916. var o = function () {
  18917. function e() {
  18918. this._children = []
  18919. }
  18920. return e.prototype.appendChild = function (e) {
  18921. return e instanceof s && this._children[this._children.length - 1] instanceof s ? this._children[this._children.length - 1].value += e.value : (e.parent = this, this._children.push(e)), this
  18922. }, e.prototype.replace = function (e, t) {
  18923. var n = e.parent, i = n.children.indexOf(e), o = n.children.slice(0);
  18924. o.splice.apply(o, a([i, 1], t)), n._children = o, function e(t, n) {
  18925. for (var i = 0, o = t; i < o.length; i++) {
  18926. var r = o[i];
  18927. r.parent = n, e(r.children, r)
  18928. }
  18929. }(t, n)
  18930. }, Object.defineProperty(e.prototype, "children", {
  18931. get: function () {
  18932. return this._children
  18933. }, enumerable: !0, configurable: !0
  18934. }), Object.defineProperty(e.prototype, "snippet", {
  18935. get: function () {
  18936. for (var e = this; ;) {
  18937. if (!e) return;
  18938. if (e instanceof f) return e;
  18939. e = e.parent
  18940. }
  18941. }, enumerable: !0, configurable: !0
  18942. }), e.prototype.toString = function () {
  18943. return this.children.reduce((function (e, t) {
  18944. return e + t.toString()
  18945. }), "")
  18946. }, e.prototype.len = function () {
  18947. return 0
  18948. }, e
  18949. }();
  18950. t.Marker = o;
  18951. var s = function (e) {
  18952. function t(t) {
  18953. var n = e.call(this) || this;
  18954. return n.value = t, n
  18955. }
  18956. return r(t, e), t.prototype.toString = function () {
  18957. return this.value
  18958. }, t.prototype.len = function () {
  18959. return this.value.length
  18960. }, t.prototype.clone = function () {
  18961. return new t(this.value)
  18962. }, t
  18963. }(o);
  18964. t.Text = s;
  18965. var l = function (e) {
  18966. function t() {
  18967. return null !== e && e.apply(this, arguments) || this
  18968. }
  18969. return r(t, e), t
  18970. }(o);
  18971. t.TransformableMarker = l;
  18972. var u = function (e) {
  18973. function t(t) {
  18974. var n = e.call(this) || this;
  18975. return n.index = t, n
  18976. }
  18977. return r(t, e), t.compareByIndex = function (e, t) {
  18978. return e.index === t.index ? 0 : e.isFinalTabstop ? 1 : t.isFinalTabstop ? -1 : e.index < t.index ? -1 : e.index > t.index ? 1 : 0
  18979. }, Object.defineProperty(t.prototype, "isFinalTabstop", {
  18980. get: function () {
  18981. return 0 === this.index
  18982. }, enumerable: !0, configurable: !0
  18983. }), Object.defineProperty(t.prototype, "choice", {
  18984. get: function () {
  18985. return 1 === this._children.length && this._children[0] instanceof d ? this._children[0] : void 0
  18986. }, enumerable: !0, configurable: !0
  18987. }), t.prototype.clone = function () {
  18988. var e = new t(this.index);
  18989. return this.transform && (e.transform = this.transform.clone()),
  18990. e._children = this.children.map((function (e) {
  18991. return e.clone()
  18992. })), e
  18993. }, t
  18994. }(l);
  18995. t.Placeholder = u;
  18996. var d = function (e) {
  18997. function t() {
  18998. var t = null !== e && e.apply(this, arguments) || this;
  18999. return t.options = [], t
  19000. }
  19001. return r(t, e), t.prototype.appendChild = function (e) {
  19002. return e instanceof s && (e.parent = this, this.options.push(e)), this
  19003. }, t.prototype.toString = function () {
  19004. return this.options[0].value
  19005. }, t.prototype.len = function () {
  19006. return this.options[0].len()
  19007. }, t.prototype.clone = function () {
  19008. var e = new t;
  19009. return this.options.forEach(e.appendChild, e), e
  19010. }, t
  19011. }(o);
  19012. t.Choice = d;
  19013. var c = function (e) {
  19014. function t() {
  19015. var t = null !== e && e.apply(this, arguments) || this;
  19016. return t.regexp = new RegExp(""), t
  19017. }
  19018. return r(t, e), t.prototype.resolve = function (e) {
  19019. var t = this, n = !1, i = e.replace(this.regexp, (function () {
  19020. return n = !0, t._replace(Array.prototype.slice.call(arguments, 0, -2))
  19021. }));
  19022. return !n && this._children.some((function (e) {
  19023. return e instanceof h && Boolean(e.elseValue)
  19024. })) && (i = this._replace([])), i
  19025. }, t.prototype._replace = function (e) {
  19026. for (var t = "", n = 0, i = this._children; n < i.length; n++) {
  19027. var o = i[n]
  19028. ;
  19029. if (o instanceof h) {
  19030. var r = e[o.index] || "";
  19031. t += r = o.resolve(r)
  19032. } else t += o.toString()
  19033. }
  19034. return t
  19035. }, t.prototype.toString = function () {
  19036. return ""
  19037. }, t.prototype.clone = function () {
  19038. var e = new t;
  19039. return e.regexp = new RegExp(this.regexp.source, (this.regexp.ignoreCase ? "i" : "") + (this.regexp.global ? "g" : "")), e._children = this.children.map((function (e) {
  19040. return e.clone()
  19041. })), e
  19042. }, t
  19043. }(o);
  19044. t.Transform = c;
  19045. var h = function (e) {
  19046. function t(t, n, i, o) {
  19047. var r = e.call(this) || this;
  19048. return r.index = t, r.shorthandName = n, r.ifValue = i, r.elseValue = o, r
  19049. }
  19050. return r(t, e), t.prototype.resolve = function (e) {
  19051. return "upcase" === this.shorthandName ? e ? e.toLocaleUpperCase() : "" : "downcase" === this.shorthandName ? e ? e.toLocaleLowerCase() : "" : "capitalize" === this.shorthandName ? e ? e[0].toLocaleUpperCase() + e.substr(1) : "" : "pascalcase" === this.shorthandName ? e ? this._toPascalCase(e) : "" : Boolean(e) && "string" == typeof this.ifValue ? this.ifValue : Boolean(e) || "string" != typeof this.elseValue ? e || "" : this.elseValue
  19052. }, t.prototype._toPascalCase = function (e) {
  19053. var t = e.match(/[a-z]+/gi);
  19054. return t ? t.map((function (e) {
  19055. return e.charAt(0).toUpperCase() + e.substr(1).toLowerCase()
  19056. })).join("") : e
  19057. }, t.prototype.clone = function () {
  19058. return new t(this.index, this.shorthandName, this.ifValue, this.elseValue)
  19059. }, t
  19060. }(o);
  19061. t.FormatString = h;
  19062. var p = function (e) {
  19063. function t(t) {
  19064. var n = e.call(this) || this;
  19065. return n.name = t, n
  19066. }
  19067. return r(t, e), t.prototype.resolve = function (e) {
  19068. var t = e.resolve(this);
  19069. return this.transform && (t = this.transform.resolve(t || "")), void 0 !== t && (this._children = [new s(t)], !0)
  19070. }, t.prototype.clone = function () {
  19071. var e = new t(this.name);
  19072. return this.transform && (e.transform = this.transform.clone()), e._children = this.children.map((function (e) {
  19073. return e.clone()
  19074. })), e
  19075. }, t
  19076. }(l);
  19077. function g(e, t) {
  19078. for (var n = a(e); n.length > 0;) {
  19079. var i = n.shift();
  19080. if (!t(i)) break;
  19081. n.unshift.apply(n, i.children)
  19082. }
  19083. }
  19084. t.Variable = p;
  19085. var f = function (e) {
  19086. function t() {
  19087. return null !== e && e.apply(this, arguments) || this
  19088. }
  19089. return r(t, e), Object.defineProperty(t.prototype, "placeholderInfo", {
  19090. get: function () {
  19091. if (!this._placeholders) {
  19092. var e, t = [];
  19093. this.walk((function (n) {
  19094. return n instanceof u && (t.push(n),
  19095. e = !e || e.index < n.index ? n : e), !0
  19096. })), this._placeholders = {all: t, last: e}
  19097. }
  19098. return this._placeholders
  19099. }, enumerable: !0, configurable: !0
  19100. }), Object.defineProperty(t.prototype, "placeholders", {
  19101. get: function () {
  19102. return this.placeholderInfo.all
  19103. }, enumerable: !0, configurable: !0
  19104. }), t.prototype.offset = function (e) {
  19105. var t = 0, n = !1;
  19106. return this.walk((function (i) {
  19107. return i === e ? (n = !0, !1) : (t += i.len(), !0)
  19108. })), n ? t : -1
  19109. }, t.prototype.fullLen = function (e) {
  19110. var t = 0;
  19111. return g([e], (function (e) {
  19112. return t += e.len(), !0
  19113. })), t
  19114. }, t.prototype.enclosingPlaceholders = function (e) {
  19115. for (var t = [], n = e.parent; n;) n instanceof u && t.push(n), n = n.parent;
  19116. return t
  19117. }, t.prototype.resolveVariables = function (e) {
  19118. var t = this;
  19119. return this.walk((function (n) {
  19120. return n instanceof p && n.resolve(e) && (t._placeholders = void 0), !0
  19121. })), this
  19122. }, t.prototype.appendChild = function (t) {
  19123. return this._placeholders = void 0, e.prototype.appendChild.call(this, t)
  19124. }, t.prototype.replace = function (t, n) {
  19125. return this._placeholders = void 0, e.prototype.replace.call(this, t, n)
  19126. }, t.prototype.clone = function () {
  19127. var e = new t
  19128. ;
  19129. return this._children = this.children.map((function (e) {
  19130. return e.clone()
  19131. })), e
  19132. }, t.prototype.walk = function (e) {
  19133. g(this.children, e)
  19134. }, t
  19135. }(o);
  19136. t.TextmateSnippet = f;
  19137. var m = function () {
  19138. function e() {
  19139. this._scanner = new i, this._token = {type: 14, pos: 0, len: 0}
  19140. }
  19141. return e.escape = function (e) {
  19142. return e.replace(/\$|}|\\/g, "\\$&")
  19143. }, e.prototype.parse = function (e, t, n) {
  19144. this._scanner.text(e), this._token = this._scanner.next();
  19145. for (var i = new f; this._parse(i);) ;
  19146. var o = new Map, r = [], s = 0;
  19147. i.walk((function (e) {
  19148. return e instanceof u && (s += 1, e.isFinalTabstop ? o.set(0, void 0) : !o.has(e.index) && e.children.length > 0 ? o.set(e.index, e.children) : r.push(e)), !0
  19149. }));
  19150. for (var a = 0, l = r; a < l.length; a++) {
  19151. var d = l[a], c = o.get(d.index);
  19152. if (c) {
  19153. var h = new u(d.index);
  19154. h.transform = d.transform;
  19155. for (var p = 0, g = c; p < g.length; p++) {
  19156. var m = g[p];
  19157. h.appendChild(m.clone())
  19158. }
  19159. i.replace(d, [h])
  19160. }
  19161. }
  19162. return n || (n = s > 0 && t), !o.has(0) && n && i.appendChild(new u(0)), i
  19163. }, e.prototype._accept = function (e, t) {
  19164. if (void 0 === e || this._token.type === e) {
  19165. var n = !t || this._scanner.tokenText(this._token)
  19166. ;
  19167. return this._token = this._scanner.next(), n
  19168. }
  19169. return !1
  19170. }, e.prototype._backTo = function (e) {
  19171. return this._scanner.pos = e.pos + e.len, this._token = e, !1
  19172. }, e.prototype._until = function (e) {
  19173. for (var t = this._token; this._token.type !== e;) {
  19174. if (14 === this._token.type) return !1;
  19175. if (5 === this._token.type) {
  19176. var n = this._scanner.next();
  19177. if (0 !== n.type && 4 !== n.type && 5 !== n.type) return !1
  19178. }
  19179. this._token = this._scanner.next()
  19180. }
  19181. var i = this._scanner.value.substring(t.pos, this._token.pos).replace(/\\(\$|}|\\)/g, "$1");
  19182. return this._token = this._scanner.next(), i
  19183. }, e.prototype._parse = function (e) {
  19184. return this._parseEscaped(e) || this._parseTabstopOrVariableName(e) || this._parseComplexPlaceholder(e) || this._parseComplexVariable(e) || this._parseAnything(e)
  19185. }, e.prototype._parseEscaped = function (e) {
  19186. var t;
  19187. return !!(t = this._accept(5, !0)) && (t = this._accept(0, !0) || this._accept(4, !0) || this._accept(5, !0) || t, e.appendChild(new s(t)), !0)
  19188. }, e.prototype._parseTabstopOrVariableName = function (e) {
  19189. var t, n = this._token
  19190. ;
  19191. return this._accept(0) && (t = this._accept(9, !0) || this._accept(8, !0)) ? (e.appendChild(/^\d+$/.test(t) ? new u(Number(t)) : new p(t)), !0) : this._backTo(n)
  19192. }, e.prototype._parseComplexPlaceholder = function (e) {
  19193. var t, n = this._token;
  19194. if (!(this._accept(0) && this._accept(3) && (t = this._accept(8, !0)))) return this._backTo(n);
  19195. var i = new u(Number(t));
  19196. if (this._accept(1)) for (; ;) {
  19197. if (this._accept(4)) return e.appendChild(i), !0;
  19198. if (!this._parse(i)) return e.appendChild(new s("${" + t + ":")), i.children.forEach(e.appendChild, e), !0
  19199. } else {
  19200. if (!(i.index > 0 && this._accept(7))) return this._accept(6) ? this._parseTransform(i) ? (e.appendChild(i), !0) : (this._backTo(n), !1) : this._accept(4) ? (e.appendChild(i), !0) : this._backTo(n);
  19201. for (var o = new d; ;) {
  19202. if (this._parseChoiceElement(o)) {
  19203. if (this._accept(2)) continue;
  19204. if (this._accept(7) && (i.appendChild(o), this._accept(4))) return e.appendChild(i), !0
  19205. }
  19206. return this._backTo(n), !1
  19207. }
  19208. }
  19209. }, e.prototype._parseChoiceElement = function (e) {
  19210. for (var t = this._token, n = []; 2 !== this._token.type && 7 !== this._token.type;) {
  19211. var i = void 0
  19212. ;
  19213. if (!(i = (i = this._accept(5, !0)) ? this._accept(2, !0) || this._accept(7, !0) || this._accept(5, !0) || i : this._accept(void 0, !0))) return this._backTo(t), !1;
  19214. n.push(i)
  19215. }
  19216. return 0 === n.length ? (this._backTo(t), !1) : (e.appendChild(new s(n.join(""))), !0)
  19217. }, e.prototype._parseComplexVariable = function (e) {
  19218. var t, n = this._token;
  19219. if (!(this._accept(0) && this._accept(3) && (t = this._accept(9, !0)))) return this._backTo(n);
  19220. var i = new p(t);
  19221. if (!this._accept(1)) return this._accept(6) ? this._parseTransform(i) ? (e.appendChild(i), !0) : (this._backTo(n), !1) : this._accept(4) ? (e.appendChild(i), !0) : this._backTo(n);
  19222. for (; ;) {
  19223. if (this._accept(4)) return e.appendChild(i), !0;
  19224. if (!this._parse(i)) return e.appendChild(new s("${" + t + ":")), i.children.forEach(e.appendChild, e), !0
  19225. }
  19226. }, e.prototype._parseTransform = function (e) {
  19227. for (var t = new c, n = "", i = ""; !this._accept(6);) {
  19228. var o = void 0;
  19229. if (o = this._accept(5, !0)) n += o = this._accept(6, !0) || o; else {
  19230. if (14 === this._token.type) return !1;
  19231. n += this._accept(void 0, !0)
  19232. }
  19233. }
  19234. for (; !this._accept(6);) {
  19235. o = void 0
  19236. ;
  19237. if (o = this._accept(5, !0)) o = this._accept(5, !0) || this._accept(6, !0) || o, t.appendChild(new s(o)); else if (!this._parseFormatString(t) && !this._parseAnything(t)) return !1
  19238. }
  19239. for (; !this._accept(4);) {
  19240. if (14 === this._token.type) return !1;
  19241. i += this._accept(void 0, !0)
  19242. }
  19243. try {
  19244. t.regexp = new RegExp(n, i)
  19245. } catch (e) {
  19246. return !1
  19247. }
  19248. return e.transform = t, !0
  19249. }, e.prototype._parseFormatString = function (e) {
  19250. var t = this._token;
  19251. if (!this._accept(0)) return !1;
  19252. var n = !1;
  19253. this._accept(3) && (n = !0);
  19254. var i = this._accept(8, !0);
  19255. if (!i) return this._backTo(t), !1;
  19256. if (!n) return e.appendChild(new h(Number(i))), !0;
  19257. if (this._accept(4)) return e.appendChild(new h(Number(i))), !0;
  19258. if (!this._accept(1)) return this._backTo(t), !1;
  19259. if (this._accept(6)) {
  19260. var o = this._accept(9, !0);
  19261. return o && this._accept(4) ? (e.appendChild(new h(Number(i), o)), !0) : (this._backTo(t), !1)
  19262. }
  19263. if (this._accept(11)) {
  19264. if (r = this._until(4)) return e.appendChild(new h(Number(i), void 0, r, void 0)), !0
  19265. } else if (this._accept(12)) {
  19266. if (s = this._until(4)) return e.appendChild(new h(Number(i), void 0, void 0, s)), !0
  19267. } else if (this._accept(13)) {
  19268. var r
  19269. ;
  19270. if (r = this._until(1)) if (s = this._until(4)) return e.appendChild(new h(Number(i), void 0, r, s)), !0
  19271. } else {
  19272. var s;
  19273. if (s = this._until(4)) return e.appendChild(new h(Number(i), void 0, void 0, s)), !0
  19274. }
  19275. return this._backTo(t), !1
  19276. }, e.prototype._parseAnything = function (e) {
  19277. return 14 !== this._token.type && (e.appendChild(new s(this._scanner.tokenText(this._token))), this._accept(void 0), !0)
  19278. }, e
  19279. }();
  19280. t.SnippetParser = m
  19281. })), define(n[389], i([0, 1, 61, 5]), (function (e, t, n, i) {
  19282. "use strict";
  19283. Object.defineProperty(t, "__esModule", {value: !0});
  19284. var o = function (e, t) {
  19285. this.leadingLineContent = e, this.characterCountDelta = t
  19286. };
  19287. t.LineContext = o;
  19288. var r = function () {
  19289. function e(t, n, i, o, r, s) {
  19290. this._snippetCompareFn = e._compareCompletionItems, this._items = t, this._column = n, this._wordDistance = o, this._options = r, this._refilterKind = 1, this._lineContext = i, "top" === s ? this._snippetCompareFn = e._compareCompletionItemsSnippetsUp : "bottom" === s && (this._snippetCompareFn = e._compareCompletionItemsSnippetsDown)
  19291. }
  19292. return Object.defineProperty(e.prototype, "lineContext", {
  19293. get: function () {
  19294. return this._lineContext
  19295. }, set: function (e) {
  19296. this._lineContext.leadingLineContent === e.leadingLineContent && this._lineContext.characterCountDelta === e.characterCountDelta || (this._refilterKind = this._lineContext.characterCountDelta < e.characterCountDelta && this._filteredItems ? 2 : 1, this._lineContext = e)
  19297. }, enumerable: !0, configurable: !0
  19298. }), Object.defineProperty(e.prototype, "items", {
  19299. get: function () {
  19300. return this._ensureCachedState(), this._filteredItems
  19301. }, enumerable: !0, configurable: !0
  19302. }), Object.defineProperty(e.prototype, "incomplete", {
  19303. get: function () {
  19304. return this._ensureCachedState(), this._isIncomplete
  19305. }, enumerable: !0, configurable: !0
  19306. }), e.prototype.adopt = function (e) {
  19307. for (var t = new Array, n = 0; n < this._items.length;) e.has(this._items[n].provider) ? n++ : (t.push(this._items[n]), this._items[n] = this._items[this._items.length - 1], this._items.pop());
  19308. return this._refilterKind = 1, t
  19309. }, Object.defineProperty(e.prototype, "stats", {
  19310. get: function () {
  19311. return this._ensureCachedState(), this._stats
  19312. }, enumerable: !0, configurable: !0
  19313. }),
  19314. e.prototype._ensureCachedState = function () {
  19315. 0 !== this._refilterKind && this._createCachedState()
  19316. }, e.prototype._createCachedState = function () {
  19317. this._isIncomplete = new Set, this._stats = {suggestionCount: 0, snippetCount: 0, textCount: 0};
  19318. for (var e = this._lineContext, t = e.leadingLineContent, o = e.characterCountDelta, r = "", s = "", a = 1 === this._refilterKind ? this._items : this._filteredItems, l = [], u = !this._options.filterGraceful || a.length > 2e3 ? n.fuzzyScore : n.fuzzyScoreGracefulAggressive, d = 0; d < a.length; d++) {
  19319. var c = a[d];
  19320. c.container.incomplete && this._isIncomplete.add(c.provider);
  19321. var h = c.position.column - c.editStart.column, p = h + o - (c.position.column - this._column);
  19322. if (r.length !== p && (s = (r = 0 === p ? "" : t.slice(-p)).toLowerCase()), c.word = r, 0 === p) c.score = n.FuzzyScore.Default; else {
  19323. for (var g = 0; g < h;) {
  19324. var f = r.charCodeAt(g);
  19325. if (32 !== f && 9 !== f) break;
  19326. g += 1
  19327. }
  19328. var m = "string" == typeof c.completion.label ? c.completion.label : c.completion.label.name;
  19329. if (g >= p) c.score = n.FuzzyScore.Default; else if ("string" == typeof c.completion.filterText) {
  19330. if (!(v = u(r, s, g, c.completion.filterText, c.filterTextLow, 0, !1))) continue;
  19331. 0 === i.compareIgnoreCase(c.completion.filterText, m) ? c.score = v : (c.score = n.anyScore(r, s, g, m, c.labelLow, 0), c.score[0] = v[0])
  19332. } else {
  19333. var v;
  19334. if (!(v = u(r, s, g, m, c.labelLow, 0, !1))) continue;
  19335. c.score = v
  19336. }
  19337. }
  19338. switch (c.idx = d, c.distance = this._wordDistance.distance(c.position, c.completion), l.push(c), this._stats.suggestionCount++, c.completion.kind) {
  19339. case 25:
  19340. this._stats.snippetCount++;
  19341. break;
  19342. case 18:
  19343. this._stats.textCount++
  19344. }
  19345. }
  19346. this._filteredItems = l.sort(this._snippetCompareFn), this._refilterKind = 0
  19347. }, e._compareCompletionItems = function (e, t) {
  19348. return e.score[0] > t.score[0] ? -1 : e.score[0] < t.score[0] ? 1 : e.distance < t.distance ? -1 : e.distance > t.distance ? 1 : e.idx < t.idx ? -1 : e.idx > t.idx ? 1 : 0
  19349. }, e._compareCompletionItemsSnippetsDown = function (t, n) {
  19350. if (t.completion.kind !== n.completion.kind) {
  19351. if (25 === t.completion.kind) return 1;
  19352. if (25 === n.completion.kind) return -1
  19353. }
  19354. return e._compareCompletionItems(t, n)
  19355. }, e._compareCompletionItemsSnippetsUp = function (t, n) {
  19356. if (t.completion.kind !== n.completion.kind) {
  19357. if (25 === t.completion.kind) return -1;
  19358. if (25 === n.completion.kind) return 1
  19359. }
  19360. return e._compareCompletionItems(t, n)
  19361. }, e
  19362. }();
  19363. t.CompletionModel = r
  19364. })), define(n[390], i([0, 1, 19, 2, 79]), (function (e, t, n, i, o) {
  19365. "use strict";
  19366. Object.defineProperty(t, "__esModule", {value: !0});
  19367. var r = function () {
  19368. function e(e, t, n) {
  19369. var o = this;
  19370. this._disposables = new i.DisposableStore, this._disposables.add(t.onDidShow((function () {
  19371. return o._onItem(t.getFocusedItem())
  19372. }))), this._disposables.add(t.onDidFocus(this._onItem, this)), this._disposables.add(t.onDidHide(this.reset, this)), this._disposables.add(e.onWillType((function (i) {
  19373. if (o._active && !t.isFrozen()) {
  19374. var r = i.charCodeAt(i.length - 1);
  19375. o._active.acceptCharacters.has(r) && e.getOption(0) && n(o._active.item)
  19376. }
  19377. })))
  19378. }
  19379. return e.prototype._onItem = function (e) {
  19380. if (e && n.isNonEmptyArray(e.item.completion.commitCharacters)) {
  19381. if (!this._active || this._active.item.item !== e.item) {
  19382. for (var t = new o.CharacterSet, i = 0, r = e.item.completion.commitCharacters; i < r.length; i++) {
  19383. var s = r[i];
  19384. s.length > 0 && t.add(s.charCodeAt(0))
  19385. }
  19386. this._active = {
  19387. acceptCharacters: t, item: e
  19388. }
  19389. }
  19390. } else this.reset()
  19391. }, e.prototype.reset = function () {
  19392. this._active = void 0
  19393. }, e.prototype.dispose = function () {
  19394. this._disposables.dispose()
  19395. }, e
  19396. }();
  19397. t.CommitCharacterController = r
  19398. })), define(n[391], i([0, 1, 2, 3, 4, 52]), (function (e, t, n, i, o, s) {
  19399. "use strict";
  19400. Object.defineProperty(t, "__esModule", {value: !0});
  19401. var a = function () {
  19402. function e(e) {
  19403. var t = this;
  19404. this._controller = e, this._disposables = new n.DisposableStore, this._decorations = [], this._disposables.add(e.model.onDidSuggest((function (e) {
  19405. if (!e.shy) {
  19406. var n = t._controller.widget.getValue(), i = n.getFocusedItem();
  19407. i && t._highlight(i.item), t._widgetListener || (t._widgetListener = n.onDidFocus((function (e) {
  19408. return t._highlight(e.item)
  19409. })))
  19410. }
  19411. }))), this._disposables.add(e.model.onDidCancel((function () {
  19412. t._reset()
  19413. })))
  19414. }
  19415. return e.prototype.dispose = function () {
  19416. this._reset(), this._disposables.dispose(), n.dispose(this._widgetListener), n.dispose(this._shiftKeyListener)
  19417. }, e.prototype._reset = function () {
  19418. this._decorations = this._controller.editor.deltaDecorations(this._decorations, []),
  19419. this._shiftKeyListener && (this._shiftKeyListener.dispose(), this._shiftKeyListener = void 0)
  19420. }, e.prototype._highlight = function (e) {
  19421. var t, n = this;
  19422. this._currentItem = e;
  19423. var o = this._controller.editor.getOption(89), r = [];
  19424. if (o.insertHighlight) {
  19425. this._shiftKeyListener || (this._shiftKeyListener = l.event((function () {
  19426. return n._highlight(n._currentItem)
  19427. })));
  19428. var s = this._controller.getOverwriteInfo(e, l.isPressed),
  19429. a = this._controller.editor.getPosition();
  19430. if ("insert" === o.insertMode && s.overwriteAfter > 0) r = [{
  19431. range: new i.Range(a.lineNumber, a.column, a.lineNumber, a.column + s.overwriteAfter),
  19432. options: {inlineClassName: "suggest-insert-unexpected"}
  19433. }]; else if ("replace" === o.insertMode && 0 === s.overwriteAfter) {
  19434. var u = null === (t = this._controller.editor.getModel()) || void 0 === t ? void 0 : t.getWordAtPosition(a);
  19435. u && u.endColumn > a.column && (r = [{
  19436. range: new i.Range(a.lineNumber, a.column, a.lineNumber, u.endColumn),
  19437. options: {inlineClassName: "suggest-insert-unexpected"}
  19438. }])
  19439. }
  19440. }
  19441. this._decorations = this._controller.editor.deltaDecorations(this._decorations, r)
  19442. }, e
  19443. }()
  19444. ;t.SuggestRangeHighlighter = a;
  19445. var l = new (function (e) {
  19446. function t() {
  19447. var t = e.call(this) || this;
  19448. return t._subscriptions = new n.DisposableStore, t._isPressed = !1, t._subscriptions.add(s.domEvent(document.body, "keydown")((function (e) {
  19449. return t.isPressed = e.shiftKey
  19450. }))), t._subscriptions.add(s.domEvent(document.body, "keyup")((function () {
  19451. return t.isPressed = !1
  19452. }))), t._subscriptions.add(s.domEvent(document.body, "mouseleave")((function () {
  19453. return t.isPressed = !1
  19454. }))), t._subscriptions.add(s.domEvent(document.body, "blur")((function () {
  19455. return t.isPressed = !1
  19456. }))), t
  19457. }
  19458. return r(t, e), Object.defineProperty(t.prototype, "isPressed", {
  19459. get: function () {
  19460. return this._isPressed
  19461. }, set: function (e) {
  19462. this._isPressed !== e && (this._isPressed = e, this.fire(e))
  19463. }, enumerable: !0, configurable: !0
  19464. }), t.prototype.dispose = function () {
  19465. this._subscriptions.dispose(), e.prototype.dispose.call(this)
  19466. }, t
  19467. }(o.Emitter))
  19468. })), define(n[392], i([0, 1, 19, 3, 202]), (function (e, t, n, i, o) {
  19469. "use strict";
  19470. Object.defineProperty(t, "__esModule", {value: !0});
  19471. var s = function () {
  19472. function e() {
  19473. }
  19474. return e.create = function (t, s) {
  19475. return d(this, void 0, void 0, (function () {
  19476. var a, l, u, d;
  19477. return c(this, (function (c) {
  19478. switch (c.label) {
  19479. case 0:
  19480. return s.getOption(89).localityBonus && s.hasModel() ? (a = s.getModel(), l = s.getPosition(), t.canComputeWordRanges(a.uri) ? [4, (new o.BracketSelectionRangeProvider).provideSelectionRanges(a, [l])] : [2, e.None]) : [2, e.None];
  19481. case 1:
  19482. return (u = c.sent()) && 0 !== u.length && 0 !== u[0].length ? [4, t.computeWordRanges(a.uri, u[0][0].range)] : [2, e.None];
  19483. case 2:
  19484. return d = c.sent(), [2, new (function (e) {
  19485. function t() {
  19486. return null !== e && e.apply(this, arguments) || this
  19487. }
  19488. return r(t, e), t.prototype.distance = function (e, t) {
  19489. if (!d || !l.equals(s.getPosition())) return 0;
  19490. if (17 === t.kind) return 2 << 20;
  19491. var o = "string" == typeof t.label ? t.label : t.label.name, r = d[o];
  19492. if (n.isFalsyOrEmpty(r)) return 2 << 20;
  19493. for (var a = n.binarySearch(r, i.Range.fromPositions(e), i.Range.compareRangesUsingStarts), c = a >= 0 ? r[a] : r[Math.max(0, ~a - 1)], h = u.length, p = 0, g = u[0]; p < g.length; p++) {
  19494. var f = g[p];
  19495. if (!i.Range.containsRange(f.range, c)) break;
  19496. h -= 1
  19497. }
  19498. return h
  19499. }, t
  19500. }(e))]
  19501. }
  19502. }))
  19503. }))
  19504. },
  19505. e.None = new (function (e) {
  19506. function t() {
  19507. return null !== e && e.apply(this, arguments) || this
  19508. }
  19509. return r(t, e), t.prototype.distance = function () {
  19510. return 0
  19511. }, t
  19512. }(e)), e
  19513. }();
  19514. t.WordDistance = s
  19515. })), define(n[203], i([0, 1]), (function (e, t) {
  19516. "use strict";
  19517. function n(e) {
  19518. return Array.isArray(e)
  19519. }
  19520. function i(e) {
  19521. return "string" == typeof e
  19522. }
  19523. function o(e) {
  19524. return !e
  19525. }
  19526. function r(e, t) {
  19527. return e.ignoreCase && t ? t.toLowerCase() : t
  19528. }
  19529. Object.defineProperty(t, "__esModule", {value: !0}), t.isFuzzyActionArr = n, t.isFuzzyAction = function (e) {
  19530. return !n(e)
  19531. }, t.isString = i, t.isIAction = function (e) {
  19532. return !i(e)
  19533. }, t.empty = o, t.fixCase = r, t.sanitize = function (e) {
  19534. return e.replace(/[&<>'"_]/g, "-")
  19535. }, t.log = function (e, t) {
  19536. console.log(e.languageId + ": " + t)
  19537. }, t.createError = function (e, t) {
  19538. return new Error(e.languageId + ": " + t)
  19539. }, t.substituteMatches = function (e, t, n, i, s) {
  19540. var a = null;
  19541. return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g, (function (t, l, u, d, c, h, p, g, f) {
  19542. return o(u) ? o(d) ? !o(c) && c < i.length ? r(e, i[c]) : !o(p) && e && "string" == typeof e[p] ? e[p] : (null === a && (a = s.split(".")).unshift(s),
  19543. !o(h) && h < a.length ? r(e, a[h]) : "") : r(e, n) : "$"
  19544. }))
  19545. }, t.findRules = function (e, t) {
  19546. for (var n = t; n && n.length > 0;) {
  19547. var i = e.tokenizer[n];
  19548. if (i) return i;
  19549. var o = n.lastIndexOf(".");
  19550. n = o < 0 ? null : n.substr(0, o)
  19551. }
  19552. return null
  19553. }, t.stateExists = function (e, t) {
  19554. for (var n = t; n && n.length > 0;) {
  19555. if (e.stateNames[n]) return !0;
  19556. var i = n.lastIndexOf(".");
  19557. n = i < 0 ? null : n.substr(0, i)
  19558. }
  19559. return !1
  19560. }
  19561. })), define(n[393], i([0, 1, 203]), (function (e, t, n) {
  19562. "use strict";
  19563. function i(e, t) {
  19564. return "boolean" == typeof e ? e : t
  19565. }
  19566. function o(e, t) {
  19567. return "string" == typeof e ? e : t
  19568. }
  19569. function r(e, t) {
  19570. void 0 === t && (t = !1), t && (e = e.map((function (e) {
  19571. return e.toLowerCase()
  19572. })));
  19573. var n = function (e) {
  19574. for (var t = {}, n = 0, i = e; n < i.length; n++) {
  19575. t[i[n]] = !0
  19576. }
  19577. return t
  19578. }(e);
  19579. return t ? function (e) {
  19580. return void 0 !== n[e.toLowerCase()] && n.hasOwnProperty(e.toLowerCase())
  19581. } : function (e) {
  19582. return void 0 !== n[e] && n.hasOwnProperty(e)
  19583. }
  19584. }
  19585. function s(e, t) {
  19586. for (var i = 0; t.indexOf("@") >= 0 && i < 5;) i++, t = t.replace(/@(\w+)/g, (function (i, o) {
  19587. var r = "";
  19588. if ("string" == typeof e[o]) r = e[o]; else {
  19589. if (!(e[o] && e[o] instanceof RegExp)) throw void 0 === e[o] ? n.createError(e, "language definition does not contain attribute '" + o + "', used at: " + t) : n.createError(e, "attribute reference '" + o + "' must be a string, used at: " + t);
  19590. r = e[o].source
  19591. }
  19592. return n.empty(r) ? "" : "(?:" + r + ")"
  19593. }));
  19594. return new RegExp(t, e.ignoreCase ? "i" : "")
  19595. }
  19596. function a(e, t, i, o) {
  19597. var a = -1, l = i, u = i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);
  19598. u && (u[3] && (a = parseInt(u[3]), u[2] && (a += 100)), l = u[4]);
  19599. var d, c = "~", h = l;
  19600. if (l && 0 !== l.length ? /^\w*$/.test(h) ? c = "==" : (u = l.match(/^(@|!@|~|!~|==|!=)(.*)$/)) && (c = u[1], h = u[2]) : (c = "!=", h = ""), "~" !== c && "!~" !== c || !/^(\w|\|)*$/.test(h)) if ("@" === c || "!@" === c) {
  19601. var p = e[h];
  19602. if (!p) throw n.createError(e, "the @ match target '" + h + "' is not defined, in rule: " + t);
  19603. if (!function (e, t) {
  19604. if (!t) return !1;
  19605. if (!Array.isArray(t)) return !1;
  19606. for (var n = 0, i = t; n < i.length; n++) {
  19607. if (!e(i[n])) return !1
  19608. }
  19609. return !0
  19610. }((function (e) {
  19611. return "string" == typeof e
  19612. }), p)) throw n.createError(e, "the @ match target '" + h + "' must be an array of strings, in rule: " + t);
  19613. var g = r(p, e.ignoreCase);
  19614. d = function (e) {
  19615. return "@" === c ? g(e) : !g(e)
  19616. }
  19617. } else if ("~" === c || "!~" === c) if (h.indexOf("$") < 0) {
  19618. var f = s(e, "^" + h + "$");
  19619. d = function (e) {
  19620. return "~" === c ? f.test(e) : !f.test(e)
  19621. }
  19622. } else d = function (t, i, o, r) {
  19623. return s(e, "^" + n.substituteMatches(e, h, i, o, r) + "$").test(t)
  19624. }; else if (h.indexOf("$") < 0) {
  19625. var m = n.fixCase(e, h);
  19626. d = function (e) {
  19627. return "==" === c ? e === m : e !== m
  19628. }
  19629. } else {
  19630. var v = n.fixCase(e, h);
  19631. d = function (t, i, o, r, s) {
  19632. var a = n.substituteMatches(e, v, i, o, r);
  19633. return "==" === c ? t === a : t !== a
  19634. }
  19635. } else {
  19636. var _ = r(h.split("|"), e.ignoreCase);
  19637. d = function (e) {
  19638. return "~" === c ? _(e) : !_(e)
  19639. }
  19640. }
  19641. return -1 === a ? {
  19642. name: i, value: o, test: function (e, t, n, i) {
  19643. return d(e, e, t, n, i)
  19644. }
  19645. } : {
  19646. name: i, value: o, test: function (e, t, n, i) {
  19647. var o = function (e, t, n, i) {
  19648. if (i < 0) return e;
  19649. if (i < t.length) return t[i];
  19650. if (i >= 100) {
  19651. i -= 100;
  19652. var o = n.split(".");
  19653. if (o.unshift(n), i < o.length) return o[i]
  19654. }
  19655. return null
  19656. }(e, t, n, a);
  19657. return d(o || "", e, t, n, i)
  19658. }
  19659. }
  19660. }
  19661. Object.defineProperty(t, "__esModule", {value: !0});
  19662. var l = function () {
  19663. function e(e) {
  19664. this.regex = new RegExp(""), this.action = {token: ""}, this.matchOnlyAtLineStart = !1, this.name = "", this.name = e
  19665. }
  19666. return e.prototype.setRegex = function (e, t) {
  19667. var i;
  19668. if ("string" == typeof t) i = t; else {
  19669. if (!(t instanceof RegExp)) throw n.createError(e, "rules must start with a match string or regular expression: " + this.name);
  19670. i = t.source
  19671. }
  19672. this.matchOnlyAtLineStart = i.length > 0 && "^" === i[0], this.name = this.name + ": " + i, this.regex = s(e, "^(?:" + (this.matchOnlyAtLineStart ? i.substr(1) : i) + ")")
  19673. }, e.prototype.setAction = function (e, t) {
  19674. this.action = function e(t, i, o) {
  19675. if (o) {
  19676. if ("string" == typeof o) return o;
  19677. if (o.token || "" === o.token) {
  19678. if ("string" != typeof o.token) throw n.createError(t, "a 'token' attribute must be of type string, in rule: " + i);
  19679. var r = {token: o.token};
  19680. if (o.token.indexOf("$") >= 0 && (r.tokenSubst = !0), "string" == typeof o.bracket) if ("@open" === o.bracket) r.bracket = 1; else {
  19681. if ("@close" !== o.bracket) throw n.createError(t, "a 'bracket' attribute must be either '@open' or '@close', in rule: " + i);
  19682. r.bracket = -1
  19683. }
  19684. if (o.next) {
  19685. if ("string" != typeof o.next) throw n.createError(t, "the next state must be a string value in rule: " + i);
  19686. var s = o.next
  19687. ;
  19688. if (!/^(@pop|@push|@popall)$/.test(s) && ("@" === s[0] && (s = s.substr(1)), s.indexOf("$") < 0 && !n.stateExists(t, n.substituteMatches(t, s, "", [], "")))) throw n.createError(t, "the next state '" + o.next + "' is not defined in rule: " + i);
  19689. r.next = s
  19690. }
  19691. return "number" == typeof o.goBack && (r.goBack = o.goBack), "string" == typeof o.switchTo && (r.switchTo = o.switchTo), "string" == typeof o.log && (r.log = o.log), "string" == typeof o.nextEmbedded && (r.nextEmbedded = o.nextEmbedded, t.usesEmbedded = !0), r
  19692. }
  19693. if (Array.isArray(o)) {
  19694. for (var l = [], u = 0, d = o.length; u < d; u++) l[u] = e(t, i, o[u]);
  19695. return {group: l}
  19696. }
  19697. if (o.cases) {
  19698. var c = [];
  19699. for (var h in o.cases) if (o.cases.hasOwnProperty(h)) {
  19700. var p = e(t, i, o.cases[h]);
  19701. "@default" === h || "@" === h || "" === h ? c.push({
  19702. test: void 0,
  19703. value: p,
  19704. name: h
  19705. }) : "@eos" === h ? c.push({
  19706. test: function (e, t, n, i) {
  19707. return i
  19708. }, value: p, name: h
  19709. }) : c.push(a(t, i, h, p))
  19710. }
  19711. var g = t.defaultToken;
  19712. return {
  19713. test: function (e, t, n, i) {
  19714. for (var o = 0, r = c; o < r.length; o++) {
  19715. var s = r[o];
  19716. if (!s.test || s.test(e, t, n, i)) return s.value
  19717. }
  19718. return g
  19719. }
  19720. }
  19721. }
  19722. throw n.createError(t, "an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: " + i)
  19723. }
  19724. return {token: ""}
  19725. }(e, this.name, t)
  19726. }, e
  19727. }();
  19728. t.compile = function (e, t) {
  19729. if (!t || "object" != typeof t) throw new Error("Monarch: expecting a language definition object");
  19730. var r = {};
  19731. r.languageId = e, r.noThrow = !1, r.maxStack = 100, r.start = "string" == typeof t.start ? t.start : null, r.ignoreCase = i(t.ignoreCase, !1), r.tokenPostfix = o(t.tokenPostfix, "." + r.languageId), r.defaultToken = o(t.defaultToken, "source"), r.usesEmbedded = !1;
  19732. var s = t;
  19733. function a(e, o, u) {
  19734. for (var d = 0, c = u; d < c.length; d++) {
  19735. var h = c[d], p = h.include;
  19736. if (p && "string" == typeof p) {
  19737. if ("string" != typeof p) throw n.createError(r, "an 'include' attribute must be a string at: " + e);
  19738. if ("@" === p[0] && (p = p.substr(1)), !t.tokenizer[p]) throw n.createError(r, "include target '" + p + "' is not defined at: " + e);
  19739. a(e + "." + p, o, t.tokenizer[p])
  19740. } else {
  19741. var g = new l(e);
  19742. if (Array.isArray(h) && h.length >= 1 && h.length <= 3) if (g.setRegex(s, h[0]), h.length >= 3) if ("string" == typeof h[1]) g.setAction(s, {
  19743. token: h[1], next: h[2]
  19744. }); else {
  19745. if ("object" != typeof h[1]) throw n.createError(r, "a next state as the last element of a rule can only be given if the action is either an object or a string, at: " + e);
  19746. var f = h[1];
  19747. f.next = h[2], g.setAction(s, f)
  19748. } else g.setAction(s, h[1]); else {
  19749. if (!h.regex) throw n.createError(r, "a rule must either be an array, or an object with a 'regex' or 'include' field at: " + e);
  19750. h.name && "string" == typeof h.name && (g.name = h.name), h.matchOnlyAtStart && (g.matchOnlyAtLineStart = i(h.matchOnlyAtLineStart, !1)), g.setRegex(s, h.regex), g.setAction(s, h.action)
  19751. }
  19752. o.push(g)
  19753. }
  19754. }
  19755. }
  19756. if (s.languageId = e, s.ignoreCase = r.ignoreCase, s.noThrow = r.noThrow, s.usesEmbedded = r.usesEmbedded, s.stateNames = t.tokenizer, s.defaultToken = r.defaultToken, !t.tokenizer || "object" != typeof t.tokenizer) throw n.createError(r, "a language definition must define the 'tokenizer' attribute as an object");
  19757. for (var u in r.tokenizer = [], t.tokenizer) if (t.tokenizer.hasOwnProperty(u)) {
  19758. r.start || (r.start = u);
  19759. var d = t.tokenizer[u];
  19760. r.tokenizer[u] = new Array, a("tokenizer." + u, r.tokenizer[u], d)
  19761. }
  19762. if (r.usesEmbedded = s.usesEmbedded, t.brackets) {
  19763. if (!Array.isArray(t.brackets)) throw n.createError(r, "the 'brackets' attribute must be defined as an array")
  19764. } else t.brackets = [{open: "{", close: "}", token: "delimiter.curly"}, {
  19765. open: "[",
  19766. close: "]",
  19767. token: "delimiter.square"
  19768. }, {open: "(", close: ")", token: "delimiter.parenthesis"}, {
  19769. open: "<",
  19770. close: ">",
  19771. token: "delimiter.angle"
  19772. }];
  19773. for (var c = [], h = 0, p = t.brackets; h < p.length; h++) {
  19774. var g = p[h];
  19775. if (g && Array.isArray(g) && 3 === g.length && (g = {
  19776. token: g[2],
  19777. open: g[0],
  19778. close: g[1]
  19779. }), g.open === g.close) throw n.createError(r, "open and close brackets in a 'brackets' attribute must be different: " + g.open + "\n hint: use the 'bracket' attribute if matching on equal brackets is required.");
  19780. if ("string" != typeof g.open || "string" != typeof g.token || "string" != typeof g.close) throw n.createError(r, "every element in the 'brackets' array must be a '{open,close,token}' object or array");
  19781. c.push({token: g.token + r.tokenPostfix, open: n.fixCase(r, g.open), close: n.fixCase(r, g.close)})
  19782. }
  19783. return r.brackets = c, r.noThrow = !0, r
  19784. }
  19785. })),
  19786. define(n[394], i([7, 8]), (function (e, t) {
  19787. return e.create("vs/base/browser/ui/actionbar/actionbar", t)
  19788. })), define(n[70], i([0, 1, 16, 394, 2, 55, 6, 21, 57, 56, 4, 98, 24, 259]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p) {
  19789. "use strict";
  19790. Object.defineProperty(t, "__esModule", {value: !0});
  19791. var g = function (e) {
  19792. function t(t, n, i) {
  19793. var o = e.call(this) || this;
  19794. return o.options = i, o._context = t || o, o._action = n, n instanceof s.Action && o._register(n.onDidChange((function (e) {
  19795. o.element && o.handleActionChangeEvent(e)
  19796. }))), o
  19797. }
  19798. return r(t, e), t.prototype.handleActionChangeEvent = function (e) {
  19799. void 0 !== e.enabled && this.updateEnabled(), void 0 !== e.checked && this.updateChecked(), void 0 !== e.class && this.updateClass(), void 0 !== e.label && (this.updateLabel(), this.updateTooltip()), void 0 !== e.tooltip && this.updateTooltip()
  19800. }, Object.defineProperty(t.prototype, "actionRunner", {
  19801. get: function () {
  19802. return this._actionRunner || (this._actionRunner = this._register(new s.ActionRunner)), this._actionRunner
  19803. }, set: function (e) {
  19804. this._actionRunner = e
  19805. }, enumerable: !0, configurable: !0
  19806. }),
  19807. t.prototype.getAction = function () {
  19808. return this._action
  19809. }, t.prototype.isEnabled = function () {
  19810. return this._action.enabled
  19811. }, t.prototype.setActionContext = function (e) {
  19812. this._context = e
  19813. }, t.prototype.render = function (e) {
  19814. var t = this, i = this.element = e;
  19815. this._register(u.Gesture.addTarget(e));
  19816. var o = this.options && this.options.draggable;
  19817. o && (e.draggable = !0, p.isFirefox && this._register(a.addDisposableListener(e, a.EventType.DRAG_START, (function (e) {
  19818. var n;
  19819. return null === (n = e.dataTransfer) || void 0 === n ? void 0 : n.setData(h.DataTransfers.TEXT, t._action.label)
  19820. })))), this._register(a.addDisposableListener(i, u.EventType.Tap, (function (e) {
  19821. return t.onClick(e)
  19822. }))), this._register(a.addDisposableListener(i, a.EventType.MOUSE_DOWN, (function (e) {
  19823. o || a.EventHelper.stop(e, !0), t._action.enabled && 0 === e.button && a.addClass(i, "active")
  19824. }))), this._register(a.addDisposableListener(i, a.EventType.CLICK, (function (e) {
  19825. a.EventHelper.stop(e, !0), t.options && t.options.isMenu ? t.onClick(e) : n.setImmediate((function () {
  19826. return t.onClick(e)
  19827. }))
  19828. }))),
  19829. this._register(a.addDisposableListener(i, a.EventType.DBLCLICK, (function (e) {
  19830. a.EventHelper.stop(e, !0)
  19831. }))), [a.EventType.MOUSE_UP, a.EventType.MOUSE_OUT].forEach((function (e) {
  19832. t._register(a.addDisposableListener(i, e, (function (e) {
  19833. a.EventHelper.stop(e), a.removeClass(i, "active")
  19834. })))
  19835. }))
  19836. }, t.prototype.onClick = function (e) {
  19837. var t;
  19838. a.EventHelper.stop(e, !0), l.isUndefinedOrNull(this._context) ? t = e : (t = this._context, l.isObject(t) && (t.event = e)), this.actionRunner.run(this._action, t)
  19839. }, t.prototype.focus = function () {
  19840. this.element && (this.element.focus(), a.addClass(this.element, "focused"))
  19841. }, t.prototype.blur = function () {
  19842. this.element && (this.element.blur(), a.removeClass(this.element, "focused"))
  19843. }, t.prototype.updateEnabled = function () {
  19844. }, t.prototype.updateLabel = function () {
  19845. }, t.prototype.updateTooltip = function () {
  19846. }, t.prototype.updateClass = function () {
  19847. }, t.prototype.updateChecked = function () {
  19848. }, t.prototype.dispose = function () {
  19849. this.element && (a.removeNode(this.element), this.element = void 0), e.prototype.dispose.call(this)
  19850. }, t
  19851. }(o.Disposable)
  19852. ;t.BaseActionViewItem = g;
  19853. var f = function (e) {
  19854. function t(n) {
  19855. var i = e.call(this, t.ID, n, n ? "separator text" : "separator") || this;
  19856. return i.checked = !1, i.enabled = !1, i
  19857. }
  19858. return r(t, e), t.ID = "vs.actions.separator", t
  19859. }(s.Action);
  19860. t.Separator = f;
  19861. var m = function (e) {
  19862. function t(t, n, i) {
  19863. void 0 === i && (i = {});
  19864. var o = e.call(this, t, n, i) || this;
  19865. return o.options = i, o.options.icon = void 0 !== i.icon && i.icon, o.options.label = void 0 === i.label || i.label, o.cssClass = "", o
  19866. }
  19867. return r(t, e), t.prototype.render = function (t) {
  19868. e.prototype.render.call(this, t), this.element && (this.label = a.append(this.element, a.$("a.action-label"))), this.label && (this._action.id === f.ID ? this.label.setAttribute("role", "presentation") : this.options.isMenu ? this.label.setAttribute("role", "menuitem") : this.label.setAttribute("role", "button")), this.options.label && this.options.keybinding && this.element && (a.append(this.element, a.$("span.keybinding")).textContent = this.options.keybinding), this.updateClass(), this.updateLabel(), this.updateTooltip(), this.updateEnabled(), this.updateChecked()
  19869. },
  19870. t.prototype.focus = function () {
  19871. e.prototype.focus.call(this), this.label && this.label.focus()
  19872. }, t.prototype.updateLabel = function () {
  19873. this.options.label && this.label && (this.label.textContent = this.getAction().label)
  19874. }, t.prototype.updateTooltip = function () {
  19875. var e = null;
  19876. this.getAction().tooltip ? e = this.getAction().tooltip : !this.options.label && this.getAction().label && this.options.icon && (e = this.getAction().label, this.options.keybinding && (e = i.localize(0, null, e, this.options.keybinding))), e && this.label && (this.label.title = e)
  19877. }, t.prototype.updateClass = function () {
  19878. this.cssClass && this.label && a.removeClasses(this.label, this.cssClass), this.options.icon ? (this.cssClass = this.getAction().class, this.label && (a.addClass(this.label, "codicon"), this.cssClass && a.addClasses(this.label, this.cssClass)), this.updateEnabled()) : this.label && a.removeClass(this.label, "codicon")
  19879. }, t.prototype.updateEnabled = function () {
  19880. this.getAction().enabled ? (this.label && (this.label.removeAttribute("aria-disabled"), a.removeClass(this.label, "disabled"), this.label.tabIndex = 0),
  19881. this.element && a.removeClass(this.element, "disabled")) : (this.label && (this.label.setAttribute("aria-disabled", "true"), a.addClass(this.label, "disabled"), a.removeTabIndexAndUpdateFocus(this.label)), this.element && a.addClass(this.element, "disabled"))
  19882. }, t.prototype.updateChecked = function () {
  19883. this.label && (this.getAction().checked ? a.addClass(this.label, "checked") : a.removeClass(this.label, "checked"))
  19884. }, t
  19885. }(g);
  19886. t.ActionViewItem = m;
  19887. var v = {orientation: 0, context: null, triggerKeys: {keys: [3, 10], keyDown: !1}}, _ = function (e) {
  19888. function t(t, n) {
  19889. void 0 === n && (n = v);
  19890. var i, o, r = e.call(this) || this;
  19891. switch (r._onDidBlur = r._register(new c.Emitter), r.onDidBlur = r._onDidBlur.event, r._onDidCancel = r._register(new c.Emitter), r.onDidCancel = r._onDidCancel.event, r._onDidRun = r._register(new c.Emitter), r.onDidRun = r._onDidRun.event, r._onDidBeforeRun = r._register(new c.Emitter), r.onDidBeforeRun = r._onDidBeforeRun.event, r.options = n, r._context = n.context, r.options.triggerKeys || (r.options.triggerKeys = v.triggerKeys),
  19892. r.options.actionRunner ? r._actionRunner = r.options.actionRunner : (r._actionRunner = new s.ActionRunner, r._register(r._actionRunner)), r._register(r._actionRunner.onDidRun((function (e) {
  19893. return r._onDidRun.fire(e)
  19894. }))), r._register(r._actionRunner.onDidBeforeRun((function (e) {
  19895. return r._onDidBeforeRun.fire(e)
  19896. }))), r.viewItems = [], r.focusedItem = void 0, r.domNode = document.createElement("div"), r.domNode.className = "monaco-action-bar", !1 !== n.animated && a.addClass(r.domNode, "animated"), r.options.orientation) {
  19897. case 0:
  19898. i = 15, o = 17;
  19899. break;
  19900. case 1:
  19901. i = 17, o = 15, r.domNode.className += " reverse";
  19902. break;
  19903. case 2:
  19904. i = 16, o = 18, r.domNode.className += " vertical";
  19905. break;
  19906. case 3:
  19907. i = 18, o = 16, r.domNode.className += " vertical reverse"
  19908. }
  19909. return r._register(a.addDisposableListener(r.domNode, a.EventType.KEY_DOWN, (function (e) {
  19910. var t = new d.StandardKeyboardEvent(e), n = !0;
  19911. t.equals(i) ? r.focusPrevious() : t.equals(o) ? r.focusNext() : t.equals(9) ? r.cancel() : r.isTriggerKeyEvent(t) ? r.options.triggerKeys && r.options.triggerKeys.keyDown && r.doTrigger(t) : n = !1, n && (t.preventDefault(),
  19912. t.stopPropagation())
  19913. }))), r._register(a.addDisposableListener(r.domNode, a.EventType.KEY_UP, (function (e) {
  19914. var t = new d.StandardKeyboardEvent(e);
  19915. r.isTriggerKeyEvent(t) ? (r.options.triggerKeys && !r.options.triggerKeys.keyDown && r.doTrigger(t), t.preventDefault(), t.stopPropagation()) : (t.equals(2) || t.equals(1026)) && r.updateFocusedItem()
  19916. }))), r.focusTracker = r._register(a.trackFocus(r.domNode)), r._register(r.focusTracker.onDidBlur((function () {
  19917. document.activeElement !== r.domNode && a.isAncestor(document.activeElement, r.domNode) || (r._onDidBlur.fire(), r.focusedItem = void 0)
  19918. }))), r._register(r.focusTracker.onDidFocus((function () {
  19919. return r.updateFocusedItem()
  19920. }))), r.actionsList = document.createElement("ul"), r.actionsList.className = "actions-container", r.actionsList.setAttribute("role", "toolbar"), r.options.ariaLabel && r.actionsList.setAttribute("aria-label", r.options.ariaLabel), r.domNode.appendChild(r.actionsList), t.appendChild(r.domNode), r
  19921. }
  19922. return r(t, e), t.prototype.isTriggerKeyEvent = function (e) {
  19923. var t = !1
  19924. ;
  19925. return this.options.triggerKeys && this.options.triggerKeys.keys.forEach((function (n) {
  19926. t = t || e.equals(n)
  19927. })), t
  19928. }, t.prototype.updateFocusedItem = function () {
  19929. for (var e = 0; e < this.actionsList.children.length; e++) {
  19930. var t = this.actionsList.children[e];
  19931. if (a.isAncestor(document.activeElement, t)) {
  19932. this.focusedItem = e;
  19933. break
  19934. }
  19935. }
  19936. }, Object.defineProperty(t.prototype, "context", {
  19937. get: function () {
  19938. return this._context
  19939. }, set: function (e) {
  19940. this._context = e, this.viewItems.forEach((function (t) {
  19941. return t.setActionContext(e)
  19942. }))
  19943. }, enumerable: !0, configurable: !0
  19944. }), t.prototype.getContainer = function () {
  19945. return this.domNode
  19946. }, t.prototype.push = function (e, t) {
  19947. var n = this;
  19948. void 0 === t && (t = {});
  19949. var i = Array.isArray(e) ? e : [e], o = l.isNumber(t.index) ? t.index : null;
  19950. i.forEach((function (e) {
  19951. var i, r = document.createElement("li");
  19952. r.className = "action-item", r.setAttribute("role", "presentation"), n._register(a.addDisposableListener(r, a.EventType.CONTEXT_MENU, (function (e) {
  19953. e.preventDefault(), e.stopPropagation()
  19954. }))), n.options.actionViewItemProvider && (i = n.options.actionViewItemProvider(e)),
  19955. i || (i = new m(n.context, e, t)), i.actionRunner = n._actionRunner, i.setActionContext(n.context), i.render(r), null === o || o < 0 || o >= n.actionsList.children.length ? (n.actionsList.appendChild(r), n.viewItems.push(i)) : (n.actionsList.insertBefore(r, n.actionsList.children[o]), n.viewItems.splice(o, 0, i), o++)
  19956. }))
  19957. }, t.prototype.clear = function () {
  19958. this.viewItems = o.dispose(this.viewItems), a.clearNode(this.actionsList)
  19959. }, t.prototype.isEmpty = function () {
  19960. return 0 === this.viewItems.length
  19961. }, t.prototype.focus = function (e) {
  19962. var t = !1, n = void 0;
  19963. void 0 === e ? t = !0 : "number" == typeof e ? n = e : "boolean" == typeof e && (t = e), t && void 0 === this.focusedItem ? (this.focusedItem = this.viewItems.length - 1, this.focusNext()) : (void 0 !== n && (this.focusedItem = n), this.updateFocus())
  19964. }, t.prototype.focusNext = function () {
  19965. void 0 === this.focusedItem && (this.focusedItem = this.viewItems.length - 1);
  19966. var e, t = this.focusedItem;
  19967. do {
  19968. this.focusedItem = (this.focusedItem + 1) % this.viewItems.length, e = this.viewItems[this.focusedItem]
  19969. } while (this.focusedItem !== t && !e.isEnabled())
  19970. ;
  19971. this.focusedItem !== t || e.isEnabled() || (this.focusedItem = void 0), this.updateFocus()
  19972. }, t.prototype.focusPrevious = function () {
  19973. void 0 === this.focusedItem && (this.focusedItem = 0);
  19974. var e, t = this.focusedItem;
  19975. do {
  19976. this.focusedItem = this.focusedItem - 1, this.focusedItem < 0 && (this.focusedItem = this.viewItems.length - 1), e = this.viewItems[this.focusedItem]
  19977. } while (this.focusedItem !== t && !e.isEnabled());
  19978. this.focusedItem !== t || e.isEnabled() || (this.focusedItem = void 0), this.updateFocus(!0)
  19979. }, t.prototype.updateFocus = function (e, t) {
  19980. void 0 === this.focusedItem && this.actionsList.focus({preventScroll: t});
  19981. for (var n = 0; n < this.viewItems.length; n++) {
  19982. var i = this.viewItems[n];
  19983. n === this.focusedItem ? l.isFunction(i.isEnabled) && (i.isEnabled() && l.isFunction(i.focus) ? i.focus(e) : this.actionsList.focus({preventScroll: t})) : l.isFunction(i.blur) && i.blur()
  19984. }
  19985. }, t.prototype.doTrigger = function (e) {
  19986. if (void 0 !== this.focusedItem) {
  19987. var t = this.viewItems[this.focusedItem];
  19988. if (t instanceof g) {
  19989. var n = null === t._context || void 0 === t._context ? e : t._context;
  19990. this.run(t._action, n)
  19991. }
  19992. }
  19993. },
  19994. t.prototype.cancel = function () {
  19995. document.activeElement instanceof HTMLElement && document.activeElement.blur(), this._onDidCancel.fire()
  19996. }, t.prototype.run = function (e, t) {
  19997. return this._actionRunner.run(e, t)
  19998. }, t.prototype.dispose = function () {
  19999. o.dispose(this.viewItems), this.viewItems = [], a.removeNode(this.getContainer()), e.prototype.dispose.call(this)
  20000. }, t
  20001. }(o.Disposable);
  20002. t.ActionBar = _
  20003. })), define(n[395], i([7, 8]), (function (e, t) {
  20004. return e.create("vs/base/browser/ui/aria/aria", t)
  20005. })), define(n[50], i([0, 1, 395, 16, 6, 260]), (function (e, t, n, i, o) {
  20006. "use strict";
  20007. var r, s, a;
  20008. function l(e, t) {
  20009. c(s, e, t)
  20010. }
  20011. Object.defineProperty(t, "__esModule", {value: !0}), t.setARIAContainer = function (e) {
  20012. (r = document.createElement("div")).className = "monaco-aria-container", (s = document.createElement("div")).className = "monaco-alert", s.setAttribute("role", "alert"), s.setAttribute("aria-atomic", "true"), r.appendChild(s), (a = document.createElement("div")).className = "monaco-status", a.setAttribute("role", "status"), a.setAttribute("aria-atomic", "true"), r.appendChild(a), e.appendChild(r)
  20013. }, t.alert = l, t.status = function (e, t) {
  20014. i.isMacintosh ? l(e, t) : c(a, e, t)
  20015. };
  20016. var u = 0, d = void 0;
  20017. function c(e, t, i) {
  20018. if (r) {
  20019. if (!i) switch (d === t ? u++ : (d = t, u = 0), u) {
  20020. case 0:
  20021. break;
  20022. case 1:
  20023. t = n.localize(0, null, t);
  20024. break;
  20025. default:
  20026. t = n.localize(1, null, t, u)
  20027. }
  20028. o.clearNode(e), e.textContent = t, e.style.visibility = "hidden", e.style.visibility = "visible"
  20029. }
  20030. }
  20031. })), define(n[396], i([7, 8]), (function (e, t) {
  20032. return e.create("vs/base/browser/ui/findinput/findInput", t)
  20033. })), define(n[397], i([7, 8]), (function (e, t) {
  20034. return e.create("vs/base/browser/ui/findinput/findInputCheckboxes", t)
  20035. })), define(n[204], i([0, 1, 138, 397]), (function (e, t, n, i) {
  20036. "use strict";
  20037. Object.defineProperty(t, "__esModule", {value: !0});
  20038. var o = i.localize(0, null), s = i.localize(1, null), a = i.localize(2, null), l = function (e) {
  20039. function t(t) {
  20040. return e.call(this, {
  20041. actionClassName: "codicon-case-sensitive",
  20042. title: o + t.appendTitle,
  20043. isChecked: t.isChecked,
  20044. inputActiveOptionBorder: t.inputActiveOptionBorder,
  20045. inputActiveOptionBackground: t.inputActiveOptionBackground
  20046. }) || this
  20047. }
  20048. return r(t, e), t
  20049. }(n.Checkbox);
  20050. t.CaseSensitiveCheckbox = l
  20051. ;var u = function (e) {
  20052. function t(t) {
  20053. return e.call(this, {
  20054. actionClassName: "codicon-whole-word",
  20055. title: s + t.appendTitle,
  20056. isChecked: t.isChecked,
  20057. inputActiveOptionBorder: t.inputActiveOptionBorder,
  20058. inputActiveOptionBackground: t.inputActiveOptionBackground
  20059. }) || this
  20060. }
  20061. return r(t, e), t
  20062. }(n.Checkbox);
  20063. t.WholeWordsCheckbox = u;
  20064. var d = function (e) {
  20065. function t(t) {
  20066. return e.call(this, {
  20067. actionClassName: "codicon-regex",
  20068. title: a + t.appendTitle,
  20069. isChecked: t.isChecked,
  20070. inputActiveOptionBorder: t.inputActiveOptionBorder,
  20071. inputActiveOptionBackground: t.inputActiveOptionBackground
  20072. }) || this
  20073. }
  20074. return r(t, e), t
  20075. }(n.Checkbox);
  20076. t.RegexCheckbox = d
  20077. })), define(n[398], i([7, 8]), (function (e, t) {
  20078. return e.create("vs/base/browser/ui/findinput/replaceInput", t)
  20079. })), define(n[399], i([7, 8]), (function (e, t) {
  20080. return e.create("vs/base/browser/ui/inputbox/inputBox", t)
  20081. })), define(n[152], i([0, 1, 399, 24, 6, 134, 50, 70, 4, 47, 27, 31, 242, 53, 52, 269]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f) {
  20082. "use strict";
  20083. Object.defineProperty(t, "__esModule", {value: !0});
  20084. var m = o.$, v = {
  20085. inputBackground: c.Color.fromHex("#3C3C3C"),
  20086. inputForeground: c.Color.fromHex("#CCCCCC"),
  20087. inputValidationInfoBorder: c.Color.fromHex("#55AAFF"),
  20088. inputValidationInfoBackground: c.Color.fromHex("#063B49"),
  20089. inputValidationWarningBorder: c.Color.fromHex("#B89500"),
  20090. inputValidationWarningBackground: c.Color.fromHex("#352A05"),
  20091. inputValidationErrorBorder: c.Color.fromHex("#BE1100"),
  20092. inputValidationErrorBackground: c.Color.fromHex("#5A1D1D")
  20093. }, _ = function (e) {
  20094. function t(t, n, r) {
  20095. var s = e.call(this) || this;
  20096. s.state = "idle", s.maxHeight = Number.POSITIVE_INFINITY, s._onDidChange = s._register(new u.Emitter), s.onDidChange = s._onDidChange.event, s._onDidHeightChange = s._register(new u.Emitter), s.onDidHeightChange = s._onDidHeightChange.event, s.contextViewProvider = n, s.options = r || Object.create(null), h.mixin(s.options, v, !1), s.message = null, s.placeholder = s.options.placeholder || "", s.ariaLabel = s.options.ariaLabel || "", s.inputBackground = s.options.inputBackground, s.inputForeground = s.options.inputForeground, s.inputBorder = s.options.inputBorder,
  20097. s.inputValidationInfoBorder = s.options.inputValidationInfoBorder, s.inputValidationInfoBackground = s.options.inputValidationInfoBackground, s.inputValidationInfoForeground = s.options.inputValidationInfoForeground, s.inputValidationWarningBorder = s.options.inputValidationWarningBorder, s.inputValidationWarningBackground = s.options.inputValidationWarningBackground, s.inputValidationWarningForeground = s.options.inputValidationWarningForeground, s.inputValidationErrorBorder = s.options.inputValidationErrorBorder, s.inputValidationErrorBackground = s.options.inputValidationErrorBackground, s.inputValidationErrorForeground = s.options.inputValidationErrorForeground, s.options.validationOptions && (s.validation = s.options.validationOptions.validation), s.element = o.append(t, m(".monaco-inputbox.idle"));
  20098. var a = s.options.flexibleHeight ? "textarea" : "input", d = o.append(s.element, m(".wrapper"));
  20099. if (s.input = o.append(d, m(a + ".input.empty")), s.input.setAttribute("autocorrect", "off"), s.input.setAttribute("autocapitalize", "off"),
  20100. s.input.setAttribute("spellcheck", "false"), s.onfocus(s.input, (function () {
  20101. return o.addClass(s.element, "synthetic-focus")
  20102. })), s.onblur(s.input, (function () {
  20103. return o.removeClass(s.element, "synthetic-focus")
  20104. })), s.options.flexibleHeight) {
  20105. s.maxHeight = "number" == typeof s.options.flexibleMaxHeight ? s.options.flexibleMaxHeight : Number.POSITIVE_INFINITY, s.mirror = o.append(d, m("div.mirror")), s.mirror.innerHTML = "&#160;", s.scrollableElement = new g.ScrollableElement(s.element, {vertical: 1}), s.options.flexibleWidth && (s.input.setAttribute("wrap", "off"), s.mirror.style.whiteSpace = "pre", s.mirror.style.wordWrap = "initial"), o.append(t, s.scrollableElement.getDomNode()), s._register(s.scrollableElement), s._register(s.scrollableElement.onScroll((function (e) {
  20106. return s.input.scrollTop = e.scrollTop
  20107. })));
  20108. var c = u.Event.filter(f.domEvent(document, "selectionchange"), (function () {
  20109. var e = document.getSelection();
  20110. return (null == e ? void 0 : e.anchorNode) === d
  20111. }));
  20112. s._register(c(s.updateScrollDimensions, s)), s._register(s.onDidHeightChange(s.updateScrollDimensions, s))
  20113. } else s.input.type = s.options.type || "text", s.input.setAttribute("wrap", "off");
  20114. return s.ariaLabel && s.input.setAttribute("aria-label", s.ariaLabel), s.placeholder && s.setPlaceHolder(s.placeholder), s.oninput(s.input, (function () {
  20115. return s.onValueChange()
  20116. })), s.onblur(s.input, (function () {
  20117. return s.onBlur()
  20118. })), s.onfocus(s.input, (function () {
  20119. return s.onFocus()
  20120. })), s.placeholder && i.isIE && s.onclick(s.input, (function (e) {
  20121. o.EventHelper.stop(e, !0), s.input.focus()
  20122. })), s.ignoreGesture(s.input), setTimeout((function () {
  20123. return s.updateMirror()
  20124. }), 0), s.options.actions && (s.actionbar = s._register(new l.ActionBar(s.element)), s.actionbar.push(s.options.actions, {
  20125. icon: !0,
  20126. label: !1
  20127. })), s.applyStyles(), s
  20128. }
  20129. return r(t, e), t.prototype.onBlur = function () {
  20130. this._hideMessage()
  20131. }, t.prototype.onFocus = function () {
  20132. this._showMessage()
  20133. }, t.prototype.setPlaceHolder = function (e) {
  20134. this.placeholder = e, this.input.setAttribute("placeholder", e), this.input.title = e
  20135. }, t.prototype.setAriaLabel = function (e) {
  20136. this.ariaLabel = e,
  20137. e ? this.input.setAttribute("aria-label", this.ariaLabel) : this.input.removeAttribute("aria-label")
  20138. }, Object.defineProperty(t.prototype, "inputElement", {
  20139. get: function () {
  20140. return this.input
  20141. }, enumerable: !0, configurable: !0
  20142. }), Object.defineProperty(t.prototype, "value", {
  20143. get: function () {
  20144. return this.input.value
  20145. }, set: function (e) {
  20146. this.input.value !== e && (this.input.value = e, this.onValueChange())
  20147. }, enumerable: !0, configurable: !0
  20148. }), Object.defineProperty(t.prototype, "height", {
  20149. get: function () {
  20150. return "number" == typeof this.cachedHeight ? this.cachedHeight : o.getTotalHeight(this.element)
  20151. }, enumerable: !0, configurable: !0
  20152. }), t.prototype.focus = function () {
  20153. this.input.focus()
  20154. }, t.prototype.blur = function () {
  20155. this.input.blur()
  20156. }, t.prototype.hasFocus = function () {
  20157. return document.activeElement === this.input
  20158. }, t.prototype.select = function (e) {
  20159. void 0 === e && (e = null), this.input.select(), e && this.input.setSelectionRange(e.start, e.end)
  20160. }, t.prototype.enable = function () {
  20161. this.input.removeAttribute("disabled")
  20162. }, t.prototype.disable = function () {
  20163. this.blur(), this.input.disabled = !0,
  20164. this._hideMessage()
  20165. }, Object.defineProperty(t.prototype, "width", {
  20166. get: function () {
  20167. return o.getTotalWidth(this.input)
  20168. }, set: function (e) {
  20169. if (this.options.flexibleHeight && this.options.flexibleWidth) {
  20170. var t = 0;
  20171. if (this.mirror) t = (parseFloat(this.mirror.style.paddingLeft || "") || 0) + (parseFloat(this.mirror.style.paddingRight || "") || 0);
  20172. this.input.style.width = e - t + "px"
  20173. } else this.input.style.width = e + "px";
  20174. this.mirror && (this.mirror.style.width = e + "px")
  20175. }, enumerable: !0, configurable: !0
  20176. }), Object.defineProperty(t.prototype, "paddingRight", {
  20177. set: function (e) {
  20178. this.options.flexibleHeight && this.options.flexibleWidth ? this.input.style.width = "calc(100% - " + e + "px)" : this.input.style.paddingRight = e + "px", this.mirror && (this.mirror.style.paddingRight = e + "px")
  20179. }, enumerable: !0, configurable: !0
  20180. }), t.prototype.updateScrollDimensions = function () {
  20181. if ("number" == typeof this.cachedContentHeight && "number" == typeof this.cachedHeight && this.scrollableElement) {
  20182. var e = this.cachedContentHeight, t = this.cachedHeight, n = this.input.scrollTop
  20183. ;this.scrollableElement.setScrollDimensions({
  20184. scrollHeight: e,
  20185. height: t
  20186. }), this.scrollableElement.setScrollPosition({scrollTop: n})
  20187. }
  20188. }, t.prototype.showMessage = function (e, t) {
  20189. this.message = e, o.removeClass(this.element, "idle"), o.removeClass(this.element, "info"), o.removeClass(this.element, "warning"), o.removeClass(this.element, "error"), o.addClass(this.element, this.classForType(e.type));
  20190. var i, r = this.stylesForType(this.message.type);
  20191. this.element.style.border = r.border ? "1px solid " + r.border : "", i = 3 === e.type ? n.localize(0, null, e.content) : 2 === e.type ? n.localize(1, null, e.content) : n.localize(2, null, e.content), a.alert(i), (this.hasFocus() || t) && this._showMessage()
  20192. }, t.prototype.hideMessage = function () {
  20193. this.message = null, o.removeClass(this.element, "info"), o.removeClass(this.element, "warning"), o.removeClass(this.element, "error"), o.addClass(this.element, "idle"), this._hideMessage(), this.applyStyles()
  20194. }, t.prototype.validate = function () {
  20195. var e = null
  20196. ;
  20197. return this.validation && ((e = this.validation(this.value)) ? (this.inputElement.setAttribute("aria-invalid", "true"), this.showMessage(e)) : this.inputElement.hasAttribute("aria-invalid") && (this.inputElement.removeAttribute("aria-invalid"), this.hideMessage())), !e
  20198. }, t.prototype.stylesForType = function (e) {
  20199. switch (e) {
  20200. case 1:
  20201. return {
  20202. border: this.inputValidationInfoBorder,
  20203. background: this.inputValidationInfoBackground,
  20204. foreground: this.inputValidationInfoForeground
  20205. };
  20206. case 2:
  20207. return {
  20208. border: this.inputValidationWarningBorder,
  20209. background: this.inputValidationWarningBackground,
  20210. foreground: this.inputValidationWarningForeground
  20211. };
  20212. default:
  20213. return {
  20214. border: this.inputValidationErrorBorder,
  20215. background: this.inputValidationErrorBackground,
  20216. foreground: this.inputValidationErrorForeground
  20217. }
  20218. }
  20219. }, t.prototype.classForType = function (e) {
  20220. switch (e) {
  20221. case 1:
  20222. return "info";
  20223. case 2:
  20224. return "warning";
  20225. default:
  20226. return "error"
  20227. }
  20228. }, t.prototype._showMessage = function () {
  20229. var e = this;
  20230. if (this.contextViewProvider && this.message) {
  20231. var t, n = function () {
  20232. return t.style.width = o.getTotalWidth(e.element) + "px"
  20233. };
  20234. this.contextViewProvider.showContextView({
  20235. getAnchor: function () {
  20236. return e.element
  20237. }, anchorAlignment: 1, render: function (i) {
  20238. if (!e.message) return null;
  20239. t = o.append(i, m(".monaco-inputbox-container")), n();
  20240. var r = {inline: !0, className: "monaco-inputbox-message"},
  20241. a = e.message.formatContent ? s.renderFormattedText(e.message.content, r) : s.renderText(e.message.content, r);
  20242. o.addClass(a, e.classForType(e.message.type));
  20243. var l = e.stylesForType(e.message.type);
  20244. return a.style.backgroundColor = l.background ? l.background.toString() : "", a.style.color = l.foreground ? l.foreground.toString() : "", a.style.border = l.border ? "1px solid " + l.border : "", o.append(t, a), null
  20245. }, onHide: function () {
  20246. e.state = "closed"
  20247. }, layout: n
  20248. }), this.state = "open"
  20249. }
  20250. }, t.prototype._hideMessage = function () {
  20251. this.contextViewProvider && ("open" === this.state && this.contextViewProvider.hideContextView(), this.state = "idle")
  20252. }, t.prototype.onValueChange = function () {
  20253. this._onDidChange.fire(this.value), this.validate(), this.updateMirror(),
  20254. o.toggleClass(this.input, "empty", !this.value), "open" === this.state && this.contextViewProvider && this.contextViewProvider.layout()
  20255. }, t.prototype.updateMirror = function () {
  20256. if (this.mirror) {
  20257. var e = this.value, t = 10 === e.charCodeAt(e.length - 1) ? " " : "";
  20258. e + t ? this.mirror.textContent = e + t : this.mirror.innerHTML = "&#160;", this.layout()
  20259. }
  20260. }, t.prototype.style = function (e) {
  20261. this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = e.inputValidationInfoBackground, this.inputValidationInfoForeground = e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, this.inputValidationWarningBackground = e.inputValidationWarningBackground, this.inputValidationWarningForeground = e.inputValidationWarningForeground, this.inputValidationWarningBorder = e.inputValidationWarningBorder, this.inputValidationErrorBackground = e.inputValidationErrorBackground, this.inputValidationErrorForeground = e.inputValidationErrorForeground,
  20262. this.inputValidationErrorBorder = e.inputValidationErrorBorder, this.applyStyles()
  20263. }, t.prototype.applyStyles = function () {
  20264. var e = this.inputBackground ? this.inputBackground.toString() : "",
  20265. t = this.inputForeground ? this.inputForeground.toString() : "",
  20266. n = this.inputBorder ? this.inputBorder.toString() : "";
  20267. this.element.style.backgroundColor = e, this.element.style.color = t, this.input.style.backgroundColor = e, this.input.style.color = t, this.element.style.borderWidth = n ? "1px" : "", this.element.style.borderStyle = n ? "solid" : "", this.element.style.borderColor = n
  20268. }, t.prototype.layout = function () {
  20269. if (this.mirror) {
  20270. var e = this.cachedContentHeight;
  20271. this.cachedContentHeight = o.getTotalHeight(this.mirror), e !== this.cachedContentHeight && (this.cachedHeight = Math.min(this.cachedContentHeight, this.maxHeight), this.input.style.height = this.cachedHeight + "px", this._onDidHeightChange.fire(this.cachedContentHeight))
  20272. }
  20273. }, t.prototype.insertAtCursor = function (e) {
  20274. var t = this.inputElement, n = t.selectionStart, i = t.selectionEnd, o = t.value
  20275. ;null !== n && null !== i && (this.value = o.substr(0, n) + e + o.substr(i), t.setSelectionRange(n + 1, n + 1), this.layout())
  20276. }, t.prototype.dispose = function () {
  20277. this._hideMessage(), this.message = null, this.actionbar && this.actionbar.dispose(), e.prototype.dispose.call(this)
  20278. }, t
  20279. }(d.Widget);
  20280. t.InputBox = _;
  20281. var y = function (e) {
  20282. function t(t, n, i) {
  20283. var o = e.call(this, t, n, i) || this;
  20284. return o.history = new p.HistoryNavigator(i.history, 100), o
  20285. }
  20286. return r(t, e), t.prototype.addToHistory = function () {
  20287. this.value && this.value !== this.getCurrentValue() && this.history.add(this.value)
  20288. }, t.prototype.showNextValue = function () {
  20289. this.history.has(this.value) || this.addToHistory();
  20290. var e = this.getNextValue();
  20291. e && (e = e === this.value ? this.getNextValue() : e), e && (this.value = e, a.status(this.value))
  20292. }, t.prototype.showPreviousValue = function () {
  20293. this.history.has(this.value) || this.addToHistory();
  20294. var e = this.getPreviousValue();
  20295. e && (e = e === this.value ? this.getPreviousValue() : e), e && (this.value = e, a.status(this.value))
  20296. }, t.prototype.getCurrentValue = function () {
  20297. var e = this.history.current()
  20298. ;
  20299. return e || (e = this.history.last(), this.history.next()), e
  20300. }, t.prototype.getPreviousValue = function () {
  20301. return this.history.previous() || this.history.first()
  20302. }, t.prototype.getNextValue = function () {
  20303. return this.history.next() || this.history.last()
  20304. }, t
  20305. }(_);
  20306. t.HistoryInputBox = y
  20307. })), define(n[400], i([0, 1, 396, 6, 152, 47, 4, 204, 184]), (function (e, t, n, i, o, s, a, l) {
  20308. "use strict";
  20309. Object.defineProperty(t, "__esModule", {value: !0});
  20310. var u = n.localize(0, null), d = function (e) {
  20311. function t(t, n, r, s) {
  20312. var d = e.call(this) || this;
  20313. d._showOptionButtons = r, d.fixFocusOnOptionClickEnabled = !0, d._onDidOptionChange = d._register(new a.Emitter), d.onDidOptionChange = d._onDidOptionChange.event, d._onKeyDown = d._register(new a.Emitter), d.onKeyDown = d._onKeyDown.event, d._onMouseDown = d._register(new a.Emitter), d.onMouseDown = d._onMouseDown.event, d._onInput = d._register(new a.Emitter), d._onKeyUp = d._register(new a.Emitter), d._onCaseSensitiveKeyDown = d._register(new a.Emitter), d.onCaseSensitiveKeyDown = d._onCaseSensitiveKeyDown.event, d._onRegexKeyDown = d._register(new a.Emitter),
  20314. d.onRegexKeyDown = d._onRegexKeyDown.event, d._lastHighlightFindOptions = 0, d.contextViewProvider = n, d.placeholder = s.placeholder || "", d.validation = s.validation, d.label = s.label || u, d.inputActiveOptionBorder = s.inputActiveOptionBorder, d.inputActiveOptionBackground = s.inputActiveOptionBackground, d.inputBackground = s.inputBackground, d.inputForeground = s.inputForeground, d.inputBorder = s.inputBorder, d.inputValidationInfoBorder = s.inputValidationInfoBorder, d.inputValidationInfoBackground = s.inputValidationInfoBackground, d.inputValidationInfoForeground = s.inputValidationInfoForeground, d.inputValidationWarningBorder = s.inputValidationWarningBorder, d.inputValidationWarningBackground = s.inputValidationWarningBackground, d.inputValidationWarningForeground = s.inputValidationWarningForeground, d.inputValidationErrorBorder = s.inputValidationErrorBorder, d.inputValidationErrorBackground = s.inputValidationErrorBackground, d.inputValidationErrorForeground = s.inputValidationErrorForeground
  20315. ;var c = s.appendCaseSensitiveLabel || "", h = s.appendWholeWordsLabel || "",
  20316. p = s.appendRegexLabel || "", g = s.history || [], f = !!s.flexibleHeight, m = !!s.flexibleWidth,
  20317. v = s.flexibleMaxHeight;
  20318. d.domNode = document.createElement("div"), i.addClass(d.domNode, "monaco-findInput"), d.inputBox = d._register(new o.HistoryInputBox(d.domNode, d.contextViewProvider, {
  20319. placeholder: d.placeholder || "",
  20320. ariaLabel: d.label || "",
  20321. validationOptions: {validation: d.validation},
  20322. inputBackground: d.inputBackground,
  20323. inputForeground: d.inputForeground,
  20324. inputBorder: d.inputBorder,
  20325. inputValidationInfoBackground: d.inputValidationInfoBackground,
  20326. inputValidationInfoForeground: d.inputValidationInfoForeground,
  20327. inputValidationInfoBorder: d.inputValidationInfoBorder,
  20328. inputValidationWarningBackground: d.inputValidationWarningBackground,
  20329. inputValidationWarningForeground: d.inputValidationWarningForeground,
  20330. inputValidationWarningBorder: d.inputValidationWarningBorder,
  20331. inputValidationErrorBackground: d.inputValidationErrorBackground,
  20332. inputValidationErrorForeground: d.inputValidationErrorForeground,
  20333. inputValidationErrorBorder: d.inputValidationErrorBorder,
  20334. history: g,
  20335. flexibleHeight: f,
  20336. flexibleWidth: m,
  20337. flexibleMaxHeight: v
  20338. })), d.regex = d._register(new l.RegexCheckbox({
  20339. appendTitle: p,
  20340. isChecked: !1,
  20341. inputActiveOptionBorder: d.inputActiveOptionBorder,
  20342. inputActiveOptionBackground: d.inputActiveOptionBackground
  20343. })), d._register(d.regex.onChange((function (e) {
  20344. d._onDidOptionChange.fire(e), !e && d.fixFocusOnOptionClickEnabled && d.inputBox.focus(), d.validate()
  20345. }))), d._register(d.regex.onKeyDown((function (e) {
  20346. d._onRegexKeyDown.fire(e)
  20347. }))), d.wholeWords = d._register(new l.WholeWordsCheckbox({
  20348. appendTitle: h,
  20349. isChecked: !1,
  20350. inputActiveOptionBorder: d.inputActiveOptionBorder,
  20351. inputActiveOptionBackground: d.inputActiveOptionBackground
  20352. })), d._register(d.wholeWords.onChange((function (e) {
  20353. d._onDidOptionChange.fire(e), !e && d.fixFocusOnOptionClickEnabled && d.inputBox.focus(), d.validate()
  20354. }))), d.caseSensitive = d._register(new l.CaseSensitiveCheckbox({
  20355. appendTitle: c, isChecked: !1, inputActiveOptionBorder: d.inputActiveOptionBorder,
  20356. inputActiveOptionBackground: d.inputActiveOptionBackground
  20357. })), d._register(d.caseSensitive.onChange((function (e) {
  20358. d._onDidOptionChange.fire(e), !e && d.fixFocusOnOptionClickEnabled && d.inputBox.focus(), d.validate()
  20359. }))), d._register(d.caseSensitive.onKeyDown((function (e) {
  20360. d._onCaseSensitiveKeyDown.fire(e)
  20361. }))), d._showOptionButtons && (d.inputBox.paddingRight = d.caseSensitive.width() + d.wholeWords.width() + d.regex.width());
  20362. var _ = [d.caseSensitive.domNode, d.wholeWords.domNode, d.regex.domNode];
  20363. d.onkeydown(d.domNode, (function (e) {
  20364. if (e.equals(15) || e.equals(17) || e.equals(9)) {
  20365. var t = _.indexOf(document.activeElement);
  20366. if (t >= 0) {
  20367. var n = -1;
  20368. e.equals(17) ? n = (t + 1) % _.length : e.equals(15) && (n = 0 === t ? _.length - 1 : t - 1), e.equals(9) ? _[t].blur() : n >= 0 && _[n].focus(), i.EventHelper.stop(e, !0)
  20369. }
  20370. }
  20371. }));
  20372. var y = document.createElement("div");
  20373. return y.className = "controls", y.style.display = d._showOptionButtons ? "block" : "none", y.appendChild(d.caseSensitive.domNode), y.appendChild(d.wholeWords.domNode), y.appendChild(d.regex.domNode), d.domNode.appendChild(y),
  20374. t && t.appendChild(d.domNode), d.onkeydown(d.inputBox.inputElement, (function (e) {
  20375. return d._onKeyDown.fire(e)
  20376. })), d.onkeyup(d.inputBox.inputElement, (function (e) {
  20377. return d._onKeyUp.fire(e)
  20378. })), d.oninput(d.inputBox.inputElement, (function (e) {
  20379. return d._onInput.fire()
  20380. })), d.onmousedown(d.inputBox.inputElement, (function (e) {
  20381. return d._onMouseDown.fire(e)
  20382. })), d
  20383. }
  20384. return r(t, e), t.prototype.enable = function () {
  20385. i.removeClass(this.domNode, "disabled"), this.inputBox.enable(), this.regex.enable(), this.wholeWords.enable(), this.caseSensitive.enable()
  20386. }, t.prototype.disable = function () {
  20387. i.addClass(this.domNode, "disabled"), this.inputBox.disable(), this.regex.disable(), this.wholeWords.disable(), this.caseSensitive.disable()
  20388. }, t.prototype.setFocusInputOnOptionClick = function (e) {
  20389. this.fixFocusOnOptionClickEnabled = e
  20390. }, t.prototype.setEnabled = function (e) {
  20391. e ? this.enable() : this.disable()
  20392. }, t.prototype.getValue = function () {
  20393. return this.inputBox.value
  20394. }, t.prototype.setValue = function (e) {
  20395. this.inputBox.value !== e && (this.inputBox.value = e)
  20396. }, t.prototype.style = function (e) {
  20397. this.inputActiveOptionBorder = e.inputActiveOptionBorder, this.inputActiveOptionBackground = e.inputActiveOptionBackground, this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = e.inputValidationInfoBackground, this.inputValidationInfoForeground = e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, this.inputValidationWarningBackground = e.inputValidationWarningBackground, this.inputValidationWarningForeground = e.inputValidationWarningForeground, this.inputValidationWarningBorder = e.inputValidationWarningBorder, this.inputValidationErrorBackground = e.inputValidationErrorBackground, this.inputValidationErrorForeground = e.inputValidationErrorForeground, this.inputValidationErrorBorder = e.inputValidationErrorBorder, this.applyStyles()
  20398. }, t.prototype.applyStyles = function () {
  20399. if (this.domNode) {
  20400. var e = {
  20401. inputActiveOptionBorder: this.inputActiveOptionBorder,
  20402. inputActiveOptionBackground: this.inputActiveOptionBackground
  20403. }
  20404. ;this.regex.style(e), this.wholeWords.style(e), this.caseSensitive.style(e);
  20405. var t = {
  20406. inputBackground: this.inputBackground,
  20407. inputForeground: this.inputForeground,
  20408. inputBorder: this.inputBorder,
  20409. inputValidationInfoBackground: this.inputValidationInfoBackground,
  20410. inputValidationInfoForeground: this.inputValidationInfoForeground,
  20411. inputValidationInfoBorder: this.inputValidationInfoBorder,
  20412. inputValidationWarningBackground: this.inputValidationWarningBackground,
  20413. inputValidationWarningForeground: this.inputValidationWarningForeground,
  20414. inputValidationWarningBorder: this.inputValidationWarningBorder,
  20415. inputValidationErrorBackground: this.inputValidationErrorBackground,
  20416. inputValidationErrorForeground: this.inputValidationErrorForeground,
  20417. inputValidationErrorBorder: this.inputValidationErrorBorder
  20418. };
  20419. this.inputBox.style(t)
  20420. }
  20421. }, t.prototype.select = function () {
  20422. this.inputBox.select()
  20423. }, t.prototype.focus = function () {
  20424. this.inputBox.focus()
  20425. }, t.prototype.getCaseSensitive = function () {
  20426. return this.caseSensitive.checked
  20427. }, t.prototype.setCaseSensitive = function (e) {
  20428. this.caseSensitive.checked = e
  20429. }, t.prototype.getWholeWords = function () {
  20430. return this.wholeWords.checked
  20431. }, t.prototype.setWholeWords = function (e) {
  20432. this.wholeWords.checked = e
  20433. }, t.prototype.getRegex = function () {
  20434. return this.regex.checked
  20435. }, t.prototype.setRegex = function (e) {
  20436. this.regex.checked = e, this.validate()
  20437. }, t.prototype.focusOnCaseSensitive = function () {
  20438. this.caseSensitive.focus()
  20439. }, t.prototype.highlightFindOptions = function () {
  20440. i.removeClass(this.domNode, "highlight-" + this._lastHighlightFindOptions), this._lastHighlightFindOptions = 1 - this._lastHighlightFindOptions, i.addClass(this.domNode, "highlight-" + this._lastHighlightFindOptions)
  20441. }, t.prototype.validate = function () {
  20442. this.inputBox.validate()
  20443. }, t.prototype.clearMessage = function () {
  20444. this.inputBox.hideMessage()
  20445. }, t
  20446. }(s.Widget);
  20447. t.FindInput = d
  20448. })), define(n[401], i([0, 1, 398, 6, 152, 47, 4, 138, 184]), (function (e, t, n, i, o, s, a, l) {
  20449. "use strict";
  20450. Object.defineProperty(t, "__esModule", {value: !0});
  20451. var u = n.localize(0, null), d = n.localize(1, null), c = function (e) {
  20452. function t(t) {
  20453. return e.call(this, {
  20454. actionClassName: "codicon-preserve-case",
  20455. title: d + t.appendTitle,
  20456. isChecked: t.isChecked,
  20457. inputActiveOptionBorder: t.inputActiveOptionBorder,
  20458. inputActiveOptionBackground: t.inputActiveOptionBackground
  20459. }) || this
  20460. }
  20461. return r(t, e), t
  20462. }(l.Checkbox);
  20463. t.PreserveCaseCheckbox = c;
  20464. var h = function (e) {
  20465. function t(t, n, r, s) {
  20466. var l = e.call(this) || this;
  20467. l._showOptionButtons = r, l.fixFocusOnOptionClickEnabled = !0, l.cachedOptionsWidth = 0, l._onDidOptionChange = l._register(new a.Emitter), l.onDidOptionChange = l._onDidOptionChange.event, l._onKeyDown = l._register(new a.Emitter), l.onKeyDown = l._onKeyDown.event, l._onMouseDown = l._register(new a.Emitter), l._onInput = l._register(new a.Emitter), l._onKeyUp = l._register(new a.Emitter), l._onPreserveCaseKeyDown = l._register(new a.Emitter), l.onPreserveCaseKeyDown = l._onPreserveCaseKeyDown.event, l.contextViewProvider = n, l.placeholder = s.placeholder || "", l.validation = s.validation, l.label = s.label || u, l.inputActiveOptionBorder = s.inputActiveOptionBorder, l.inputActiveOptionBackground = s.inputActiveOptionBackground,
  20468. l.inputBackground = s.inputBackground, l.inputForeground = s.inputForeground, l.inputBorder = s.inputBorder, l.inputValidationInfoBorder = s.inputValidationInfoBorder, l.inputValidationInfoBackground = s.inputValidationInfoBackground, l.inputValidationInfoForeground = s.inputValidationInfoForeground, l.inputValidationWarningBorder = s.inputValidationWarningBorder, l.inputValidationWarningBackground = s.inputValidationWarningBackground, l.inputValidationWarningForeground = s.inputValidationWarningForeground, l.inputValidationErrorBorder = s.inputValidationErrorBorder, l.inputValidationErrorBackground = s.inputValidationErrorBackground, l.inputValidationErrorForeground = s.inputValidationErrorForeground;
  20469. var d = s.history || [], h = !!s.flexibleHeight, p = !!s.flexibleWidth, g = s.flexibleMaxHeight;
  20470. l.domNode = document.createElement("div"), i.addClass(l.domNode, "monaco-findInput"), l.inputBox = l._register(new o.HistoryInputBox(l.domNode, l.contextViewProvider, {
  20471. ariaLabel: l.label || "",
  20472. placeholder: l.placeholder || "",
  20473. validationOptions: {validation: l.validation},
  20474. inputBackground: l.inputBackground,
  20475. inputForeground: l.inputForeground,
  20476. inputBorder: l.inputBorder,
  20477. inputValidationInfoBackground: l.inputValidationInfoBackground,
  20478. inputValidationInfoForeground: l.inputValidationInfoForeground,
  20479. inputValidationInfoBorder: l.inputValidationInfoBorder,
  20480. inputValidationWarningBackground: l.inputValidationWarningBackground,
  20481. inputValidationWarningForeground: l.inputValidationWarningForeground,
  20482. inputValidationWarningBorder: l.inputValidationWarningBorder,
  20483. inputValidationErrorBackground: l.inputValidationErrorBackground,
  20484. inputValidationErrorForeground: l.inputValidationErrorForeground,
  20485. inputValidationErrorBorder: l.inputValidationErrorBorder,
  20486. history: d,
  20487. flexibleHeight: h,
  20488. flexibleWidth: p,
  20489. flexibleMaxHeight: g
  20490. })), l.preserveCase = l._register(new c({
  20491. appendTitle: "",
  20492. isChecked: !1,
  20493. inputActiveOptionBorder: l.inputActiveOptionBorder,
  20494. inputActiveOptionBackground: l.inputActiveOptionBackground
  20495. })), l._register(l.preserveCase.onChange((function (e) {
  20496. l._onDidOptionChange.fire(e), !e && l.fixFocusOnOptionClickEnabled && l.inputBox.focus(),
  20497. l.validate()
  20498. }))), l._register(l.preserveCase.onKeyDown((function (e) {
  20499. l._onPreserveCaseKeyDown.fire(e)
  20500. }))), l._showOptionButtons ? l.cachedOptionsWidth = l.preserveCase.width() : l.cachedOptionsWidth = 0;
  20501. var f = [l.preserveCase.domNode];
  20502. l.onkeydown(l.domNode, (function (e) {
  20503. if (e.equals(15) || e.equals(17) || e.equals(9)) {
  20504. var t = f.indexOf(document.activeElement);
  20505. if (t >= 0) {
  20506. var n = -1;
  20507. e.equals(17) ? n = (t + 1) % f.length : e.equals(15) && (n = 0 === t ? f.length - 1 : t - 1), e.equals(9) ? f[t].blur() : n >= 0 && f[n].focus(), i.EventHelper.stop(e, !0)
  20508. }
  20509. }
  20510. }));
  20511. var m = document.createElement("div");
  20512. return m.className = "controls", m.style.display = l._showOptionButtons ? "block" : "none", m.appendChild(l.preserveCase.domNode), l.domNode.appendChild(m), t && t.appendChild(l.domNode), l.onkeydown(l.inputBox.inputElement, (function (e) {
  20513. return l._onKeyDown.fire(e)
  20514. })), l.onkeyup(l.inputBox.inputElement, (function (e) {
  20515. return l._onKeyUp.fire(e)
  20516. })), l.oninput(l.inputBox.inputElement, (function (e) {
  20517. return l._onInput.fire()
  20518. })), l.onmousedown(l.inputBox.inputElement, (function (e) {
  20519. return l._onMouseDown.fire(e)
  20520. })), l
  20521. }
  20522. return r(t, e), t.prototype.enable = function () {
  20523. i.removeClass(this.domNode, "disabled"), this.inputBox.enable(), this.preserveCase.enable()
  20524. }, t.prototype.disable = function () {
  20525. i.addClass(this.domNode, "disabled"), this.inputBox.disable(), this.preserveCase.disable()
  20526. }, t.prototype.setEnabled = function (e) {
  20527. e ? this.enable() : this.disable()
  20528. }, t.prototype.style = function (e) {
  20529. this.inputActiveOptionBorder = e.inputActiveOptionBorder, this.inputActiveOptionBackground = e.inputActiveOptionBackground, this.inputBackground = e.inputBackground, this.inputForeground = e.inputForeground, this.inputBorder = e.inputBorder, this.inputValidationInfoBackground = e.inputValidationInfoBackground, this.inputValidationInfoForeground = e.inputValidationInfoForeground, this.inputValidationInfoBorder = e.inputValidationInfoBorder, this.inputValidationWarningBackground = e.inputValidationWarningBackground, this.inputValidationWarningForeground = e.inputValidationWarningForeground, this.inputValidationWarningBorder = e.inputValidationWarningBorder,
  20530. this.inputValidationErrorBackground = e.inputValidationErrorBackground, this.inputValidationErrorForeground = e.inputValidationErrorForeground, this.inputValidationErrorBorder = e.inputValidationErrorBorder, this.applyStyles()
  20531. }, t.prototype.applyStyles = function () {
  20532. if (this.domNode) {
  20533. var e = {
  20534. inputActiveOptionBorder: this.inputActiveOptionBorder,
  20535. inputActiveOptionBackground: this.inputActiveOptionBackground
  20536. };
  20537. this.preserveCase.style(e);
  20538. var t = {
  20539. inputBackground: this.inputBackground,
  20540. inputForeground: this.inputForeground,
  20541. inputBorder: this.inputBorder,
  20542. inputValidationInfoBackground: this.inputValidationInfoBackground,
  20543. inputValidationInfoForeground: this.inputValidationInfoForeground,
  20544. inputValidationInfoBorder: this.inputValidationInfoBorder,
  20545. inputValidationWarningBackground: this.inputValidationWarningBackground,
  20546. inputValidationWarningForeground: this.inputValidationWarningForeground,
  20547. inputValidationWarningBorder: this.inputValidationWarningBorder,
  20548. inputValidationErrorBackground: this.inputValidationErrorBackground,
  20549. inputValidationErrorForeground: this.inputValidationErrorForeground,
  20550. inputValidationErrorBorder: this.inputValidationErrorBorder
  20551. };
  20552. this.inputBox.style(t)
  20553. }
  20554. }, t.prototype.select = function () {
  20555. this.inputBox.select()
  20556. }, t.prototype.focus = function () {
  20557. this.inputBox.focus()
  20558. }, t.prototype.getPreserveCase = function () {
  20559. return this.preserveCase.checked
  20560. }, t.prototype.setPreserveCase = function (e) {
  20561. this.preserveCase.checked = e
  20562. }, t.prototype.focusOnPreserve = function () {
  20563. this.preserveCase.focus()
  20564. }, t.prototype.validate = function () {
  20565. this.inputBox && this.inputBox.validate()
  20566. }, Object.defineProperty(t.prototype, "width", {
  20567. set: function (e) {
  20568. this.inputBox.paddingRight = this.cachedOptionsWidth, this.inputBox.width = e, this.domNode.style.width = e + "px"
  20569. }, enumerable: !0, configurable: !0
  20570. }), t.prototype.dispose = function () {
  20571. e.prototype.dispose.call(this)
  20572. }, t
  20573. }(s.Widget);
  20574. t.ReplaceInput = h
  20575. })), define(n[402], i([7, 8]), (function (e, t) {
  20576. return e.create("vs/base/browser/ui/keybindingLabel/keybindingLabel", t)
  20577. })), define(n[403], i([7, 8]), (function (e, t) {
  20578. return e.create("vs/base/browser/ui/list/listWidget", t)
  20579. }));
  20580. a = this && this.__spreadArrays || function () {
  20581. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  20582. var i = Array(e), o = 0;
  20583. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  20584. return i
  20585. };
  20586. define(n[153], i([0, 1, 403, 2, 21, 19, 101, 6, 16, 57, 56, 4, 52, 239, 140, 27, 31, 240, 131, 61, 271]), (function (e, t, n, i, o, s, u, d, c, p, g, f, m, v, _, y, C, b, S, w) {
  20587. "use strict";
  20588. Object.defineProperty(t, "__esModule", {value: !0});
  20589. var E = function () {
  20590. function e(e) {
  20591. this.trait = e, this.renderedElements = []
  20592. }
  20593. return Object.defineProperty(e.prototype, "templateId", {
  20594. get: function () {
  20595. return "template:" + this.trait.trait
  20596. }, enumerable: !0, configurable: !0
  20597. }), e.prototype.renderTemplate = function (e) {
  20598. return e
  20599. }, e.prototype.renderElement = function (e, t, n) {
  20600. var i = s.firstIndex(this.renderedElements, (function (e) {
  20601. return e.templateData === n
  20602. }));
  20603. if (i >= 0) {
  20604. var o = this.renderedElements[i];
  20605. this.trait.unrender(n), o.index = t
  20606. } else {
  20607. o = {index: t, templateData: n};
  20608. this.renderedElements.push(o)
  20609. }
  20610. this.trait.renderIndex(t, n)
  20611. },
  20612. e.prototype.splice = function (e, t, n) {
  20613. for (var i = [], o = 0, r = this.renderedElements; o < r.length; o++) {
  20614. var s = r[o];
  20615. s.index < e ? i.push(s) : s.index >= e + t && i.push({
  20616. index: s.index + n - t,
  20617. templateData: s.templateData
  20618. })
  20619. }
  20620. this.renderedElements = i
  20621. }, e.prototype.renderIndexes = function (e) {
  20622. for (var t = 0, n = this.renderedElements; t < n.length; t++) {
  20623. var i = n[t], o = i.index, r = i.templateData;
  20624. e.indexOf(o) > -1 && this.trait.renderIndex(o, r)
  20625. }
  20626. }, e.prototype.disposeTemplate = function (e) {
  20627. var t = s.firstIndex(this.renderedElements, (function (t) {
  20628. return t.templateData === e
  20629. }));
  20630. t < 0 || this.renderedElements.splice(t, 1)
  20631. }, e
  20632. }(), L = function () {
  20633. function e(e) {
  20634. this._trait = e, this.indexes = [], this.sortedIndexes = [], this._onChange = new f.Emitter, this.onChange = this._onChange.event
  20635. }
  20636. return Object.defineProperty(e.prototype, "trait", {
  20637. get: function () {
  20638. return this._trait
  20639. }, enumerable: !0, configurable: !0
  20640. }), Object.defineProperty(e.prototype, "renderer", {
  20641. get: function () {
  20642. return new E(this)
  20643. }, enumerable: !0, configurable: !0
  20644. }), e.prototype.splice = function (e, t, n) {
  20645. var i = n.length - t, o = e + t, r = a(this.sortedIndexes.filter((function (t) {
  20646. return t < e
  20647. })), n.map((function (t, n) {
  20648. return t ? n + e : -1
  20649. })).filter((function (e) {
  20650. return -1 !== e
  20651. })), this.sortedIndexes.filter((function (e) {
  20652. return e >= o
  20653. })).map((function (e) {
  20654. return e + i
  20655. })));
  20656. this.renderer.splice(e, t, n.length), this._set(r, r)
  20657. }, e.prototype.renderIndex = function (e, t) {
  20658. d.toggleClass(t, this._trait, this.contains(e))
  20659. }, e.prototype.unrender = function (e) {
  20660. d.removeClass(e, this._trait)
  20661. }, e.prototype.set = function (e, t) {
  20662. return this._set(e, a(e).sort(K), t)
  20663. }, e.prototype._set = function (e, t, n) {
  20664. var i = this.indexes, o = this.sortedIndexes;
  20665. this.indexes = e, this.sortedIndexes = t;
  20666. var r = H(o, e);
  20667. return this.renderer.renderIndexes(r), this._onChange.fire({indexes: e, browserEvent: n}), i
  20668. }, e.prototype.get = function () {
  20669. return this.indexes
  20670. }, e.prototype.contains = function (e) {
  20671. return s.binarySearch(this.sortedIndexes, e, K) >= 0
  20672. }, e.prototype.dispose = function () {
  20673. i.dispose(this._onChange)
  20674. }, h([u.memoize], e.prototype, "renderer", null), e
  20675. }(), D = function (e) {
  20676. function t() {
  20677. return e.call(this, "focused") || this
  20678. }
  20679. return r(t, e), t.prototype.renderIndex = function (t, n) {
  20680. e.prototype.renderIndex.call(this, t, n), this.contains(t) ? n.setAttribute("aria-selected", "true") : n.removeAttribute("aria-selected")
  20681. }, t
  20682. }(L), N = function () {
  20683. function e(e, t, n) {
  20684. this.trait = e, this.view = t, this.identityProvider = n
  20685. }
  20686. return e.prototype.splice = function (e, t, n) {
  20687. var i = this;
  20688. if (!this.identityProvider) return this.trait.splice(e, t, n.map((function () {
  20689. return !1
  20690. })));
  20691. var o = this.trait.get().map((function (e) {
  20692. return i.identityProvider.getId(i.view.element(e)).toString()
  20693. })), r = n.map((function (e) {
  20694. return o.indexOf(i.identityProvider.getId(e).toString()) > -1
  20695. }));
  20696. this.trait.splice(e, t, r)
  20697. }, e
  20698. }();
  20699. function x(e) {
  20700. return "INPUT" === e.tagName || "TEXTAREA" === e.tagName
  20701. }
  20702. var I, M = function () {
  20703. function e(e, t, n) {
  20704. this.list = e, this.view = t, this.disposables = new i.DisposableStore;
  20705. var o = !1 !== n.multipleSelectionSupport;
  20706. this.openController = n.openController || F;
  20707. var r = f.Event.chain(m.domEvent(t.domNode, "keydown")).filter((function (e) {
  20708. return !x(e.target)
  20709. })).map((function (e) {
  20710. return new g.StandardKeyboardEvent(e)
  20711. }))
  20712. ;r.filter((function (e) {
  20713. return 3 === e.keyCode
  20714. })).on(this.onEnter, this, this.disposables), r.filter((function (e) {
  20715. return 16 === e.keyCode
  20716. })).on(this.onUpArrow, this, this.disposables), r.filter((function (e) {
  20717. return 18 === e.keyCode
  20718. })).on(this.onDownArrow, this, this.disposables), r.filter((function (e) {
  20719. return 11 === e.keyCode
  20720. })).on(this.onPageUpArrow, this, this.disposables), r.filter((function (e) {
  20721. return 12 === e.keyCode
  20722. })).on(this.onPageDownArrow, this, this.disposables), r.filter((function (e) {
  20723. return 9 === e.keyCode
  20724. })).on(this.onEscape, this, this.disposables), o && r.filter((function (e) {
  20725. return (c.isMacintosh ? e.metaKey : e.ctrlKey) && 31 === e.keyCode
  20726. })).on(this.onCtrlA, this, this.disposables)
  20727. }
  20728. return e.prototype.onEnter = function (e) {
  20729. e.preventDefault(), e.stopPropagation(), this.list.setSelection(this.list.getFocus(), e.browserEvent), this.openController.shouldOpen(e.browserEvent) && this.list.open(this.list.getFocus(), e.browserEvent)
  20730. }, e.prototype.onUpArrow = function (e) {
  20731. e.preventDefault(), e.stopPropagation(), this.list.focusPrevious(1, !1, e.browserEvent),
  20732. this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus()
  20733. }, e.prototype.onDownArrow = function (e) {
  20734. e.preventDefault(), e.stopPropagation(), this.list.focusNext(1, !1, e.browserEvent), this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus()
  20735. }, e.prototype.onPageUpArrow = function (e) {
  20736. e.preventDefault(), e.stopPropagation(), this.list.focusPreviousPage(e.browserEvent), this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus()
  20737. }, e.prototype.onPageDownArrow = function (e) {
  20738. e.preventDefault(), e.stopPropagation(), this.list.focusNextPage(e.browserEvent), this.list.reveal(this.list.getFocus()[0]), this.view.domNode.focus()
  20739. }, e.prototype.onCtrlA = function (e) {
  20740. e.preventDefault(), e.stopPropagation(), this.list.setSelection(s.range(this.list.length), e.browserEvent), this.view.domNode.focus()
  20741. }, e.prototype.onEscape = function (e) {
  20742. e.preventDefault(), e.stopPropagation(), this.list.setSelection([], e.browserEvent), this.view.domNode.focus()
  20743. }, e.prototype.dispose = function () {
  20744. this.disposables.dispose()
  20745. }, e
  20746. }();
  20747. !function (e) {
  20748. e[e.Idle = 0] = "Idle", e[e.Typing = 1] = "Typing"
  20749. }(I || (I = {})), t.DefaultKeyboardNavigationDelegate = new (function () {
  20750. function e() {
  20751. }
  20752. return e.prototype.mightProducePrintableCharacter = function (e) {
  20753. return !(e.ctrlKey || e.metaKey || e.altKey) && (e.keyCode >= 31 && e.keyCode <= 56 || e.keyCode >= 21 && e.keyCode <= 30 || e.keyCode >= 93 && e.keyCode <= 102 || e.keyCode >= 80 && e.keyCode <= 90)
  20754. }, e
  20755. }());
  20756. var k = function () {
  20757. function e(e, t, n, o) {
  20758. this.list = e, this.view = t, this.keyboardNavigationLabelProvider = n, this.delegate = o, this.enabled = !1, this.state = I.Idle, this.automaticKeyboardNavigation = !0, this.triggered = !1, this.enabledDisposables = new i.DisposableStore, this.disposables = new i.DisposableStore, this.updateOptions(e.options)
  20759. }
  20760. return e.prototype.updateOptions = function (e) {
  20761. void 0 === e.enableKeyboardNavigation || !!e.enableKeyboardNavigation ? this.enable() : this.disable(), void 0 !== e.automaticKeyboardNavigation && (this.automaticKeyboardNavigation = e.automaticKeyboardNavigation)
  20762. }, e.prototype.enable = function () {
  20763. var e = this;
  20764. if (!this.enabled) {
  20765. var t = f.Event.chain(m.domEvent(this.view.domNode, "keydown")).filter((function (e) {
  20766. return !x(e.target)
  20767. })).filter((function () {
  20768. return e.automaticKeyboardNavigation || e.triggered
  20769. })).map((function (e) {
  20770. return new g.StandardKeyboardEvent(e)
  20771. })).filter((function (t) {
  20772. return e.delegate.mightProducePrintableCharacter(t)
  20773. })).forEach((function (e) {
  20774. e.stopPropagation(), e.preventDefault()
  20775. })).map((function (e) {
  20776. return e.browserEvent.key
  20777. })).event, n = f.Event.debounce(t, (function () {
  20778. return null
  20779. }), 800);
  20780. f.Event.reduce(f.Event.any(t, n), (function (e, t) {
  20781. return null === t ? null : (e || "") + t
  20782. }))(this.onInput, this, this.enabledDisposables), this.enabled = !0, this.triggered = !1
  20783. }
  20784. }, e.prototype.disable = function () {
  20785. this.enabled && (this.enabledDisposables.clear(), this.enabled = !1, this.triggered = !1)
  20786. }, e.prototype.onInput = function (e) {
  20787. if (!e) return this.state = I.Idle, void (this.triggered = !1);
  20788. var t = this.list.getFocus(), n = t.length > 0 ? t[0] : 0, i = this.state === I.Idle ? 1 : 0;
  20789. this.state = I.Typing;
  20790. for (var o = 0; o < this.list.length; o++) {
  20791. var r = (n + o + i) % this.list.length,
  20792. s = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(r)),
  20793. a = s && s.toString();
  20794. if (void 0 === a || w.matchesPrefix(e, a)) return this.list.setFocus([r]), void this.list.reveal(r)
  20795. }
  20796. }, e.prototype.dispose = function () {
  20797. this.disable(), this.enabledDisposables.dispose(), this.disposables.dispose()
  20798. }, e
  20799. }(), T = function () {
  20800. function e(e, t) {
  20801. this.list = e, this.view = t, this.disposables = new i.DisposableStore, f.Event.chain(m.domEvent(t.domNode, "keydown")).filter((function (e) {
  20802. return !x(e.target)
  20803. })).map((function (e) {
  20804. return new g.StandardKeyboardEvent(e)
  20805. })).filter((function (e) {
  20806. return !(2 !== e.keyCode || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
  20807. })).on(this.onTab, this, this.disposables)
  20808. }
  20809. return e.prototype.onTab = function (e) {
  20810. if (e.target === this.view.domNode) {
  20811. var t = this.list.getFocus();
  20812. if (0 !== t.length) {
  20813. var n = this.view.domElement(t[0]);
  20814. if (n) {
  20815. var i = n.querySelector("[tabIndex]");
  20816. if (i && i instanceof HTMLElement && -1 !== i.tabIndex) {
  20817. var o = window.getComputedStyle(i)
  20818. ;"hidden" !== o.visibility && "none" !== o.display && (e.preventDefault(), e.stopPropagation(), i.focus())
  20819. }
  20820. }
  20821. }
  20822. }
  20823. }, e.prototype.dispose = function () {
  20824. this.disposables.dispose()
  20825. }, e
  20826. }();
  20827. function R(e) {
  20828. return c.isMacintosh ? e.browserEvent.metaKey : e.browserEvent.ctrlKey
  20829. }
  20830. function O(e) {
  20831. return e.browserEvent.shiftKey
  20832. }
  20833. function P(e) {
  20834. return e instanceof MouseEvent && 2 === e.button
  20835. }
  20836. t.isSelectionSingleChangeEvent = R, t.isSelectionRangeChangeEvent = O;
  20837. var A = {isSelectionSingleChangeEvent: R, isSelectionRangeChangeEvent: O}, F = {
  20838. shouldOpen: function (e) {
  20839. return !(e instanceof MouseEvent) || !P(e)
  20840. }
  20841. }, W = function () {
  20842. function e(e) {
  20843. this.list = e, this.disposables = new i.DisposableStore, this.multipleSelectionSupport = !(!1 === e.options.multipleSelectionSupport), this.multipleSelectionSupport && (this.multipleSelectionController = e.options.multipleSelectionController || A), this.openController = e.options.openController || F, this.mouseSupport = void 0 === e.options.mouseSupport || !!e.options.mouseSupport, this.mouseSupport && (e.onMouseDown(this.onMouseDown, this, this.disposables),
  20844. e.onContextMenu(this.onContextMenu, this, this.disposables), e.onMouseDblClick(this.onDoubleClick, this, this.disposables), e.onTouchStart(this.onMouseDown, this, this.disposables), this.disposables.add(p.Gesture.addTarget(e.getHTMLElement()))), e.onMouseClick(this.onPointer, this, this.disposables), e.onMouseMiddleClick(this.onPointer, this, this.disposables), e.onTap(this.onPointer, this, this.disposables)
  20845. }
  20846. return e.prototype.isSelectionSingleChangeEvent = function (e) {
  20847. return this.multipleSelectionController ? this.multipleSelectionController.isSelectionSingleChangeEvent(e) : c.isMacintosh ? e.browserEvent.metaKey : e.browserEvent.ctrlKey
  20848. }, e.prototype.isSelectionRangeChangeEvent = function (e) {
  20849. return this.multipleSelectionController ? this.multipleSelectionController.isSelectionRangeChangeEvent(e) : e.browserEvent.shiftKey
  20850. }, e.prototype.isSelectionChangeEvent = function (e) {
  20851. return this.isSelectionSingleChangeEvent(e) || this.isSelectionRangeChangeEvent(e)
  20852. }, e.prototype.onMouseDown = function (e) {
  20853. document.activeElement !== e.browserEvent.target && this.list.domFocus()
  20854. }, e.prototype.onContextMenu = function (e) {
  20855. var t = void 0 === e.index ? [] : [e.index];
  20856. this.list.setFocus(t, e.browserEvent)
  20857. }, e.prototype.onPointer = function (e) {
  20858. if (this.mouseSupport && !x(e.browserEvent.target)) {
  20859. var t = this.list.getFocus()[0], n = this.list.getSelection();
  20860. t = void 0 === t ? n[0] : t;
  20861. var i = e.index;
  20862. if (void 0 === i) return this.list.setFocus([], e.browserEvent), void this.list.setSelection([], e.browserEvent);
  20863. if (this.multipleSelectionSupport && this.isSelectionRangeChangeEvent(e)) return this.changeSelection(e, t);
  20864. if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) return this.changeSelection(e, t);
  20865. this.list.setFocus([i], e.browserEvent), P(e.browserEvent) || (this.list.setSelection([i], e.browserEvent), this.openController.shouldOpen(e.browserEvent) && this.list.open([i], e.browserEvent))
  20866. }
  20867. }, e.prototype.onDoubleClick = function (e) {
  20868. if (!(x(e.browserEvent.target) || this.multipleSelectionSupport && this.isSelectionChangeEvent(e))) {
  20869. var t = this.list.getFocus()
  20870. ;this.list.setSelection(t, e.browserEvent), this.list.pin(t)
  20871. }
  20872. }, e.prototype.changeSelection = function (e, t) {
  20873. var n = e.index;
  20874. if (this.isSelectionRangeChangeEvent(e) && void 0 !== t) {
  20875. var i = Math.min(t, n), o = Math.max(t, n), r = s.range(i, o + 1), l = function (e, t) {
  20876. var n = e.indexOf(t);
  20877. if (-1 === n) return [];
  20878. var i = [], o = n - 1;
  20879. for (; o >= 0 && e[o] === t - (n - o);) i.push(e[o--]);
  20880. i.reverse(), o = n;
  20881. for (; o < e.length && e[o] === t + (o - n);) i.push(e[o++]);
  20882. return i
  20883. }(H(d = this.list.getSelection(), [t]), t);
  20884. if (0 === l.length) return;
  20885. var u = H(r, function (e, t) {
  20886. var n = [], i = 0, o = 0;
  20887. for (; i < e.length || o < t.length;) if (i >= e.length) n.push(t[o++]); else if (o >= t.length) n.push(e[i++]); else {
  20888. if (e[i] === t[o]) {
  20889. i++, o++;
  20890. continue
  20891. }
  20892. e[i] < t[o] ? n.push(e[i++]) : o++
  20893. }
  20894. return n
  20895. }(d, l));
  20896. this.list.setSelection(u, e.browserEvent)
  20897. } else if (this.isSelectionSingleChangeEvent(e)) {
  20898. var d;
  20899. u = (d = this.list.getSelection()).filter((function (e) {
  20900. return e !== n
  20901. }));
  20902. this.list.setFocus([n]), d.length === u.length ? this.list.setSelection(a(u, [n]), e.browserEvent) : this.list.setSelection(u, e.browserEvent)
  20903. }
  20904. }, e.prototype.dispose = function () {
  20905. this.disposables.dispose()
  20906. }, e
  20907. }();
  20908. t.MouseController = W;
  20909. var B = function () {
  20910. function e(e, t) {
  20911. this.styleElement = e, this.selectorSuffix = t
  20912. }
  20913. return e.prototype.style = function (e) {
  20914. var t = this.selectorSuffix && "." + this.selectorSuffix, n = [];
  20915. e.listBackground && (e.listBackground.isOpaque() ? n.push(".monaco-list" + t + " .monaco-list-rows { background: " + e.listBackground + "; }") : c.isMacintosh || console.warn("List with id '" + this.selectorSuffix + "' was styled with a non-opaque background color. This will break sub-pixel antialiasing.")), e.listFocusBackground && (n.push(".monaco-list" + t + ":focus .monaco-list-row.focused { background-color: " + e.listFocusBackground + "; }"), n.push(".monaco-list" + t + ":focus .monaco-list-row.focused:hover { background-color: " + e.listFocusBackground + "; }")), e.listFocusForeground && n.push(".monaco-list" + t + ":focus .monaco-list-row.focused { color: " + e.listFocusForeground + "; }"),
  20916. e.listActiveSelectionBackground && (n.push(".monaco-list" + t + ":focus .monaco-list-row.selected { background-color: " + e.listActiveSelectionBackground + "; }"), n.push(".monaco-list" + t + ":focus .monaco-list-row.selected:hover { background-color: " + e.listActiveSelectionBackground + "; }")), e.listActiveSelectionForeground && n.push(".monaco-list" + t + ":focus .monaco-list-row.selected { color: " + e.listActiveSelectionForeground + "; }"), e.listFocusAndSelectionBackground && n.push("\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list" + t + ":focus .monaco-list-row.selected.focused { background-color: " + e.listFocusAndSelectionBackground + "; }\n\t\t\t"), e.listFocusAndSelectionForeground && n.push("\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list" + t + ":focus .monaco-list-row.selected.focused { color: " + e.listFocusAndSelectionForeground + "; }\n\t\t\t"), e.listInactiveFocusBackground && (n.push(".monaco-list" + t + " .monaco-list-row.focused { background-color: " + e.listInactiveFocusBackground + "; }"),
  20917. n.push(".monaco-list" + t + " .monaco-list-row.focused:hover { background-color: " + e.listInactiveFocusBackground + "; }")), e.listInactiveSelectionBackground && (n.push(".monaco-list" + t + " .monaco-list-row.selected { background-color: " + e.listInactiveSelectionBackground + "; }"), n.push(".monaco-list" + t + " .monaco-list-row.selected:hover { background-color: " + e.listInactiveSelectionBackground + "; }")), e.listInactiveSelectionForeground && n.push(".monaco-list" + t + " .monaco-list-row.selected { color: " + e.listInactiveSelectionForeground + "; }"), e.listHoverBackground && n.push(".monaco-list" + t + ":not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: " + e.listHoverBackground + "; }"), e.listHoverForeground && n.push(".monaco-list" + t + " .monaco-list-row:hover:not(.selected):not(.focused) { color: " + e.listHoverForeground + "; }"), e.listSelectionOutline && n.push(".monaco-list" + t + " .monaco-list-row.selected { outline: 1px dotted " + e.listSelectionOutline + "; outline-offset: -1px; }"),
  20918. e.listFocusOutline && n.push("\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list" + t + ":focus .monaco-list-row.focused { outline: 1px solid " + e.listFocusOutline + "; outline-offset: -1px; }\n\t\t\t"), e.listInactiveFocusOutline && n.push(".monaco-list" + t + " .monaco-list-row.focused { outline: 1px dotted " + e.listInactiveFocusOutline + "; outline-offset: -1px; }"), e.listHoverOutline && n.push(".monaco-list" + t + " .monaco-list-row:hover { outline: 1px dashed " + e.listHoverOutline + "; outline-offset: -1px; }"), e.listDropBackground && n.push("\n\t\t\t\t.monaco-list" + t + ".drop-target,\n\t\t\t\t.monaco-list" + t + " .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list" + t + " .monaco-list-row.drop-target { background-color: " + e.listDropBackground + " !important; color: inherit !important; }\n\t\t\t"), e.listFilterWidgetBackground && n.push(".monaco-list-type-filter { background-color: " + e.listFilterWidgetBackground + " }"), e.listFilterWidgetOutline && n.push(".monaco-list-type-filter { border: 1px solid " + e.listFilterWidgetOutline + "; }"),
  20919. e.listFilterWidgetNoMatchesOutline && n.push(".monaco-list-type-filter.no-matches { border: 1px solid " + e.listFilterWidgetNoMatchesOutline + "; }"), e.listMatchesShadow && n.push(".monaco-list-type-filter { box-shadow: 1px 1px 1px " + e.listMatchesShadow + "; }");
  20920. var i = n.join("\n");
  20921. i !== this.styleElement.innerHTML && (this.styleElement.innerHTML = i)
  20922. }, e
  20923. }();
  20924. t.DefaultStyleController = B;
  20925. var V = {
  20926. listFocusBackground: y.Color.fromHex("#7FB0D0"),
  20927. listActiveSelectionBackground: y.Color.fromHex("#0E639C"),
  20928. listActiveSelectionForeground: y.Color.fromHex("#FFFFFF"),
  20929. listFocusAndSelectionBackground: y.Color.fromHex("#094771"),
  20930. listFocusAndSelectionForeground: y.Color.fromHex("#FFFFFF"),
  20931. listInactiveSelectionBackground: y.Color.fromHex("#3F3F46"),
  20932. listHoverBackground: y.Color.fromHex("#2A2D2E"),
  20933. listDropBackground: y.Color.fromHex("#383B3D"),
  20934. treeIndentGuidesStroke: y.Color.fromHex("#a9a9a9")
  20935. }, z = {
  20936. keyboardSupport: !0, mouseSupport: !0, multipleSelectionSupport: !0, dnd: {
  20937. getDragURI: function () {
  20938. return null
  20939. }, onDragStart: function () {
  20940. }, onDragOver: function () {
  20941. return !1
  20942. },
  20943. drop: function () {
  20944. }
  20945. }, ariaRootRole: v.ListAriaRootRole.TREE
  20946. };
  20947. function H(e, t) {
  20948. for (var n = [], i = 0, o = 0; i < e.length || o < t.length;) if (i >= e.length) n.push(t[o++]); else if (o >= t.length) n.push(e[i++]); else {
  20949. if (e[i] === t[o]) {
  20950. n.push(e[i]), i++, o++;
  20951. continue
  20952. }
  20953. e[i] < t[o] ? n.push(e[i++]) : n.push(t[o++])
  20954. }
  20955. return n
  20956. }
  20957. var K = function (e, t) {
  20958. return e - t
  20959. }, U = function () {
  20960. function e(e, t) {
  20961. this._templateId = e, this.renderers = t
  20962. }
  20963. return Object.defineProperty(e.prototype, "templateId", {
  20964. get: function () {
  20965. return this._templateId
  20966. }, enumerable: !0, configurable: !0
  20967. }), e.prototype.renderTemplate = function (e) {
  20968. return this.renderers.map((function (t) {
  20969. return t.renderTemplate(e)
  20970. }))
  20971. }, e.prototype.renderElement = function (e, t, n, i) {
  20972. for (var o = 0, r = 0, s = this.renderers; r < s.length; r++) {
  20973. s[r].renderElement(e, t, n[o++], i)
  20974. }
  20975. }, e.prototype.disposeElement = function (e, t, n, i) {
  20976. for (var o = 0, r = 0, s = this.renderers; r < s.length; r++) {
  20977. var a = s[r];
  20978. a.disposeElement && a.disposeElement(e, t, n[o], i), o += 1
  20979. }
  20980. }, e.prototype.disposeTemplate = function (e) {
  20981. for (var t = 0, n = 0, i = this.renderers; n < i.length; n++) {
  20982. i[n].disposeTemplate(e[t++])
  20983. }
  20984. }, e
  20985. }(), j = function () {
  20986. function e(e) {
  20987. this.accessibilityProvider = e, this.templateId = "a18n"
  20988. }
  20989. return e.prototype.renderTemplate = function (e) {
  20990. return e
  20991. }, e.prototype.renderElement = function (e, t, n) {
  20992. var i = this.accessibilityProvider.getAriaLabel(e);
  20993. i ? n.setAttribute("aria-label", i) : n.removeAttribute("aria-label");
  20994. var o = this.accessibilityProvider.getAriaLevel && this.accessibilityProvider.getAriaLevel(e);
  20995. "number" == typeof o ? n.setAttribute("aria-level", "" + o) : n.removeAttribute("aria-level")
  20996. }, e.prototype.disposeTemplate = function (e) {
  20997. }, e
  20998. }(), q = function () {
  20999. function e(e, t) {
  21000. this.list = e, this.dnd = t
  21001. }
  21002. return e.prototype.getDragElements = function (e) {
  21003. var t = this.list.getSelectedElements();
  21004. return t.indexOf(e) > -1 ? t : [e]
  21005. }, e.prototype.getDragURI = function (e) {
  21006. return this.dnd.getDragURI(e)
  21007. }, e.prototype.getDragLabel = function (e, t) {
  21008. if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e, t)
  21009. }, e.prototype.onDragStart = function (e, t) {
  21010. this.dnd.onDragStart && this.dnd.onDragStart(e, t)
  21011. }, e.prototype.onDragOver = function (e, t, n, i) {
  21012. return this.dnd.onDragOver(e, t, n, i)
  21013. },
  21014. e.prototype.onDragEnd = function (e) {
  21015. this.dnd.onDragEnd && this.dnd.onDragEnd(e)
  21016. }, e.prototype.drop = function (e, t, n, i) {
  21017. this.dnd.drop(e, t, n, i)
  21018. }, e
  21019. }(), G = function () {
  21020. function e(e, o, r, s, u) {
  21021. void 0 === u && (u = z), this.user = e, this._options = u, this.eventBufferer = new f.EventBufferer, this.disposables = new i.DisposableStore, this._onDidOpen = new f.Emitter, this.onDidOpen = this._onDidOpen.event, this._onDidPin = new f.Emitter, this.didJustPressContextMenuKey = !1, this._onDidDispose = new f.Emitter, this.onDidDispose = this._onDidDispose.event, this.focus = new D, this.selection = new L("selected"), C.mixin(u, V, !1);
  21022. var c = [this.focus.renderer, this.selection.renderer];
  21023. this.accessibilityProvider = u.accessibilityProvider, this.accessibilityProvider && (c.push(new j(this.accessibilityProvider)), this.accessibilityProvider.onDidChangeActiveDescendant && this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant, this, this.disposables)), s = s.map((function (e) {
  21024. return new U(e.templateId, a(c, [e]))
  21025. }));
  21026. var h = l(l({}, u), {dnd: u.dnd && new q(this, u.dnd)})
  21027. ;
  21028. if (this.view = new _.ListView(o, r, s, h), "string" != typeof u.ariaRole ? this.view.domNode.setAttribute("role", v.ListAriaRootRole.TREE) : this.view.domNode.setAttribute("role", u.ariaRole), u.styleController) this.styleController = u.styleController(this.view.domId); else {
  21029. var p = d.createStyleSheet(this.view.domNode);
  21030. this.styleController = new B(p, this.view.domId)
  21031. }
  21032. if (this.spliceable = new b.CombinedSpliceable([new N(this.focus, this.view, u.identityProvider), new N(this.selection, this.view, u.identityProvider), this.view]), this.disposables.add(this.focus), this.disposables.add(this.selection), this.disposables.add(this.view), this.disposables.add(this._onDidDispose), this.onDidFocus = f.Event.map(m.domEvent(this.view.domNode, "focus", !0), (function () {
  21033. return null
  21034. })), this.onDidBlur = f.Event.map(m.domEvent(this.view.domNode, "blur", !0), (function () {
  21035. return null
  21036. })), this.disposables.add(new T(this, this.view)), "boolean" != typeof u.keyboardSupport || u.keyboardSupport) {
  21037. var g = new M(this, this.view, u);
  21038. this.disposables.add(g)
  21039. }
  21040. if (u.keyboardNavigationLabelProvider) {
  21041. var y = u.keyboardNavigationDelegate || t.DefaultKeyboardNavigationDelegate;
  21042. this.typeLabelController = new k(this, this.view, u.keyboardNavigationLabelProvider, y), this.disposables.add(this.typeLabelController)
  21043. }
  21044. this.disposables.add(this.createMouseController(u)), this.onFocusChange(this._onFocusChange, this, this.disposables), this.onSelectionChange(this._onSelectionChange, this, this.disposables), u.ariaLabel && this.view.domNode.setAttribute("aria-label", n.localize(0, null, u.ariaLabel))
  21045. }
  21046. return Object.defineProperty(e.prototype, "onFocusChange", {
  21047. get: function () {
  21048. var e = this;
  21049. return f.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange), (function (t) {
  21050. return e.toListEvent(t)
  21051. }))
  21052. }, enumerable: !0, configurable: !0
  21053. }), Object.defineProperty(e.prototype, "onSelectionChange", {
  21054. get: function () {
  21055. var e = this;
  21056. return f.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange), (function (t) {
  21057. return e.toListEvent(t)
  21058. }))
  21059. }, enumerable: !0, configurable: !0
  21060. }), Object.defineProperty(e.prototype, "domId", {
  21061. get: function () {
  21062. return this.view.domId
  21063. }, enumerable: !0, configurable: !0
  21064. }), Object.defineProperty(e.prototype, "onMouseClick", {
  21065. get: function () {
  21066. return this.view.onMouseClick
  21067. }, enumerable: !0, configurable: !0
  21068. }), Object.defineProperty(e.prototype, "onMouseDblClick", {
  21069. get: function () {
  21070. return this.view.onMouseDblClick
  21071. }, enumerable: !0, configurable: !0
  21072. }), Object.defineProperty(e.prototype, "onMouseMiddleClick", {
  21073. get: function () {
  21074. return this.view.onMouseMiddleClick
  21075. }, enumerable: !0, configurable: !0
  21076. }), Object.defineProperty(e.prototype, "onMouseDown", {
  21077. get: function () {
  21078. return this.view.onMouseDown
  21079. }, enumerable: !0, configurable: !0
  21080. }), Object.defineProperty(e.prototype, "onTouchStart", {
  21081. get: function () {
  21082. return this.view.onTouchStart
  21083. }, enumerable: !0, configurable: !0
  21084. }), Object.defineProperty(e.prototype, "onTap", {
  21085. get: function () {
  21086. return this.view.onTap
  21087. }, enumerable: !0, configurable: !0
  21088. }), Object.defineProperty(e.prototype, "onContextMenu", {
  21089. get: function () {
  21090. var e = this, t = f.Event.chain(m.domEvent(this.view.domNode, "keydown")).map((function (e) {
  21091. return new g.StandardKeyboardEvent(e)
  21092. })).filter((function (t) {
  21093. return e.didJustPressContextMenuKey = 58 === t.keyCode || t.shiftKey && 68 === t.keyCode
  21094. })).filter((function (e) {
  21095. return e.preventDefault(), e.stopPropagation(), !1
  21096. })).event, n = f.Event.chain(m.domEvent(this.view.domNode, "keyup")).filter((function () {
  21097. var t = e.didJustPressContextMenuKey;
  21098. return e.didJustPressContextMenuKey = !1, t
  21099. })).filter((function () {
  21100. return e.getFocus().length > 0 && !!e.view.domElement(e.getFocus()[0])
  21101. })).map((function (t) {
  21102. var n = e.getFocus()[0];
  21103. return {index: n, element: e.view.element(n), anchor: e.view.domElement(n), browserEvent: t}
  21104. })).event, i = f.Event.chain(this.view.onContextMenu).filter((function () {
  21105. return !e.didJustPressContextMenuKey
  21106. })).map((function (e) {
  21107. var t = e.element, n = e.index, i = e.browserEvent;
  21108. return {element: t, index: n, anchor: {x: i.clientX + 1, y: i.clientY}, browserEvent: i}
  21109. })).event;
  21110. return f.Event.any(t, n, i)
  21111. }, enumerable: !0, configurable: !0
  21112. }), Object.defineProperty(e.prototype, "onKeyDown", {
  21113. get: function () {
  21114. return m.domEvent(this.view.domNode, "keydown")
  21115. }, enumerable: !0, configurable: !0
  21116. }),
  21117. e.prototype.createMouseController = function (e) {
  21118. return new W(this)
  21119. }, e.prototype.updateOptions = function (e) {
  21120. void 0 === e && (e = {}), this._options = l(l({}, this._options), e), this.typeLabelController && this.typeLabelController.updateOptions(this._options)
  21121. }, Object.defineProperty(e.prototype, "options", {
  21122. get: function () {
  21123. return this._options
  21124. }, enumerable: !0, configurable: !0
  21125. }), e.prototype.splice = function (e, t, n) {
  21126. var i = this;
  21127. if (void 0 === n && (n = []), e < 0 || e > this.view.length) throw new v.ListError(this.user, "Invalid start index: " + e);
  21128. if (t < 0) throw new v.ListError(this.user, "Invalid delete count: " + t);
  21129. 0 === t && 0 === n.length || this.eventBufferer.bufferEvents((function () {
  21130. return i.spliceable.splice(e, t, n)
  21131. }))
  21132. }, e.prototype.rerender = function () {
  21133. this.view.rerender()
  21134. }, e.prototype.element = function (e) {
  21135. return this.view.element(e)
  21136. }, Object.defineProperty(e.prototype, "length", {
  21137. get: function () {
  21138. return this.view.length
  21139. }, enumerable: !0, configurable: !0
  21140. }), Object.defineProperty(e.prototype, "contentHeight", {
  21141. get: function () {
  21142. return this.view.contentHeight
  21143. }, enumerable: !0,
  21144. configurable: !0
  21145. }), Object.defineProperty(e.prototype, "scrollTop", {
  21146. get: function () {
  21147. return this.view.getScrollTop()
  21148. }, set: function (e) {
  21149. this.view.setScrollTop(e)
  21150. }, enumerable: !0, configurable: !0
  21151. }), e.prototype.domFocus = function () {
  21152. this.view.domNode.focus()
  21153. }, e.prototype.layout = function (e, t) {
  21154. this.view.layout(e, t)
  21155. }, e.prototype.setSelection = function (e, t) {
  21156. for (var n = 0, i = e; n < i.length; n++) {
  21157. var o = i[n];
  21158. if (o < 0 || o >= this.length) throw new v.ListError(this.user, "Invalid index " + o)
  21159. }
  21160. this.selection.set(e, t)
  21161. }, e.prototype.getSelection = function () {
  21162. return this.selection.get()
  21163. }, e.prototype.getSelectedElements = function () {
  21164. var e = this;
  21165. return this.getSelection().map((function (t) {
  21166. return e.view.element(t)
  21167. }))
  21168. }, e.prototype.setFocus = function (e, t) {
  21169. for (var n = 0, i = e; n < i.length; n++) {
  21170. var o = i[n];
  21171. if (o < 0 || o >= this.length) throw new v.ListError(this.user, "Invalid index " + o)
  21172. }
  21173. this.focus.set(e, t)
  21174. }, e.prototype.focusNext = function (e, t, n, i) {
  21175. if (void 0 === e && (e = 1), void 0 === t && (t = !1), 0 !== this.length) {
  21176. var o = this.focus.get(), r = this.findNextIndex(o.length > 0 ? o[0] + e : 0, t, i)
  21177. ;r > -1 && this.setFocus([r], n)
  21178. }
  21179. }, e.prototype.focusPrevious = function (e, t, n, i) {
  21180. if (void 0 === e && (e = 1), void 0 === t && (t = !1), 0 !== this.length) {
  21181. var o = this.focus.get(), r = this.findPreviousIndex(o.length > 0 ? o[0] - e : 0, t, i);
  21182. r > -1 && this.setFocus([r], n)
  21183. }
  21184. }, e.prototype.focusNextPage = function (e, t) {
  21185. var n = this, i = this.view.indexAt(this.view.getScrollTop() + this.view.renderHeight);
  21186. i = 0 === i ? 0 : i - 1;
  21187. var o = this.view.element(i), r = this.getFocusedElements()[0];
  21188. if (r !== o) {
  21189. var s = this.findPreviousIndex(i, !1, t);
  21190. s > -1 && r !== this.view.element(s) ? this.setFocus([s], e) : this.setFocus([i], e)
  21191. } else {
  21192. var a = this.view.getScrollTop();
  21193. this.view.setScrollTop(a + this.view.renderHeight - this.view.elementHeight(i)), this.view.getScrollTop() !== a && setTimeout((function () {
  21194. return n.focusNextPage(e, t)
  21195. }), 0)
  21196. }
  21197. }, e.prototype.focusPreviousPage = function (e, t) {
  21198. var n, i = this, o = this.view.getScrollTop();
  21199. n = 0 === o ? this.view.indexAt(o) : this.view.indexAfter(o - 1);
  21200. var r = this.view.element(n), s = this.getFocusedElements()[0];
  21201. if (s !== r) {
  21202. var a = this.findNextIndex(n, !1, t)
  21203. ;a > -1 && s !== this.view.element(a) ? this.setFocus([a], e) : this.setFocus([n], e)
  21204. } else {
  21205. var l = o;
  21206. this.view.setScrollTop(o - this.view.renderHeight), this.view.getScrollTop() !== l && setTimeout((function () {
  21207. return i.focusPreviousPage(e, t)
  21208. }), 0)
  21209. }
  21210. }, e.prototype.focusLast = function (e, t) {
  21211. if (0 !== this.length) {
  21212. var n = this.findPreviousIndex(this.length - 1, !1, t);
  21213. n > -1 && this.setFocus([n], e)
  21214. }
  21215. }, e.prototype.focusFirst = function (e, t) {
  21216. if (0 !== this.length) {
  21217. var n = this.findNextIndex(0, !1, t);
  21218. n > -1 && this.setFocus([n], e)
  21219. }
  21220. }, e.prototype.findNextIndex = function (e, t, n) {
  21221. void 0 === t && (t = !1);
  21222. for (var i = 0; i < this.length; i++) {
  21223. if (e >= this.length && !t) return -1;
  21224. if (e %= this.length, !n || n(this.element(e))) return e;
  21225. e++
  21226. }
  21227. return -1
  21228. }, e.prototype.findPreviousIndex = function (e, t, n) {
  21229. void 0 === t && (t = !1);
  21230. for (var i = 0; i < this.length; i++) {
  21231. if (e < 0 && !t) return -1;
  21232. if (e = (this.length + e % this.length) % this.length, !n || n(this.element(e))) return e;
  21233. e--
  21234. }
  21235. return -1
  21236. }, e.prototype.getFocus = function () {
  21237. return this.focus.get()
  21238. }, e.prototype.getFocusedElements = function () {
  21239. var e = this
  21240. ;
  21241. return this.getFocus().map((function (t) {
  21242. return e.view.element(t)
  21243. }))
  21244. }, e.prototype.reveal = function (e, t) {
  21245. if (e < 0 || e >= this.length) throw new v.ListError(this.user, "Invalid index " + e);
  21246. var n = this.view.getScrollTop(), i = this.view.elementTop(e), r = this.view.elementHeight(e);
  21247. if (o.isNumber(t)) {
  21248. var s = r - this.view.renderHeight;
  21249. this.view.setScrollTop(s * S.clamp(t, 0, 1) + i)
  21250. } else {
  21251. var a = i + r, l = n + this.view.renderHeight;
  21252. i < n && a >= l || (i < n ? this.view.setScrollTop(i) : a >= l && this.view.setScrollTop(a - this.view.renderHeight))
  21253. }
  21254. }, e.prototype.getRelativeTop = function (e) {
  21255. if (e < 0 || e >= this.length) throw new v.ListError(this.user, "Invalid index " + e);
  21256. var t = this.view.getScrollTop(), n = this.view.elementTop(e), i = this.view.elementHeight(e);
  21257. if (n < t || n + i > t + this.view.renderHeight) return null;
  21258. var o = i - this.view.renderHeight;
  21259. return Math.abs((t - n) / o)
  21260. }, e.prototype.getHTMLElement = function () {
  21261. return this.view.domNode
  21262. }, e.prototype.open = function (e, t) {
  21263. for (var n = this, i = 0, o = e; i < o.length; i++) {
  21264. var r = o[i];
  21265. if (r < 0 || r >= this.length) throw new v.ListError(this.user, "Invalid index " + r)
  21266. }
  21267. this._onDidOpen.fire({
  21268. indexes: e, elements: e.map((function (e) {
  21269. return n.view.element(e)
  21270. })), browserEvent: t
  21271. })
  21272. }, e.prototype.pin = function (e, t) {
  21273. for (var n = this, i = 0, o = e; i < o.length; i++) {
  21274. var r = o[i];
  21275. if (r < 0 || r >= this.length) throw new v.ListError(this.user, "Invalid index " + r)
  21276. }
  21277. this._onDidPin.fire({
  21278. indexes: e, elements: e.map((function (e) {
  21279. return n.view.element(e)
  21280. })), browserEvent: t
  21281. })
  21282. }, e.prototype.style = function (e) {
  21283. this.styleController.style(e)
  21284. }, e.prototype.toListEvent = function (e) {
  21285. var t = this, n = e.indexes, i = e.browserEvent;
  21286. return {
  21287. indexes: n, elements: n.map((function (e) {
  21288. return t.view.element(e)
  21289. })), browserEvent: i
  21290. }
  21291. }, e.prototype._onFocusChange = function () {
  21292. var e = this.focus.get();
  21293. d.toggleClass(this.view.domNode, "element-focused", e.length > 0), this.onDidChangeActiveDescendant()
  21294. }, e.prototype.onDidChangeActiveDescendant = function () {
  21295. var e, t = this.focus.get();
  21296. if (t.length > 0) {
  21297. var n = void 0;
  21298. (null === (e = this.accessibilityProvider) || void 0 === e ? void 0 : e.getActiveDescendantId) && (n = this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),
  21299. this.view.domNode.setAttribute("aria-activedescendant", n || this.view.getElementDomId(t[0]))
  21300. } else this.view.domNode.removeAttribute("aria-activedescendant")
  21301. }, e.prototype._onSelectionChange = function () {
  21302. var e = this.selection.get();
  21303. d.toggleClass(this.view.domNode, "selection-none", 0 === e.length), d.toggleClass(this.view.domNode, "selection-single", 1 === e.length), d.toggleClass(this.view.domNode, "selection-multiple", e.length > 1)
  21304. }, e.prototype.dispose = function () {
  21305. this._onDidDispose.fire(), this.disposables.dispose(), this._onDidOpen.dispose(), this._onDidPin.dispose(), this._onDidDispose.dispose()
  21306. }, h([u.memoize], e.prototype, "onFocusChange", null), h([u.memoize], e.prototype, "onSelectionChange", null), h([u.memoize], e.prototype, "onContextMenu", null), e
  21307. }();
  21308. t.List = G
  21309. })), define(n[404], i([7, 8]), (function (e, t) {
  21310. return e.create("vs/base/browser/ui/menu/menu", t)
  21311. }));
  21312. a = this && this.__spreadArrays || function () {
  21313. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  21314. var i = Array(e), o = 0
  21315. ;
  21316. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  21317. return i
  21318. };
  21319. define(n[205], i([0, 1, 404, 5, 55, 70, 6, 56, 15, 2, 53, 16, 272]), (function (e, t, n, i, o, s, l, u, d, c, h, p) {
  21320. "use strict";
  21321. var g;
  21322. Object.defineProperty(t, "__esModule", {value: !0}), t.MENU_MNEMONIC_REGEX = /\(&([^\s&])\)|(^|[^&])&([^\s&])/, t.MENU_ESCAPED_MNEMONIC_REGEX = /(&amp;)?(&amp;)([^\s&])/g, function (e) {
  21323. e[e.Right = 0] = "Right", e[e.Left = 1] = "Left"
  21324. }(g = t.Direction || (t.Direction = {}));
  21325. var f = function (e) {
  21326. function t(t, n, i) {
  21327. var o = e.call(this, i || "submenu", t, "", !0) || this;
  21328. return o.entries = n, o
  21329. }
  21330. return r(t, e), t
  21331. }(o.Action);
  21332. t.SubmenuAction = f;
  21333. var m = function (e) {
  21334. function t(t, n, i) {
  21335. void 0 === i && (i = {});
  21336. var o = this;
  21337. l.addClass(t, "monaco-menu-container"), t.setAttribute("role", "presentation");
  21338. var r = document.createElement("div");
  21339. l.addClass(r, "monaco-menu"), r.setAttribute("role", "presentation"), (o = e.call(this, r, {
  21340. orientation: 2, actionViewItemProvider: function (e) {
  21341. return o.doGetActionViewItem(e, i, s)
  21342. }, context: i.context, actionRunner: i.actionRunner, ariaLabel: i.ariaLabel, triggerKeys: {
  21343. keys: a([3], p.isMacintosh ? [10] : []), keyDown: !0
  21344. }
  21345. }) || this).menuElement = r, o.actionsList.setAttribute("role", "menu"), o.actionsList.tabIndex = 0, o.menuDisposables = o._register(new c.DisposableStore), l.addDisposableListener(r, l.EventType.KEY_DOWN, (function (e) {
  21346. new u.StandardKeyboardEvent(e).equals(2) && e.preventDefault()
  21347. })), i.enableMnemonics && o.menuDisposables.add(l.addDisposableListener(r, l.EventType.KEY_DOWN, (function (e) {
  21348. var t = e.key.toLocaleLowerCase();
  21349. if (o.mnemonics.has(t)) {
  21350. l.EventHelper.stop(e, !0);
  21351. var n = o.mnemonics.get(t);
  21352. if (1 === n.length && (n[0] instanceof _ && n[0].container && o.focusItemByElement(n[0].container), n[0].onClick(e)), n.length > 1) {
  21353. var i = n.shift();
  21354. i && i.container && (o.focusItemByElement(i.container), n.push(i)), o.mnemonics.set(t, n)
  21355. }
  21356. }
  21357. }))), p.isLinux && o._register(l.addDisposableListener(r, l.EventType.KEY_DOWN, (function (e) {
  21358. var t = new u.StandardKeyboardEvent(e);
  21359. t.equals(14) || t.equals(11) ? (o.focusedItem = o.viewItems.length - 1, o.focusNext(), l.EventHelper.stop(e, !0)) : (t.equals(13) || t.equals(12)) && (o.focusedItem = 0,
  21360. o.focusPrevious(), l.EventHelper.stop(e, !0))
  21361. }))), o._register(l.addDisposableListener(o.domNode, l.EventType.MOUSE_OUT, (function (e) {
  21362. var t = e.relatedTarget;
  21363. l.isAncestor(t, o.domNode) || (o.focusedItem = void 0, o.updateFocus(), e.stopPropagation())
  21364. }))), o._register(l.addDisposableListener(o.actionsList, l.EventType.MOUSE_OVER, (function (e) {
  21365. var t = e.target;
  21366. if (t && l.isAncestor(t, o.actionsList) && t !== o.actionsList) {
  21367. for (; t.parentElement !== o.actionsList && null !== t.parentElement;) t = t.parentElement;
  21368. if (l.hasClass(t, "action-item")) {
  21369. var n = o.focusedItem;
  21370. o.setFocusedItem(t), n !== o.focusedItem && o.updateFocus()
  21371. }
  21372. }
  21373. })));
  21374. var s = {parent: o};
  21375. o.mnemonics = new Map, o.scrollableElement = o._register(new h.DomScrollableElement(r, {
  21376. alwaysConsumeMouseWheel: !0,
  21377. horizontal: 2,
  21378. vertical: 3,
  21379. verticalScrollbarSize: 7,
  21380. handleMouseWheel: !0,
  21381. useShadows: !0
  21382. }));
  21383. var d = o.scrollableElement.getDomNode();
  21384. return d.style.position = "", o._register(l.addDisposableListener(d, l.EventType.MOUSE_UP, (function (e) {
  21385. e.preventDefault()
  21386. }))),
  21387. r.style.maxHeight = Math.max(10, window.innerHeight - t.getBoundingClientRect().top - 30) + "px", o.push(n, {
  21388. icon: !0,
  21389. label: !0,
  21390. isMenu: !0
  21391. }), t.appendChild(o.scrollableElement.getDomNode()), o.scrollableElement.scanDomNode(), o.viewItems.filter((function (e) {
  21392. return !(e instanceof y)
  21393. })).forEach((function (e, t, n) {
  21394. e.updatePositionInSet(t + 1, n.length)
  21395. })), o
  21396. }
  21397. return r(t, e), t.prototype.style = function (e) {
  21398. var t = this.getContainer(), n = e.foregroundColor ? "" + e.foregroundColor : "",
  21399. i = e.backgroundColor ? "" + e.backgroundColor : "",
  21400. o = e.borderColor ? "1px solid " + e.borderColor : "",
  21401. r = e.shadowColor ? "0 2px 4px " + e.shadowColor : "";
  21402. t.style.border = o, this.domNode.style.color = n, this.domNode.style.backgroundColor = i, t.style.boxShadow = r, this.viewItems && this.viewItems.forEach((function (t) {
  21403. (t instanceof v || t instanceof y) && t.style(e)
  21404. }))
  21405. }, t.prototype.getContainer = function () {
  21406. return this.scrollableElement.getDomNode()
  21407. }, Object.defineProperty(t.prototype, "onScroll", {
  21408. get: function () {
  21409. return this.scrollableElement.onScroll
  21410. }, enumerable: !0, configurable: !0
  21411. }),
  21412. Object.defineProperty(t.prototype, "scrollOffset", {
  21413. get: function () {
  21414. return this.menuElement.scrollTop
  21415. }, enumerable: !0, configurable: !0
  21416. }), t.prototype.focusItemByElement = function (e) {
  21417. var t = this.focusedItem;
  21418. this.setFocusedItem(e), t !== this.focusedItem && this.updateFocus()
  21419. }, t.prototype.setFocusedItem = function (e) {
  21420. for (var t = 0; t < this.actionsList.children.length; t++) {
  21421. if (e === this.actionsList.children[t]) {
  21422. this.focusedItem = t;
  21423. break
  21424. }
  21425. }
  21426. }, t.prototype.updateFocus = function (t) {
  21427. e.prototype.updateFocus.call(this, t, !0), void 0 !== this.focusedItem && this.scrollableElement.setScrollPosition({scrollTop: Math.round(this.menuElement.scrollTop)})
  21428. }, t.prototype.doGetActionViewItem = function (e, t, n) {
  21429. if (e instanceof s.Separator) return new y(t.context, e, {icon: !0});
  21430. if (e instanceof f) {
  21431. var i = new _(e, e.entries, n, t);
  21432. if (t.enableMnemonics) if ((u = i.getMnemonic()) && i.isEnabled()) {
  21433. var o = [];
  21434. this.mnemonics.has(u) && (o = this.mnemonics.get(u)), o.push(i), this.mnemonics.set(u, o)
  21435. }
  21436. return i
  21437. }
  21438. var r = {enableMnemonics: t.enableMnemonics};
  21439. if (t.getKeyBinding) {
  21440. var a = t.getKeyBinding(e)
  21441. ;
  21442. if (a) {
  21443. var l = a.getLabel();
  21444. l && (r.keybinding = l)
  21445. }
  21446. }
  21447. var u;
  21448. i = new v(t.context, e, r);
  21449. if (t.enableMnemonics && (u = i.getMnemonic()) && i.isEnabled()) {
  21450. o = [];
  21451. this.mnemonics.has(u) && (o = this.mnemonics.get(u)), o.push(i), this.mnemonics.set(u, o)
  21452. }
  21453. return i
  21454. }, t
  21455. }(s.ActionBar);
  21456. t.Menu = m;
  21457. var v = function (e) {
  21458. function o(n, i, o) {
  21459. void 0 === o && (o = {});
  21460. var r = this;
  21461. if (o.isMenu = !0, (r = e.call(this, i, i, o) || this).options = o, r.options.icon = void 0 !== o.icon && o.icon, r.options.label = void 0 === o.label || o.label, r.cssClass = "", r.options.label && o.enableMnemonics) {
  21462. var s = r.getAction().label;
  21463. if (s) {
  21464. var a = t.MENU_MNEMONIC_REGEX.exec(s);
  21465. a && (r.mnemonic = (a[1] ? a[1] : a[3]).toLocaleLowerCase())
  21466. }
  21467. }
  21468. return r.runOnceToEnableMouseUp = new d.RunOnceScheduler((function () {
  21469. r.element && r._register(l.addDisposableListener(r.element, l.EventType.MOUSE_UP, (function (e) {
  21470. e.defaultPrevented || (l.EventHelper.stop(e, !0), r.onClick(e))
  21471. })))
  21472. }), 100), r._register(r.runOnceToEnableMouseUp), r
  21473. }
  21474. return r(o, e), o.prototype.render = function (t) {
  21475. e.prototype.render.call(this, t), this.element && (this.container = t,
  21476. this.item = l.append(this.element, l.$("a.action-menu-item")), this._action.id === s.Separator.ID ? this.item.setAttribute("role", "presentation") : (this.item.setAttribute("role", "menuitem"), this.mnemonic && this.item.setAttribute("aria-keyshortcuts", "" + this.mnemonic)), this.check = l.append(this.item, l.$("span.menu-item-check.codicon.codicon-check")), this.check.setAttribute("role", "none"), this.label = l.append(this.item, l.$("span.action-label")), this.options.label && this.options.keybinding && (l.append(this.item, l.$("span.keybinding")).textContent = this.options.keybinding), this.runOnceToEnableMouseUp.schedule(), this.updateClass(), this.updateLabel(), this.updateTooltip(), this.updateEnabled(), this.updateChecked())
  21477. }, o.prototype.blur = function () {
  21478. e.prototype.blur.call(this), this.applyStyle()
  21479. }, o.prototype.focus = function () {
  21480. e.prototype.focus.call(this), this.item && this.item.focus(), this.applyStyle()
  21481. }, o.prototype.updatePositionInSet = function (e, t) {
  21482. this.item && (this.item.setAttribute("aria-posinset", "" + e),
  21483. this.item.setAttribute("aria-setsize", "" + t))
  21484. }, o.prototype.updateLabel = function () {
  21485. if (this.options.label) {
  21486. var e = this.getAction().label;
  21487. if (e) {
  21488. var n = C(e);
  21489. this.options.enableMnemonics || (e = n), this.label && this.label.setAttribute("aria-label", n.replace(/&&/g, "&"));
  21490. var o = t.MENU_MNEMONIC_REGEX.exec(e);
  21491. if (o) {
  21492. e = i.escape(e), t.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex = 0;
  21493. for (var r = t.MENU_ESCAPED_MNEMONIC_REGEX.exec(e); r && r[1];) r = t.MENU_ESCAPED_MNEMONIC_REGEX.exec(e);
  21494. r && (e = e.substr(0, r.index) + '<u aria-hidden="true">' + r[3] + "</u>" + e.substr(r.index + r[0].length)), e = e.replace(/&amp;&amp;/g, "&amp;"), this.item && this.item.setAttribute("aria-keyshortcuts", (o[1] ? o[1] : o[3]).toLocaleLowerCase())
  21495. } else e = e.replace(/&&/g, "&")
  21496. }
  21497. this.label && (this.label.innerHTML = e.trim())
  21498. }
  21499. }, o.prototype.updateTooltip = function () {
  21500. var e = null;
  21501. this.getAction().tooltip ? e = this.getAction().tooltip : !this.options.label && this.getAction().label && this.options.icon && (e = this.getAction().label, this.options.keybinding && (e = n.localize(0, null, e, this.options.keybinding))),
  21502. e && this.item && (this.item.title = e)
  21503. }, o.prototype.updateClass = function () {
  21504. this.cssClass && this.item && l.removeClasses(this.item, this.cssClass), this.options.icon && this.label ? (this.cssClass = this.getAction().class || "", l.addClass(this.label, "icon"), this.cssClass && l.addClasses(this.label, this.cssClass), this.updateEnabled()) : this.label && l.removeClass(this.label, "icon")
  21505. }, o.prototype.updateEnabled = function () {
  21506. this.getAction().enabled ? (this.element && l.removeClass(this.element, "disabled"), this.item && (l.removeClass(this.item, "disabled"), this.item.tabIndex = 0)) : (this.element && l.addClass(this.element, "disabled"), this.item && (l.addClass(this.item, "disabled"), l.removeTabIndexAndUpdateFocus(this.item)))
  21507. }, o.prototype.updateChecked = function () {
  21508. this.item && (this.getAction().checked ? (l.addClass(this.item, "checked"), this.item.setAttribute("role", "menuitemcheckbox"), this.item.setAttribute("aria-checked", "true")) : (l.removeClass(this.item, "checked"), this.item.setAttribute("role", "menuitem"), this.item.setAttribute("aria-checked", "false")))
  21509. },
  21510. o.prototype.getMnemonic = function () {
  21511. return this.mnemonic
  21512. }, o.prototype.applyStyle = function () {
  21513. if (this.menuStyle) {
  21514. var e = this.element && l.hasClass(this.element, "focused"),
  21515. t = e && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor,
  21516. n = e && this.menuStyle.selectionBackgroundColor ? this.menuStyle.selectionBackgroundColor : void 0,
  21517. i = e && this.menuStyle.selectionBorderColor ? "thin solid " + this.menuStyle.selectionBorderColor : "";
  21518. this.item && (this.item.style.color = t ? t.toString() : "", this.item.style.backgroundColor = n ? n.toString() : ""), this.check && (this.check.style.color = t ? t.toString() : ""), this.container && (this.container.style.border = i)
  21519. }
  21520. }, o.prototype.style = function (e) {
  21521. this.menuStyle = e, this.applyStyle()
  21522. }, o
  21523. }(s.BaseActionViewItem), _ = function (e) {
  21524. function t(t, n, i, o) {
  21525. var r = e.call(this, t, t, o) || this;
  21526. return r.submenuActions = n, r.parentData = i, r.submenuOptions = o, r.mysubmenu = null, r.submenuDisposables = r._register(new c.DisposableStore), r.mouseOver = !1,
  21527. r.expandDirection = o && void 0 !== o.expandDirection ? o.expandDirection : g.Right, r.showScheduler = new d.RunOnceScheduler((function () {
  21528. r.mouseOver && (r.cleanupExistingSubmenu(!1), r.createSubmenu(!1))
  21529. }), 250), r.hideScheduler = new d.RunOnceScheduler((function () {
  21530. r.element && !l.isAncestor(document.activeElement, r.element) && r.parentData.submenu === r.mysubmenu && (r.parentData.parent.focus(!1), r.cleanupExistingSubmenu(!0))
  21531. }), 750), r
  21532. }
  21533. return r(t, e), t.prototype.render = function (t) {
  21534. var n = this;
  21535. e.prototype.render.call(this, t), this.element && (this.item && (l.addClass(this.item, "monaco-submenu-item"), this.item.setAttribute("aria-haspopup", "true"), this.updateAriaExpanded("false"), this.submenuIndicator = l.append(this.item, l.$("span.submenu-indicator.codicon.codicon-chevron-right")), this.submenuIndicator.setAttribute("aria-hidden", "true")), this._register(l.addDisposableListener(this.element, l.EventType.KEY_UP, (function (e) {
  21536. var t = new u.StandardKeyboardEvent(e);
  21537. (t.equals(17) || t.equals(3)) && (l.EventHelper.stop(e, !0), n.createSubmenu(!0))
  21538. }))),
  21539. this._register(l.addDisposableListener(this.element, l.EventType.KEY_DOWN, (function (e) {
  21540. var t = new u.StandardKeyboardEvent(e);
  21541. document.activeElement === n.item && (t.equals(17) || t.equals(3)) && l.EventHelper.stop(e, !0)
  21542. }))), this._register(l.addDisposableListener(this.element, l.EventType.MOUSE_OVER, (function (e) {
  21543. n.mouseOver || (n.mouseOver = !0, n.showScheduler.schedule())
  21544. }))), this._register(l.addDisposableListener(this.element, l.EventType.MOUSE_LEAVE, (function (e) {
  21545. n.mouseOver = !1
  21546. }))), this._register(l.addDisposableListener(this.element, l.EventType.FOCUS_OUT, (function (e) {
  21547. n.element && !l.isAncestor(document.activeElement, n.element) && n.hideScheduler.schedule()
  21548. }))), this._register(this.parentData.parent.onScroll((function () {
  21549. n.parentData.parent.focus(!1), n.cleanupExistingSubmenu(!1)
  21550. }))))
  21551. }, t.prototype.onClick = function (e) {
  21552. l.EventHelper.stop(e, !0), this.cleanupExistingSubmenu(!1), this.createSubmenu(!0)
  21553. }, t.prototype.cleanupExistingSubmenu = function (e) {
  21554. this.parentData.submenu && (e || this.parentData.submenu !== this.mysubmenu) && (this.parentData.submenu.dispose(), this.parentData.submenu = void 0, this.updateAriaExpanded("false"), this.submenuContainer && (this.submenuDisposables.clear(), this.submenuContainer = void 0))
  21555. }, t.prototype.createSubmenu = function (e) {
  21556. var t = this;
  21557. if (void 0 === e && (e = !0), this.element) if (this.parentData.submenu) this.parentData.submenu.focus(!1); else {
  21558. this.updateAriaExpanded("true"), this.submenuContainer = l.append(this.element, l.$("div.monaco-submenu")), l.addClasses(this.submenuContainer, "menubar-menu-items-holder", "context-view");
  21559. var n = getComputedStyle(this.parentData.parent.domNode), i = parseFloat(n.paddingTop || "0") || 0;
  21560. this.submenuContainer.style.top = this.element.offsetTop - this.parentData.parent.scrollOffset - i + "px", this.parentData.submenu = new m(this.submenuContainer, this.submenuActions, this.submenuOptions), this.menuStyle && this.parentData.submenu.style(this.menuStyle);
  21561. var o = this.element.getBoundingClientRect(), r = this.submenuContainer.getBoundingClientRect()
  21562. ;this.expandDirection === g.Right ? window.innerWidth <= o.right + r.width ? (this.submenuContainer.style.left = "10px", this.submenuContainer.style.top = this.element.offsetTop - this.parentData.parent.scrollOffset + o.height + "px") : (this.submenuContainer.style.left = this.element.offsetWidth + "px", this.submenuContainer.style.top = this.element.offsetTop - this.parentData.parent.scrollOffset - i + "px") : this.expandDirection === g.Left && (this.submenuContainer.style.right = this.element.offsetWidth + "px", this.submenuContainer.style.left = "auto", this.submenuContainer.style.top = this.element.offsetTop - this.parentData.parent.scrollOffset - i + "px"), this.submenuDisposables.add(l.addDisposableListener(this.submenuContainer, l.EventType.KEY_UP, (function (e) {
  21563. new u.StandardKeyboardEvent(e).equals(15) && (l.EventHelper.stop(e, !0), t.parentData.parent.focus(), t.cleanupExistingSubmenu(!0))
  21564. }))), this.submenuDisposables.add(l.addDisposableListener(this.submenuContainer, l.EventType.KEY_DOWN, (function (e) {
  21565. new u.StandardKeyboardEvent(e).equals(15) && l.EventHelper.stop(e, !0)
  21566. }))), this.submenuDisposables.add(this.parentData.submenu.onDidCancel((function () {
  21567. t.parentData.parent.focus(), t.cleanupExistingSubmenu(!0)
  21568. }))), this.parentData.submenu.focus(e), this.mysubmenu = this.parentData.submenu
  21569. }
  21570. }, t.prototype.updateAriaExpanded = function (e) {
  21571. var t;
  21572. this.item && (null === (t = this.item) || void 0 === t || t.setAttribute("aria-expanded", e))
  21573. }, t.prototype.applyStyle = function () {
  21574. if (e.prototype.applyStyle.call(this), this.menuStyle) {
  21575. var t = this.element && l.hasClass(this.element, "focused") && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor;
  21576. this.submenuIndicator && (this.submenuIndicator.style.color = t ? "" + t : ""), this.parentData.submenu && this.parentData.submenu.style(this.menuStyle)
  21577. }
  21578. }, t.prototype.dispose = function () {
  21579. e.prototype.dispose.call(this), this.hideScheduler.dispose(), this.mysubmenu && (this.mysubmenu.dispose(), this.mysubmenu = null), this.submenuContainer && (this.submenuContainer = void 0)
  21580. }, t
  21581. }(v), y = function (e) {
  21582. function t() {
  21583. return null !== e && e.apply(this, arguments) || this
  21584. }
  21585. return r(t, e), t.prototype.style = function (e) {
  21586. this.label && (this.label.style.borderBottomColor = e.separatorColor ? "" + e.separatorColor : "")
  21587. }, t
  21588. }(s.ActionViewItem);
  21589. function C(e) {
  21590. var n = t.MENU_MNEMONIC_REGEX, i = n.exec(e);
  21591. if (!i) return e;
  21592. var o = !i[1];
  21593. return e.replace(n, o ? "$2$3" : "").trim()
  21594. }
  21595. t.cleanMnemonic = C
  21596. })), define(n[405], i([0, 1, 205]), (function (e, t, n) {
  21597. "use strict";
  21598. Object.defineProperty(t, "__esModule", {value: !0});
  21599. var i = function (e) {
  21600. function t(t, n) {
  21601. var i = e.call(this, t, n, "contextsubmenu") || this;
  21602. return i.entries = n, i
  21603. }
  21604. return r(t, e), t
  21605. }(n.SubmenuAction);
  21606. t.ContextSubMenu = i
  21607. })), define(n[406], i([7, 8]), (function (e, t) {
  21608. return e.create("vs/base/browser/ui/tree/abstractTree", t)
  21609. }));
  21610. a = this && this.__spreadArrays || function () {
  21611. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  21612. var i = Array(e), o = 0;
  21613. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  21614. return i
  21615. }
  21616. ;define(n[154], i([0, 1, 2, 153, 6, 4, 56, 98, 19, 140, 52, 61, 129, 406, 15, 16, 38, 131, 87, 280]), (function (e, t, n, i, o, s, u, d, c, h, p, g, f, m, v, _, y, C, b) {
  21617. "use strict";
  21618. Object.defineProperty(t, "__esModule", {value: !0});
  21619. var S = function (e) {
  21620. function t(t) {
  21621. var n = e.call(this, t.elements.map((function (e) {
  21622. return e.element
  21623. }))) || this;
  21624. return n.data = t, n
  21625. }
  21626. return r(t, e), t
  21627. }(h.ElementsDragAndDropData);
  21628. function w(e) {
  21629. return e instanceof h.ElementsDragAndDropData ? new S(e) : e
  21630. }
  21631. var E = function () {
  21632. function e(e, t) {
  21633. this.modelProvider = e, this.dnd = t, this.autoExpandDisposable = n.Disposable.None
  21634. }
  21635. return e.prototype.getDragURI = function (e) {
  21636. return this.dnd.getDragURI(e.element)
  21637. }, e.prototype.getDragLabel = function (e, t) {
  21638. if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e.map((function (e) {
  21639. return e.element
  21640. })), t)
  21641. }, e.prototype.onDragStart = function (e, t) {
  21642. this.dnd.onDragStart && this.dnd.onDragStart(w(e), t)
  21643. }, e.prototype.onDragOver = function (e, t, n, i, o) {
  21644. var r = this;
  21645. void 0 === o && (o = !0);
  21646. var s = this.dnd.onDragOver(w(e), t && t.element, n, i), a = this.autoExpandNode !== t
  21647. ;
  21648. if (a && (this.autoExpandDisposable.dispose(), this.autoExpandNode = t), void 0 === t) return s;
  21649. if (a && "boolean" != typeof s && s.autoExpand && (this.autoExpandDisposable = v.disposableTimeout((function () {
  21650. var e = r.modelProvider(), n = e.getNodeLocation(t);
  21651. e.isCollapsed(n) && e.setCollapsed(n, !1), r.autoExpandNode = void 0
  21652. }), 500)), "boolean" == typeof s || !s.accept || void 0 === s.bubble || s.feedback) return o ? s : {
  21653. accept: "boolean" == typeof s ? s : s.accept,
  21654. effect: "boolean" == typeof s ? void 0 : s.effect,
  21655. feedback: [n]
  21656. };
  21657. if (1 === s.bubble) {
  21658. var u = this.modelProvider(), d = u.getNodeLocation(t), h = u.getParentNodeLocation(d),
  21659. p = u.getNode(h), g = h && u.getListIndex(h);
  21660. return this.onDragOver(e, p, g, i, !1)
  21661. }
  21662. var f = this.modelProvider(), m = f.getNodeLocation(t), _ = f.getListIndex(m),
  21663. y = f.getListRenderCount(m);
  21664. return l(l({}, s), {feedback: c.range(_, _ + y)})
  21665. }, e.prototype.drop = function (e, t, n, i) {
  21666. this.autoExpandDisposable.dispose(), this.autoExpandNode = void 0, this.dnd.drop(w(e), t && t.element, n, i)
  21667. }, e.prototype.onDragEnd = function (e) {
  21668. this.dnd.onDragEnd && this.dnd.onDragEnd(e)
  21669. }, e
  21670. }();
  21671. var L, D = function () {
  21672. function e(e) {
  21673. this.delegate = e
  21674. }
  21675. return e.prototype.getHeight = function (e) {
  21676. return this.delegate.getHeight(e.element)
  21677. }, e.prototype.getTemplateId = function (e) {
  21678. return this.delegate.getTemplateId(e.element)
  21679. }, e.prototype.hasDynamicHeight = function (e) {
  21680. return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight(e.element)
  21681. }, e.prototype.setDynamicHeight = function (e, t) {
  21682. this.delegate.setDynamicHeight && this.delegate.setDynamicHeight(e.element, t)
  21683. }, e
  21684. }();
  21685. t.ComposedTreeDelegate = D, function (e) {
  21686. e.None = "none", e.OnHover = "onHover", e.Always = "always"
  21687. }(L = t.RenderIndentGuides || (t.RenderIndentGuides = {}));
  21688. var N = function () {
  21689. function e(e, t) {
  21690. var n = this;
  21691. void 0 === t && (t = []), this._elements = t, this.onDidChange = s.Event.forEach(e, (function (e) {
  21692. return n._elements = e
  21693. }))
  21694. }
  21695. return Object.defineProperty(e.prototype, "elements", {
  21696. get: function () {
  21697. return this._elements
  21698. }, enumerable: !0, configurable: !0
  21699. }), e
  21700. }(), x = function () {
  21701. function e(t, i, o, r, a) {
  21702. void 0 === a && (a = {}), this.renderer = t, this.modelProvider = i, this.activeNodes = r, this.renderedElements = new Map,
  21703. this.renderedNodes = new Map, this.indent = e.DefaultIndent, this.hideTwistiesOfChildlessElements = !1, this.shouldRenderIndentGuides = !1, this.renderedIndentGuides = new b.SetMap, this.activeIndentNodes = new Set, this.indentGuidesDisposable = n.Disposable.None, this.disposables = new n.DisposableStore, this.templateId = t.templateId, this.updateOptions(a), s.Event.map(o, (function (e) {
  21704. return e.node
  21705. }))(this.onDidChangeNodeTwistieState, this, this.disposables), t.onDidChangeTwistieState && t.onDidChangeTwistieState(this.onDidChangeTwistieState, this, this.disposables)
  21706. }
  21707. return e.prototype.updateOptions = function (e) {
  21708. if (void 0 === e && (e = {}), void 0 !== e.indent && (this.indent = C.clamp(e.indent, 0, 40)), void 0 !== e.renderIndentGuides) {
  21709. var t = e.renderIndentGuides !== L.None;
  21710. if (t !== this.shouldRenderIndentGuides && (this.shouldRenderIndentGuides = t, this.indentGuidesDisposable.dispose(), t)) {
  21711. var i = new n.DisposableStore;
  21712. this.activeNodes.onDidChange(this._onDidChangeActiveNodes, this, i), this.indentGuidesDisposable = i, this._onDidChangeActiveNodes(this.activeNodes.elements)
  21713. }
  21714. }
  21715. void 0 !== e.hideTwistiesOfChildlessElements && (this.hideTwistiesOfChildlessElements = e.hideTwistiesOfChildlessElements)
  21716. }, e.prototype.renderTemplate = function (e) {
  21717. var t = o.append(e, o.$(".monaco-tl-row")), i = o.append(t, o.$(".monaco-tl-indent")),
  21718. r = o.append(t, o.$(".monaco-tl-twistie")), s = o.append(t, o.$(".monaco-tl-contents")),
  21719. a = this.renderer.renderTemplate(s);
  21720. return {container: e, indent: i, twistie: r, indentGuidesDisposable: n.Disposable.None, templateData: a}
  21721. }, e.prototype.renderElement = function (t, n, i, o) {
  21722. "number" == typeof o && (this.renderedNodes.set(t, {
  21723. templateData: i,
  21724. height: o
  21725. }), this.renderedElements.set(t.element, t));
  21726. var r = e.DefaultIndent + (t.depth - 1) * this.indent;
  21727. i.twistie.style.paddingLeft = r + "px", i.indent.style.width = r + this.indent - 16 + "px", this.renderTwistie(t, i), "number" == typeof o && this.renderIndentGuides(t, i), this.renderer.renderElement(t, n, i.templateData, o)
  21728. }, e.prototype.disposeElement = function (e, t, n, i) {
  21729. n.indentGuidesDisposable.dispose(), this.renderer.disposeElement && this.renderer.disposeElement(e, t, n.templateData, i),
  21730. "number" == typeof i && (this.renderedNodes.delete(e), this.renderedElements.delete(e.element))
  21731. }, e.prototype.disposeTemplate = function (e) {
  21732. this.renderer.disposeTemplate(e.templateData)
  21733. }, e.prototype.onDidChangeTwistieState = function (e) {
  21734. var t = this.renderedElements.get(e);
  21735. t && this.onDidChangeNodeTwistieState(t)
  21736. }, e.prototype.onDidChangeNodeTwistieState = function (e) {
  21737. var t = this.renderedNodes.get(e);
  21738. t && (this.renderTwistie(e, t.templateData), this._onDidChangeActiveNodes(this.activeNodes.elements), this.renderIndentGuides(e, t.templateData))
  21739. }, e.prototype.renderTwistie = function (e, t) {
  21740. this.renderer.renderTwistie && this.renderer.renderTwistie(e.element, t.twistie), e.collapsible && (!this.hideTwistiesOfChildlessElements || e.visibleChildrenCount > 0) ? (o.addClasses(t.twistie, "codicon", "codicon-chevron-down", "collapsible"), o.toggleClass(t.twistie, "collapsed", e.collapsed)) : o.removeClasses(t.twistie, "codicon", "codicon-chevron-down", "collapsible", "collapsed"),
  21741. e.collapsible ? t.container.setAttribute("aria-expanded", String(!e.collapsed)) : t.container.removeAttribute("aria-expanded")
  21742. }, e.prototype.renderIndentGuides = function (e, t) {
  21743. var i = this;
  21744. if (o.clearNode(t.indent), t.indentGuidesDisposable.dispose(), this.shouldRenderIndentGuides) {
  21745. for (var r = new n.DisposableStore, s = this.modelProvider(), a = e, l = function () {
  21746. var e = s.getNodeLocation(a), l = s.getParentNodeLocation(e);
  21747. if (!l) return "break";
  21748. var d = s.getNode(l), c = o.$(".indent-guide", {style: "width: " + u.indent + "px"});
  21749. u.activeIndentNodes.has(d) && o.addClass(c, "active"), 0 === t.indent.childElementCount ? t.indent.appendChild(c) : t.indent.insertBefore(c, t.indent.firstElementChild), u.renderedIndentGuides.add(d, c), r.add(n.toDisposable((function () {
  21750. return i.renderedIndentGuides.delete(d, c)
  21751. }))), a = d
  21752. }, u = this; ;) {
  21753. if ("break" === l()) break
  21754. }
  21755. t.indentGuidesDisposable = r
  21756. }
  21757. }, e.prototype._onDidChangeActiveNodes = function (e) {
  21758. var t = this;
  21759. if (this.shouldRenderIndentGuides) {
  21760. var n = new Set, i = this.modelProvider();
  21761. e.forEach((function (e) {
  21762. var t = i.getNodeLocation(e);
  21763. try {
  21764. var o = i.getParentNodeLocation(t);
  21765. e.collapsible && e.children.length > 0 && !e.collapsed ? n.add(e) : o && n.add(i.getNode(o))
  21766. } catch (e) {
  21767. }
  21768. })), this.activeIndentNodes.forEach((function (e) {
  21769. n.has(e) || t.renderedIndentGuides.forEach(e, (function (e) {
  21770. return o.removeClass(e, "active")
  21771. }))
  21772. })), n.forEach((function (e) {
  21773. t.activeIndentNodes.has(e) || t.renderedIndentGuides.forEach(e, (function (e) {
  21774. return o.addClass(e, "active")
  21775. }))
  21776. })), this.activeIndentNodes = n
  21777. }
  21778. }, e.prototype.dispose = function () {
  21779. this.renderedNodes.clear(), this.renderedElements.clear(), this.indentGuidesDisposable.dispose(), n.dispose(this.disposables)
  21780. }, e.DefaultIndent = 8, e
  21781. }(), I = function () {
  21782. function e(e, t, i) {
  21783. this.tree = e, this.keyboardNavigationLabelProvider = t, this._filter = i, this._totalCount = 0, this._matchCount = 0, this._pattern = "", this._lowercasePattern = "", this.disposables = new n.DisposableStore, e.onWillRefilter(this.reset, this, this.disposables)
  21784. }
  21785. return Object.defineProperty(e.prototype, "totalCount", {
  21786. get: function () {
  21787. return this._totalCount
  21788. }, enumerable: !0, configurable: !0
  21789. }),
  21790. Object.defineProperty(e.prototype, "matchCount", {
  21791. get: function () {
  21792. return this._matchCount
  21793. }, enumerable: !0, configurable: !0
  21794. }), Object.defineProperty(e.prototype, "pattern", {
  21795. set: function (e) {
  21796. this._pattern = e, this._lowercasePattern = e.toLowerCase()
  21797. }, enumerable: !0, configurable: !0
  21798. }), e.prototype.filter = function (e, t) {
  21799. if (this._filter) {
  21800. var n = this._filter.filter(e, t);
  21801. if (this.tree.options.simpleKeyboardNavigation) return n;
  21802. if (0 === ("boolean" == typeof n ? n ? 1 : 0 : f.isFilterResult(n) ? f.getVisibleState(n.visibility) : n)) return !1
  21803. }
  21804. if (this._totalCount++, this.tree.options.simpleKeyboardNavigation || !this._pattern) return this._matchCount++, {
  21805. data: g.FuzzyScore.Default,
  21806. visibility: !0
  21807. };
  21808. var i = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e), o = i && i.toString();
  21809. if (void 0 === o) return {data: g.FuzzyScore.Default, visibility: !0};
  21810. var r = g.fuzzyScore(this._pattern, this._lowercasePattern, 0, o, o.toLowerCase(), 0, !0);
  21811. return r ? (this._matchCount++, {
  21812. data: r,
  21813. visibility: !0
  21814. }) : this.tree.options.filterOnType ? 2 : {data: g.FuzzyScore.Default, visibility: !0}
  21815. },
  21816. e.prototype.reset = function () {
  21817. this._totalCount = 0, this._matchCount = 0
  21818. }, e.prototype.dispose = function () {
  21819. n.dispose(this.disposables)
  21820. }, e
  21821. }(), M = function () {
  21822. function e(e, t, i, r, a) {
  21823. this.tree = e, this.view = i, this.filter = r, this.keyboardNavigationDelegate = a, this._enabled = !1, this._pattern = "", this._empty = !1, this._onDidChangeEmptyState = new s.Emitter, this.positionClassName = "ne", this.automaticKeyboardNavigation = !0, this.triggered = !1, this._onDidChangePattern = new s.Emitter, this.enabledDisposables = new n.DisposableStore, this.disposables = new n.DisposableStore, this.domNode = o.$(".monaco-list-type-filter." + this.positionClassName), this.domNode.draggable = !0, p.domEvent(this.domNode, "dragstart")(this.onDragStart, this, this.disposables), this.messageDomNode = o.append(i.getHTMLElement(), o.$(".monaco-list-type-filter-message")), this.labelDomNode = o.append(this.domNode, o.$("span.label"));
  21824. var l = o.append(this.domNode, o.$(".controls"));
  21825. this._filterOnType = !!e.options.filterOnType,
  21826. this.filterOnTypeDomNode = o.append(l, o.$("input.filter.codicon.codicon-list-selection")), this.filterOnTypeDomNode.type = "checkbox", this.filterOnTypeDomNode.checked = this._filterOnType, this.filterOnTypeDomNode.tabIndex = -1, this.updateFilterOnTypeTitle(), p.domEvent(this.filterOnTypeDomNode, "input")(this.onDidChangeFilterOnType, this, this.disposables), this.clearDomNode = o.append(l, o.$("button.clear.codicon.codicon-close")), this.clearDomNode.tabIndex = -1, this.clearDomNode.title = m.localize(0, null), this.keyboardNavigationEventFilter = e.options.keyboardNavigationEventFilter, t.onDidSplice(this.onDidSpliceModel, this, this.disposables), this.updateOptions(e.options)
  21827. }
  21828. return Object.defineProperty(e.prototype, "enabled", {
  21829. get: function () {
  21830. return this._enabled
  21831. }, enumerable: !0, configurable: !0
  21832. }), Object.defineProperty(e.prototype, "pattern", {
  21833. get: function () {
  21834. return this._pattern
  21835. }, enumerable: !0, configurable: !0
  21836. }), Object.defineProperty(e.prototype, "filterOnType", {
  21837. get: function () {
  21838. return this._filterOnType
  21839. }, enumerable: !0, configurable: !0
  21840. }),
  21841. e.prototype.updateOptions = function (e) {
  21842. e.simpleKeyboardNavigation ? this.disable() : this.enable(), void 0 !== e.filterOnType && (this._filterOnType = !!e.filterOnType, this.filterOnTypeDomNode.checked = this._filterOnType), void 0 !== e.automaticKeyboardNavigation && (this.automaticKeyboardNavigation = e.automaticKeyboardNavigation), this.tree.refilter(), this.render(), this.automaticKeyboardNavigation || this.onEventOrInput("")
  21843. }, e.prototype.enable = function () {
  21844. var e = this;
  21845. if (!this._enabled) {
  21846. var t = s.Event.chain(p.domEvent(this.view.getHTMLElement(), "keydown")).filter((function (t) {
  21847. return !k(t.target) || t.target === e.filterOnTypeDomNode
  21848. })).filter((function (e) {
  21849. return "Dead" !== e.key && !/^Media/.test(e.key)
  21850. })).map((function (e) {
  21851. return new u.StandardKeyboardEvent(e)
  21852. })).filter(this.keyboardNavigationEventFilter || function () {
  21853. return !0
  21854. }).filter((function () {
  21855. return e.automaticKeyboardNavigation || e.triggered
  21856. })).filter((function (t) {
  21857. return e.keyboardNavigationDelegate.mightProducePrintableCharacter(t) || (e.pattern.length > 0 || e.triggered) && (9 === t.keyCode || 1 === t.keyCode) && !t.altKey && !t.ctrlKey && !t.metaKey || 1 === t.keyCode && (_.isMacintosh ? t.altKey && !t.metaKey : t.ctrlKey) && !t.shiftKey
  21858. })).forEach((function (e) {
  21859. e.stopPropagation(), e.preventDefault()
  21860. })).event, n = p.domEvent(this.clearDomNode, "click");
  21861. s.Event.chain(s.Event.any(t, n)).event(this.onEventOrInput, this, this.enabledDisposables), this.filter.pattern = "", this.tree.refilter(), this.render(), this._enabled = !0, this.triggered = !1
  21862. }
  21863. }, e.prototype.disable = function () {
  21864. this._enabled && (this.domNode.remove(), this.enabledDisposables.clear(), this.tree.refilter(), this.render(), this._enabled = !1, this.triggered = !1)
  21865. }, e.prototype.onEventOrInput = function (e) {
  21866. "string" == typeof e ? this.onInput(e) : e instanceof MouseEvent || 9 === e.keyCode || 1 === e.keyCode && (_.isMacintosh ? e.altKey : e.ctrlKey) ? this.onInput("") : 1 === e.keyCode ? this.onInput(0 === this.pattern.length ? "" : this.pattern.substr(0, this.pattern.length - 1)) : this.onInput(this.pattern + e.browserEvent.key)
  21867. }, e.prototype.onInput = function (e) {
  21868. var t = this.view.getHTMLElement();
  21869. e && !this.domNode.parentElement ? t.append(this.domNode) : !e && this.domNode.parentElement && (this.domNode.remove(), this.tree.domFocus()), this._pattern = e, this._onDidChangePattern.fire(e), this.filter.pattern = e, this.tree.refilter(), e && this.tree.focusNext(0, !0, void 0, (function (e) {
  21870. return !g.FuzzyScore.isDefault(e.filterData)
  21871. }));
  21872. var n = this.tree.getFocus();
  21873. if (n.length > 0) {
  21874. var i = n[0];
  21875. null === this.tree.getRelativeTop(i) && this.tree.reveal(i, .5)
  21876. }
  21877. this.render(), e || (this.triggered = !1)
  21878. }, e.prototype.onDragStart = function () {
  21879. var e = this, t = this.view.getHTMLElement(), i = o.getDomNodePagePosition(t).left, r = t.clientWidth,
  21880. s = r / 2, a = this.domNode.clientWidth, l = new n.DisposableStore, u = this.positionClassName,
  21881. c = function () {
  21882. switch (u) {
  21883. case"nw":
  21884. e.domNode.style.top = "4px", e.domNode.style.left = "4px";
  21885. break;
  21886. case"ne":
  21887. e.domNode.style.top = "4px", e.domNode.style.left = r - a - 6 + "px"
  21888. }
  21889. };
  21890. c(), o.removeClass(this.domNode, u), o.addClass(this.domNode, "dragging"), l.add(n.toDisposable((function () {
  21891. return o.removeClass(e.domNode, "dragging")
  21892. }))), p.domEvent(document, "dragover")((function (e) {
  21893. e.preventDefault();
  21894. var t = e.screenX - i;
  21895. e.dataTransfer && (e.dataTransfer.dropEffect = "none"), u = t < s ? "nw" : "ne", c()
  21896. }), null, l), p.domEvent(this.domNode, "dragend")((function () {
  21897. e.positionClassName = u, e.domNode.className = "monaco-list-type-filter " + e.positionClassName, e.domNode.style.top = "", e.domNode.style.left = "", n.dispose(l)
  21898. }), null, l), d.StaticDND.CurrentDragAndDropData = new d.DragAndDropData("vscode-ui"), l.add(n.toDisposable((function () {
  21899. return d.StaticDND.CurrentDragAndDropData = void 0
  21900. })))
  21901. },
  21902. e.prototype.onDidSpliceModel = function () {
  21903. this._enabled && 0 !== this.pattern.length && (this.tree.refilter(), this.render())
  21904. }, e.prototype.onDidChangeFilterOnType = function () {
  21905. this.tree.updateOptions({filterOnType: this.filterOnTypeDomNode.checked}), this.tree.refilter(), this.tree.domFocus(), this.render(), this.updateFilterOnTypeTitle()
  21906. }, e.prototype.updateFilterOnTypeTitle = function () {
  21907. this.filterOnType ? this.filterOnTypeDomNode.title = m.localize(1, null) : this.filterOnTypeDomNode.title = m.localize(2, null)
  21908. }, e.prototype.render = function () {
  21909. var e = this.filter.totalCount > 0 && 0 === this.filter.matchCount;
  21910. this.pattern && this.tree.options.filterOnType && e ? (this.messageDomNode.textContent = m.localize(3, null), this._empty = !0) : (this.messageDomNode.innerHTML = "", this._empty = !1), o.toggleClass(this.domNode, "no-matches", e), this.domNode.title = m.localize(4, null, this.filter.matchCount, this.filter.totalCount), this.labelDomNode.textContent = this.pattern.length > 16 ? "…" + this.pattern.substr(this.pattern.length - 16) : this.pattern,
  21911. this._onDidChangeEmptyState.fire(this._empty)
  21912. }, e.prototype.shouldAllowFocus = function (e) {
  21913. return !(this.enabled && this.pattern && !this.filterOnType) || (this.filter.totalCount > 0 && this.filter.matchCount <= 1 || !g.FuzzyScore.isDefault(e.filterData))
  21914. }, e.prototype.dispose = function () {
  21915. this._enabled && (this.domNode.remove(), this.enabledDisposables.dispose(), this._enabled = !1, this.triggered = !1), this._onDidChangePattern.dispose(), n.dispose(this.disposables)
  21916. }, e
  21917. }();
  21918. function k(e) {
  21919. return "INPUT" === e.tagName || "TEXTAREA" === e.tagName
  21920. }
  21921. function T(e) {
  21922. return {
  21923. elements: e.elements.map((function (e) {
  21924. return e.element
  21925. })), browserEvent: e.browserEvent
  21926. }
  21927. }
  21928. function R(e, t) {
  21929. t(e), e.children.forEach((function (e) {
  21930. return R(e, t)
  21931. }))
  21932. }
  21933. var O = function () {
  21934. function e(e) {
  21935. this.identityProvider = e, this.nodes = [], this._onDidChange = new s.Emitter, this.onDidChange = this._onDidChange.event
  21936. }
  21937. return Object.defineProperty(e.prototype, "nodeSet", {
  21938. get: function () {
  21939. return this._nodeSet || (this._nodeSet = this.createNodeSet()), this._nodeSet
  21940. }, enumerable: !0, configurable: !0
  21941. }),
  21942. e.prototype.set = function (e, t) {
  21943. c.equals(this.nodes, e) || this._set(e, !1, t)
  21944. }, e.prototype._set = function (e, t, n) {
  21945. if (this.nodes = a(e), this.elements = void 0, this._nodeSet = void 0, !t) {
  21946. var i = this;
  21947. this._onDidChange.fire({
  21948. get elements() {
  21949. return i.get()
  21950. }, browserEvent: n
  21951. })
  21952. }
  21953. }, e.prototype.get = function () {
  21954. return this.elements || (this.elements = this.nodes.map((function (e) {
  21955. return e.element
  21956. }))), a(this.elements)
  21957. }, e.prototype.getNodes = function () {
  21958. return this.nodes
  21959. }, e.prototype.has = function (e) {
  21960. return this.nodeSet.has(e)
  21961. }, e.prototype.onDidModelSplice = function (e) {
  21962. var t = this, n = e.insertedNodes, i = e.deletedNodes;
  21963. if (!this.identityProvider) {
  21964. var o = this.createNodeSet(), r = function (e) {
  21965. return o.delete(e)
  21966. };
  21967. return i.forEach((function (e) {
  21968. return R(e, r)
  21969. })), void this.set(y.values(o))
  21970. }
  21971. var s = new Set, a = function (e) {
  21972. return s.add(t.identityProvider.getId(e.element).toString())
  21973. };
  21974. i.forEach((function (e) {
  21975. return R(e, a)
  21976. }));
  21977. var l = new Map, u = function (e) {
  21978. return l.set(t.identityProvider.getId(e.element).toString(), e)
  21979. };
  21980. n.forEach((function (e) {
  21981. return R(e, u)
  21982. }))
  21983. ;
  21984. for (var d = [], c = 0, h = this.nodes; c < h.length; c++) {
  21985. var p = h[c], g = this.identityProvider.getId(p.element).toString();
  21986. if (s.has(g)) {
  21987. var f = l.get(g);
  21988. f && d.push(f)
  21989. } else d.push(p)
  21990. }
  21991. this._set(d, !0)
  21992. }, e.prototype.createNodeSet = function () {
  21993. for (var e = new Set, t = 0, n = this.nodes; t < n.length; t++) {
  21994. var i = n[t];
  21995. e.add(i)
  21996. }
  21997. return e
  21998. }, e
  21999. }(), P = function (e) {
  22000. function t(t, n) {
  22001. var i = e.call(this, t) || this;
  22002. return i.tree = n, i
  22003. }
  22004. return r(t, e), t.prototype.onPointer = function (t) {
  22005. if (!k(t.browserEvent.target)) {
  22006. var n = t.element;
  22007. if (!n) return e.prototype.onPointer.call(this, t);
  22008. if (this.isSelectionRangeChangeEvent(t) || this.isSelectionSingleChangeEvent(t)) return e.prototype.onPointer.call(this, t);
  22009. var i = o.hasClass(t.browserEvent.target, "monaco-tl-twistie");
  22010. if (!this.tree.openOnSingleClick && 2 !== t.browserEvent.detail && !i) return e.prototype.onPointer.call(this, t);
  22011. var r = !1;
  22012. if ((r = "function" == typeof this.tree.expandOnlyOnTwistieClick ? this.tree.expandOnlyOnTwistieClick(n.element) : !!this.tree.expandOnlyOnTwistieClick) && !i) return e.prototype.onPointer.call(this, t);
  22013. if (n.collapsible) {
  22014. var s = this.tree.model, a = s.getNodeLocation(n), l = t.browserEvent.altKey;
  22015. if (s.setCollapsed(a, void 0, l), r && i) return
  22016. }
  22017. e.prototype.onPointer.call(this, t)
  22018. }
  22019. }, t.prototype.onDoubleClick = function (t) {
  22020. o.hasClass(t.browserEvent.target, "monaco-tl-twistie") || e.prototype.onDoubleClick.call(this, t)
  22021. }, t
  22022. }(i.MouseController), A = function (e) {
  22023. function t(t, n, i, o, r, s, a) {
  22024. var l = e.call(this, t, n, i, o, a) || this;
  22025. return l.focusTrait = r, l.selectionTrait = s, l
  22026. }
  22027. return r(t, e), t.prototype.createMouseController = function (e) {
  22028. return new P(this, e.tree)
  22029. }, t.prototype.splice = function (t, n, i) {
  22030. var o = this;
  22031. if (void 0 === i && (i = []), e.prototype.splice.call(this, t, n, i), 0 !== i.length) {
  22032. var r = [], s = [];
  22033. i.forEach((function (e, n) {
  22034. o.focusTrait.has(e) && r.push(t + n), o.selectionTrait.has(e) && s.push(t + n)
  22035. })), r.length > 0 && e.prototype.setFocus.call(this, c.distinctES6(a(e.prototype.getFocus.call(this), r))), s.length > 0 && e.prototype.setSelection.call(this, c.distinctES6(a(e.prototype.getSelection.call(this), s)))
  22036. }
  22037. }, t.prototype.setFocus = function (t, n, i) {
  22038. var o = this;
  22039. void 0 === i && (i = !1),
  22040. e.prototype.setFocus.call(this, t, n), i || this.focusTrait.set(t.map((function (e) {
  22041. return o.element(e)
  22042. })), n)
  22043. }, t.prototype.setSelection = function (t, n, i) {
  22044. var o = this;
  22045. void 0 === i && (i = !1), e.prototype.setSelection.call(this, t, n), i || this.selectionTrait.set(t.map((function (e) {
  22046. return o.element(e)
  22047. })), n)
  22048. }, t
  22049. }(i.List), F = function () {
  22050. function e(e, t, r, a, d) {
  22051. var h = this;
  22052. void 0 === d && (d = {}), this._options = d, this.eventBufferer = new s.EventBufferer, this.disposables = new n.DisposableStore, this._onWillRefilter = new s.Emitter, this.onWillRefilter = this._onWillRefilter.event, this._onDidUpdateOptions = new s.Emitter;
  22053. var p, g, f, m = new D(r), v = new s.Relay, _ = new s.Relay, y = new N(_.event);
  22054. this.renderers = a.map((function (e) {
  22055. return new x(e, (function () {
  22056. return h.model
  22057. }), v.event, y, d)
  22058. }));
  22059. for (var C = 0, b = this.renderers; C < b.length; C++) {
  22060. var S = b[C];
  22061. this.disposables.add(S)
  22062. }
  22063. d.keyboardNavigationLabelProvider && (p = new I(this, d.keyboardNavigationLabelProvider, d.filter), d = l(l({}, d), {filter: p}), this.disposables.add(p)), this.focus = new O(d.identityProvider),
  22064. this.selection = new O(d.identityProvider), this.view = new A(e, t, m, this.renderers, this.focus, this.selection, l(l({}, (g = function () {
  22065. return h.model
  22066. }, (f = d) && l(l({}, f), {
  22067. identityProvider: f.identityProvider && {
  22068. getId: function (e) {
  22069. return f.identityProvider.getId(e.element)
  22070. }
  22071. },
  22072. dnd: f.dnd && new E(g, f.dnd),
  22073. multipleSelectionController: f.multipleSelectionController && {
  22074. isSelectionSingleChangeEvent: function (e) {
  22075. return f.multipleSelectionController.isSelectionSingleChangeEvent(l(l({}, e), {element: e.element}))
  22076. }, isSelectionRangeChangeEvent: function (e) {
  22077. return f.multipleSelectionController.isSelectionRangeChangeEvent(l(l({}, e), {element: e.element}))
  22078. }
  22079. },
  22080. accessibilityProvider: f.accessibilityProvider && l(l({}, f.accessibilityProvider), {
  22081. getAriaLabel: function (e) {
  22082. return f.accessibilityProvider.getAriaLabel(e.element)
  22083. }, getAriaLevel: function (e) {
  22084. return e.depth
  22085. }, getActiveDescendantId: f.accessibilityProvider.getActiveDescendantId && function (e) {
  22086. return f.accessibilityProvider.getActiveDescendantId(e.element)
  22087. }
  22088. }),
  22089. keyboardNavigationLabelProvider: f.keyboardNavigationLabelProvider && l(l({}, f.keyboardNavigationLabelProvider), {
  22090. getKeyboardNavigationLabel: function (e) {
  22091. return f.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)
  22092. }
  22093. }),
  22094. enableKeyboardNavigation: f.simpleKeyboardNavigation,
  22095. ariaProvider: {
  22096. getSetSize: function (e) {
  22097. var t = g(), n = t.getNodeLocation(e), i = t.getParentNodeLocation(n);
  22098. return t.getNode(i).visibleChildrenCount
  22099. }, getPosInSet: function (e) {
  22100. return e.visibleChildIndex + 1
  22101. }, isChecked: f.ariaProvider && f.ariaProvider.isChecked ? function (e) {
  22102. return f.ariaProvider.isChecked(e.element)
  22103. } : void 0, getRole: f.ariaProvider && f.ariaProvider.getRole ? function (e) {
  22104. return f.ariaProvider.getRole(e.element)
  22105. } : void 0
  22106. }
  22107. }))), {tree: this})), this.model = this.createModel(e, this.view, d), v.input = this.model.onDidChangeCollapseState;
  22108. var w = s.Event.forEach(this.model.onDidSplice, (function (e) {
  22109. h.eventBufferer.bufferEvents((function () {
  22110. h.focus.onDidModelSplice(e), h.selection.onDidModelSplice(e)
  22111. }))
  22112. }));
  22113. if (w((function () {
  22114. return null
  22115. }), null, this.disposables), _.input = s.Event.chain(s.Event.any(w, this.focus.onDidChange, this.selection.onDidChange)).debounce((function () {
  22116. return null
  22117. }), 0).map((function () {
  22118. for (var e = new Set, t = 0, n = h.focus.getNodes(); t < n.length; t++) {
  22119. var i = n[t];
  22120. e.add(i)
  22121. }
  22122. for (var o = 0, r = h.selection.getNodes(); o < r.length; o++) {
  22123. i = r[o];
  22124. e.add(i)
  22125. }
  22126. return c.fromSet(e)
  22127. })).event, !1 !== d.keyboardSupport) {
  22128. var T = s.Event.chain(this.view.onKeyDown).filter((function (e) {
  22129. return !k(e.target)
  22130. })).map((function (e) {
  22131. return new u.StandardKeyboardEvent(e)
  22132. }));
  22133. T.filter((function (e) {
  22134. return 15 === e.keyCode
  22135. })).on(this.onLeftArrow, this, this.disposables), T.filter((function (e) {
  22136. return 17 === e.keyCode
  22137. })).on(this.onRightArrow, this, this.disposables), T.filter((function (e) {
  22138. return 10 === e.keyCode
  22139. })).on(this.onSpace, this, this.disposables)
  22140. }
  22141. if (d.keyboardNavigationLabelProvider) {
  22142. var R = d.keyboardNavigationDelegate || i.DefaultKeyboardNavigationDelegate;
  22143. this.typeFilterController = new M(this, this.model, this.view, p, R), this.focusNavigationFilter = function (e) {
  22144. return h.typeFilterController.shouldAllowFocus(e)
  22145. }, this.disposables.add(this.typeFilterController)
  22146. }
  22147. this.styleElement = o.createStyleSheet(this.view.getHTMLElement()), o.toggleClass(this.getHTMLElement(), "always", this._options.renderIndentGuides === L.Always)
  22148. }
  22149. return Object.defineProperty(e.prototype, "onDidChangeFocus", {
  22150. get: function () {
  22151. return this.eventBufferer.wrapEvent(this.focus.onDidChange)
  22152. }, enumerable: !0, configurable: !0
  22153. }), Object.defineProperty(e.prototype, "onDidChangeSelection", {
  22154. get: function () {
  22155. return this.eventBufferer.wrapEvent(this.selection.onDidChange)
  22156. }, enumerable: !0, configurable: !0
  22157. }), Object.defineProperty(e.prototype, "onDidOpen", {
  22158. get: function () {
  22159. return s.Event.map(this.view.onDidOpen, T)
  22160. }, enumerable: !0, configurable: !0
  22161. }), Object.defineProperty(e.prototype, "onDidFocus", {
  22162. get: function () {
  22163. return this.view.onDidFocus
  22164. }, enumerable: !0, configurable: !0
  22165. }), Object.defineProperty(e.prototype, "onDidChangeCollapseState", {
  22166. get: function () {
  22167. return this.model.onDidChangeCollapseState
  22168. }, enumerable: !0, configurable: !0
  22169. }),
  22170. Object.defineProperty(e.prototype, "openOnSingleClick", {
  22171. get: function () {
  22172. return void 0 === this._options.openOnSingleClick || this._options.openOnSingleClick
  22173. }, enumerable: !0, configurable: !0
  22174. }), Object.defineProperty(e.prototype, "expandOnlyOnTwistieClick", {
  22175. get: function () {
  22176. return void 0 !== this._options.expandOnlyOnTwistieClick && this._options.expandOnlyOnTwistieClick
  22177. }, enumerable: !0, configurable: !0
  22178. }), Object.defineProperty(e.prototype, "onDidDispose", {
  22179. get: function () {
  22180. return this.view.onDidDispose
  22181. }, enumerable: !0, configurable: !0
  22182. }), e.prototype.updateOptions = function (e) {
  22183. void 0 === e && (e = {}), this._options = l(l({}, this._options), e);
  22184. for (var t = 0, n = this.renderers; t < n.length; t++) {
  22185. n[t].updateOptions(e)
  22186. }
  22187. this.view.updateOptions({
  22188. enableKeyboardNavigation: this._options.simpleKeyboardNavigation,
  22189. automaticKeyboardNavigation: this._options.automaticKeyboardNavigation
  22190. }), this.typeFilterController && this.typeFilterController.updateOptions(this._options), this._onDidUpdateOptions.fire(this._options),
  22191. o.toggleClass(this.getHTMLElement(), "always", this._options.renderIndentGuides === L.Always)
  22192. }, Object.defineProperty(e.prototype, "options", {
  22193. get: function () {
  22194. return this._options
  22195. }, enumerable: !0, configurable: !0
  22196. }), e.prototype.getHTMLElement = function () {
  22197. return this.view.getHTMLElement()
  22198. }, Object.defineProperty(e.prototype, "scrollTop", {
  22199. get: function () {
  22200. return this.view.scrollTop
  22201. }, set: function (e) {
  22202. this.view.scrollTop = e
  22203. }, enumerable: !0, configurable: !0
  22204. }), e.prototype.domFocus = function () {
  22205. this.view.domFocus()
  22206. }, e.prototype.layout = function (e, t) {
  22207. this.view.layout(e, t)
  22208. }, e.prototype.style = function (e) {
  22209. var t = "." + this.view.domId, n = [];
  22210. e.treeIndentGuidesStroke && (n.push(".monaco-list" + t + ":hover .monaco-tl-indent > .indent-guide, .monaco-list" + t + ".always .monaco-tl-indent > .indent-guide { border-color: " + e.treeIndentGuidesStroke.transparent(.4) + "; }"), n.push(".monaco-list" + t + " .monaco-tl-indent > .indent-guide.active { border-color: " + e.treeIndentGuidesStroke + "; }"));
  22211. var i = n.join("\n")
  22212. ;i !== this.styleElement.innerHTML && (this.styleElement.innerHTML = i), this.view.style(e)
  22213. }, e.prototype.collapse = function (e, t) {
  22214. return void 0 === t && (t = !1), this.model.setCollapsed(e, !0, t)
  22215. }, e.prototype.expand = function (e, t) {
  22216. return void 0 === t && (t = !1), this.model.setCollapsed(e, !1, t)
  22217. }, e.prototype.isCollapsible = function (e) {
  22218. return this.model.isCollapsible(e)
  22219. }, e.prototype.setCollapsible = function (e, t) {
  22220. return this.model.setCollapsible(e, t)
  22221. }, e.prototype.isCollapsed = function (e) {
  22222. return this.model.isCollapsed(e)
  22223. }, e.prototype.refilter = function () {
  22224. this._onWillRefilter.fire(void 0), this.model.refilter()
  22225. }, e.prototype.setSelection = function (e, t) {
  22226. var n = this, i = e.map((function (e) {
  22227. return n.model.getNode(e)
  22228. }));
  22229. this.selection.set(i, t);
  22230. var o = e.map((function (e) {
  22231. return n.model.getListIndex(e)
  22232. })).filter((function (e) {
  22233. return e > -1
  22234. }));
  22235. this.view.setSelection(o, t, !0)
  22236. }, e.prototype.getSelection = function () {
  22237. return this.selection.get()
  22238. }, e.prototype.setFocus = function (e, t) {
  22239. var n = this, i = e.map((function (e) {
  22240. return n.model.getNode(e)
  22241. }));
  22242. this.focus.set(i, t)
  22243. ;var o = e.map((function (e) {
  22244. return n.model.getListIndex(e)
  22245. })).filter((function (e) {
  22246. return e > -1
  22247. }));
  22248. this.view.setFocus(o, t, !0)
  22249. }, e.prototype.focusNext = function (e, t, n, i) {
  22250. void 0 === e && (e = 1), void 0 === t && (t = !1), void 0 === i && (i = this.focusNavigationFilter), this.view.focusNext(e, t, n, i)
  22251. }, e.prototype.getFocus = function () {
  22252. return this.focus.get()
  22253. }, e.prototype.reveal = function (e, t) {
  22254. this.model.expandTo(e);
  22255. var n = this.model.getListIndex(e);
  22256. -1 !== n && this.view.reveal(n, t)
  22257. }, e.prototype.getRelativeTop = function (e) {
  22258. var t = this.model.getListIndex(e);
  22259. return -1 === t ? null : this.view.getRelativeTop(t)
  22260. }, e.prototype.onLeftArrow = function (e) {
  22261. e.preventDefault(), e.stopPropagation();
  22262. var t = this.view.getFocusedElements();
  22263. if (0 !== t.length) {
  22264. var n = t[0], i = this.model.getNodeLocation(n);
  22265. if (!this.model.setCollapsed(i, !0)) {
  22266. var o = this.model.getParentNodeLocation(i);
  22267. if (!o) return;
  22268. var r = this.model.getListIndex(o);
  22269. this.view.reveal(r), this.view.setFocus([r])
  22270. }
  22271. }
  22272. }, e.prototype.onRightArrow = function (e) {
  22273. e.preventDefault(), e.stopPropagation();
  22274. var t = this.view.getFocusedElements()
  22275. ;
  22276. if (0 !== t.length) {
  22277. var n = t[0], i = this.model.getNodeLocation(n);
  22278. if (!this.model.setCollapsed(i, !1)) {
  22279. if (!n.children.some((function (e) {
  22280. return e.visible
  22281. }))) return;
  22282. var o = this.view.getFocus()[0] + 1;
  22283. this.view.reveal(o), this.view.setFocus([o])
  22284. }
  22285. }
  22286. }, e.prototype.onSpace = function (e) {
  22287. e.preventDefault(), e.stopPropagation();
  22288. var t = this.view.getFocusedElements();
  22289. if (0 !== t.length) {
  22290. var n = t[0], i = this.model.getNodeLocation(n), o = e.browserEvent.altKey;
  22291. this.model.setCollapsed(i, void 0, o)
  22292. }
  22293. }, e.prototype.dispose = function () {
  22294. n.dispose(this.disposables), this.view.dispose()
  22295. }, e
  22296. }();
  22297. t.AbstractTree = F
  22298. })), define(n[407], i([0, 1, 154, 130]), (function (e, t, n, i) {
  22299. "use strict";
  22300. Object.defineProperty(t, "__esModule", {value: !0});
  22301. var o = function (e) {
  22302. function t(t, n, i, o, r, s) {
  22303. void 0 === s && (s = {});
  22304. var a = e.call(this, t, n, i, o, s) || this;
  22305. return a.user = t, a.dataSource = r, a.identityProvider = s.identityProvider, a
  22306. }
  22307. return r(t, e), t.prototype.createModel = function (e, t, n) {
  22308. return new i.ObjectTreeModel(e, t, n)
  22309. }, t
  22310. }(n.AbstractTree);
  22311. t.DataTree = o
  22312. })),
  22313. define(n[206], i([0, 1, 154, 130, 243, 101]), (function (e, t, n, i, o, s) {
  22314. "use strict";
  22315. Object.defineProperty(t, "__esModule", {value: !0});
  22316. var a = function (e) {
  22317. function t(t, n, i, o, r) {
  22318. return void 0 === r && (r = {}), e.call(this, t, n, i, o, r) || this
  22319. }
  22320. return r(t, e), Object.defineProperty(t.prototype, "onDidChangeCollapseState", {
  22321. get: function () {
  22322. return this.model.onDidChangeCollapseState
  22323. }, enumerable: !0, configurable: !0
  22324. }), t.prototype.setChildren = function (e, t) {
  22325. this.model.setChildren(e, t)
  22326. }, t.prototype.rerender = function (e) {
  22327. void 0 !== e ? this.model.rerender(e) : this.view.rerender()
  22328. }, t.prototype.hasElement = function (e) {
  22329. return this.model.has(e)
  22330. }, t.prototype.createModel = function (e, t, n) {
  22331. return new i.ObjectTreeModel(e, t, n)
  22332. }, t
  22333. }(n.AbstractTree);
  22334. t.ObjectTree = a;
  22335. var u = function () {
  22336. function e(e, t) {
  22337. this._compressedTreeNodeProvider = e, this.renderer = t, this.templateId = t.templateId, t.onDidChangeTwistieState && (this.onDidChangeTwistieState = t.onDidChangeTwistieState)
  22338. }
  22339. return Object.defineProperty(e.prototype, "compressedTreeNodeProvider", {
  22340. get: function () {
  22341. return this._compressedTreeNodeProvider()
  22342. }, enumerable: !0, configurable: !0
  22343. }), e.prototype.renderTemplate = function (e) {
  22344. return {compressedTreeNode: void 0, data: this.renderer.renderTemplate(e)}
  22345. }, e.prototype.renderElement = function (e, t, n, i) {
  22346. var o = this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);
  22347. 1 === o.element.elements.length ? (n.compressedTreeNode = void 0, this.renderer.renderElement(e, t, n.data, i)) : (n.compressedTreeNode = o, this.renderer.renderCompressedElements(o, t, n.data, i))
  22348. }, e.prototype.disposeElement = function (e, t, n, i) {
  22349. n.compressedTreeNode ? this.renderer.disposeCompressedElements && this.renderer.disposeCompressedElements(n.compressedTreeNode, t, n.data, i) : this.renderer.disposeElement && this.renderer.disposeElement(e, t, n.data, i)
  22350. }, e.prototype.disposeTemplate = function (e) {
  22351. this.renderer.disposeTemplate(e.data)
  22352. }, e.prototype.renderTwistie = function (e, t) {
  22353. this.renderer.renderTwistie && this.renderer.renderTwistie(e, t)
  22354. }, h([s.memoize], e.prototype, "compressedTreeNodeProvider", null), e
  22355. }();
  22356. var d = function (e) {
  22357. function t(t, n, i, o, r) {
  22358. void 0 === r && (r = {});
  22359. var s = this, a = function () {
  22360. return s
  22361. }, d = o.map((function (e) {
  22362. return new u(a, e)
  22363. }));
  22364. return s = e.call(this, t, n, i, d, function (e, t) {
  22365. return t && l(l({}, t), {
  22366. keyboardNavigationLabelProvider: t.keyboardNavigationLabelProvider && {
  22367. getKeyboardNavigationLabel: function (n) {
  22368. var i;
  22369. try {
  22370. i = e().getCompressedTreeNode(n)
  22371. } catch (e) {
  22372. return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)
  22373. }
  22374. return 1 === i.element.elements.length ? t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n) : t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)
  22375. }
  22376. }
  22377. })
  22378. }(a, r)) || this
  22379. }
  22380. return r(t, e), t.prototype.setChildren = function (e, t) {
  22381. this.model.setChildren(e, t)
  22382. }, t.prototype.createModel = function (e, t, n) {
  22383. return new o.CompressibleObjectTreeModel(e, t, n)
  22384. }, t.prototype.updateOptions = function (t) {
  22385. void 0 === t && (t = {}), e.prototype.updateOptions.call(this, t), void 0 !== t.compressionEnabled && this.model.setCompressionEnabled(t.compressionEnabled)
  22386. }, t.prototype.getCompressedTreeNode = function (e) {
  22387. return void 0 === e && (e = null), this.model.getCompressedTreeNode(e)
  22388. }, t
  22389. }(a);
  22390. t.CompressibleObjectTree = d
  22391. }));
  22392. a = this && this.__spreadArrays || function () {
  22393. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  22394. var i = Array(e), o = 0;
  22395. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  22396. return i
  22397. };
  22398. define(n[408], i([0, 1, 154, 206, 99, 2, 4, 15, 54, 140, 10, 6, 38, 129]), (function (e, t, n, i, o, s, u, h, p, g, f, m, v, _) {
  22399. "use strict";
  22400. function y(e) {
  22401. return l(l({}, e), {children: [], refreshPromise: void 0, stale: !0, slow: !1, collapsedByDefault: void 0})
  22402. }
  22403. function C(e, t) {
  22404. return !!t.parent && (t.parent === e || C(e, t.parent))
  22405. }
  22406. Object.defineProperty(t, "__esModule", {value: !0});
  22407. var b = function () {
  22408. function e(e) {
  22409. this.node = e
  22410. }
  22411. return Object.defineProperty(e.prototype, "element", {
  22412. get: function () {
  22413. return this.node.element.element
  22414. }, enumerable: !0, configurable: !0
  22415. }), Object.defineProperty(e.prototype, "children", {
  22416. get: function () {
  22417. return this.node.children.map((function (t) {
  22418. return new e(t)
  22419. }))
  22420. }, enumerable: !0, configurable: !0
  22421. }), Object.defineProperty(e.prototype, "depth", {
  22422. get: function () {
  22423. return this.node.depth
  22424. }, enumerable: !0, configurable: !0
  22425. }), Object.defineProperty(e.prototype, "visibleChildrenCount", {
  22426. get: function () {
  22427. return this.node.visibleChildrenCount
  22428. }, enumerable: !0, configurable: !0
  22429. }), Object.defineProperty(e.prototype, "visibleChildIndex", {
  22430. get: function () {
  22431. return this.node.visibleChildIndex
  22432. }, enumerable: !0, configurable: !0
  22433. }), Object.defineProperty(e.prototype, "collapsible", {
  22434. get: function () {
  22435. return this.node.collapsible
  22436. }, enumerable: !0, configurable: !0
  22437. }), Object.defineProperty(e.prototype, "collapsed", {
  22438. get: function () {
  22439. return this.node.collapsed
  22440. }, enumerable: !0, configurable: !0
  22441. }), Object.defineProperty(e.prototype, "visible", {
  22442. get: function () {
  22443. return this.node.visible
  22444. }, enumerable: !0, configurable: !0
  22445. }), Object.defineProperty(e.prototype, "filterData", {
  22446. get: function () {
  22447. return this.node.filterData
  22448. }, enumerable: !0, configurable: !0
  22449. }), e
  22450. }(), S = function () {
  22451. function e(e, t, n) {
  22452. this.renderer = e, this.nodeMapper = t, this.onDidChangeTwistieState = n, this.renderedNodes = new Map, this.templateId = e.templateId
  22453. }
  22454. return e.prototype.renderTemplate = function (e) {
  22455. return {templateData: this.renderer.renderTemplate(e)}
  22456. }, e.prototype.renderElement = function (e, t, n, i) {
  22457. this.renderer.renderElement(this.nodeMapper.map(e), t, n.templateData, i)
  22458. }, e.prototype.renderTwistie = function (e, t) {
  22459. return m.toggleClass(t, "codicon-loading", e.slow), !1
  22460. }, e.prototype.disposeElement = function (e, t, n, i) {
  22461. this.renderer.disposeElement && this.renderer.disposeElement(this.nodeMapper.map(e), t, n.templateData, i)
  22462. }, e.prototype.disposeTemplate = function (e) {
  22463. this.renderer.disposeTemplate(e.templateData)
  22464. }, e.prototype.dispose = function () {
  22465. this.renderedNodes.clear()
  22466. }, e
  22467. }();
  22468. function w(e) {
  22469. return {
  22470. browserEvent: e.browserEvent, elements: e.elements.map((function (e) {
  22471. return e.element
  22472. }))
  22473. }
  22474. }
  22475. var E = function (e) {
  22476. function t(t) {
  22477. var n = e.call(this, t.elements.map((function (e) {
  22478. return e.element
  22479. }))) || this;
  22480. return n.data = t, n
  22481. }
  22482. return r(t, e), t
  22483. }(g.ElementsDragAndDropData);
  22484. function L(e) {
  22485. return e instanceof g.ElementsDragAndDropData ? new E(e) : e
  22486. }
  22487. var D = function () {
  22488. function e(e) {
  22489. this.dnd = e
  22490. }
  22491. return e.prototype.getDragURI = function (e) {
  22492. return this.dnd.getDragURI(e.element)
  22493. }, e.prototype.getDragLabel = function (e, t) {
  22494. if (this.dnd.getDragLabel) return this.dnd.getDragLabel(e.map((function (e) {
  22495. return e.element
  22496. })), t)
  22497. }, e.prototype.onDragStart = function (e, t) {
  22498. this.dnd.onDragStart && this.dnd.onDragStart(L(e), t)
  22499. }, e.prototype.onDragOver = function (e, t, n, i, o) {
  22500. return void 0 === o && (o = !0), this.dnd.onDragOver(L(e), t && t.element, n, i)
  22501. }, e.prototype.drop = function (e, t, n, i) {
  22502. this.dnd.drop(L(e), t && t.element, n, i)
  22503. }, e.prototype.onDragEnd = function (e) {
  22504. this.dnd.onDragEnd && this.dnd.onDragEnd(e)
  22505. }, e
  22506. }();
  22507. function N(e) {
  22508. return e && l(l({}, e), {
  22509. collapseByDefault: !0,
  22510. identityProvider: e.identityProvider && {
  22511. getId: function (t) {
  22512. return e.identityProvider.getId(t.element)
  22513. }
  22514. },
  22515. dnd: e.dnd && new D(e.dnd),
  22516. multipleSelectionController: e.multipleSelectionController && {
  22517. isSelectionSingleChangeEvent: function (t) {
  22518. return e.multipleSelectionController.isSelectionSingleChangeEvent(l(l({}, t), {element: t.element}))
  22519. }, isSelectionRangeChangeEvent: function (t) {
  22520. return e.multipleSelectionController.isSelectionRangeChangeEvent(l(l({}, t), {element: t.element}))
  22521. }
  22522. },
  22523. accessibilityProvider: e.accessibilityProvider && l(l({}, e.accessibilityProvider), {
  22524. getAriaLabel: function (t) {
  22525. return e.accessibilityProvider.getAriaLabel(t.element)
  22526. }, getAriaLevel: e.accessibilityProvider.getAriaLevel && function (t) {
  22527. return e.accessibilityProvider.getAriaLevel(t.element)
  22528. }, getActiveDescendantId: e.accessibilityProvider.getActiveDescendantId && function (t) {
  22529. return e.accessibilityProvider.getActiveDescendantId(t.element)
  22530. }
  22531. }),
  22532. filter: e.filter && {
  22533. filter: function (t, n) {
  22534. return e.filter.filter(t.element, n)
  22535. }
  22536. },
  22537. keyboardNavigationLabelProvider: e.keyboardNavigationLabelProvider && l(l({}, e.keyboardNavigationLabelProvider), {
  22538. getKeyboardNavigationLabel: function (t) {
  22539. return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)
  22540. }
  22541. }),
  22542. sorter: void 0,
  22543. expandOnlyOnTwistieClick: void 0 === e.expandOnlyOnTwistieClick ? void 0 : "function" != typeof e.expandOnlyOnTwistieClick ? e.expandOnlyOnTwistieClick : function (t) {
  22544. return e.expandOnlyOnTwistieClick(t.element)
  22545. },
  22546. ariaProvider: e.ariaProvider && {
  22547. getPosInSet: function (t, n) {
  22548. return e.ariaProvider.getPosInSet(t.element, n)
  22549. }, getSetSize: function (t, n, i) {
  22550. return e.ariaProvider.getSetSize(t.element, n, i)
  22551. }, getRole: e.ariaProvider.getRole ? function (t) {
  22552. return e.ariaProvider.getRole(t.element)
  22553. } : void 0, isChecked: e.ariaProvider.isChecked ? function (t) {
  22554. var n;
  22555. return (null === (n = e.ariaProvider) || void 0 === n ? void 0 : n.isChecked)(t.element)
  22556. } : void 0
  22557. },
  22558. additionalScrollHeight: e.additionalScrollHeight
  22559. })
  22560. }
  22561. function x(e, t) {
  22562. t(e), e.children.forEach((function (e) {
  22563. return x(e, t)
  22564. }))
  22565. }
  22566. var I = function () {
  22567. function e(e, t, n, i, r, a) {
  22568. void 0 === a && (a = {}), this.user = e, this.dataSource = r, this.nodes = new Map, this.subTreeRefreshPromises = new Map, this.refreshPromises = new Map, this._onDidRender = new u.Emitter, this._onDidChangeNodeSlowState = new u.Emitter, this.nodeMapper = new o.WeakMapper((function (e) {
  22569. return new b(e)
  22570. })), this.disposables = new s.DisposableStore, this.identityProvider = a.identityProvider,
  22571. this.autoExpandSingleChildren = void 0 !== a.autoExpandSingleChildren && a.autoExpandSingleChildren, this.sorter = a.sorter, this.collapseByDefault = a.collapseByDefault, this.tree = this.createTree(e, t, n, i, a), this.root = y({
  22572. element: void 0,
  22573. parent: null,
  22574. hasChildren: !0
  22575. }), this.identityProvider && (this.root = l(l({}, this.root), {id: null})), this.nodes.set(null, this.root), this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState, this, this.disposables)
  22576. }
  22577. return Object.defineProperty(e.prototype, "onDidChangeFocus", {
  22578. get: function () {
  22579. return u.Event.map(this.tree.onDidChangeFocus, w)
  22580. }, enumerable: !0, configurable: !0
  22581. }), Object.defineProperty(e.prototype, "onDidChangeSelection", {
  22582. get: function () {
  22583. return u.Event.map(this.tree.onDidChangeSelection, w)
  22584. }, enumerable: !0, configurable: !0
  22585. }), Object.defineProperty(e.prototype, "onDidOpen", {
  22586. get: function () {
  22587. return u.Event.map(this.tree.onDidOpen, w)
  22588. }, enumerable: !0, configurable: !0
  22589. }), Object.defineProperty(e.prototype, "onDidFocus", {
  22590. get: function () {
  22591. return this.tree.onDidFocus
  22592. }, enumerable: !0, configurable: !0
  22593. }),
  22594. Object.defineProperty(e.prototype, "onDidDispose", {
  22595. get: function () {
  22596. return this.tree.onDidDispose
  22597. }, enumerable: !0, configurable: !0
  22598. }), e.prototype.createTree = function (e, t, o, r, s) {
  22599. var a = this, l = new n.ComposedTreeDelegate(o), u = r.map((function (e) {
  22600. return new S(e, a.nodeMapper, a._onDidChangeNodeSlowState.event)
  22601. })), d = N(s) || {};
  22602. return new i.ObjectTree(e, t, l, u, d)
  22603. }, e.prototype.updateOptions = function (e) {
  22604. void 0 === e && (e = {}), this.tree.updateOptions(e)
  22605. }, e.prototype.getHTMLElement = function () {
  22606. return this.tree.getHTMLElement()
  22607. }, Object.defineProperty(e.prototype, "scrollTop", {
  22608. get: function () {
  22609. return this.tree.scrollTop
  22610. }, set: function (e) {
  22611. this.tree.scrollTop = e
  22612. }, enumerable: !0, configurable: !0
  22613. }), e.prototype.domFocus = function () {
  22614. this.tree.domFocus()
  22615. }, e.prototype.layout = function (e, t) {
  22616. this.tree.layout(e, t)
  22617. }, e.prototype.style = function (e) {
  22618. this.tree.style(e)
  22619. }, e.prototype.getInput = function () {
  22620. return this.root.element
  22621. }, e.prototype.setInput = function (e, t) {
  22622. return d(this, void 0, void 0, (function () {
  22623. var n;
  22624. return c(this, (function (i) {
  22625. switch (i.label) {
  22626. case 0:
  22627. return this.refreshPromises.forEach((function (e) {
  22628. return e.cancel()
  22629. })), this.refreshPromises.clear(), this.root.element = e, n = t && {
  22630. viewState: t,
  22631. focus: [],
  22632. selection: []
  22633. }, [4, this._updateChildren(e, !0, !1, n)];
  22634. case 1:
  22635. return i.sent(), n && (this.tree.setFocus(n.focus), this.tree.setSelection(n.selection)), t && "number" == typeof t.scrollTop && (this.scrollTop = t.scrollTop), [2]
  22636. }
  22637. }))
  22638. }))
  22639. }, e.prototype._updateChildren = function (e, t, n, i) {
  22640. return void 0 === e && (e = this.root.element), void 0 === t && (t = !0), void 0 === n && (n = !1), d(this, void 0, void 0, (function () {
  22641. var r;
  22642. return c(this, (function (s) {
  22643. switch (s.label) {
  22644. case 0:
  22645. if (void 0 === this.root.element) throw new o.TreeError(this.user, "Tree input not set");
  22646. return this.root.refreshPromise ? [4, this.root.refreshPromise] : [3, 3];
  22647. case 1:
  22648. return s.sent(), [4, u.Event.toPromise(this._onDidRender.event)];
  22649. case 2:
  22650. s.sent(), s.label = 3;
  22651. case 3:
  22652. return r = this.getDataNode(e), [4, this.refreshAndRenderNode(r, t, i)];
  22653. case 4:
  22654. if (s.sent(), n) try {
  22655. this.tree.rerender(r)
  22656. } catch (e) {
  22657. }
  22658. return [2]
  22659. }
  22660. }))
  22661. }))
  22662. }, e.prototype.rerender = function (e) {
  22663. if (void 0 !== e && e !== this.root.element) {
  22664. var t = this.getDataNode(e);
  22665. this.tree.rerender(t)
  22666. } else this.tree.rerender()
  22667. }, e.prototype.collapse = function (e, t) {
  22668. void 0 === t && (t = !1);
  22669. var n = this.getDataNode(e);
  22670. return this.tree.collapse(n === this.root ? null : n, t)
  22671. }, e.prototype.expand = function (e, t) {
  22672. return void 0 === t && (t = !1), d(this, void 0, void 0, (function () {
  22673. var n, i;
  22674. return c(this, (function (r) {
  22675. switch (r.label) {
  22676. case 0:
  22677. if (void 0 === this.root.element) throw new o.TreeError(this.user, "Tree input not set");
  22678. return this.root.refreshPromise ? [4, this.root.refreshPromise] : [3, 3];
  22679. case 1:
  22680. return r.sent(), [4, u.Event.toPromise(this._onDidRender.event)];
  22681. case 2:
  22682. r.sent(), r.label = 3;
  22683. case 3:
  22684. return n = this.getDataNode(e), this.tree.hasElement(n) && !this.tree.isCollapsible(n) ? [2, !1] : n.refreshPromise ? [4, this.root.refreshPromise] : [3, 6];
  22685. case 4:
  22686. return r.sent(), [4, u.Event.toPromise(this._onDidRender.event)];
  22687. case 5:
  22688. r.sent(), r.label = 6;
  22689. case 6:
  22690. return n === this.root || n.refreshPromise || this.tree.isCollapsed(n) ? (i = this.tree.expand(n === this.root ? null : n, t),
  22691. n.refreshPromise ? [4, this.root.refreshPromise] : [3, 9]) : [2, !1];
  22692. case 7:
  22693. return r.sent(), [4, u.Event.toPromise(this._onDidRender.event)];
  22694. case 8:
  22695. r.sent(), r.label = 9;
  22696. case 9:
  22697. return [2, i]
  22698. }
  22699. }))
  22700. }))
  22701. }, e.prototype.setSelection = function (e, t) {
  22702. var n = this, i = e.map((function (e) {
  22703. return n.getDataNode(e)
  22704. }));
  22705. this.tree.setSelection(i, t)
  22706. }, e.prototype.getSelection = function () {
  22707. return this.tree.getSelection().map((function (e) {
  22708. return e.element
  22709. }))
  22710. }, e.prototype.setFocus = function (e, t) {
  22711. var n = this, i = e.map((function (e) {
  22712. return n.getDataNode(e)
  22713. }));
  22714. this.tree.setFocus(i, t)
  22715. }, e.prototype.getFocus = function () {
  22716. return this.tree.getFocus().map((function (e) {
  22717. return e.element
  22718. }))
  22719. }, e.prototype.reveal = function (e, t) {
  22720. this.tree.reveal(this.getDataNode(e), t)
  22721. }, e.prototype.getDataNode = function (e) {
  22722. var t = this.nodes.get(e === this.root.element ? null : e);
  22723. if (!t) throw new o.TreeError(this.user, "Data tree node not found: " + e);
  22724. return t
  22725. }, e.prototype.refreshAndRenderNode = function (e, t, n) {
  22726. return d(this, void 0, void 0, (function () {
  22727. return c(this, (function (i) {
  22728. switch (i.label) {
  22729. case 0:
  22730. return [4, this.refreshNode(e, t, n)];
  22731. case 1:
  22732. return i.sent(), this.render(e, n), [2]
  22733. }
  22734. }))
  22735. }))
  22736. }, e.prototype.refreshNode = function (e, t, n) {
  22737. return d(this, void 0, void 0, (function () {
  22738. var i, o = this;
  22739. return c(this, (function (r) {
  22740. return this.subTreeRefreshPromises.forEach((function (r, s) {
  22741. !i && function (e, t) {
  22742. return e === t || C(e, t) || C(t, e)
  22743. }(s, e) && (i = r.then((function () {
  22744. return o.refreshNode(e, t, n)
  22745. })))
  22746. })), i ? [2, i] : [2, this.doRefreshSubTree(e, t, n)]
  22747. }))
  22748. }))
  22749. }, e.prototype.doRefreshSubTree = function (e, t, n) {
  22750. return d(this, void 0, void 0, (function () {
  22751. var i, o, r = this;
  22752. return c(this, (function (s) {
  22753. switch (s.label) {
  22754. case 0:
  22755. e.refreshPromise = new Promise((function (e) {
  22756. return i = e
  22757. })), this.subTreeRefreshPromises.set(e, e.refreshPromise), e.refreshPromise.finally((function () {
  22758. e.refreshPromise = void 0, r.subTreeRefreshPromises.delete(e)
  22759. })), s.label = 1;
  22760. case 1:
  22761. return s.trys.push([1, , 4, 5]), [4, this.doRefreshNode(e, t, n)];
  22762. case 2:
  22763. return o = s.sent(), e.stale = !1, [4, Promise.all(o.map((function (e) {
  22764. return r.doRefreshSubTree(e, t, n)
  22765. })))];
  22766. case 3:
  22767. return s.sent(), [3, 5];
  22768. case 4:
  22769. return i(), [7];
  22770. case 5:
  22771. return [2]
  22772. }
  22773. }))
  22774. }))
  22775. }, e.prototype.doRefreshNode = function (e, t, n) {
  22776. return d(this, void 0, void 0, (function () {
  22777. var i, o, r, s, a = this;
  22778. return c(this, (function (l) {
  22779. switch (l.label) {
  22780. case 0:
  22781. e.hasChildren = !!this.dataSource.hasChildren(e.element), e.hasChildren ? ((o = h.timeout(800)).then((function () {
  22782. e.slow = !0, a._onDidChangeNodeSlowState.fire(e)
  22783. }), (function (e) {
  22784. return null
  22785. })), i = this.doGetChildren(e).finally((function () {
  22786. return o.cancel()
  22787. }))) : i = Promise.resolve([]), l.label = 1;
  22788. case 1:
  22789. return l.trys.push([1, 3, 4, 5]), [4, i];
  22790. case 2:
  22791. return r = l.sent(), [2, this.setChildren(e, r, t, n)];
  22792. case 3:
  22793. if (s = l.sent(), e !== this.root && this.tree.collapse(e === this.root ? null : e), f.isPromiseCanceledError(s)) return [2, []];
  22794. throw s;
  22795. case 4:
  22796. return e.slow && (e.slow = !1, this._onDidChangeNodeSlowState.fire(e)), [7];
  22797. case 5:
  22798. return [2]
  22799. }
  22800. }))
  22801. }))
  22802. }, e.prototype.doGetChildren = function (e) {
  22803. var t = this, n = this.refreshPromises.get(e);
  22804. return n || (n = h.createCancelablePromise((function () {
  22805. return d(t, void 0, void 0, (function () {
  22806. var t;
  22807. return c(this, (function (n) {
  22808. switch (n.label) {
  22809. case 0:
  22810. return [4, this.dataSource.getChildren(e.element)];
  22811. case 1:
  22812. return t = n.sent(), [2, this.processChildren(t)]
  22813. }
  22814. }))
  22815. }))
  22816. })), this.refreshPromises.set(e, n), n.finally((function () {
  22817. return t.refreshPromises.delete(e)
  22818. })))
  22819. }, e.prototype._onDidChangeCollapseState = function (e) {
  22820. var t = e.node, n = e.deep;
  22821. !t.collapsed && t.element.stale && (n ? this.collapse(t.element.element) : this.refreshAndRenderNode(t.element, !1).catch(f.onUnexpectedError))
  22822. }, e.prototype.setChildren = function (e, t, n, i) {
  22823. var o, r = this;
  22824. if (0 === e.children.length && 0 === t.length) return [];
  22825. for (var s = new Map, l = new Map, u = 0, d = e.children; u < d.length; u++) {
  22826. var c = d[u];
  22827. if (s.set(c.element, c), this.identityProvider) {
  22828. var h = this.tree.isCollapsed(c);
  22829. l.set(c.id, {node: c, collapsed: h})
  22830. }
  22831. }
  22832. for (var p = [], g = t.map((function (t) {
  22833. var o = !!r.dataSource.hasChildren(t);
  22834. if (!r.identityProvider) {
  22835. var a = y({element: t, parent: e, hasChildren: o});
  22836. return o && r.collapseByDefault && !r.collapseByDefault(t) && (a.collapsedByDefault = !1, p.push(a)), a
  22837. }
  22838. var u = r.identityProvider.getId(t).toString(), d = l.get(u);
  22839. if (d) {
  22840. a = d.node
  22841. ;
  22842. return s.delete(a.element), r.nodes.delete(a.element), r.nodes.set(t, a), a.element = t, a.hasChildren = o, n ? d.collapsed ? (a.children.forEach((function (e) {
  22843. return x(e, (function (e) {
  22844. return r.nodes.delete(e.element)
  22845. }))
  22846. })), a.children.splice(0, a.children.length), a.stale = !0) : p.push(a) : o && r.collapseByDefault && !r.collapseByDefault(t) && (a.collapsedByDefault = !1, p.push(a)), a
  22847. }
  22848. var c = y({element: t, parent: e, id: u, hasChildren: o});
  22849. return i && i.viewState.focus && i.viewState.focus.indexOf(u) > -1 && i.focus.push(c), i && i.viewState.selection && i.viewState.selection.indexOf(u) > -1 && i.selection.push(c), i && i.viewState.expanded && i.viewState.expanded.indexOf(u) > -1 ? p.push(c) : o && r.collapseByDefault && !r.collapseByDefault(t) && (c.collapsedByDefault = !1, p.push(c)), c
  22850. })), f = 0, m = v.values(s); f < m.length; f++) {
  22851. x(m[f], (function (e) {
  22852. return r.nodes.delete(e.element)
  22853. }))
  22854. }
  22855. for (var _ = 0, C = g; _ < C.length; _++) {
  22856. c = C[_];
  22857. this.nodes.set(c.element, c)
  22858. }
  22859. return (o = e.children).splice.apply(o, a([0, e.children.length], g)),
  22860. e !== this.root && this.autoExpandSingleChildren && 1 === g.length && 0 === p.length && (g[0].collapsedByDefault = !1, p.push(g[0])), p
  22861. }, e.prototype.render = function (e, t) {
  22862. var n = this, i = e.children.map((function (e) {
  22863. return n.asTreeElement(e, t)
  22864. }));
  22865. this.tree.setChildren(e === this.root ? null : e, i), e !== this.root && this.tree.setCollapsible(e, e.hasChildren), this._onDidRender.fire()
  22866. }, e.prototype.asTreeElement = function (e, t) {
  22867. var n, i = this;
  22868. return e.stale ? {
  22869. element: e,
  22870. collapsible: e.hasChildren,
  22871. collapsed: !0
  22872. } : (n = !(t && t.viewState.expanded && e.id && t.viewState.expanded.indexOf(e.id) > -1) && e.collapsedByDefault, e.collapsedByDefault = void 0, {
  22873. element: e,
  22874. children: e.hasChildren ? p.Iterator.map(p.Iterator.fromArray(e.children), (function (e) {
  22875. return i.asTreeElement(e, t)
  22876. })) : [],
  22877. collapsible: e.hasChildren,
  22878. collapsed: n
  22879. })
  22880. }, e.prototype.processChildren = function (e) {
  22881. return this.sorter && e.sort(this.sorter.compare.bind(this.sorter)), e
  22882. }, e.prototype.dispose = function () {
  22883. this.disposables.dispose()
  22884. }, e
  22885. }();
  22886. t.AsyncDataTree = I;
  22887. var M = function () {
  22888. function e(e) {
  22889. this.node = e
  22890. }
  22891. return Object.defineProperty(e.prototype, "element", {
  22892. get: function () {
  22893. return {
  22894. elements: this.node.element.elements.map((function (e) {
  22895. return e.element
  22896. })), incompressible: this.node.element.incompressible
  22897. }
  22898. }, enumerable: !0, configurable: !0
  22899. }), Object.defineProperty(e.prototype, "children", {
  22900. get: function () {
  22901. return this.node.children.map((function (t) {
  22902. return new e(t)
  22903. }))
  22904. }, enumerable: !0, configurable: !0
  22905. }), Object.defineProperty(e.prototype, "depth", {
  22906. get: function () {
  22907. return this.node.depth
  22908. }, enumerable: !0, configurable: !0
  22909. }), Object.defineProperty(e.prototype, "visibleChildrenCount", {
  22910. get: function () {
  22911. return this.node.visibleChildrenCount
  22912. }, enumerable: !0, configurable: !0
  22913. }), Object.defineProperty(e.prototype, "visibleChildIndex", {
  22914. get: function () {
  22915. return this.node.visibleChildIndex
  22916. }, enumerable: !0, configurable: !0
  22917. }), Object.defineProperty(e.prototype, "collapsible", {
  22918. get: function () {
  22919. return this.node.collapsible
  22920. }, enumerable: !0, configurable: !0
  22921. }), Object.defineProperty(e.prototype, "collapsed", {
  22922. get: function () {
  22923. return this.node.collapsed
  22924. }, enumerable: !0,
  22925. configurable: !0
  22926. }), Object.defineProperty(e.prototype, "visible", {
  22927. get: function () {
  22928. return this.node.visible
  22929. }, enumerable: !0, configurable: !0
  22930. }), Object.defineProperty(e.prototype, "filterData", {
  22931. get: function () {
  22932. return this.node.filterData
  22933. }, enumerable: !0, configurable: !0
  22934. }), e
  22935. }(), k = function () {
  22936. function e(e, t, n, i) {
  22937. this.renderer = e, this.nodeMapper = t, this.compressibleNodeMapperProvider = n, this.onDidChangeTwistieState = i, this.renderedNodes = new Map, this.disposables = [], this.templateId = e.templateId
  22938. }
  22939. return e.prototype.renderTemplate = function (e) {
  22940. return {templateData: this.renderer.renderTemplate(e)}
  22941. }, e.prototype.renderElement = function (e, t, n, i) {
  22942. this.renderer.renderElement(this.nodeMapper.map(e), t, n.templateData, i)
  22943. }, e.prototype.renderCompressedElements = function (e, t, n, i) {
  22944. this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e), t, n.templateData, i)
  22945. }, e.prototype.renderTwistie = function (e, t) {
  22946. return m.toggleClass(t, "codicon-loading", e.slow), !1
  22947. }, e.prototype.disposeElement = function (e, t, n, i) {
  22948. this.renderer.disposeElement && this.renderer.disposeElement(this.nodeMapper.map(e), t, n.templateData, i)
  22949. }, e.prototype.disposeCompressedElements = function (e, t, n, i) {
  22950. this.renderer.disposeCompressedElements && this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e), t, n.templateData, i)
  22951. }, e.prototype.disposeTemplate = function (e) {
  22952. this.renderer.disposeTemplate(e.templateData)
  22953. }, e.prototype.dispose = function () {
  22954. this.renderedNodes.clear(), this.disposables = s.dispose(this.disposables)
  22955. }, e
  22956. }();
  22957. var T = function (e) {
  22958. function t(t, n, i, r, s, a, l) {
  22959. void 0 === l && (l = {});
  22960. var u = e.call(this, t, n, i, s, a, l) || this;
  22961. return u.compressionDelegate = r, u.compressibleNodeMapper = new o.WeakMapper((function (e) {
  22962. return new M(e)
  22963. })), u.filter = l.filter, u
  22964. }
  22965. return r(t, e), t.prototype.createTree = function (e, t, o, r, s) {
  22966. var a = this, u = new n.ComposedTreeDelegate(o), d = r.map((function (e) {
  22967. return new k(e, a.nodeMapper, (function () {
  22968. return a.compressibleNodeMapper
  22969. }), a._onDidChangeNodeSlowState.event)
  22970. })), c = function (e) {
  22971. var t = e && N(e);
  22972. return t && l(l({}, t), {
  22973. keyboardNavigationLabelProvider: t.keyboardNavigationLabelProvider && l(l({}, t.keyboardNavigationLabelProvider), {
  22974. getCompressedNodeKeyboardNavigationLabel: function (t) {
  22975. return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((function (e) {
  22976. return e.element
  22977. })))
  22978. }
  22979. })
  22980. })
  22981. }(s) || {};
  22982. return new i.CompressibleObjectTree(e, t, u, d, c)
  22983. }, t.prototype.asTreeElement = function (t, n) {
  22984. return l({incompressible: this.compressionDelegate.isIncompressible(t.element)}, e.prototype.asTreeElement.call(this, t, n))
  22985. }, t.prototype.updateOptions = function (e) {
  22986. void 0 === e && (e = {}), this.tree.updateOptions(e)
  22987. }, t.prototype.render = function (t, n) {
  22988. var i = this;
  22989. if (!this.identityProvider) return e.prototype.render.call(this, t, n);
  22990. var o = function (e) {
  22991. return i.identityProvider.getId(e).toString()
  22992. }, r = function (e) {
  22993. for (var t = new Set, n = 0, r = e; n < r.length; n++) {
  22994. var s = r[n], a = i.tree.getCompressedTreeNode(s === i.root ? null : s);
  22995. if (a.element) for (var l = 0, u = a.element.elements; l < u.length; l++) {
  22996. var d = u[l];
  22997. t.add(o(d.element))
  22998. }
  22999. }
  23000. return t
  23001. }, s = r(this.tree.getSelection()), a = r(this.tree.getFocus());
  23002. e.prototype.render.call(this, t, n);
  23003. var l = this.getSelection(), u = !1, d = this.getFocus(), c = !1, h = function (e) {
  23004. var t = e.element;
  23005. if (t) for (var n = 0; n < t.elements.length; n++) {
  23006. var i = o(t.elements[n].element), r = t.elements[t.elements.length - 1].element;
  23007. s.has(i) && -1 === l.indexOf(r) && (l.push(r), u = !0), a.has(i) && -1 === d.indexOf(r) && (d.push(r), c = !0)
  23008. }
  23009. e.children.forEach(h)
  23010. };
  23011. h(this.tree.getCompressedTreeNode(t === this.root ? null : t)), u && this.setSelection(l), c && this.setFocus(d)
  23012. }, t.prototype.processChildren = function (t) {
  23013. var n = this;
  23014. return this.filter && (t = t.filter((function (e) {
  23015. var t, i = n.filter.filter(e, 1),
  23016. o = "boolean" == typeof (t = i) ? t ? 1 : 0 : _.isFilterResult(t) ? _.getVisibleState(t.visibility) : _.getVisibleState(t);
  23017. if (2 === o) throw new Error("Recursive tree visibility not supported in async data compressed trees");
  23018. return 1 === o
  23019. }))), e.prototype.processChildren.call(this, t)
  23020. }, t
  23021. }(I);
  23022. t.CompressibleAsyncDataTree = T
  23023. })), define(n[409], i([7, 8]), (function (e, t) {
  23024. return e.create("vs/base/common/keybindingLabels", t)
  23025. })), define(n[207], i([0, 1, 409]), (function (e, t, n) {
  23026. "use strict";
  23027. Object.defineProperty(t, "__esModule", {value: !0});
  23028. var i = function () {
  23029. function e(e, t, n) {
  23030. void 0 === n && (n = t), this.modifierLabels = [null], this.modifierLabels[2] = e, this.modifierLabels[1] = t, this.modifierLabels[3] = n
  23031. }
  23032. return e.prototype.toLabel = function (e, t, n) {
  23033. if (0 === t.length) return null;
  23034. for (var i = [], r = 0, s = t.length; r < s; r++) {
  23035. var a = t[r], l = n(a);
  23036. if (null === l) return null;
  23037. i[r] = o(a, l, this.modifierLabels[e])
  23038. }
  23039. return i.join(" ")
  23040. }, e
  23041. }();
  23042. function o(e, t, n) {
  23043. if (null === t) return "";
  23044. var i = [];
  23045. return e.ctrlKey && i.push(n.ctrlKey), e.shiftKey && i.push(n.shiftKey), e.altKey && i.push(n.altKey), e.metaKey && i.push(n.metaKey), i.push(t), i.join(n.separator)
  23046. }
  23047. t.ModifierLabelProvider = i, t.UILabelProvider = new i({
  23048. ctrlKey: "⌃",
  23049. shiftKey: "⇧",
  23050. altKey: "⌥",
  23051. metaKey: "⌘",
  23052. separator: ""
  23053. }, {
  23054. ctrlKey: n.localize(0, null),
  23055. shiftKey: n.localize(1, null),
  23056. altKey: n.localize(2, null),
  23057. metaKey: n.localize(3, null),
  23058. separator: "+"
  23059. }, {
  23060. ctrlKey: n.localize(4, null),
  23061. shiftKey: n.localize(5, null),
  23062. altKey: n.localize(6, null),
  23063. metaKey: n.localize(7, null),
  23064. separator: "+"
  23065. }), t.AriaLabelProvider = new i({
  23066. ctrlKey: n.localize(8, null),
  23067. shiftKey: n.localize(9, null),
  23068. altKey: n.localize(10, null),
  23069. metaKey: n.localize(11, null),
  23070. separator: "+"
  23071. }, {
  23072. ctrlKey: n.localize(12, null),
  23073. shiftKey: n.localize(13, null),
  23074. altKey: n.localize(14, null),
  23075. metaKey: n.localize(15, null),
  23076. separator: "+"
  23077. }, {
  23078. ctrlKey: n.localize(16, null),
  23079. shiftKey: n.localize(17, null),
  23080. altKey: n.localize(18, null),
  23081. metaKey: n.localize(19, null),
  23082. separator: "+"
  23083. })
  23084. })), define(n[410], i([0, 1, 31, 207, 6, 402, 270]), (function (e, t, n, i, o, r) {
  23085. "use strict";
  23086. Object.defineProperty(t, "__esModule", {value: !0});
  23087. var s = o.$, a = function () {
  23088. function e(e, t, n) {
  23089. this.os = t, this.options = n, this.domNode = o.append(e, s(".monaco-keybinding")), this.didEverRender = !1, e.appendChild(this.domNode)
  23090. }
  23091. return e.prototype.set = function (t, n) {
  23092. this.didEverRender && this.keybinding === t && e.areSame(this.matches, n) || (this.keybinding = t, this.matches = n, this.render())
  23093. }, e.prototype.render = function () {
  23094. if (o.clearNode(this.domNode), this.keybinding) {
  23095. var e = this.keybinding.getParts(), t = e[0], n = e[1]
  23096. ;t && this.renderPart(this.domNode, t, this.matches ? this.matches.firstPart : null), n && (o.append(this.domNode, s("span.monaco-keybinding-key-chord-separator", void 0, " ")), this.renderPart(this.domNode, n, this.matches ? this.matches.chordPart : null)), this.domNode.title = this.keybinding.getAriaLabel() || ""
  23097. } else this.options && this.options.renderUnboundKeybindings && this.renderUnbound(this.domNode);
  23098. this.didEverRender = !0
  23099. }, e.prototype.renderPart = function (e, t, n) {
  23100. var o = i.UILabelProvider.modifierLabels[this.os];
  23101. t.ctrlKey && this.renderKey(e, o.ctrlKey, Boolean(null == n ? void 0 : n.ctrlKey), o.separator), t.shiftKey && this.renderKey(e, o.shiftKey, Boolean(null == n ? void 0 : n.shiftKey), o.separator), t.altKey && this.renderKey(e, o.altKey, Boolean(null == n ? void 0 : n.altKey), o.separator), t.metaKey && this.renderKey(e, o.metaKey, Boolean(null == n ? void 0 : n.metaKey), o.separator);
  23102. var r = t.keyLabel;
  23103. r && this.renderKey(e, r, Boolean(null == n ? void 0 : n.keyCode), "")
  23104. }, e.prototype.renderKey = function (e, t, n, i) {
  23105. o.append(e, s("span.monaco-keybinding-key" + (n ? ".highlight" : ""), void 0, t)),
  23106. i && o.append(e, s("span.monaco-keybinding-key-separator", void 0, i))
  23107. }, e.prototype.renderUnbound = function (e) {
  23108. o.append(e, s("span.monaco-keybinding-key", void 0, r.localize(0, null)))
  23109. }, e.areSame = function (e, t) {
  23110. return e === t || !e && !t || !!e && !!t && n.equals(e.firstPart, t.firstPart) && n.equals(e.chordPart, t.chordPart)
  23111. }, e
  23112. }();
  23113. t.KeybindingLabel = a
  23114. })), define(n[411], i([7, 8]), (function (e, t) {
  23115. return e.create("vs/base/common/severity", t)
  23116. })), define(n[112], i([0, 1, 411, 5]), (function (e, t, n, i) {
  23117. "use strict";
  23118. var o;
  23119. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  23120. e[e.Ignore = 0] = "Ignore", e[e.Info = 1] = "Info", e[e.Warning = 2] = "Warning", e[e.Error = 3] = "Error"
  23121. }(o || (o = {})), function (e) {
  23122. var t = "error", o = "warning", r = "warn", s = "info", a = Object.create(null);
  23123. a[e.Error] = n.localize(0, null), a[e.Warning] = n.localize(1, null), a[e.Info] = n.localize(2, null), e.fromValue = function (n) {
  23124. return n ? i.equalsIgnoreCase(t, n) ? e.Error : i.equalsIgnoreCase(o, n) || i.equalsIgnoreCase(r, n) ? e.Warning : i.equalsIgnoreCase(s, n) ? e.Info : e.Ignore : e.Ignore
  23125. }
  23126. }(o || (o = {})), t.default = o
  23127. })),
  23128. define(n[412], i([7, 8]), (function (e, t) {
  23129. return e.create("vs/base/parts/quickopen/browser/quickOpenModel", t)
  23130. })), define(n[155], i([0, 1, 412, 21, 139, 70, 133, 6, 410, 16, 19]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  23131. "use strict";
  23132. Object.defineProperty(t, "__esModule", {value: !0});
  23133. var h = 0, p = function () {
  23134. function e(e) {
  23135. void 0 === e && (e = []), this.id = (h++).toString(), this.labelHighlights = e, this.descriptionHighlights = []
  23136. }
  23137. return e.prototype.getId = function () {
  23138. return this.id
  23139. }, e.prototype.getLabel = function () {
  23140. }, e.prototype.getLabelOptions = function () {
  23141. }, e.prototype.getAriaLabel = function () {
  23142. return c.coalesce([this.getLabel(), this.getDescription(), this.getDetail()]).join(", ")
  23143. }, e.prototype.getDetail = function () {
  23144. }, e.prototype.getIcon = function () {
  23145. }, e.prototype.getDescription = function () {
  23146. }, e.prototype.getTooltip = function () {
  23147. }, e.prototype.getDescriptionTooltip = function () {
  23148. }, e.prototype.getKeybinding = function () {
  23149. }, e.prototype.isHidden = function () {
  23150. return !!this.hidden
  23151. }, e.prototype.setHighlights = function (e, t, n) {
  23152. this.labelHighlights = e, this.descriptionHighlights = t,
  23153. this.detailHighlights = n
  23154. }, e.prototype.getHighlights = function () {
  23155. return [this.labelHighlights, this.descriptionHighlights, this.detailHighlights]
  23156. }, e.prototype.run = function (e, t) {
  23157. return !1
  23158. }, e
  23159. }();
  23160. t.QuickOpenEntry = p;
  23161. var g = function (e) {
  23162. function t(t, n, i) {
  23163. var o = e.call(this) || this;
  23164. return o.entry = t, o.groupLabel = n, o.withBorder = i, o
  23165. }
  23166. return r(t, e), t.prototype.getGroupLabel = function () {
  23167. return this.groupLabel
  23168. }, t.prototype.setGroupLabel = function (e) {
  23169. this.groupLabel = e
  23170. }, t.prototype.showBorder = function () {
  23171. return !!this.withBorder
  23172. }, t.prototype.setShowBorder = function (e) {
  23173. this.withBorder = e
  23174. }, t.prototype.getLabel = function () {
  23175. return this.entry ? this.entry.getLabel() : e.prototype.getLabel.call(this)
  23176. }, t.prototype.getLabelOptions = function () {
  23177. return this.entry ? this.entry.getLabelOptions() : e.prototype.getLabelOptions.call(this)
  23178. }, t.prototype.getAriaLabel = function () {
  23179. return this.entry ? this.entry.getAriaLabel() : e.prototype.getAriaLabel.call(this)
  23180. }, t.prototype.getDetail = function () {
  23181. return this.entry ? this.entry.getDetail() : e.prototype.getDetail.call(this)
  23182. },
  23183. t.prototype.getIcon = function () {
  23184. return this.entry ? this.entry.getIcon() : e.prototype.getIcon.call(this)
  23185. }, t.prototype.getDescription = function () {
  23186. return this.entry ? this.entry.getDescription() : e.prototype.getDescription.call(this)
  23187. }, t.prototype.getHighlights = function () {
  23188. return this.entry ? this.entry.getHighlights() : e.prototype.getHighlights.call(this)
  23189. }, t.prototype.isHidden = function () {
  23190. return this.entry ? this.entry.isHidden() : e.prototype.isHidden.call(this)
  23191. }, t.prototype.setHighlights = function (t, n, i) {
  23192. this.entry ? this.entry.setHighlights(t, n, i) : e.prototype.setHighlights.call(this, t, n, i)
  23193. }, t.prototype.run = function (t, n) {
  23194. return this.entry ? this.entry.run(t, n) : e.prototype.run.call(this, t, n)
  23195. }, t
  23196. }(p);
  23197. t.QuickOpenEntryGroup = g;
  23198. var f = function () {
  23199. function e() {
  23200. }
  23201. return e.prototype.hasActions = function (e, t) {
  23202. return !1
  23203. }, e.prototype.getActions = function (e, t) {
  23204. return null
  23205. }, e
  23206. }(), m = function () {
  23207. function e(e, t) {
  23208. void 0 === e && (e = new f), this.actionProvider = e, this.actionRunner = t
  23209. }
  23210. return e.prototype.getHeight = function (e) {
  23211. return e.getDetail() ? 44 : 22
  23212. },
  23213. e.prototype.getTemplateId = function (e) {
  23214. return e instanceof g ? "quickOpenEntryGroup" : "quickOpenEntry"
  23215. }, e.prototype.renderTemplate = function (e, t, n) {
  23216. var i = document.createElement("div");
  23217. l.addClass(i, "sub-content"), t.appendChild(i);
  23218. var r = l.$(".quick-open-row"), c = l.$(".quick-open-row"), h = l.$(".quick-open-entry", void 0, r, c);
  23219. i.appendChild(h);
  23220. var p = document.createElement("span");
  23221. r.appendChild(p);
  23222. var g = new o.IconLabel(r, {
  23223. supportHighlights: !0,
  23224. supportDescriptionHighlights: !0,
  23225. supportCodicons: !0
  23226. }), f = document.createElement("span");
  23227. r.appendChild(f), l.addClass(f, "quick-open-entry-keybinding");
  23228. var m = new u.KeybindingLabel(f, d.OS), v = document.createElement("div");
  23229. c.appendChild(v), l.addClass(v, "quick-open-entry-meta");
  23230. var _, y = new a.HighlightedLabel(v, !0);
  23231. "quickOpenEntryGroup" === e && (_ = document.createElement("div"), l.addClass(_, "results-group"), t.appendChild(_)), l.addClass(t, "actions");
  23232. var C = document.createElement("div");
  23233. return l.addClass(C, "primary-action-bar"), t.appendChild(C), {
  23234. container: t, entry: h, icon: p, label: g, detail: y,
  23235. keybinding: m, group: _, actionBar: new s.ActionBar(C, {actionRunner: this.actionRunner})
  23236. }
  23237. }, e.prototype.renderElement = function (e, t, n, i) {
  23238. this.actionProvider.hasActions(null, e) ? l.addClass(n.container, "has-actions") : l.removeClass(n.container, "has-actions"), n.actionBar.context = e;
  23239. var o = this.actionProvider.getActions(null, e);
  23240. if (n.actionBar.isEmpty() && o && o.length > 0 ? n.actionBar.push(o, {
  23241. icon: !0,
  23242. label: !1
  23243. }) : n.actionBar.isEmpty() || o && 0 !== o.length || n.actionBar.clear(), e instanceof g && e.getGroupLabel() ? l.addClass(n.container, "has-group-label") : l.removeClass(n.container, "has-group-label"), e instanceof g) {
  23244. var r = e, s = n;
  23245. r.showBorder() ? (l.addClass(s.container, "results-group-separator"), i.pickerGroupBorder && (s.container.style.borderTopColor = i.pickerGroupBorder.toString())) : (l.removeClass(s.container, "results-group-separator"), s.container.style.borderTopColor = "");
  23246. var a = r.getGroupLabel() || "";
  23247. s.group && (s.group.textContent = a, i.pickerGroupForeground && (s.group.style.color = i.pickerGroupForeground.toString()))
  23248. }
  23249. if (e instanceof p) {
  23250. var u = e.getHighlights(), d = u[0], c = u[1], h = u[2],
  23251. f = e.getIcon() ? "quick-open-entry-icon " + e.getIcon() : "";
  23252. n.icon.className = f;
  23253. var m = e.getLabelOptions() || Object.create(null);
  23254. m.matches = d || [], m.title = e.getTooltip(), m.descriptionTitle = e.getDescriptionTooltip() || e.getDescription(), m.descriptionMatches = c || [], n.label.setLabel(e.getLabel() || "", e.getDescription(), m), n.detail.set(e.getDetail(), h), n.keybinding.set(e.getKeybinding())
  23255. }
  23256. }, e.prototype.disposeTemplate = function (e, t) {
  23257. t.actionBar.dispose(), t.actionBar = null, t.container = null, t.entry = null, t.keybinding = null, t.detail = null, t.group = null, t.icon = null, t.label.dispose(), t.label = null
  23258. }, e
  23259. }(), v = function () {
  23260. function e(e, t) {
  23261. void 0 === e && (e = []), void 0 === t && (t = new f), this._entries = e, this._dataSource = this, this._renderer = new m(t), this._filter = this, this._runner = this, this._accessibilityProvider = this
  23262. }
  23263. return Object.defineProperty(e.prototype, "entries", {
  23264. get: function () {
  23265. return this._entries
  23266. }, set: function (e) {
  23267. this._entries = e
  23268. }, enumerable: !0, configurable: !0
  23269. }),
  23270. Object.defineProperty(e.prototype, "dataSource", {
  23271. get: function () {
  23272. return this._dataSource
  23273. }, enumerable: !0, configurable: !0
  23274. }), Object.defineProperty(e.prototype, "renderer", {
  23275. get: function () {
  23276. return this._renderer
  23277. }, enumerable: !0, configurable: !0
  23278. }), Object.defineProperty(e.prototype, "filter", {
  23279. get: function () {
  23280. return this._filter
  23281. }, enumerable: !0, configurable: !0
  23282. }), Object.defineProperty(e.prototype, "runner", {
  23283. get: function () {
  23284. return this._runner
  23285. }, enumerable: !0, configurable: !0
  23286. }), Object.defineProperty(e.prototype, "accessibilityProvider", {
  23287. get: function () {
  23288. return this._accessibilityProvider
  23289. }, enumerable: !0, configurable: !0
  23290. }), e.prototype.getId = function (e) {
  23291. return e.getId()
  23292. }, e.prototype.getLabel = function (e) {
  23293. return i.withUndefinedAsNull(e.getLabel())
  23294. }, e.prototype.getAriaLabel = function (e) {
  23295. return e.getAriaLabel() ? n.localize(0, null, e.getAriaLabel()) : n.localize(1, null)
  23296. }, e.prototype.isVisible = function (e) {
  23297. return !e.isHidden()
  23298. }, e.prototype.run = function (e, t, n) {
  23299. return e.run(t, n)
  23300. }, e
  23301. }();
  23302. t.QuickOpenModel = v
  23303. })), define(n[413], i([7, 8]), (function (e, t) {
  23304. return e.create("vs/base/parts/quickopen/browser/quickOpenWidget", t)
  23305. })), define(n[414], i([0, 1, 413, 16, 21, 253, 152, 283, 274, 56, 137, 6, 2, 27, 31, 45, 281]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m) {
  23306. "use strict";
  23307. Object.defineProperty(t, "__esModule", {value: !0});
  23308. var v = function (e) {
  23309. function t() {
  23310. return null !== e && e.apply(this, arguments) || this
  23311. }
  23312. return r(t, e), t.prototype.onContextMenu = function (t, n, o) {
  23313. return i.isMacintosh ? this.onLeftClick(t, n, o) : e.prototype.onContextMenu.call(this, t, n, o)
  23314. }, t
  23315. }(c.DefaultController);
  23316. t.QuickOpenController = v;
  23317. var _ = {
  23318. background: g.Color.fromHex("#1E1E1E"),
  23319. foreground: g.Color.fromHex("#CCCCCC"),
  23320. pickerGroupForeground: g.Color.fromHex("#0097FB"),
  23321. pickerGroupBorder: g.Color.fromHex("#3F3F46"),
  23322. widgetShadow: g.Color.fromHex("#000000"),
  23323. progressBarBackground: g.Color.fromHex("#0E70C0")
  23324. }, y = n.localize(0, null), C = function (e) {
  23325. function t(t, n, i) {
  23326. var o = e.call(this) || this;
  23327. return o.isDisposed = !1, o.container = t, o.callbacks = n, o.options = i, o.styles = i || Object.create(null), f.mixin(o.styles, _, !1), o.model = null, o
  23328. }
  23329. return r(t, e),
  23330. t.prototype.getModel = function () {
  23331. return this.model
  23332. }, t.prototype.create = function () {
  23333. var e = this;
  23334. this.element = document.createElement("div"), h.addClass(this.element, "monaco-quick-open-widget"), this.container.appendChild(this.element), this._register(h.addDisposableListener(this.element, h.EventType.CONTEXT_MENU, (function (e) {
  23335. return h.EventHelper.stop(e, !0)
  23336. }))), this._register(h.addDisposableListener(this.element, h.EventType.FOCUS, (function (t) {
  23337. return e.gainingFocus()
  23338. }), !0)), this._register(h.addDisposableListener(this.element, h.EventType.BLUR, (function (t) {
  23339. return e.loosingFocus(t)
  23340. }), !0)), this._register(h.addDisposableListener(this.element, h.EventType.KEY_DOWN, (function (t) {
  23341. var n = new d.StandardKeyboardEvent(t);
  23342. if (9 === n.keyCode) h.EventHelper.stop(t, !0), e.hide(2); else if (2 === n.keyCode && !n.altKey && !n.ctrlKey && !n.metaKey) {
  23343. var i = t.currentTarget.querySelectorAll("input, .monaco-tree, .monaco-tree-row.focused .action-label.icon");
  23344. n.shiftKey && n.target === i[0] ? (h.EventHelper.stop(t, !0),
  23345. i[i.length - 1].focus()) : n.shiftKey || n.target !== i[i.length - 1] || (h.EventHelper.stop(t, !0), i[0].focus())
  23346. }
  23347. }))), this.progressBar = this._register(new u.ProgressBar(this.element, {progressBarBackground: this.styles.progressBarBackground})), this.progressBar.hide(), this.inputContainer = document.createElement("div"), h.addClass(this.inputContainer, "quick-open-input"), this.element.appendChild(this.inputContainer), this.inputBox = this._register(new a.InputBox(this.inputContainer, void 0, {
  23348. placeholder: this.options.inputPlaceHolder || "",
  23349. ariaLabel: y,
  23350. inputBackground: this.styles.inputBackground,
  23351. inputForeground: this.styles.inputForeground,
  23352. inputBorder: this.styles.inputBorder,
  23353. inputValidationInfoBackground: this.styles.inputValidationInfoBackground,
  23354. inputValidationInfoForeground: this.styles.inputValidationInfoForeground,
  23355. inputValidationInfoBorder: this.styles.inputValidationInfoBorder,
  23356. inputValidationWarningBackground: this.styles.inputValidationWarningBackground,
  23357. inputValidationWarningForeground: this.styles.inputValidationWarningForeground,
  23358. inputValidationWarningBorder: this.styles.inputValidationWarningBorder,
  23359. inputValidationErrorBackground: this.styles.inputValidationErrorBackground,
  23360. inputValidationErrorForeground: this.styles.inputValidationErrorForeground,
  23361. inputValidationErrorBorder: this.styles.inputValidationErrorBorder
  23362. })), this.inputElement = this.inputBox.inputElement, this.inputElement.setAttribute("role", "combobox"), this.inputElement.setAttribute("aria-haspopup", "false"), this.inputElement.setAttribute("aria-autocomplete", "list"), this._register(h.addDisposableListener(this.inputBox.inputElement, h.EventType.INPUT, (function (t) {
  23363. return e.onType()
  23364. }))), this._register(h.addDisposableListener(this.inputBox.inputElement, h.EventType.KEY_DOWN, (function (t) {
  23365. var n = new d.StandardKeyboardEvent(t), i = e.shouldOpenInBackground(n);
  23366. if (2 !== n.keyCode) if (18 === n.keyCode || 16 === n.keyCode || 12 === n.keyCode || 11 === n.keyCode) h.EventHelper.stop(t, !0), e.navigateInTree(n.keyCode, n.shiftKey),
  23367. e.inputBox.inputElement.selectionStart === e.inputBox.inputElement.selectionEnd && (e.inputBox.inputElement.selectionStart = e.inputBox.value.length); else if (3 === n.keyCode || i) {
  23368. h.EventHelper.stop(t, !0);
  23369. var o = e.tree.getFocus();
  23370. o && e.elementSelected(o, t, i ? 2 : 1)
  23371. }
  23372. }))), this.resultCount = document.createElement("div"), h.addClass(this.resultCount, "quick-open-result-count"), this.resultCount.setAttribute("aria-live", "polite"), this.resultCount.setAttribute("aria-atomic", "true"), this.element.appendChild(this.resultCount), this.treeContainer = document.createElement("div"), h.addClass(this.treeContainer, "quick-open-tree"), this.element.appendChild(this.treeContainer);
  23373. var t = this.options.treeCreator || function (e, t, n) {
  23374. return new l.Tree(e, t, n)
  23375. };
  23376. return this.tree = this._register(t(this.treeContainer, {
  23377. dataSource: new s.DataSource(this),
  23378. controller: new v({clickBehavior: 1, keyboardSupport: this.options.keyboardSupport}),
  23379. renderer: this.renderer = new s.Renderer(this, this.styles),
  23380. filter: new s.Filter(this),
  23381. accessibilityProvider: new s.AccessibilityProvider(this)
  23382. }, {
  23383. twistiePixels: 11,
  23384. indentPixels: 0,
  23385. alwaysFocused: !0,
  23386. verticalScrollMode: 3,
  23387. horizontalScrollMode: 2,
  23388. ariaLabel: n.localize(1, null),
  23389. keyboardSupport: this.options.keyboardSupport,
  23390. preventRootFocus: !1
  23391. })), this.treeElement = this.tree.getHTMLElement(), this._register(this.tree.onDidChangeFocus((function (t) {
  23392. e.elementFocused(t.focus, t)
  23393. }))), this._register(this.tree.onDidChangeSelection((function (t) {
  23394. if (t.selection && t.selection.length > 0) {
  23395. var n = t.payload && t.payload.originalEvent instanceof m.StandardMouseEvent ? t.payload.originalEvent : void 0,
  23396. i = !!n && e.shouldOpenInBackground(n);
  23397. e.elementSelected(t.selection[0], t, i ? 2 : 1)
  23398. }
  23399. }))), this._register(h.addDisposableListener(this.treeContainer, h.EventType.KEY_DOWN, (function (t) {
  23400. var n = new d.StandardKeyboardEvent(t);
  23401. if (e.quickNavigateConfiguration) if (18 === n.keyCode || 16 === n.keyCode || 12 === n.keyCode || 11 === n.keyCode) h.EventHelper.stop(t, !0), e.navigateInTree(n.keyCode); else if (3 === n.keyCode) {
  23402. h.EventHelper.stop(t, !0);
  23403. var i = e.tree.getFocus()
  23404. ;i && e.elementSelected(i, t)
  23405. }
  23406. }))), this._register(h.addDisposableListener(this.treeContainer, h.EventType.KEY_UP, (function (t) {
  23407. var n = new d.StandardKeyboardEvent(t), i = n.keyCode;
  23408. if (e.quickNavigateConfiguration && e.quickNavigateConfiguration.keybindings.some((function (e) {
  23409. var t = e.getParts(), o = t[0];
  23410. return !t[1] && (o.shiftKey && 4 === i ? !(n.ctrlKey || n.altKey || n.metaKey) : !(!o.altKey || 6 !== i) || (!(!o.ctrlKey || 5 !== i) || !(!o.metaKey || 57 !== i)))
  23411. }))) {
  23412. var o = e.tree.getFocus();
  23413. o && e.elementSelected(o, t)
  23414. }
  23415. }))), this.layoutDimensions && this.layout(this.layoutDimensions), this.applyStyles(), this._register(h.addDisposableListener(this.treeContainer, h.EventType.KEY_DOWN, (function (t) {
  23416. var n = new d.StandardKeyboardEvent(t);
  23417. e.quickNavigateConfiguration || 18 !== n.keyCode && 16 !== n.keyCode && 12 !== n.keyCode && 11 !== n.keyCode || (h.EventHelper.stop(t, !0), e.navigateInTree(n.keyCode, n.shiftKey), e.treeElement.focus())
  23418. }))), this.element
  23419. }, t.prototype.style = function (e) {
  23420. this.styles = e, this.applyStyles()
  23421. }, t.prototype.applyStyles = function () {
  23422. if (this.element) {
  23423. var e = this.styles.foreground ? this.styles.foreground.toString() : "",
  23424. t = this.styles.background ? this.styles.background.toString() : "",
  23425. n = this.styles.borderColor ? this.styles.borderColor.toString() : "",
  23426. i = this.styles.widgetShadow ? this.styles.widgetShadow.toString() : "";
  23427. this.element.style.color = e, this.element.style.backgroundColor = t, this.element.style.borderColor = n, this.element.style.borderWidth = n ? "1px" : "", this.element.style.borderStyle = n ? "solid" : "", this.element.style.boxShadow = i ? "0 5px 8px " + i : ""
  23428. }
  23429. this.progressBar && this.progressBar.style({progressBarBackground: this.styles.progressBarBackground}), this.inputBox && this.inputBox.style({
  23430. inputBackground: this.styles.inputBackground,
  23431. inputForeground: this.styles.inputForeground,
  23432. inputBorder: this.styles.inputBorder,
  23433. inputValidationInfoBackground: this.styles.inputValidationInfoBackground,
  23434. inputValidationInfoForeground: this.styles.inputValidationInfoForeground,
  23435. inputValidationInfoBorder: this.styles.inputValidationInfoBorder,
  23436. inputValidationWarningBackground: this.styles.inputValidationWarningBackground,
  23437. inputValidationWarningForeground: this.styles.inputValidationWarningForeground,
  23438. inputValidationWarningBorder: this.styles.inputValidationWarningBorder,
  23439. inputValidationErrorBackground: this.styles.inputValidationErrorBackground,
  23440. inputValidationErrorForeground: this.styles.inputValidationErrorForeground,
  23441. inputValidationErrorBorder: this.styles.inputValidationErrorBorder
  23442. }), this.tree && !this.options.treeCreator && this.tree.style(this.styles), this.renderer && this.renderer.updateStyles(this.styles)
  23443. }, t.prototype.shouldOpenInBackground = function (e) {
  23444. if (e instanceof d.StandardKeyboardEvent) {
  23445. if (17 !== e.keyCode) return !1;
  23446. if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return !1;
  23447. var t = this.inputBox.inputElement;
  23448. return t.selectionEnd === this.inputBox.value.length && t.selectionStart === t.selectionEnd
  23449. }
  23450. return e.middleButton
  23451. }, t.prototype.onType = function () {
  23452. var e = this.inputBox.value;
  23453. this.helpText && (e ? h.hide(this.helpText) : h.show(this.helpText)), this.callbacks.onType(e)
  23454. },
  23455. t.prototype.navigateInTree = function (e, t) {
  23456. var n = this.tree.getInput(), i = n ? n.entries : [], o = this.tree.getFocus();
  23457. switch (e) {
  23458. case 18:
  23459. this.tree.focusNext();
  23460. break;
  23461. case 16:
  23462. this.tree.focusPrevious();
  23463. break;
  23464. case 12:
  23465. this.tree.focusNextPage();
  23466. break;
  23467. case 11:
  23468. this.tree.focusPreviousPage();
  23469. break;
  23470. case 2:
  23471. t ? this.tree.focusPrevious() : this.tree.focusNext()
  23472. }
  23473. var r = this.tree.getFocus();
  23474. i.length > 1 && o === r && (16 === e || 2 === e && t ? this.tree.focusLast() : (18 === e || 2 === e && !t) && this.tree.focusFirst()), (r = this.tree.getFocus()) && this.tree.reveal(r)
  23475. }, t.prototype.elementFocused = function (e, t) {
  23476. if (e && this.isVisible()) {
  23477. var n = this.treeElement.getAttribute("aria-activedescendant");
  23478. n ? this.inputElement.setAttribute("aria-activedescendant", n) : this.inputElement.removeAttribute("aria-activedescendant");
  23479. var i = {
  23480. event: t,
  23481. keymods: this.extractKeyMods(t),
  23482. quickNavigateConfiguration: this.quickNavigateConfiguration
  23483. };
  23484. this.model.runner.run(e, 0, i)
  23485. }
  23486. }, t.prototype.elementSelected = function (e, t, n) {
  23487. var i = !0;
  23488. if (this.isVisible()) {
  23489. var o = n || 1, r = {
  23490. event: t, keymods: this.extractKeyMods(t),
  23491. quickNavigateConfiguration: this.quickNavigateConfiguration
  23492. };
  23493. i = this.model.runner.run(e, o, r)
  23494. }
  23495. i && this.hide(0)
  23496. }, t.prototype.extractKeyMods = function (e) {
  23497. return {
  23498. ctrlCmd: e && (e.ctrlKey || e.metaKey || e.payload && e.payload.originalEvent && (e.payload.originalEvent.ctrlKey || e.payload.originalEvent.metaKey)),
  23499. alt: e && (e.altKey || e.payload && e.payload.originalEvent && e.payload.originalEvent.altKey)
  23500. }
  23501. }, t.prototype.show = function (e, t) {
  23502. this.visible = !0, this.isLoosingFocus = !1, this.quickNavigateConfiguration = t ? t.quickNavigateConfiguration : void 0, this.quickNavigateConfiguration ? (h.hide(this.inputContainer), h.show(this.element), this.tree.domFocus()) : (h.show(this.inputContainer), h.show(this.element), this.inputBox.focus()), this.helpText && (this.quickNavigateConfiguration || o.isString(e) ? h.hide(this.helpText) : h.show(this.helpText)), o.isString(e) ? this.doShowWithPrefix(e) : (t && t.value && this.restoreLastInput(t.value), this.doShowWithInput(e, t && t.autoFocus ? t.autoFocus : {})),
  23503. t && t.inputSelection && !this.quickNavigateConfiguration && this.inputBox.select(t.inputSelection), this.callbacks.onShow && this.callbacks.onShow()
  23504. }, t.prototype.restoreLastInput = function (e) {
  23505. this.inputBox.value = e, this.inputBox.select(), this.callbacks.onType(e)
  23506. }, t.prototype.doShowWithPrefix = function (e) {
  23507. this.inputBox.value = e, this.callbacks.onType(e)
  23508. }, t.prototype.doShowWithInput = function (e, t) {
  23509. this.setInput(e, t)
  23510. }, t.prototype.setInputAndLayout = function (e, t) {
  23511. var n = this;
  23512. this.treeContainer.style.height = this.getHeight(e) + "px", this.tree.setInput(null).then((function () {
  23513. return n.model = e, n.inputElement.setAttribute("aria-haspopup", String(e && e.entries && e.entries.length > 0)), n.tree.setInput(e)
  23514. })).then((function () {
  23515. n.tree.layout();
  23516. var i = e ? e.entries.filter((function (t) {
  23517. return n.isElementVisible(e, t)
  23518. })) : [];
  23519. n.updateResultCount(i.length), i.length && n.autoFocus(e, i, t)
  23520. }))
  23521. }, t.prototype.isElementVisible = function (e, t) {
  23522. return !e.filter || e.filter.isVisible(t)
  23523. }, t.prototype.autoFocus = function (e, t, n) {
  23524. if (void 0 === n && (n = {}), n.autoFocusPrefixMatch) {
  23525. for (var i = void 0, o = void 0, r = n.autoFocusPrefixMatch, s = r.toLowerCase(), a = 0, l = t; a < l.length; a++) {
  23526. var u = l[a], d = e.dataSource.getLabel(u) || "";
  23527. if (i || 0 !== d.indexOf(r) ? o || 0 !== d.toLowerCase().indexOf(s) || (o = u) : i = u, i && o) break
  23528. }
  23529. var c = i || o;
  23530. if (c) return this.tree.setFocus(c), void this.tree.reveal(c, .5)
  23531. }
  23532. n.autoFocusFirstEntry ? (this.tree.focusFirst(), this.tree.reveal(this.tree.getFocus())) : "number" == typeof n.autoFocusIndex ? t.length > n.autoFocusIndex && (this.tree.focusNth(n.autoFocusIndex), this.tree.reveal(this.tree.getFocus())) : n.autoFocusSecondEntry ? t.length > 1 && this.tree.focusNth(1) : n.autoFocusLastEntry && t.length > 1 && (this.tree.focusLast(), this.tree.reveal(this.tree.getFocus()))
  23533. }, t.prototype.getHeight = function (e) {
  23534. var n = this, i = e.renderer;
  23535. if (!e) {
  23536. var o = i.getHeight(null);
  23537. return this.options.minItemsToShow ? this.options.minItemsToShow * o : 0
  23538. }
  23539. var r, s = 0;
  23540. this.layoutDimensions && this.layoutDimensions.height && (r = .4 * (this.layoutDimensions.height - 50)), (!r || r > t.MAX_ITEMS_HEIGHT) && (r = t.MAX_ITEMS_HEIGHT);
  23541. for (var a = e.entries.filter((function (t) {
  23542. return n.isElementVisible(e, t)
  23543. })), l = this.options.maxItemsToShow || a.length, u = 0; u < l && u < a.length; u++) {
  23544. var d = i.getHeight(a[u]);
  23545. if (!(s + d <= r)) break;
  23546. s += d
  23547. }
  23548. return s
  23549. }, t.prototype.updateResultCount = function (e) {
  23550. this.resultCount.textContent = n.localize(2, null, e)
  23551. }, t.prototype.hide = function (e) {
  23552. this.isVisible() && (this.visible = !1, h.hide(this.element), this.element.blur(), this.inputBox.value = "", this.tree.setInput(null), this.inputElement.setAttribute("aria-haspopup", "false"), this.treeContainer.style.height = (this.options.minItemsToShow ? 22 * this.options.minItemsToShow : 0) + "px", this.progressBar.stop().hide(), this.tree.isDOMFocused() ? this.tree.domBlur() : this.inputBox.hasFocus() && this.inputBox.blur(), 0 === e ? this.callbacks.onOk() : this.callbacks.onCancel(), this.callbacks.onHide && this.callbacks.onHide(e))
  23553. }, t.prototype.setInput = function (e, t, n) {
  23554. this.isVisible() && (this.getInput() && this.onInputChanging(), this.setInputAndLayout(e, t), this.inputBox && this.inputBox.setAriaLabel(n || y))
  23555. }, t.prototype.onInputChanging = function () {
  23556. var e = this
  23557. ;this.inputChangingTimeoutHandle && (clearTimeout(this.inputChangingTimeoutHandle), this.inputChangingTimeoutHandle = null), h.addClass(this.element, "content-changing"), this.inputChangingTimeoutHandle = setTimeout((function () {
  23558. h.removeClass(e.element, "content-changing")
  23559. }), 500)
  23560. }, t.prototype.getInput = function () {
  23561. return this.tree.getInput()
  23562. }, t.prototype.isVisible = function () {
  23563. return this.visible
  23564. }, t.prototype.layout = function (e) {
  23565. this.layoutDimensions = e;
  23566. var n = Math.min(.62 * this.layoutDimensions.width, t.MAX_WIDTH);
  23567. this.element && (this.element.style.width = n + "px", this.element.style.marginLeft = "-" + n / 2 + "px", this.inputContainer.style.width = n - 12 + "px")
  23568. }, t.prototype.gainingFocus = function () {
  23569. this.isLoosingFocus = !1
  23570. }, t.prototype.loosingFocus = function (e) {
  23571. var t = this;
  23572. if (this.isVisible()) {
  23573. var n = e.relatedTarget;
  23574. !this.quickNavigateConfiguration && h.isAncestor(n, this.element) || (this.isLoosingFocus = !0, setTimeout((function () {
  23575. t.isLoosingFocus && !t.isDisposed && (t.callbacks.onFocusLost && t.callbacks.onFocusLost() || t.hide(1))
  23576. }), 0))
  23577. }
  23578. },
  23579. t.prototype.dispose = function () {
  23580. e.prototype.dispose.call(this), this.isDisposed = !0
  23581. }, t.MAX_WIDTH = 600, t.MAX_ITEMS_HEIGHT = 440, t
  23582. }(p.Disposable);
  23583. t.QuickOpenWidget = C
  23584. })), define(n[415], i([7, 8]), (function (e, t) {
  23585. return e.create("vs/editor/browser/controller/coreCommands", t)
  23586. })), define(n[416], i([7, 8]), (function (e, t) {
  23587. return e.create("vs/editor/browser/controller/textAreaHandler", t)
  23588. })), define(n[417], i([7, 8]), (function (e, t) {
  23589. return e.create("vs/editor/browser/widget/codeEditorWidget", t)
  23590. })), define(n[418], i([7, 8]), (function (e, t) {
  23591. return e.create("vs/editor/browser/widget/diffEditorWidget", t)
  23592. })), define(n[419], i([7, 8]), (function (e, t) {
  23593. return e.create("vs/editor/browser/widget/diffReview", t)
  23594. })), define(n[420], i([7, 8]), (function (e, t) {
  23595. return e.create("vs/editor/browser/widget/inlineDiffMargin", t)
  23596. })), define(n[421], i([0, 1, 420, 6, 55, 2, 3]), (function (e, t, n, i, o, s, a) {
  23597. "use strict";
  23598. Object.defineProperty(t, "__esModule", {value: !0});
  23599. var l = function (e) {
  23600. function t(t, r, s, l, u, h) {
  23601. var p = e.call(this) || this;
  23602. p._viewZoneId = t, p._marginDomNode = r, p.editor = s,
  23603. p.diff = l, p._contextMenuService = u, p._clipboardService = h, p._visibility = !1, p._marginDomNode.style.zIndex = "10", p._diffActions = document.createElement("div"), p._diffActions.className = "codicon codicon-lightbulb lightbulb-glyph", p._diffActions.style.position = "absolute";
  23604. var g = s.getOption(49), f = s.getModel().getEOL();
  23605. p._diffActions.style.right = "0px", p._diffActions.style.visibility = "hidden", p._diffActions.style.height = g + "px", p._diffActions.style.lineHeight = g + "px", p._marginDomNode.appendChild(p._diffActions);
  23606. var m = [];
  23607. m.push(new o.Action("diff.clipboard.copyDeletedContent", l.originalEndLineNumber > l.modifiedStartLineNumber ? n.localize(0, null) : n.localize(1, null), void 0, !0, (function () {
  23608. return d(p, void 0, void 0, (function () {
  23609. return c(this, (function (e) {
  23610. switch (e.label) {
  23611. case 0:
  23612. return [4, this._clipboardService.writeText(l.originalContent.join(f) + f)];
  23613. case 1:
  23614. return e.sent(), [2]
  23615. }
  23616. }))
  23617. }))
  23618. })));
  23619. var v = 0, _ = void 0
  23620. ;l.originalEndLineNumber > l.modifiedStartLineNumber && (_ = new o.Action("diff.clipboard.copyDeletedLineContent", n.localize(2, null, l.originalStartLineNumber), void 0, !0, (function () {
  23621. return d(p, void 0, void 0, (function () {
  23622. return c(this, (function (e) {
  23623. switch (e.label) {
  23624. case 0:
  23625. return [4, this._clipboardService.writeText(l.originalContent[v])];
  23626. case 1:
  23627. return e.sent(), [2]
  23628. }
  23629. }))
  23630. }))
  23631. })), m.push(_)), s.getOption(68) || m.push(new o.Action("diff.inline.revertChange", n.localize(3, null), void 0, !0, (function () {
  23632. return d(p, void 0, void 0, (function () {
  23633. var e;
  23634. return c(this, (function (t) {
  23635. return 0 === l.modifiedEndLineNumber ? (e = s.getModel().getLineMaxColumn(l.modifiedStartLineNumber), s.executeEdits("diffEditor", [{
  23636. range: new a.Range(l.modifiedStartLineNumber, e, l.modifiedStartLineNumber, e),
  23637. text: f + l.originalContent.join(f)
  23638. }])) : (e = s.getModel().getLineMaxColumn(l.modifiedEndLineNumber), s.executeEdits("diffEditor", [{
  23639. range: new a.Range(l.modifiedStartLineNumber, 1, l.modifiedEndLineNumber, e),
  23640. text: l.originalContent.join(f)
  23641. }])), [2]
  23642. }))
  23643. }))
  23644. })));
  23645. var y = function (e, t) {
  23646. p._contextMenuService.showContextMenu({
  23647. getAnchor: function () {
  23648. return {x: e, y: t}
  23649. }, getActions: function () {
  23650. return _ && (_.label = n.localize(4, null, l.originalStartLineNumber + v)), m
  23651. }, autoSelectFirstItem: !0
  23652. })
  23653. };
  23654. return p._register(i.addStandardDisposableListener(p._diffActions, "mousedown", (function (e) {
  23655. var t = i.getDomNodePagePosition(p._diffActions), n = t.top, o = t.height, r = Math.floor(g / 3);
  23656. e.preventDefault(), y(e.posx, n + o + r)
  23657. }))), p._register(s.onMouseMove((function (e) {
  23658. 8 === e.target.type || 5 === e.target.type ? e.target.detail.viewZoneId === p._viewZoneId ? (p.visibility = !0, v = p._updateLightBulbPosition(p._marginDomNode, e.event.browserEvent.y, g)) : p.visibility = !1 : p.visibility = !1
  23659. }))), p._register(s.onMouseDown((function (e) {
  23660. e.event.rightButton && (8 !== e.target.type && 5 !== e.target.type || e.target.detail.viewZoneId === p._viewZoneId && (e.event.preventDefault(), v = p._updateLightBulbPosition(p._marginDomNode, e.event.browserEvent.y, g), y(e.event.posx, e.event.posy + g)))
  23661. }))), p
  23662. }
  23663. return r(t, e), Object.defineProperty(t.prototype, "visibility", {
  23664. get: function () {
  23665. return this._visibility
  23666. }, set: function (e) {
  23667. this._visibility !== e && (this._visibility = e, this._diffActions.style.visibility = e ? "visible" : "hidden")
  23668. }, enumerable: !0, configurable: !0
  23669. }), t.prototype._updateLightBulbPosition = function (e, t, n) {
  23670. var o = t - i.getDomNodePagePosition(e).top, r = Math.floor(o / n), s = r * n;
  23671. return this._diffActions.style.top = s + "px", r
  23672. }, t
  23673. }(s.Disposable);
  23674. t.InlineDiffMargin = l
  23675. })), define(n[422], i([7, 8]), (function (e, t) {
  23676. return e.create("vs/editor/common/config/commonEditorConfig", t)
  23677. })), define(n[423], i([7, 8]), (function (e, t) {
  23678. return e.create("vs/editor/common/config/editorOptions", t)
  23679. })), define(n[33], i([0, 1, 423, 16, 109]), (function (e, t, n, i, o) {
  23680. "use strict";
  23681. Object.defineProperty(t, "__esModule", {value: !0}), t.MINIMAP_GUTTER_WIDTH = 8;
  23682. var s = function () {
  23683. function e(e) {
  23684. this._values = e
  23685. }
  23686. return e.prototype.hasChanged = function (e) {
  23687. return this._values[e]
  23688. }, e
  23689. }();
  23690. t.ConfigurationChangedEvent = s;
  23691. var a = function () {
  23692. function e() {
  23693. this._values = []
  23694. }
  23695. return e.prototype._read = function (e) {
  23696. return this._values[e]
  23697. }, e.prototype.get = function (e) {
  23698. return this._values[e]
  23699. }, e.prototype._write = function (e, t) {
  23700. this._values[e] = t
  23701. }, e
  23702. }();
  23703. t.ValidatedEditorOptions = a;
  23704. var u = function () {
  23705. function e(e, t, n, i) {
  23706. this.id = e, this.name = t, this.defaultValue = n, this.schema = i
  23707. }
  23708. return e.prototype.compute = function (e, t, n) {
  23709. return n
  23710. }, e
  23711. }(), d = function () {
  23712. function e(e, t) {
  23713. void 0 === t && (t = null), this.schema = void 0, this.id = e, this.name = "_never_", this.defaultValue = void 0, this.deps = t
  23714. }
  23715. return e.prototype.validate = function (e) {
  23716. return this.defaultValue
  23717. }, e
  23718. }(), c = function () {
  23719. function e(e, t, n, i) {
  23720. this.id = e, this.name = t, this.defaultValue = n, this.schema = i
  23721. }
  23722. return e.prototype.validate = function (e) {
  23723. return void 0 === e ? this.defaultValue : e
  23724. }, e.prototype.compute = function (e, t, n) {
  23725. return n
  23726. }, e
  23727. }(), h = function (e) {
  23728. function t(t, n, i, o) {
  23729. void 0 === o && (o = void 0);
  23730. return void 0 !== o && (o.type = "boolean", o.default = i), e.call(this, t, n, i, o) || this
  23731. }
  23732. return r(t, e), t.boolean = function (e, t) {
  23733. return void 0 === e ? t : "false" !== e && Boolean(e)
  23734. }, t.prototype.validate = function (e) {
  23735. return t.boolean(e, this.defaultValue)
  23736. }, t
  23737. }(c), p = function (e) {
  23738. function t(t, n, i, o, r, s) {
  23739. void 0 === s && (s = void 0);
  23740. var a = this;
  23741. return void 0 !== s && (s.type = "integer", s.default = i, s.minimum = o, s.maximum = r), (a = e.call(this, t, n, i, s) || this).minimum = o, a.maximum = r, a
  23742. }
  23743. return r(t, e), t.clampedInt = function (e, t, n, i) {
  23744. var o;
  23745. return void 0 === e ? o = t : (o = parseInt(e, 10), isNaN(o) && (o = t)), o = Math.max(n, o), 0 | (o = Math.min(i, o))
  23746. }, t.prototype.validate = function (e) {
  23747. return t.clampedInt(e, this.defaultValue, this.minimum, this.maximum)
  23748. }, t
  23749. }(c), g = function (e) {
  23750. function t(t, n, i, o, r) {
  23751. var s = this;
  23752. return void 0 !== r && (r.type = "number", r.default = i), (s = e.call(this, t, n, i, r) || this).validationFn = o, s
  23753. }
  23754. return r(t, e), t.clamp = function (e, t, n) {
  23755. return e < t ? t : e > n ? n : e
  23756. }, t.float = function (e, t) {
  23757. if ("number" == typeof e) return e;
  23758. if (void 0 === e) return t;
  23759. var n = parseFloat(e);
  23760. return isNaN(n) ? t : n
  23761. }, t.prototype.validate = function (e) {
  23762. return this.validationFn(t.float(e, this.defaultValue))
  23763. }, t
  23764. }(c), f = function (e) {
  23765. function t(t, n, i, o) {
  23766. void 0 === o && (o = void 0);
  23767. return void 0 !== o && (o.type = "string", o.default = i), e.call(this, t, n, i, o) || this
  23768. }
  23769. return r(t, e), t.string = function (e, t) {
  23770. return "string" != typeof e ? t : e
  23771. }, t.prototype.validate = function (e) {
  23772. return t.string(e, this.defaultValue)
  23773. }, t
  23774. }(c), m = function (e) {
  23775. function t(t, n, i, o, r) {
  23776. void 0 === r && (r = void 0);
  23777. var s = this;
  23778. return void 0 !== r && (r.type = "string", r.enum = o, r.default = i), (s = e.call(this, t, n, i, r) || this)._allowedValues = o, s
  23779. }
  23780. return r(t, e), t.stringSet = function (e, t, n) {
  23781. return "string" != typeof e ? t : -1 === n.indexOf(e) ? t : e
  23782. }, t.prototype.validate = function (e) {
  23783. return t.stringSet(e, this.defaultValue, this._allowedValues)
  23784. }, t
  23785. }(c), v = function (e) {
  23786. function t(t, n, i, o, r, s, a) {
  23787. void 0 === a && (a = void 0);
  23788. var l = this;
  23789. return void 0 !== a && (a.type = "string", a.enum = r, a.default = o), (l = e.call(this, t, n, i, a) || this)._allowedValues = r, l._convert = s, l
  23790. }
  23791. return r(t, e), t.prototype.validate = function (e) {
  23792. return "string" != typeof e ? this.defaultValue : -1 === this._allowedValues.indexOf(e) ? this.defaultValue : this._convert(e)
  23793. }, t
  23794. }(u);
  23795. var _, y = function (e) {
  23796. function t() {
  23797. return e.call(this, 2, "accessibilitySupport", 0, {
  23798. type: "string",
  23799. enum: ["auto", "on", "off"],
  23800. enumDescriptions: [n.localize(0, null), n.localize(1, null), n.localize(2, null)],
  23801. default: "auto",
  23802. description: n.localize(3, null)
  23803. }) || this
  23804. }
  23805. return r(t, e), t.prototype.validate = function (e) {
  23806. switch (e) {
  23807. case"auto":
  23808. return 0;
  23809. case"off":
  23810. return 1;
  23811. case"on":
  23812. return 2
  23813. }
  23814. return this.defaultValue
  23815. }, t.prototype.compute = function (e, t, n) {
  23816. return 0 === n ? e.accessibilitySupport : n
  23817. }, t
  23818. }(u), C = function (e) {
  23819. function t() {
  23820. var t = {insertSpace: !0};
  23821. return e.call(this, 13, "comments", t, {
  23822. "editor.comments.insertSpace": {
  23823. type: "boolean",
  23824. default: t.insertSpace,
  23825. description: n.localize(4, null)
  23826. }
  23827. }) || this
  23828. }
  23829. return r(t, e), t.prototype.validate = function (e) {
  23830. if ("object" != typeof e) return this.defaultValue;
  23831. var t = e;
  23832. return {insertSpace: h.boolean(t.insertSpace, this.defaultValue.insertSpace)}
  23833. }, t
  23834. }(u);
  23835. !function (e) {
  23836. e[e.Line = 1] = "Line", e[e.Block = 2] = "Block", e[e.Underline = 3] = "Underline", e[e.LineThin = 4] = "LineThin", e[e.BlockOutline = 5] = "BlockOutline", e[e.UnderlineThin = 6] = "UnderlineThin"
  23837. }(_ = t.TextEditorCursorStyle || (t.TextEditorCursorStyle = {}));
  23838. var b = function (e) {
  23839. function t() {
  23840. return e.call(this, 104, [55, 26]) || this
  23841. }
  23842. return r(t, e), t.prototype.compute = function (e, t, n) {
  23843. var i = "monaco-editor";
  23844. return t.get(26) && (i += " " + t.get(26)), e.extraEditorClassName && (i += " " + e.extraEditorClassName), "default" === t.get(55) ? i += " mouse-default" : "copy" === t.get(55) && (i += " mouse-copy"), t.get(85) && (i += " showUnused"), i
  23845. }, t
  23846. }(d), S = function (e) {
  23847. function t() {
  23848. return e.call(this, 25, "emptySelectionClipboard", !0, {description: n.localize(5, null)}) || this
  23849. }
  23850. return r(t, e), t.prototype.compute = function (e, t, n) {
  23851. return n && e.emptySelectionClipboard
  23852. }, t
  23853. }(h), w = function (e) {
  23854. function t() {
  23855. var t = {
  23856. seedSearchStringFromSelection: !0,
  23857. autoFindInSelection: "never",
  23858. globalFindClipboard: !1,
  23859. addExtraSpaceOnTop: !0
  23860. };
  23861. return e.call(this, 28, "find", t, {
  23862. "editor.find.seedSearchStringFromSelection": {
  23863. type: "boolean",
  23864. default: t.seedSearchStringFromSelection,
  23865. description: n.localize(6, null)
  23866. },
  23867. "editor.find.autoFindInSelection": {
  23868. type: "string",
  23869. enum: ["never", "always", "multiline"],
  23870. default: t.autoFindInSelection,
  23871. enumDescriptions: [n.localize(7, null), n.localize(8, null), n.localize(9, null)],
  23872. description: n.localize(10, null)
  23873. },
  23874. "editor.find.globalFindClipboard": {
  23875. type: "boolean",
  23876. default: t.globalFindClipboard,
  23877. description: n.localize(11, null),
  23878. included: i.isMacintosh
  23879. },
  23880. "editor.find.addExtraSpaceOnTop": {
  23881. type: "boolean",
  23882. default: t.addExtraSpaceOnTop,
  23883. description: n.localize(12, null)
  23884. }
  23885. }) || this
  23886. }
  23887. return r(t, e), t.prototype.validate = function (e) {
  23888. if ("object" != typeof e) return this.defaultValue;
  23889. var t = e;
  23890. return {
  23891. seedSearchStringFromSelection: h.boolean(t.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection),
  23892. autoFindInSelection: "boolean" == typeof e.autoFindInSelection ? e.autoFindInSelection ? "always" : "never" : m.stringSet(t.autoFindInSelection, this.defaultValue.autoFindInSelection, ["never", "always", "multiline"]),
  23893. globalFindClipboard: h.boolean(t.globalFindClipboard, this.defaultValue.globalFindClipboard),
  23894. addExtraSpaceOnTop: h.boolean(t.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop)
  23895. }
  23896. }, t
  23897. }(u), E = function (e) {
  23898. function t() {
  23899. return e.call(this, 35, "fontLigatures", t.OFF, {
  23900. anyOf: [{
  23901. type: "boolean",
  23902. description: n.localize(13, null)
  23903. }, {type: "string", description: n.localize(14, null)}],
  23904. description: n.localize(15, null),
  23905. default: !1
  23906. }) || this
  23907. }
  23908. return r(t, e), t.prototype.validate = function (e) {
  23909. return void 0 === e ? this.defaultValue : "string" == typeof e ? "false" === e ? t.OFF : "true" === e ? t.ON : e : Boolean(e) ? t.ON : t.OFF
  23910. }, t.OFF = '"liga" off, "calt" off', t.ON = '"liga" on, "calt" on', t
  23911. }(u);
  23912. t.EditorFontLigatures = E;
  23913. var L = function (e) {
  23914. function t() {
  23915. return e.call(this, 34) || this
  23916. }
  23917. return r(t, e), t.prototype.compute = function (e, t, n) {
  23918. return e.fontInfo
  23919. }, t
  23920. }(d), D = function (e) {
  23921. function i() {
  23922. return e.call(this, 36, "fontSize", t.EDITOR_FONT_DEFAULTS.fontSize, {
  23923. type: "number",
  23924. minimum: 6,
  23925. maximum: 100,
  23926. default: t.EDITOR_FONT_DEFAULTS.fontSize,
  23927. description: n.localize(16, null)
  23928. }) || this
  23929. }
  23930. return r(i, e), i.prototype.validate = function (e) {
  23931. var n = g.float(e, this.defaultValue);
  23932. return 0 === n ? t.EDITOR_FONT_DEFAULTS.fontSize : g.clamp(n, 6, 100)
  23933. }, i.prototype.compute = function (e, t, n) {
  23934. return e.fontInfo.fontSize
  23935. }, i
  23936. }(c), N = function (e) {
  23937. function t() {
  23938. var t = {
  23939. multiple: "peek",
  23940. multipleDefinitions: "peek",
  23941. multipleTypeDefinitions: "peek",
  23942. multipleDeclarations: "peek",
  23943. multipleImplementations: "peek",
  23944. multipleReferences: "peek",
  23945. alternativeDefinitionCommand: "editor.action.goToReferences",
  23946. alternativeTypeDefinitionCommand: "editor.action.goToReferences",
  23947. alternativeDeclarationCommand: "editor.action.goToReferences",
  23948. alternativeImplementationCommand: "",
  23949. alternativeReferenceCommand: ""
  23950. }, i = {
  23951. type: "string",
  23952. enum: ["peek", "gotoAndPeek", "goto"],
  23953. default: t.multiple,
  23954. enumDescriptions: [n.localize(17, null), n.localize(18, null), n.localize(19, null)]
  23955. };
  23956. return e.call(this, 41, "gotoLocation", t, {
  23957. "editor.gotoLocation.multiple": {deprecationMessage: n.localize(20, null)},
  23958. "editor.gotoLocation.multipleDefinitions": l({description: n.localize(21, null)}, i),
  23959. "editor.gotoLocation.multipleTypeDefinitions": l({description: n.localize(22, null)}, i),
  23960. "editor.gotoLocation.multipleDeclarations": l({description: n.localize(23, null)}, i),
  23961. "editor.gotoLocation.multipleImplementations": l({
  23962. description: n.localize(24, null)
  23963. }, i),
  23964. "editor.gotoLocation.multipleReferences": l({description: n.localize(25, null)}, i),
  23965. "editor.gotoLocation.alternativeDefinitionCommand": {
  23966. type: "string",
  23967. default: t.alternativeDefinitionCommand,
  23968. description: n.localize(26, null)
  23969. },
  23970. "editor.gotoLocation.alternativeTypeDefinitionCommand": {
  23971. type: "string",
  23972. default: t.alternativeTypeDefinitionCommand,
  23973. description: n.localize(27, null)
  23974. },
  23975. "editor.gotoLocation.alternativeDeclarationCommand": {
  23976. type: "string",
  23977. default: t.alternativeDeclarationCommand,
  23978. description: n.localize(28, null)
  23979. },
  23980. "editor.gotoLocation.alternativeImplementationCommand": {
  23981. type: "string",
  23982. default: t.alternativeImplementationCommand,
  23983. description: n.localize(29, null)
  23984. },
  23985. "editor.gotoLocation.alternativeReferenceCommand": {
  23986. type: "string",
  23987. default: t.alternativeReferenceCommand,
  23988. description: n.localize(30, null)
  23989. }
  23990. }) || this
  23991. }
  23992. return r(t, e), t.prototype.validate = function (e) {
  23993. var t, n, i, o, r;
  23994. if ("object" != typeof e) return this.defaultValue;
  23995. var s = e;
  23996. return {
  23997. multiple: m.stringSet(s.multiple, this.defaultValue.multiple, ["peek", "gotoAndPeek", "goto"]),
  23998. multipleDefinitions: null !== (t = s.multipleDefinitions) && void 0 !== t ? t : m.stringSet(s.multipleDefinitions, "peek", ["peek", "gotoAndPeek", "goto"]),
  23999. multipleTypeDefinitions: null !== (n = s.multipleTypeDefinitions) && void 0 !== n ? n : m.stringSet(s.multipleTypeDefinitions, "peek", ["peek", "gotoAndPeek", "goto"]),
  24000. multipleDeclarations: null !== (i = s.multipleDeclarations) && void 0 !== i ? i : m.stringSet(s.multipleDeclarations, "peek", ["peek", "gotoAndPeek", "goto"]),
  24001. multipleImplementations: null !== (o = s.multipleImplementations) && void 0 !== o ? o : m.stringSet(s.multipleImplementations, "peek", ["peek", "gotoAndPeek", "goto"]),
  24002. multipleReferences: null !== (r = s.multipleReferences) && void 0 !== r ? r : m.stringSet(s.multipleReferences, "peek", ["peek", "gotoAndPeek", "goto"]),
  24003. alternativeDefinitionCommand: f.string(s.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand),
  24004. alternativeTypeDefinitionCommand: f.string(s.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand),
  24005. alternativeDeclarationCommand: f.string(s.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand),
  24006. alternativeImplementationCommand: f.string(s.alternativeImplementationCommand, this.defaultValue.alternativeImplementationCommand),
  24007. alternativeReferenceCommand: f.string(s.alternativeReferenceCommand, this.defaultValue.alternativeReferenceCommand)
  24008. }
  24009. }, t
  24010. }(u), x = function (e) {
  24011. function t() {
  24012. var t = {enabled: !0, delay: 300, sticky: !0};
  24013. return e.call(this, 44, "hover", t, {
  24014. "editor.hover.enabled": {
  24015. type: "boolean",
  24016. default: t.enabled,
  24017. description: n.localize(31, null)
  24018. },
  24019. "editor.hover.delay": {type: "number", default: t.delay, description: n.localize(32, null)},
  24020. "editor.hover.sticky": {type: "boolean", default: t.sticky, description: n.localize(33, null)}
  24021. }) || this
  24022. }
  24023. return r(t, e), t.prototype.validate = function (e) {
  24024. if ("object" != typeof e) return this.defaultValue;
  24025. var t = e;
  24026. return {
  24027. enabled: h.boolean(t.enabled, this.defaultValue.enabled),
  24028. delay: p.clampedInt(t.delay, this.defaultValue.delay, 0, 1e4),
  24029. sticky: h.boolean(t.sticky, this.defaultValue.sticky)
  24030. }
  24031. }, t
  24032. }(u), I = function (e) {
  24033. function n() {
  24034. return e.call(this, 107, [40, 48, 30, 54, 78, 50]) || this
  24035. }
  24036. return r(n, e), n.prototype.compute = function (e, t, i) {
  24037. return n.computeLayout(t, {
  24038. outerWidth: e.outerWidth,
  24039. outerHeight: e.outerHeight,
  24040. lineHeight: e.fontInfo.lineHeight,
  24041. lineNumbersDigitCount: e.lineNumbersDigitCount,
  24042. typicalHalfwidthCharacterWidth: e.fontInfo.typicalHalfwidthCharacterWidth,
  24043. maxDigitWidth: e.fontInfo.maxDigitWidth,
  24044. pixelRatio: e.pixelRatio
  24045. })
  24046. }, n.computeLayout = function (e, n) {
  24047. var i, o = 0 | n.outerWidth, r = 0 | n.outerHeight, s = 0 | n.lineHeight,
  24048. a = 0 | n.lineNumbersDigitCount, l = n.typicalHalfwidthCharacterWidth, u = n.maxDigitWidth,
  24049. d = n.pixelRatio, c = e.get(40), h = 0 !== e.get(50).renderType, g = 0 | e.get(51), f = e.get(54),
  24050. m = f.enabled, v = f.side, _ = f.renderCharacters, y = d >= 2 ? Math.round(2 * f.scale) : f.scale,
  24051. C = 0 | f.maxColumn, b = e.get(78), S = 0 | b.verticalScrollbarSize, w = b.verticalHasArrows,
  24052. E = 0 | b.arrowSize, L = 0 | b.horizontalScrollbarSize, D = e.get(48), N = e.get(30);
  24053. if ("string" == typeof D && /^\d+(\.\d+)?ch$/.test(D)) {
  24054. var x = parseFloat(D.substr(0, D.length - 2));
  24055. i = p.clampedInt(x * l, 0, 0, 1e3)
  24056. } else i = p.clampedInt(D, 0, 0, 1e3);
  24057. N && (i += 16);
  24058. var I = 0;
  24059. if (h) {
  24060. var M = Math.max(a, g);
  24061. I = Math.round(M * u)
  24062. }
  24063. var k = 0;
  24064. c && (k = s);
  24065. var T, R, O, P, A = 0, F = A + k, W = F + I, B = W + i, V = o - k - I - i;
  24066. if (m) {
  24067. var z = y / d;
  24068. T = _ ? 1 : 2, (O = Math.max(0, Math.floor((V - S - 2) * z / (l + z))) + t.MINIMAP_GUTTER_WIDTH) / z > C && (O = Math.floor(C * z)), P = V - O, "left" === v ? (R = 0, A += O, F += O, W += O, B += O) : R = o - O - S
  24069. } else R = 0, O = 0, T = 0, P = V;
  24070. var H = w ? E : 0;
  24071. return {
  24072. width: o,
  24073. height: r,
  24074. glyphMarginLeft: A,
  24075. glyphMarginWidth: k,
  24076. lineNumbersLeft: F,
  24077. lineNumbersWidth: I,
  24078. decorationsLeft: W,
  24079. decorationsWidth: i,
  24080. contentLeft: B,
  24081. contentWidth: P,
  24082. renderMinimap: T,
  24083. minimapLeft: R,
  24084. minimapWidth: O,
  24085. viewportColumn: Math.max(1, Math.floor((P - S - 2) / l)),
  24086. verticalScrollbarWidth: S,
  24087. horizontalScrollbarHeight: L,
  24088. overviewRuler: {top: H, width: S, height: r - 2 * H, right: 0}
  24089. }
  24090. }, n
  24091. }(d);
  24092. t.EditorLayoutInfoComputer = I;
  24093. var M = function (e) {
  24094. function t() {
  24095. var t = {enabled: !0};
  24096. return e.call(this, 47, "lightbulb", t, {
  24097. "editor.lightbulb.enabled": {
  24098. type: "boolean",
  24099. default: t.enabled,
  24100. description: n.localize(34, null)
  24101. }
  24102. }) || this
  24103. }
  24104. return r(t, e), t.prototype.validate = function (e) {
  24105. if ("object" != typeof e) return this.defaultValue;
  24106. var t = e;
  24107. return {enabled: h.boolean(t.enabled, this.defaultValue.enabled)}
  24108. }, t
  24109. }(u), k = function (e) {
  24110. function i() {
  24111. return e.call(this, 49, "lineHeight", t.EDITOR_FONT_DEFAULTS.lineHeight, 0, 150, {description: n.localize(35, null)}) || this
  24112. }
  24113. return r(i, e), i.prototype.compute = function (e, t, n) {
  24114. return e.fontInfo.lineHeight
  24115. }, i
  24116. }(p), T = function (e) {
  24117. function t() {
  24118. var t = {
  24119. enabled: !0,
  24120. side: "right",
  24121. showSlider: "mouseover",
  24122. renderCharacters: !0,
  24123. maxColumn: 120,
  24124. scale: 1
  24125. };
  24126. return e.call(this, 54, "minimap", t, {
  24127. "editor.minimap.enabled": {type: "boolean", default: t.enabled, description: n.localize(36, null)},
  24128. "editor.minimap.side": {
  24129. type: "string",
  24130. enum: ["left", "right"],
  24131. default: t.side,
  24132. description: n.localize(37, null)
  24133. },
  24134. "editor.minimap.showSlider": {
  24135. type: "string",
  24136. enum: ["always", "mouseover"],
  24137. default: t.showSlider,
  24138. description: n.localize(38, null)
  24139. },
  24140. "editor.minimap.scale": {
  24141. type: "number",
  24142. default: t.scale,
  24143. minimum: 1,
  24144. maximum: 3,
  24145. description: n.localize(39, null)
  24146. },
  24147. "editor.minimap.renderCharacters": {
  24148. type: "boolean", default: t.renderCharacters,
  24149. description: n.localize(40, null)
  24150. },
  24151. "editor.minimap.maxColumn": {
  24152. type: "number",
  24153. default: t.maxColumn,
  24154. description: n.localize(41, null)
  24155. }
  24156. }) || this
  24157. }
  24158. return r(t, e), t.prototype.validate = function (e) {
  24159. if ("object" != typeof e) return this.defaultValue;
  24160. var t = e;
  24161. return {
  24162. enabled: h.boolean(t.enabled, this.defaultValue.enabled),
  24163. side: m.stringSet(t.side, this.defaultValue.side, ["right", "left"]),
  24164. showSlider: m.stringSet(t.showSlider, this.defaultValue.showSlider, ["always", "mouseover"]),
  24165. renderCharacters: h.boolean(t.renderCharacters, this.defaultValue.renderCharacters),
  24166. scale: p.clampedInt(t.scale, 1, 1, 3),
  24167. maxColumn: p.clampedInt(t.maxColumn, this.defaultValue.maxColumn, 1, 1e4)
  24168. }
  24169. }, t
  24170. }(u);
  24171. var R = function (e) {
  24172. function t() {
  24173. var t = {enabled: !0, cycle: !1};
  24174. return e.call(this, 64, "parameterHints", t, {
  24175. "editor.parameterHints.enabled": {
  24176. type: "boolean",
  24177. default: t.enabled,
  24178. description: n.localize(42, null)
  24179. },
  24180. "editor.parameterHints.cycle": {
  24181. type: "boolean",
  24182. default: t.cycle,
  24183. description: n.localize(43, null)
  24184. }
  24185. }) || this
  24186. }
  24187. return r(t, e), t.prototype.validate = function (e) {
  24188. if ("object" != typeof e) return this.defaultValue;
  24189. var t = e;
  24190. return {
  24191. enabled: h.boolean(t.enabled, this.defaultValue.enabled),
  24192. cycle: h.boolean(t.cycle, this.defaultValue.cycle)
  24193. }
  24194. }, t
  24195. }(u), O = function (e) {
  24196. function t() {
  24197. return e.call(this, 105) || this
  24198. }
  24199. return r(t, e), t.prototype.compute = function (e, t, n) {
  24200. return e.pixelRatio
  24201. }, t
  24202. }(d), P = function (e) {
  24203. function t() {
  24204. var t = this, i = {other: !0, comments: !1, strings: !1};
  24205. return (t = e.call(this, 66, "quickSuggestions", i, {
  24206. anyOf: [{type: "boolean"}, {
  24207. type: "object",
  24208. properties: {
  24209. strings: {type: "boolean", default: i.strings, description: n.localize(44, null)},
  24210. comments: {type: "boolean", default: i.comments, description: n.localize(45, null)},
  24211. other: {type: "boolean", default: i.other, description: n.localize(46, null)}
  24212. }
  24213. }], default: i, description: n.localize(47, null)
  24214. }) || this).defaultValue = i, t
  24215. }
  24216. return r(t, e), t.prototype.validate = function (e) {
  24217. if ("boolean" == typeof e) return e;
  24218. if ("object" == typeof e) {
  24219. var t = e, n = {
  24220. other: h.boolean(t.other, this.defaultValue.other),
  24221. comments: h.boolean(t.comments, this.defaultValue.comments),
  24222. strings: h.boolean(t.strings, this.defaultValue.strings)
  24223. };
  24224. return !!(n.other && n.comments && n.strings) || !!(n.other || n.comments || n.strings) && n
  24225. }
  24226. return this.defaultValue
  24227. }, t
  24228. }(u), A = function (e) {
  24229. function t() {
  24230. return e.call(this, 50, "lineNumbers", {renderType: 1, renderFn: null}, {
  24231. type: "string",
  24232. enum: ["off", "on", "relative", "interval"],
  24233. enumDescriptions: [n.localize(48, null), n.localize(49, null), n.localize(50, null), n.localize(51, null)],
  24234. default: "on",
  24235. description: n.localize(52, null)
  24236. }) || this
  24237. }
  24238. return r(t, e), t.prototype.validate = function (e) {
  24239. var t = this.defaultValue.renderType, n = this.defaultValue.renderFn;
  24240. return void 0 !== e && ("function" == typeof e ? (t = 4, n = e) : t = "interval" === e ? 3 : "relative" === e ? 2 : "on" === e ? 1 : 0), {
  24241. renderType: t,
  24242. renderFn: n
  24243. }
  24244. }, t
  24245. }(u);
  24246. t.filterValidationDecorations = function (e) {
  24247. var t = e.get(73);
  24248. return "editable" === t ? e.get(68) : "on" !== t
  24249. };
  24250. var F = function (e) {
  24251. function t() {
  24252. var t = [];
  24253. return e.call(this, 77, "rulers", t, {
  24254. type: "array",
  24255. items: {type: "number"},
  24256. default: t,
  24257. description: n.localize(53, null)
  24258. }) || this
  24259. }
  24260. return r(t, e), t.prototype.validate = function (e) {
  24261. if (Array.isArray(e)) {
  24262. for (var t = [], n = 0, i = e; n < i.length; n++) {
  24263. var o = i[n];
  24264. t.push(p.clampedInt(o, 0, 0, 1e4))
  24265. }
  24266. return t.sort((function (e, t) {
  24267. return e - t
  24268. })), t
  24269. }
  24270. return this.defaultValue
  24271. }, t
  24272. }(c);
  24273. function W(e, t) {
  24274. if ("string" != typeof e) return t;
  24275. switch (e) {
  24276. case"hidden":
  24277. return 2;
  24278. case"visible":
  24279. return 3;
  24280. default:
  24281. return 1
  24282. }
  24283. }
  24284. var B = function (e) {
  24285. function t() {
  24286. return e.call(this, 78, "scrollbar", {
  24287. vertical: 1,
  24288. horizontal: 1,
  24289. arrowSize: 11,
  24290. useShadows: !0,
  24291. verticalHasArrows: !1,
  24292. horizontalHasArrows: !1,
  24293. horizontalScrollbarSize: 10,
  24294. horizontalSliderSize: 10,
  24295. verticalScrollbarSize: 14,
  24296. verticalSliderSize: 14,
  24297. handleMouseWheel: !0,
  24298. alwaysConsumeMouseWheel: !0
  24299. }) || this
  24300. }
  24301. return r(t, e), t.prototype.validate = function (e) {
  24302. if ("object" != typeof e) return this.defaultValue;
  24303. var t = e,
  24304. n = p.clampedInt(t.horizontalScrollbarSize, this.defaultValue.horizontalScrollbarSize, 0, 1e3),
  24305. i = p.clampedInt(t.verticalScrollbarSize, this.defaultValue.verticalScrollbarSize, 0, 1e3);
  24306. return {
  24307. arrowSize: p.clampedInt(t.arrowSize, this.defaultValue.arrowSize, 0, 1e3),
  24308. vertical: W(t.vertical, this.defaultValue.vertical),
  24309. horizontal: W(t.horizontal, this.defaultValue.horizontal),
  24310. useShadows: h.boolean(t.useShadows, this.defaultValue.useShadows),
  24311. verticalHasArrows: h.boolean(t.verticalHasArrows, this.defaultValue.verticalHasArrows),
  24312. horizontalHasArrows: h.boolean(t.horizontalHasArrows, this.defaultValue.horizontalHasArrows),
  24313. handleMouseWheel: h.boolean(t.handleMouseWheel, this.defaultValue.handleMouseWheel),
  24314. alwaysConsumeMouseWheel: h.boolean(t.alwaysConsumeMouseWheel, this.defaultValue.alwaysConsumeMouseWheel),
  24315. horizontalScrollbarSize: n,
  24316. horizontalSliderSize: p.clampedInt(t.horizontalSliderSize, n, 0, 1e3),
  24317. verticalScrollbarSize: i,
  24318. verticalSliderSize: p.clampedInt(t.verticalSliderSize, i, 0, 1e3)
  24319. }
  24320. }, t
  24321. }(u), V = function (e) {
  24322. function t() {
  24323. var t = {
  24324. insertMode: "insert",
  24325. insertHighlight: !1,
  24326. filterGraceful: !0,
  24327. snippetsPreventQuickSuggestions: !0,
  24328. localityBonus: !1,
  24329. shareSuggestSelections: !1,
  24330. showIcons: !0,
  24331. maxVisibleSuggestions: 12,
  24332. showMethods: !0,
  24333. showFunctions: !0,
  24334. showConstructors: !0,
  24335. showFields: !0,
  24336. showVariables: !0,
  24337. showClasses: !0,
  24338. showStructs: !0,
  24339. showInterfaces: !0,
  24340. showModules: !0,
  24341. showProperties: !0,
  24342. showEvents: !0,
  24343. showOperators: !0,
  24344. showUnits: !0,
  24345. showValues: !0,
  24346. showConstants: !0,
  24347. showEnums: !0,
  24348. showEnumMembers: !0,
  24349. showKeywords: !0,
  24350. showWords: !0,
  24351. showColors: !0,
  24352. showFiles: !0,
  24353. showReferences: !0,
  24354. showFolders: !0,
  24355. showTypeParameters: !0,
  24356. showSnippets: !0,
  24357. hideStatusBar: !0
  24358. };
  24359. return e.call(this, 89, "suggest", t, {
  24360. "editor.suggest.insertMode": {
  24361. type: "string",
  24362. enum: ["insert", "replace"],
  24363. enumDescriptions: [n.localize(54, null), n.localize(55, null)],
  24364. default: t.insertMode,
  24365. description: n.localize(56, null)
  24366. },
  24367. "editor.suggest.insertHighlight": {
  24368. type: "boolean",
  24369. default: t.insertHighlight,
  24370. description: n.localize(57, null)
  24371. },
  24372. "editor.suggest.filterGraceful": {
  24373. type: "boolean",
  24374. default: t.filterGraceful,
  24375. description: n.localize(58, null)
  24376. },
  24377. "editor.suggest.localityBonus": {
  24378. type: "boolean",
  24379. default: t.localityBonus,
  24380. description: n.localize(59, null)
  24381. },
  24382. "editor.suggest.shareSuggestSelections": {
  24383. type: "boolean",
  24384. default: t.shareSuggestSelections,
  24385. markdownDescription: n.localize(60, null)
  24386. },
  24387. "editor.suggest.snippetsPreventQuickSuggestions": {
  24388. type: "boolean",
  24389. default: t.snippetsPreventQuickSuggestions, description: n.localize(61, null)
  24390. },
  24391. "editor.suggest.showIcons": {
  24392. type: "boolean",
  24393. default: t.showIcons,
  24394. description: n.localize(62, null)
  24395. },
  24396. "editor.suggest.maxVisibleSuggestions": {
  24397. type: "number",
  24398. default: t.maxVisibleSuggestions,
  24399. minimum: 1,
  24400. maximum: 15,
  24401. description: n.localize(63, null)
  24402. },
  24403. "editor.suggest.filteredTypes": {type: "object", deprecationMessage: n.localize(64, null)},
  24404. "editor.suggest.showMethods": {
  24405. type: "boolean",
  24406. default: !0,
  24407. markdownDescription: n.localize(65, null)
  24408. },
  24409. "editor.suggest.showFunctions": {
  24410. type: "boolean",
  24411. default: !0,
  24412. markdownDescription: n.localize(66, null)
  24413. },
  24414. "editor.suggest.showConstructors": {
  24415. type: "boolean",
  24416. default: !0,
  24417. markdownDescription: n.localize(67, null)
  24418. },
  24419. "editor.suggest.showFields": {
  24420. type: "boolean",
  24421. default: !0,
  24422. markdownDescription: n.localize(68, null)
  24423. },
  24424. "editor.suggest.showVariables": {
  24425. type: "boolean",
  24426. default: !0,
  24427. markdownDescription: n.localize(69, null)
  24428. },
  24429. "editor.suggest.showClasses": {
  24430. type: "boolean",
  24431. default: !0,
  24432. markdownDescription: n.localize(70, null)
  24433. },
  24434. "editor.suggest.showStructs": {
  24435. type: "boolean", default: !0, markdownDescription: n.localize(71, null)
  24436. },
  24437. "editor.suggest.showInterfaces": {
  24438. type: "boolean",
  24439. default: !0,
  24440. markdownDescription: n.localize(72, null)
  24441. },
  24442. "editor.suggest.showModules": {
  24443. type: "boolean",
  24444. default: !0,
  24445. markdownDescription: n.localize(73, null)
  24446. },
  24447. "editor.suggest.showProperties": {
  24448. type: "boolean",
  24449. default: !0,
  24450. markdownDescription: n.localize(74, null)
  24451. },
  24452. "editor.suggest.showEvents": {
  24453. type: "boolean",
  24454. default: !0,
  24455. markdownDescription: n.localize(75, null)
  24456. },
  24457. "editor.suggest.showOperators": {
  24458. type: "boolean",
  24459. default: !0,
  24460. markdownDescription: n.localize(76, null)
  24461. },
  24462. "editor.suggest.showUnits": {
  24463. type: "boolean",
  24464. default: !0,
  24465. markdownDescription: n.localize(77, null)
  24466. },
  24467. "editor.suggest.showValues": {
  24468. type: "boolean",
  24469. default: !0,
  24470. markdownDescription: n.localize(78, null)
  24471. },
  24472. "editor.suggest.showConstants": {
  24473. type: "boolean",
  24474. default: !0,
  24475. markdownDescription: n.localize(79, null)
  24476. },
  24477. "editor.suggest.showEnums": {
  24478. type: "boolean",
  24479. default: !0,
  24480. markdownDescription: n.localize(80, null)
  24481. },
  24482. "editor.suggest.showEnumMembers": {
  24483. type: "boolean", default: !0,
  24484. markdownDescription: n.localize(81, null)
  24485. },
  24486. "editor.suggest.showKeywords": {
  24487. type: "boolean",
  24488. default: !0,
  24489. markdownDescription: n.localize(82, null)
  24490. },
  24491. "editor.suggest.showWords": {
  24492. type: "boolean",
  24493. default: !0,
  24494. markdownDescription: n.localize(83, null)
  24495. },
  24496. "editor.suggest.showColors": {
  24497. type: "boolean",
  24498. default: !0,
  24499. markdownDescription: n.localize(84, null)
  24500. },
  24501. "editor.suggest.showFiles": {
  24502. type: "boolean",
  24503. default: !0,
  24504. markdownDescription: n.localize(85, null)
  24505. },
  24506. "editor.suggest.showReferences": {
  24507. type: "boolean",
  24508. default: !0,
  24509. markdownDescription: n.localize(86, null)
  24510. },
  24511. "editor.suggest.showCustomcolors": {
  24512. type: "boolean",
  24513. default: !0,
  24514. markdownDescription: n.localize(87, null)
  24515. },
  24516. "editor.suggest.showFolders": {
  24517. type: "boolean",
  24518. default: !0,
  24519. markdownDescription: n.localize(88, null)
  24520. },
  24521. "editor.suggest.showTypeParameters": {
  24522. type: "boolean",
  24523. default: !0,
  24524. markdownDescription: n.localize(89, null)
  24525. },
  24526. "editor.suggest.showSnippets": {
  24527. type: "boolean",
  24528. default: !0,
  24529. markdownDescription: n.localize(90, null)
  24530. },
  24531. "editor.suggest.hideStatusBar": {
  24532. type: "boolean",
  24533. default: !0,
  24534. markdownDescription: n.localize(91, null)
  24535. }
  24536. }) || this
  24537. }
  24538. return r(t, e), t.prototype.validate = function (e) {
  24539. if ("object" != typeof e) return this.defaultValue;
  24540. var t = e;
  24541. return {
  24542. insertMode: m.stringSet(t.insertMode, this.defaultValue.insertMode, ["insert", "replace"]),
  24543. insertHighlight: h.boolean(t.insertHighlight, this.defaultValue.insertHighlight),
  24544. filterGraceful: h.boolean(t.filterGraceful, this.defaultValue.filterGraceful),
  24545. snippetsPreventQuickSuggestions: h.boolean(t.snippetsPreventQuickSuggestions, this.defaultValue.filterGraceful),
  24546. localityBonus: h.boolean(t.localityBonus, this.defaultValue.localityBonus),
  24547. shareSuggestSelections: h.boolean(t.shareSuggestSelections, this.defaultValue.shareSuggestSelections),
  24548. showIcons: h.boolean(t.showIcons, this.defaultValue.showIcons),
  24549. maxVisibleSuggestions: p.clampedInt(t.maxVisibleSuggestions, this.defaultValue.maxVisibleSuggestions, 1, 15),
  24550. showMethods: h.boolean(t.showMethods, this.defaultValue.showMethods),
  24551. showFunctions: h.boolean(t.showFunctions, this.defaultValue.showFunctions),
  24552. showConstructors: h.boolean(t.showConstructors, this.defaultValue.showConstructors),
  24553. showFields: h.boolean(t.showFields, this.defaultValue.showFields),
  24554. showVariables: h.boolean(t.showVariables, this.defaultValue.showVariables),
  24555. showClasses: h.boolean(t.showClasses, this.defaultValue.showClasses),
  24556. showStructs: h.boolean(t.showStructs, this.defaultValue.showStructs),
  24557. showInterfaces: h.boolean(t.showInterfaces, this.defaultValue.showInterfaces),
  24558. showModules: h.boolean(t.showModules, this.defaultValue.showModules),
  24559. showProperties: h.boolean(t.showProperties, this.defaultValue.showProperties),
  24560. showEvents: h.boolean(t.showEvents, this.defaultValue.showEvents),
  24561. showOperators: h.boolean(t.showOperators, this.defaultValue.showOperators),
  24562. showUnits: h.boolean(t.showUnits, this.defaultValue.showUnits),
  24563. showValues: h.boolean(t.showValues, this.defaultValue.showValues),
  24564. showConstants: h.boolean(t.showConstants, this.defaultValue.showConstants),
  24565. showEnums: h.boolean(t.showEnums, this.defaultValue.showEnums),
  24566. showEnumMembers: h.boolean(t.showEnumMembers, this.defaultValue.showEnumMembers),
  24567. showKeywords: h.boolean(t.showKeywords, this.defaultValue.showKeywords),
  24568. showWords: h.boolean(t.showWords, this.defaultValue.showWords),
  24569. showColors: h.boolean(t.showColors, this.defaultValue.showColors),
  24570. showFiles: h.boolean(t.showFiles, this.defaultValue.showFiles),
  24571. showReferences: h.boolean(t.showReferences, this.defaultValue.showReferences),
  24572. showFolders: h.boolean(t.showFolders, this.defaultValue.showFolders),
  24573. showTypeParameters: h.boolean(t.showTypeParameters, this.defaultValue.showTypeParameters),
  24574. showSnippets: h.boolean(t.showSnippets, this.defaultValue.showSnippets),
  24575. hideStatusBar: h.boolean(t.hideStatusBar, this.defaultValue.hideStatusBar)
  24576. }
  24577. }, t
  24578. }(u), z = function (e) {
  24579. function t() {
  24580. return e.call(this, 106, [68]) || this
  24581. }
  24582. return r(t, e), t.prototype.compute = function (e, t, n) {
  24583. return !!t.get(68) || e.tabFocusMode
  24584. }, t
  24585. }(d);
  24586. var H = function (e) {
  24587. function t() {
  24588. return e.call(this, 108, [97, 100, 101, 107, 2]) || this
  24589. }
  24590. return r(t, e), t.prototype.compute = function (e, t, n) {
  24591. var i = t.get(97), o = t.get(100), r = t.get(101), s = t.get(107), a = null;
  24592. return a = 2 === t.get(2) ? {
  24593. isWordWrapMinified: !1,
  24594. isViewportWrapping: !1,
  24595. wrappingColumn: -1
  24596. } : r && e.isDominatedByLongLines ? {
  24597. isWordWrapMinified: !0,
  24598. isViewportWrapping: !0,
  24599. wrappingColumn: Math.max(1, s.viewportColumn)
  24600. } : "on" === i ? {
  24601. isWordWrapMinified: !1,
  24602. isViewportWrapping: !0,
  24603. wrappingColumn: Math.max(1, s.viewportColumn)
  24604. } : "bounded" === i ? {
  24605. isWordWrapMinified: !1,
  24606. isViewportWrapping: !0,
  24607. wrappingColumn: Math.min(Math.max(1, s.viewportColumn), o)
  24608. } : "wordWrapColumn" === i ? {
  24609. isWordWrapMinified: !1,
  24610. isViewportWrapping: !1,
  24611. wrappingColumn: o
  24612. } : {
  24613. isWordWrapMinified: !1,
  24614. isViewportWrapping: !1,
  24615. wrappingColumn: -1
  24616. }, {
  24617. isDominatedByLongLines: e.isDominatedByLongLines,
  24618. isWordWrapMinified: a.isWordWrapMinified,
  24619. isViewportWrapping: a.isViewportWrapping,
  24620. wrappingColumn: a.wrappingColumn
  24621. }
  24622. }, t
  24623. }(d);
  24624. function K(e) {
  24625. return t.editorOptionsRegistry[e.id] = e, e
  24626. }
  24627. t.EDITOR_FONT_DEFAULTS = {
  24628. fontFamily: i.isMacintosh ? "Menlo, Monaco, 'Courier New', monospace" : i.isLinux ? "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'" : "Consolas, 'Courier New', monospace",
  24629. fontWeight: "normal",
  24630. fontSize: i.isMacintosh ? 12 : 14,
  24631. lineHeight: 0,
  24632. letterSpacing: 0
  24633. }, t.EDITOR_MODEL_DEFAULTS = {
  24634. tabSize: 4,
  24635. indentSize: 4,
  24636. insertSpaces: !0,
  24637. detectIndentation: !0,
  24638. trimAutoWhitespace: !0,
  24639. largeFileOptimizations: !0
  24640. }, t.editorOptionsRegistry = [], t.EditorOptions = {
  24641. acceptSuggestionOnCommitCharacter: K(new h(0, "acceptSuggestionOnCommitCharacter", !0, {markdownDescription: n.localize(92, null)})),
  24642. acceptSuggestionOnEnter: K(new m(1, "acceptSuggestionOnEnter", "on", ["on", "smart", "off"], {
  24643. markdownEnumDescriptions: ["", n.localize(93, null), ""],
  24644. markdownDescription: n.localize(94, null)
  24645. })),
  24646. accessibilitySupport: K(new y),
  24647. accessibilityPageSize: K(new p(3, "accessibilityPageSize", 10, 1, 1073741824, {description: n.localize(95, null)})),
  24648. ariaLabel: K(new f(4, "ariaLabel", n.localize(96, null))),
  24649. autoClosingBrackets: K(new m(5, "autoClosingBrackets", "languageDefined", ["always", "languageDefined", "beforeWhitespace", "never"], {
  24650. enumDescriptions: ["", n.localize(97, null), n.localize(98, null), ""],
  24651. description: n.localize(99, null)
  24652. })),
  24653. autoClosingOvertype: K(new m(6, "autoClosingOvertype", "auto", ["always", "auto", "never"], {
  24654. enumDescriptions: ["", n.localize(100, null), ""],
  24655. description: n.localize(101, null)
  24656. })),
  24657. autoClosingQuotes: K(new m(7, "autoClosingQuotes", "languageDefined", ["always", "languageDefined", "beforeWhitespace", "never"], {
  24658. enumDescriptions: ["", n.localize(102, null), n.localize(103, null), ""],
  24659. description: n.localize(104, null)
  24660. })),
  24661. autoIndent: K(new v(8, "autoIndent", 4, "full", ["none", "keep", "brackets", "advanced", "full"], (function (e) {
  24662. switch (e) {
  24663. case"none":
  24664. return 0;
  24665. case"keep":
  24666. return 1;
  24667. case"brackets":
  24668. return 2;
  24669. case"advanced":
  24670. return 3;
  24671. case"full":
  24672. return 4
  24673. }
  24674. }), {
  24675. enumDescriptions: [n.localize(105, null), n.localize(106, null), n.localize(107, null), n.localize(108, null), n.localize(109, null)],
  24676. description: n.localize(110, null)
  24677. })),
  24678. automaticLayout: K(new h(9, "automaticLayout", !1)),
  24679. autoSurround: K(new m(10, "autoSurround", "languageDefined", ["languageDefined", "quotes", "brackets", "never"], {
  24680. enumDescriptions: [n.localize(111, null), n.localize(112, null), n.localize(113, null), ""],
  24681. description: n.localize(114, null)
  24682. })),
  24683. codeLens: K(new h(11, "codeLens", !0, {description: n.localize(115, null)})),
  24684. colorDecorators: K(new h(12, "colorDecorators", !0, {description: n.localize(116, null)})),
  24685. comments: K(new C),
  24686. contextmenu: K(new h(14, "contextmenu", !0)),
  24687. copyWithSyntaxHighlighting: K(new h(15, "copyWithSyntaxHighlighting", !0, {description: n.localize(117, null)})),
  24688. cursorBlinking: K(new v(16, "cursorBlinking", 1, "blink", ["blink", "smooth", "phase", "expand", "solid"], (function (e) {
  24689. switch (e) {
  24690. case"blink":
  24691. return 1;
  24692. case"smooth":
  24693. return 2;
  24694. case"phase":
  24695. return 3;
  24696. case"expand":
  24697. return 4;
  24698. case"solid":
  24699. return 5
  24700. }
  24701. }), {description: n.localize(118, null)})),
  24702. cursorSmoothCaretAnimation: K(new h(17, "cursorSmoothCaretAnimation", !1, {description: n.localize(119, null)})),
  24703. cursorStyle: K(new v(18, "cursorStyle", _.Line, "line", ["line", "block", "underline", "line-thin", "block-outline", "underline-thin"], (function (e) {
  24704. switch (e) {
  24705. case"line":
  24706. return _.Line;
  24707. case"block":
  24708. return _.Block;
  24709. case"underline":
  24710. return _.Underline;
  24711. case"line-thin":
  24712. return _.LineThin;
  24713. case"block-outline":
  24714. return _.BlockOutline;
  24715. case"underline-thin":
  24716. return _.UnderlineThin
  24717. }
  24718. }), {description: n.localize(120, null)})),
  24719. cursorSurroundingLines: K(new p(19, "cursorSurroundingLines", 0, 0, 1073741824, {description: n.localize(121, null)})),
  24720. cursorSurroundingLinesStyle: K(new m(20, "cursorSurroundingLinesStyle", "default", ["default", "all"], {
  24721. enumDescriptions: [n.localize(122, null), n.localize(123, null)],
  24722. description: n.localize(124, null)
  24723. })),
  24724. cursorWidth: K(new p(21, "cursorWidth", 0, 0, 1073741824, {markdownDescription: n.localize(125, null)})),
  24725. disableLayerHinting: K(new h(22, "disableLayerHinting", !1)),
  24726. disableMonospaceOptimizations: K(new h(23, "disableMonospaceOptimizations", !1)),
  24727. dragAndDrop: K(new h(24, "dragAndDrop", !0, {description: n.localize(126, null)})),
  24728. emptySelectionClipboard: K(new S),
  24729. extraEditorClassName: K(new f(26, "extraEditorClassName", "")),
  24730. fastScrollSensitivity: K(new g(27, "fastScrollSensitivity", 5, (function (e) {
  24731. return e <= 0 ? 5 : e
  24732. }), {markdownDescription: n.localize(127, null)})),
  24733. find: K(new w),
  24734. fixedOverflowWidgets: K(new h(29, "fixedOverflowWidgets", !1)),
  24735. folding: K(new h(30, "folding", !0, {description: n.localize(128, null)})),
  24736. foldingStrategy: K(new m(31, "foldingStrategy", "auto", ["auto", "indentation"], {markdownDescription: n.localize(129, null)})),
  24737. foldingHighlight: K(new h(32, "foldingHighlight", !0, {description: n.localize(130, null)})),
  24738. fontFamily: K(new f(33, "fontFamily", t.EDITOR_FONT_DEFAULTS.fontFamily, {description: n.localize(131, null)})),
  24739. fontInfo: K(new L),
  24740. fontLigatures2: K(new E),
  24741. fontSize: K(new D),
  24742. fontWeight: K(new f(37, "fontWeight", t.EDITOR_FONT_DEFAULTS.fontWeight, {
  24743. enum: ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
  24744. description: n.localize(132, null)
  24745. })),
  24746. formatOnPaste: K(new h(38, "formatOnPaste", !1, {description: n.localize(133, null)})),
  24747. formatOnType: K(new h(39, "formatOnType", !1, {description: n.localize(134, null)})),
  24748. glyphMargin: K(new h(40, "glyphMargin", !0, {description: n.localize(135, null)})),
  24749. gotoLocation: K(new N),
  24750. hideCursorInOverviewRuler: K(new h(42, "hideCursorInOverviewRuler", !1, {description: n.localize(136, null)})),
  24751. highlightActiveIndentGuide: K(new h(43, "highlightActiveIndentGuide", !0, {description: n.localize(137, null)})),
  24752. hover: K(new x),
  24753. inDiffEditor: K(new h(45, "inDiffEditor", !1)),
  24754. letterSpacing: K(new g(46, "letterSpacing", t.EDITOR_FONT_DEFAULTS.letterSpacing, (function (e) {
  24755. return g.clamp(e, -5, 20)
  24756. }), {description: n.localize(138, null)})),
  24757. lightbulb: K(new M),
  24758. lineDecorationsWidth: K(new c(48, "lineDecorationsWidth", 10)),
  24759. lineHeight: K(new k),
  24760. lineNumbers: K(new A),
  24761. lineNumbersMinChars: K(new p(51, "lineNumbersMinChars", 5, 1, 300)),
  24762. links: K(new h(52, "links", !0, {description: n.localize(139, null)})),
  24763. matchBrackets: K(new m(53, "matchBrackets", "always", ["always", "near", "never"], {description: n.localize(140, null)})),
  24764. minimap: K(new T),
  24765. mouseStyle: K(new m(55, "mouseStyle", "text", ["text", "default", "copy"])),
  24766. mouseWheelScrollSensitivity: K(new g(56, "mouseWheelScrollSensitivity", 1, (function (e) {
  24767. return 0 === e ? 1 : e
  24768. }), {markdownDescription: n.localize(141, null)})),
  24769. mouseWheelZoom: K(new h(57, "mouseWheelZoom", !1, {markdownDescription: n.localize(142, null)})),
  24770. multiCursorMergeOverlapping: K(new h(58, "multiCursorMergeOverlapping", !0, {description: n.localize(143, null)})),
  24771. multiCursorModifier: K(new v(59, "multiCursorModifier", "altKey", "alt", ["ctrlCmd", "alt"], (function (e) {
  24772. return "ctrlCmd" === e ? i.isMacintosh ? "metaKey" : "ctrlKey" : "altKey"
  24773. }), {
  24774. markdownEnumDescriptions: [n.localize(144, null), n.localize(145, null)],
  24775. markdownDescription: n.localize(146, null)
  24776. })),
  24777. multiCursorPaste: K(new m(60, "multiCursorPaste", "spread", ["spread", "full"], {
  24778. markdownEnumDescriptions: [n.localize(147, null), n.localize(148, null)],
  24779. markdownDescription: n.localize(149, null)
  24780. })),
  24781. occurrencesHighlight: K(new h(61, "occurrencesHighlight", !0, {description: n.localize(150, null)})),
  24782. overviewRulerBorder: K(new h(62, "overviewRulerBorder", !0, {description: n.localize(151, null)})),
  24783. overviewRulerLanes: K(new p(63, "overviewRulerLanes", 3, 0, 3)),
  24784. parameterHints: K(new R),
  24785. peekWidgetDefaultFocus: K(new m(65, "peekWidgetDefaultFocus", "tree", ["tree", "editor"], {
  24786. enumDescriptions: [n.localize(152, null), n.localize(153, null)],
  24787. description: n.localize(154, null)
  24788. })),
  24789. quickSuggestions: K(new P),
  24790. quickSuggestionsDelay: K(new p(67, "quickSuggestionsDelay", 10, 0, 1073741824, {description: n.localize(155, null)})),
  24791. readOnly: K(new h(68, "readOnly", !1)),
  24792. renderControlCharacters: K(new h(69, "renderControlCharacters", !1, {description: n.localize(156, null)})),
  24793. renderIndentGuides: K(new h(70, "renderIndentGuides", !0, {description: n.localize(157, null)})),
  24794. renderFinalNewline: K(new h(71, "renderFinalNewline", !0, {description: n.localize(158, null)})),
  24795. renderLineHighlight: K(new m(72, "renderLineHighlight", "line", ["none", "gutter", "line", "all"], {
  24796. enumDescriptions: ["", "", "", n.localize(159, null)],
  24797. description: n.localize(160, null)
  24798. })),
  24799. renderValidationDecorations: K(new m(73, "renderValidationDecorations", "editable", ["editable", "on", "off"])),
  24800. renderWhitespace: K(new m(74, "renderWhitespace", "none", ["none", "boundary", "selection", "all"], {
  24801. enumDescriptions: ["", n.localize(161, null), n.localize(162, null), ""],
  24802. description: n.localize(163, null)
  24803. })),
  24804. revealHorizontalRightPadding: K(new p(75, "revealHorizontalRightPadding", 30, 0, 1e3)),
  24805. roundedSelection: K(new h(76, "roundedSelection", !0, {description: n.localize(164, null)})),
  24806. rulers: K(new F),
  24807. scrollbar: K(new B),
  24808. scrollBeyondLastColumn: K(new p(79, "scrollBeyondLastColumn", 5, 0, 1073741824, {description: n.localize(165, null)})),
  24809. scrollBeyondLastLine: K(new h(80, "scrollBeyondLastLine", !0, {description: n.localize(166, null)})),
  24810. selectionClipboard: K(new h(81, "selectionClipboard", !0, {
  24811. description: n.localize(167, null),
  24812. included: i.isLinux
  24813. })),
  24814. selectionHighlight: K(new h(82, "selectionHighlight", !0, {description: n.localize(168, null)})),
  24815. selectOnLineNumbers: K(new h(83, "selectOnLineNumbers", !0)),
  24816. showFoldingControls: K(new m(84, "showFoldingControls", "mouseover", ["always", "mouseover"], {description: n.localize(169, null)})),
  24817. showUnused: K(new h(85, "showUnused", !0, {description: n.localize(170, null)})),
  24818. snippetSuggestions: K(new m(86, "snippetSuggestions", "inline", ["top", "bottom", "inline", "none"], {
  24819. enumDescriptions: [n.localize(171, null), n.localize(172, null), n.localize(173, null), n.localize(174, null)],
  24820. description: n.localize(175, null)
  24821. })),
  24822. smoothScrolling: K(new h(87, "smoothScrolling", !1, {description: n.localize(176, null)})),
  24823. stopRenderingLineAfter: K(new p(88, "stopRenderingLineAfter", 1e4, -1, 1073741824)),
  24824. suggest: K(new V),
  24825. suggestFontSize: K(new p(90, "suggestFontSize", 0, 0, 1e3, {markdownDescription: n.localize(177, null)})),
  24826. suggestLineHeight: K(new p(91, "suggestLineHeight", 0, 0, 1e3, {markdownDescription: n.localize(178, null)})),
  24827. suggestOnTriggerCharacters: K(new h(92, "suggestOnTriggerCharacters", !0, {description: n.localize(179, null)})),
  24828. suggestSelection: K(new m(93, "suggestSelection", "recentlyUsed", ["first", "recentlyUsed", "recentlyUsedByPrefix"], {
  24829. markdownEnumDescriptions: [n.localize(180, null), n.localize(181, null), n.localize(182, null)],
  24830. description: n.localize(183, null)
  24831. })),
  24832. tabCompletion: K(new m(94, "tabCompletion", "off", ["on", "off", "onlySnippets"], {
  24833. enumDescriptions: [n.localize(184, null), n.localize(185, null), n.localize(186, null)],
  24834. description: n.localize(187, null)
  24835. })),
  24836. useTabStops: K(new h(95, "useTabStops", !0, {description: n.localize(188, null)})),
  24837. wordSeparators: K(new f(96, "wordSeparators", o.USUAL_WORD_SEPARATORS, {description: n.localize(189, null)})),
  24838. wordWrap: K(new m(97, "wordWrap", "off", ["off", "on", "wordWrapColumn", "bounded"], {
  24839. markdownEnumDescriptions: [n.localize(190, null), n.localize(191, null), n.localize(192, null), n.localize(193, null)],
  24840. description: n.localize(194, null)
  24841. })),
  24842. wordWrapBreakAfterCharacters: K(new f(98, "wordWrapBreakAfterCharacters", " \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),
  24843. wordWrapBreakBeforeCharacters: K(new f(99, "wordWrapBreakBeforeCharacters", "([{‘“〈《「『【〔([{「£¥$£¥++")),
  24844. wordWrapColumn: K(new p(100, "wordWrapColumn", 80, 1, 1073741824, {markdownDescription: n.localize(195, null)})),
  24845. wordWrapMinified: K(new h(101, "wordWrapMinified", !0)),
  24846. wrappingIndent: K(new v(102, "wrappingIndent", 1, "same", ["none", "same", "indent", "deepIndent"], (function (e) {
  24847. switch (e) {
  24848. case"none":
  24849. return 0;
  24850. case"same":
  24851. return 1;
  24852. case"indent":
  24853. return 2;
  24854. case"deepIndent":
  24855. return 3
  24856. }
  24857. }), {
  24858. enumDescriptions: [n.localize(196, null), n.localize(197, null), n.localize(198, null), n.localize(199, null)],
  24859. description: n.localize(200, null)
  24860. })),
  24861. wrappingStrategy: K(new m(103, "wrappingStrategy", "simple", ["simple", "advanced"], {
  24862. enumDescriptions: [n.localize(201, null), n.localize(202, null)],
  24863. description: n.localize(203, null)
  24864. })),
  24865. editorClassName: K(new b),
  24866. pixelRatio: K(new O),
  24867. tabFocusMode: K(new z),
  24868. layoutInfo: K(new I),
  24869. wrappingInfo: K(new H)
  24870. }
  24871. })), define(n[424], i([0, 1, 13, 3, 69, 33]), (function (e, t, n, i, o, r) {
  24872. "use strict";
  24873. Object.defineProperty(t, "__esModule", {value: !0})
  24874. ;var s = function () {
  24875. function e(e, t, n, i, o) {
  24876. this.editorId = e, this.model = t, this.configuration = n, this._linesCollection = i, this._coordinatesConverter = o, this._decorationsCache = Object.create(null), this._cachedModelDecorationsResolver = null, this._cachedModelDecorationsResolverViewRange = null
  24877. }
  24878. return e.prototype._clearCachedModelDecorationsResolver = function () {
  24879. this._cachedModelDecorationsResolver = null, this._cachedModelDecorationsResolverViewRange = null
  24880. }, e.prototype.dispose = function () {
  24881. this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver()
  24882. }, e.prototype.reset = function () {
  24883. this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver()
  24884. }, e.prototype.onModelDecorationsChanged = function () {
  24885. this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver()
  24886. }, e.prototype.onLineMappingChanged = function () {
  24887. this._decorationsCache = Object.create(null), this._clearCachedModelDecorationsResolver()
  24888. }, e.prototype._getOrCreateViewModelDecoration = function (e) {
  24889. var t = e.id, r = this._decorationsCache[t];
  24890. if (!r) {
  24891. var s = e.range, a = e.options, l = void 0;
  24892. if (a.isWholeLine) {
  24893. var u = this._coordinatesConverter.convertModelPositionToViewPosition(new n.Position(s.startLineNumber, 1)),
  24894. d = this._coordinatesConverter.convertModelPositionToViewPosition(new n.Position(s.endLineNumber, this.model.getLineMaxColumn(s.endLineNumber)));
  24895. l = new i.Range(u.lineNumber, u.column, d.lineNumber, d.column)
  24896. } else l = this._coordinatesConverter.convertModelRangeToViewRange(s);
  24897. r = new o.ViewModelDecoration(l, a), this._decorationsCache[t] = r
  24898. }
  24899. return r
  24900. }, e.prototype.getDecorationsViewportData = function (e) {
  24901. var t = null !== this._cachedModelDecorationsResolver;
  24902. return (t = t && e.equalsRange(this._cachedModelDecorationsResolverViewRange)) || (this._cachedModelDecorationsResolver = this._getDecorationsViewportData(e), this._cachedModelDecorationsResolverViewRange = e), this._cachedModelDecorationsResolver
  24903. }, e.prototype._getDecorationsViewportData = function (e) {
  24904. for (var t = this._linesCollection.getDecorationsInRange(e, this.editorId, r.filterValidationDecorations(this.configuration.options)), n = e.startLineNumber, s = e.endLineNumber, a = [], l = 0, u = [], d = n; d <= s; d++) u[d - n] = [];
  24905. for (var c = 0, h = t.length; c < h; c++) {
  24906. var p = t[c], g = p.options, f = this._getOrCreateViewModelDecoration(p), m = f.range;
  24907. if (a[l++] = f, g.inlineClassName) {
  24908. var v = new o.InlineDecoration(m, g.inlineClassName, g.inlineClassNameAffectsLetterSpacing ? 3 : 0),
  24909. _ = Math.max(n, m.startLineNumber), y = Math.min(s, m.endLineNumber);
  24910. for (d = _; d <= y; d++) u[d - n].push(v)
  24911. }
  24912. if (g.beforeContentClassName && n <= m.startLineNumber && m.startLineNumber <= s) {
  24913. v = new o.InlineDecoration(new i.Range(m.startLineNumber, m.startColumn, m.startLineNumber, m.startColumn), g.beforeContentClassName, 1);
  24914. u[m.startLineNumber - n].push(v)
  24915. }
  24916. if (g.afterContentClassName && n <= m.endLineNumber && m.endLineNumber <= s) {
  24917. v = new o.InlineDecoration(new i.Range(m.endLineNumber, m.endColumn, m.endLineNumber, m.endColumn), g.afterContentClassName, 2);
  24918. u[m.endLineNumber - n].push(v)
  24919. }
  24920. }
  24921. return {decorations: a, inlineDecorations: u}
  24922. },
  24923. e
  24924. }();
  24925. t.ViewModelDecorations = s
  24926. })), define(n[425], i([7, 8]), (function (e, t) {
  24927. return e.create("vs/editor/common/modes/modesRegistry", t)
  24928. })), define(n[426], i([7, 8]), (function (e, t) {
  24929. return e.create("vs/editor/common/standaloneStrings", t)
  24930. })), define(n[59], i([0, 1, 426]), (function (e, t, n) {
  24931. "use strict";
  24932. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  24933. e.noSelection = n.localize(0, null), e.singleSelectionRange = n.localize(1, null), e.singleSelection = n.localize(2, null), e.multiSelectionRange = n.localize(3, null), e.multiSelection = n.localize(4, null), e.emergencyConfOn = n.localize(5, null), e.openingDocs = n.localize(6, null), e.readonlyDiffEditor = n.localize(7, null), e.editableDiffEditor = n.localize(8, null), e.readonlyEditor = n.localize(9, null), e.editableEditor = n.localize(10, null), e.changeConfigToOnMac = n.localize(11, null), e.changeConfigToOnWinLinux = n.localize(12, null), e.auto_on = n.localize(13, null), e.auto_off = n.localize(14, null), e.tabFocusModeOnMsg = n.localize(15, null), e.tabFocusModeOnMsgNoKb = n.localize(16, null),
  24934. e.tabFocusModeOffMsg = n.localize(17, null), e.tabFocusModeOffMsgNoKb = n.localize(18, null), e.openDocMac = n.localize(19, null), e.openDocWinLinux = n.localize(20, null), e.outroMsg = n.localize(21, null), e.showAccessibilityHelpAction = n.localize(22, null)
  24935. }(t.AccessibilityHelpNLS || (t.AccessibilityHelpNLS = {})), function (e) {
  24936. e.inspectTokensAction = n.localize(23, null)
  24937. }(t.InspectTokensNLS || (t.InspectTokensNLS = {})), function (e) {
  24938. e.gotoLineLabelValidLineAndColumn = n.localize(24, null), e.gotoLineLabelValidLine = n.localize(25, null), e.gotoLineLabelEmptyWithLineLimit = n.localize(26, null), e.gotoLineLabelEmptyWithLineAndColumnLimit = n.localize(27, null), e.gotoLineAriaLabel = n.localize(28, null), e.gotoLineActionInput = n.localize(29, null), e.gotoLineActionLabel = n.localize(30, null)
  24939. }(t.GoToLineNLS || (t.GoToLineNLS = {})), function (e) {
  24940. e.ariaLabelEntryWithKey = n.localize(31, null), e.ariaLabelEntry = n.localize(32, null), e.quickCommandActionInput = n.localize(33, null), e.quickCommandActionLabel = n.localize(34, null)
  24941. }(t.QuickCommandNLS || (t.QuickCommandNLS = {})), function (e) {
  24942. e.entryAriaLabel = n.localize(35, null), e.quickOutlineActionInput = n.localize(36, null), e.quickOutlineActionLabel = n.localize(37, null), e._symbols_ = n.localize(38, null), e._modules_ = n.localize(39, null), e._class_ = n.localize(40, null), e._interface_ = n.localize(41, null), e._method_ = n.localize(42, null), e._function_ = n.localize(43, null), e._property_ = n.localize(44, null), e._variable_ = n.localize(45, null), e._variable2_ = n.localize(46, null), e._constructor_ = n.localize(47, null), e._call_ = n.localize(48, null)
  24943. }(t.QuickOutlineNLS || (t.QuickOutlineNLS = {})), function (e) {
  24944. e.editorViewAccessibleLabel = n.localize(49, null), e.accessibilityHelpMessageIE = n.localize(50, null), e.accessibilityHelpMessage = n.localize(51, null)
  24945. }(t.StandaloneCodeEditorNLS || (t.StandaloneCodeEditorNLS = {})), function (e) {
  24946. e.toggleHighContrast = n.localize(52, null)
  24947. }(t.ToggleHighContrastNLS || (t.ToggleHighContrastNLS = {})), function (e) {
  24948. e.bulkEditServiceSummary = n.localize(53, null)
  24949. }(t.SimpleServicesNLS || (t.SimpleServicesNLS = {}))
  24950. })), define(n[427], i([7, 8]), (function (e, t) {
  24951. return e.create("vs/editor/common/view/editorColorRegistry", t)
  24952. })), define(n[428], i([7, 8]), (function (e, t) {
  24953. return e.create("vs/editor/contrib/bracketMatching/bracketMatching", t)
  24954. })), define(n[429], i([7, 8]), (function (e, t) {
  24955. return e.create("vs/editor/contrib/caretOperations/caretOperations", t)
  24956. })), define(n[430], i([7, 8]), (function (e, t) {
  24957. return e.create("vs/editor/contrib/caretOperations/transpose", t)
  24958. })), define(n[431], i([7, 8]), (function (e, t) {
  24959. return e.create("vs/editor/contrib/clipboard/clipboard", t)
  24960. })), define(n[432], i([7, 8]), (function (e, t) {
  24961. return e.create("vs/editor/contrib/codeAction/codeActionCommands", t)
  24962. })), define(n[433], i([7, 8]), (function (e, t) {
  24963. return e.create("vs/editor/contrib/codeAction/lightBulbWidget", t)
  24964. })), define(n[434], i([7, 8]), (function (e, t) {
  24965. return e.create("vs/editor/contrib/comment/comment", t)
  24966. })), define(n[435], i([7, 8]), (function (e, t) {
  24967. return e.create("vs/editor/contrib/contextmenu/contextmenu", t)
  24968. })), define(n[436], i([7, 8]), (function (e, t) {
  24969. return e.create("vs/editor/contrib/cursorUndo/cursorUndo", t)
  24970. })),
  24971. define(n[437], i([7, 8]), (function (e, t) {
  24972. return e.create("vs/editor/contrib/documentSymbols/outlineTree", t)
  24973. })), define(n[438], i([7, 8]), (function (e, t) {
  24974. return e.create("vs/editor/contrib/find/findController", t)
  24975. })), define(n[439], i([7, 8]), (function (e, t) {
  24976. return e.create("vs/editor/contrib/find/findWidget", t)
  24977. })), define(n[440], i([7, 8]), (function (e, t) {
  24978. return e.create("vs/editor/contrib/folding/folding", t)
  24979. })), define(n[441], i([7, 8]), (function (e, t) {
  24980. return e.create("vs/editor/contrib/fontZoom/fontZoom", t)
  24981. })), define(n[442], i([7, 8]), (function (e, t) {
  24982. return e.create("vs/editor/contrib/format/format", t)
  24983. })), define(n[443], i([7, 8]), (function (e, t) {
  24984. return e.create("vs/editor/contrib/format/formatActions", t)
  24985. })), define(n[444], i([7, 8]), (function (e, t) {
  24986. return e.create("vs/editor/contrib/gotoError/gotoError", t)
  24987. })), define(n[445], i([7, 8]), (function (e, t) {
  24988. return e.create("vs/editor/contrib/gotoError/gotoErrorWidget", t)
  24989. })), define(n[446], i([7, 8]), (function (e, t) {
  24990. return e.create("vs/editor/contrib/gotoSymbol/goToCommands", t)
  24991. })),
  24992. define(n[447], i([7, 8]), (function (e, t) {
  24993. return e.create("vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition", t)
  24994. })), define(n[448], i([7, 8]), (function (e, t) {
  24995. return e.create("vs/editor/contrib/gotoSymbol/peek/referencesController", t)
  24996. })), define(n[449], i([7, 8]), (function (e, t) {
  24997. return e.create("vs/editor/contrib/gotoSymbol/peek/referencesTree", t)
  24998. })), define(n[450], i([7, 8]), (function (e, t) {
  24999. return e.create("vs/editor/contrib/gotoSymbol/peek/referencesWidget", t)
  25000. })), define(n[451], i([7, 8]), (function (e, t) {
  25001. return e.create("vs/editor/contrib/gotoSymbol/referencesModel", t)
  25002. })), define(n[113], i([0, 1, 451, 4, 39, 2, 5, 127, 3]), (function (e, t, n, i, o, r, s, a, l) {
  25003. "use strict";
  25004. Object.defineProperty(t, "__esModule", {value: !0});
  25005. var u = function () {
  25006. function e(e, t, n, i) {
  25007. this.isProviderFirst = e, this.parent = t, this._range = n, this._rangeCallback = i, this.id = a.defaultGenerator.nextId()
  25008. }
  25009. return Object.defineProperty(e.prototype, "uri", {
  25010. get: function () {
  25011. return this.parent.uri
  25012. }, enumerable: !0, configurable: !0
  25013. }), Object.defineProperty(e.prototype, "range", {
  25014. get: function () {
  25015. return this._range
  25016. }, set: function (e) {
  25017. this._range = e, this._rangeCallback(this)
  25018. }, enumerable: !0, configurable: !0
  25019. }), Object.defineProperty(e.prototype, "ariaMessage", {
  25020. get: function () {
  25021. return n.localize(0, null, o.basename(this.uri), this.range.startLineNumber, this.range.startColumn)
  25022. }, enumerable: !0, configurable: !0
  25023. }), e
  25024. }();
  25025. t.OneReference = u;
  25026. var d = function () {
  25027. function e(e) {
  25028. this._modelReference = e
  25029. }
  25030. return e.prototype.dispose = function () {
  25031. this._modelReference.dispose()
  25032. }, e.prototype.preview = function (e, t) {
  25033. void 0 === t && (t = 8);
  25034. var n = this._modelReference.object.textEditorModel;
  25035. if (n) {
  25036. var i = e.startLineNumber, o = e.startColumn, r = e.endLineNumber, s = e.endColumn,
  25037. a = n.getWordUntilPosition({lineNumber: i, column: o - t}),
  25038. u = new l.Range(i, a.startColumn, i, o), d = new l.Range(r, s, r, 1073741824),
  25039. c = n.getValueInRange(u).replace(/^\s+/, ""), h = n.getValueInRange(e);
  25040. return {
  25041. value: c + h + n.getValueInRange(d).replace(/\s+$/, ""),
  25042. highlight: {start: c.length, end: c.length + h.length}
  25043. }
  25044. }
  25045. }, e
  25046. }();
  25047. t.FilePreview = d;
  25048. var c = function () {
  25049. function e(e, t) {
  25050. this.parent = e, this.uri = t,
  25051. this.children = []
  25052. }
  25053. return e.prototype.dispose = function () {
  25054. r.dispose(this._preview), this._preview = void 0
  25055. }, Object.defineProperty(e.prototype, "preview", {
  25056. get: function () {
  25057. return this._preview
  25058. }, enumerable: !0, configurable: !0
  25059. }), Object.defineProperty(e.prototype, "failure", {
  25060. get: function () {
  25061. return this._loadFailure
  25062. }, enumerable: !0, configurable: !0
  25063. }), Object.defineProperty(e.prototype, "ariaMessage", {
  25064. get: function () {
  25065. var e = this.children.length;
  25066. return 1 === e ? n.localize(1, null, o.basename(this.uri), this.uri.fsPath) : n.localize(2, null, e, o.basename(this.uri), this.uri.fsPath)
  25067. }, enumerable: !0, configurable: !0
  25068. }), e.prototype.resolve = function (e) {
  25069. var t = this;
  25070. return this._resolved ? Promise.resolve(this) : Promise.resolve(e.createModelReference(this.uri).then((function (e) {
  25071. if (!e.object) throw e.dispose(), new Error;
  25072. return t._preview = new d(e), t._resolved = !0, t
  25073. }), (function (e) {
  25074. return t.children.length = 0, t._resolved = !0, t._loadFailure = e, t
  25075. })))
  25076. }, e
  25077. }();
  25078. t.FileReferences = c;
  25079. var h = function () {
  25080. function e(t, n) {
  25081. var o = this;
  25082. this._disposables = new r.DisposableStore,
  25083. this.groups = [], this.references = [], this._onDidChangeReferenceRange = new i.Emitter, this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event, this._links = t, this._title = n;
  25084. var s, a = t[0];
  25085. t.sort(e._compareReferences);
  25086. for (var d = 0, h = t; d < h.length; d++) {
  25087. var p = h[d];
  25088. if (s && s.uri.toString() === p.uri.toString() || (s = new c(this, p.uri), this.groups.push(s)), 0 === s.children.length || !l.Range.equalsRange(p.range, s.children[s.children.length - 1].range)) {
  25089. var g = new u(a === p, s, p.targetSelectionRange || p.range, (function (e) {
  25090. return o._onDidChangeReferenceRange.fire(e)
  25091. }));
  25092. this.references.push(g), s.children.push(g)
  25093. }
  25094. }
  25095. }
  25096. return e.prototype.dispose = function () {
  25097. r.dispose(this.groups), this._disposables.dispose(), this._onDidChangeReferenceRange.dispose(), this.groups.length = 0
  25098. }, e.prototype.clone = function () {
  25099. return new e(this._links, this._title)
  25100. }, Object.defineProperty(e.prototype, "title", {
  25101. get: function () {
  25102. return this._title
  25103. }, enumerable: !0, configurable: !0
  25104. }), Object.defineProperty(e.prototype, "isEmpty", {
  25105. get: function () {
  25106. return 0 === this.groups.length
  25107. },
  25108. enumerable: !0, configurable: !0
  25109. }), Object.defineProperty(e.prototype, "ariaMessage", {
  25110. get: function () {
  25111. return this.isEmpty ? n.localize(3, null) : 1 === this.references.length ? n.localize(4, null, this.references[0].uri.fsPath) : 1 === this.groups.length ? n.localize(5, null, this.references.length, this.groups[0].uri.fsPath) : n.localize(6, null, this.references.length, this.groups.length)
  25112. }, enumerable: !0, configurable: !0
  25113. }), e.prototype.nextOrPreviousReference = function (e, t) {
  25114. var n = e.parent, i = n.children.indexOf(e), o = n.children.length, r = n.parent.groups.length;
  25115. return 1 === r || t && i + 1 < o || !t && i > 0 ? (i = t ? (i + 1) % o : (i + o - 1) % o, n.children[i]) : (i = n.parent.groups.indexOf(n), t ? (i = (i + 1) % r, n.parent.groups[i].children[0]) : (i = (i + r - 1) % r, n.parent.groups[i].children[n.parent.groups[i].children.length - 1]))
  25116. }, e.prototype.nearestReference = function (e, t) {
  25117. var n = this.references.map((function (n, i) {
  25118. return {
  25119. idx: i,
  25120. prefixLen: s.commonPrefixLength(n.uri.toString(), e.toString()),
  25121. offsetDist: 100 * Math.abs(n.range.startLineNumber - t.lineNumber) + Math.abs(n.range.startColumn - t.column)
  25122. }
  25123. })).sort((function (e, t) {
  25124. return e.prefixLen > t.prefixLen ? -1 : e.prefixLen < t.prefixLen ? 1 : e.offsetDist < t.offsetDist ? -1 : e.offsetDist > t.offsetDist ? 1 : 0
  25125. }))[0];
  25126. if (n) return this.references[n.idx]
  25127. }, e.prototype.referenceAt = function (e, t) {
  25128. for (var n = 0, i = this.references; n < i.length; n++) {
  25129. var o = i[n];
  25130. if (o.uri.toString() === e.toString() && l.Range.containsPosition(o.range, t)) return o
  25131. }
  25132. }, e.prototype.firstReference = function () {
  25133. for (var e = 0, t = this.references; e < t.length; e++) {
  25134. var n = t[e];
  25135. if (n.isProviderFirst) return n
  25136. }
  25137. return this.references[0]
  25138. }, e._compareReferences = function (e, t) {
  25139. return s.compare(e.uri.toString(), t.uri.toString()) || l.Range.compareRangesUsingStarts(e.range, t.range)
  25140. }, e
  25141. }();
  25142. t.ReferencesModel = h
  25143. })), define(n[452], i([7, 8]), (function (e, t) {
  25144. return e.create("vs/editor/contrib/gotoSymbol/symbolNavigation", t)
  25145. })), define(n[453], i([7, 8]), (function (e, t) {
  25146. return e.create("vs/editor/contrib/hover/hover", t)
  25147. })), define(n[454], i([7, 8]), (function (e, t) {
  25148. return e.create("vs/editor/contrib/hover/modesContentHover", t)
  25149. })), define(n[455], i([7, 8]), (function (e, t) {
  25150. return e.create("vs/editor/contrib/inPlaceReplace/inPlaceReplace", t)
  25151. })), define(n[456], i([7, 8]), (function (e, t) {
  25152. return e.create("vs/editor/contrib/linesOperations/linesOperations", t)
  25153. })), define(n[457], i([7, 8]), (function (e, t) {
  25154. return e.create("vs/editor/contrib/links/links", t)
  25155. })), define(n[458], i([7, 8]), (function (e, t) {
  25156. return e.create("vs/editor/contrib/message/messageController", t)
  25157. })), define(n[459], i([7, 8]), (function (e, t) {
  25158. return e.create("vs/editor/contrib/multicursor/multicursor", t)
  25159. })), define(n[460], i([7, 8]), (function (e, t) {
  25160. return e.create("vs/editor/contrib/parameterHints/parameterHints", t)
  25161. })), define(n[461], i([7, 8]), (function (e, t) {
  25162. return e.create("vs/editor/contrib/parameterHints/parameterHintsWidget", t)
  25163. })), define(n[462], i([7, 8]), (function (e, t) {
  25164. return e.create("vs/editor/contrib/peekView/peekView", t)
  25165. })), define(n[463], i([7, 8]), (function (e, t) {
  25166. return e.create("vs/editor/contrib/rename/rename", t)
  25167. })), define(n[464], i([7, 8]), (function (e, t) {
  25168. return e.create("vs/editor/contrib/rename/renameInputField", t)
  25169. })),
  25170. define(n[465], i([7, 8]), (function (e, t) {
  25171. return e.create("vs/editor/contrib/smartSelect/smartSelect", t)
  25172. })), define(n[466], i([7, 8]), (function (e, t) {
  25173. return e.create("vs/editor/contrib/snippet/snippetVariables", t)
  25174. })), define(n[467], i([7, 8]), (function (e, t) {
  25175. return e.create("vs/editor/contrib/suggest/suggestController", t)
  25176. })), define(n[468], i([7, 8]), (function (e, t) {
  25177. return e.create("vs/editor/contrib/suggest/suggestWidget", t)
  25178. })), define(n[469], i([7, 8]), (function (e, t) {
  25179. return e.create("vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode", t)
  25180. })), define(n[470], i([7, 8]), (function (e, t) {
  25181. return e.create("vs/editor/contrib/tokenization/tokenization", t)
  25182. })), define(n[471], i([7, 8]), (function (e, t) {
  25183. return e.create("vs/editor/contrib/wordHighlighter/wordHighlighter", t)
  25184. })), define(n[472], i([7, 8]), (function (e, t) {
  25185. return e.create("vs/platform/configuration/common/configurationRegistry", t)
  25186. })), define(n[473], i([7, 8]), (function (e, t) {
  25187. return e.create("vs/platform/keybinding/common/abstractKeybindingService", t)
  25188. })),
  25189. define(n[474], i([7, 8]), (function (e, t) {
  25190. return e.create("vs/platform/list/browser/listService", t)
  25191. })), define(n[475], i([7, 8]), (function (e, t) {
  25192. return e.create("vs/platform/markers/common/markers", t)
  25193. })), define(n[476], i([7, 8]), (function (e, t) {
  25194. return e.create("vs/platform/theme/common/colorRegistry", t)
  25195. })), define(n[477], i([0, 1]), (function (e, t) {
  25196. "use strict";
  25197. Object.defineProperty(t, "__esModule", {value: !0}), t.InputFocusedContextKey = "inputFocus"
  25198. })), define(n[478], i([0, 1]), (function (e, t) {
  25199. "use strict";
  25200. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  25201. e[e.API = 0] = "API", e[e.USER = 1] = "USER"
  25202. }(t.EditorOpenContext || (t.EditorOpenContext = {}))
  25203. })), define(n[479], i([0, 1]), (function (e, t) {
  25204. "use strict";
  25205. Object.defineProperty(t, "__esModule", {value: !0});
  25206. var n = function () {
  25207. function e(e) {
  25208. this.value = e, this._lower = e.toLowerCase()
  25209. }
  25210. return e.toKey = function (e) {
  25211. return "string" == typeof e ? e.toLowerCase() : e._lower
  25212. }, e
  25213. }();
  25214. t.ExtensionIdentifier = n
  25215. })), define(n[208], i([0, 1]), (function (e, t) {
  25216. "use strict";
  25217. Object.defineProperty(t, "__esModule", {value: !0}),
  25218. function (e) {
  25219. e[e.FILE = 0] = "FILE", e[e.FOLDER = 1] = "FOLDER", e[e.ROOT_FOLDER = 2] = "ROOT_FOLDER"
  25220. }(t.FileKind || (t.FileKind = {}))
  25221. })), define(n[209], i([0, 1]), (function (e, t) {
  25222. "use strict";
  25223. Object.defineProperty(t, "__esModule", {value: !0});
  25224. var n = function (e, t, n) {
  25225. void 0 === t && (t = []), void 0 === n && (n = !1), this.ctor = e, this.staticArguments = t, this.supportsDelayedInstantiation = n
  25226. };
  25227. t.SyncDescriptor = n
  25228. })), define(n[83], i([0, 1, 209]), (function (e, t, n) {
  25229. "use strict";
  25230. Object.defineProperty(t, "__esModule", {value: !0});
  25231. var i = [];
  25232. t.registerSingleton = function (e, t, o) {
  25233. i.push([e, new n.SyncDescriptor(t, [], o)])
  25234. }, t.getSingletonServiceDescriptors = function () {
  25235. return i
  25236. }
  25237. })), define(n[480], i([0, 1, 21, 87]), (function (e, t, n, i) {
  25238. "use strict";
  25239. Object.defineProperty(t, "__esModule", {value: !0});
  25240. var o = function () {
  25241. function e(e) {
  25242. this._hashFn = e, this._nodes = Object.create(null)
  25243. }
  25244. return e.prototype.roots = function () {
  25245. var e = [];
  25246. return i.forEach(this._nodes, (function (t) {
  25247. n.isEmptyObject(t.value.outgoing) && e.push(t.value)
  25248. })), e
  25249. }, e.prototype.insertEdge = function (e, t) {
  25250. var n = this.lookupOrInsertNode(e), i = this.lookupOrInsertNode(t);
  25251. n.outgoing[this._hashFn(t)] = i, i.incoming[this._hashFn(e)] = n
  25252. }, e.prototype.removeNode = function (e) {
  25253. var t = this._hashFn(e);
  25254. delete this._nodes[t], i.forEach(this._nodes, (function (e) {
  25255. delete e.value.outgoing[t], delete e.value.incoming[t]
  25256. }))
  25257. }, e.prototype.lookupOrInsertNode = function (e) {
  25258. var t = this._hashFn(e), n = this._nodes[t];
  25259. return n || (n = function (e) {
  25260. return {data: e, incoming: Object.create(null), outgoing: Object.create(null)}
  25261. }(e), this._nodes[t] = n), n
  25262. }, e.prototype.isEmpty = function () {
  25263. for (var e in this._nodes) return !1;
  25264. return !0
  25265. }, e.prototype.toString = function () {
  25266. var e = [];
  25267. return i.forEach(this._nodes, (function (t) {
  25268. e.push(t.key + ", (incoming)[" + Object.keys(t.value.incoming).join(", ") + "], (outgoing)[" + Object.keys(t.value.outgoing).join(",") + "]")
  25269. })), e.join("\n")
  25270. }, e
  25271. }();
  25272. t.Graph = o
  25273. })), define(n[11], i([0, 1]), (function (e, t) {
  25274. "use strict";
  25275. var n;
  25276. function i(e, t, i, o) {
  25277. t[n.DI_TARGET] === t ? t[n.DI_DEPENDENCIES].push({
  25278. id: e,
  25279. index: i,
  25280. optional: o
  25281. }) : (t[n.DI_DEPENDENCIES] = [{id: e, index: i, optional: o}],
  25282. t[n.DI_TARGET] = t)
  25283. }
  25284. function o(e) {
  25285. if (n.serviceIds.has(e)) return n.serviceIds.get(e);
  25286. var t = function (e, n, o) {
  25287. if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
  25288. i(t, e, o, !1)
  25289. };
  25290. return t.toString = function () {
  25291. return e
  25292. }, n.serviceIds.set(e, t), t
  25293. }
  25294. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  25295. e.serviceIds = new Map, e.DI_TARGET = "$di$target", e.DI_DEPENDENCIES = "$di$dependencies", e.getServiceDependencies = function (t) {
  25296. return t[e.DI_DEPENDENCIES] || []
  25297. }
  25298. }(n = t._util || (t._util = {})), t.IInstantiationService = o("instantiationService"), t.createDecorator = o, t.optional = function (e) {
  25299. return function (t, n, o) {
  25300. if (3 !== arguments.length) throw new Error("@optional-decorator can only be used to decorate a parameter");
  25301. i(e, t, o, !0)
  25302. }
  25303. }
  25304. })), define(n[156], i([0, 1, 11]), (function (e, t, n) {
  25305. "use strict";
  25306. Object.defineProperty(t, "__esModule", {value: !0}), t.IBulkEditService = n.createDecorator("IWorkspaceEditService")
  25307. })), define(n[32], i([0, 1, 11]), (function (e, t, n) {
  25308. "use strict"
  25309. ;Object.defineProperty(t, "__esModule", {value: !0}), t.ICodeEditorService = n.createDecorator("codeEditorService")
  25310. })), define(n[62], i([0, 1, 11]), (function (e, t, n) {
  25311. "use strict";
  25312. Object.defineProperty(t, "__esModule", {value: !0}), t.ID_EDITOR_WORKER_SERVICE = "editorWorkerService", t.IEditorWorkerService = n.createDecorator(t.ID_EDITOR_WORKER_SERVICE)
  25313. })), define(n[210], i([0, 1, 11]), (function (e, t, n) {
  25314. "use strict";
  25315. Object.defineProperty(t, "__esModule", {value: !0}), t.IMarkerDecorationsService = n.createDecorator("markerDecorationsService")
  25316. })), define(n[71], i([0, 1, 11]), (function (e, t, n) {
  25317. "use strict";
  25318. Object.defineProperty(t, "__esModule", {value: !0}), t.IModeService = n.createDecorator("modeService")
  25319. })), define(n[49], i([0, 1, 11]), (function (e, t, n) {
  25320. "use strict";
  25321. Object.defineProperty(t, "__esModule", {value: !0}), t.IModelService = n.createDecorator("modelService"), t.shouldSynchronizeModel = function (e) {
  25322. return !e.isTooLargeForSyncing() && !e.isForSimpleWidget
  25323. }
  25324. })), define(n[481], i([0, 1, 4, 2, 350, 49]), (function (e, t, n, i, o, r) {
  25325. "use strict";
  25326. function s(e) {
  25327. return "string" != typeof e && (Array.isArray(e) ? e.every(s) : !!e.exclusive)
  25328. }
  25329. Object.defineProperty(t, "__esModule", {value: !0});
  25330. var a = function () {
  25331. function e() {
  25332. this._clock = 0, this._entries = [], this._onDidChange = new n.Emitter
  25333. }
  25334. return Object.defineProperty(e.prototype, "onDidChange", {
  25335. get: function () {
  25336. return this._onDidChange.event
  25337. }, enumerable: !0, configurable: !0
  25338. }), e.prototype.register = function (e, t) {
  25339. var n = this, o = {selector: e, provider: t, _score: -1, _time: this._clock++};
  25340. return this._entries.push(o), this._lastCandidate = void 0, this._onDidChange.fire(this._entries.length), i.toDisposable((function () {
  25341. if (o) {
  25342. var e = n._entries.indexOf(o);
  25343. e >= 0 && (n._entries.splice(e, 1), n._lastCandidate = void 0, n._onDidChange.fire(n._entries.length), o = void 0)
  25344. }
  25345. }))
  25346. }, e.prototype.has = function (e) {
  25347. return this.all(e).length > 0
  25348. }, e.prototype.all = function (e) {
  25349. if (!e) return [];
  25350. this._updateScores(e);
  25351. for (var t = [], n = 0, i = this._entries; n < i.length; n++) {
  25352. var o = i[n];
  25353. o._score > 0 && t.push(o.provider)
  25354. }
  25355. return t
  25356. }, e.prototype.ordered = function (e) {
  25357. var t = []
  25358. ;
  25359. return this._orderedForEach(e, (function (e) {
  25360. return t.push(e.provider)
  25361. })), t
  25362. }, e.prototype.orderedGroups = function (e) {
  25363. var t, n, i = [];
  25364. return this._orderedForEach(e, (function (e) {
  25365. t && n === e._score ? t.push(e.provider) : (n = e._score, t = [e.provider], i.push(t))
  25366. })), i
  25367. }, e.prototype._orderedForEach = function (e, t) {
  25368. if (e) {
  25369. this._updateScores(e);
  25370. for (var n = 0, i = this._entries; n < i.length; n++) {
  25371. var o = i[n];
  25372. o._score > 0 && t(o)
  25373. }
  25374. }
  25375. }, e.prototype._updateScores = function (t) {
  25376. var n = {uri: t.uri.toString(), language: t.getLanguageIdentifier().language};
  25377. if (!this._lastCandidate || this._lastCandidate.language !== n.language || this._lastCandidate.uri !== n.uri) {
  25378. this._lastCandidate = n;
  25379. for (var i = 0, a = this._entries; i < a.length; i++) {
  25380. var l = a[i];
  25381. if (l._score = o.score(l.selector, t.uri, t.getLanguageIdentifier().language, r.shouldSynchronizeModel(t)), s(l.selector) && l._score > 0) {
  25382. for (var u = 0, d = this._entries; u < d.length; u++) {
  25383. d[u]._score = 0
  25384. }
  25385. l._score = 1e3;
  25386. break
  25387. }
  25388. }
  25389. this._entries.sort(e._compareByScoreAndTime)
  25390. }
  25391. }, e._compareByScoreAndTime = function (e, t) {
  25392. return e._score < t._score ? 1 : e._score > t._score ? -1 : e._time < t._time ? 1 : e._time > t._time ? -1 : 0
  25393. }, e
  25394. }();
  25395. t.LanguageFeatureRegistry = a
  25396. })), define(n[17], i([0, 1, 21, 25, 3, 481, 358]), (function (e, t, n, i, o, r, s) {
  25397. "use strict";
  25398. Object.defineProperty(t, "__esModule", {value: !0});
  25399. var a = function (e, t) {
  25400. this.language = e, this.id = t
  25401. };
  25402. t.LanguageIdentifier = a;
  25403. var l, u = function () {
  25404. function e() {
  25405. }
  25406. return e.getLanguageId = function (e) {
  25407. return (255 & e) >>> 0
  25408. }, e.getTokenType = function (e) {
  25409. return (1792 & e) >>> 8
  25410. }, e.getFontStyle = function (e) {
  25411. return (14336 & e) >>> 11
  25412. }, e.getForeground = function (e) {
  25413. return (8372224 & e) >>> 14
  25414. }, e.getBackground = function (e) {
  25415. return (4286578688 & e) >>> 23
  25416. }, e.getClassNameFromMetadata = function (e) {
  25417. var t = "mtk" + this.getForeground(e), n = this.getFontStyle(e);
  25418. return 1 & n && (t += " mtki"), 2 & n && (t += " mtkb"), 4 & n && (t += " mtku"), t
  25419. }, e.getInlineStyleFromMetadata = function (e, t) {
  25420. var n = this.getForeground(e), i = this.getFontStyle(e), o = "color: " + t[n] + ";";
  25421. return 1 & i && (o += "font-style: italic;"), 2 & i && (o += "font-weight: bold;"), 4 & i && (o += "text-decoration: underline;"), o
  25422. }, e
  25423. }();
  25424. t.TokenMetadata = u,
  25425. t.completionKindToCssClass = ((l = Object.create(null))[0] = "method", l[1] = "function", l[2] = "constructor", l[3] = "field", l[4] = "variable", l[5] = "class", l[6] = "struct", l[7] = "interface", l[8] = "module", l[9] = "property", l[10] = "event", l[11] = "operator", l[12] = "unit", l[13] = "value", l[14] = "constant", l[15] = "enum", l[16] = "enum-member", l[17] = "keyword", l[25] = "snippet", l[18] = "text", l[19] = "color", l[20] = "file", l[21] = "reference", l[22] = "customcolor", l[23] = "folder", l[24] = "type-parameter", function (e) {
  25426. return l[e] || "property"
  25427. }), t.completionKindFromString = function () {
  25428. var e = Object.create(null);
  25429. return e.method = 0, e.function = 1, e.constructor = 2, e.field = 3, e.variable = 4, e.class = 5, e.struct = 6, e.interface = 7, e.module = 8, e.property = 9, e.event = 10, e.operator = 11, e.unit = 12, e.value = 13, e.constant = 14, e.enum = 15, e["enum-member"] = 16, e.enumMember = 16, e.keyword = 17, e.snippet = 25, e.text = 18, e.color = 19, e.file = 20, e.reference = 21, e.customcolor = 22, e.folder = 23, e["type-parameter"] = 24, e.typeParameter = 24, function (t, n) {
  25430. var i = e[t];
  25431. return void 0 !== i || n || (i = 9), i
  25432. }
  25433. }(), function (e) {
  25434. e[e.Invoke = 1] = "Invoke", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.ContentChange = 3] = "ContentChange"
  25435. }(t.SignatureHelpTriggerKind || (t.SignatureHelpTriggerKind = {})), function (e) {
  25436. e[e.Text = 0] = "Text", e[e.Read = 1] = "Read", e[e.Write = 2] = "Write"
  25437. }(t.DocumentHighlightKind || (t.DocumentHighlightKind = {})), t.isLocationLink = function (e) {
  25438. return e && i.URI.isUri(e.uri) && o.Range.isIRange(e.range) && (o.Range.isIRange(e.originSelectionRange) || o.Range.isIRange(e.targetSelectionRange))
  25439. }, function (e) {
  25440. var t = new Map;
  25441. t.set("file", 0), t.set("module", 1), t.set("namespace", 2), t.set("package", 3), t.set("class", 4), t.set("method", 5), t.set("property", 6), t.set("field", 7), t.set("constructor", 8), t.set("enum", 9), t.set("interface", 10), t.set("function", 11), t.set("variable", 12), t.set("constant", 13), t.set("string", 14), t.set("number", 15), t.set("boolean", 16), t.set("array", 17), t.set("object", 18), t.set("key", 19), t.set("null", 20), t.set("enum-member", 21), t.set("struct", 22), t.set("event", 23), t.set("operator", 24), t.set("type-parameter", 25);
  25442. var n = new Map
  25443. ;n.set(0, "file"), n.set(1, "module"), n.set(2, "namespace"), n.set(3, "package"), n.set(4, "class"), n.set(5, "method"), n.set(6, "property"), n.set(7, "field"), n.set(8, "constructor"), n.set(9, "enum"), n.set(10, "interface"), n.set(11, "function"), n.set(12, "variable"), n.set(13, "constant"), n.set(14, "string"), n.set(15, "number"), n.set(16, "boolean"), n.set(17, "array"), n.set(18, "object"), n.set(19, "key"), n.set(20, "null"), n.set(21, "enum-member"), n.set(22, "struct"), n.set(23, "event"), n.set(24, "operator"), n.set(25, "type-parameter"), e.fromString = function (e) {
  25444. return t.get(e)
  25445. }, e.toString = function (e) {
  25446. return n.get(e)
  25447. }, e.toCssClassName = function (e, t) {
  25448. return "codicon " + (t ? "inline" : "block") + " codicon-symbol-" + (n.get(e) || "property")
  25449. }
  25450. }(t.SymbolKinds || (t.SymbolKinds = {}));
  25451. var d = function () {
  25452. function e(e) {
  25453. this.value = e
  25454. }
  25455. return e.Comment = new e("comment"), e.Imports = new e("imports"), e.Region = new e("region"), e
  25456. }();
  25457. t.FoldingRangeKind = d, function (e) {
  25458. e.is = function (e) {
  25459. return n.isObject(e) && (Boolean(e.newUri) || Boolean(e.oldUri))
  25460. }
  25461. }(t.WorkspaceFileEdit || (t.WorkspaceFileEdit = {})), function (e) {
  25462. e.is = function (e) {
  25463. return n.isObject(e) && i.URI.isUri(e.resource) && n.isObject(e.edit)
  25464. }
  25465. }(t.WorkspaceTextEdit || (t.WorkspaceTextEdit = {})), t.ReferenceProviderRegistry = new r.LanguageFeatureRegistry, t.RenameProviderRegistry = new r.LanguageFeatureRegistry, t.CompletionProviderRegistry = new r.LanguageFeatureRegistry, t.SignatureHelpProviderRegistry = new r.LanguageFeatureRegistry, t.HoverProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentSymbolProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentHighlightProviderRegistry = new r.LanguageFeatureRegistry, t.DefinitionProviderRegistry = new r.LanguageFeatureRegistry, t.DeclarationProviderRegistry = new r.LanguageFeatureRegistry, t.ImplementationProviderRegistry = new r.LanguageFeatureRegistry, t.TypeDefinitionProviderRegistry = new r.LanguageFeatureRegistry, t.CodeLensProviderRegistry = new r.LanguageFeatureRegistry, t.CodeActionProviderRegistry = new r.LanguageFeatureRegistry,
  25466. t.DocumentFormattingEditProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentRangeFormattingEditProviderRegistry = new r.LanguageFeatureRegistry, t.OnTypeFormattingEditProviderRegistry = new r.LanguageFeatureRegistry, t.LinkProviderRegistry = new r.LanguageFeatureRegistry, t.ColorProviderRegistry = new r.LanguageFeatureRegistry, t.SelectionRangeRegistry = new r.LanguageFeatureRegistry, t.FoldingRangeProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentSemanticTokensProviderRegistry = new r.LanguageFeatureRegistry, t.DocumentRangeSemanticTokensProviderRegistry = new r.LanguageFeatureRegistry, t.TokenizationRegistry = new s.TokenizationRegistryImpl
  25467. })), define(n[93], i([0, 1, 17]), (function (e, t, n) {
  25468. "use strict";
  25469. Object.defineProperty(t, "__esModule", {value: !0});
  25470. var i = function () {
  25471. function e(e, t) {
  25472. this._tokens = e, this._tokensCount = this._tokens.length >>> 1, this._text = t
  25473. }
  25474. return e.prototype.equals = function (t) {
  25475. return t instanceof e && this.slicedEquals(t, 0, this._tokensCount)
  25476. }, e.prototype.slicedEquals = function (e, t, n) {
  25477. if (this._text !== e._text) return !1;
  25478. if (this._tokensCount !== e._tokensCount) return !1;
  25479. for (var i = t << 1, o = i + (n << 1), r = i; r < o; r++) if (this._tokens[r] !== e._tokens[r]) return !1;
  25480. return !0
  25481. }, e.prototype.getLineContent = function () {
  25482. return this._text
  25483. }, e.prototype.getCount = function () {
  25484. return this._tokensCount
  25485. }, e.prototype.getStartOffset = function (e) {
  25486. return e > 0 ? this._tokens[e - 1 << 1] : 0
  25487. }, e.prototype.getMetadata = function (e) {
  25488. return this._tokens[1 + (e << 1)]
  25489. }, e.prototype.getLanguageId = function (e) {
  25490. var t = this._tokens[1 + (e << 1)];
  25491. return n.TokenMetadata.getLanguageId(t)
  25492. }, e.prototype.getStandardTokenType = function (e) {
  25493. var t = this._tokens[1 + (e << 1)];
  25494. return n.TokenMetadata.getTokenType(t)
  25495. }, e.prototype.getForeground = function (e) {
  25496. var t = this._tokens[1 + (e << 1)];
  25497. return n.TokenMetadata.getForeground(t)
  25498. }, e.prototype.getClassName = function (e) {
  25499. var t = this._tokens[1 + (e << 1)];
  25500. return n.TokenMetadata.getClassNameFromMetadata(t)
  25501. }, e.prototype.getInlineStyle = function (e, t) {
  25502. var i = this._tokens[1 + (e << 1)];
  25503. return n.TokenMetadata.getInlineStyleFromMetadata(i, t)
  25504. },
  25505. e.prototype.getEndOffset = function (e) {
  25506. return this._tokens[e << 1]
  25507. }, e.prototype.findTokenIndexAtOffset = function (t) {
  25508. return e.findIndexInTokensArray(this._tokens, t)
  25509. }, e.prototype.inflate = function () {
  25510. return this
  25511. }, e.prototype.sliceAndInflate = function (e, t, n) {
  25512. return new o(this, e, t, n)
  25513. }, e.convertToEndOffset = function (e, t) {
  25514. for (var n = (e.length >>> 1) - 1, i = 0; i < n; i++) e[i << 1] = e[i + 1 << 1];
  25515. e[n << 1] = t
  25516. }, e.findIndexInTokensArray = function (e, t) {
  25517. if (e.length <= 2) return 0;
  25518. for (var n = 0, i = (e.length >>> 1) - 1; n < i;) {
  25519. var o = n + Math.floor((i - n) / 2), r = e[o << 1];
  25520. if (r === t) return o + 1;
  25521. r < t ? n = o + 1 : r > t && (i = o)
  25522. }
  25523. return n
  25524. }, e
  25525. }();
  25526. t.LineTokens = i;
  25527. var o = function () {
  25528. function e(e, t, n, i) {
  25529. this._source = e, this._startOffset = t, this._endOffset = n, this._deltaOffset = i, this._firstTokenIndex = e.findTokenIndexAtOffset(t), this._tokensCount = 0;
  25530. for (var o = this._firstTokenIndex, r = e.getCount(); o < r; o++) {
  25531. if (e.getStartOffset(o) >= n) break;
  25532. this._tokensCount++
  25533. }
  25534. }
  25535. return e.prototype.equals = function (t) {
  25536. return t instanceof e && (this._startOffset === t._startOffset && this._endOffset === t._endOffset && this._deltaOffset === t._deltaOffset && this._source.slicedEquals(t._source, this._firstTokenIndex, this._tokensCount))
  25537. }, e.prototype.getCount = function () {
  25538. return this._tokensCount
  25539. }, e.prototype.getForeground = function (e) {
  25540. return this._source.getForeground(this._firstTokenIndex + e)
  25541. }, e.prototype.getEndOffset = function (e) {
  25542. var t = this._source.getEndOffset(this._firstTokenIndex + e);
  25543. return Math.min(this._endOffset, t) - this._startOffset + this._deltaOffset
  25544. }, e.prototype.getClassName = function (e) {
  25545. return this._source.getClassName(this._firstTokenIndex + e)
  25546. }, e.prototype.getInlineStyle = function (e, t) {
  25547. return this._source.getInlineStyle(this._firstTokenIndex + e, t)
  25548. }, e.prototype.findTokenIndexAtOffset = function (e) {
  25549. return this._source.findTokenIndexAtOffset(e + this._startOffset - this._deltaOffset) - this._firstTokenIndex
  25550. }, e
  25551. }();
  25552. t.SlicedLineTokens = o
  25553. })), define(n[157], i([0, 1, 19, 93, 13, 17]), (function (e, t, n, i, o, r) {
  25554. "use strict";
  25555. function s(e) {
  25556. for (var t = 0, n = 0, i = 0, o = 0, r = e.length; o < r; o++) {
  25557. var s = e.charCodeAt(o);
  25558. 13 === s ? (0 === t && (n = o), t++, o + 1 < r && 10 === e.charCodeAt(o + 1) && o++, i = o + 1) : 10 === s && (0 === t && (n = o), t++, i = o + 1)
  25559. }
  25560. return 0 === t && (n = e.length), [t, n, e.length - i]
  25561. }
  25562. function a(e) {
  25563. return (16384 | e << 0 | 2 << 23) >>> 0
  25564. }
  25565. Object.defineProperty(t, "__esModule", {value: !0}), t.countEOL = s;
  25566. var l = new Uint32Array(0).buffer, u = function () {
  25567. function e() {
  25568. this.tokens = []
  25569. }
  25570. return e.prototype.add = function (e, t) {
  25571. if (this.tokens.length > 0) {
  25572. var n = this.tokens[this.tokens.length - 1];
  25573. if (n.startLineNumber + n.tokens.length - 1 + 1 === e) return void n.tokens.push(t)
  25574. }
  25575. this.tokens.push(new p(e, [t]))
  25576. }, e
  25577. }();
  25578. t.MultilineTokensBuilder = u;
  25579. var d = function () {
  25580. function e(e) {
  25581. this._tokens = e, this._tokenCount = e.length / 4
  25582. }
  25583. return e.prototype.getMaxDeltaLine = function () {
  25584. var e = this.getTokenCount();
  25585. return 0 === e ? -1 : this.getDeltaLine(e - 1)
  25586. }, e.prototype.getTokenCount = function () {
  25587. return this._tokenCount
  25588. }, e.prototype.getDeltaLine = function (e) {
  25589. return this._tokens[4 * e]
  25590. }, e.prototype.getStartCharacter = function (e) {
  25591. return this._tokens[4 * e + 1]
  25592. },
  25593. e.prototype.getEndCharacter = function (e) {
  25594. return this._tokens[4 * e + 2]
  25595. }, e.prototype.getMetadata = function (e) {
  25596. return this._tokens[4 * e + 3]
  25597. }, e.prototype.clear = function () {
  25598. this._tokenCount = 0
  25599. }, e.prototype.acceptDeleteRange = function (e, t, n, i, o) {
  25600. for (var r = this._tokens, s = this._tokenCount, a = i - t, l = 0, u = !1, d = 0; d < s; d++) {
  25601. var c = 4 * d, h = r[c], p = r[c + 1], g = r[c + 2], f = r[c + 3];
  25602. if (h < t || h === t && g <= n) l++; else {
  25603. if (h === t && p < n) h === i && g > o ? g -= o - n : g = n; else if (h === t && p === n) {
  25604. if (!(h === i && g > o)) {
  25605. u = !0;
  25606. continue
  25607. }
  25608. g -= o - n
  25609. } else if (h < i || h === i && p < o) {
  25610. if (!(h === i && g > o)) {
  25611. u = !0;
  25612. continue
  25613. }
  25614. g = h === t ? (p = n) + (g - o) : (p = 0) + (g - o)
  25615. } else if (h > i) {
  25616. if (0 === a && !u) {
  25617. l = s;
  25618. break
  25619. }
  25620. h -= a
  25621. } else {
  25622. if (!(h === i && p >= o)) throw new Error("Not possible!");
  25623. e && 0 === h && (p += e, g += e), h -= a, p -= o - n, g -= o - n
  25624. }
  25625. var m = 4 * l;
  25626. r[m] = h, r[m + 1] = p, r[m + 2] = g, r[m + 3] = f, l++
  25627. }
  25628. }
  25629. this._tokenCount = l
  25630. }, e.prototype.acceptInsertText = function (e, t, n, i, o, r) {
  25631. for (var s = 0 === n && 1 === i && (r >= 48 && r <= 57 || r >= 65 && r <= 90 || r >= 97 && r <= 122), a = this._tokens, l = this._tokenCount, u = 0; u < l; u++) {
  25632. var d = 4 * u, c = a[d], h = a[d + 1], p = a[d + 2];
  25633. if (!(c < e || c === e && p < t)) {
  25634. if (c === e && p === t) {
  25635. if (!s) continue
  25636. ;
  25637. p += 1
  25638. } else if (c === e && h < t && t < p) 0 === n ? p += i : p = t; else {
  25639. if (c === e && h === t && s) continue;
  25640. if (c === e) if (c += n, 0 === n) h += i, p += i; else {
  25641. var g = p - h;
  25642. p = (h = o + (h - t)) + g
  25643. } else c += n
  25644. }
  25645. a[d] = c, a[d + 1] = h, a[d + 2] = p
  25646. }
  25647. }
  25648. }, e
  25649. }();
  25650. t.SparseEncodedTokens = d;
  25651. var c = function () {
  25652. function e(e, t, n) {
  25653. this._actual = e, this._startTokenIndex = t, this._endTokenIndex = n
  25654. }
  25655. return e.prototype.getCount = function () {
  25656. return this._endTokenIndex - this._startTokenIndex + 1
  25657. }, e.prototype.getStartCharacter = function (e) {
  25658. return this._actual.getStartCharacter(this._startTokenIndex + e)
  25659. }, e.prototype.getEndCharacter = function (e) {
  25660. return this._actual.getEndCharacter(this._startTokenIndex + e)
  25661. }, e.prototype.getMetadata = function (e) {
  25662. return this._actual.getMetadata(this._startTokenIndex + e)
  25663. }, e
  25664. }();
  25665. t.LineTokens2 = c;
  25666. var h = function () {
  25667. function e(e, t) {
  25668. this.startLineNumber = e, this.tokens = t, this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine()
  25669. }
  25670. return e.prototype._updateEndLineNumber = function () {
  25671. this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine()
  25672. }, e.prototype.getLineTokens = function (t) {
  25673. if (this.startLineNumber <= t && t <= this.endLineNumber) {
  25674. var n = e._findTokensWithLine(this.tokens, t - this.startLineNumber);
  25675. if (n) {
  25676. var i = n[0], o = n[1];
  25677. return new c(this.tokens, i, o)
  25678. }
  25679. }
  25680. return null
  25681. }, e._findTokensWithLine = function (e, t) {
  25682. for (var n = 0, i = e.getTokenCount() - 1; n < i;) {
  25683. var o = n + Math.floor((i - n) / 2), r = e.getDeltaLine(o);
  25684. if (r < t) n = o + 1; else {
  25685. if (!(r > t)) {
  25686. for (var s = o; s > n && e.getDeltaLine(s - 1) === t;) s--;
  25687. for (var a = o; a < i && e.getDeltaLine(a + 1) === t;) a++;
  25688. return [s, a]
  25689. }
  25690. i = o - 1
  25691. }
  25692. }
  25693. return e.getDeltaLine(n) === t ? [n, n] : null
  25694. }, e.prototype.applyEdit = function (e, t) {
  25695. var n = s(t), i = n[0], o = n[1], r = n[2];
  25696. this.acceptEdit(e, i, o, r, t.length > 0 ? t.charCodeAt(0) : 0)
  25697. }, e.prototype.acceptEdit = function (e, t, n, i, r) {
  25698. this._acceptDeleteRange(e), this._acceptInsertText(new o.Position(e.startLineNumber, e.startColumn), t, n, i, r), this._updateEndLineNumber()
  25699. }, e.prototype._acceptDeleteRange = function (e) {
  25700. if (e.startLineNumber !== e.endLineNumber || e.startColumn !== e.endColumn) {
  25701. var t = e.startLineNumber - this.startLineNumber, n = e.endLineNumber - this.startLineNumber;
  25702. if (n < 0) {
  25703. var i = n - t
  25704. ;this.startLineNumber -= i
  25705. } else {
  25706. var o = this.tokens.getMaxDeltaLine();
  25707. if (!(t >= o + 1)) {
  25708. if (t < 0 && n >= o + 1) return this.startLineNumber = 0, void this.tokens.clear();
  25709. if (t < 0) {
  25710. var r = -t;
  25711. this.startLineNumber -= r, this.tokens.acceptDeleteRange(e.startColumn - 1, 0, 0, n, e.endColumn - 1)
  25712. } else this.tokens.acceptDeleteRange(0, t, e.startColumn - 1, n, e.endColumn - 1)
  25713. }
  25714. }
  25715. }
  25716. }, e.prototype._acceptInsertText = function (e, t, n, i, o) {
  25717. if (0 !== t || 0 !== n) {
  25718. var r = e.lineNumber - this.startLineNumber;
  25719. if (r < 0) this.startLineNumber += t; else r >= this.tokens.getMaxDeltaLine() + 1 || this.tokens.acceptInsertText(r, e.column - 1, t, n, i, o)
  25720. }
  25721. }, e
  25722. }();
  25723. t.MultilineTokens2 = h;
  25724. var p = function (e, t) {
  25725. this.startLineNumber = e, this.tokens = t
  25726. };
  25727. function g(e) {
  25728. return e instanceof Uint32Array ? e : new Uint32Array(e)
  25729. }
  25730. t.MultilineTokens = p;
  25731. var f = function () {
  25732. function e() {
  25733. this._pieces = []
  25734. }
  25735. return e.prototype.flush = function () {
  25736. this._pieces = []
  25737. }, e.prototype.set = function (e) {
  25738. this._pieces = e || []
  25739. }, e.prototype.addSemanticTokens = function (t, n) {
  25740. var o = this._pieces;
  25741. if (0 === o.length) return n
  25742. ;
  25743. var r = e._findFirstPieceWithLine(o, t), s = this._pieces[r].getLineTokens(t);
  25744. if (!s) return n;
  25745. for (var a = n.getCount(), l = s.getCount(), u = 0, d = [], c = 0, h = 0; h < l; h++) {
  25746. for (var p = s.getStartCharacter(h), g = s.getEndCharacter(h), f = s.getMetadata(h), m = ((1 & f ? 2048 : 0) | (2 & f ? 4096 : 0) | (4 & f ? 8192 : 0) | (8 & f ? 8372224 : 0) | (16 & f ? 4286578688 : 0)) >>> 0, v = ~m >>> 0; u < a && n.getEndOffset(u) <= p;) d[c++] = n.getEndOffset(u), d[c++] = n.getMetadata(u), u++;
  25747. for (u < a && n.getStartOffset(u) < p && (d[c++] = p, d[c++] = n.getMetadata(u)); u < a && n.getEndOffset(u) < g;) d[c++] = n.getEndOffset(u), d[c++] = n.getMetadata(u) & v | f & m, u++;
  25748. if (u < a && n.getEndOffset(u) === g) d[c++] = n.getEndOffset(u), d[c++] = n.getMetadata(u) & v | f & m, u++; else {
  25749. var _ = Math.min(Math.max(0, u - 1), a - 1);
  25750. d[c++] = g, d[c++] = n.getMetadata(_) & v | f & m
  25751. }
  25752. }
  25753. for (; u < a;) d[c++] = n.getEndOffset(u), d[c++] = n.getMetadata(u), u++;
  25754. return new i.LineTokens(new Uint32Array(d), n.getLineContent())
  25755. }, e._findFirstPieceWithLine = function (e, t) {
  25756. for (var n = 0, i = e.length - 1; n < i;) {
  25757. var o = n + Math.floor((i - n) / 2);
  25758. if (e[o].endLineNumber < t) n = o + 1; else {
  25759. if (!(e[o].startLineNumber > t)) {
  25760. for (; o > n && e[o - 1].startLineNumber <= t && t <= e[o - 1].endLineNumber;) o--;
  25761. return o
  25762. }
  25763. i = o - 1
  25764. }
  25765. }
  25766. return n
  25767. }, e.prototype.acceptEdit = function (e, t, n, i, o) {
  25768. for (var r = 0, s = this._pieces; r < s.length; r++) {
  25769. s[r].acceptEdit(e, t, n, i, o)
  25770. }
  25771. }, e
  25772. }();
  25773. t.TokensStore2 = f;
  25774. var m = function () {
  25775. function e() {
  25776. this._lineTokens = [], this._len = 0
  25777. }
  25778. return e.prototype.flush = function () {
  25779. this._lineTokens = [], this._len = 0
  25780. }, e.prototype.getTokens = function (e, t, n) {
  25781. var o = null;
  25782. if (t < this._len && (o = this._lineTokens[t]), null !== o && o !== l) return new i.LineTokens(g(o), n);
  25783. var r = new Uint32Array(2);
  25784. return r[0] = n.length, r[1] = a(e), new i.LineTokens(r, n)
  25785. }, e._massageTokens = function (e, t, n) {
  25786. var i = n ? g(n) : null;
  25787. if (0 === t) {
  25788. var o = !1;
  25789. if (i && i.length > 1 && (o = r.TokenMetadata.getLanguageId(i[1]) !== e), !o) return l
  25790. }
  25791. if (!i || 0 === i.length) {
  25792. var s = new Uint32Array(2);
  25793. return s[0] = t, s[1] = a(e), s.buffer
  25794. }
  25795. return i[i.length - 2] = t, 0 === i.byteOffset && i.byteLength === i.buffer.byteLength ? i.buffer : i
  25796. }, e.prototype._ensureLine = function (e) {
  25797. for (; e >= this._len;) this._lineTokens[this._len] = null, this._len++
  25798. },
  25799. e.prototype._deleteLines = function (e, t) {
  25800. 0 !== t && (e + t > this._len && (t = this._len - e), this._lineTokens.splice(e, t), this._len -= t)
  25801. }, e.prototype._insertLines = function (e, t) {
  25802. if (0 !== t) {
  25803. for (var i = [], o = 0; o < t; o++) i[o] = null;
  25804. this._lineTokens = n.arrayInsert(this._lineTokens, e, i), this._len += t
  25805. }
  25806. }, e.prototype.setTokens = function (t, n, i, o) {
  25807. var r = e._massageTokens(t, i, o);
  25808. this._ensureLine(n), this._lineTokens[n] = r
  25809. }, e.prototype.acceptEdit = function (e, t, n) {
  25810. this._acceptDeleteRange(e), this._acceptInsertText(new o.Position(e.startLineNumber, e.startColumn), t, n)
  25811. }, e.prototype._acceptDeleteRange = function (t) {
  25812. var n = t.startLineNumber - 1;
  25813. if (!(n >= this._len)) if (t.startLineNumber !== t.endLineNumber) {
  25814. this._lineTokens[n] = e._deleteEnding(this._lineTokens[n], t.startColumn - 1);
  25815. var i = t.endLineNumber - 1, o = null;
  25816. i < this._len && (o = e._deleteBeginning(this._lineTokens[i], t.endColumn - 1)), this._lineTokens[n] = e._append(this._lineTokens[n], o), this._deleteLines(t.startLineNumber, t.endLineNumber - t.startLineNumber)
  25817. } else {
  25818. if (t.startColumn === t.endColumn) return
  25819. ;
  25820. this._lineTokens[n] = e._delete(this._lineTokens[n], t.startColumn - 1, t.endColumn - 1)
  25821. }
  25822. }, e.prototype._acceptInsertText = function (t, n, i) {
  25823. if (0 !== n || 0 !== i) {
  25824. var o = t.lineNumber - 1;
  25825. o >= this._len || (0 !== n ? (this._lineTokens[o] = e._deleteEnding(this._lineTokens[o], t.column - 1), this._lineTokens[o] = e._insert(this._lineTokens[o], t.column - 1, i), this._insertLines(t.lineNumber, n)) : this._lineTokens[o] = e._insert(this._lineTokens[o], t.column - 1, i))
  25826. }
  25827. }, e._deleteBeginning = function (t, n) {
  25828. return null === t || t === l ? t : e._delete(t, 0, n)
  25829. }, e._deleteEnding = function (t, n) {
  25830. if (null === t || t === l) return t;
  25831. var i = g(t), o = i[i.length - 2];
  25832. return e._delete(t, n, o)
  25833. }, e._delete = function (e, t, n) {
  25834. if (null === e || e === l || t === n) return e;
  25835. var o = g(e), r = o.length >>> 1;
  25836. if (0 === t && o[o.length - 2] === n) return l;
  25837. var s, a, u = i.LineTokens.findIndexInTokensArray(o, t), d = u > 0 ? o[u - 1 << 1] : 0;
  25838. if (n < o[u << 1]) {
  25839. for (var c = n - t, h = u; h < r; h++) o[h << 1] -= c;
  25840. return e
  25841. }
  25842. d !== t ? (o[u << 1] = t, s = u + 1 << 1, a = t) : (s = u << 1, a = d);
  25843. for (var p = n - t, f = u + 1; f < r; f++) {
  25844. var m = o[f << 1] - p;
  25845. m > a && (o[s++] = m, o[s++] = o[1 + (f << 1)], a = m)
  25846. }
  25847. if (s === o.length) return e
  25848. ;
  25849. var v = new Uint32Array(s);
  25850. return v.set(o.subarray(0, s), 0), v.buffer
  25851. }, e._append = function (e, t) {
  25852. if (t === l) return e;
  25853. if (e === l) return t;
  25854. if (null === e) return e;
  25855. if (null === t) return null;
  25856. var n = g(e), i = g(t), o = i.length >>> 1, r = new Uint32Array(n.length + i.length);
  25857. r.set(n, 0);
  25858. for (var s = n.length, a = n[n.length - 2], u = 0; u < o; u++) r[s++] = i[u << 1] + a, r[s++] = i[1 + (u << 1)];
  25859. return r.buffer
  25860. }, e._insert = function (e, t, n) {
  25861. if (null === e || e === l) return e;
  25862. var o = g(e), r = o.length >>> 1, s = i.LineTokens.findIndexInTokensArray(o, t);
  25863. s > 0 && (o[s - 1 << 1] === t && s--);
  25864. for (var a = s; a < r; a++) o[a << 1] += n;
  25865. return e
  25866. }, e
  25867. }();
  25868. t.TokensStore = m
  25869. })), define(n[63], i([0, 1, 107, 17]), (function (e, t, n, i) {
  25870. "use strict";
  25871. Object.defineProperty(t, "__esModule", {value: !0});
  25872. var o = function () {
  25873. function e() {
  25874. }
  25875. return e.prototype.clone = function () {
  25876. return this
  25877. }, e.prototype.equals = function (e) {
  25878. return this === e
  25879. }, e
  25880. }();
  25881. t.NULL_STATE = new o, t.NULL_MODE_ID = "vs.editor.nullMode", t.NULL_LANGUAGE_IDENTIFIER = new i.LanguageIdentifier(t.NULL_MODE_ID, 0), t.nullTokenize = function (e, t, i, o) {
  25882. return new n.TokenizationResult([new n.Token(o, "", e)], i)
  25883. }, t.nullTokenize2 = function (e, i, o, r) {
  25884. var s = new Uint32Array(2);
  25885. return s[0] = r, s[1] = (16384 | e << 0 | 2 << 23) >>> 0, new n.TokenizationResult2(s, null === o ? t.NULL_STATE : o)
  25886. }
  25887. })), define(n[482], i([0, 1, 19, 10, 93, 13, 17, 63, 2, 132, 157, 16]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
  25888. "use strict";
  25889. Object.defineProperty(t, "__esModule", {value: !0});
  25890. var p = function () {
  25891. function e() {
  25892. this._beginState = [], this._valid = [], this._len = 0, this._invalidLineStartIndex = 0
  25893. }
  25894. return e.prototype._reset = function (e) {
  25895. this._beginState = [], this._valid = [], this._len = 0, this._invalidLineStartIndex = 0, e && this._setBeginState(0, e)
  25896. }, e.prototype.flush = function (e) {
  25897. this._reset(e)
  25898. }, Object.defineProperty(e.prototype, "invalidLineStartIndex", {
  25899. get: function () {
  25900. return this._invalidLineStartIndex
  25901. }, enumerable: !0, configurable: !0
  25902. }), e.prototype._invalidateLine = function (e) {
  25903. e < this._len && (this._valid[e] = !1), e < this._invalidLineStartIndex && (this._invalidLineStartIndex = e)
  25904. }, e.prototype._isValid = function (e) {
  25905. return e < this._len && this._valid[e]
  25906. },
  25907. e.prototype.getBeginState = function (e) {
  25908. return e < this._len ? this._beginState[e] : null
  25909. }, e.prototype._ensureLine = function (e) {
  25910. for (; e >= this._len;) this._beginState[this._len] = null, this._valid[this._len] = !1, this._len++
  25911. }, e.prototype._deleteLines = function (e, t) {
  25912. 0 !== t && (e + t > this._len && (t = this._len - e), this._beginState.splice(e, t), this._valid.splice(e, t), this._len -= t)
  25913. }, e.prototype._insertLines = function (e, t) {
  25914. if (0 !== t) {
  25915. for (var i = [], o = [], r = 0; r < t; r++) i[r] = null, o[r] = !1;
  25916. this._beginState = n.arrayInsert(this._beginState, e, i), this._valid = n.arrayInsert(this._valid, e, o), this._len += t
  25917. }
  25918. }, e.prototype._setValid = function (e, t) {
  25919. this._ensureLine(e), this._valid[e] = t
  25920. }, e.prototype._setBeginState = function (e, t) {
  25921. this._ensureLine(e), this._beginState[e] = t
  25922. }, e.prototype.setEndState = function (e, t, n) {
  25923. if (this._setValid(t, !0), this._invalidLineStartIndex = t + 1, t !== e - 1) {
  25924. var i = this.getBeginState(t + 1);
  25925. if (null === i || !n.equals(i)) return this._setBeginState(t + 1, n), void this._invalidateLine(t + 1);
  25926. for (var o = t + 1; o < e && this._isValid(o);) o++;
  25927. this._invalidLineStartIndex = o
  25928. }
  25929. },
  25930. e.prototype.setFakeTokens = function (e) {
  25931. this._setValid(e, !1)
  25932. }, e.prototype.applyEdits = function (e, t) {
  25933. for (var n = e.endLineNumber - e.startLineNumber, i = t, o = Math.min(n, i); o >= 0; o--) this._invalidateLine(e.startLineNumber + o - 1);
  25934. this._acceptDeleteRange(e), this._acceptInsertText(new s.Position(e.startLineNumber, e.startColumn), t)
  25935. }, e.prototype._acceptDeleteRange = function (e) {
  25936. e.startLineNumber - 1 >= this._len || this._deleteLines(e.startLineNumber, e.endLineNumber - e.startLineNumber)
  25937. }, e.prototype._acceptInsertText = function (e, t) {
  25938. e.lineNumber - 1 >= this._len || this._insertLines(e.lineNumber, t)
  25939. }, e
  25940. }();
  25941. t.TokenizationStateStore = p;
  25942. var g = function (e) {
  25943. function t(t) {
  25944. var n = e.call(this) || this;
  25945. return n._isDisposed = !1, n._textModel = t, n._tokenizationStateStore = new p, n._tokenizationSupport = null, n._register(a.TokenizationRegistry.onDidChange((function (e) {
  25946. var t = n._textModel.getLanguageIdentifier();
  25947. -1 !== e.changedLanguages.indexOf(t.language) && (n._resetTokenizationState(), n._textModel.clearTokens())
  25948. }))),
  25949. n._register(n._textModel.onDidChangeRawContentFast((function (e) {
  25950. e.containsEvent(1) && n._resetTokenizationState()
  25951. }))), n._register(n._textModel.onDidChangeContentFast((function (e) {
  25952. for (var t = 0, i = e.changes.length; t < i; t++) {
  25953. var o = e.changes[t], r = c.countEOL(o.text)[0];
  25954. n._tokenizationStateStore.applyEdits(o.range, r)
  25955. }
  25956. n._beginBackgroundTokenization()
  25957. }))), n._register(n._textModel.onDidChangeAttached((function () {
  25958. n._beginBackgroundTokenization()
  25959. }))), n._register(n._textModel.onDidChangeLanguage((function () {
  25960. n._resetTokenizationState(), n._textModel.clearTokens()
  25961. }))), n._resetTokenizationState(), n
  25962. }
  25963. return r(t, e), t.prototype.dispose = function () {
  25964. this._isDisposed = !0, e.prototype.dispose.call(this)
  25965. }, t.prototype._resetTokenizationState = function () {
  25966. var e = function (e) {
  25967. var t = e.getLanguageIdentifier(),
  25968. n = e.isTooLargeForTokenization() ? null : a.TokenizationRegistry.get(t.language), o = null;
  25969. if (n) try {
  25970. o = n.getInitialState()
  25971. } catch (e) {
  25972. i.onUnexpectedError(e), n = null
  25973. }
  25974. return [n, o]
  25975. }(this._textModel), t = e[0], n = e[1];
  25976. this._tokenizationSupport = t,
  25977. this._tokenizationStateStore.flush(n), this._beginBackgroundTokenization()
  25978. }, t.prototype._beginBackgroundTokenization = function () {
  25979. var e = this;
  25980. this._textModel.isAttachedToEditor() && this._hasLinesToTokenize() && h.setImmediate((function () {
  25981. e._isDisposed || e._revalidateTokensNow()
  25982. }))
  25983. }, t.prototype._revalidateTokensNow = function (e) {
  25984. void 0 === e && (e = this._textModel.getLineCount());
  25985. for (var t = new c.MultilineTokensBuilder, n = d.StopWatch.create(!1); this._hasLinesToTokenize() && !(n.elapsed() > 1);) {
  25986. if (this._tokenizeOneInvalidLine(t) >= e) break
  25987. }
  25988. this._beginBackgroundTokenization(), this._textModel.setTokens(t.tokens)
  25989. }, t.prototype.tokenizeViewport = function (e, t) {
  25990. var n = new c.MultilineTokensBuilder;
  25991. this._tokenizeViewport(n, e, t), this._textModel.setTokens(n.tokens)
  25992. }, t.prototype.reset = function () {
  25993. this._resetTokenizationState(), this._textModel.clearTokens()
  25994. }, t.prototype.forceTokenization = function (e) {
  25995. var t = new c.MultilineTokensBuilder;
  25996. this._updateTokensUntilLine(t, e), this._textModel.setTokens(t.tokens)
  25997. }, t.prototype.isCheapToTokenize = function (e) {
  25998. if (!this._tokenizationSupport) return !0;
  25999. var t = this._tokenizationStateStore.invalidLineStartIndex + 1;
  26000. return !(e > t) && (e < t || this._textModel.getLineLength(e) < 2048)
  26001. }, t.prototype._hasLinesToTokenize = function () {
  26002. return !!this._tokenizationSupport && this._tokenizationStateStore.invalidLineStartIndex < this._textModel.getLineCount()
  26003. }, t.prototype._tokenizeOneInvalidLine = function (e) {
  26004. if (!this._hasLinesToTokenize()) return this._textModel.getLineCount() + 1;
  26005. var t = this._tokenizationStateStore.invalidLineStartIndex + 1;
  26006. return this._updateTokensUntilLine(e, t), t
  26007. }, t.prototype._updateTokensUntilLine = function (e, t) {
  26008. if (this._tokenizationSupport) for (var n = this._textModel.getLanguageIdentifier(), i = this._textModel.getLineCount(), o = t - 1, r = this._tokenizationStateStore.invalidLineStartIndex; r <= o; r++) {
  26009. var s = this._textModel.getLineContent(r + 1), a = this._tokenizationStateStore.getBeginState(r),
  26010. l = f(n, this._tokenizationSupport, s, a);
  26011. e.add(r + 1, l.tokens), this._tokenizationStateStore.setEndState(i, r, l.endState),
  26012. r = this._tokenizationStateStore.invalidLineStartIndex - 1
  26013. }
  26014. }, t.prototype._tokenizeViewport = function (e, t, n) {
  26015. if (this._tokenizationSupport && !(n <= this._tokenizationStateStore.invalidLineStartIndex)) if (t <= this._tokenizationStateStore.invalidLineStartIndex) this._updateTokensUntilLine(e, n); else {
  26016. for (var i = this._textModel.getLineFirstNonWhitespaceColumn(t), o = [], r = null, s = t - 1; i > 0 && s >= 1; s--) {
  26017. var a = this._textModel.getLineFirstNonWhitespaceColumn(s);
  26018. if (0 !== a && a < i) {
  26019. if (r = this._tokenizationStateStore.getBeginState(s - 1)) break;
  26020. o.push(this._textModel.getLineContent(s)), i = a
  26021. }
  26022. }
  26023. r || (r = this._tokenizationSupport.getInitialState());
  26024. var l = this._textModel.getLanguageIdentifier(), u = r;
  26025. for (s = o.length - 1; s >= 0; s--) {
  26026. u = (h = f(l, this._tokenizationSupport, o[s], u)).endState
  26027. }
  26028. for (var d = t; d <= n; d++) {
  26029. var c = this._textModel.getLineContent(d), h = f(l, this._tokenizationSupport, c, u);
  26030. e.add(d, h.tokens), this._tokenizationStateStore.setFakeTokens(d - 1), u = h.endState
  26031. }
  26032. }
  26033. }, t
  26034. }(u.Disposable);
  26035. function f(e, t, n, r) {
  26036. var s = null;
  26037. if (t) try {
  26038. s = t.tokenize2(n, r.clone(), 0)
  26039. } catch (e) {
  26040. i.onUnexpectedError(e)
  26041. }
  26042. return s || (s = l.nullTokenize2(e.id, n, r, 0)), o.LineTokens.convertToEndOffset(s.tokens, n.length), s
  26043. }
  26044. t.TextModelTokenization = g
  26045. })), define(n[30], i([0, 1, 10, 4, 2, 5, 25, 33, 13, 3, 22, 48, 342, 343, 344, 348, 346, 144, 482, 109, 41, 63, 145, 146, 21, 157, 27]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N) {
  26046. "use strict";
  26047. function x(e) {
  26048. var t = new m.PieceTreeTextBufferBuilder;
  26049. return t.acceptChunk(e), t.finish()
  26050. }
  26051. function I(e, t) {
  26052. return ("string" == typeof e ? x(e) : e).create(t)
  26053. }
  26054. Object.defineProperty(t, "__esModule", {value: !0}), t.createTextBufferFactory = x, t.createTextBuffer = I;
  26055. var M = 0;
  26056. t.LONG_LINE_BOUNDARY = 1e4;
  26057. var k = function () {
  26058. throw new Error("Invalid change accessor")
  26059. }, T = function (e) {
  26060. function o(t, n, r, l) {
  26061. void 0 === l && (l = null);
  26062. var u = e.call(this) || this;
  26063. u._onWillDispose = u._register(new i.Emitter), u.onWillDispose = u._onWillDispose.event, u._onDidChangeDecorations = u._register(new z), u.onDidChangeDecorations = u._onDidChangeDecorations.event, u._onDidChangeLanguage = u._register(new i.Emitter),
  26064. u.onDidChangeLanguage = u._onDidChangeLanguage.event, u._onDidChangeLanguageConfiguration = u._register(new i.Emitter), u.onDidChangeLanguageConfiguration = u._onDidChangeLanguageConfiguration.event, u._onDidChangeTokens = u._register(new i.Emitter), u.onDidChangeTokens = u._onDidChangeTokens.event, u._onDidChangeOptions = u._register(new i.Emitter), u.onDidChangeOptions = u._onDidChangeOptions.event, u._onDidChangeAttached = u._register(new i.Emitter), u.onDidChangeAttached = u._onDidChangeAttached.event, u._eventEmitter = u._register(new H), M++, u.id = "$model" + M, u.isForSimpleWidget = n.isForSimpleWidget, u._associatedResource = null == l ? a.URI.parse("inmemory://model/" + M) : l, u._attachedEditorCount = 0, u._buffer = I(t, n.defaultEOL), u._options = o.resolveOptions(u._buffer, n);
  26065. var c = u._buffer.getLineCount(),
  26066. h = u._buffer.getValueLengthInRange(new d.Range(1, 1, c, u._buffer.getLineLength(c) + 1), 0);
  26067. return n.largeFileOptimizations ? u._isTooLargeForTokenization = h > o.LARGE_FILE_SIZE_THRESHOLD || c > o.LARGE_FILE_LINE_COUNT_THRESHOLD : u._isTooLargeForTokenization = !1,
  26068. u._isTooLargeForSyncing = h > o.MODEL_SYNC_LIMIT, u._versionId = 1, u._alternativeVersionId = 1, u._isDisposed = !1, u._isDisposing = !1, u._languageIdentifier = r || S.NULL_LANGUAGE_IDENTIFIER, u._languageRegistryListener = b.LanguageConfigurationRegistry.onDidChange((function (e) {
  26069. e.languageIdentifier.id === u._languageIdentifier.id && u._onDidChangeLanguageConfiguration.fire({})
  26070. })), u._instanceId = s.singleLetterHash(M), u._lastDecorationId = 0, u._decorations = Object.create(null), u._decorationsTree = new R, u._commandManager = new p.EditStack(u), u._isUndoing = !1, u._isRedoing = !1, u._trimAutoWhitespaceLines = null, u._tokens = new D.TokensStore, u._tokens2 = new D.TokensStore2, u._tokenization = new y.TextModelTokenization(u), u
  26071. }
  26072. return r(o, e), o.createFromString = function (e, t, n, i) {
  26073. return void 0 === t && (t = o.DEFAULT_CREATION_OPTIONS), void 0 === n && (n = null), void 0 === i && (i = null), new o(e, t, n, i)
  26074. }, o.resolveOptions = function (e, t) {
  26075. if (t.detectIndentation) {
  26076. var n = g.guessIndentation(e, t.tabSize, t.insertSpaces);
  26077. return new h.TextModelResolvedOptions({
  26078. tabSize: n.tabSize,
  26079. indentSize: n.tabSize,
  26080. insertSpaces: n.insertSpaces,
  26081. trimAutoWhitespace: t.trimAutoWhitespace,
  26082. defaultEOL: t.defaultEOL
  26083. })
  26084. }
  26085. return new h.TextModelResolvedOptions({
  26086. tabSize: t.tabSize,
  26087. indentSize: t.indentSize,
  26088. insertSpaces: t.insertSpaces,
  26089. trimAutoWhitespace: t.trimAutoWhitespace,
  26090. defaultEOL: t.defaultEOL
  26091. })
  26092. }, o.prototype.onDidChangeRawContentFast = function (e) {
  26093. return this._eventEmitter.fastEvent((function (t) {
  26094. return e(t.rawContentChangedEvent)
  26095. }))
  26096. }, o.prototype.onDidChangeRawContent = function (e) {
  26097. return this._eventEmitter.slowEvent((function (t) {
  26098. return e(t.rawContentChangedEvent)
  26099. }))
  26100. }, o.prototype.onDidChangeContentFast = function (e) {
  26101. return this._eventEmitter.fastEvent((function (t) {
  26102. return e(t.contentChangedEvent)
  26103. }))
  26104. }, o.prototype.onDidChangeContent = function (e) {
  26105. return this._eventEmitter.slowEvent((function (t) {
  26106. return e(t.contentChangedEvent)
  26107. }))
  26108. }, o.prototype.dispose = function () {
  26109. this._isDisposing = !0, this._onWillDispose.fire(), this._languageRegistryListener.dispose(), this._tokenization.dispose(), this._isDisposed = !0, e.prototype.dispose.call(this),
  26110. this._isDisposing = !1
  26111. }, o.prototype._assertNotDisposed = function () {
  26112. if (this._isDisposed) throw new Error("Model is disposed!")
  26113. }, o.prototype._emitContentChangedEvent = function (e, t) {
  26114. this._isDisposing || this._eventEmitter.fire(new v.InternalModelContentChangeEvent(e, t))
  26115. }, o.prototype.setValue = function (e) {
  26116. if (this._assertNotDisposed(), null !== e) {
  26117. var t = I(e, this._options.defaultEOL);
  26118. this.setValueFromTextBuffer(t)
  26119. }
  26120. }, o.prototype._createContentChanged2 = function (e, t, n, i, o, r, s) {
  26121. return {
  26122. changes: [{range: e, rangeOffset: t, rangeLength: n, text: i}],
  26123. eol: this._buffer.getEOL(),
  26124. versionId: this.getVersionId(),
  26125. isUndoing: o,
  26126. isRedoing: r,
  26127. isFlush: s
  26128. }
  26129. }, o.prototype.setValueFromTextBuffer = function (e) {
  26130. if (this._assertNotDisposed(), null !== e) {
  26131. var t = this.getFullModelRange(), n = this.getValueLengthInRange(t), i = this.getLineCount(),
  26132. o = this.getLineMaxColumn(i);
  26133. this._buffer = e, this._increaseVersionId(), this._tokens.flush(), this._tokens2.flush(), this._decorations = Object.create(null), this._decorationsTree = new R, this._commandManager = new p.EditStack(this),
  26134. this._trimAutoWhitespaceLines = null, this._emitContentChangedEvent(new v.ModelRawContentChangedEvent([new v.ModelRawFlush], this._versionId, !1, !1), this._createContentChanged2(new d.Range(1, 1, i, o), 0, n, this.getValue(), !1, !1, !0))
  26135. }
  26136. }, o.prototype.setEOL = function (e) {
  26137. this._assertNotDisposed();
  26138. var t = 1 === e ? "\r\n" : "\n";
  26139. if (this._buffer.getEOL() !== t) {
  26140. var n = this.getFullModelRange(), i = this.getValueLengthInRange(n), o = this.getLineCount(),
  26141. r = this.getLineMaxColumn(o);
  26142. this._onBeforeEOLChange(), this._buffer.setEOL(t), this._increaseVersionId(), this._onAfterEOLChange(), this._emitContentChangedEvent(new v.ModelRawContentChangedEvent([new v.ModelRawEOLChanged], this._versionId, !1, !1), this._createContentChanged2(new d.Range(1, 1, o, r), 0, i, this.getValue(), !1, !1, !1))
  26143. }
  26144. }, o.prototype._onBeforeEOLChange = function () {
  26145. var e = this.getVersionId(), t = this._decorationsTree.search(0, !1, !1, e);
  26146. this._ensureNodesHaveRanges(t)
  26147. }, o.prototype._onAfterEOLChange = function () {
  26148. for (var e = this.getVersionId(), t = this._decorationsTree.collectNodesPostOrder(), n = 0, i = t.length; n < i; n++) {
  26149. var o = t[n], r = o.cachedAbsoluteStart - o.start,
  26150. s = this._buffer.getOffsetAt(o.range.startLineNumber, o.range.startColumn),
  26151. a = this._buffer.getOffsetAt(o.range.endLineNumber, o.range.endColumn);
  26152. o.cachedAbsoluteStart = s, o.cachedAbsoluteEnd = a, o.cachedVersionId = e, o.start = s - r, o.end = a - r, f.recomputeMaxEnd(o)
  26153. }
  26154. }, o.prototype.onBeforeAttached = function () {
  26155. this._attachedEditorCount++, 1 === this._attachedEditorCount && this._onDidChangeAttached.fire(void 0)
  26156. }, o.prototype.onBeforeDetached = function () {
  26157. this._attachedEditorCount--, 0 === this._attachedEditorCount && this._onDidChangeAttached.fire(void 0)
  26158. }, o.prototype.isAttachedToEditor = function () {
  26159. return this._attachedEditorCount > 0
  26160. }, o.prototype.getAttachedEditorCount = function () {
  26161. return this._attachedEditorCount
  26162. }, o.prototype.isTooLargeForSyncing = function () {
  26163. return this._isTooLargeForSyncing
  26164. }, o.prototype.isTooLargeForTokenization = function () {
  26165. return this._isTooLargeForTokenization
  26166. },
  26167. o.prototype.isDisposed = function () {
  26168. return this._isDisposed
  26169. }, o.prototype.isDominatedByLongLines = function () {
  26170. if (this._assertNotDisposed(), this.isTooLargeForTokenization()) return !1;
  26171. for (var e = 0, n = 0, i = this._buffer.getLineCount(), o = 1; o <= i; o++) {
  26172. var r = this._buffer.getLineLength(o);
  26173. r >= t.LONG_LINE_BOUNDARY ? n += r : e += r
  26174. }
  26175. return n > e
  26176. }, Object.defineProperty(o.prototype, "uri", {
  26177. get: function () {
  26178. return this._associatedResource
  26179. }, enumerable: !0, configurable: !0
  26180. }), o.prototype.getOptions = function () {
  26181. return this._assertNotDisposed(), this._options
  26182. }, o.prototype.getFormattingOptions = function () {
  26183. return {tabSize: this._options.indentSize, insertSpaces: this._options.insertSpaces}
  26184. }, o.prototype.updateOptions = function (e) {
  26185. this._assertNotDisposed();
  26186. var t = void 0 !== e.tabSize ? e.tabSize : this._options.tabSize,
  26187. n = void 0 !== e.indentSize ? e.indentSize : this._options.indentSize,
  26188. i = void 0 !== e.insertSpaces ? e.insertSpaces : this._options.insertSpaces,
  26189. o = void 0 !== e.trimAutoWhitespace ? e.trimAutoWhitespace : this._options.trimAutoWhitespace,
  26190. r = new h.TextModelResolvedOptions({
  26191. tabSize: t,
  26192. indentSize: n,
  26193. insertSpaces: i,
  26194. defaultEOL: this._options.defaultEOL,
  26195. trimAutoWhitespace: o
  26196. });
  26197. if (!this._options.equals(r)) {
  26198. var s = this._options.createChangeEvent(r);
  26199. this._options = r, this._onDidChangeOptions.fire(s)
  26200. }
  26201. }, o.prototype.detectIndentation = function (e, t) {
  26202. this._assertNotDisposed();
  26203. var n = g.guessIndentation(this._buffer, t, e);
  26204. this.updateOptions({insertSpaces: n.insertSpaces, tabSize: n.tabSize, indentSize: n.tabSize})
  26205. }, o._normalizeIndentationFromWhitespace = function (e, t, n) {
  26206. for (var i = 0, o = 0; o < e.length; o++) "\t" === e.charAt(o) ? i += t : i++;
  26207. var r = "";
  26208. if (!n) {
  26209. var s = Math.floor(i / t);
  26210. i %= t;
  26211. for (o = 0; o < s; o++) r += "\t"
  26212. }
  26213. for (o = 0; o < i; o++) r += " ";
  26214. return r
  26215. }, o.normalizeIndentation = function (e, t, n) {
  26216. var i = s.firstNonWhitespaceIndex(e);
  26217. return -1 === i && (i = e.length), o._normalizeIndentationFromWhitespace(e.substring(0, i), t, n) + e.substring(i)
  26218. }, o.prototype.normalizeIndentation = function (e) {
  26219. return this._assertNotDisposed(), o.normalizeIndentation(e, this._options.indentSize, this._options.insertSpaces)
  26220. }, o.prototype.getVersionId = function () {
  26221. return this._assertNotDisposed(), this._versionId
  26222. }, o.prototype.mightContainRTL = function () {
  26223. return this._buffer.mightContainRTL()
  26224. }, o.prototype.mightContainNonBasicASCII = function () {
  26225. return this._buffer.mightContainNonBasicASCII()
  26226. }, o.prototype.getAlternativeVersionId = function () {
  26227. return this._assertNotDisposed(), this._alternativeVersionId
  26228. }, o.prototype.getOffsetAt = function (e) {
  26229. this._assertNotDisposed();
  26230. var t = this._validatePosition(e.lineNumber, e.column, 0);
  26231. return this._buffer.getOffsetAt(t.lineNumber, t.column)
  26232. }, o.prototype.getPositionAt = function (e) {
  26233. this._assertNotDisposed();
  26234. var t = Math.min(this._buffer.getLength(), Math.max(0, e));
  26235. return this._buffer.getPositionAt(t)
  26236. }, o.prototype._increaseVersionId = function () {
  26237. this._versionId = this._versionId + 1, this._alternativeVersionId = this._versionId
  26238. }, o.prototype._overwriteAlternativeVersionId = function (e) {
  26239. this._alternativeVersionId = e
  26240. }, o.prototype.getValue = function (e, t) {
  26241. void 0 === t && (t = !1), this._assertNotDisposed();
  26242. var n = this.getFullModelRange(), i = this.getValueInRange(n, e)
  26243. ;
  26244. return t ? this._buffer.getBOM() + i : i
  26245. }, o.prototype.getValueLength = function (e, t) {
  26246. void 0 === t && (t = !1), this._assertNotDisposed();
  26247. var n = this.getFullModelRange(), i = this.getValueLengthInRange(n, e);
  26248. return t ? this._buffer.getBOM().length + i : i
  26249. }, o.prototype.getValueInRange = function (e, t) {
  26250. return void 0 === t && (t = 0), this._assertNotDisposed(), this._buffer.getValueInRange(this.validateRange(e), t)
  26251. }, o.prototype.getValueLengthInRange = function (e, t) {
  26252. return void 0 === t && (t = 0), this._assertNotDisposed(), this._buffer.getValueLengthInRange(this.validateRange(e), t)
  26253. }, o.prototype.getCharacterCountInRange = function (e, t) {
  26254. return void 0 === t && (t = 0), this._assertNotDisposed(), this._buffer.getCharacterCountInRange(this.validateRange(e), t)
  26255. }, o.prototype.getLineCount = function () {
  26256. return this._assertNotDisposed(), this._buffer.getLineCount()
  26257. }, o.prototype.getLineContent = function (e) {
  26258. if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
  26259. return this._buffer.getLineContent(e)
  26260. }, o.prototype.getLineLength = function (e) {
  26261. if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
  26262. return this._buffer.getLineLength(e)
  26263. }, o.prototype.getLinesContent = function () {
  26264. return this._assertNotDisposed(), this._buffer.getLinesContent()
  26265. }, o.prototype.getEOL = function () {
  26266. return this._assertNotDisposed(), this._buffer.getEOL()
  26267. }, o.prototype.getLineMinColumn = function (e) {
  26268. return this._assertNotDisposed(), 1
  26269. }, o.prototype.getLineMaxColumn = function (e) {
  26270. if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
  26271. return this._buffer.getLineLength(e) + 1
  26272. }, o.prototype.getLineFirstNonWhitespaceColumn = function (e) {
  26273. if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
  26274. return this._buffer.getLineFirstNonWhitespaceColumn(e)
  26275. }, o.prototype.getLineLastNonWhitespaceColumn = function (e) {
  26276. if (this._assertNotDisposed(), e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
  26277. return this._buffer.getLineLastNonWhitespaceColumn(e)
  26278. },
  26279. o.prototype._validateRangeRelaxedNoAllocations = function (e) {
  26280. var t, n, i = this._buffer.getLineCount(), o = e.startLineNumber, r = e.startColumn;
  26281. if (o < 1) t = 1, n = 1; else if (o > i) t = i, n = this.getLineMaxColumn(t); else {
  26282. if (t = 0 | o, r <= 1) n = 1; else n = r >= (h = this.getLineMaxColumn(t)) ? h : 0 | r
  26283. }
  26284. var s, a, l = e.endLineNumber, u = e.endColumn;
  26285. if (l < 1) s = 1, a = 1; else if (l > i) s = i, a = this.getLineMaxColumn(s); else {
  26286. var h;
  26287. if (s = 0 | l, u <= 1) a = 1; else a = u >= (h = this.getLineMaxColumn(s)) ? h : 0 | u
  26288. }
  26289. return o === t && r === n && l === s && u === a && e instanceof d.Range && !(e instanceof c.Selection) ? e : new d.Range(t, n, s, a)
  26290. }, o.prototype._isValidPosition = function (e, t, n) {
  26291. if ("number" != typeof e || "number" != typeof t) return !1;
  26292. if (isNaN(e) || isNaN(t)) return !1;
  26293. if (e < 1 || t < 1) return !1;
  26294. if ((0 | e) !== e || (0 | t) !== t) return !1;
  26295. if (e > this._buffer.getLineCount()) return !1;
  26296. if (1 === t) return !0;
  26297. if (t > this.getLineMaxColumn(e)) return !1;
  26298. if (1 === n) {
  26299. var i = this._buffer.getLineCharCode(e, t - 2);
  26300. if (s.isHighSurrogate(i)) return !1
  26301. }
  26302. return !0
  26303. }, o.prototype._validatePosition = function (e, t, n) {
  26304. var i = Math.floor("number" != typeof e || isNaN(e) ? 1 : e),
  26305. o = Math.floor("number" != typeof t || isNaN(t) ? 1 : t), r = this._buffer.getLineCount();
  26306. if (i < 1) return new u.Position(1, 1);
  26307. if (i > r) return new u.Position(r, this.getLineMaxColumn(r));
  26308. if (o <= 1) return new u.Position(i, 1);
  26309. var a = this.getLineMaxColumn(i);
  26310. if (o >= a) return new u.Position(i, a);
  26311. if (1 === n) {
  26312. var l = this._buffer.getLineCharCode(i, o - 2);
  26313. if (s.isHighSurrogate(l)) return new u.Position(i, o - 1)
  26314. }
  26315. return new u.Position(i, o)
  26316. }, o.prototype.validatePosition = function (e) {
  26317. return this._assertNotDisposed(), e instanceof u.Position && this._isValidPosition(e.lineNumber, e.column, 1) ? e : this._validatePosition(e.lineNumber, e.column, 1)
  26318. }, o.prototype._isValidRange = function (e, t) {
  26319. var n = e.startLineNumber, i = e.startColumn, o = e.endLineNumber, r = e.endColumn;
  26320. if (!this._isValidPosition(n, i, 0)) return !1;
  26321. if (!this._isValidPosition(o, r, 0)) return !1;
  26322. if (1 === t) {
  26323. var a = i > 1 ? this._buffer.getLineCharCode(n, i - 2) : 0,
  26324. l = r > 1 && r <= this._buffer.getLineLength(o) ? this._buffer.getLineCharCode(o, r - 2) : 0,
  26325. u = s.isHighSurrogate(a), d = s.isHighSurrogate(l);
  26326. return !u && !d
  26327. }
  26328. return !0
  26329. }, o.prototype.validateRange = function (e) {
  26330. if (this._assertNotDisposed(), e instanceof d.Range && !(e instanceof c.Selection) && this._isValidRange(e, 1)) return e;
  26331. var t = this._validatePosition(e.startLineNumber, e.startColumn, 0),
  26332. n = this._validatePosition(e.endLineNumber, e.endColumn, 0), i = t.lineNumber, o = t.column,
  26333. r = n.lineNumber, a = n.column, l = o > 1 ? this._buffer.getLineCharCode(i, o - 2) : 0,
  26334. u = a > 1 && a <= this._buffer.getLineLength(r) ? this._buffer.getLineCharCode(r, a - 2) : 0,
  26335. h = s.isHighSurrogate(l), p = s.isHighSurrogate(u);
  26336. return h || p ? i === r && o === a ? new d.Range(i, o - 1, r, a - 1) : h && p ? new d.Range(i, o - 1, r, a + 1) : h ? new d.Range(i, o - 1, r, a) : new d.Range(i, o, r, a + 1) : new d.Range(i, o, r, a)
  26337. }, o.prototype.modifyPosition = function (e, t) {
  26338. this._assertNotDisposed();
  26339. var n = this.getOffsetAt(e) + t;
  26340. return this.getPositionAt(Math.min(this._buffer.getLength(), Math.max(0, n)))
  26341. },
  26342. o.prototype.getFullModelRange = function () {
  26343. this._assertNotDisposed();
  26344. var e = this.getLineCount();
  26345. return new d.Range(1, 1, e, this.getLineMaxColumn(e))
  26346. }, o.prototype.findMatchesLineByLine = function (e, t, n, i) {
  26347. return this._buffer.findMatchesLineByLine(e, t, n, i)
  26348. }, o.prototype.findMatches = function (e, t, n, i, o, r, s) {
  26349. var a;
  26350. if (void 0 === s && (s = 999), this._assertNotDisposed(), a = d.Range.isIRange(t) ? this.validateRange(t) : this.getFullModelRange(), !n && e.indexOf("\n") < 0) {
  26351. var l = new _.SearchParams(e, n, i, o).parseSearchRequest();
  26352. return l ? this.findMatchesLineByLine(a, l, r, s) : []
  26353. }
  26354. return _.TextModelSearch.findMatches(this, new _.SearchParams(e, n, i, o), a, r, s)
  26355. }, o.prototype.findNextMatch = function (e, t, n, i, o, r) {
  26356. this._assertNotDisposed();
  26357. var s = this.validatePosition(t);
  26358. if (!n && e.indexOf("\n") < 0) {
  26359. var a = new _.SearchParams(e, n, i, o).parseSearchRequest();
  26360. if (!a) return null;
  26361. var l = this.getLineCount(), u = new d.Range(s.lineNumber, s.column, l, this.getLineMaxColumn(l)),
  26362. c = this.findMatchesLineByLine(u, a, r, 1)
  26363. ;
  26364. return _.TextModelSearch.findNextMatch(this, new _.SearchParams(e, n, i, o), s, r), c.length > 0 ? c[0] : (u = new d.Range(1, 1, s.lineNumber, this.getLineMaxColumn(s.lineNumber)), (c = this.findMatchesLineByLine(u, a, r, 1)).length > 0 ? c[0] : null)
  26365. }
  26366. return _.TextModelSearch.findNextMatch(this, new _.SearchParams(e, n, i, o), s, r)
  26367. }, o.prototype.findPreviousMatch = function (e, t, n, i, o, r) {
  26368. this._assertNotDisposed();
  26369. var s = this.validatePosition(t);
  26370. return _.TextModelSearch.findPreviousMatch(this, new _.SearchParams(e, n, i, o), s, r)
  26371. }, o.prototype.pushStackElement = function () {
  26372. this._commandManager.pushStackElement()
  26373. }, o.prototype.pushEOL = function (e) {
  26374. if (("\n" === this.getEOL() ? 0 : 1) !== e) try {
  26375. this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(), this._commandManager.pushEOL(e)
  26376. } finally {
  26377. this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
  26378. }
  26379. }, o.prototype.pushEditOperations = function (e, t, n) {
  26380. try {
  26381. return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(),
  26382. this._pushEditOperations(e, t, n)
  26383. } finally {
  26384. this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
  26385. }
  26386. }, o.prototype._pushEditOperations = function (e, t, n) {
  26387. var i = this;
  26388. if (this._options.trimAutoWhitespace && this._trimAutoWhitespaceLines) {
  26389. for (var o = t.map((function (e) {
  26390. return {range: i.validateRange(e.range), text: e.text}
  26391. })), r = !0, s = 0, a = e.length; s < a; s++) {
  26392. for (var l = e[s], u = !1, c = 0, h = o.length; c < h; c++) {
  26393. var p = (_ = o[c].range).startLineNumber > l.endLineNumber,
  26394. g = l.startLineNumber > _.endLineNumber;
  26395. if (!p && !g) {
  26396. u = !0;
  26397. break
  26398. }
  26399. }
  26400. if (!u) {
  26401. r = !1;
  26402. break
  26403. }
  26404. }
  26405. if (r) for (s = 0, a = this._trimAutoWhitespaceLines.length; s < a; s++) {
  26406. var f = this._trimAutoWhitespaceLines[s], m = this.getLineMaxColumn(f), v = !0;
  26407. for (c = 0, h = o.length; c < h; c++) {
  26408. var _ = o[c].range, y = o[c].text;
  26409. if (!(f < _.startLineNumber || f > _.endLineNumber) && !(f === _.startLineNumber && _.startColumn === m && _.isEmpty() && y && y.length > 0 && "\n" === y.charAt(0) || f === _.startLineNumber && 1 === _.startColumn && _.isEmpty() && y && y.length > 0 && "\n" === y.charAt(y.length - 1))) {
  26410. v = !1;
  26411. break
  26412. }
  26413. }
  26414. v && t.push({
  26415. range: new d.Range(f, 1, f, m),
  26416. text: null
  26417. })
  26418. }
  26419. this._trimAutoWhitespaceLines = null
  26420. }
  26421. return this._commandManager.pushEditOperation(e, t, n)
  26422. }, o.prototype.applyEdits = function (e) {
  26423. try {
  26424. return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(), this._applyEdits(e)
  26425. } finally {
  26426. this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
  26427. }
  26428. }, o.prototype._applyEdits = function (e) {
  26429. for (var t = 0, n = e.length; t < n; t++) e[t].range = this.validateRange(e[t].range);
  26430. var i = this._buffer.getLineCount(), o = this._buffer.applyEdits(e, this._options.trimAutoWhitespace),
  26431. r = this._buffer.getLineCount(), s = o.changes;
  26432. if (this._trimAutoWhitespaceLines = o.trimAutoWhitespaceLineNumbers, 0 !== s.length) {
  26433. var a = [], l = i;
  26434. for (t = 0, n = s.length; t < n; t++) {
  26435. var u = s[t], d = D.countEOL(u.text), c = d[0], h = d[1], p = d[2];
  26436. this._tokens.acceptEdit(u.range, c, h), this._tokens2.acceptEdit(u.range, c, h, p, u.text.length > 0 ? u.text.charCodeAt(0) : 0), this._onDidChangeDecorations.fire(), this._decorationsTree.acceptReplace(u.rangeOffset, u.rangeLength, u.text.length, u.forceMoveMarkers)
  26437. ;
  26438. for (var g = u.range.startLineNumber, f = u.range.endLineNumber, m = f - g, _ = c, y = Math.min(m, _), C = _ - m, b = y; b >= 0; b--) {
  26439. var S = g + b, w = r - l - C + S;
  26440. a.push(new v.ModelRawLineChanged(S, this.getLineContent(w)))
  26441. }
  26442. if (y < m) {
  26443. var E = g + y;
  26444. a.push(new v.ModelRawLinesDeleted(E + 1, f))
  26445. }
  26446. if (y < _) {
  26447. for (var L = g + y, N = _ - y, x = r - l - N + L + 1, I = [], M = 0; M < N; M++) {
  26448. var k = x + M;
  26449. I[k - x] = this.getLineContent(k)
  26450. }
  26451. a.push(new v.ModelRawLinesInserted(L + 1, g + _, I))
  26452. }
  26453. l += C
  26454. }
  26455. this._increaseVersionId(), this._emitContentChangedEvent(new v.ModelRawContentChangedEvent(a, this.getVersionId(), this._isUndoing, this._isRedoing), {
  26456. changes: s,
  26457. eol: this._buffer.getEOL(),
  26458. versionId: this.getVersionId(),
  26459. isUndoing: this._isUndoing,
  26460. isRedoing: this._isRedoing,
  26461. isFlush: !1
  26462. })
  26463. }
  26464. return o.reverseEdits
  26465. }, o.prototype._undo = function () {
  26466. this._isUndoing = !0;
  26467. var e = this._commandManager.undo();
  26468. return this._isUndoing = !1, e ? (this._overwriteAlternativeVersionId(e.recordedVersionId), e.selections) : null
  26469. }, o.prototype.undo = function () {
  26470. try {
  26471. return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(), this._undo()
  26472. } finally {
  26473. this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
  26474. }
  26475. }, o.prototype.canUndo = function () {
  26476. return this._commandManager.canUndo()
  26477. }, o.prototype._redo = function () {
  26478. this._isRedoing = !0;
  26479. var e = this._commandManager.redo();
  26480. return this._isRedoing = !1, e ? (this._overwriteAlternativeVersionId(e.recordedVersionId), e.selections) : null
  26481. }, o.prototype.redo = function () {
  26482. try {
  26483. return this._onDidChangeDecorations.beginDeferredEmit(), this._eventEmitter.beginDeferredEmit(), this._redo()
  26484. } finally {
  26485. this._eventEmitter.endDeferredEmit(), this._onDidChangeDecorations.endDeferredEmit()
  26486. }
  26487. }, o.prototype.canRedo = function () {
  26488. return this._commandManager.canRedo()
  26489. }, o.prototype.changeDecorations = function (e, t) {
  26490. void 0 === t && (t = 0), this._assertNotDisposed();
  26491. try {
  26492. return this._onDidChangeDecorations.beginDeferredEmit(), this._changeDecorations(t, e)
  26493. } finally {
  26494. this._onDidChangeDecorations.endDeferredEmit()
  26495. }
  26496. }, o.prototype._changeDecorations = function (e, t) {
  26497. var i = this, o = {
  26498. addDecoration: function (t, n) {
  26499. return i._onDidChangeDecorations.fire(),
  26500. i._deltaDecorationsImpl(e, [], [{range: t, options: n}])[0]
  26501. }, changeDecoration: function (e, t) {
  26502. i._onDidChangeDecorations.fire(), i._changeDecorationImpl(e, t)
  26503. }, changeDecorationOptions: function (e, t) {
  26504. i._onDidChangeDecorations.fire(), i._changeDecorationOptionsImpl(e, V(t))
  26505. }, removeDecoration: function (t) {
  26506. i._onDidChangeDecorations.fire(), i._deltaDecorationsImpl(e, [t], [])
  26507. }, deltaDecorations: function (t, n) {
  26508. return 0 === t.length && 0 === n.length ? [] : (i._onDidChangeDecorations.fire(), i._deltaDecorationsImpl(e, t, n))
  26509. }
  26510. }, r = null;
  26511. try {
  26512. r = t(o)
  26513. } catch (e) {
  26514. n.onUnexpectedError(e)
  26515. }
  26516. return o.addDecoration = k, o.changeDecoration = k, o.changeDecorationOptions = k, o.removeDecoration = k, o.deltaDecorations = k, r
  26517. }, o.prototype.deltaDecorations = function (e, t, n) {
  26518. if (void 0 === n && (n = 0), this._assertNotDisposed(), e || (e = []), 0 === e.length && 0 === t.length) return [];
  26519. try {
  26520. return this._onDidChangeDecorations.beginDeferredEmit(), this._onDidChangeDecorations.fire(), this._deltaDecorationsImpl(n, e, t)
  26521. } finally {
  26522. this._onDidChangeDecorations.endDeferredEmit()
  26523. }
  26524. },
  26525. o.prototype._getTrackedRange = function (e) {
  26526. return this.getDecorationRange(e)
  26527. }, o.prototype._setTrackedRange = function (e, t, n) {
  26528. var i = e ? this._decorations[e] : null;
  26529. if (!i) return t ? this._deltaDecorationsImpl(0, [], [{range: t, options: B[n]}])[0] : null;
  26530. if (!t) return this._decorationsTree.delete(i), delete this._decorations[i.id], null;
  26531. var o = this._validateRangeRelaxedNoAllocations(t),
  26532. r = this._buffer.getOffsetAt(o.startLineNumber, o.startColumn),
  26533. s = this._buffer.getOffsetAt(o.endLineNumber, o.endColumn);
  26534. return this._decorationsTree.delete(i), i.reset(this.getVersionId(), r, s, o), i.setOptions(B[n]), this._decorationsTree.insert(i), i.id
  26535. }, o.prototype.removeAllDecorationsWithOwnerId = function (e) {
  26536. if (!this._isDisposed) for (var t = this._decorationsTree.collectNodesFromOwner(e), n = 0, i = t.length; n < i; n++) {
  26537. var o = t[n];
  26538. this._decorationsTree.delete(o), delete this._decorations[o.id]
  26539. }
  26540. }, o.prototype.getDecorationOptions = function (e) {
  26541. var t = this._decorations[e];
  26542. return t ? t.options : null
  26543. }, o.prototype.getDecorationRange = function (e) {
  26544. var t = this._decorations[e]
  26545. ;
  26546. if (!t) return null;
  26547. var n = this.getVersionId();
  26548. return t.cachedVersionId !== n && this._decorationsTree.resolveNode(t, n), null === t.range && (t.range = this._getRangeAt(t.cachedAbsoluteStart, t.cachedAbsoluteEnd)), t.range
  26549. }, o.prototype.getLineDecorations = function (e, t, n) {
  26550. return void 0 === t && (t = 0), void 0 === n && (n = !1), e < 1 || e > this.getLineCount() ? [] : this.getLinesDecorations(e, e, t, n)
  26551. }, o.prototype.getLinesDecorations = function (e, t, n, i) {
  26552. void 0 === n && (n = 0), void 0 === i && (i = !1);
  26553. var o = this.getLineCount(), r = Math.min(o, Math.max(1, e)), s = Math.min(o, Math.max(1, t)),
  26554. a = this.getLineMaxColumn(s);
  26555. return this._getDecorationsInRange(new d.Range(r, 1, s, a), n, i)
  26556. }, o.prototype.getDecorationsInRange = function (e, t, n) {
  26557. void 0 === t && (t = 0), void 0 === n && (n = !1);
  26558. var i = this.validateRange(e);
  26559. return this._getDecorationsInRange(i, t, n)
  26560. }, o.prototype.getOverviewRulerDecorations = function (e, t) {
  26561. void 0 === e && (e = 0), void 0 === t && (t = !1);
  26562. var n = this.getVersionId(), i = this._decorationsTree.search(e, t, !0, n);
  26563. return this._ensureNodesHaveRanges(i)
  26564. }, o.prototype.getAllDecorations = function (e, t) {
  26565. void 0 === e && (e = 0), void 0 === t && (t = !1);
  26566. var n = this.getVersionId(), i = this._decorationsTree.search(e, t, !1, n);
  26567. return this._ensureNodesHaveRanges(i)
  26568. }, o.prototype._getDecorationsInRange = function (e, t, n) {
  26569. var i = this._buffer.getOffsetAt(e.startLineNumber, e.startColumn),
  26570. o = this._buffer.getOffsetAt(e.endLineNumber, e.endColumn), r = this.getVersionId(),
  26571. s = this._decorationsTree.intervalSearch(i, o, t, n, r);
  26572. return this._ensureNodesHaveRanges(s)
  26573. }, o.prototype._ensureNodesHaveRanges = function (e) {
  26574. for (var t = 0, n = e.length; t < n; t++) {
  26575. var i = e[t];
  26576. null === i.range && (i.range = this._getRangeAt(i.cachedAbsoluteStart, i.cachedAbsoluteEnd))
  26577. }
  26578. return e
  26579. }, o.prototype._getRangeAt = function (e, t) {
  26580. return this._buffer.getRangeAt(e, t - e)
  26581. }, o.prototype._changeDecorationImpl = function (e, t) {
  26582. var n = this._decorations[e];
  26583. if (n) {
  26584. var i = this._validateRangeRelaxedNoAllocations(t),
  26585. o = this._buffer.getOffsetAt(i.startLineNumber, i.startColumn),
  26586. r = this._buffer.getOffsetAt(i.endLineNumber, i.endColumn);
  26587. this._decorationsTree.delete(n), n.reset(this.getVersionId(), o, r, i),
  26588. this._decorationsTree.insert(n)
  26589. }
  26590. }, o.prototype._changeDecorationOptionsImpl = function (e, t) {
  26591. var n = this._decorations[e];
  26592. n && (!(!n.options.overviewRuler || !n.options.overviewRuler.color) !== !(!t.overviewRuler || !t.overviewRuler.color) ? (this._decorationsTree.delete(n), n.setOptions(t), this._decorationsTree.insert(n)) : n.setOptions(t))
  26593. }, o.prototype._deltaDecorationsImpl = function (e, t, n) {
  26594. for (var i = this.getVersionId(), o = t.length, r = 0, s = n.length, a = 0, l = new Array(s); r < o || a < s;) {
  26595. var u = null;
  26596. if (r < o) {
  26597. do {
  26598. u = this._decorations[t[r++]]
  26599. } while (!u && r < o);
  26600. u && this._decorationsTree.delete(u)
  26601. }
  26602. if (a < s) {
  26603. if (!u) {
  26604. var d = ++this._lastDecorationId, c = this._instanceId + ";" + d;
  26605. u = new f.IntervalNode(c, 0, 0), this._decorations[c] = u
  26606. }
  26607. var h = n[a], p = this._validateRangeRelaxedNoAllocations(h.range), g = V(h.options),
  26608. m = this._buffer.getOffsetAt(p.startLineNumber, p.startColumn),
  26609. v = this._buffer.getOffsetAt(p.endLineNumber, p.endColumn);
  26610. u.ownerId = e, u.reset(i, m, v, p), u.setOptions(g), this._decorationsTree.insert(u), l[a] = u.id, a++
  26611. } else u && delete this._decorations[u.id]
  26612. }
  26613. return l
  26614. },
  26615. o.prototype.setLineTokens = function (e, t) {
  26616. if (e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
  26617. this._tokens.setTokens(this._languageIdentifier.id, e - 1, this._buffer.getLineLength(e), t)
  26618. }, o.prototype.setTokens = function (e) {
  26619. if (0 !== e.length) {
  26620. for (var t = [], n = 0, i = e.length; n < i; n++) {
  26621. var o = e[n];
  26622. t.push({
  26623. fromLineNumber: o.startLineNumber,
  26624. toLineNumber: o.startLineNumber + o.tokens.length - 1
  26625. });
  26626. for (var r = 0, s = o.tokens.length; r < s; r++) this.setLineTokens(o.startLineNumber + r, o.tokens[r])
  26627. }
  26628. this._emitModelTokensChangedEvent({tokenizationSupportChanged: !1, ranges: t})
  26629. }
  26630. }, o.prototype.setSemanticTokens = function (e) {
  26631. this._tokens2.set(e), this._emitModelTokensChangedEvent({
  26632. tokenizationSupportChanged: !1,
  26633. ranges: [{fromLineNumber: 1, toLineNumber: this.getLineCount()}]
  26634. })
  26635. }, o.prototype.tokenizeViewport = function (e, t) {
  26636. e = Math.max(1, e), t = Math.min(this._buffer.getLineCount(), t), this._tokenization.tokenizeViewport(e, t)
  26637. },o.prototype.clearTokens = function () {
  26638. this._tokens.flush(), this._emitModelTokensChangedEvent({
  26639. tokenizationSupportChanged: !0,
  26640. ranges: [{fromLineNumber: 1, toLineNumber: this._buffer.getLineCount()}]
  26641. })
  26642. },o.prototype._emitModelTokensChangedEvent = function (e) {
  26643. this._isDisposing || this._onDidChangeTokens.fire(e)
  26644. },o.prototype.resetTokenization = function () {
  26645. this._tokenization.reset()
  26646. },o.prototype.forceTokenization = function (e) {
  26647. if (e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
  26648. this._tokenization.forceTokenization(e)
  26649. },o.prototype.isCheapToTokenize = function (e) {
  26650. return this._tokenization.isCheapToTokenize(e)
  26651. },o.prototype.tokenizeIfCheap = function (e) {
  26652. this.isCheapToTokenize(e) && this.forceTokenization(e)
  26653. },o.prototype.getLineTokens = function (e) {
  26654. if (e < 1 || e > this.getLineCount()) throw new Error("Illegal value for lineNumber");
  26655. return this._getLineTokens(e)
  26656. },o.prototype._getLineTokens = function (e) {
  26657. var t = this.getLineContent(e), n = this._tokens.getTokens(this._languageIdentifier.id, e - 1, t);
  26658. return this._tokens2.addSemanticTokens(e, n)
  26659. },o.prototype.getLanguageIdentifier = function () {
  26660. return this._languageIdentifier
  26661. },o.prototype.getModeId = function () {
  26662. return this._languageIdentifier.language
  26663. },o.prototype.setMode = function (e) {
  26664. if (this._languageIdentifier.id !== e.id) {
  26665. var t = {oldLanguage: this._languageIdentifier.language, newLanguage: e.language};
  26666. this._languageIdentifier = e, this._onDidChangeLanguage.fire(t), this._onDidChangeLanguageConfiguration.fire({})
  26667. }
  26668. },o.prototype.getLanguageIdAtPosition = function (e, t) {
  26669. var n = this.validatePosition(new u.Position(e, t)), i = this.getLineTokens(n.lineNumber);
  26670. return i.getLanguageId(i.findTokenIndexAtOffset(n.column - 1))
  26671. },o.prototype.getWordAtPosition = function (e) {
  26672. this._assertNotDisposed();
  26673. var t = this.validatePosition(e), n = this.getLineContent(t.lineNumber),
  26674. i = this._getLineTokens(t.lineNumber), r = i.findTokenIndexAtOffset(t.column - 1),
  26675. s = o._findLanguageBoundaries(i, r), a = s[0], l = s[1],
  26676. u = C.getWordAtText(t.column, b.LanguageConfigurationRegistry.getWordDefinition(i.getLanguageId(r)), n.substring(a, l), a);
  26677. if (u && u.startColumn <= e.column && e.column <= u.endColumn) return u;
  26678. if (r > 0 && a === t.column - 1) {
  26679. var d = o._findLanguageBoundaries(i, r - 1), c = d[0], h = d[1],
  26680. p = C.getWordAtText(t.column, b.LanguageConfigurationRegistry.getWordDefinition(i.getLanguageId(r - 1)), n.substring(c, h), c);
  26681. if (p && p.startColumn <= e.column && e.column <= p.endColumn) return p
  26682. }
  26683. return null
  26684. },o._findLanguageBoundaries = function (e, t) {
  26685. for (var n = e.getLanguageId(t), i = 0, o = t; o >= 0 && e.getLanguageId(o) === n; o--) i = e.getStartOffset(o);
  26686. for (var r = e.getLineContent().length, s = (o = t, e.getCount()); o < s && e.getLanguageId(o) === n; o++) r = e.getEndOffset(o);
  26687. return [i, r]
  26688. },o.prototype.getWordUntilPosition = function (e) {
  26689. var t = this.getWordAtPosition(e);
  26690. return t ? {
  26691. word: t.word.substr(0, e.column - t.startColumn),
  26692. startColumn: t.startColumn,
  26693. endColumn: e.column
  26694. } : {word: "", startColumn: e.column, endColumn: e.column}
  26695. },o.prototype.findMatchingBracketUp = function (e, t) {
  26696. var n = e.toLowerCase(), i = this.validatePosition(t), o = this._getLineTokens(i.lineNumber),
  26697. r = o.getLanguageId(o.findTokenIndexAtOffset(i.column - 1)),
  26698. s = b.LanguageConfigurationRegistry.getBracketsSupport(r);
  26699. if (!s) return null;
  26700. var a = s.textIsBracket[n]
  26701. ;
  26702. return a ? this._findMatchingBracketUp(a, i) : null
  26703. },o.prototype.matchBracket = function (e) {
  26704. return this._matchBracket(this.validatePosition(e))
  26705. },o.prototype._matchBracket = function (e) {
  26706. var t = e.lineNumber, n = this._getLineTokens(t), i = n.getCount(), o = this._buffer.getLineContent(t),
  26707. r = n.findTokenIndexAtOffset(e.column - 1);
  26708. if (r < 0) return null;
  26709. var s = b.LanguageConfigurationRegistry.getBracketsSupport(n.getLanguageId(r));
  26710. if (s && !w.ignoreBracketsInToken(n.getStandardTokenType(r))) {
  26711. for (var a = Math.max(0, e.column - 1 - s.maxBracketLength), l = r - 1; l >= 0; l--) {
  26712. var u = n.getEndOffset(l);
  26713. if (u <= a) break;
  26714. w.ignoreBracketsInToken(n.getStandardTokenType(l)) && (a = u)
  26715. }
  26716. for (var d = Math.min(o.length, e.column - 1 + s.maxBracketLength), c = null; ;) {
  26717. if (!(m = E.BracketsUtils.findNextBracketInRange(s.forwardRegex, t, o, a, d))) break;
  26718. if (m.startColumn <= e.column && e.column <= m.endColumn) {
  26719. var h = o.substring(m.startColumn - 1, m.endColumn - 1).toLowerCase();
  26720. (v = this._matchFoundBracket(m, s.textIsBracket[h], s.textIsOpenBracket[h])) && (c = v)
  26721. }
  26722. a = m.endColumn - 1
  26723. }
  26724. if (c) return c
  26725. }
  26726. if (r > 0 && n.getStartOffset(r) === e.column - 1) {
  26727. var p = r - 1, g = b.LanguageConfigurationRegistry.getBracketsSupport(n.getLanguageId(p));
  26728. if (g && !w.ignoreBracketsInToken(n.getStandardTokenType(p))) {
  26729. for (a = Math.max(0, e.column - 1 - g.maxBracketLength), d = Math.min(o.length, e.column - 1 + g.maxBracketLength), l = p + 1; l < i; l++) {
  26730. var f = n.getStartOffset(l);
  26731. if (f >= d) break;
  26732. w.ignoreBracketsInToken(n.getStandardTokenType(l)) && (d = f)
  26733. }
  26734. var m;
  26735. if ((m = E.BracketsUtils.findPrevBracketInRange(g.reversedRegex, t, o, a, d)) && m.startColumn <= e.column && e.column <= m.endColumn) {
  26736. var v;
  26737. h = o.substring(m.startColumn - 1, m.endColumn - 1).toLowerCase();
  26738. if (v = this._matchFoundBracket(m, g.textIsBracket[h], g.textIsOpenBracket[h])) return v
  26739. }
  26740. }
  26741. }
  26742. return null
  26743. },o.prototype._matchFoundBracket = function (e, t, n) {
  26744. if (!t) return null;
  26745. var i;
  26746. if (n) {
  26747. if (i = this._findMatchingBracketDown(t, e.getEndPosition())) return [e, i]
  26748. } else if (i = this._findMatchingBracketUp(t, e.getStartPosition())) return [e, i];
  26749. return null
  26750. },o.prototype._findMatchingBracketUp = function (e, t) {
  26751. for (var n = e.languageIdentifier.id, i = e.reversedRegex, o = -1, r = function (t, n, r, s) {
  26752. for (; ;) {
  26753. var a = E.BracketsUtils.findPrevBracketInRange(i, t, n, r, s);
  26754. if (!a) break;
  26755. var l = n.substring(a.startColumn - 1, a.endColumn - 1).toLowerCase();
  26756. if (e.isOpen(l) ? o++ : e.isClose(l) && o--, 0 === o) return a;
  26757. s = a.startColumn - 1
  26758. }
  26759. return null
  26760. }, s = t.lineNumber; s >= 1; s--) {
  26761. var a = this._getLineTokens(s), l = a.getCount(), u = this._buffer.getLineContent(s), d = l - 1,
  26762. c = u.length, h = u.length;
  26763. s === t.lineNumber && (d = a.findTokenIndexAtOffset(t.column - 1), c = t.column - 1, h = t.column - 1);
  26764. for (var p = !0; d >= 0; d--) {
  26765. var g, f = a.getLanguageId(d) === n && !w.ignoreBracketsInToken(a.getStandardTokenType(d));
  26766. if (f) p ? c = a.getStartOffset(d) : (c = a.getStartOffset(d), h = a.getEndOffset(d)); else if (p && c !== h) if (g = r(s, u, c, h)) return g;
  26767. p = f
  26768. }
  26769. if (p && c !== h) if (g = r(s, u, c, h)) return g
  26770. }
  26771. return null
  26772. },o.prototype._findMatchingBracketDown = function (e, t) {
  26773. for (var n = e.languageIdentifier.id, i = e.forwardRegex, o = 1, r = function (t, n, r, s) {
  26774. for (; ;) {
  26775. var a = E.BracketsUtils.findNextBracketInRange(i, t, n, r, s);
  26776. if (!a) break
  26777. ;
  26778. var l = n.substring(a.startColumn - 1, a.endColumn - 1).toLowerCase();
  26779. if (e.isOpen(l) ? o++ : e.isClose(l) && o--, 0 === o) return a;
  26780. r = a.endColumn - 1
  26781. }
  26782. return null
  26783. }, s = this.getLineCount(), a = t.lineNumber; a <= s; a++) {
  26784. var l = this._getLineTokens(a), u = l.getCount(), d = this._buffer.getLineContent(a), c = 0, h = 0,
  26785. p = 0;
  26786. a === t.lineNumber && (c = l.findTokenIndexAtOffset(t.column - 1), h = t.column - 1, p = t.column - 1);
  26787. for (var g = !0; c < u; c++) {
  26788. var f, m = l.getLanguageId(c) === n && !w.ignoreBracketsInToken(l.getStandardTokenType(c));
  26789. if (m) g ? p = l.getEndOffset(c) : (h = l.getStartOffset(c), p = l.getEndOffset(c)); else if (g && h !== p) if (f = r(a, d, h, p)) return f;
  26790. g = m
  26791. }
  26792. if (g && h !== p) if (f = r(a, d, h, p)) return f
  26793. }
  26794. return null
  26795. },o.prototype.findPrevBracket = function (e) {
  26796. for (var t = this.validatePosition(e), n = -1, i = null, o = t.lineNumber; o >= 1; o--) {
  26797. var r = this._getLineTokens(o), s = r.getCount(), a = this._buffer.getLineContent(o), l = s - 1,
  26798. u = a.length, d = a.length;
  26799. if (o === t.lineNumber) l = r.findTokenIndexAtOffset(t.column - 1), u = t.column - 1, d = t.column - 1, n !== (h = r.getLanguageId(l)) && (n = h,
  26800. i = b.LanguageConfigurationRegistry.getBracketsSupport(n));
  26801. for (var c = !0; l >= 0; l--) {
  26802. var h;
  26803. if (n !== (h = r.getLanguageId(l))) {
  26804. if (i && c && u !== d) {
  26805. if (p = E.BracketsUtils.findPrevBracketInRange(i.reversedRegex, o, a, u, d)) return this._toFoundBracket(i, p);
  26806. c = !1
  26807. }
  26808. n = h, i = b.LanguageConfigurationRegistry.getBracketsSupport(n)
  26809. }
  26810. var p, g = !!i && !w.ignoreBracketsInToken(r.getStandardTokenType(l));
  26811. if (g) c ? u = r.getStartOffset(l) : (u = r.getStartOffset(l), d = r.getEndOffset(l)); else if (i && c && u !== d) if (p = E.BracketsUtils.findPrevBracketInRange(i.reversedRegex, o, a, u, d)) return this._toFoundBracket(i, p);
  26812. c = g
  26813. }
  26814. if (i && c && u !== d) if (p = E.BracketsUtils.findPrevBracketInRange(i.reversedRegex, o, a, u, d)) return this._toFoundBracket(i, p)
  26815. }
  26816. return null
  26817. },o.prototype.findNextBracket = function (e) {
  26818. for (var t = this.validatePosition(e), n = this.getLineCount(), i = -1, o = null, r = t.lineNumber; r <= n; r++) {
  26819. var s = this._getLineTokens(r), a = s.getCount(), l = this._buffer.getLineContent(r), u = 0, d = 0,
  26820. c = 0;
  26821. if (r === t.lineNumber) u = s.findTokenIndexAtOffset(t.column - 1), d = t.column - 1, c = t.column - 1,
  26822. i !== (p = s.getLanguageId(u)) && (i = p, o = b.LanguageConfigurationRegistry.getBracketsSupport(i));
  26823. for (var h = !0; u < a; u++) {
  26824. var p;
  26825. if (i !== (p = s.getLanguageId(u))) {
  26826. if (o && h && d !== c) {
  26827. if (g = E.BracketsUtils.findNextBracketInRange(o.forwardRegex, r, l, d, c)) return this._toFoundBracket(o, g);
  26828. h = !1
  26829. }
  26830. i = p, o = b.LanguageConfigurationRegistry.getBracketsSupport(i)
  26831. }
  26832. var g, f = !!o && !w.ignoreBracketsInToken(s.getStandardTokenType(u));
  26833. if (f) h ? c = s.getEndOffset(u) : (d = s.getStartOffset(u), c = s.getEndOffset(u)); else if (o && h && d !== c) if (g = E.BracketsUtils.findNextBracketInRange(o.forwardRegex, r, l, d, c)) return this._toFoundBracket(o, g);
  26834. h = f
  26835. }
  26836. if (o && h && d !== c) if (g = E.BracketsUtils.findNextBracketInRange(o.forwardRegex, r, l, d, c)) return this._toFoundBracket(o, g)
  26837. }
  26838. return null
  26839. },o.prototype.findEnclosingBrackets = function (e, t) {
  26840. var n = this;
  26841. void 0 === t && (t = 1073741824);
  26842. for (var i = this.validatePosition(e), o = this.getLineCount(), r = new Map, s = [], a = function (e, t) {
  26843. if (!r.has(e)) {
  26844. for (var n = [], i = 0, o = t ? t.brackets.length : 0; i < o; i++) n[i] = 0;
  26845. r.set(e, n)
  26846. }
  26847. s = r.get(e)
  26848. }, l = function (e, t, i, o, r) {
  26849. for (; ;) {
  26850. var a = E.BracketsUtils.findNextBracketInRange(e.forwardRegex, t, i, o, r);
  26851. if (!a) break;
  26852. var l = i.substring(a.startColumn - 1, a.endColumn - 1).toLowerCase(), u = e.textIsBracket[l];
  26853. if (u && (u.isOpen(l) ? s[u.index]++ : u.isClose(l) && s[u.index]--, -1 === s[u.index])) return n._matchFoundBracket(a, u, !1);
  26854. o = a.endColumn - 1
  26855. }
  26856. return null
  26857. }, u = -1, d = null, c = Date.now(), h = i.lineNumber; h <= o; h++) {
  26858. if (Date.now() - c > t) return null;
  26859. var p = this._getLineTokens(h), g = p.getCount(), f = this._buffer.getLineContent(h), m = 0, v = 0,
  26860. _ = 0;
  26861. if (h === i.lineNumber) m = p.findTokenIndexAtOffset(i.column - 1), v = i.column - 1, _ = i.column - 1, u !== (C = p.getLanguageId(m)) && a(u = C, d = b.LanguageConfigurationRegistry.getBracketsSupport(u));
  26862. for (var y = !0; m < g; m++) {
  26863. var C;
  26864. if (u !== (C = p.getLanguageId(m))) {
  26865. if (d && y && v !== _) {
  26866. if (S = l(d, h, f, v, _)) return S;
  26867. y = !1
  26868. }
  26869. a(u = C, d = b.LanguageConfigurationRegistry.getBracketsSupport(u))
  26870. }
  26871. var S, L = !!d && !w.ignoreBracketsInToken(p.getStandardTokenType(m));
  26872. if (L) y ? _ = p.getEndOffset(m) : (v = p.getStartOffset(m), _ = p.getEndOffset(m)); else if (d && y && v !== _) if (S = l(d, h, f, v, _)) return S;
  26873. y = L
  26874. }
  26875. if (d && y && v !== _) if (S = l(d, h, f, v, _)) return S
  26876. }
  26877. return null
  26878. },o.prototype._toFoundBracket = function (e, t) {
  26879. if (!t) return null;
  26880. var n = this.getValueInRange(t);
  26881. n = n.toLowerCase();
  26882. var i = e.textIsBracket[n];
  26883. return i ? {range: t, open: i.open, close: i.close, isOpen: e.textIsOpenBracket[n]} : null
  26884. },o.computeIndentLevel = function (e, t) {
  26885. for (var n = 0, i = 0, o = e.length; i < o;) {
  26886. var r = e.charCodeAt(i);
  26887. if (32 === r) n++; else {
  26888. if (9 !== r) break;
  26889. n = n - n % t + t
  26890. }
  26891. i++
  26892. }
  26893. return i === o ? -1 : n
  26894. },o.prototype._computeIndentLevel = function (e) {
  26895. return o.computeIndentLevel(this._buffer.getLineContent(e + 1), this._options.tabSize)
  26896. },o.prototype.getActiveIndentGuide = function (e, t, n) {
  26897. var i = this;
  26898. this._assertNotDisposed();
  26899. var o = this.getLineCount();
  26900. if (e < 1 || e > o) throw new Error("Illegal value for lineNumber");
  26901. for (var r = b.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id), s = Boolean(r && r.offSide), a = -2, l = -1, u = -2, d = -1, c = function (e) {
  26902. if (-1 !== a && (-2 === a || a > e - 1)) {
  26903. a = -1, l = -1;
  26904. for (var t = e - 2; t >= 0; t--) {
  26905. var n = i._computeIndentLevel(t);
  26906. if (n >= 0) {
  26907. a = t, l = n;
  26908. break
  26909. }
  26910. }
  26911. }
  26912. if (-2 === u) {
  26913. u = -1, d = -1
  26914. ;
  26915. for (t = e; t < o; t++) {
  26916. var r = i._computeIndentLevel(t);
  26917. if (r >= 0) {
  26918. u = t, d = r;
  26919. break
  26920. }
  26921. }
  26922. }
  26923. }, h = -2, p = -1, g = -2, f = -1, m = function (e) {
  26924. if (-2 === h) {
  26925. h = -1, p = -1;
  26926. for (var t = e - 2; t >= 0; t--) {
  26927. var n = i._computeIndentLevel(t);
  26928. if (n >= 0) {
  26929. h = t, p = n;
  26930. break
  26931. }
  26932. }
  26933. }
  26934. if (-1 !== g && (-2 === g || g < e - 1)) {
  26935. g = -1, f = -1;
  26936. for (t = e; t < o; t++) {
  26937. var r = i._computeIndentLevel(t);
  26938. if (r >= 0) {
  26939. g = t, f = r;
  26940. break
  26941. }
  26942. }
  26943. }
  26944. }, v = 0, _ = !0, y = 0, C = !0, S = 0, w = 0; _ || C; w++) {
  26945. var E = e - w, L = e + w;
  26946. if (0 !== w && (E < 1 || E < t) && (_ = !1), 0 !== w && (L > o || L > n) && (C = !1), w > 5e4 && (_ = !1, C = !1), _) {
  26947. var D = void 0;
  26948. if ((N = this._computeIndentLevel(E - 1)) >= 0 ? (u = E - 1, d = N, D = Math.ceil(N / this._options.indentSize)) : (c(E), D = this._getIndentLevelForWhitespaceLine(s, l, d)), 0 === w) {
  26949. if (v = E, y = L, 0 === (S = D)) return {startLineNumber: v, endLineNumber: y, indent: S};
  26950. continue
  26951. }
  26952. D >= S ? v = E : _ = !1
  26953. }
  26954. if (C) {
  26955. var N, x = void 0;
  26956. (N = this._computeIndentLevel(L - 1)) >= 0 ? (h = L - 1, p = N, x = Math.ceil(N / this._options.indentSize)) : (m(L), x = this._getIndentLevelForWhitespaceLine(s, p, f)), x >= S ? y = L : C = !1
  26957. }
  26958. }
  26959. return {startLineNumber: v, endLineNumber: y, indent: S}
  26960. },o.prototype.getLinesIndentGuides = function (e, t) {
  26961. this._assertNotDisposed()
  26962. ;var n = this.getLineCount();
  26963. if (e < 1 || e > n) throw new Error("Illegal value for startLineNumber");
  26964. if (t < 1 || t > n) throw new Error("Illegal value for endLineNumber");
  26965. for (var i = b.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id), o = Boolean(i && i.offSide), r = new Array(t - e + 1), s = -2, a = -1, l = -2, u = -1, d = e; d <= t; d++) {
  26966. var c = d - e, h = this._computeIndentLevel(d - 1);
  26967. if (h >= 0) s = d - 1, a = h, r[c] = Math.ceil(h / this._options.indentSize); else {
  26968. if (-2 === s) {
  26969. s = -1, a = -1;
  26970. for (var p = d - 2; p >= 0; p--) {
  26971. if ((g = this._computeIndentLevel(p)) >= 0) {
  26972. s = p, a = g;
  26973. break
  26974. }
  26975. }
  26976. }
  26977. if (-1 !== l && (-2 === l || l < d - 1)) {
  26978. l = -1, u = -1;
  26979. for (p = d; p < n; p++) {
  26980. var g;
  26981. if ((g = this._computeIndentLevel(p)) >= 0) {
  26982. l = p, u = g;
  26983. break
  26984. }
  26985. }
  26986. }
  26987. r[c] = this._getIndentLevelForWhitespaceLine(o, a, u)
  26988. }
  26989. }
  26990. return r
  26991. },o.prototype._getIndentLevelForWhitespaceLine = function (e, t, n) {
  26992. return -1 === t || -1 === n ? 0 : t < n ? 1 + Math.floor(t / this._options.indentSize) : t === n ? Math.ceil(n / this._options.indentSize) : e ? Math.ceil(n / this._options.indentSize) : 1 + Math.floor(n / this._options.indentSize)
  26993. },o.MODEL_SYNC_LIMIT = 52428800,o.LARGE_FILE_SIZE_THRESHOLD = 20971520,
  26994. o.LARGE_FILE_LINE_COUNT_THRESHOLD = 3e5,o.DEFAULT_CREATION_OPTIONS = {
  26995. isForSimpleWidget: !1,
  26996. tabSize: l.EDITOR_MODEL_DEFAULTS.tabSize,
  26997. indentSize: l.EDITOR_MODEL_DEFAULTS.indentSize,
  26998. insertSpaces: l.EDITOR_MODEL_DEFAULTS.insertSpaces,
  26999. detectIndentation: !1,
  27000. defaultEOL: 1,
  27001. trimAutoWhitespace: l.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,
  27002. largeFileOptimizations: l.EDITOR_MODEL_DEFAULTS.largeFileOptimizations
  27003. },o
  27004. }(o.Disposable);
  27005. t.TextModel = T;
  27006. var R = function () {
  27007. function e() {
  27008. this._decorationsTree0 = new f.IntervalTree, this._decorationsTree1 = new f.IntervalTree
  27009. }
  27010. return e.prototype.intervalSearch = function (e, t, n, i, o) {
  27011. var r = this._decorationsTree0.intervalSearch(e, t, n, i, o),
  27012. s = this._decorationsTree1.intervalSearch(e, t, n, i, o);
  27013. return r.concat(s)
  27014. }, e.prototype.search = function (e, t, n, i) {
  27015. if (n) return this._decorationsTree1.search(e, t, i);
  27016. var o = this._decorationsTree0.search(e, t, i), r = this._decorationsTree1.search(e, t, i);
  27017. return o.concat(r)
  27018. }, e.prototype.collectNodesFromOwner = function (e) {
  27019. var t = this._decorationsTree0.collectNodesFromOwner(e),
  27020. n = this._decorationsTree1.collectNodesFromOwner(e);
  27021. return t.concat(n)
  27022. }, e.prototype.collectNodesPostOrder = function () {
  27023. var e = this._decorationsTree0.collectNodesPostOrder(),
  27024. t = this._decorationsTree1.collectNodesPostOrder();
  27025. return e.concat(t)
  27026. }, e.prototype.insert = function (e) {
  27027. f.getNodeIsInOverviewRuler(e) ? this._decorationsTree1.insert(e) : this._decorationsTree0.insert(e)
  27028. }, e.prototype.delete = function (e) {
  27029. f.getNodeIsInOverviewRuler(e) ? this._decorationsTree1.delete(e) : this._decorationsTree0.delete(e)
  27030. }, e.prototype.resolveNode = function (e, t) {
  27031. f.getNodeIsInOverviewRuler(e) ? this._decorationsTree1.resolveNode(e, t) : this._decorationsTree0.resolveNode(e, t)
  27032. }, e.prototype.acceptReplace = function (e, t, n, i) {
  27033. this._decorationsTree0.acceptReplace(e, t, n, i), this._decorationsTree1.acceptReplace(e, t, n, i)
  27034. }, e
  27035. }();
  27036. function O(e) {
  27037. return e.replace(/[^a-z0-9\-_]/gi, " ")
  27038. }
  27039. var P = function (e) {
  27040. this.color = e.color || "", this.darkColor = e.darkColor || ""
  27041. }, A = function (e) {
  27042. function t(t) {
  27043. var n = e.call(this, t) || this
  27044. ;
  27045. return n._resolvedColor = null, n.position = "number" == typeof t.position ? t.position : h.OverviewRulerLane.Center, n
  27046. }
  27047. return r(t, e), t.prototype.getColor = function (e) {
  27048. return this._resolvedColor || ("light" !== e.type && this.darkColor ? this._resolvedColor = this._resolveColor(this.darkColor, e) : this._resolvedColor = this._resolveColor(this.color, e)), this._resolvedColor
  27049. }, t.prototype.invalidateCachedColor = function () {
  27050. this._resolvedColor = null
  27051. }, t.prototype._resolveColor = function (e, t) {
  27052. if ("string" == typeof e) return e;
  27053. var n = e ? t.getColor(e.id) : null;
  27054. return n ? n.toString() : ""
  27055. }, t
  27056. }(P);
  27057. t.ModelDecorationOverviewRulerOptions = A;
  27058. var F = function (e) {
  27059. function t(t) {
  27060. var n = e.call(this, t) || this;
  27061. return n.position = t.position, n
  27062. }
  27063. return r(t, e), t.prototype.getColor = function (e) {
  27064. return this._resolvedColor || ("light" !== e.type && this.darkColor ? this._resolvedColor = this._resolveColor(this.darkColor, e) : this._resolvedColor = this._resolveColor(this.color, e)), this._resolvedColor
  27065. }, t.prototype.invalidateCachedColor = function () {
  27066. this._resolvedColor = void 0
  27067. },
  27068. t.prototype._resolveColor = function (e, t) {
  27069. return "string" == typeof e ? N.Color.fromHex(e) : t.getColor(e.id)
  27070. }, t
  27071. }(P);
  27072. t.ModelDecorationMinimapOptions = F;
  27073. var W = function () {
  27074. function e(e) {
  27075. this.stickiness = e.stickiness || 0, this.zIndex = e.zIndex || 0, this.className = e.className ? O(e.className) : null, this.hoverMessage = L.withUndefinedAsNull(e.hoverMessage), this.glyphMarginHoverMessage = L.withUndefinedAsNull(e.glyphMarginHoverMessage), this.isWholeLine = e.isWholeLine || !1, this.showIfCollapsed = e.showIfCollapsed || !1, this.collapseOnReplaceEdit = e.collapseOnReplaceEdit || !1, this.overviewRuler = e.overviewRuler ? new A(e.overviewRuler) : null, this.minimap = e.minimap ? new F(e.minimap) : null, this.glyphMarginClassName = e.glyphMarginClassName ? O(e.glyphMarginClassName) : null, this.linesDecorationsClassName = e.linesDecorationsClassName ? O(e.linesDecorationsClassName) : null, this.marginClassName = e.marginClassName ? O(e.marginClassName) : null, this.inlineClassName = e.inlineClassName ? O(e.inlineClassName) : null,
  27076. this.inlineClassNameAffectsLetterSpacing = e.inlineClassNameAffectsLetterSpacing || !1, this.beforeContentClassName = e.beforeContentClassName ? O(e.beforeContentClassName) : null, this.afterContentClassName = e.afterContentClassName ? O(e.afterContentClassName) : null
  27077. }
  27078. return e.register = function (t) {
  27079. return new e(t)
  27080. }, e.createDynamic = function (t) {
  27081. return new e(t)
  27082. }, e
  27083. }();
  27084. t.ModelDecorationOptions = W, W.EMPTY = W.register({});
  27085. var B = [W.register({stickiness: 0}), W.register({stickiness: 1}), W.register({stickiness: 2}), W.register({stickiness: 3})];
  27086. function V(e) {
  27087. return e instanceof W ? e : W.createDynamic(e)
  27088. }
  27089. var z = function (e) {
  27090. function t() {
  27091. var t = e.call(this) || this;
  27092. return t._actual = t._register(new i.Emitter), t.event = t._actual.event, t._deferredCnt = 0, t._shouldFire = !1, t
  27093. }
  27094. return r(t, e), t.prototype.beginDeferredEmit = function () {
  27095. this._deferredCnt++
  27096. }, t.prototype.endDeferredEmit = function () {
  27097. this._deferredCnt--, 0 === this._deferredCnt && this._shouldFire && (this._shouldFire = !1, this._actual.fire({}))
  27098. }, t.prototype.fire = function () {
  27099. this._shouldFire = !0
  27100. }, t
  27101. }(o.Disposable)
  27102. ;t.DidChangeDecorationsEmitter = z;
  27103. var H = function (e) {
  27104. function t() {
  27105. var t = e.call(this) || this;
  27106. return t._fastEmitter = t._register(new i.Emitter), t.fastEvent = t._fastEmitter.event, t._slowEmitter = t._register(new i.Emitter), t.slowEvent = t._slowEmitter.event, t._deferredCnt = 0, t._deferredEvent = null, t
  27107. }
  27108. return r(t, e), t.prototype.beginDeferredEmit = function () {
  27109. this._deferredCnt++
  27110. }, t.prototype.endDeferredEmit = function () {
  27111. if (this._deferredCnt--, 0 === this._deferredCnt && null !== this._deferredEvent) {
  27112. var e = this._deferredEvent;
  27113. this._deferredEvent = null, this._fastEmitter.fire(e), this._slowEmitter.fire(e)
  27114. }
  27115. }, t.prototype.fire = function (e) {
  27116. this._deferredCnt > 0 ? this._deferredEvent ? this._deferredEvent = this._deferredEvent.merge(e) : this._deferredEvent = e : (this._fastEmitter.fire(e), this._slowEmitter.fire(e))
  27117. }, t
  27118. }(o.Disposable);
  27119. t.DidChangeContentEmitter = H
  27120. })), define(n[40], i([0, 1, 10, 5, 13, 3, 22, 30, 41]), (function (e, t, n, i, o, r, s, a, l) {
  27121. "use strict";
  27122. Object.defineProperty(t, "__esModule", {value: !0});
  27123. var u = function () {
  27124. return !0
  27125. }, d = function () {
  27126. return !1
  27127. }, c = function (e) {
  27128. return " " === e || "\t" === e
  27129. };
  27130. function h(e, t, n) {
  27131. e.has(t) ? e.get(t).push(n) : e.set(t, [n])
  27132. }
  27133. var p = function () {
  27134. function e(t, n, i) {
  27135. this._languageIdentifier = t;
  27136. var o = i.options, r = o.get(107);
  27137. this.readOnly = o.get(68), this.tabSize = n.tabSize, this.indentSize = n.indentSize, this.insertSpaces = n.insertSpaces, this.lineHeight = o.get(49), this.pageSize = Math.max(1, Math.floor(r.height / this.lineHeight) - 2), this.useTabStops = o.get(95), this.wordSeparators = o.get(96), this.emptySelectionClipboard = o.get(25), this.copyWithSyntaxHighlighting = o.get(15), this.multiCursorMergeOverlapping = o.get(58), this.multiCursorPaste = o.get(60), this.autoClosingBrackets = o.get(5), this.autoClosingQuotes = o.get(7), this.autoClosingOvertype = o.get(6), this.autoSurround = o.get(10), this.autoIndent = o.get(8), this.autoClosingPairsOpen2 = new Map, this.autoClosingPairsClose2 = new Map, this.surroundingPairs = {}, this._electricChars = null, this.shouldAutoCloseBefore = {
  27138. quote: e._getShouldAutoClose(t, this.autoClosingQuotes),
  27139. bracket: e._getShouldAutoClose(t, this.autoClosingBrackets)
  27140. }
  27141. ;var s = e._getAutoClosingPairs(t);
  27142. if (s) for (var a = 0, l = s; a < l.length; a++) {
  27143. var u = l[a];
  27144. h(this.autoClosingPairsOpen2, u.open.charAt(u.open.length - 1), u), 1 === u.close.length && h(this.autoClosingPairsClose2, u.close, u)
  27145. }
  27146. var d = e._getSurroundingPairs(t);
  27147. if (d) for (var c = 0, p = d; c < p.length; c++) {
  27148. u = p[c];
  27149. this.surroundingPairs[u.open] = u.close
  27150. }
  27151. }
  27152. return e.shouldRecreate = function (e) {
  27153. return e.hasChanged(107) || e.hasChanged(96) || e.hasChanged(25) || e.hasChanged(58) || e.hasChanged(60) || e.hasChanged(5) || e.hasChanged(7) || e.hasChanged(6) || e.hasChanged(10) || e.hasChanged(95) || e.hasChanged(49) || e.hasChanged(68)
  27154. }, Object.defineProperty(e.prototype, "electricChars", {
  27155. get: function () {
  27156. if (!this._electricChars) {
  27157. this._electricChars = {};
  27158. var t = e._getElectricCharacters(this._languageIdentifier);
  27159. if (t) for (var n = 0, i = t; n < i.length; n++) {
  27160. var o = i[n];
  27161. this._electricChars[o] = !0
  27162. }
  27163. }
  27164. return this._electricChars
  27165. }, enumerable: !0, configurable: !0
  27166. }), e.prototype.normalizeIndentation = function (e) {
  27167. return a.TextModel.normalizeIndentation(e, this.indentSize, this.insertSpaces)
  27168. },
  27169. e._getElectricCharacters = function (e) {
  27170. try {
  27171. return l.LanguageConfigurationRegistry.getElectricCharacters(e.id)
  27172. } catch (e) {
  27173. return n.onUnexpectedError(e), null
  27174. }
  27175. }, e._getAutoClosingPairs = function (e) {
  27176. try {
  27177. return l.LanguageConfigurationRegistry.getAutoClosingPairs(e.id)
  27178. } catch (e) {
  27179. return n.onUnexpectedError(e), null
  27180. }
  27181. }, e._getShouldAutoClose = function (t, n) {
  27182. switch (n) {
  27183. case"beforeWhitespace":
  27184. return c;
  27185. case"languageDefined":
  27186. return e._getLanguageDefinedShouldAutoClose(t);
  27187. case"always":
  27188. return u;
  27189. case"never":
  27190. return d
  27191. }
  27192. }, e._getLanguageDefinedShouldAutoClose = function (e) {
  27193. try {
  27194. var t = l.LanguageConfigurationRegistry.getAutoCloseBeforeSet(e.id);
  27195. return function (e) {
  27196. return -1 !== t.indexOf(e)
  27197. }
  27198. } catch (e) {
  27199. return n.onUnexpectedError(e), d
  27200. }
  27201. }, e._getSurroundingPairs = function (e) {
  27202. try {
  27203. return l.LanguageConfigurationRegistry.getSurroundingPairs(e.id)
  27204. } catch (e) {
  27205. return n.onUnexpectedError(e), null
  27206. }
  27207. }, e
  27208. }();
  27209. t.CursorConfiguration = p;
  27210. var g = function () {
  27211. function e(t, n, i, o) {
  27212. this.selectionStart = t, this.selectionStartLeftoverVisibleColumns = n, this.position = i,
  27213. this.leftoverVisibleColumns = o, this.selection = e._computeSelection(this.selectionStart, this.position)
  27214. }
  27215. return e.prototype.equals = function (e) {
  27216. return this.selectionStartLeftoverVisibleColumns === e.selectionStartLeftoverVisibleColumns && this.leftoverVisibleColumns === e.leftoverVisibleColumns && this.position.equals(e.position) && this.selectionStart.equalsRange(e.selectionStart)
  27217. }, e.prototype.hasSelection = function () {
  27218. return !this.selection.isEmpty() || !this.selectionStart.isEmpty()
  27219. }, e.prototype.move = function (t, n, i, s) {
  27220. return t ? new e(this.selectionStart, this.selectionStartLeftoverVisibleColumns, new o.Position(n, i), s) : new e(new r.Range(n, i, n, i), s, new o.Position(n, i), s)
  27221. }, e._computeSelection = function (e, t) {
  27222. var n, i, o, r;
  27223. return e.isEmpty() ? (n = e.startLineNumber, i = e.startColumn, o = t.lineNumber, r = t.column) : t.isBeforeOrEqual(e.getStartPosition()) ? (n = e.endLineNumber, i = e.endColumn, o = t.lineNumber, r = t.column) : (n = e.startLineNumber, i = e.startColumn, o = t.lineNumber, r = t.column), new s.Selection(n, i, o, r)
  27224. }, e
  27225. }();
  27226. t.SingleCursorState = g;
  27227. var f = function () {
  27228. function e(e, t, n) {
  27229. this.model = t, this.viewModel = n, this.config = new p(this.model.getLanguageIdentifier(), this.model.getOptions(), e)
  27230. }
  27231. return e.prototype.validateViewPosition = function (e, t) {
  27232. return this.viewModel.coordinatesConverter.validateViewPosition(e, t)
  27233. }, e.prototype.validateViewRange = function (e, t) {
  27234. return this.viewModel.coordinatesConverter.validateViewRange(e, t)
  27235. }, e.prototype.convertViewRangeToModelRange = function (e) {
  27236. return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(e)
  27237. }, e.prototype.convertViewPositionToModelPosition = function (e, t) {
  27238. return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(e, t))
  27239. }, e.prototype.convertModelPositionToViewPosition = function (e) {
  27240. return this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(e)
  27241. }, e.prototype.convertModelRangeToViewRange = function (e) {
  27242. return this.viewModel.coordinatesConverter.convertModelRangeToViewRange(e)
  27243. }, e.prototype.getCurrentScrollTop = function () {
  27244. return this.viewModel.viewLayout.getCurrentScrollTop()
  27245. },
  27246. e.prototype.getCompletelyVisibleViewRange = function () {
  27247. return this.viewModel.getCompletelyVisibleViewRange()
  27248. }, e.prototype.getCompletelyVisibleModelRange = function () {
  27249. var e = this.viewModel.getCompletelyVisibleViewRange();
  27250. return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(e)
  27251. }, e.prototype.getCompletelyVisibleViewRangeAtScrollTop = function (e) {
  27252. return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(e)
  27253. }, e.prototype.getVerticalOffsetForViewLine = function (e) {
  27254. return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(e)
  27255. }, e
  27256. }();
  27257. t.CursorContext = f;
  27258. var m = function (e) {
  27259. this.modelState = e, this.viewState = null
  27260. };
  27261. t.PartialModelCursorState = m;
  27262. var v = function (e) {
  27263. this.modelState = null, this.viewState = e
  27264. };
  27265. t.PartialViewCursorState = v;
  27266. var _ = function () {
  27267. function e(e, t) {
  27268. this.modelState = e, this.viewState = t
  27269. }
  27270. return e.fromModelState = function (e) {
  27271. return new m(e)
  27272. }, e.fromViewState = function (e) {
  27273. return new v(e)
  27274. }, e.fromModelSelection = function (t) {
  27275. var n = t.selectionStartLineNumber, i = t.selectionStartColumn, s = t.positionLineNumber,
  27276. a = t.positionColumn, l = new g(new r.Range(n, i, n, i), 0, new o.Position(s, a), 0);
  27277. return e.fromModelState(l)
  27278. }, e.fromModelSelections = function (e) {
  27279. for (var t = [], n = 0, i = e.length; n < i; n++) t[n] = this.fromModelSelection(e[n]);
  27280. return t
  27281. }, e.prototype.equals = function (e) {
  27282. return this.viewState.equals(e.viewState) && this.modelState.equals(e.modelState)
  27283. }, e
  27284. }();
  27285. t.CursorState = _;
  27286. var y = function (e, t, n) {
  27287. this.type = e, this.commands = t, this.shouldPushStackElementBefore = n.shouldPushStackElementBefore, this.shouldPushStackElementAfter = n.shouldPushStackElementAfter
  27288. };
  27289. t.EditOperationResult = y;
  27290. var C = function () {
  27291. function e() {
  27292. }
  27293. return e.visibleColumnFromColumn = function (t, n, o) {
  27294. for (var r = t.length, s = n - 1 < r ? n - 1 : r, a = 0, l = 0; l < s;) {
  27295. var u = i.getNextCodePoint(t, s, l);
  27296. if (l += u >= 65536 ? 2 : 1, 9 === u) a = e.nextRenderTabStop(a, o); else {
  27297. for (var d = i.getGraphemeBreakType(u); l < s;) {
  27298. var c = i.getNextCodePoint(t, s, l), h = i.getGraphemeBreakType(c);
  27299. if (i.breakBetweenGraphemeBreakType(d, h)) break;
  27300. l += c >= 65536 ? 2 : 1, d = h
  27301. }
  27302. i.isFullWidthCharacter(u) || i.isEmojiImprecise(u) ? a += 2 : a += 1
  27303. }
  27304. }
  27305. return a
  27306. }, e.visibleColumnFromColumn2 = function (e, t, n) {
  27307. return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber), n.column, e.tabSize)
  27308. }, e.columnFromVisibleColumn = function (t, n, o) {
  27309. if (n <= 0) return 1;
  27310. for (var r = t.length, s = 0, a = 1, l = 0; l < r;) {
  27311. var u = i.getNextCodePoint(t, r, l);
  27312. l += u >= 65536 ? 2 : 1;
  27313. var d = void 0;
  27314. if (9 === u) d = e.nextRenderTabStop(s, o); else {
  27315. for (var c = i.getGraphemeBreakType(u); l < r;) {
  27316. var h = i.getNextCodePoint(t, r, l), p = i.getGraphemeBreakType(h);
  27317. if (i.breakBetweenGraphemeBreakType(c, p)) break;
  27318. l += h >= 65536 ? 2 : 1, c = p
  27319. }
  27320. d = i.isFullWidthCharacter(u) || i.isEmojiImprecise(u) ? s + 2 : s + 1
  27321. }
  27322. var g = l + 1;
  27323. if (d >= n) return d - n < n - s ? g : a;
  27324. s = d, a = g
  27325. }
  27326. return r + 1
  27327. }, e.columnFromVisibleColumn2 = function (e, t, n, i) {
  27328. var o = this.columnFromVisibleColumn(t.getLineContent(n), i, e.tabSize), r = t.getLineMinColumn(n);
  27329. if (o < r) return r;
  27330. var s = t.getLineMaxColumn(n);
  27331. return o > s ? s : o
  27332. }, e.nextRenderTabStop = function (e, t) {
  27333. return e + t - e % t
  27334. }, e.nextIndentTabStop = function (e, t) {
  27335. return e + t - e % t
  27336. }, e.prevRenderTabStop = function (e, t) {
  27337. return e - 1 - (e - 1) % t
  27338. }, e.prevIndentTabStop = function (e, t) {
  27339. return e - 1 - (e - 1) % t
  27340. }, e
  27341. }();
  27342. t.CursorColumns = C, t.isQuote = function (e) {
  27343. return "'" === e || '"' === e || "`" === e
  27344. }
  27345. })), define(n[211], i([0, 1, 5, 40, 3, 22, 41]), (function (e, t, n, i, o, r, s) {
  27346. "use strict";
  27347. Object.defineProperty(t, "__esModule", {value: !0});
  27348. var a = Object.create(null);
  27349. function l(e, t) {
  27350. a[e] || (a[e] = ["", e]);
  27351. for (var n = a[e], i = n.length; i <= t; i++) n[i] = n[i - 1] + e;
  27352. return n[t]
  27353. }
  27354. t.cachedStringRepeat = l;
  27355. var u = function () {
  27356. function e(e, t) {
  27357. this._opts = t, this._selection = e, this._selectionId = null, this._useLastEditRangeForCursorEndPosition = !1, this._selectionStartColumnStaysPut = !1
  27358. }
  27359. return e.unshiftIndent = function (e, t, n, o, r) {
  27360. var s = i.CursorColumns.visibleColumnFromColumn(e, t, n);
  27361. if (r) {
  27362. var a = l(" ", o);
  27363. return l(a, i.CursorColumns.prevIndentTabStop(s, o) / o)
  27364. }
  27365. return l(a = "\t", i.CursorColumns.prevRenderTabStop(s, n) / n)
  27366. }, e.shiftIndent = function (e, t, n, o, r) {
  27367. var s = i.CursorColumns.visibleColumnFromColumn(e, t, n);
  27368. if (r) {
  27369. var a = l(" ", o);
  27370. return l(a, i.CursorColumns.nextIndentTabStop(s, o) / o)
  27371. }
  27372. return l(a = "\t", i.CursorColumns.nextRenderTabStop(s, n) / n)
  27373. }, e.prototype._addEditOperation = function (e, t, n) {
  27374. this._useLastEditRangeForCursorEndPosition ? e.addTrackedEditOperation(t, n) : e.addEditOperation(t, n)
  27375. }, e.prototype.getEditOperations = function (t, r) {
  27376. var a = this._selection.startLineNumber, u = this._selection.endLineNumber;
  27377. 1 === this._selection.endColumn && a !== u && (u -= 1);
  27378. var d = this._opts, c = d.tabSize, h = d.indentSize, p = d.insertSpaces, g = a === u;
  27379. if (this._selection.isEmpty() && /^\s*$/.test(t.getLineContent(a)) && (this._useLastEditRangeForCursorEndPosition = !0), this._opts.useTabStops) for (var f = 0, m = 0, v = a; v <= u; v++, f = m) {
  27380. m = 0;
  27381. var _ = t.getLineContent(v), y = n.firstNonWhitespaceIndex(_);
  27382. if ((!this._opts.isUnshift || 0 !== _.length && 0 !== y) && (g || this._opts.isUnshift || 0 !== _.length)) {
  27383. if (-1 === y && (y = _.length), v > 1) if (i.CursorColumns.visibleColumnFromColumn(_, y + 1, c) % h != 0 && t.isCheapToTokenize(v - 1)) {
  27384. var C = s.LanguageConfigurationRegistry.getEnterAction(this._opts.autoIndent, t, new o.Range(v - 1, t.getLineMaxColumn(v - 1), v - 1, t.getLineMaxColumn(v - 1)));
  27385. if (C) {
  27386. if (m = f, C.appendText) for (var b = 0, S = C.appendText.length; b < S && m < h && 32 === C.appendText.charCodeAt(b); b++) m++;
  27387. C.removeText && (m = Math.max(0, m - C.removeText));
  27388. for (b = 0; b < m && (0 !== y && 32 === _.charCodeAt(y - 1)); b++) y--
  27389. }
  27390. }
  27391. if (!this._opts.isUnshift || 0 !== y) {
  27392. var w = void 0;
  27393. w = this._opts.isUnshift ? e.unshiftIndent(_, y + 1, c, h, p) : e.shiftIndent(_, y + 1, c, h, p), this._addEditOperation(r, new o.Range(v, 1, v, y + 1), w), v !== a || this._selection.isEmpty() || (this._selectionStartColumnStaysPut = this._selection.startColumn <= y + 1)
  27394. }
  27395. }
  27396. } else {
  27397. var E = p ? l(" ", h) : "\t";
  27398. for (v = a; v <= u; v++) {
  27399. _ = t.getLineContent(v), y = n.firstNonWhitespaceIndex(_);
  27400. if ((!this._opts.isUnshift || 0 !== _.length && 0 !== y) && ((g || this._opts.isUnshift || 0 !== _.length) && (-1 === y && (y = _.length), !this._opts.isUnshift || 0 !== y))) if (this._opts.isUnshift) {
  27401. y = Math.min(y, h);
  27402. for (var L = 0; L < y; L++) {
  27403. if (9 === _.charCodeAt(L)) {
  27404. y = L + 1;
  27405. break
  27406. }
  27407. }
  27408. this._addEditOperation(r, new o.Range(v, 1, v, y + 1), "")
  27409. } else this._addEditOperation(r, new o.Range(v, 1, v, 1), E),
  27410. v !== a || this._selection.isEmpty() || (this._selectionStartColumnStaysPut = 1 === this._selection.startColumn)
  27411. }
  27412. }
  27413. this._selectionId = r.trackSelection(this._selection)
  27414. }, e.prototype.computeCursorState = function (e, t) {
  27415. if (this._useLastEditRangeForCursorEndPosition) {
  27416. var n = t.getInverseEditOperations()[0];
  27417. return new r.Selection(n.range.endLineNumber, n.range.endColumn, n.range.endLineNumber, n.range.endColumn)
  27418. }
  27419. var i = t.getTrackedSelection(this._selectionId);
  27420. if (this._selectionStartColumnStaysPut) {
  27421. var o = this._selection.startColumn;
  27422. return i.startColumn <= o ? i : 0 === i.getDirection() ? new r.Selection(i.startLineNumber, o, i.endLineNumber, i.endColumn) : new r.Selection(i.endLineNumber, i.endColumn, i.startLineNumber, o)
  27423. }
  27424. return i
  27425. }, e
  27426. }();
  27427. t.ShiftCommand = u
  27428. })), define(n[483], i([0, 1, 40, 13, 3]), (function (e, t, n, i, o) {
  27429. "use strict";
  27430. Object.defineProperty(t, "__esModule", {value: !0});
  27431. var r = function () {
  27432. function e() {
  27433. }
  27434. return e.columnSelect = function (e, t, r, s, a, l) {
  27435. for (var u = Math.abs(a - r) + 1, d = r > a, c = s > l, h = s < l, p = [], g = 0; g < u; g++) {
  27436. var f = r + (d ? -g : g), m = n.CursorColumns.columnFromVisibleColumn2(e, t, f, s),
  27437. v = n.CursorColumns.columnFromVisibleColumn2(e, t, f, l),
  27438. _ = n.CursorColumns.visibleColumnFromColumn2(e, t, new i.Position(f, m)),
  27439. y = n.CursorColumns.visibleColumnFromColumn2(e, t, new i.Position(f, v));
  27440. if (h) {
  27441. if (_ > l) continue;
  27442. if (y < s) continue
  27443. }
  27444. if (c) {
  27445. if (y > s) continue;
  27446. if (_ < l) continue
  27447. }
  27448. p.push(new n.SingleCursorState(new o.Range(f, m, f, m), 0, new i.Position(f, v), 0))
  27449. }
  27450. if (0 === p.length) for (g = 0; g < u; g++) {
  27451. f = r + (d ? -g : g);
  27452. var C = t.getLineMaxColumn(f);
  27453. p.push(new n.SingleCursorState(new o.Range(f, C, f, C), 0, new i.Position(f, C), 0))
  27454. }
  27455. return {
  27456. viewStates: p,
  27457. reversed: d,
  27458. fromLineNumber: r,
  27459. fromVisualColumn: s,
  27460. toLineNumber: a,
  27461. toVisualColumn: l
  27462. }
  27463. }, e.columnSelectLeft = function (t, n, i) {
  27464. var o = i.toViewVisualColumn;
  27465. return o > 1 && o--, e.columnSelect(t, n, i.fromViewLineNumber, i.fromViewVisualColumn, i.toViewLineNumber, o)
  27466. }, e.columnSelectRight = function (e, t, o) {
  27467. for (var r = 0, s = Math.min(o.fromViewLineNumber, o.toViewLineNumber), a = Math.max(o.fromViewLineNumber, o.toViewLineNumber), l = s; l <= a; l++) {
  27468. var u = t.getLineMaxColumn(l),
  27469. d = n.CursorColumns.visibleColumnFromColumn2(e, t, new i.Position(l, u));
  27470. r = Math.max(r, d)
  27471. }
  27472. var c = o.toViewVisualColumn;
  27473. return c < r && c++, this.columnSelect(e, t, o.fromViewLineNumber, o.fromViewVisualColumn, o.toViewLineNumber, c)
  27474. }, e.columnSelectUp = function (e, t, n, i) {
  27475. var o = i ? e.pageSize : 1, r = Math.max(1, n.toViewLineNumber - o);
  27476. return this.columnSelect(e, t, n.fromViewLineNumber, n.fromViewVisualColumn, r, n.toViewVisualColumn)
  27477. }, e.columnSelectDown = function (e, t, n, i) {
  27478. var o = i ? e.pageSize : 1, r = Math.min(t.getLineCount(), n.toViewLineNumber + o);
  27479. return this.columnSelect(e, t, n.fromViewLineNumber, n.fromViewVisualColumn, r, n.toViewVisualColumn)
  27480. }, e
  27481. }();
  27482. t.ColumnSelection = r
  27483. })), define(n[158], i([0, 1, 40, 13, 3, 5]), (function (e, t, n, i, o, r) {
  27484. "use strict";
  27485. Object.defineProperty(t, "__esModule", {value: !0});
  27486. var s = function (e, t, n) {
  27487. this.lineNumber = e, this.column = t, this.leftoverVisibleColumns = n
  27488. };
  27489. t.CursorPosition = s;
  27490. var a = function () {
  27491. function e() {
  27492. }
  27493. return e.leftPosition = function (e, t, n) {
  27494. return n > e.getLineMinColumn(t) ? n -= r.prevCharLength(e.getLineContent(t), n - 1) : t > 1 && (t -= 1, n = e.getLineMaxColumn(t)), new i.Position(t, n)
  27495. }, e.left = function (t, n, i, o) {
  27496. var r = e.leftPosition(n, i, o);
  27497. return new s(r.lineNumber, r.column, 0)
  27498. }, e.moveLeft = function (t, n, i, o, r) {
  27499. var s, a;
  27500. if (i.hasSelection() && !o) s = i.selection.startLineNumber, a = i.selection.startColumn; else {
  27501. var l = e.left(t, n, i.position.lineNumber, i.position.column - (r - 1));
  27502. s = l.lineNumber, a = l.column
  27503. }
  27504. return i.move(o, s, a, 0)
  27505. }, e.rightPosition = function (e, t, n) {
  27506. return n < e.getLineMaxColumn(t) ? n += r.nextCharLength(e.getLineContent(t), n - 1) : t < e.getLineCount() && (t += 1, n = e.getLineMinColumn(t)), new i.Position(t, n)
  27507. }, e.right = function (t, n, i, o) {
  27508. var r = e.rightPosition(n, i, o);
  27509. return new s(r.lineNumber, r.column, 0)
  27510. }, e.moveRight = function (t, n, i, o, r) {
  27511. var s, a;
  27512. if (i.hasSelection() && !o) s = i.selection.endLineNumber, a = i.selection.endColumn; else {
  27513. var l = e.right(t, n, i.position.lineNumber, i.position.column + (r - 1));
  27514. s = l.lineNumber, a = l.column
  27515. }
  27516. return i.move(o, s, a, 0)
  27517. }, e.down = function (e, t, i, o, r, a, l) {
  27518. var u = n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize) + r;
  27519. i += a;
  27520. var d = t.getLineCount();
  27521. return i > d ? (i = d, o = l ? t.getLineMaxColumn(i) : Math.min(t.getLineMaxColumn(i), o)) : o = n.CursorColumns.columnFromVisibleColumn2(e, t, i, u), r = u - n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize), new s(i, o, r)
  27522. }, e.moveDown = function (t, n, i, o, r) {
  27523. var s, a;
  27524. i.hasSelection() && !o ? (s = i.selection.endLineNumber, a = i.selection.endColumn) : (s = i.position.lineNumber, a = i.position.column);
  27525. var l = e.down(t, n, s, a, i.leftoverVisibleColumns, r, !0);
  27526. return i.move(o, l.lineNumber, l.column, l.leftoverVisibleColumns)
  27527. }, e.translateDown = function (t, r, s) {
  27528. var a = s.selection,
  27529. l = e.down(t, r, a.selectionStartLineNumber, a.selectionStartColumn, s.selectionStartLeftoverVisibleColumns, 1, !1),
  27530. u = e.down(t, r, a.positionLineNumber, a.positionColumn, s.leftoverVisibleColumns, 1, !1);
  27531. return new n.SingleCursorState(new o.Range(l.lineNumber, l.column, l.lineNumber, l.column), l.leftoverVisibleColumns, new i.Position(u.lineNumber, u.column), u.leftoverVisibleColumns)
  27532. },
  27533. e.up = function (e, t, i, o, r, a, l) {
  27534. var u = n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize) + r;
  27535. return (i -= a) < 1 ? (i = 1, o = l ? t.getLineMinColumn(i) : Math.min(t.getLineMaxColumn(i), o)) : o = n.CursorColumns.columnFromVisibleColumn2(e, t, i, u), r = u - n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i), o, e.tabSize), new s(i, o, r)
  27536. }, e.moveUp = function (t, n, i, o, r) {
  27537. var s, a;
  27538. i.hasSelection() && !o ? (s = i.selection.startLineNumber, a = i.selection.startColumn) : (s = i.position.lineNumber, a = i.position.column);
  27539. var l = e.up(t, n, s, a, i.leftoverVisibleColumns, r, !0);
  27540. return i.move(o, l.lineNumber, l.column, l.leftoverVisibleColumns)
  27541. }, e.translateUp = function (t, r, s) {
  27542. var a = s.selection,
  27543. l = e.up(t, r, a.selectionStartLineNumber, a.selectionStartColumn, s.selectionStartLeftoverVisibleColumns, 1, !1),
  27544. u = e.up(t, r, a.positionLineNumber, a.positionColumn, s.leftoverVisibleColumns, 1, !1);
  27545. return new n.SingleCursorState(new o.Range(l.lineNumber, l.column, l.lineNumber, l.column), l.leftoverVisibleColumns, new i.Position(u.lineNumber, u.column), u.leftoverVisibleColumns)
  27546. },
  27547. e.moveToBeginningOfLine = function (e, t, n, i) {
  27548. var o, r = n.position.lineNumber, s = t.getLineMinColumn(r),
  27549. a = t.getLineFirstNonWhitespaceColumn(r) || s;
  27550. return o = n.position.column === a ? s : a, n.move(i, r, o, 0)
  27551. }, e.moveToEndOfLine = function (e, t, n, i) {
  27552. var o = n.position.lineNumber, r = t.getLineMaxColumn(o);
  27553. return n.move(i, o, r, 0)
  27554. }, e.moveToBeginningOfBuffer = function (e, t, n, i) {
  27555. return n.move(i, 1, 1, 0)
  27556. }, e.moveToEndOfBuffer = function (e, t, n, i) {
  27557. var o = t.getLineCount(), r = t.getLineMaxColumn(o);
  27558. return n.move(i, o, r, 0)
  27559. }, e
  27560. }();
  27561. t.MoveOperations = a
  27562. })), define(n[212], i([0, 1, 5, 80, 40, 158, 3]), (function (e, t, n, i, o, r, s) {
  27563. "use strict";
  27564. Object.defineProperty(t, "__esModule", {value: !0});
  27565. var a = function () {
  27566. function e() {
  27567. }
  27568. return e.deleteRight = function (e, t, n, o) {
  27569. for (var a = [], l = 3 !== e, u = 0, d = o.length; u < d; u++) {
  27570. var c = o[u], h = c;
  27571. if (h.isEmpty()) {
  27572. var p = c.getPosition(), g = r.MoveOperations.right(t, n, p.lineNumber, p.column);
  27573. h = new s.Range(g.lineNumber, g.column, p.lineNumber, p.column)
  27574. }
  27575. h.isEmpty() ? a[u] = null : (h.startLineNumber !== h.endLineNumber && (l = !0), a[u] = new i.ReplaceCommand(h, ""))
  27576. }
  27577. return [l, a]
  27578. },
  27579. e._isAutoClosingPairDelete = function (e, t, n) {
  27580. if ("never" === e.autoClosingBrackets && "never" === e.autoClosingQuotes) return !1;
  27581. for (var i = 0, r = n.length; i < r; i++) {
  27582. var s = n[i], a = s.getPosition();
  27583. if (!s.isEmpty()) return !1;
  27584. var l = t.getLineContent(a.lineNumber), u = l[a.column - 2], d = e.autoClosingPairsOpen2.get(u);
  27585. if (!d) return !1;
  27586. if (o.isQuote(u)) {
  27587. if ("never" === e.autoClosingQuotes) return !1
  27588. } else if ("never" === e.autoClosingBrackets) return !1;
  27589. for (var c = l[a.column - 1], h = !1, p = 0, g = d; p < g.length; p++) {
  27590. var f = g[p];
  27591. f.open === u && f.close === c && (h = !0)
  27592. }
  27593. if (!h) return !1
  27594. }
  27595. return !0
  27596. }, e._runAutoClosingPairDelete = function (e, t, n) {
  27597. for (var o = [], r = 0, a = n.length; r < a; r++) {
  27598. var l = n[r].getPosition(), u = new s.Range(l.lineNumber, l.column - 1, l.lineNumber, l.column + 1);
  27599. o[r] = new i.ReplaceCommand(u, "")
  27600. }
  27601. return [!0, o]
  27602. }, e.deleteLeft = function (e, t, a, l) {
  27603. if (this._isAutoClosingPairDelete(t, a, l)) return this._runAutoClosingPairDelete(t, a, l);
  27604. for (var u = [], d = 2 !== e, c = 0, h = l.length; c < h; c++) {
  27605. var p = l[c], g = p;
  27606. if (g.isEmpty()) {
  27607. var f = p.getPosition();
  27608. if (t.useTabStops && f.column > 1) {
  27609. var m = a.getLineContent(f.lineNumber), v = n.firstNonWhitespaceIndex(m),
  27610. _ = -1 === v ? m.length + 1 : v + 1;
  27611. if (f.column <= _) {
  27612. var y = o.CursorColumns.visibleColumnFromColumn2(t, a, f),
  27613. C = o.CursorColumns.prevIndentTabStop(y, t.indentSize),
  27614. b = o.CursorColumns.columnFromVisibleColumn2(t, a, f.lineNumber, C);
  27615. g = new s.Range(f.lineNumber, b, f.lineNumber, f.column)
  27616. } else g = new s.Range(f.lineNumber, f.column - 1, f.lineNumber, f.column)
  27617. } else {
  27618. var S = r.MoveOperations.left(t, a, f.lineNumber, f.column);
  27619. g = new s.Range(S.lineNumber, S.column, f.lineNumber, f.column)
  27620. }
  27621. }
  27622. g.isEmpty() ? u[c] = null : (g.startLineNumber !== g.endLineNumber && (d = !0), u[c] = new i.ReplaceCommand(g, ""))
  27623. }
  27624. return [d, u]
  27625. }, e.cut = function (e, t, n) {
  27626. for (var r = [], a = 0, l = n.length; a < l; a++) {
  27627. var u = n[a];
  27628. if (u.isEmpty()) if (e.emptySelectionClipboard) {
  27629. var d = u.getPosition(), c = void 0, h = void 0, p = void 0, g = void 0;
  27630. d.lineNumber < t.getLineCount() ? (c = d.lineNumber, h = 1, p = d.lineNumber + 1, g = 1) : d.lineNumber > 1 ? (c = d.lineNumber - 1, h = t.getLineMaxColumn(d.lineNumber - 1), p = d.lineNumber, g = t.getLineMaxColumn(d.lineNumber)) : (c = d.lineNumber, h = 1,
  27631. p = d.lineNumber, g = t.getLineMaxColumn(d.lineNumber));
  27632. var f = new s.Range(c, h, p, g);
  27633. f.isEmpty() ? r[a] = null : r[a] = new i.ReplaceCommand(f, "")
  27634. } else r[a] = null; else r[a] = new i.ReplaceCommand(u, "")
  27635. }
  27636. return new o.EditOperationResult(0, r, {
  27637. shouldPushStackElementBefore: !0,
  27638. shouldPushStackElementAfter: !0
  27639. })
  27640. }, e
  27641. }();
  27642. t.DeleteOperations = a
  27643. })),define(n[159], i([0, 1, 10, 5, 80, 211, 340, 40, 89, 3, 22, 90, 41]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p) {
  27644. "use strict";
  27645. Object.defineProperty(t, "__esModule", {value: !0});
  27646. var g = function () {
  27647. function e() {
  27648. }
  27649. return e.indent = function (e, t, n) {
  27650. if (null === t || null === n) return [];
  27651. for (var i = [], o = 0, r = n.length; o < r; o++) i[o] = new s.ShiftCommand(n[o], {
  27652. isUnshift: !1,
  27653. tabSize: e.tabSize,
  27654. indentSize: e.indentSize,
  27655. insertSpaces: e.insertSpaces,
  27656. useTabStops: e.useTabStops,
  27657. autoIndent: e.autoIndent
  27658. });
  27659. return i
  27660. }, e.outdent = function (e, t, n) {
  27661. for (var i = [], o = 0, r = n.length; o < r; o++) i[o] = new s.ShiftCommand(n[o], {
  27662. isUnshift: !0,
  27663. tabSize: e.tabSize,
  27664. indentSize: e.indentSize,
  27665. insertSpaces: e.insertSpaces,
  27666. useTabStops: e.useTabStops,
  27667. autoIndent: e.autoIndent
  27668. });
  27669. return i
  27670. },
  27671. e.shiftIndent = function (e, t, n) {
  27672. return n = n || 1, s.ShiftCommand.shiftIndent(t, t.length + n, e.tabSize, e.indentSize, e.insertSpaces)
  27673. }, e.unshiftIndent = function (e, t, n) {
  27674. return n = n || 1, s.ShiftCommand.unshiftIndent(t, t.length + n, e.tabSize, e.indentSize, e.insertSpaces)
  27675. }, e._distributedPaste = function (e, t, n, i) {
  27676. for (var r = [], s = 0, a = n.length; s < a; s++) r[s] = new o.ReplaceCommand(n[s], i[s]);
  27677. return new l.EditOperationResult(0, r, {
  27678. shouldPushStackElementBefore: !0,
  27679. shouldPushStackElementAfter: !0
  27680. })
  27681. }, e._simplePaste = function (e, t, n, i, r) {
  27682. for (var s = [], a = 0, u = n.length; a < u; a++) {
  27683. var c = n[a], h = c.getPosition();
  27684. if (r && !c.isEmpty() && (r = !1), r && i.indexOf("\n") !== i.length - 1 && (r = !1), r) {
  27685. var p = new d.Range(h.lineNumber, 1, h.lineNumber, 1);
  27686. s[a] = new o.ReplaceCommandThatPreservesSelection(p, i, c, !0)
  27687. } else s[a] = new o.ReplaceCommand(c, i)
  27688. }
  27689. return new l.EditOperationResult(0, s, {
  27690. shouldPushStackElementBefore: !0,
  27691. shouldPushStackElementAfter: !0
  27692. })
  27693. }, e._distributePasteToCursors = function (e, t, n, i, o) {
  27694. if (i) return null;
  27695. if (1 === t.length) return null;
  27696. if (o && o.length === t.length) return o
  27697. ;
  27698. if ("spread" === e.multiCursorPaste) {
  27699. 10 === n.charCodeAt(n.length - 1) && (n = n.substr(0, n.length - 1)), 13 === n.charCodeAt(n.length - 1) && (n = n.substr(0, n.length - 1));
  27700. var r = n.split(/\r\n|\r|\n/);
  27701. if (r.length === t.length) return r
  27702. }
  27703. return null
  27704. }, e.paste = function (e, t, n, i, o, r) {
  27705. var s = this._distributePasteToCursors(e, n, i, o, r);
  27706. return s ? (n = n.sort(d.Range.compareRangesUsingStarts), this._distributedPaste(e, t, n, s)) : this._simplePaste(e, t, n, i, o)
  27707. }, e._goodIndentForLine = function (t, n, o) {
  27708. var r = null, s = "",
  27709. a = p.LanguageConfigurationRegistry.getInheritIndentForLine(t.autoIndent, n, o, !1);
  27710. if (a) r = a.action, s = a.indentation; else if (o > 1) {
  27711. var l = void 0;
  27712. for (l = o - 1; l >= 1; l--) {
  27713. var u = n.getLineContent(l);
  27714. if (i.lastNonWhitespaceIndex(u) >= 0) break
  27715. }
  27716. if (l < 1) return null;
  27717. var c = n.getLineMaxColumn(l),
  27718. g = p.LanguageConfigurationRegistry.getEnterAction(t.autoIndent, n, new d.Range(l, c, l, c));
  27719. g && (s = g.indentation + g.appendText)
  27720. }
  27721. return r && (r === h.IndentAction.Indent && (s = e.shiftIndent(t, s)), r === h.IndentAction.Outdent && (s = e.unshiftIndent(t, s)), s = t.normalizeIndentation(s)), s || null
  27722. },
  27723. e._replaceJumpToNextIndent = function (e, t, n, i) {
  27724. var r = "", s = n.getStartPosition();
  27725. if (e.insertSpaces) for (var a = l.CursorColumns.visibleColumnFromColumn2(e, t, s), u = e.indentSize, d = u - a % u, c = 0; c < d; c++) r += " "; else r = "\t";
  27726. return new o.ReplaceCommand(n, r, i)
  27727. }, e.tab = function (e, t, n) {
  27728. for (var r = [], a = 0, l = n.length; a < l; a++) {
  27729. var u = n[a];
  27730. if (u.isEmpty()) {
  27731. var c = t.getLineContent(u.startLineNumber);
  27732. if (/^\s*$/.test(c) && t.isCheapToTokenize(u.startLineNumber)) {
  27733. var h = this._goodIndentForLine(e, t, u.startLineNumber);
  27734. h = h || "\t";
  27735. var p = e.normalizeIndentation(h);
  27736. if (!i.startsWith(c, p)) {
  27737. r[a] = new o.ReplaceCommand(new d.Range(u.startLineNumber, 1, u.startLineNumber, c.length + 1), p, !0);
  27738. continue
  27739. }
  27740. }
  27741. r[a] = this._replaceJumpToNextIndent(e, t, u, !0)
  27742. } else {
  27743. if (u.startLineNumber === u.endLineNumber) {
  27744. var g = t.getLineMaxColumn(u.startLineNumber);
  27745. if (1 !== u.startColumn || u.endColumn !== g) {
  27746. r[a] = this._replaceJumpToNextIndent(e, t, u, !1);
  27747. continue
  27748. }
  27749. }
  27750. r[a] = new s.ShiftCommand(u, {
  27751. isUnshift: !1,
  27752. tabSize: e.tabSize,
  27753. indentSize: e.indentSize,
  27754. insertSpaces: e.insertSpaces,
  27755. useTabStops: e.useTabStops,
  27756. autoIndent: e.autoIndent
  27757. })
  27758. }
  27759. }
  27760. return r
  27761. }, e.replacePreviousChar = function (e, t, n, i, r, s) {
  27762. for (var a = [], u = 0, c = i.length; u < c; u++) {
  27763. var h = i[u];
  27764. if (h.isEmpty()) {
  27765. var p = h.getPosition(), g = Math.max(1, p.column - s),
  27766. f = new d.Range(p.lineNumber, g, p.lineNumber, p.column);
  27767. a[u] = new o.ReplaceCommand(f, r)
  27768. } else a[u] = null
  27769. }
  27770. return new l.EditOperationResult(1, a, {
  27771. shouldPushStackElementBefore: 1 !== e,
  27772. shouldPushStackElementAfter: !1
  27773. })
  27774. }, e._typeCommand = function (e, t, n) {
  27775. return n ? new o.ReplaceCommandWithoutChangingPosition(e, t, !0) : new o.ReplaceCommand(e, t, !0)
  27776. }, e._enter = function (t, n, r, s) {
  27777. if (0 === t.autoIndent) return e._typeCommand(s, "\n", r);
  27778. if (!n.isCheapToTokenize(s.getStartPosition().lineNumber) || 1 === t.autoIndent) {
  27779. var a = n.getLineContent(s.startLineNumber),
  27780. u = i.getLeadingWhitespace(a).substring(0, s.startColumn - 1);
  27781. return e._typeCommand(s, "\n" + t.normalizeIndentation(u), r)
  27782. }
  27783. var c = p.LanguageConfigurationRegistry.getEnterAction(t.autoIndent, n, s);
  27784. if (c) {
  27785. if (c.indentAction === h.IndentAction.None) return e._typeCommand(s, "\n" + t.normalizeIndentation(c.indentation + c.appendText), r);
  27786. if (c.indentAction === h.IndentAction.Indent) return e._typeCommand(s, "\n" + t.normalizeIndentation(c.indentation + c.appendText), r);
  27787. if (c.indentAction === h.IndentAction.IndentOutdent) {
  27788. var g = t.normalizeIndentation(c.indentation),
  27789. f = t.normalizeIndentation(c.indentation + c.appendText), m = "\n" + f + "\n" + g;
  27790. return r ? new o.ReplaceCommandWithoutChangingPosition(s, m, !0) : new o.ReplaceCommandWithOffsetCursorState(s, m, -1, f.length - g.length, !0)
  27791. }
  27792. if (c.indentAction === h.IndentAction.Outdent) {
  27793. var v = e.unshiftIndent(t, c.indentation);
  27794. return e._typeCommand(s, "\n" + t.normalizeIndentation(v + c.appendText), r)
  27795. }
  27796. }
  27797. var _ = n.getLineContent(s.startLineNumber),
  27798. y = i.getLeadingWhitespace(_).substring(0, s.startColumn - 1);
  27799. if (t.autoIndent >= 4) {
  27800. var C = p.LanguageConfigurationRegistry.getIndentForEnter(t.autoIndent, n, s, {
  27801. unshiftIndent: function (n) {
  27802. return e.unshiftIndent(t, n)
  27803. }, shiftIndent: function (n) {
  27804. return e.shiftIndent(t, n)
  27805. },
  27806. normalizeIndentation: function (e) {
  27807. return t.normalizeIndentation(e)
  27808. }
  27809. });
  27810. if (C) {
  27811. var b = l.CursorColumns.visibleColumnFromColumn2(t, n, s.getEndPosition()), S = s.endColumn,
  27812. w = "\n";
  27813. y !== t.normalizeIndentation(C.beforeEnter) && (w = t.normalizeIndentation(C.beforeEnter) + _.substring(y.length, s.startColumn - 1) + "\n", s = new d.Range(s.startLineNumber, 1, s.endLineNumber, s.endColumn));
  27814. var E = n.getLineContent(s.endLineNumber), L = i.firstNonWhitespaceIndex(E);
  27815. if (s = L >= 0 ? s.setEndPosition(s.endLineNumber, Math.max(s.endColumn, L + 1)) : s.setEndPosition(s.endLineNumber, n.getLineMaxColumn(s.endLineNumber)), r) return new o.ReplaceCommandWithoutChangingPosition(s, w + t.normalizeIndentation(C.afterEnter), !0);
  27816. var D = 0;
  27817. return S <= L + 1 && (t.insertSpaces || (b = Math.ceil(b / t.indentSize)), D = Math.min(b + 1 - t.normalizeIndentation(C.afterEnter).length - 1, 0)), new o.ReplaceCommandWithOffsetCursorState(s, w + t.normalizeIndentation(C.afterEnter), 0, D, !0)
  27818. }
  27819. }
  27820. return e._typeCommand(s, "\n" + t.normalizeIndentation(y), r)
  27821. }, e._isAutoIndentType = function (e, t, n) {
  27822. if (e.autoIndent < 4) return !1
  27823. ;
  27824. for (var i = 0, o = n.length; i < o; i++) if (!t.isCheapToTokenize(n[i].getEndPosition().lineNumber)) return !1;
  27825. return !0
  27826. }, e._runAutoIndentType = function (t, n, i, o) {
  27827. var r = p.LanguageConfigurationRegistry.getIndentationAtPosition(n, i.startLineNumber, i.startColumn),
  27828. s = p.LanguageConfigurationRegistry.getIndentActionForType(t.autoIndent, n, i, o, {
  27829. shiftIndent: function (n) {
  27830. return e.shiftIndent(t, n)
  27831. }, unshiftIndent: function (n) {
  27832. return e.unshiftIndent(t, n)
  27833. }
  27834. });
  27835. if (null === s) return null;
  27836. if (s !== t.normalizeIndentation(r)) {
  27837. var a = n.getLineFirstNonWhitespaceColumn(i.startLineNumber);
  27838. return 0 === a ? e._typeCommand(new d.Range(i.startLineNumber, 0, i.endLineNumber, i.endColumn), t.normalizeIndentation(s) + o, !1) : e._typeCommand(new d.Range(i.startLineNumber, 0, i.endLineNumber, i.endColumn), t.normalizeIndentation(s) + n.getLineContent(i.startLineNumber).substring(a - 1, i.startColumn - 1) + o, !1)
  27839. }
  27840. return null
  27841. }, e._isAutoClosingOvertype = function (e, t, n, i, o) {
  27842. if ("never" === e.autoClosingOvertype) return !1;
  27843. if (!e.autoClosingPairsClose2.has(o)) return !1;
  27844. for (var r = 0, s = n.length; r < s; r++) {
  27845. var a = n[r];
  27846. if (!a.isEmpty()) return !1;
  27847. var u = a.getPosition(), d = t.getLineContent(u.lineNumber);
  27848. if (d.charAt(u.column - 1) !== o) return !1;
  27849. var c = l.isQuote(o);
  27850. if (92 === (u.column > 2 ? d.charCodeAt(u.column - 2) : 0) && c) return !1;
  27851. if ("auto" === e.autoClosingOvertype) {
  27852. for (var h = !1, p = 0, g = i.length; p < g; p++) {
  27853. var f = i[p];
  27854. if (u.lineNumber === f.startLineNumber && u.column === f.startColumn) {
  27855. h = !0;
  27856. break
  27857. }
  27858. }
  27859. if (!h) return !1
  27860. }
  27861. }
  27862. return !0
  27863. }, e._runAutoClosingOvertype = function (e, t, n, i, r) {
  27864. for (var s = [], a = 0, u = i.length; a < u; a++) {
  27865. var c = i[a].getPosition(), h = new d.Range(c.lineNumber, c.column, c.lineNumber, c.column + 1);
  27866. s[a] = new o.ReplaceCommand(h, r)
  27867. }
  27868. return new l.EditOperationResult(1, s, {
  27869. shouldPushStackElementBefore: 1 !== e,
  27870. shouldPushStackElementAfter: !1
  27871. })
  27872. }, e._autoClosingPairIsSymmetric = function (e) {
  27873. var t = e.open, n = e.close;
  27874. return t.indexOf(n) >= 0 || n.indexOf(t) >= 0
  27875. }, e._isBeforeClosingBrace = function (t, n, i) {
  27876. var o = t.autoClosingPairsClose2.get(i);
  27877. if (!o) return !1;
  27878. for (var r = e._autoClosingPairIsSymmetric(n), s = 0, a = o; s < a.length; s++) {
  27879. var l = a[s], u = e._autoClosingPairIsSymmetric(l)
  27880. ;
  27881. if (r || !u) return !0
  27882. }
  27883. return !1
  27884. }, e._findAutoClosingPairOpen = function (e, t, n, i) {
  27885. var o = e.autoClosingPairsOpen2.get(i);
  27886. if (!o) return null;
  27887. for (var r = null, s = 0, a = o; s < a.length; s++) {
  27888. var l = a[s];
  27889. if (null === r || l.open.length > r.open.length) {
  27890. for (var u = !0, c = 0, h = n; c < h.length; c++) {
  27891. var p = h[c];
  27892. if (t.getValueInRange(new d.Range(p.lineNumber, p.column - l.open.length + 1, p.lineNumber, p.column)) + i !== l.open) {
  27893. u = !1;
  27894. break
  27895. }
  27896. }
  27897. u && (r = l)
  27898. }
  27899. }
  27900. return r
  27901. }, e._isAutoClosingOpenCharType = function (t, i, o, r, s) {
  27902. var a = l.isQuote(r), d = a ? t.autoClosingQuotes : t.autoClosingBrackets;
  27903. if ("never" === d) return null;
  27904. var c = this._findAutoClosingPairOpen(t, i, o.map((function (e) {
  27905. return e.getPosition()
  27906. })), r);
  27907. if (!c) return null;
  27908. for (var h = a ? t.shouldAutoCloseBefore.quote : t.shouldAutoCloseBefore.bracket, g = 0, f = o.length; g < f; g++) {
  27909. var m = o[g];
  27910. if (!m.isEmpty()) return null;
  27911. var v = m.getPosition(), _ = i.getLineContent(v.lineNumber);
  27912. if (_.length > v.column - 1) {
  27913. var y = _.charAt(v.column - 1);
  27914. if (!e._isBeforeClosingBrace(t, c, y) && !h(y)) return null
  27915. }
  27916. if (!i.isCheapToTokenize(v.lineNumber)) return null
  27917. ;
  27918. if (1 === c.open.length && a && "always" !== d) {
  27919. var C = u.getMapForWordSeparators(t.wordSeparators);
  27920. if (s && v.column > 1 && 0 === C.get(_.charCodeAt(v.column - 2))) return null;
  27921. if (!s && v.column > 2 && 0 === C.get(_.charCodeAt(v.column - 3))) return null
  27922. }
  27923. i.forceTokenization(v.lineNumber);
  27924. var b = i.getLineTokens(v.lineNumber), S = !1;
  27925. try {
  27926. S = p.LanguageConfigurationRegistry.shouldAutoClosePair(c, b, s ? v.column : v.column - 1)
  27927. } catch (e) {
  27928. n.onUnexpectedError(e)
  27929. }
  27930. if (!S) return null
  27931. }
  27932. return c
  27933. }, e._runAutoClosingOpenCharType = function (e, t, n, i, o, r, s) {
  27934. for (var a = [], u = 0, d = i.length; u < d; u++) {
  27935. var c = i[u];
  27936. a[u] = new f(c, o, r, s.close)
  27937. }
  27938. return new l.EditOperationResult(1, a, {
  27939. shouldPushStackElementBefore: !0,
  27940. shouldPushStackElementAfter: !1
  27941. })
  27942. }, e._shouldSurroundChar = function (e, t) {
  27943. return l.isQuote(t) ? "quotes" === e.autoSurround || "languageDefined" === e.autoSurround : "brackets" === e.autoSurround || "languageDefined" === e.autoSurround
  27944. }, e._isSurroundSelectionType = function (t, n, i, o) {
  27945. if (!e._shouldSurroundChar(t, o) || !t.surroundingPairs.hasOwnProperty(o)) return !1
  27946. ;
  27947. for (var r = l.isQuote(o), s = 0, a = i.length; s < a; s++) {
  27948. var u = i[s];
  27949. if (u.isEmpty()) return !1;
  27950. for (var d = !0, c = u.startLineNumber; c <= u.endLineNumber; c++) {
  27951. var h = n.getLineContent(c), p = c === u.startLineNumber ? u.startColumn - 1 : 0,
  27952. g = c === u.endLineNumber ? u.endColumn - 1 : h.length, f = h.substring(p, g);
  27953. if (/[^ \t]/.test(f)) {
  27954. d = !1;
  27955. break
  27956. }
  27957. }
  27958. if (d) return !1;
  27959. if (r && u.startLineNumber === u.endLineNumber && u.startColumn + 1 === u.endColumn) {
  27960. var m = n.getValueInRange(u);
  27961. if (l.isQuote(m)) return !1
  27962. }
  27963. }
  27964. return !0
  27965. }, e._runSurroundSelectionType = function (e, t, n, i, o) {
  27966. for (var r = [], s = 0, u = i.length; s < u; s++) {
  27967. var d = i[s], c = t.surroundingPairs[o];
  27968. r[s] = new a.SurroundSelectionCommand(d, o, c)
  27969. }
  27970. return new l.EditOperationResult(0, r, {
  27971. shouldPushStackElementBefore: !0,
  27972. shouldPushStackElementAfter: !0
  27973. })
  27974. }, e._isTypeInterceptorElectricChar = function (e, t, n) {
  27975. return !(1 !== n.length || !t.isCheapToTokenize(n[0].getEndPosition().lineNumber))
  27976. }, e._typeInterceptorElectricChar = function (e, t, r, s, a) {
  27977. if (!t.electricChars.hasOwnProperty(a) || !s.isEmpty()) return null;
  27978. var u = s.getPosition();
  27979. r.forceTokenization(u.lineNumber)
  27980. ;var c, h = r.getLineTokens(u.lineNumber);
  27981. try {
  27982. c = p.LanguageConfigurationRegistry.onElectricCharacter(a, h, u.column)
  27983. } catch (e) {
  27984. return n.onUnexpectedError(e), null
  27985. }
  27986. if (!c) return null;
  27987. if (c.matchOpenBracket) {
  27988. var g = (h.getLineContent() + a).lastIndexOf(c.matchOpenBracket) + 1,
  27989. f = r.findMatchingBracketUp(c.matchOpenBracket, {lineNumber: u.lineNumber, column: g});
  27990. if (f) {
  27991. if (f.startLineNumber === u.lineNumber) return null;
  27992. var m = r.getLineContent(f.startLineNumber), v = i.getLeadingWhitespace(m),
  27993. _ = t.normalizeIndentation(v), y = r.getLineContent(u.lineNumber),
  27994. C = r.getLineFirstNonWhitespaceColumn(u.lineNumber) || u.column,
  27995. b = _ + y.substring(C - 1, u.column - 1) + a,
  27996. S = new d.Range(u.lineNumber, 1, u.lineNumber, u.column), w = new o.ReplaceCommand(S, b);
  27997. return new l.EditOperationResult(1, [w], {
  27998. shouldPushStackElementBefore: !1,
  27999. shouldPushStackElementAfter: !0
  28000. })
  28001. }
  28002. }
  28003. return null
  28004. }, e.compositionEndWithInterceptors = function (e, t, n, i, r, s) {
  28005. if (!i || c.Selection.selectionsArrEqual(i, r)) return null;
  28006. for (var a = null, u = 0, h = r; u < h.length; u++) {
  28007. var p = h[u];
  28008. if (!p.isEmpty()) return null
  28009. ;
  28010. var g = p.getPosition(),
  28011. f = n.getValueInRange(new d.Range(g.lineNumber, g.column - 1, g.lineNumber, g.column));
  28012. if (null === a) a = f; else if (a !== f) return null
  28013. }
  28014. if (!a) return null;
  28015. if (this._isAutoClosingOvertype(t, n, r, s, a)) {
  28016. var m = r.map((function (e) {
  28017. return new o.ReplaceCommand(new d.Range(e.positionLineNumber, e.positionColumn, e.positionLineNumber, e.positionColumn + 1), "", !1)
  28018. }));
  28019. return new l.EditOperationResult(1, m, {
  28020. shouldPushStackElementBefore: !0,
  28021. shouldPushStackElementAfter: !1
  28022. })
  28023. }
  28024. var v = this._isAutoClosingOpenCharType(t, n, r, a, !1);
  28025. return v ? this._runAutoClosingOpenCharType(e, t, n, r, a, !1, v) : null
  28026. }, e.typeWithInterceptors = function (t, n, i, r, s, a) {
  28027. if ("\n" === a) {
  28028. for (var u = [], d = 0, c = r.length; d < c; d++) u[d] = e._enter(n, i, !1, r[d]);
  28029. return new l.EditOperationResult(1, u, {
  28030. shouldPushStackElementBefore: !0,
  28031. shouldPushStackElementAfter: !1
  28032. })
  28033. }
  28034. if (this._isAutoIndentType(n, i, r)) {
  28035. var h = [], p = !1;
  28036. for (d = 0, c = r.length; d < c; d++) if (h[d] = this._runAutoIndentType(n, i, r[d], a), !h[d]) {
  28037. p = !0;
  28038. break
  28039. }
  28040. if (!p) return new l.EditOperationResult(1, h, {
  28041. shouldPushStackElementBefore: !0,
  28042. shouldPushStackElementAfter: !1
  28043. })
  28044. }
  28045. if (this._isAutoClosingOvertype(n, i, r, s, a)) return this._runAutoClosingOvertype(t, n, i, r, a);
  28046. var g = this._isAutoClosingOpenCharType(n, i, r, a, !0);
  28047. if (g) return this._runAutoClosingOpenCharType(t, n, i, r, a, !0, g);
  28048. if (this._isSurroundSelectionType(n, i, r, a)) return this._runSurroundSelectionType(t, n, i, r, a);
  28049. if (this._isTypeInterceptorElectricChar(n, i, r)) {
  28050. var f = this._typeInterceptorElectricChar(t, n, i, r[0], a);
  28051. if (f) return f
  28052. }
  28053. var m = [];
  28054. for (d = 0, c = r.length; d < c; d++) m[d] = new o.ReplaceCommand(r[d], a);
  28055. var v = 1 !== t;
  28056. return " " === a && (v = !0), new l.EditOperationResult(1, m, {
  28057. shouldPushStackElementBefore: v,
  28058. shouldPushStackElementAfter: !1
  28059. })
  28060. }, e.typeWithoutInterceptors = function (e, t, n, i, r) {
  28061. for (var s = [], a = 0, u = i.length; a < u; a++) s[a] = new o.ReplaceCommand(i[a], r);
  28062. return new l.EditOperationResult(1, s, {
  28063. shouldPushStackElementBefore: 1 !== e,
  28064. shouldPushStackElementAfter: !1
  28065. })
  28066. }, e.lineInsertBefore = function (e, t, n) {
  28067. if (null === t || null === n) return [];
  28068. for (var i = [], r = 0, s = n.length; r < s; r++) {
  28069. var a = n[r].positionLineNumber
  28070. ;
  28071. if (1 === a) i[r] = new o.ReplaceCommandWithoutChangingPosition(new d.Range(1, 1, 1, 1), "\n"); else {
  28072. a--;
  28073. var l = t.getLineMaxColumn(a);
  28074. i[r] = this._enter(e, t, !1, new d.Range(a, l, a, l))
  28075. }
  28076. }
  28077. return i
  28078. }, e.lineInsertAfter = function (e, t, n) {
  28079. if (null === t || null === n) return [];
  28080. for (var i = [], o = 0, r = n.length; o < r; o++) {
  28081. var s = n[o].positionLineNumber, a = t.getLineMaxColumn(s);
  28082. i[o] = this._enter(e, t, !1, new d.Range(s, a, s, a))
  28083. }
  28084. return i
  28085. }, e.lineBreakInsert = function (e, t, n) {
  28086. for (var i = [], o = 0, r = n.length; o < r; o++) i[o] = this._enter(e, t, !0, n[o]);
  28087. return i
  28088. }, e
  28089. }();
  28090. t.TypeOperations = g;
  28091. var f = function (e) {
  28092. function t(t, n, i, o) {
  28093. var r = e.call(this, t, (i ? n : "") + o, 0, -o.length) || this;
  28094. return r._openCharacter = n, r._closeCharacter = o, r.closeCharacterRange = null, r.enclosingRange = null, r
  28095. }
  28096. return r(t, e), t.prototype.computeCursorState = function (t, n) {
  28097. var i = n.getInverseEditOperations()[0].range;
  28098. return this.closeCharacterRange = new d.Range(i.startLineNumber, i.endColumn - this._closeCharacter.length, i.endLineNumber, i.endColumn),
  28099. this.enclosingRange = new d.Range(i.startLineNumber, i.endColumn - this._openCharacter.length - this._closeCharacter.length, i.endLineNumber, i.endColumn), e.prototype.computeCursorState.call(this, t, n)
  28100. }, t
  28101. }(o.ReplaceCommandWithOffsetCursorState);
  28102. t.TypeWithAutoClosingCommand = f
  28103. })),define(n[160], i([0, 1, 5, 40, 89, 13, 3]), (function (e, t, n, i, o, s, a) {
  28104. "use strict";
  28105. Object.defineProperty(t, "__esModule", {value: !0});
  28106. var l = function () {
  28107. function e() {
  28108. }
  28109. return e._createWord = function (e, t, n, i, o) {
  28110. return {start: i, end: o, wordType: t, nextCharClass: n}
  28111. }, e._findPreviousWordOnLine = function (e, t, n) {
  28112. var i = t.getLineContent(n.lineNumber);
  28113. return this._doFindPreviousWordOnLine(i, e, n)
  28114. }, e._doFindPreviousWordOnLine = function (e, t, n) {
  28115. for (var i = 0, o = n.column - 2; o >= 0; o--) {
  28116. var r = e.charCodeAt(o), s = t.get(r);
  28117. if (0 === s) {
  28118. if (2 === i) return this._createWord(e, i, s, o + 1, this._findEndOfWord(e, t, i, o + 1));
  28119. i = 1
  28120. } else if (2 === s) {
  28121. if (1 === i) return this._createWord(e, i, s, o + 1, this._findEndOfWord(e, t, i, o + 1));
  28122. i = 2
  28123. } else if (1 === s && 0 !== i) return this._createWord(e, i, s, o + 1, this._findEndOfWord(e, t, i, o + 1))
  28124. }
  28125. return 0 !== i ? this._createWord(e, i, 1, 0, this._findEndOfWord(e, t, i, 0)) : null
  28126. }, e._findEndOfWord = function (e, t, n, i) {
  28127. for (var o = e.length, r = i; r < o; r++) {
  28128. var s = e.charCodeAt(r), a = t.get(s);
  28129. if (1 === a) return r;
  28130. if (1 === n && 2 === a) return r;
  28131. if (2 === n && 0 === a) return r
  28132. }
  28133. return o
  28134. }, e._findNextWordOnLine = function (e, t, n) {
  28135. var i = t.getLineContent(n.lineNumber);
  28136. return this._doFindNextWordOnLine(i, e, n)
  28137. }, e._doFindNextWordOnLine = function (e, t, n) {
  28138. for (var i = 0, o = e.length, r = n.column - 1; r < o; r++) {
  28139. var s = e.charCodeAt(r), a = t.get(s);
  28140. if (0 === a) {
  28141. if (2 === i) return this._createWord(e, i, a, this._findStartOfWord(e, t, i, r - 1), r);
  28142. i = 1
  28143. } else if (2 === a) {
  28144. if (1 === i) return this._createWord(e, i, a, this._findStartOfWord(e, t, i, r - 1), r);
  28145. i = 2
  28146. } else if (1 === a && 0 !== i) return this._createWord(e, i, a, this._findStartOfWord(e, t, i, r - 1), r)
  28147. }
  28148. return 0 !== i ? this._createWord(e, i, 1, this._findStartOfWord(e, t, i, o - 1), o) : null
  28149. }, e._findStartOfWord = function (e, t, n, i) {
  28150. for (var o = i; o >= 0; o--) {
  28151. var r = e.charCodeAt(o), s = t.get(r);
  28152. if (1 === s) return o + 1;
  28153. if (1 === n && 2 === s) return o + 1;
  28154. if (2 === n && 0 === s) return o + 1
  28155. }
  28156. return 0
  28157. },
  28158. e.moveWordLeft = function (t, n, i, o) {
  28159. var r = i.lineNumber, a = i.column, l = !1;
  28160. 1 === a && r > 1 && (l = !0, r -= 1, a = n.getLineMaxColumn(r));
  28161. var u = e._findPreviousWordOnLine(t, n, new s.Position(r, a));
  28162. if (0 === o) {
  28163. if (u && !l) if (n.getLineLastNonWhitespaceColumn(r) < a) return new s.Position(r, u.end + 1);
  28164. return new s.Position(r, u ? u.start + 1 : 1)
  28165. }
  28166. if (1 === o) return u && 2 === u.wordType && u.end - u.start == 1 && 0 === u.nextCharClass && (u = e._findPreviousWordOnLine(t, n, new s.Position(r, u.start + 1))), new s.Position(r, u ? u.start + 1 : 1);
  28167. if (3 === o) {
  28168. for (; u && 2 === u.wordType;) u = e._findPreviousWordOnLine(t, n, new s.Position(r, u.start + 1));
  28169. return new s.Position(r, u ? u.start + 1 : 1)
  28170. }
  28171. return u && a <= u.end + 1 && (u = e._findPreviousWordOnLine(t, n, new s.Position(r, u.start + 1))), new s.Position(r, u ? u.end + 1 : 1)
  28172. }, e._moveWordPartLeft = function (e, t) {
  28173. var i = t.lineNumber, o = e.getLineMaxColumn(i);
  28174. if (1 === t.column) return i > 1 ? new s.Position(i - 1, e.getLineMaxColumn(i - 1)) : t;
  28175. for (var r = e.getLineContent(i), a = t.column - 1; a > 1; a--) {
  28176. var l = r.charCodeAt(a - 2), u = r.charCodeAt(a - 1);
  28177. if (95 !== l && 95 === u) return new s.Position(i, a)
  28178. ;
  28179. if (n.isLowerAsciiLetter(l) && n.isUpperAsciiLetter(u)) return new s.Position(i, a);
  28180. if (n.isUpperAsciiLetter(l) && n.isUpperAsciiLetter(u) && a + 1 < o) {
  28181. var d = r.charCodeAt(a);
  28182. if (n.isLowerAsciiLetter(d)) return new s.Position(i, a)
  28183. }
  28184. }
  28185. return new s.Position(i, 1)
  28186. }, e.moveWordRight = function (t, n, i, o) {
  28187. var r = i.lineNumber, a = i.column, l = !1;
  28188. a === n.getLineMaxColumn(r) && r < n.getLineCount() && (l = !0, r += 1, a = 1);
  28189. var u = e._findNextWordOnLine(t, n, new s.Position(r, a));
  28190. if (2 === o) u && 2 === u.wordType && u.end - u.start == 1 && 0 === u.nextCharClass && (u = e._findNextWordOnLine(t, n, new s.Position(r, u.end + 1))), a = u ? u.end + 1 : n.getLineMaxColumn(r); else if (3 === o) {
  28191. for (l && (a = 0); u && (2 === u.wordType || u.start + 1 <= a);) u = e._findNextWordOnLine(t, n, new s.Position(r, u.end + 1));
  28192. a = u ? u.start + 1 : n.getLineMaxColumn(r)
  28193. } else u && !l && a >= u.start + 1 && (u = e._findNextWordOnLine(t, n, new s.Position(r, u.end + 1))), a = u ? u.start + 1 : n.getLineMaxColumn(r);
  28194. return new s.Position(r, a)
  28195. }, e._moveWordPartRight = function (e, t) {
  28196. var i = t.lineNumber, o = e.getLineMaxColumn(i)
  28197. ;
  28198. if (t.column === o) return i < e.getLineCount() ? new s.Position(i + 1, 1) : t;
  28199. for (var r = e.getLineContent(i), a = t.column + 1; a < o; a++) {
  28200. var l = r.charCodeAt(a - 2), u = r.charCodeAt(a - 1);
  28201. if (95 === l && 95 !== u) return new s.Position(i, a);
  28202. if (n.isLowerAsciiLetter(l) && n.isUpperAsciiLetter(u)) return new s.Position(i, a);
  28203. if (n.isUpperAsciiLetter(l) && n.isUpperAsciiLetter(u) && a + 1 < o) {
  28204. var d = r.charCodeAt(a);
  28205. if (n.isLowerAsciiLetter(d)) return new s.Position(i, a)
  28206. }
  28207. }
  28208. return new s.Position(i, o)
  28209. }, e._deleteWordLeftWhitespace = function (e, t) {
  28210. var i = e.getLineContent(t.lineNumber), o = t.column - 2, r = n.lastNonWhitespaceIndex(i, o);
  28211. return r + 1 < o ? new a.Range(t.lineNumber, r + 2, t.lineNumber, t.column) : null
  28212. }, e.deleteWordLeft = function (t, n, i, o, r) {
  28213. if (!i.isEmpty()) return i;
  28214. var l = new s.Position(i.positionLineNumber, i.positionColumn), u = l.lineNumber, d = l.column;
  28215. if (1 === u && 1 === d) return null;
  28216. if (o) {
  28217. var c = this._deleteWordLeftWhitespace(n, l);
  28218. if (c) return c
  28219. }
  28220. var h = e._findPreviousWordOnLine(t, n, l);
  28221. return 0 === r ? h ? d = h.start + 1 : d > 1 ? d = 1 : (u--,
  28222. d = n.getLineMaxColumn(u)) : (h && d <= h.end + 1 && (h = e._findPreviousWordOnLine(t, n, new s.Position(u, h.start + 1))), h ? d = h.end + 1 : d > 1 ? d = 1 : (u--, d = n.getLineMaxColumn(u))), new a.Range(u, d, l.lineNumber, l.column)
  28223. }, e._deleteWordPartLeft = function (t, n) {
  28224. if (!n.isEmpty()) return n;
  28225. var i = n.getPosition(), o = e._moveWordPartLeft(t, i);
  28226. return new a.Range(i.lineNumber, i.column, o.lineNumber, o.column)
  28227. }, e._findFirstNonWhitespaceChar = function (e, t) {
  28228. for (var n = e.length, i = t; i < n; i++) {
  28229. var o = e.charAt(i);
  28230. if (" " !== o && "\t" !== o) return i
  28231. }
  28232. return n
  28233. }, e._deleteWordRightWhitespace = function (e, t) {
  28234. var n = e.getLineContent(t.lineNumber), i = t.column - 1, o = this._findFirstNonWhitespaceChar(n, i);
  28235. return i + 1 < o ? new a.Range(t.lineNumber, t.column, t.lineNumber, o + 1) : null
  28236. }, e.deleteWordRight = function (t, n, i, o, r) {
  28237. if (!i.isEmpty()) return i;
  28238. var l = new s.Position(i.positionLineNumber, i.positionColumn), u = l.lineNumber, d = l.column,
  28239. c = n.getLineCount(), h = n.getLineMaxColumn(u);
  28240. if (u === c && d === h) return null;
  28241. if (o) {
  28242. var p = this._deleteWordRightWhitespace(n, l);
  28243. if (p) return p
  28244. }
  28245. var g = e._findNextWordOnLine(t, n, l);
  28246. return 2 === r ? g ? d = g.end + 1 : d < h || u === c ? d = h : (u++, d = (g = e._findNextWordOnLine(t, n, new s.Position(u, 1))) ? g.start + 1 : n.getLineMaxColumn(u)) : (g && d >= g.start + 1 && (g = e._findNextWordOnLine(t, n, new s.Position(u, g.end + 1))), g ? d = g.start + 1 : d < h || u === c ? d = h : (u++, d = (g = e._findNextWordOnLine(t, n, new s.Position(u, 1))) ? g.start + 1 : n.getLineMaxColumn(u))), new a.Range(u, d, l.lineNumber, l.column)
  28247. }, e._deleteWordPartRight = function (t, n) {
  28248. if (!n.isEmpty()) return n;
  28249. var i = n.getPosition(), o = e._moveWordPartRight(t, i);
  28250. return new a.Range(i.lineNumber, i.column, o.lineNumber, o.column)
  28251. }, e.word = function (t, n, r, l, u) {
  28252. var d, c, h, p, g = o.getMapForWordSeparators(t.wordSeparators), f = e._findPreviousWordOnLine(g, n, u),
  28253. m = e._findNextWordOnLine(g, n, u);
  28254. if (!l) return f && 1 === f.wordType && f.start <= u.column - 1 && u.column - 1 <= f.end ? (d = f.start + 1, c = f.end + 1) : m && 1 === m.wordType && m.start <= u.column - 1 && u.column - 1 <= m.end ? (d = m.start + 1, c = m.end + 1) : (d = f ? f.end + 1 : 1, c = m ? m.start + 1 : n.getLineMaxColumn(u.lineNumber)),
  28255. new i.SingleCursorState(new a.Range(u.lineNumber, d, u.lineNumber, c), 0, new s.Position(u.lineNumber, c), 0);
  28256. f && 1 === f.wordType && f.start < u.column - 1 && u.column - 1 < f.end ? (h = f.start + 1, p = f.end + 1) : m && 1 === m.wordType && m.start < u.column - 1 && u.column - 1 < m.end ? (h = m.start + 1, p = m.end + 1) : (h = u.column, p = u.column);
  28257. var v, _ = u.lineNumber;
  28258. if (r.selectionStart.containsPosition(u)) v = r.selectionStart.endColumn; else if (u.isBeforeOrEqual(r.selectionStart.getStartPosition())) {
  28259. v = h;
  28260. var y = new s.Position(_, v);
  28261. r.selectionStart.containsPosition(y) && (v = r.selectionStart.endColumn)
  28262. } else {
  28263. v = p;
  28264. y = new s.Position(_, v);
  28265. r.selectionStart.containsPosition(y) && (v = r.selectionStart.startColumn)
  28266. }
  28267. return r.move(!0, _, v, 0)
  28268. }, e
  28269. }();
  28270. t.WordOperations = l;
  28271. var u = function (e) {
  28272. function t() {
  28273. return null !== e && e.apply(this, arguments) || this
  28274. }
  28275. return r(t, e), t.deleteWordPartLeft = function (e, t, n, i) {
  28276. var o = d([l.deleteWordLeft(e, t, n, i, 0), l.deleteWordLeft(e, t, n, i, 2), l._deleteWordPartLeft(t, n)]);
  28277. return o.sort(a.Range.compareRangesUsingEnds), o[2]
  28278. }, t.deleteWordPartRight = function (e, t, n, i) {
  28279. var o = d([l.deleteWordRight(e, t, n, i, 0), l.deleteWordRight(e, t, n, i, 2), l._deleteWordPartRight(t, n)]);
  28280. return o.sort(a.Range.compareRangesUsingStarts), o[0]
  28281. }, t.moveWordPartLeft = function (e, t, n) {
  28282. var i = d([l.moveWordLeft(e, t, n, 0), l.moveWordLeft(e, t, n, 2), l._moveWordPartLeft(t, n)]);
  28283. return i.sort(s.Position.compare), i[2]
  28284. }, t.moveWordPartRight = function (e, t, n) {
  28285. var i = d([l.moveWordRight(e, t, n, 0), l.moveWordRight(e, t, n, 2), l._moveWordPartRight(t, n)]);
  28286. return i.sort(s.Position.compare), i[0]
  28287. }, t
  28288. }(l);
  28289. function d(e) {
  28290. return e.filter((function (e) {
  28291. return Boolean(e)
  28292. }))
  28293. }
  28294. t.WordPartOperations = u
  28295. })),define(n[213], i([0, 1, 21, 40, 158, 160, 13, 3]), (function (e, t, n, i, o, r, s, a) {
  28296. "use strict";
  28297. Object.defineProperty(t, "__esModule", {value: !0});
  28298. var l = function () {
  28299. function e() {
  28300. }
  28301. return e.addCursorDown = function (e, t, n) {
  28302. for (var r = [], s = 0, a = 0, l = t.length; a < l; a++) {
  28303. var u = t[a];
  28304. r[s++] = new i.CursorState(u.modelState, u.viewState),
  28305. r[s++] = n ? i.CursorState.fromModelState(o.MoveOperations.translateDown(e.config, e.model, u.modelState)) : i.CursorState.fromViewState(o.MoveOperations.translateDown(e.config, e.viewModel, u.viewState))
  28306. }
  28307. return r
  28308. }, e.addCursorUp = function (e, t, n) {
  28309. for (var r = [], s = 0, a = 0, l = t.length; a < l; a++) {
  28310. var u = t[a];
  28311. r[s++] = new i.CursorState(u.modelState, u.viewState), r[s++] = n ? i.CursorState.fromModelState(o.MoveOperations.translateUp(e.config, e.model, u.modelState)) : i.CursorState.fromViewState(o.MoveOperations.translateUp(e.config, e.viewModel, u.viewState))
  28312. }
  28313. return r
  28314. }, e.moveToBeginningOfLine = function (e, t, n) {
  28315. for (var i = [], o = 0, r = t.length; o < r; o++) {
  28316. var s = t[o];
  28317. i[o] = this._moveToLineStart(e, s, n)
  28318. }
  28319. return i
  28320. }, e._moveToLineStart = function (e, t, n) {
  28321. var i = t.viewState.position.column, o = i === t.modelState.position.column,
  28322. r = t.viewState.position.lineNumber, s = e.viewModel.getLineFirstNonWhitespaceColumn(r);
  28323. return o || i === s ? this._moveToLineStartByModel(e, t, n) : this._moveToLineStartByView(e, t, n)
  28324. }, e._moveToLineStartByView = function (e, t, n) {
  28325. return i.CursorState.fromViewState(o.MoveOperations.moveToBeginningOfLine(e.config, e.viewModel, t.viewState, n))
  28326. }, e._moveToLineStartByModel = function (e, t, n) {
  28327. return i.CursorState.fromModelState(o.MoveOperations.moveToBeginningOfLine(e.config, e.model, t.modelState, n))
  28328. }, e.moveToEndOfLine = function (e, t, n) {
  28329. for (var i = [], o = 0, r = t.length; o < r; o++) {
  28330. var s = t[o];
  28331. i[o] = this._moveToLineEnd(e, s, n)
  28332. }
  28333. return i
  28334. }, e._moveToLineEnd = function (e, t, n) {
  28335. var i = t.viewState.position, o = e.viewModel.getLineMaxColumn(i.lineNumber), r = i.column === o,
  28336. s = t.modelState.position, a = e.model.getLineMaxColumn(s.lineNumber),
  28337. l = o - i.column == a - s.column;
  28338. return r || l ? this._moveToLineEndByModel(e, t, n) : this._moveToLineEndByView(e, t, n)
  28339. }, e._moveToLineEndByView = function (e, t, n) {
  28340. return i.CursorState.fromViewState(o.MoveOperations.moveToEndOfLine(e.config, e.viewModel, t.viewState, n))
  28341. }, e._moveToLineEndByModel = function (e, t, n) {
  28342. return i.CursorState.fromModelState(o.MoveOperations.moveToEndOfLine(e.config, e.model, t.modelState, n))
  28343. }, e.expandLineSelection = function (e, t) {
  28344. for (var n = [], o = 0, r = t.length; o < r; o++) {
  28345. var l = t[o], u = l.modelState.selection.startLineNumber, d = e.model.getLineCount(),
  28346. c = l.modelState.selection.endLineNumber, h = void 0;
  28347. c === d ? h = e.model.getLineMaxColumn(d) : (c++, h = 1), n[o] = i.CursorState.fromModelState(new i.SingleCursorState(new a.Range(u, 1, u, 1), 0, new s.Position(c, h), 0))
  28348. }
  28349. return n
  28350. }, e.moveToBeginningOfBuffer = function (e, t, n) {
  28351. for (var r = [], s = 0, a = t.length; s < a; s++) {
  28352. var l = t[s];
  28353. r[s] = i.CursorState.fromModelState(o.MoveOperations.moveToBeginningOfBuffer(e.config, e.model, l.modelState, n))
  28354. }
  28355. return r
  28356. }, e.moveToEndOfBuffer = function (e, t, n) {
  28357. for (var r = [], s = 0, a = t.length; s < a; s++) {
  28358. var l = t[s];
  28359. r[s] = i.CursorState.fromModelState(o.MoveOperations.moveToEndOfBuffer(e.config, e.model, l.modelState, n))
  28360. }
  28361. return r
  28362. }, e.selectAll = function (e, t) {
  28363. var n = e.model.getLineCount(), o = e.model.getLineMaxColumn(n);
  28364. return i.CursorState.fromModelState(new i.SingleCursorState(new a.Range(1, 1, 1, 1), 0, new s.Position(n, o), 0))
  28365. }, e.line = function (e, t, n, o, r) {
  28366. var l = e.model.validatePosition(o),
  28367. u = r ? e.validateViewPosition(new s.Position(r.lineNumber, r.column), l) : e.convertModelPositionToViewPosition(l);
  28368. if (!n || !t.modelState.hasSelection()) {
  28369. var d = e.model.getLineCount(), c = l.lineNumber + 1, h = 1;
  28370. return c > d && (c = d, h = e.model.getLineMaxColumn(c)), i.CursorState.fromModelState(new i.SingleCursorState(new a.Range(l.lineNumber, 1, c, h), 0, new s.Position(c, h), 0))
  28371. }
  28372. var p = t.modelState.selectionStart.getStartPosition().lineNumber;
  28373. if (l.lineNumber < p) return i.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(), u.lineNumber, 1, 0));
  28374. if (l.lineNumber > p) {
  28375. d = e.viewModel.getLineCount();
  28376. var g = u.lineNumber + 1, f = 1;
  28377. return g > d && (g = d, f = e.viewModel.getLineMaxColumn(g)), i.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(), g, f, 0))
  28378. }
  28379. var m = t.modelState.selectionStart.getEndPosition();
  28380. return i.CursorState.fromModelState(t.modelState.move(t.modelState.hasSelection(), m.lineNumber, m.column, 0))
  28381. }, e.word = function (e, t, n, o) {
  28382. var s = e.model.validatePosition(o)
  28383. ;
  28384. return i.CursorState.fromModelState(r.WordOperations.word(e.config, e.model, t.modelState, n, s))
  28385. }, e.cancelSelection = function (e, t) {
  28386. if (!t.modelState.hasSelection()) return new i.CursorState(t.modelState, t.viewState);
  28387. var n = t.viewState.position.lineNumber, o = t.viewState.position.column;
  28388. return i.CursorState.fromViewState(new i.SingleCursorState(new a.Range(n, o, n, o), 0, new s.Position(n, o), 0))
  28389. }, e.moveTo = function (e, t, n, o, r) {
  28390. var a = e.model.validatePosition(o),
  28391. l = r ? e.validateViewPosition(new s.Position(r.lineNumber, r.column), a) : e.convertModelPositionToViewPosition(a);
  28392. return i.CursorState.fromViewState(t.viewState.move(n, l.lineNumber, l.column, 0))
  28393. }, e.move = function (e, t, n) {
  28394. var i = n.select, o = n.value;
  28395. switch (n.direction) {
  28396. case 0:
  28397. return 4 === n.unit ? this._moveHalfLineLeft(e, t, i) : this._moveLeft(e, t, i, o);
  28398. case 1:
  28399. return 4 === n.unit ? this._moveHalfLineRight(e, t, i) : this._moveRight(e, t, i, o);
  28400. case 2:
  28401. return 2 === n.unit ? this._moveUpByViewLines(e, t, i, o) : this._moveUpByModelLines(e, t, i, o);
  28402. case 3:
  28403. return 2 === n.unit ? this._moveDownByViewLines(e, t, i, o) : this._moveDownByModelLines(e, t, i, o);
  28404. case 4:
  28405. return this._moveToViewMinColumn(e, t, i);
  28406. case 5:
  28407. return this._moveToViewFirstNonWhitespaceColumn(e, t, i);
  28408. case 6:
  28409. return this._moveToViewCenterColumn(e, t, i);
  28410. case 7:
  28411. return this._moveToViewMaxColumn(e, t, i);
  28412. case 8:
  28413. return this._moveToViewLastNonWhitespaceColumn(e, t, i);
  28414. case 9:
  28415. var r = t[0], s = e.getCompletelyVisibleModelRange(),
  28416. a = this._firstLineNumberInRange(e.model, s, o),
  28417. l = e.model.getLineFirstNonWhitespaceColumn(a);
  28418. return [this._moveToModelPosition(e, r, i, a, l)];
  28419. case 11:
  28420. r = t[0], s = e.getCompletelyVisibleModelRange(), a = this._lastLineNumberInRange(e.model, s, o), l = e.model.getLineFirstNonWhitespaceColumn(a);
  28421. return [this._moveToModelPosition(e, r, i, a, l)];
  28422. case 10:
  28423. r = t[0], s = e.getCompletelyVisibleModelRange(), a = Math.round((s.startLineNumber + s.endLineNumber) / 2), l = e.model.getLineFirstNonWhitespaceColumn(a);
  28424. return [this._moveToModelPosition(e, r, i, a, l)];
  28425. case 12:
  28426. for (var u = e.getCompletelyVisibleViewRange(), d = [], c = 0, h = t.length; c < h; c++) {
  28427. r = t[c]
  28428. ;d[c] = this.findPositionInViewportIfOutside(e, r, u, i)
  28429. }
  28430. return d
  28431. }
  28432. return null
  28433. }, e.findPositionInViewportIfOutside = function (e, t, n, o) {
  28434. var r = t.viewState.position.lineNumber;
  28435. if (n.startLineNumber <= r && r <= n.endLineNumber - 1) return new i.CursorState(t.modelState, t.viewState);
  28436. r > n.endLineNumber - 1 && (r = n.endLineNumber - 1), r < n.startLineNumber && (r = n.startLineNumber);
  28437. var s = e.viewModel.getLineFirstNonWhitespaceColumn(r);
  28438. return this._moveToViewPosition(e, t, o, r, s)
  28439. }, e._firstLineNumberInRange = function (e, t, n) {
  28440. var i = t.startLineNumber;
  28441. return t.startColumn !== e.getLineMinColumn(i) && i++, Math.min(t.endLineNumber, i + n - 1)
  28442. }, e._lastLineNumberInRange = function (e, t, n) {
  28443. var i = t.startLineNumber;
  28444. return t.startColumn !== e.getLineMinColumn(i) && i++, Math.max(i, t.endLineNumber - n + 1)
  28445. }, e._moveLeft = function (e, t, n, r) {
  28446. for (var s = [], a = 0, l = t.length; a < l; a++) {
  28447. var u = t[a], d = o.MoveOperations.moveLeft(e.config, e.viewModel, u.viewState, n, r)
  28448. ;
  28449. if (1 === r && d.position.lineNumber !== u.viewState.position.lineNumber) e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(d.position).lineNumber === u.modelState.position.lineNumber && (d = o.MoveOperations.moveLeft(e.config, e.viewModel, d, n, 1));
  28450. s[a] = i.CursorState.fromViewState(d)
  28451. }
  28452. return s
  28453. }, e._moveHalfLineLeft = function (e, t, n) {
  28454. for (var r = [], s = 0, a = t.length; s < a; s++) {
  28455. var l = t[s], u = l.viewState.position.lineNumber,
  28456. d = Math.round(e.viewModel.getLineContent(u).length / 2);
  28457. r[s] = i.CursorState.fromViewState(o.MoveOperations.moveLeft(e.config, e.viewModel, l.viewState, n, d))
  28458. }
  28459. return r
  28460. }, e._moveRight = function (e, t, n, r) {
  28461. for (var s = [], a = 0, l = t.length; a < l; a++) {
  28462. var u = t[a], d = o.MoveOperations.moveRight(e.config, e.viewModel, u.viewState, n, r);
  28463. if (1 === r && d.position.lineNumber !== u.viewState.position.lineNumber) e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(d.position).lineNumber === u.modelState.position.lineNumber && (d = o.MoveOperations.moveRight(e.config, e.viewModel, d, n, 1));
  28464. s[a] = i.CursorState.fromViewState(d)
  28465. }
  28466. return s
  28467. },
  28468. e._moveHalfLineRight = function (e, t, n) {
  28469. for (var r = [], s = 0, a = t.length; s < a; s++) {
  28470. var l = t[s], u = l.viewState.position.lineNumber,
  28471. d = Math.round(e.viewModel.getLineContent(u).length / 2);
  28472. r[s] = i.CursorState.fromViewState(o.MoveOperations.moveRight(e.config, e.viewModel, l.viewState, n, d))
  28473. }
  28474. return r
  28475. }, e._moveDownByViewLines = function (e, t, n, r) {
  28476. for (var s = [], a = 0, l = t.length; a < l; a++) {
  28477. var u = t[a];
  28478. s[a] = i.CursorState.fromViewState(o.MoveOperations.moveDown(e.config, e.viewModel, u.viewState, n, r))
  28479. }
  28480. return s
  28481. }, e._moveDownByModelLines = function (e, t, n, r) {
  28482. for (var s = [], a = 0, l = t.length; a < l; a++) {
  28483. var u = t[a];
  28484. s[a] = i.CursorState.fromModelState(o.MoveOperations.moveDown(e.config, e.model, u.modelState, n, r))
  28485. }
  28486. return s
  28487. }, e._moveUpByViewLines = function (e, t, n, r) {
  28488. for (var s = [], a = 0, l = t.length; a < l; a++) {
  28489. var u = t[a];
  28490. s[a] = i.CursorState.fromViewState(o.MoveOperations.moveUp(e.config, e.viewModel, u.viewState, n, r))
  28491. }
  28492. return s
  28493. }, e._moveUpByModelLines = function (e, t, n, r) {
  28494. for (var s = [], a = 0, l = t.length; a < l; a++) {
  28495. var u = t[a]
  28496. ;s[a] = i.CursorState.fromModelState(o.MoveOperations.moveUp(e.config, e.model, u.modelState, n, r))
  28497. }
  28498. return s
  28499. }, e._moveToViewPosition = function (e, t, n, o, r) {
  28500. return i.CursorState.fromViewState(t.viewState.move(n, o, r, 0))
  28501. }, e._moveToModelPosition = function (e, t, n, o, r) {
  28502. return i.CursorState.fromModelState(t.modelState.move(n, o, r, 0))
  28503. }, e._moveToViewMinColumn = function (e, t, n) {
  28504. for (var i = [], o = 0, r = t.length; o < r; o++) {
  28505. var s = t[o], a = s.viewState.position.lineNumber, l = e.viewModel.getLineMinColumn(a);
  28506. i[o] = this._moveToViewPosition(e, s, n, a, l)
  28507. }
  28508. return i
  28509. }, e._moveToViewFirstNonWhitespaceColumn = function (e, t, n) {
  28510. for (var i = [], o = 0, r = t.length; o < r; o++) {
  28511. var s = t[o], a = s.viewState.position.lineNumber,
  28512. l = e.viewModel.getLineFirstNonWhitespaceColumn(a);
  28513. i[o] = this._moveToViewPosition(e, s, n, a, l)
  28514. }
  28515. return i
  28516. }, e._moveToViewCenterColumn = function (e, t, n) {
  28517. for (var i = [], o = 0, r = t.length; o < r; o++) {
  28518. var s = t[o], a = s.viewState.position.lineNumber,
  28519. l = Math.round((e.viewModel.getLineMaxColumn(a) + e.viewModel.getLineMinColumn(a)) / 2);
  28520. i[o] = this._moveToViewPosition(e, s, n, a, l)
  28521. }
  28522. return i
  28523. },
  28524. e._moveToViewMaxColumn = function (e, t, n) {
  28525. for (var i = [], o = 0, r = t.length; o < r; o++) {
  28526. var s = t[o], a = s.viewState.position.lineNumber, l = e.viewModel.getLineMaxColumn(a);
  28527. i[o] = this._moveToViewPosition(e, s, n, a, l)
  28528. }
  28529. return i
  28530. }, e._moveToViewLastNonWhitespaceColumn = function (e, t, n) {
  28531. for (var i = [], o = 0, r = t.length; o < r; o++) {
  28532. var s = t[o], a = s.viewState.position.lineNumber,
  28533. l = e.viewModel.getLineLastNonWhitespaceColumn(a);
  28534. i[o] = this._moveToViewPosition(e, s, n, a, l)
  28535. }
  28536. return i
  28537. }, e
  28538. }();
  28539. t.CursorMoveCommands = l, function (e) {
  28540. e.description = {
  28541. description: "Move cursor to a logical position in the view", args: [{
  28542. name: "Cursor move argument object",
  28543. description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down'\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",
  28544. constraint: function (e) {
  28545. if (!n.isObject(e)) return !1;
  28546. var t = e
  28547. ;
  28548. return !!n.isString(t.to) && (!(!n.isUndefined(t.select) && !n.isBoolean(t.select)) && (!(!n.isUndefined(t.by) && !n.isString(t.by)) && !(!n.isUndefined(t.value) && !n.isNumber(t.value))))
  28549. },
  28550. schema: {
  28551. type: "object",
  28552. required: ["to"],
  28553. properties: {
  28554. to: {
  28555. type: "string",
  28556. enum: ["left", "right", "up", "down", "wrappedLineStart", "wrappedLineEnd", "wrappedLineColumnCenter", "wrappedLineFirstNonWhitespaceCharacter", "wrappedLineLastNonWhitespaceCharacter", "viewPortTop", "viewPortCenter", "viewPortBottom", "viewPortIfOutside"]
  28557. },
  28558. by: {type: "string", enum: ["line", "wrappedLine", "character", "halfLine"]},
  28559. value: {type: "number", default: 1},
  28560. select: {type: "boolean", default: !1}
  28561. }
  28562. }
  28563. }]
  28564. }, e.RawDirection = {
  28565. Left: "left",
  28566. Right: "right",
  28567. Up: "up",
  28568. Down: "down",
  28569. WrappedLineStart: "wrappedLineStart",
  28570. WrappedLineFirstNonWhitespaceCharacter: "wrappedLineFirstNonWhitespaceCharacter",
  28571. WrappedLineColumnCenter: "wrappedLineColumnCenter",
  28572. WrappedLineEnd: "wrappedLineEnd",
  28573. WrappedLineLastNonWhitespaceCharacter: "wrappedLineLastNonWhitespaceCharacter",
  28574. ViewPortTop: "viewPortTop",
  28575. ViewPortCenter: "viewPortCenter",
  28576. ViewPortBottom: "viewPortBottom",
  28577. ViewPortIfOutside: "viewPortIfOutside"
  28578. }, e.RawUnit = {
  28579. Line: "line",
  28580. WrappedLine: "wrappedLine",
  28581. Character: "character",
  28582. HalfLine: "halfLine"
  28583. }, e.parse = function (t) {
  28584. if (!t.to) return null;
  28585. var n;
  28586. switch (t.to) {
  28587. case e.RawDirection.Left:
  28588. n = 0;
  28589. break;
  28590. case e.RawDirection.Right:
  28591. n = 1;
  28592. break;
  28593. case e.RawDirection.Up:
  28594. n = 2;
  28595. break;
  28596. case e.RawDirection.Down:
  28597. n = 3;
  28598. break;
  28599. case e.RawDirection.WrappedLineStart:
  28600. n = 4;
  28601. break;
  28602. case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:
  28603. n = 5;
  28604. break;
  28605. case e.RawDirection.WrappedLineColumnCenter:
  28606. n = 6;
  28607. break;
  28608. case e.RawDirection.WrappedLineEnd:
  28609. n = 7;
  28610. break;
  28611. case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:
  28612. n = 8;
  28613. break;
  28614. case e.RawDirection.ViewPortTop:
  28615. n = 9;
  28616. break;
  28617. case e.RawDirection.ViewPortBottom:
  28618. n = 11;
  28619. break;
  28620. case e.RawDirection.ViewPortCenter:
  28621. n = 10;
  28622. break;
  28623. case e.RawDirection.ViewPortIfOutside:
  28624. n = 12;
  28625. break;
  28626. default:
  28627. return null
  28628. }
  28629. var i = 0;
  28630. switch (t.by) {
  28631. case e.RawUnit.Line:
  28632. i = 1;
  28633. break;
  28634. case e.RawUnit.WrappedLine:
  28635. i = 2;
  28636. break;
  28637. case e.RawUnit.Character:
  28638. i = 3;
  28639. break
  28640. ;
  28641. case e.RawUnit.HalfLine:
  28642. i = 4
  28643. }
  28644. return {direction: n, unit: i, select: !!t.select, value: t.value || 1}
  28645. }
  28646. }(t.CursorMove || (t.CursorMove = {}))
  28647. })),define(n[484], i([0, 1, 40, 13, 3, 22]), (function (e, t, n, i, o, r) {
  28648. "use strict";
  28649. Object.defineProperty(t, "__esModule", {value: !0});
  28650. var s = function () {
  28651. function e(e) {
  28652. this._selTrackedRange = null, this._trackSelection = !0, this._setState(e, new n.SingleCursorState(new o.Range(1, 1, 1, 1), 0, new i.Position(1, 1), 0), new n.SingleCursorState(new o.Range(1, 1, 1, 1), 0, new i.Position(1, 1), 0))
  28653. }
  28654. return e.prototype.dispose = function (e) {
  28655. this._removeTrackedRange(e)
  28656. }, e.prototype.startTrackingSelection = function (e) {
  28657. this._trackSelection = !0, this._updateTrackedRange(e)
  28658. }, e.prototype.stopTrackingSelection = function (e) {
  28659. this._trackSelection = !1, this._removeTrackedRange(e)
  28660. }, e.prototype._updateTrackedRange = function (e) {
  28661. this._trackSelection && (this._selTrackedRange = e.model._setTrackedRange(this._selTrackedRange, this.modelState.selection, 0))
  28662. }, e.prototype._removeTrackedRange = function (e) {
  28663. this._selTrackedRange = e.model._setTrackedRange(this._selTrackedRange, null, 0)
  28664. }, e.prototype.asCursorState = function () {
  28665. return new n.CursorState(this.modelState, this.viewState)
  28666. }, e.prototype.readSelectionFromMarkers = function (e) {
  28667. var t = e.model._getTrackedRange(this._selTrackedRange);
  28668. return 0 === this.modelState.selection.getDirection() ? new r.Selection(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : new r.Selection(t.endLineNumber, t.endColumn, t.startLineNumber, t.startColumn)
  28669. }, e.prototype.ensureValidState = function (e) {
  28670. this._setState(e, this.modelState, this.viewState)
  28671. }, e.prototype.setState = function (e, t, n) {
  28672. this._setState(e, t, n)
  28673. }, e.prototype._setState = function (e, t, r) {
  28674. if (t) {
  28675. l = e.model.validateRange(t.selectionStart);
  28676. var s = t.selectionStart.equalsRange(l) ? t.selectionStartLeftoverVisibleColumns : 0,
  28677. a = (u = e.model.validatePosition(t.position), t.position.equals(u) ? t.leftoverVisibleColumns : 0);
  28678. t = new n.SingleCursorState(l, s, u, a)
  28679. } else {
  28680. if (!r) return
  28681. ;
  28682. var l = e.model.validateRange(e.convertViewRangeToModelRange(r.selectionStart)),
  28683. u = e.model.validatePosition(e.convertViewPositionToModelPosition(r.position.lineNumber, r.position.column));
  28684. t = new n.SingleCursorState(l, r.selectionStartLeftoverVisibleColumns, u, r.leftoverVisibleColumns)
  28685. }
  28686. if (r) {
  28687. h = e.validateViewRange(r.selectionStart, t.selectionStart), p = e.validateViewPosition(r.position, t.position);
  28688. r = new n.SingleCursorState(h, t.selectionStartLeftoverVisibleColumns, p, t.leftoverVisibleColumns)
  28689. } else {
  28690. var d = e.convertModelPositionToViewPosition(new i.Position(t.selectionStart.startLineNumber, t.selectionStart.startColumn)),
  28691. c = e.convertModelPositionToViewPosition(new i.Position(t.selectionStart.endLineNumber, t.selectionStart.endColumn)),
  28692. h = new o.Range(d.lineNumber, d.column, c.lineNumber, c.column),
  28693. p = e.convertModelPositionToViewPosition(t.position);
  28694. r = new n.SingleCursorState(h, t.selectionStartLeftoverVisibleColumns, p, t.leftoverVisibleColumns)
  28695. }
  28696. this.modelState = t, this.viewState = r, this._updateTrackedRange(e)
  28697. }, e
  28698. }();
  28699. t.OneCursor = s
  28700. })),
  28701. define(n[485], i([0, 1, 40, 484, 22]), (function (e, t, n, i, o) {
  28702. "use strict";
  28703. Object.defineProperty(t, "__esModule", {value: !0});
  28704. var r = function () {
  28705. function e(e) {
  28706. this.context = e, this.primaryCursor = new i.OneCursor(e), this.secondaryCursors = [], this.lastAddedCursorIndex = 0
  28707. }
  28708. return e.prototype.dispose = function () {
  28709. this.primaryCursor.dispose(this.context), this.killSecondaryCursors()
  28710. }, e.prototype.startTrackingSelections = function () {
  28711. this.primaryCursor.startTrackingSelection(this.context);
  28712. for (var e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[e].startTrackingSelection(this.context)
  28713. }, e.prototype.stopTrackingSelections = function () {
  28714. this.primaryCursor.stopTrackingSelection(this.context);
  28715. for (var e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[e].stopTrackingSelection(this.context)
  28716. }, e.prototype.updateContext = function (e) {
  28717. this.context = e
  28718. }, e.prototype.ensureValidState = function () {
  28719. this.primaryCursor.ensureValidState(this.context)
  28720. ;
  28721. for (var e = 0, t = this.secondaryCursors.length; e < t; e++) this.secondaryCursors[e].ensureValidState(this.context)
  28722. }, e.prototype.readSelectionFromMarkers = function () {
  28723. var e = [];
  28724. e[0] = this.primaryCursor.readSelectionFromMarkers(this.context);
  28725. for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].readSelectionFromMarkers(this.context);
  28726. return e
  28727. }, e.prototype.getAll = function () {
  28728. var e = [];
  28729. e[0] = this.primaryCursor.asCursorState();
  28730. for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].asCursorState();
  28731. return e
  28732. }, e.prototype.getViewPositions = function () {
  28733. var e = [];
  28734. e[0] = this.primaryCursor.viewState.position;
  28735. for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].viewState.position;
  28736. return e
  28737. }, e.prototype.getSelections = function () {
  28738. var e = [];
  28739. e[0] = this.primaryCursor.modelState.selection;
  28740. for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].modelState.selection;
  28741. return e
  28742. }, e.prototype.getViewSelections = function () {
  28743. var e = []
  28744. ;e[0] = this.primaryCursor.viewState.selection;
  28745. for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t].viewState.selection;
  28746. return e
  28747. }, e.prototype.setSelections = function (e) {
  28748. this.setStates(n.CursorState.fromModelSelections(e))
  28749. }, e.prototype.getPrimaryCursor = function () {
  28750. return this.primaryCursor.asCursorState()
  28751. }, e.prototype.setStates = function (e) {
  28752. null !== e && (this.primaryCursor.setState(this.context, e[0].modelState, e[0].viewState), this._setSecondaryStates(e.slice(1)))
  28753. }, e.prototype._setSecondaryStates = function (e) {
  28754. var t = this.secondaryCursors.length, n = e.length;
  28755. if (t < n) for (var i = n - t, o = 0; o < i; o++) this._addSecondaryCursor(); else if (t > n) {
  28756. var r = t - n;
  28757. for (o = 0; o < r; o++) this._removeSecondaryCursor(this.secondaryCursors.length - 1)
  28758. }
  28759. for (o = 0; o < n; o++) this.secondaryCursors[o].setState(this.context, e[o].modelState, e[o].viewState)
  28760. }, e.prototype.killSecondaryCursors = function () {
  28761. this._setSecondaryStates([])
  28762. }, e.prototype._addSecondaryCursor = function () {
  28763. this.secondaryCursors.push(new i.OneCursor(this.context)),
  28764. this.lastAddedCursorIndex = this.secondaryCursors.length
  28765. }, e.prototype.getLastAddedCursorIndex = function () {
  28766. return 0 === this.secondaryCursors.length || 0 === this.lastAddedCursorIndex ? 0 : this.lastAddedCursorIndex
  28767. }, e.prototype._removeSecondaryCursor = function (e) {
  28768. this.lastAddedCursorIndex >= e + 1 && this.lastAddedCursorIndex--, this.secondaryCursors[e].dispose(this.context), this.secondaryCursors.splice(e, 1)
  28769. }, e.prototype._getAll = function () {
  28770. var e = [];
  28771. e[0] = this.primaryCursor;
  28772. for (var t = 0, n = this.secondaryCursors.length; t < n; t++) e[t + 1] = this.secondaryCursors[t];
  28773. return e
  28774. }, e.prototype.normalize = function () {
  28775. if (0 !== this.secondaryCursors.length) {
  28776. for (var e = this._getAll(), t = [], i = 0, r = e.length; i < r; i++) t.push({
  28777. index: i,
  28778. selection: e[i].modelState.selection
  28779. });
  28780. t.sort((function (e, t) {
  28781. return e.selection.startLineNumber === t.selection.startLineNumber ? e.selection.startColumn - t.selection.startColumn : e.selection.startLineNumber - t.selection.startLineNumber
  28782. }));
  28783. for (var s = 0; s < t.length - 1; s++) {
  28784. var a = t[s], l = t[s + 1], u = a.selection, d = l.selection
  28785. ;
  28786. if (this.context.config.multiCursorMergeOverlapping) {
  28787. if (d.isEmpty() || u.isEmpty() ? d.getStartPosition().isBeforeOrEqual(u.getEndPosition()) : d.getStartPosition().isBefore(u.getEndPosition())) {
  28788. var c = a.index < l.index ? s : s + 1, h = a.index < l.index ? s + 1 : s,
  28789. p = t[h].index, g = t[c].index, f = t[h].selection, m = t[c].selection;
  28790. if (!f.equalsSelection(m)) {
  28791. var v = f.plusRange(m),
  28792. _ = f.selectionStartLineNumber === f.startLineNumber && f.selectionStartColumn === f.startColumn,
  28793. y = m.selectionStartLineNumber === m.startLineNumber && m.selectionStartColumn === m.startColumn,
  28794. C = void 0;
  28795. p === this.lastAddedCursorIndex ? (C = _, this.lastAddedCursorIndex = g) : C = y;
  28796. var b = void 0;
  28797. b = C ? new o.Selection(v.startLineNumber, v.startColumn, v.endLineNumber, v.endColumn) : new o.Selection(v.endLineNumber, v.endColumn, v.startLineNumber, v.startColumn), t[c].selection = b;
  28798. var S = n.CursorState.fromModelSelection(b);
  28799. e[g].setState(this.context, S.modelState, S.viewState)
  28800. }
  28801. for (var w = 0, E = t; w < E.length; w++) {
  28802. var L = E[w];
  28803. L.index > p && L.index--
  28804. }
  28805. e.splice(p, 1), t.splice(h, 1), this._removeSecondaryCursor(p - 1), s--
  28806. }
  28807. }
  28808. }
  28809. }
  28810. }, e
  28811. }()
  28812. ;t.CursorCollection = r
  28813. })),define(n[486], i([0, 1, 10, 4, 5, 485, 40, 212, 159, 3, 22, 68, 81, 2]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g) {
  28814. "use strict";
  28815. Object.defineProperty(t, "__esModule", {value: !0});
  28816. var f = function (e, t, n, i, o, r) {
  28817. this.selections = e, this.modelVersionId = t, this.oldSelections = n, this.oldModelVersionId = i, this.source = o, this.reason = r
  28818. };
  28819. t.CursorStateChangedEvent = f;
  28820. var m = function () {
  28821. function e(e, t) {
  28822. this.modelVersionId = e.getVersionId(), this.cursorState = t.getAll()
  28823. }
  28824. return e.prototype.equals = function (e) {
  28825. if (!e) return !1;
  28826. if (this.modelVersionId !== e.modelVersionId) return !1;
  28827. if (this.cursorState.length !== e.cursorState.length) return !1;
  28828. for (var t = 0, n = this.cursorState.length; t < n; t++) if (!this.cursorState[t].equals(e.cursorState[t])) return !1;
  28829. return !0
  28830. }, e
  28831. }();
  28832. t.CursorModelState = m;
  28833. var v = function () {
  28834. function e(e, t, n) {
  28835. this._model = e, this._autoClosedCharactersDecorations = t, this._autoClosedEnclosingDecorations = n
  28836. }
  28837. return e.getAllAutoClosedCharacters = function (e) {
  28838. for (var t = [], n = 0, i = e; n < i.length; n++) {
  28839. var o = i[n]
  28840. ;t = t.concat(o.getAutoClosedCharactersRanges())
  28841. }
  28842. return t
  28843. }, e.prototype.dispose = function () {
  28844. this._autoClosedCharactersDecorations = this._model.deltaDecorations(this._autoClosedCharactersDecorations, []), this._autoClosedEnclosingDecorations = this._model.deltaDecorations(this._autoClosedEnclosingDecorations, [])
  28845. }, e.prototype.getAutoClosedCharactersRanges = function () {
  28846. for (var e = [], t = 0; t < this._autoClosedCharactersDecorations.length; t++) {
  28847. var n = this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);
  28848. n && e.push(n)
  28849. }
  28850. return e
  28851. }, e.prototype.isValid = function (e) {
  28852. for (var t = [], n = 0; n < this._autoClosedEnclosingDecorations.length; n++) {
  28853. var i = this._model.getDecorationRange(this._autoClosedEnclosingDecorations[n]);
  28854. if (i && (t.push(i), i.startLineNumber !== i.endLineNumber)) return !1
  28855. }
  28856. t.sort(d.Range.compareRangesUsingStarts), e.sort(d.Range.compareRangesUsingStarts);
  28857. for (n = 0; n < e.length; n++) {
  28858. if (n >= t.length) return !1;
  28859. if (!t[n].strictContainsRange(e[n])) return !1
  28860. }
  28861. return !0
  28862. }, e
  28863. }(), _ = function (e) {
  28864. function t(t, n, o) {
  28865. var r = e.call(this) || this
  28866. ;r._onDidReachMaxCursorCount = r._register(new i.Emitter), r.onDidReachMaxCursorCount = r._onDidReachMaxCursorCount.event, r._onDidAttemptReadOnlyEdit = r._register(new i.Emitter), r.onDidAttemptReadOnlyEdit = r._onDidAttemptReadOnlyEdit.event, r._onDidChange = r._register(new i.Emitter), r.onDidChange = r._onDidChange.event, r._configuration = t, r._model = n, r._knownModelVersionId = r._model.getVersionId(), r._viewModel = o, r.context = new a.CursorContext(r._configuration, r._model, r._viewModel), r._cursors = new s.CursorCollection(r.context), r._isHandling = !1, r._isDoingComposition = !1, r._selectionsWhenCompositionStarted = null, r._columnSelectData = null, r._autoClosedActions = [], r._prevEditOperationType = 0, r._register(r._model.onDidChangeRawContent((function (e) {
  28867. if (r._knownModelVersionId = e.versionId, !r._isHandling) {
  28868. var t = e.containsEvent(1);
  28869. r._onModelContentChanged(t)
  28870. }
  28871. }))), r._register(o.addEventListener((function (e) {
  28872. (function (e) {
  28873. for (var t = 0, n = e.length; t < n; t++) if (8 === e[t].type) return !0;
  28874. return !1
  28875. })(e) && r._knownModelVersionId === r._model.getVersionId() && r.setStates("viewModel", 0, r.getAll())
  28876. })));
  28877. var l = function () {
  28878. r.context = new a.CursorContext(r._configuration, r._model, r._viewModel), r._cursors.updateContext(r.context)
  28879. };
  28880. return r._register(r._model.onDidChangeLanguage((function (e) {
  28881. l()
  28882. }))), r._register(r._model.onDidChangeLanguageConfiguration((function () {
  28883. l()
  28884. }))), r._register(r._model.onDidChangeOptions((function () {
  28885. l()
  28886. }))), r._register(r._configuration.onDidChange((function (e) {
  28887. a.CursorConfiguration.shouldRecreate(e) && l()
  28888. }))), r
  28889. }
  28890. return r(t, e), t.prototype.dispose = function () {
  28891. this._cursors.dispose(), this._autoClosedActions = g.dispose(this._autoClosedActions), e.prototype.dispose.call(this)
  28892. }, t.prototype._validateAutoClosedActions = function () {
  28893. if (this._autoClosedActions.length > 0) for (var e = this._cursors.getSelections(), t = 0; t < this._autoClosedActions.length; t++) {
  28894. var n = this._autoClosedActions[t];
  28895. n.isValid(e) || (n.dispose(), this._autoClosedActions.splice(t, 1), t--)
  28896. }
  28897. }, t.prototype.getPrimaryCursor = function () {
  28898. return this._cursors.getPrimaryCursor()
  28899. }, t.prototype.getLastAddedCursorIndex = function () {
  28900. return this._cursors.getLastAddedCursorIndex()
  28901. }, t.prototype.getAll = function () {
  28902. return this._cursors.getAll()
  28903. }, t.prototype.setStates = function (e, n, i) {
  28904. null !== i && i.length > t.MAX_CURSOR_COUNT && (i = i.slice(0, t.MAX_CURSOR_COUNT), this._onDidReachMaxCursorCount.fire(void 0));
  28905. var o = new m(this._model, this);
  28906. this._cursors.setStates(i), this._cursors.normalize(), this._columnSelectData = null, this._validateAutoClosedActions(), this._emitStateChangedIfNecessary(e, n, o)
  28907. }, t.prototype.setColumnSelectData = function (e) {
  28908. this._columnSelectData = e
  28909. }, t.prototype.reveal = function (e, t, n, i) {
  28910. this._revealRange(e, n, 0, t, i)
  28911. }, t.prototype.revealRange = function (e, t, n, i, o) {
  28912. this.emitCursorRevealRange(e, n, i, t, o)
  28913. }, t.prototype.scrollTo = function (e) {
  28914. this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop: e})
  28915. }, t.prototype.saveState = function () {
  28916. for (var e = [], t = this._cursors.getSelections(), n = 0, i = t.length; n < i; n++) {
  28917. var o = t[n];
  28918. e.push({
  28919. inSelectionMode: !o.isEmpty(),
  28920. selectionStart: {lineNumber: o.selectionStartLineNumber, column: o.selectionStartColumn},
  28921. position: {lineNumber: o.positionLineNumber, column: o.positionColumn}
  28922. })
  28923. }
  28924. return e
  28925. }, t.prototype.restoreState = function (e) {
  28926. for (var t = [], n = 0, i = e.length; n < i; n++) {
  28927. var o = e[n], r = 1, s = 1;
  28928. o.position && o.position.lineNumber && (r = o.position.lineNumber), o.position && o.position.column && (s = o.position.column);
  28929. var l = r, u = s;
  28930. o.selectionStart && o.selectionStart.lineNumber && (l = o.selectionStart.lineNumber), o.selectionStart && o.selectionStart.column && (u = o.selectionStart.column), t.push({
  28931. selectionStartLineNumber: l,
  28932. selectionStartColumn: u,
  28933. positionLineNumber: r,
  28934. positionColumn: s
  28935. })
  28936. }
  28937. this.setStates("restoreState", 0, a.CursorState.fromModelSelections(t)), this.reveal("restoreState", !0, 0, 1)
  28938. }, t.prototype._onModelContentChanged = function (e) {
  28939. if (this._prevEditOperationType = 0, e) this._cursors.dispose(), this._cursors = new s.CursorCollection(this.context), this._validateAutoClosedActions(), this._emitStateChangedIfNecessary("model", 1, null); else {
  28940. var t = this._cursors.readSelectionFromMarkers();
  28941. this.setStates("modelChange", 2, a.CursorState.fromModelSelections(t))
  28942. }
  28943. }, t.prototype.getSelection = function () {
  28944. return this._cursors.getPrimaryCursor().modelState.selection
  28945. }, t.prototype.getColumnSelectData = function () {
  28946. if (this._columnSelectData) return this._columnSelectData;
  28947. var e = this._cursors.getPrimaryCursor().viewState.selectionStart.getStartPosition(), t = e.lineNumber,
  28948. n = a.CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, e);
  28949. return {
  28950. isReal: !1,
  28951. fromViewLineNumber: t,
  28952. fromViewVisualColumn: n,
  28953. toViewLineNumber: t,
  28954. toViewVisualColumn: n
  28955. }
  28956. }, t.prototype.getSelections = function () {
  28957. return this._cursors.getSelections()
  28958. }, t.prototype.getViewSelections = function () {
  28959. return this._cursors.getViewSelections()
  28960. }, t.prototype.getPosition = function () {
  28961. return this._cursors.getPrimaryCursor().modelState.position
  28962. }, t.prototype.setSelections = function (e, t) {
  28963. this.setStates(e, 0, a.CursorState.fromModelSelections(t))
  28964. }, t.prototype.getPrevEditOperationType = function () {
  28965. return this._prevEditOperationType
  28966. }, t.prototype.setPrevEditOperationType = function (e) {
  28967. this._prevEditOperationType = e
  28968. }, t.prototype._pushAutoClosedAction = function (e, t) {
  28969. for (var n = [], i = [], o = 0, r = e.length; o < r; o++) n.push({
  28970. range: e[o],
  28971. options: {inlineClassName: "auto-closed-character", stickiness: 1}
  28972. }), i.push({range: t[o], options: {stickiness: 1}});
  28973. var s = this._model.deltaDecorations([], n), a = this._model.deltaDecorations([], i);
  28974. this._autoClosedActions.push(new v(this._model, s, a))
  28975. }, t.prototype._executeEditOperation = function (e) {
  28976. if (e) {
  28977. e.shouldPushStackElementBefore && this._model.pushStackElement();
  28978. var t = y.executeCommands(this._model, this._cursors.getSelections(), e.commands);
  28979. if (t) {
  28980. this._interpretCommandResult(t);
  28981. for (var n = [], i = [], o = 0; o < e.commands.length; o++) {
  28982. var r = e.commands[o];
  28983. r instanceof u.TypeWithAutoClosingCommand && r.enclosingRange && r.closeCharacterRange && (n.push(r.closeCharacterRange), i.push(r.enclosingRange))
  28984. }
  28985. n.length > 0 && this._pushAutoClosedAction(n, i), this._prevEditOperationType = e.type
  28986. }
  28987. e.shouldPushStackElementAfter && this._model.pushStackElement()
  28988. }
  28989. }, t.prototype._interpretCommandResult = function (e) {
  28990. e && 0 !== e.length || (e = this._cursors.readSelectionFromMarkers()), this._columnSelectData = null, this._cursors.setSelections(e), this._cursors.normalize()
  28991. }, t.prototype._emitStateChangedIfNecessary = function (e, t, n) {
  28992. var i = new m(this._model, this);
  28993. if (i.equals(n)) return !1;
  28994. var o = this._cursors.getSelections(), r = this._cursors.getViewSelections();
  28995. try {
  28996. this._beginEmit().emit(new p.ViewCursorStateChangedEvent(r, o))
  28997. } finally {
  28998. this._endEmit()
  28999. }
  29000. if (!n || n.cursorState.length !== i.cursorState.length || i.cursorState.some((function (e, t) {
  29001. return !e.modelState.equals(n.cursorState[t].modelState)
  29002. }))) {
  29003. var s = n ? n.cursorState.map((function (e) {
  29004. return e.modelState.selection
  29005. })) : null, a = n ? n.modelVersionId : 0;
  29006. this._onDidChange.fire(new f(o, i.modelVersionId, s, a, e || "keyboard", t))
  29007. }
  29008. return !0
  29009. }, t.prototype._revealRange = function (e, t, n, i, o) {
  29010. var r = this._cursors.getViewPositions(), s = r[0]
  29011. ;
  29012. if (1 === t) for (var a = 1; a < r.length; a++) r[a].isBefore(s) && (s = r[a]); else if (2 === t) for (a = 1; a < r.length; a++) s.isBeforeOrEqual(r[a]) && (s = r[a]); else if (r.length > 1) return;
  29013. var l = new d.Range(s.lineNumber, s.column, s.lineNumber, s.column);
  29014. this.emitCursorRevealRange(e, l, n, i, o)
  29015. }, t.prototype.emitCursorRevealRange = function (e, t, n, i, o) {
  29016. try {
  29017. this._beginEmit().emit(new p.ViewRevealRangeRequestEvent(e, t, n, i, o))
  29018. } finally {
  29019. this._endEmit()
  29020. }
  29021. }, t.prototype._findAutoClosingPairs = function (e) {
  29022. if (!e.length) return null;
  29023. for (var t = [], n = 0, i = e.length; n < i; n++) {
  29024. var o = e[n];
  29025. if (!o.text || o.text.indexOf("\n") >= 0) return null;
  29026. var r = o.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);
  29027. if (!r) return null;
  29028. var s = r[1], a = this.context.config.autoClosingPairsClose2.get(s);
  29029. if (!a || 1 !== a.length) return null;
  29030. var l = a[0].open, u = o.text.length - r[2].length - 1, d = o.text.lastIndexOf(l, u - 1);
  29031. if (-1 === d) return null;
  29032. t.push([d, u])
  29033. }
  29034. return t
  29035. }, t.prototype.executeEdits = function (e, t, n) {
  29036. var i = this, o = null;
  29037. "snippet" === e && (o = this._findAutoClosingPairs(t)), o && (t[0]._isTracked = !0)
  29038. ;var r = [], s = [], a = this._model.pushEditOperations(this.getSelections(), t, (function (e) {
  29039. if (o) for (var t = 0, a = o.length; t < a; t++) {
  29040. var l = o[t], u = l[0], c = l[1], h = e[t], p = h.range.startLineNumber,
  29041. g = h.range.startColumn - 1 + u, f = h.range.startColumn - 1 + c;
  29042. r.push(new d.Range(p, f + 1, p, f + 2)), s.push(new d.Range(p, g + 1, p, f + 2))
  29043. }
  29044. var m = n(e);
  29045. return m && (i._isHandling = !0), m
  29046. }));
  29047. a && (this._isHandling = !1, this.setSelections(e, a)), r.length > 0 && this._pushAutoClosedAction(r, s)
  29048. }, t.prototype.trigger = function (e, t, i) {
  29049. var o = h.Handler;
  29050. if (t === o.CompositionStart) return this._isDoingComposition = !0, void (this._selectionsWhenCompositionStarted = this.getSelections().slice(0));
  29051. if (t === o.CompositionEnd && (this._isDoingComposition = !1), this._configuration.options.get(68)) this._onDidAttemptReadOnlyEdit.fire(void 0); else {
  29052. var r = new m(this._model, this), s = 0;
  29053. t !== o.Undo && t !== o.Redo && this._cursors.stopTrackingSelections(), this._cursors.ensureValidState(), this._isHandling = !0;
  29054. try {
  29055. switch (t) {
  29056. case o.Type:
  29057. this._type(e, i.text);
  29058. break;
  29059. case o.ReplacePreviousChar:
  29060. this._replacePreviousChar(i.text, i.replaceCharCnt);
  29061. break;
  29062. case o.Paste:
  29063. s = 4, this._paste(i.text, i.pasteOnNewLine, i.multicursorText || []);
  29064. break;
  29065. case o.Cut:
  29066. this._cut();
  29067. break;
  29068. case o.Undo:
  29069. s = 5, this._interpretCommandResult(this._model.undo());
  29070. break;
  29071. case o.Redo:
  29072. s = 6, this._interpretCommandResult(this._model.redo());
  29073. break;
  29074. case o.ExecuteCommand:
  29075. this._externalExecuteCommand(i);
  29076. break;
  29077. case o.ExecuteCommands:
  29078. this._externalExecuteCommands(i);
  29079. break;
  29080. case o.CompositionEnd:
  29081. this._interpretCompositionEnd(e)
  29082. }
  29083. } catch (e) {
  29084. n.onUnexpectedError(e)
  29085. }
  29086. this._isHandling = !1, t !== o.Undo && t !== o.Redo && this._cursors.startTrackingSelections(), this._validateAutoClosedActions(), this._emitStateChangedIfNecessary(e, s, r) && this._revealRange(e, 0, 0, !0, 0)
  29087. }
  29088. }, t.prototype._interpretCompositionEnd = function (e) {
  29089. if (!this._isDoingComposition && "keyboard" === e) {
  29090. var t = v.getAllAutoClosedCharacters(this._autoClosedActions)
  29091. ;this._executeEditOperation(u.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this._selectionsWhenCompositionStarted, this.getSelections(), t)), this._selectionsWhenCompositionStarted = null
  29092. }
  29093. }, t.prototype._type = function (e, t) {
  29094. if (this._isDoingComposition || "keyboard" !== e) this._executeEditOperation(u.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), t)); else for (var n = t.length, i = 0; i < n;) {
  29095. var r = o.nextCharLength(t, i), s = t.substr(i, r),
  29096. a = v.getAllAutoClosedCharacters(this._autoClosedActions);
  29097. this._executeEditOperation(u.TypeOperations.typeWithInterceptors(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), a, s)), i += r
  29098. }
  29099. }, t.prototype._replacePreviousChar = function (e, t) {
  29100. this._executeEditOperation(u.TypeOperations.replacePreviousChar(this._prevEditOperationType, this.context.config, this.context.model, this.getSelections(), e, t))
  29101. },
  29102. t.prototype._paste = function (e, t, n) {
  29103. this._executeEditOperation(u.TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), e, t, n))
  29104. }, t.prototype._cut = function () {
  29105. this._executeEditOperation(l.DeleteOperations.cut(this.context.config, this.context.model, this.getSelections()))
  29106. }, t.prototype._externalExecuteCommand = function (e) {
  29107. this._cursors.killSecondaryCursors(), this._executeEditOperation(new a.EditOperationResult(0, [e], {
  29108. shouldPushStackElementBefore: !1,
  29109. shouldPushStackElementAfter: !1
  29110. }))
  29111. }, t.prototype._externalExecuteCommands = function (e) {
  29112. this._executeEditOperation(new a.EditOperationResult(0, e, {
  29113. shouldPushStackElementBefore: !1,
  29114. shouldPushStackElementAfter: !1
  29115. }))
  29116. }, t.MAX_CURSOR_COUNT = 1e4, t
  29117. }(p.ViewEventEmitter);
  29118. t.Cursor = _;
  29119. var y = function () {
  29120. function e() {
  29121. }
  29122. return e.executeCommands = function (e, t, n) {
  29123. for (var i = {
  29124. model: e,
  29125. selectionsBefore: t,
  29126. trackedRanges: [],
  29127. trackedRangesDirection: []
  29128. }, o = this._innerExecuteCommands(i, n), r = 0, s = i.trackedRanges.length; r < s; r++) i.model._setTrackedRange(i.trackedRanges[r], null, 0);
  29129. return o
  29130. }, e._innerExecuteCommands = function (e, t) {
  29131. if (this._arrayIsEmpty(t)) return null;
  29132. var n = this._getEditOperations(e, t);
  29133. if (0 === n.operations.length) return null;
  29134. var i = n.operations, o = this._getLoserCursorMap(i);
  29135. if (o.hasOwnProperty("0")) return console.warn("Ignoring commands"), null;
  29136. for (var r = [], s = 0, a = i.length; s < a; s++) o.hasOwnProperty(i[s].identifier.major.toString()) || r.push(i[s]);
  29137. n.hadTrackedEditOperation && r.length > 0 && (r[0]._isTracked = !0);
  29138. var l = e.model.pushEditOperations(e.selectionsBefore, r, (function (n) {
  29139. for (var i = [], o = 0; o < e.selectionsBefore.length; o++) i[o] = [];
  29140. for (var r = 0, s = n; r < s.length; r++) {
  29141. var a = s[r];
  29142. a.identifier && i[a.identifier.major].push(a)
  29143. }
  29144. var l = function (e, t) {
  29145. return e.identifier.minor - t.identifier.minor
  29146. }, u = [], d = function (n) {
  29147. i[n].length > 0 ? (i[n].sort(l), u[n] = t[n].computeCursorState(e.model, {
  29148. getInverseEditOperations: function () {
  29149. return i[n]
  29150. }, getTrackedSelection: function (t) {
  29151. var n = parseInt(t, 10), i = e.model._getTrackedRange(e.trackedRanges[n])
  29152. ;
  29153. return 0 === e.trackedRangesDirection[n] ? new c.Selection(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn) : new c.Selection(i.endLineNumber, i.endColumn, i.startLineNumber, i.startColumn)
  29154. }
  29155. })) : u[n] = e.selectionsBefore[n]
  29156. };
  29157. for (o = 0; o < e.selectionsBefore.length; o++) d(o);
  29158. return u
  29159. }));
  29160. l || (l = e.selectionsBefore);
  29161. var u = [];
  29162. for (var d in o) o.hasOwnProperty(d) && u.push(parseInt(d, 10));
  29163. u.sort((function (e, t) {
  29164. return t - e
  29165. }));
  29166. for (var h = 0, p = u; h < p.length; h++) {
  29167. var g = p[h];
  29168. l.splice(g, 1)
  29169. }
  29170. return l
  29171. }, e._arrayIsEmpty = function (e) {
  29172. for (var t = 0, n = e.length; t < n; t++) if (e[t]) return !1;
  29173. return !0
  29174. }, e._getEditOperations = function (e, t) {
  29175. for (var n = [], i = !1, o = 0, r = t.length; o < r; o++) {
  29176. var s = t[o];
  29177. if (s) {
  29178. var a = this._getEditOperationsFromCommand(e, o, s);
  29179. n = n.concat(a.operations), i = i || a.hadTrackedEditOperation
  29180. }
  29181. }
  29182. return {operations: n, hadTrackedEditOperation: i}
  29183. }, e._getEditOperationsFromCommand = function (e, t, i) {
  29184. var o = [], r = 0, s = function (e, n, s) {
  29185. void 0 === s && (s = !1), e.isEmpty() && "" === n || o.push({
  29186. identifier: {major: t, minor: r++}, range: e, text: n, forceMoveMarkers: s,
  29187. isAutoWhitespaceEdit: i.insertsAutoWhitespace
  29188. })
  29189. }, a = !1, l = {
  29190. addEditOperation: s, addTrackedEditOperation: function (e, t, n) {
  29191. a = !0, s(e, t, n)
  29192. }, trackSelection: function (t, n) {
  29193. var i;
  29194. if (t.isEmpty()) if ("boolean" == typeof n) i = n ? 2 : 3; else {
  29195. var o = e.model.getLineMaxColumn(t.startLineNumber);
  29196. i = t.startColumn === o ? 2 : 3
  29197. } else i = 1;
  29198. var r = e.trackedRanges.length, s = e.model._setTrackedRange(null, t, i);
  29199. return e.trackedRanges[r] = s, e.trackedRangesDirection[r] = t.getDirection(), r.toString()
  29200. }
  29201. };
  29202. try {
  29203. i.getEditOperations(e.model, l)
  29204. } catch (e) {
  29205. return n.onUnexpectedError(e), {operations: [], hadTrackedEditOperation: !1}
  29206. }
  29207. return {operations: o, hadTrackedEditOperation: a}
  29208. }, e._getLoserCursorMap = function (e) {
  29209. (e = e.slice(0)).sort((function (e, t) {
  29210. return -d.Range.compareRangesUsingEnds(e.range, t.range)
  29211. }));
  29212. for (var t = {}, n = 1; n < e.length; n++) {
  29213. var i = e[n - 1], o = e[n];
  29214. if (i.range.getStartPosition().isBefore(o.range.getEndPosition())) {
  29215. var r = void 0;
  29216. t[(r = i.identifier.major > o.identifier.major ? i.identifier.major : o.identifier.major).toString()] = !0
  29217. ;
  29218. for (var s = 0; s < e.length; s++) e[s].identifier.major === r && (e.splice(s, 1), s < n && n--, s--);
  29219. n > 0 && n--
  29220. }
  29221. }
  29222. return t
  29223. }, e
  29224. }()
  29225. })),define(n[214], i([0, 1, 5, 93, 63]), (function (e, t, n, i, o) {
  29226. "use strict";
  29227. Object.defineProperty(t, "__esModule", {value: !0});
  29228. var r = {
  29229. getInitialState: function () {
  29230. return o.NULL_STATE
  29231. }, tokenize2: function (e, t, n) {
  29232. return o.nullTokenize2(0, e, t, n)
  29233. }
  29234. };
  29235. t.tokenizeToString = function (e, t) {
  29236. return void 0 === t && (t = r), function (e, t) {
  29237. for (var o = '<div class="monaco-tokenized-source">', r = e.split(/\r\n|\r|\n/), s = t.getInitialState(), a = 0, l = r.length; a < l; a++) {
  29238. var u = r[a];
  29239. a > 0 && (o += "<br/>");
  29240. var d = t.tokenize2(u, s, 0);
  29241. i.LineTokens.convertToEndOffset(d.tokens, u.length);
  29242. for (var c = new i.LineTokens(d.tokens, u).inflate(), h = 0, p = 0, g = c.getCount(); p < g; p++) {
  29243. var f = c.getClassName(p), m = c.getEndOffset(p);
  29244. o += '<span class="' + f + '">' + n.escape(u.substring(h, m)) + "</span>", h = m
  29245. }
  29246. s = d.endState
  29247. }
  29248. return o += "</div>"
  29249. }(e, t || r)
  29250. }, t.tokenizeLineToHTML = function (e, t, n, i, o, r, s) {
  29251. for (var a = "<div>", l = i, u = 0, d = 0, c = t.getCount(); d < c; d++) {
  29252. var h = t.getEndOffset(d);
  29253. if (!(h <= i)) {
  29254. for (var p = ""; l < h && l < o; l++) {
  29255. var g = e.charCodeAt(l);
  29256. switch (g) {
  29257. case 9:
  29258. var f = r - (l + u) % r;
  29259. for (u += f - 1; f > 0;) p += s ? "&#160;" : " ", f--;
  29260. break;
  29261. case 60:
  29262. p += "&lt;";
  29263. break;
  29264. case 62:
  29265. p += "&gt;";
  29266. break;
  29267. case 38:
  29268. p += "&amp;";
  29269. break;
  29270. case 0:
  29271. p += "&#00;";
  29272. break;
  29273. case 65279:
  29274. case 8232:
  29275. p += "�";
  29276. break;
  29277. case 13:
  29278. p += "&#8203";
  29279. break;
  29280. case 32:
  29281. p += s ? "&#160;" : " ";
  29282. break;
  29283. default:
  29284. p += String.fromCharCode(g)
  29285. }
  29286. }
  29287. if (a += '<span style="' + t.getInlineStyle(d, n) + '">' + p + "</span>", h > o || l >= o) break
  29288. }
  29289. }
  29290. return a += "</div>"
  29291. }
  29292. })),define(n[84], i([0, 1, 11]), (function (e, t, n) {
  29293. "use strict";
  29294. Object.defineProperty(t, "__esModule", {value: !0}), t.ITextModelService = n.createDecorator("textModelService")
  29295. })),define(n[114], i([0, 1, 11]), (function (e, t, n) {
  29296. "use strict";
  29297. Object.defineProperty(t, "__esModule", {value: !0}), t.ITextResourceConfigurationService = n.createDecorator("textResourceConfigurationService"), t.ITextResourcePropertiesService = n.createDecorator("textResourcePropertiesService")
  29298. })),define(n[215], i([0, 1, 4, 339, 17]), (function (e, t, n, i, o) {
  29299. "use strict";
  29300. Object.defineProperty(t, "__esModule", {value: !0})
  29301. ;var r = function () {
  29302. function e() {
  29303. var e = this;
  29304. this._onDidChange = new n.Emitter, this.onDidChange = this._onDidChange.event, this._updateColorMap(), o.TokenizationRegistry.onDidChange((function (t) {
  29305. t.changedColorMap && e._updateColorMap()
  29306. }))
  29307. }
  29308. return e.getInstance = function () {
  29309. return this._INSTANCE || (this._INSTANCE = new e), this._INSTANCE
  29310. }, e.prototype._updateColorMap = function () {
  29311. var e = o.TokenizationRegistry.getColorMap();
  29312. if (!e) return this._colors = [i.RGBA8.Empty], void (this._backgroundIsLight = !0);
  29313. this._colors = [i.RGBA8.Empty];
  29314. for (var t = 1; t < e.length; t++) {
  29315. var n = e[t].rgba;
  29316. this._colors[t] = new i.RGBA8(n.r, n.g, n.b, Math.round(255 * n.a))
  29317. }
  29318. var r = e[2].getRelativeLuminance();
  29319. this._backgroundIsLight = r >= .5, this._onDidChange.fire(void 0)
  29320. }, e.prototype.getColor = function (e) {
  29321. return (e < 1 || e >= this._colors.length) && (e = 2), this._colors[e]
  29322. }, e.prototype.backgroundIsLight = function () {
  29323. return this._backgroundIsLight
  29324. }, e._INSTANCE = null, e
  29325. }();
  29326. t.MinimapTokensColorTracker = r
  29327. })),define(n[161], i([0, 1, 19, 13, 3, 30, 81, 194, 69]), (function (e, t, n, i, o, r, s, a, l) {
  29328. "use strict"
  29329. ;Object.defineProperty(t, "__esModule", {value: !0});
  29330. var u = function (e, t) {
  29331. this.outputLineIndex = e, this.outputOffset = t
  29332. };
  29333. t.OutputPosition = u;
  29334. var d = function () {
  29335. function e(e, t, n) {
  29336. this.breakOffsets = e, this.breakOffsetsVisibleColumn = t, this.wrappedTextIndentLength = n
  29337. }
  29338. return e.getInputOffsetOfOutputPosition = function (e, t, n) {
  29339. return 0 === t ? n : e[t - 1] + n
  29340. }, e.getOutputPositionOfInputOffset = function (e, t) {
  29341. for (var n = 0, i = e.length - 1, o = 0, r = 0; n <= i;) {
  29342. var s = e[o = n + (i - n) / 2 | 0];
  29343. if (t < (r = o > 0 ? e[o - 1] : 0)) i = o - 1; else {
  29344. if (!(t >= s)) break;
  29345. n = o + 1
  29346. }
  29347. }
  29348. return new u(o, t - r)
  29349. }, e
  29350. }();
  29351. t.LineBreakData = d;
  29352. var c = function () {
  29353. function e(e) {
  29354. this._lines = e
  29355. }
  29356. return e.prototype.convertViewPositionToModelPosition = function (e) {
  29357. return this._lines.convertViewPositionToModelPosition(e.lineNumber, e.column)
  29358. }, e.prototype.convertViewRangeToModelRange = function (e) {
  29359. return this._lines.convertViewRangeToModelRange(e)
  29360. }, e.prototype.validateViewPosition = function (e, t) {
  29361. return this._lines.validateViewPosition(e.lineNumber, e.column, t)
  29362. }, e.prototype.validateViewRange = function (e, t) {
  29363. return this._lines.validateViewRange(e, t)
  29364. }, e.prototype.convertModelPositionToViewPosition = function (e) {
  29365. return this._lines.convertModelPositionToViewPosition(e.lineNumber, e.column)
  29366. }, e.prototype.convertModelRangeToViewRange = function (e) {
  29367. return this._lines.convertModelRangeToViewRange(e)
  29368. }, e.prototype.modelPositionIsVisible = function (e) {
  29369. return this._lines.modelPositionIsVisible(e.lineNumber, e.column)
  29370. }, e
  29371. }();
  29372. t.CoordinatesConverter = c;
  29373. var h = function () {
  29374. function e(e) {
  29375. this._counts = e, this._isValid = !1, this._validEndIndex = -1, this._modelToView = [], this._viewToModel = []
  29376. }
  29377. return e.prototype._invalidate = function (e) {
  29378. this._isValid = !1, this._validEndIndex = Math.min(this._validEndIndex, e - 1)
  29379. }, e.prototype._ensureValid = function () {
  29380. if (!this._isValid) {
  29381. for (var e = this._validEndIndex + 1, t = this._counts.length; e < t; e++) {
  29382. var n = this._counts[e], i = e > 0 ? this._modelToView[e - 1] : 0;
  29383. this._modelToView[e] = i + n;
  29384. for (var o = 0; o < n; o++) this._viewToModel[i + o] = e
  29385. }
  29386. this._modelToView.length = this._counts.length,
  29387. this._viewToModel.length = this._modelToView[this._modelToView.length - 1], this._isValid = !0, this._validEndIndex = this._counts.length - 1
  29388. }
  29389. }, e.prototype.changeValue = function (e, t) {
  29390. this._counts[e] !== t && (this._counts[e] = t, this._invalidate(e))
  29391. }, e.prototype.removeValues = function (e, t) {
  29392. this._counts.splice(e, t), this._invalidate(e)
  29393. }, e.prototype.insertValues = function (e, t) {
  29394. this._counts = n.arrayInsert(this._counts, e, t), this._invalidate(e)
  29395. }, e.prototype.getTotalValue = function () {
  29396. return this._ensureValid(), this._viewToModel.length
  29397. }, e.prototype.getAccumulatedValue = function (e) {
  29398. return this._ensureValid(), this._modelToView[e]
  29399. }, e.prototype.getIndexOf = function (e) {
  29400. this._ensureValid();
  29401. var t = this._viewToModel[e], n = t > 0 ? this._modelToView[t - 1] : 0;
  29402. return new a.PrefixSumIndexOfResult(t, e - n)
  29403. }, e
  29404. }(), p = function () {
  29405. function e(e, t, n, i, o, r, s, a) {
  29406. this.model = e, this._validModelVersionId = -1, this._domLineBreaksComputerFactory = t, this._monospaceLineBreaksComputerFactory = n, this.fontInfo = i, this.tabSize = o, this.wrappingStrategy = r, this.wrappingColumn = s,
  29407. this.wrappingIndent = a, this._constructLines(!0, null)
  29408. }
  29409. return e.prototype.dispose = function () {
  29410. this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, [])
  29411. }, e.prototype.createCoordinatesConverter = function () {
  29412. return new c(this)
  29413. }, e.prototype._constructLines = function (e, t) {
  29414. var n = this;
  29415. this.lines = [], e && (this.hiddenAreasIds = []);
  29416. for (var i = this.model.getLinesContent(), r = i.length, s = this.createLineBreaksComputer(), a = 0; a < r; a++) s.addRequest(i[a], t ? t[a] : null);
  29417. var l = s.finalize(), u = [], d = this.hiddenAreasIds.map((function (e) {
  29418. return n.model.getDecorationRange(e)
  29419. })).sort(o.Range.compareRangesUsingStarts), c = 1, p = 0, g = -1, f = g + 1 < d.length ? p + 1 : r + 2;
  29420. for (a = 0; a < r; a++) {
  29421. var m = a + 1;
  29422. m === f && (c = d[++g].startLineNumber, p = d[g].endLineNumber, f = g + 1 < d.length ? p + 1 : r + 2);
  29423. var v = m >= c && m <= p, _ = C(l[a], !v);
  29424. u[a] = _.getViewLineCount(), this.lines[a] = _
  29425. }
  29426. this._validModelVersionId = this.model.getVersionId(), this.prefixSumComputer = new h(u)
  29427. }, e.prototype.getHiddenAreas = function () {
  29428. var e = this;
  29429. return this.hiddenAreasIds.map((function (t) {
  29430. return e.model.getDecorationRange(t)
  29431. }))
  29432. }, e.prototype._reduceRanges = function (e) {
  29433. var t = this;
  29434. if (0 === e.length) return [];
  29435. for (var n = e.map((function (e) {
  29436. return t.model.validateRange(e)
  29437. })).sort(o.Range.compareRangesUsingStarts), i = [], r = n[0].startLineNumber, s = n[0].endLineNumber, a = 1, l = n.length; a < l; a++) {
  29438. var u = n[a];
  29439. u.startLineNumber > s + 1 ? (i.push(new o.Range(r, 1, s, 1)), r = u.startLineNumber, s = u.endLineNumber) : u.endLineNumber > s && (s = u.endLineNumber)
  29440. }
  29441. return i.push(new o.Range(r, 1, s, 1)), i
  29442. }, e.prototype.setHiddenAreas = function (e) {
  29443. var t = this, n = this._reduceRanges(e), i = this.hiddenAreasIds.map((function (e) {
  29444. return t.model.getDecorationRange(e)
  29445. })).sort(o.Range.compareRangesUsingStarts);
  29446. if (n.length === i.length) {
  29447. for (var s = !1, a = 0; a < n.length; a++) if (!n[a].equalsRange(i[a])) {
  29448. s = !0;
  29449. break
  29450. }
  29451. if (!s) return !1
  29452. }
  29453. for (var l = [], u = 0, d = n; u < d.length; u++) {
  29454. var c = d[u];
  29455. l.push({range: c, options: r.ModelDecorationOptions.EMPTY})
  29456. }
  29457. this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, l);
  29458. var h = n, p = 1, g = 0, f = -1, m = f + 1 < h.length ? g + 1 : this.lines.length + 2, v = !1;
  29459. for (a = 0; a < this.lines.length; a++) {
  29460. var _ = a + 1
  29461. ;_ === m && (p = h[++f].startLineNumber, g = h[f].endLineNumber, m = f + 1 < h.length ? g + 1 : this.lines.length + 2);
  29462. var y = !1;
  29463. if (_ >= p && _ <= g ? this.lines[a].isVisible() && (this.lines[a] = this.lines[a].setVisible(!1), y = !0) : (v = !0, this.lines[a].isVisible() || (this.lines[a] = this.lines[a].setVisible(!0), y = !0)), y) {
  29464. var C = this.lines[a].getViewLineCount();
  29465. this.prefixSumComputer.changeValue(a, C)
  29466. }
  29467. }
  29468. return v || this.setHiddenAreas([]), !0
  29469. }, e.prototype.modelPositionIsVisible = function (e, t) {
  29470. return !(e < 1 || e > this.lines.length) && this.lines[e - 1].isVisible()
  29471. }, e.prototype.setTabSize = function (e) {
  29472. return this.tabSize !== e && (this.tabSize = e, this._constructLines(!1, null), !0)
  29473. }, e.prototype.setWrappingSettings = function (e, t, n, i) {
  29474. var o = this.fontInfo.equals(e), r = this.wrappingStrategy === t, s = this.wrappingColumn === n,
  29475. a = this.wrappingIndent === i;
  29476. if (o && r && s && a) return !1;
  29477. var l = o && r && !s && a;
  29478. this.fontInfo = e, this.wrappingStrategy = t, this.wrappingColumn = n, this.wrappingIndent = i;
  29479. var u = null;
  29480. if (l) {
  29481. u = [];
  29482. for (var d = 0, c = this.lines.length; d < c; d++) u[d] = this.lines[d].getLineBreakData()
  29483. }
  29484. return this._constructLines(!1, u), !0
  29485. }, e.prototype.createLineBreaksComputer = function () {
  29486. return ("advanced" === this.wrappingStrategy ? this._domLineBreaksComputerFactory : this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo, this.tabSize, this.wrappingColumn, this.wrappingIndent)
  29487. }, e.prototype.onModelFlushed = function () {
  29488. this._constructLines(!0, null)
  29489. }, e.prototype.onModelLinesDeleted = function (e, t, n) {
  29490. if (e <= this._validModelVersionId) return null;
  29491. var i = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1,
  29492. o = this.prefixSumComputer.getAccumulatedValue(n - 1);
  29493. return this.lines.splice(t - 1, n - t + 1), this.prefixSumComputer.removeValues(t - 1, n - t + 1), new s.ViewLinesDeletedEvent(i, o)
  29494. }, e.prototype.onModelLinesInserted = function (e, t, n, o) {
  29495. if (e <= this._validModelVersionId) return null;
  29496. for (var r = this.getHiddenAreas(), a = !1, l = new i.Position(t, 1), u = 0, d = r; u < d.length; u++) {
  29497. if (d[u].containsPosition(l)) {
  29498. a = !0;
  29499. break
  29500. }
  29501. }
  29502. for (var c = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1, h = 0, p = [], g = [], f = 0, m = o.length; f < m; f++) {
  29503. var v = C(o[f], !a);
  29504. p.push(v);
  29505. var _ = v.getViewLineCount();
  29506. h += _, g[f] = _
  29507. }
  29508. return this.lines = this.lines.slice(0, t - 1).concat(p).concat(this.lines.slice(t - 1)), this.prefixSumComputer.insertValues(t - 1, g), new s.ViewLinesInsertedEvent(c, c + h - 1)
  29509. }, e.prototype.onModelLineChanged = function (e, t, n) {
  29510. if (e <= this._validModelVersionId) return [!1, null, null, null];
  29511. var i = t - 1, o = this.lines[i].getViewLineCount(), r = C(n, this.lines[i].isVisible());
  29512. this.lines[i] = r;
  29513. var a = this.lines[i].getViewLineCount(), l = !1, u = 0, d = -1, c = 0, h = -1, p = 0, g = -1;
  29514. return o > a ? (g = (p = (d = (u = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1) + a - 1) + 1) + (o - a) - 1, l = !0) : o < a ? (h = (c = (d = (u = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1) + o - 1) + 1) + (a - o) - 1, l = !0) : d = (u = 1 === t ? 1 : this.prefixSumComputer.getAccumulatedValue(t - 2) + 1) + a - 1, this.prefixSumComputer.changeValue(i, a), [l, u <= d ? new s.ViewLinesChangedEvent(u, d) : null, c <= h ? new s.ViewLinesInsertedEvent(c, h) : null, p <= g ? new s.ViewLinesDeletedEvent(p, g) : null]
  29515. }, e.prototype.acceptVersionId = function (e) {
  29516. this._validModelVersionId = e,
  29517. 1 !== this.lines.length || this.lines[0].isVisible() || this.setHiddenAreas([])
  29518. }, e.prototype.getViewLineCount = function () {
  29519. return this.prefixSumComputer.getTotalValue()
  29520. }, e.prototype._toValidViewLineNumber = function (e) {
  29521. if (e < 1) return 1;
  29522. var t = this.getViewLineCount();
  29523. return e > t ? t : 0 | e
  29524. }, e.prototype.getActiveIndentGuide = function (e, t, n) {
  29525. e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t), n = this._toValidViewLineNumber(n);
  29526. var i = this.convertViewPositionToModelPosition(e, this.getViewLineMinColumn(e)),
  29527. o = this.convertViewPositionToModelPosition(t, this.getViewLineMinColumn(t)),
  29528. r = this.convertViewPositionToModelPosition(n, this.getViewLineMinColumn(n)),
  29529. s = this.model.getActiveIndentGuide(i.lineNumber, o.lineNumber, r.lineNumber),
  29530. a = this.convertModelPositionToViewPosition(s.startLineNumber, 1),
  29531. l = this.convertModelPositionToViewPosition(s.endLineNumber, this.model.getLineMaxColumn(s.endLineNumber));
  29532. return {startLineNumber: a.lineNumber, endLineNumber: l.lineNumber, indent: s.indent}
  29533. }, e.prototype.getViewLinesIndentGuides = function (e, t) {
  29534. e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t);
  29535. for (var n = this.convertViewPositionToModelPosition(e, this.getViewLineMinColumn(e)), o = this.convertViewPositionToModelPosition(t, this.getViewLineMaxColumn(t)), r = [], s = [], a = [], l = n.lineNumber - 1, u = o.lineNumber - 1, d = null, c = l; c <= u; c++) {
  29536. var h = this.lines[c];
  29537. if (h.isVisible()) {
  29538. var p = h.getViewLineNumberOfModelPosition(0, c === l ? n.column : 1),
  29539. g = h.getViewLineNumberOfModelPosition(0, this.model.getLineMaxColumn(c + 1)), f = 0;
  29540. (S = g - p + 1) > 1 && 1 === h.getViewLineMinColumn(this.model, c + 1, g) && (f = 0 === p ? 1 : 2), s.push(S), a.push(f), null === d && (d = new i.Position(c + 1, 0))
  29541. } else null !== d && (r = r.concat(this.model.getLinesIndentGuides(d.lineNumber, c)), d = null)
  29542. }
  29543. null !== d && (r = r.concat(this.model.getLinesIndentGuides(d.lineNumber, o.lineNumber)), d = null);
  29544. for (var m = t - e + 1, v = new Array(m), _ = 0, y = 0, C = r.length; y < C; y++) {
  29545. var b = r[y], S = Math.min(m - _, s[y]), w = void 0;
  29546. w = 2 === (f = a[y]) ? 0 : 1 === f ? 1 : S;
  29547. for (var E = 0; E < S; E++) E === w && (b = 0), v[_++] = b
  29548. }
  29549. return v
  29550. }, e.prototype.getViewLineContent = function (e) {
  29551. e = this._toValidViewLineNumber(e);
  29552. var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
  29553. return this.lines[n].getViewLineContent(this.model, n + 1, i)
  29554. }, e.prototype.getViewLineLength = function (e) {
  29555. e = this._toValidViewLineNumber(e);
  29556. var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
  29557. return this.lines[n].getViewLineLength(this.model, n + 1, i)
  29558. }, e.prototype.getViewLineMinColumn = function (e) {
  29559. e = this._toValidViewLineNumber(e);
  29560. var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
  29561. return this.lines[n].getViewLineMinColumn(this.model, n + 1, i)
  29562. }, e.prototype.getViewLineMaxColumn = function (e) {
  29563. e = this._toValidViewLineNumber(e);
  29564. var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
  29565. return this.lines[n].getViewLineMaxColumn(this.model, n + 1, i)
  29566. }, e.prototype.getViewLineData = function (e) {
  29567. e = this._toValidViewLineNumber(e);
  29568. var t = this.prefixSumComputer.getIndexOf(e - 1), n = t.index, i = t.remainder;
  29569. return this.lines[n].getViewLineData(this.model, n + 1, i)
  29570. }, e.prototype.getViewLinesData = function (e, t, n) {
  29571. e = this._toValidViewLineNumber(e), t = this._toValidViewLineNumber(t);
  29572. for (var i = this.prefixSumComputer.getIndexOf(e - 1), o = e, r = i.index, s = i.remainder, a = [], l = r, u = this.model.getLineCount(); l < u; l++) {
  29573. var d = this.lines[l];
  29574. if (d.isVisible()) {
  29575. var c = l === r ? s : 0, h = d.getViewLineCount() - c, p = !1;
  29576. o + h > t && (p = !0, h = t - o + 1);
  29577. var g = c + h;
  29578. if (d.getViewLinesData(this.model, l + 1, c, g, o - e, n, a), o += h, p) break
  29579. }
  29580. }
  29581. return a
  29582. }, e.prototype.validateViewPosition = function (e, t, n) {
  29583. e = this._toValidViewLineNumber(e);
  29584. var o = this.prefixSumComputer.getIndexOf(e - 1), r = o.index, s = o.remainder, a = this.lines[r],
  29585. l = a.getViewLineMinColumn(this.model, r + 1, s), u = a.getViewLineMaxColumn(this.model, r + 1, s);
  29586. t < l && (t = l), t > u && (t = u);
  29587. var d = a.getModelColumnOfViewPosition(s, t);
  29588. return this.model.validatePosition(new i.Position(r + 1, d)).equals(n) ? new i.Position(e, t) : this.convertModelPositionToViewPosition(n.lineNumber, n.column)
  29589. }, e.prototype.validateViewRange = function (e, t) {
  29590. var n = this.validateViewPosition(e.startLineNumber, e.startColumn, t.getStartPosition()),
  29591. i = this.validateViewPosition(e.endLineNumber, e.endColumn, t.getEndPosition());
  29592. return new o.Range(n.lineNumber, n.column, i.lineNumber, i.column)
  29593. }, e.prototype.convertViewPositionToModelPosition = function (e, t) {
  29594. e = this._toValidViewLineNumber(e);
  29595. var n = this.prefixSumComputer.getIndexOf(e - 1), o = n.index, r = n.remainder,
  29596. s = this.lines[o].getModelColumnOfViewPosition(r, t);
  29597. return this.model.validatePosition(new i.Position(o + 1, s))
  29598. }, e.prototype.convertViewRangeToModelRange = function (e) {
  29599. var t = this.convertViewPositionToModelPosition(e.startLineNumber, e.startColumn),
  29600. n = this.convertViewPositionToModelPosition(e.endLineNumber, e.endColumn);
  29601. return new o.Range(t.lineNumber, t.column, n.lineNumber, n.column)
  29602. }, e.prototype.convertModelPositionToViewPosition = function (e, t) {
  29603. for (var n = this.model.validatePosition(new i.Position(e, t)), o = n.lineNumber, r = n.column, s = o - 1, a = !1; s > 0 && !this.lines[s].isVisible();) s--, a = !0
  29604. ;
  29605. if (0 === s && !this.lines[s].isVisible()) return new i.Position(1, 1);
  29606. var l = 1 + (0 === s ? 0 : this.prefixSumComputer.getAccumulatedValue(s - 1));
  29607. return a ? this.lines[s].getViewPositionOfModelPosition(l, this.model.getLineMaxColumn(s + 1)) : this.lines[o - 1].getViewPositionOfModelPosition(l, r)
  29608. }, e.prototype.convertModelRangeToViewRange = function (e) {
  29609. var t = this.convertModelPositionToViewPosition(e.startLineNumber, e.startColumn),
  29610. n = this.convertModelPositionToViewPosition(e.endLineNumber, e.endColumn);
  29611. return e.startLineNumber === e.endLineNumber && t.lineNumber !== n.lineNumber && n.column === this.getViewLineMinColumn(n.lineNumber) ? new o.Range(t.lineNumber, t.column, n.lineNumber - 1, this.getViewLineMaxColumn(n.lineNumber - 1)) : new o.Range(t.lineNumber, t.column, n.lineNumber, n.column)
  29612. }, e.prototype._getViewLineNumberForModelPosition = function (e, t) {
  29613. var n = e - 1;
  29614. if (this.lines[n].isVisible()) {
  29615. var i = 1 + (0 === n ? 0 : this.prefixSumComputer.getAccumulatedValue(n - 1));
  29616. return this.lines[n].getViewLineNumberOfModelPosition(i, t)
  29617. }
  29618. for (; n > 0 && !this.lines[n].isVisible();) n--
  29619. ;
  29620. if (0 === n && !this.lines[n].isVisible()) return 1;
  29621. var o = 1 + (0 === n ? 0 : this.prefixSumComputer.getAccumulatedValue(n - 1));
  29622. return this.lines[n].getViewLineNumberOfModelPosition(o, this.model.getLineMaxColumn(n + 1))
  29623. }, e.prototype.getAllOverviewRulerDecorations = function (e, t, n) {
  29624. for (var i = this.model.getOverviewRulerDecorations(e, t), o = new w, r = 0, s = i; r < s.length; r++) {
  29625. var a = s[r], l = a.options.overviewRuler, u = l ? l.position : 0;
  29626. if (0 !== u) {
  29627. var d = l.getColor(n),
  29628. c = this._getViewLineNumberForModelPosition(a.range.startLineNumber, a.range.startColumn),
  29629. h = this._getViewLineNumberForModelPosition(a.range.endLineNumber, a.range.endColumn);
  29630. o.accept(d, c, h, u)
  29631. }
  29632. }
  29633. return o.result
  29634. }, e.prototype.getDecorationsInRange = function (e, t, n) {
  29635. var r = this.convertViewPositionToModelPosition(e.startLineNumber, e.startColumn),
  29636. s = this.convertViewPositionToModelPosition(e.endLineNumber, e.endColumn);
  29637. if (s.lineNumber - r.lineNumber <= e.endLineNumber - e.startLineNumber) return this.model.getDecorationsInRange(new o.Range(r.lineNumber, 1, s.lineNumber, s.column), t, n)
  29638. ;
  29639. for (var a = [], l = r.lineNumber - 1, u = s.lineNumber - 1, d = null, c = l; c <= u; c++) {
  29640. if (this.lines[c].isVisible()) null === d && (d = new i.Position(c + 1, c === l ? r.column : 1)); else if (null !== d) {
  29641. var h = this.model.getLineMaxColumn(c);
  29642. a = a.concat(this.model.getDecorationsInRange(new o.Range(d.lineNumber, d.column, c, h), t, n)), d = null
  29643. }
  29644. }
  29645. null !== d && (a = a.concat(this.model.getDecorationsInRange(new o.Range(d.lineNumber, d.column, s.lineNumber, s.column), t, n)), d = null), a.sort((function (e, t) {
  29646. var n = o.Range.compareRangesUsingStarts(e.range, t.range);
  29647. return 0 === n ? e.id < t.id ? -1 : e.id > t.id ? 1 : 0 : n
  29648. }));
  29649. for (var p = [], g = 0, f = null, m = 0, v = a; m < v.length; m++) {
  29650. var _ = v[m], y = _.id;
  29651. f !== y && (f = y, p[g++] = _)
  29652. }
  29653. return p
  29654. }, e
  29655. }();
  29656. t.SplitLinesCollection = p;
  29657. var g = function () {
  29658. function e() {
  29659. }
  29660. return e.prototype.isVisible = function () {
  29661. return !0
  29662. }, e.prototype.setVisible = function (e) {
  29663. return e ? this : f.INSTANCE
  29664. }, e.prototype.getLineBreakData = function () {
  29665. return null
  29666. }, e.prototype.getViewLineCount = function () {
  29667. return 1
  29668. }, e.prototype.getViewLineContent = function (e, t, n) {
  29669. return e.getLineContent(t)
  29670. },
  29671. e.prototype.getViewLineLength = function (e, t, n) {
  29672. return e.getLineLength(t)
  29673. }, e.prototype.getViewLineMinColumn = function (e, t, n) {
  29674. return e.getLineMinColumn(t)
  29675. }, e.prototype.getViewLineMaxColumn = function (e, t, n) {
  29676. return e.getLineMaxColumn(t)
  29677. }, e.prototype.getViewLineData = function (e, t, n) {
  29678. var i = e.getLineTokens(t), o = i.getLineContent();
  29679. return new l.ViewLineData(o, !1, 1, o.length + 1, 0, i.inflate())
  29680. }, e.prototype.getViewLinesData = function (e, t, n, i, o, r, s) {
  29681. r[o] ? s[o] = this.getViewLineData(e, t, 0) : s[o] = null
  29682. }, e.prototype.getModelColumnOfViewPosition = function (e, t) {
  29683. return t
  29684. }, e.prototype.getViewPositionOfModelPosition = function (e, t) {
  29685. return new i.Position(e, t)
  29686. }, e.prototype.getViewLineNumberOfModelPosition = function (e, t) {
  29687. return e
  29688. }, e.INSTANCE = new e, e
  29689. }(), f = function () {
  29690. function e() {
  29691. }
  29692. return e.prototype.isVisible = function () {
  29693. return !1
  29694. }, e.prototype.setVisible = function (e) {
  29695. return e ? g.INSTANCE : this
  29696. }, e.prototype.getLineBreakData = function () {
  29697. return null
  29698. }, e.prototype.getViewLineCount = function () {
  29699. return 0
  29700. }, e.prototype.getViewLineContent = function (e, t, n) {
  29701. throw new Error("Not supported")
  29702. }, e.prototype.getViewLineLength = function (e, t, n) {
  29703. throw new Error("Not supported")
  29704. }, e.prototype.getViewLineMinColumn = function (e, t, n) {
  29705. throw new Error("Not supported")
  29706. }, e.prototype.getViewLineMaxColumn = function (e, t, n) {
  29707. throw new Error("Not supported")
  29708. }, e.prototype.getViewLineData = function (e, t, n) {
  29709. throw new Error("Not supported")
  29710. }, e.prototype.getViewLinesData = function (e, t, n, i, o, r, s) {
  29711. throw new Error("Not supported")
  29712. }, e.prototype.getModelColumnOfViewPosition = function (e, t) {
  29713. throw new Error("Not supported")
  29714. }, e.prototype.getViewPositionOfModelPosition = function (e, t) {
  29715. throw new Error("Not supported")
  29716. }, e.prototype.getViewLineNumberOfModelPosition = function (e, t) {
  29717. throw new Error("Not supported")
  29718. }, e.INSTANCE = new e, e
  29719. }(), m = function () {
  29720. function e(e, t) {
  29721. this._lineBreakData = e, this._isVisible = t
  29722. }
  29723. return e.prototype.isVisible = function () {
  29724. return this._isVisible
  29725. }, e.prototype.setVisible = function (e) {
  29726. return this._isVisible = e, this
  29727. }, e.prototype.getLineBreakData = function () {
  29728. return this._lineBreakData
  29729. },
  29730. e.prototype.getViewLineCount = function () {
  29731. return this._isVisible ? this._lineBreakData.breakOffsets.length : 0
  29732. }, e.prototype.getInputStartOffsetOfOutputLineIndex = function (e) {
  29733. return d.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, e, 0)
  29734. }, e.prototype.getInputEndOffsetOfOutputLineIndex = function (e, t, n) {
  29735. return n + 1 === this._lineBreakData.breakOffsets.length ? e.getLineMaxColumn(t) - 1 : d.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, n + 1, 0)
  29736. }, e.prototype.getViewLineContent = function (e, t, n) {
  29737. if (!this._isVisible) throw new Error("Not supported");
  29738. var i = this.getInputStartOffsetOfOutputLineIndex(n),
  29739. o = this.getInputEndOffsetOfOutputLineIndex(e, t, n),
  29740. r = e.getValueInRange({startLineNumber: t, startColumn: i + 1, endLineNumber: t, endColumn: o + 1});
  29741. return n > 0 && (r = _(this._lineBreakData.wrappedTextIndentLength) + r), r
  29742. }, e.prototype.getViewLineLength = function (e, t, n) {
  29743. if (!this._isVisible) throw new Error("Not supported");
  29744. var i = this.getInputStartOffsetOfOutputLineIndex(n),
  29745. o = this.getInputEndOffsetOfOutputLineIndex(e, t, n) - i
  29746. ;
  29747. return n > 0 && (o = this._lineBreakData.wrappedTextIndentLength + o), o
  29748. }, e.prototype.getViewLineMinColumn = function (e, t, n) {
  29749. if (!this._isVisible) throw new Error("Not supported");
  29750. return n > 0 ? this._lineBreakData.wrappedTextIndentLength + 1 : 1
  29751. }, e.prototype.getViewLineMaxColumn = function (e, t, n) {
  29752. if (!this._isVisible) throw new Error("Not supported");
  29753. return this.getViewLineContent(e, t, n).length + 1
  29754. }, e.prototype.getViewLineData = function (e, t, n) {
  29755. if (!this._isVisible) throw new Error("Not supported");
  29756. var i = this.getInputStartOffsetOfOutputLineIndex(n),
  29757. o = this.getInputEndOffsetOfOutputLineIndex(e, t, n),
  29758. r = e.getValueInRange({startLineNumber: t, startColumn: i + 1, endLineNumber: t, endColumn: o + 1});
  29759. n > 0 && (r = _(this._lineBreakData.wrappedTextIndentLength) + r);
  29760. var s = n > 0 ? this._lineBreakData.wrappedTextIndentLength + 1 : 1, a = r.length + 1,
  29761. u = n + 1 < this.getViewLineCount(), d = 0;
  29762. n > 0 && (d = this._lineBreakData.wrappedTextIndentLength);
  29763. var c = e.getLineTokens(t), h = 0 === n ? 0 : this._lineBreakData.breakOffsetsVisibleColumn[n - 1]
  29764. ;
  29765. return new l.ViewLineData(r, u, s, a, h, c.sliceAndInflate(i, o, d))
  29766. }, e.prototype.getViewLinesData = function (e, t, n, i, o, r, s) {
  29767. if (!this._isVisible) throw new Error("Not supported");
  29768. for (var a = n; a < i; a++) {
  29769. var l = o + a - n;
  29770. r[l] ? s[l] = this.getViewLineData(e, t, a) : s[l] = null
  29771. }
  29772. }, e.prototype.getModelColumnOfViewPosition = function (e, t) {
  29773. if (!this._isVisible) throw new Error("Not supported");
  29774. var n = t - 1;
  29775. return e > 0 && (n < this._lineBreakData.wrappedTextIndentLength ? n = 0 : n -= this._lineBreakData.wrappedTextIndentLength), d.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, e, n) + 1
  29776. }, e.prototype.getViewPositionOfModelPosition = function (e, t) {
  29777. if (!this._isVisible) throw new Error("Not supported");
  29778. var n = d.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, t - 1),
  29779. o = n.outputLineIndex, r = n.outputOffset + 1;
  29780. return o > 0 && (r += this._lineBreakData.wrappedTextIndentLength), new i.Position(e + o, r)
  29781. }, e.prototype.getViewLineNumberOfModelPosition = function (e, t) {
  29782. if (!this._isVisible) throw new Error("Not supported")
  29783. ;
  29784. return e + d.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, t - 1).outputLineIndex
  29785. }, e
  29786. }();
  29787. t.SplitLine = m;
  29788. var v = [""];
  29789. function _(e) {
  29790. if (e >= v.length) for (var t = 1; t <= e; t++) v[t] = y(t);
  29791. return v[e]
  29792. }
  29793. function y(e) {
  29794. return new Array(e + 1).join(" ")
  29795. }
  29796. function C(e, t) {
  29797. return null === e ? t ? g.INSTANCE : f.INSTANCE : new m(e, t)
  29798. }
  29799. var b = function () {
  29800. function e(e) {
  29801. this._lines = e
  29802. }
  29803. return e.prototype._validPosition = function (e) {
  29804. return this._lines.model.validatePosition(e)
  29805. }, e.prototype._validRange = function (e) {
  29806. return this._lines.model.validateRange(e)
  29807. }, e.prototype.convertViewPositionToModelPosition = function (e) {
  29808. return this._validPosition(e)
  29809. }, e.prototype.convertViewRangeToModelRange = function (e) {
  29810. return this._validRange(e)
  29811. }, e.prototype.validateViewPosition = function (e, t) {
  29812. return this._validPosition(t)
  29813. }, e.prototype.validateViewRange = function (e, t) {
  29814. return this._validRange(t)
  29815. }, e.prototype.convertModelPositionToViewPosition = function (e) {
  29816. return this._validPosition(e)
  29817. }, e.prototype.convertModelRangeToViewRange = function (e) {
  29818. return this._validRange(e)
  29819. },
  29820. e.prototype.modelPositionIsVisible = function (e) {
  29821. var t = this._lines.model.getLineCount();
  29822. return !(e.lineNumber < 1 || e.lineNumber > t)
  29823. }, e
  29824. }();
  29825. t.IdentityCoordinatesConverter = b;
  29826. var S = function () {
  29827. function e(e) {
  29828. this.model = e
  29829. }
  29830. return e.prototype.dispose = function () {
  29831. }, e.prototype.createCoordinatesConverter = function () {
  29832. return new b(this)
  29833. }, e.prototype.getHiddenAreas = function () {
  29834. return []
  29835. }, e.prototype.setHiddenAreas = function (e) {
  29836. return !1
  29837. }, e.prototype.setTabSize = function (e) {
  29838. return !1
  29839. }, e.prototype.setWrappingSettings = function (e, t, n, i) {
  29840. return !1
  29841. }, e.prototype.createLineBreaksComputer = function () {
  29842. var e = [];
  29843. return {
  29844. addRequest: function (t, n) {
  29845. e.push(null)
  29846. }, finalize: function () {
  29847. return e
  29848. }
  29849. }
  29850. }, e.prototype.onModelFlushed = function () {
  29851. }, e.prototype.onModelLinesDeleted = function (e, t, n) {
  29852. return new s.ViewLinesDeletedEvent(t, n)
  29853. }, e.prototype.onModelLinesInserted = function (e, t, n, i) {
  29854. return new s.ViewLinesInsertedEvent(t, n)
  29855. }, e.prototype.onModelLineChanged = function (e, t, n) {
  29856. return [!1, new s.ViewLinesChangedEvent(t, t), null, null]
  29857. }, e.prototype.acceptVersionId = function (e) {
  29858. },
  29859. e.prototype.getViewLineCount = function () {
  29860. return this.model.getLineCount()
  29861. }, e.prototype.getActiveIndentGuide = function (e, t, n) {
  29862. return {startLineNumber: e, endLineNumber: e, indent: 0}
  29863. }, e.prototype.getViewLinesIndentGuides = function (e, t) {
  29864. for (var n = t - e + 1, i = new Array(n), o = 0; o < n; o++) i[o] = 0;
  29865. return i
  29866. }, e.prototype.getViewLineContent = function (e) {
  29867. return this.model.getLineContent(e)
  29868. }, e.prototype.getViewLineLength = function (e) {
  29869. return this.model.getLineLength(e)
  29870. }, e.prototype.getViewLineMinColumn = function (e) {
  29871. return this.model.getLineMinColumn(e)
  29872. }, e.prototype.getViewLineMaxColumn = function (e) {
  29873. return this.model.getLineMaxColumn(e)
  29874. }, e.prototype.getViewLineData = function (e) {
  29875. var t = this.model.getLineTokens(e), n = t.getLineContent();
  29876. return new l.ViewLineData(n, !1, 1, n.length + 1, 0, t.inflate())
  29877. }, e.prototype.getViewLinesData = function (e, t, n) {
  29878. var i = this.model.getLineCount();
  29879. e = Math.min(Math.max(1, e), i), t = Math.min(Math.max(1, t), i);
  29880. for (var o = [], r = e; r <= t; r++) {
  29881. var s = r - e;
  29882. n[s] || (o[s] = null), o[s] = this.getViewLineData(r)
  29883. }
  29884. return o
  29885. },
  29886. e.prototype.getAllOverviewRulerDecorations = function (e, t, n) {
  29887. for (var i = this.model.getOverviewRulerDecorations(e, t), o = new w, r = 0, s = i; r < s.length; r++) {
  29888. var a = s[r], l = a.options.overviewRuler, u = l ? l.position : 0;
  29889. if (0 !== u) {
  29890. var d = l.getColor(n), c = a.range.startLineNumber, h = a.range.endLineNumber;
  29891. o.accept(d, c, h, u)
  29892. }
  29893. }
  29894. return o.result
  29895. }, e.prototype.getDecorationsInRange = function (e, t, n) {
  29896. return this.model.getDecorationsInRange(e, t, n)
  29897. }, e
  29898. }();
  29899. t.IdentityLinesCollection = S;
  29900. var w = function () {
  29901. function e() {
  29902. this.result = Object.create(null)
  29903. }
  29904. return e.prototype.accept = function (e, t, n, i) {
  29905. var o = this.result[e];
  29906. if (o) {
  29907. var r = o[o.length - 3], s = o[o.length - 1];
  29908. if (r === i && s + 1 >= t) return void (n > s && (o[o.length - 1] = n));
  29909. o.push(i, t, n)
  29910. } else this.result[e] = [i, t, n]
  29911. }, e
  29912. }()
  29913. })),define(n[487], i([0, 1, 5, 79, 161]), (function (e, t, n, i, o) {
  29914. "use strict";
  29915. Object.defineProperty(t, "__esModule", {value: !0});
  29916. var s = function (e) {
  29917. function t(t, n) {
  29918. for (var i = e.call(this, 0) || this, o = 0; o < t.length; o++) i.set(t.charCodeAt(o), 1);
  29919. for (o = 0; o < n.length; o++) i.set(n.charCodeAt(o), 2);
  29920. return i
  29921. }
  29922. return r(t, e),
  29923. t.prototype.get = function (e) {
  29924. return e >= 0 && e < 256 ? this._asciiMap[e] : e >= 12352 && e <= 12543 || e >= 13312 && e <= 19903 || e >= 19968 && e <= 40959 ? 3 : this._map.get(e) || this._defaultValue
  29925. }, t
  29926. }(i.CharacterClassifier), a = [], l = [], u = function () {
  29927. function e(e, t) {
  29928. this.classifier = new s(e, t)
  29929. }
  29930. return e.create = function (t) {
  29931. return new e(t.get(99), t.get(98))
  29932. }, e.prototype.createLineBreaksComputer = function (e, t, n, i) {
  29933. var o = this;
  29934. t |= 0, n = +n;
  29935. var r = [], s = [];
  29936. return {
  29937. addRequest: function (e, t) {
  29938. r.push(e), s.push(t)
  29939. }, finalize: function () {
  29940. for (var u = e.typicalFullwidthCharacterWidth / e.typicalHalfwidthCharacterWidth, h = [], p = 0, g = r.length; p < g; p++) {
  29941. var f = s[p];
  29942. h[p] = f ? d(o.classifier, f, r[p], t, n, u, i) : c(o.classifier, r[p], t, n, u, i)
  29943. }
  29944. return a.length = 0, l.length = 0, h
  29945. }
  29946. }
  29947. }, e
  29948. }();
  29949. function d(e, t, i, o, r, s, u) {
  29950. if (-1 === r) return null;
  29951. var d = i.length;
  29952. if (d <= 1) return null;
  29953. var c = t.breakOffsets, p = t.breakOffsetsVisibleColumn, m = f(i, o, r, s, u), v = r - m, _ = a, y = l,
  29954. C = 0, b = r, S = c.length, w = 0;
  29955. if (w >= 0) for (var E = Math.abs(p[w] - b); w + 1 < S;) {
  29956. if ((U = Math.abs(p[w + 1] - b)) >= E) break;
  29957. E = U, w++
  29958. }
  29959. for (; w < S;) {
  29960. var L = w < 0 ? 0 : c[w], D = w < 0 ? 0 : p[w], N = 0, x = 0, I = 0, M = 0;
  29961. if (D <= b) {
  29962. for (var k = D, T = i.charCodeAt(L - 1), R = e.get(T), O = !0, P = L; P < d; P++) {
  29963. var A = P, F = i.charCodeAt(P), W = void 0, B = void 0;
  29964. if (n.isHighSurrogate(F) ? (P++, W = 0, B = 2) : (W = e.get(F), B = h(F, k, o, s)), g(T, R, F, W) && (N = A, x = k), (k += B) > b) {
  29965. I = A, M = k - B, k - x > v && (N = 0), O = !1;
  29966. break
  29967. }
  29968. T = F, R = W
  29969. }
  29970. if (O) {
  29971. C > 0 && (_[C] = c[c.length - 1], y[C] = p[c.length - 1], C++);
  29972. break
  29973. }
  29974. }
  29975. if (0 === N) {
  29976. k = D, F = i.charCodeAt(L), W = e.get(F);
  29977. var V = !1;
  29978. for (P = L - 1; P >= 0; P--) {
  29979. A = P + 1;
  29980. if (9 === (T = i.charCodeAt(P))) {
  29981. V = !0;
  29982. break
  29983. }
  29984. R = void 0;
  29985. var z = void 0;
  29986. if (n.isLowSurrogate(T) ? (P--, R = 0, z = 2) : (R = e.get(T), z = n.isFullWidthCharacter(T) ? s : 1), k <= b) {
  29987. if (0 === I && (I = A, M = k), k <= b - v) break;
  29988. if (g(T, R, F, W)) {
  29989. N = A, x = k;
  29990. break
  29991. }
  29992. }
  29993. k -= z, F = T, W = R
  29994. }
  29995. if (0 !== N) {
  29996. var H = v - (M - x);
  29997. if (H <= o) {
  29998. var K = i.charCodeAt(I);
  29999. B = void 0;
  30000. H - (B = n.isHighSurrogate(K) ? 2 : h(K, M, o, s)) < 0 && (N = 0)
  30001. }
  30002. }
  30003. if (V) {
  30004. w--;
  30005. continue
  30006. }
  30007. }
  30008. for (0 === N && (N = I, x = M), _[C] = N, y[C] = x, C++, b = x + v; w < 0 || w < S && p[w] < x;) w++;
  30009. for (E = Math.abs(p[w] - b); w + 1 < S;) {
  30010. var U;
  30011. if ((U = Math.abs(p[w + 1] - b)) >= E) break;
  30012. E = U, w++
  30013. }
  30014. }
  30015. return 0 === C ? null : (_.length = C, y.length = C, a = t.breakOffsets,
  30016. l = t.breakOffsetsVisibleColumn, t.breakOffsets = _, t.breakOffsetsVisibleColumn = y, t.wrappedTextIndentLength = m, t)
  30017. }
  30018. function c(e, t, i, r, s, a) {
  30019. if (-1 === r) return null;
  30020. var l = t.length;
  30021. if (l <= 1) return null;
  30022. var u = f(t, i, r, s, a), d = r - u, c = [], p = [], m = 0, v = 0, _ = 0, y = r, C = t.charCodeAt(0),
  30023. b = e.get(C), S = h(C, 0, i, s), w = 1;
  30024. n.isHighSurrogate(C) && (S += 1, C = t.charCodeAt(1), b = e.get(C), w++);
  30025. for (var E = w; E < l; E++) {
  30026. var L = E, D = t.charCodeAt(E), N = void 0, x = void 0;
  30027. n.isHighSurrogate(D) ? (E++, N = 0, x = 2) : (N = e.get(D), x = h(D, S, i, s)), g(C, b, D, N) && (v = L, _ = S), (S += x) > y && ((0 === v || S - _ > d) && (v = L, _ = S - x), c[m] = v, p[m] = _, m++, y = _ + d, v = 0), C = D, b = N
  30028. }
  30029. return 0 === m ? null : (c[m] = l, p[m] = S, new o.LineBreakData(c, p, u))
  30030. }
  30031. function h(e, t, i, o) {
  30032. return 9 === e ? i - t % i : n.isFullWidthCharacter(e) ? o : 1
  30033. }
  30034. function p(e, t) {
  30035. return t - e % t
  30036. }
  30037. function g(e, t, n, i) {
  30038. return 32 !== n && (2 === t || 3 === t && 2 !== i || 1 === i || 3 === i && 1 !== t)
  30039. }
  30040. function f(e, t, i, o, r) {
  30041. var s = 0;
  30042. if (0 !== r) {
  30043. var a = n.firstNonWhitespaceIndex(e);
  30044. if (-1 !== a) {
  30045. for (var l = 0; l < a; l++) {
  30046. s += 9 === e.charCodeAt(l) ? p(s, t) : 1
  30047. }
  30048. var u = 3 === r ? 2 : 2 === r ? 1 : 0;
  30049. for (l = 0; l < u; l++) {
  30050. s += p(s, t)
  30051. }
  30052. s + o > i && (s = 0)
  30053. }
  30054. }
  30055. return s
  30056. }
  30057. t.MonospaceLineBreaksComputerFactory = u
  30058. })),define(n[488], i([0, 1, 27, 5, 33, 13, 3, 17, 214, 215, 81, 373, 161, 69, 424, 15, 16]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v) {
  30059. "use strict";
  30060. Object.defineProperty(t, "__esModule", {value: !0});
  30061. var _ = !0, y = function (e) {
  30062. function t(t, n, i, o, r, s) {
  30063. var a = e.call(this) || this;
  30064. if (a.editorId = t, a.configuration = n, a.model = i, a._tokenizeViewportSoon = a._register(new m.RunOnceScheduler((function () {
  30065. return a.tokenizeViewport()
  30066. }), 50)), a.hasFocus = !1, a.viewportStartLine = -1, a.viewportStartLineTrackedRange = null, a.viewportStartLineDelta = 0, _ && a.model.isTooLargeForTokenization()) a.lines = new p.IdentityLinesCollection(a.model); else {
  30067. var l = a.configuration.options, u = l.get(34), g = l.get(103), v = l.get(108), y = l.get(102);
  30068. a.lines = new p.SplitLinesCollection(a.model, o, r, u, a.model.getOptions().tabSize, g, v.wrappingColumn, y)
  30069. }
  30070. return a.coordinatesConverter = a.lines.createCoordinatesConverter(), a.viewLayout = a._register(new h.ViewLayout(a.configuration, a.getLineCount(), s)), a._register(a.viewLayout.onDidScroll((function (e) {
  30071. e.scrollTopChanged && a._tokenizeViewportSoon.schedule();
  30072. try {
  30073. a._beginEmit().emit(new c.ViewScrollChangedEvent(e))
  30074. } finally {
  30075. a._endEmit()
  30076. }
  30077. }))), a._register(a.viewLayout.onDidContentSizeChange((function (e) {
  30078. try {
  30079. a._beginEmit().emit(new c.ViewContentSizeChangedEvent(e))
  30080. } finally {
  30081. a._endEmit()
  30082. }
  30083. }))), a.decorations = new f.ViewModelDecorations(a.editorId, a.model, a.configuration, a.lines, a.coordinatesConverter), a._registerModelEvents(), a._register(a.configuration.onDidChange((function (e) {
  30084. try {
  30085. var t = a._beginEmit();
  30086. a._onConfigurationChanged(t, e)
  30087. } finally {
  30088. a._endEmit()
  30089. }
  30090. }))), a._register(d.MinimapTokensColorTracker.getInstance().onDidChange((function () {
  30091. try {
  30092. a._beginEmit().emit(new c.ViewTokensColorsChangedEvent)
  30093. } finally {
  30094. a._endEmit()
  30095. }
  30096. }))), a
  30097. }
  30098. return r(t, e), t.prototype.dispose = function () {
  30099. e.prototype.dispose.call(this), this.decorations.dispose(), this.lines.dispose(), this.invalidateMinimapColorCache(), this.viewportStartLineTrackedRange = this.model._setTrackedRange(this.viewportStartLineTrackedRange, null, 1)
  30100. },
  30101. t.prototype.tokenizeViewport = function () {
  30102. var e = this.viewLayout.getLinesViewportData(),
  30103. t = this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(e.startLineNumber, 1)),
  30104. n = this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(e.endLineNumber, 1));
  30105. this.model.tokenizeViewport(t.lineNumber, n.lineNumber)
  30106. }, t.prototype.setHasFocus = function (e) {
  30107. this.hasFocus = e
  30108. }, t.prototype._onConfigurationChanged = function (e, t) {
  30109. var n = null;
  30110. if (-1 !== this.viewportStartLine) {
  30111. var i = new s.Position(this.viewportStartLine, this.getLineMinColumn(this.viewportStartLine));
  30112. n = this.coordinatesConverter.convertViewPositionToModelPosition(i)
  30113. }
  30114. var o = !1, r = this.configuration.options, a = r.get(34), l = r.get(103), u = r.get(108),
  30115. d = r.get(102);
  30116. if (this.lines.setWrappingSettings(a, l, u.wrappingColumn, d) && (e.emit(new c.ViewFlushedEvent), e.emit(new c.ViewLineMappingChangedEvent), e.emit(new c.ViewDecorationsChangedEvent), this.decorations.onLineMappingChanged(), this.viewLayout.onFlushed(this.getLineCount()),
  30117. 0 !== this.viewLayout.getCurrentScrollTop() && (o = !0)), t.hasChanged(68) && (this.decorations.reset(), e.emit(new c.ViewDecorationsChangedEvent)), e.emit(new c.ViewConfigurationChangedEvent(t)), this.viewLayout.onConfigurationChanged(t), o && n) {
  30118. var h = this.coordinatesConverter.convertModelPositionToViewPosition(n),
  30119. p = this.viewLayout.getVerticalOffsetForLineNumber(h.lineNumber);
  30120. this.viewLayout.setScrollPositionNow({scrollTop: p + this.viewportStartLineDelta})
  30121. }
  30122. }, t.prototype._registerModelEvents = function () {
  30123. var e = this;
  30124. this._register(this.model.onDidChangeRawContentFast((function (t) {
  30125. try {
  30126. for (var n = e._beginEmit(), i = !1, o = !1, r = t.changes, s = t.versionId, a = e.lines.createLineBreaksComputer(), l = 0, u = r; l < u.length; l++) {
  30127. switch ((_ = u[l]).changeType) {
  30128. case 4:
  30129. for (var d = 0, h = _.detail; d < h.length; d++) {
  30130. var p = h[d];
  30131. a.addRequest(p, null)
  30132. }
  30133. break;
  30134. case 2:
  30135. a.addRequest(_.detail, null)
  30136. }
  30137. }
  30138. for (var g = a.finalize(), f = 0, m = 0, v = r; m < v.length; m++) {
  30139. var _;
  30140. switch ((_ = v[m]).changeType) {
  30141. case 1:
  30142. e.lines.onModelFlushed(), n.emit(new c.ViewFlushedEvent), e.decorations.reset(),
  30143. e.viewLayout.onFlushed(e.getLineCount()), i = !0;
  30144. break;
  30145. case 3:
  30146. null !== (L = e.lines.onModelLinesDeleted(s, _.fromLineNumber, _.toLineNumber)) && (n.emit(L), e.viewLayout.onLinesDeleted(L.fromLineNumber, L.toLineNumber)), i = !0;
  30147. break;
  30148. case 4:
  30149. var y = g.slice(f, f + _.detail.length);
  30150. f += _.detail.length, null !== (E = e.lines.onModelLinesInserted(s, _.fromLineNumber, _.toLineNumber, y)) && (n.emit(E), e.viewLayout.onLinesInserted(E.fromLineNumber, E.toLineNumber)), i = !0;
  30151. break;
  30152. case 2:
  30153. var C = g[f];
  30154. f++;
  30155. var b = e.lines.onModelLineChanged(s, _.lineNumber, C), S = b[0], w = b[1],
  30156. E = b[2], L = b[3];
  30157. o = S, w && n.emit(w), E && (n.emit(E), e.viewLayout.onLinesInserted(E.fromLineNumber, E.toLineNumber)), L && (n.emit(L), e.viewLayout.onLinesDeleted(L.fromLineNumber, L.toLineNumber))
  30158. }
  30159. }
  30160. e.lines.acceptVersionId(s), e.viewLayout.onHeightMaybeChanged(), !i && o && (n.emit(new c.ViewLineMappingChangedEvent), n.emit(new c.ViewDecorationsChangedEvent), e.decorations.onLineMappingChanged())
  30161. } finally {
  30162. e._endEmit()
  30163. }
  30164. if (e.viewportStartLine = -1, e.configuration.setMaxLineNumber(e.model.getLineCount()),
  30165. !e.hasFocus && e.model.getAttachedEditorCount() >= 2 && e.viewportStartLineTrackedRange) {
  30166. var D = e.model._getTrackedRange(e.viewportStartLineTrackedRange);
  30167. if (D) {
  30168. var N = e.coordinatesConverter.convertModelPositionToViewPosition(D.getStartPosition()),
  30169. x = e.viewLayout.getVerticalOffsetForLineNumber(N.lineNumber);
  30170. e.viewLayout.setScrollPositionNow({scrollTop: x + e.viewportStartLineDelta})
  30171. }
  30172. }
  30173. }))), this._register(this.model.onDidChangeTokens((function (t) {
  30174. for (var n = [], i = 0, o = t.ranges.length; i < o; i++) {
  30175. var r = t.ranges[i],
  30176. a = e.coordinatesConverter.convertModelPositionToViewPosition(new s.Position(r.fromLineNumber, 1)).lineNumber,
  30177. l = e.coordinatesConverter.convertModelPositionToViewPosition(new s.Position(r.toLineNumber, e.model.getLineMaxColumn(r.toLineNumber))).lineNumber;
  30178. n[i] = {fromLineNumber: a, toLineNumber: l}
  30179. }
  30180. try {
  30181. e._beginEmit().emit(new c.ViewTokensChangedEvent(n))
  30182. } finally {
  30183. e._endEmit()
  30184. }
  30185. t.tokenizationSupportChanged && e._tokenizeViewportSoon.schedule()
  30186. }))), this._register(this.model.onDidChangeLanguageConfiguration((function (t) {
  30187. try {
  30188. e._beginEmit().emit(new c.ViewLanguageConfigurationEvent)
  30189. } finally {
  30190. e._endEmit()
  30191. }
  30192. }))), this._register(this.model.onDidChangeOptions((function (t) {
  30193. if (e.lines.setTabSize(e.model.getOptions().tabSize)) {
  30194. e.decorations.onLineMappingChanged(), e.viewLayout.onFlushed(e.getLineCount());
  30195. try {
  30196. var n = e._beginEmit();
  30197. n.emit(new c.ViewFlushedEvent), n.emit(new c.ViewLineMappingChangedEvent), n.emit(new c.ViewDecorationsChangedEvent)
  30198. } finally {
  30199. e._endEmit()
  30200. }
  30201. }
  30202. }))), this._register(this.model.onDidChangeDecorations((function (t) {
  30203. e.decorations.onModelDecorationsChanged();
  30204. try {
  30205. e._beginEmit().emit(new c.ViewDecorationsChangedEvent)
  30206. } finally {
  30207. e._endEmit()
  30208. }
  30209. })))
  30210. }, t.prototype.setHiddenAreas = function (e) {
  30211. try {
  30212. var t = this._beginEmit();
  30213. this.lines.setHiddenAreas(e) && (t.emit(new c.ViewFlushedEvent), t.emit(new c.ViewLineMappingChangedEvent), t.emit(new c.ViewDecorationsChangedEvent), this.decorations.onLineMappingChanged(), this.viewLayout.onFlushed(this.getLineCount()), this.viewLayout.onHeightMaybeChanged())
  30214. } finally {
  30215. this._endEmit()
  30216. }
  30217. },
  30218. t.prototype.getVisibleRanges = function () {
  30219. var e = this.getCompletelyVisibleViewRange(),
  30220. t = this.coordinatesConverter.convertViewRangeToModelRange(e), n = this.lines.getHiddenAreas();
  30221. if (0 === n.length) return [t];
  30222. for (var i = [], o = 0, r = t.startLineNumber, s = t.startColumn, l = t.endLineNumber, u = t.endColumn, d = 0, c = n.length; d < c; d++) {
  30223. var h = n[d].startLineNumber, p = n[d].endLineNumber;
  30224. p < r || (h > l || (r < h && (i[o++] = new a.Range(r, s, h - 1, this.model.getLineMaxColumn(h - 1))), r = p + 1, s = 1))
  30225. }
  30226. return (r < l || r === l && s < u) && (i[o++] = new a.Range(r, s, l, u)), i
  30227. }, t.prototype.getCompletelyVisibleViewRange = function () {
  30228. var e = this.viewLayout.getLinesViewportData(), t = e.completelyVisibleStartLineNumber,
  30229. n = e.completelyVisibleEndLineNumber;
  30230. return new a.Range(t, this.getLineMinColumn(t), n, this.getLineMaxColumn(n))
  30231. }, t.prototype.getCompletelyVisibleViewRangeAtScrollTop = function (e) {
  30232. var t = this.viewLayout.getLinesViewportDataAtScrollTop(e), n = t.completelyVisibleStartLineNumber,
  30233. i = t.completelyVisibleEndLineNumber;
  30234. return new a.Range(n, this.getLineMinColumn(n), i, this.getLineMaxColumn(i))
  30235. },
  30236. t.prototype.saveState = function () {
  30237. var e = this.viewLayout.saveState(), t = e.scrollTop,
  30238. n = this.viewLayout.getLineNumberAtVerticalOffset(t),
  30239. i = this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(n, this.getLineMinColumn(n))),
  30240. o = this.viewLayout.getVerticalOffsetForLineNumber(n) - t;
  30241. return {scrollLeft: e.scrollLeft, firstPosition: i, firstPositionDeltaTop: o}
  30242. }, t.prototype.reduceRestoreState = function (e) {
  30243. if (void 0 === e.firstPosition) return this._reduceRestoreStateCompatibility(e);
  30244. var t = this.model.validatePosition(e.firstPosition),
  30245. n = this.coordinatesConverter.convertModelPositionToViewPosition(t),
  30246. i = this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber) - e.firstPositionDeltaTop;
  30247. return {scrollLeft: e.scrollLeft, scrollTop: i}
  30248. }, t.prototype._reduceRestoreStateCompatibility = function (e) {
  30249. return {scrollLeft: e.scrollLeft, scrollTop: e.scrollTopWithoutViewZones}
  30250. }, t.prototype.getTabSize = function () {
  30251. return this.model.getOptions().tabSize
  30252. }, t.prototype.getOptions = function () {
  30253. return this.model.getOptions()
  30254. },
  30255. t.prototype.getLineCount = function () {
  30256. return this.lines.getViewLineCount()
  30257. }, t.prototype.setViewport = function (e, t, n) {
  30258. this.viewportStartLine = e;
  30259. var i = this.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(e, this.getLineMinColumn(e)));
  30260. this.viewportStartLineTrackedRange = this.model._setTrackedRange(this.viewportStartLineTrackedRange, new a.Range(i.lineNumber, i.column, i.lineNumber, i.column), 1);
  30261. var o = this.viewLayout.getVerticalOffsetForLineNumber(e), r = this.viewLayout.getCurrentScrollTop();
  30262. this.viewportStartLineDelta = r - o
  30263. }, t.prototype.getActiveIndentGuide = function (e, t, n) {
  30264. return this.lines.getActiveIndentGuide(e, t, n)
  30265. }, t.prototype.getLinesIndentGuides = function (e, t) {
  30266. return this.lines.getViewLinesIndentGuides(e, t)
  30267. }, t.prototype.getLineContent = function (e) {
  30268. return this.lines.getViewLineContent(e)
  30269. }, t.prototype.getLineLength = function (e) {
  30270. return this.lines.getViewLineLength(e)
  30271. }, t.prototype.getLineMinColumn = function (e) {
  30272. return this.lines.getViewLineMinColumn(e)
  30273. }, t.prototype.getLineMaxColumn = function (e) {
  30274. return this.lines.getViewLineMaxColumn(e)
  30275. }, t.prototype.getLineFirstNonWhitespaceColumn = function (e) {
  30276. var t = i.firstNonWhitespaceIndex(this.getLineContent(e));
  30277. return -1 === t ? 0 : t + 1
  30278. }, t.prototype.getLineLastNonWhitespaceColumn = function (e) {
  30279. var t = i.lastNonWhitespaceIndex(this.getLineContent(e));
  30280. return -1 === t ? 0 : t + 2
  30281. }, t.prototype.getDecorationsInViewport = function (e) {
  30282. return this.decorations.getDecorationsViewportData(e).decorations
  30283. }, t.prototype.getViewLineRenderingData = function (e, t) {
  30284. var n = this.model.mightContainRTL(), i = this.model.mightContainNonBasicASCII(), o = this.getTabSize(),
  30285. r = this.lines.getViewLineData(t),
  30286. s = this.decorations.getDecorationsViewportData(e).inlineDecorations[t - e.startLineNumber];
  30287. return new g.ViewLineRenderingData(r.minColumn, r.maxColumn, r.content, r.continuesWithWrappedLine, n, i, r.tokens, s, o, r.startVisibleColumn)
  30288. }, t.prototype.getViewLineData = function (e) {
  30289. return this.lines.getViewLineData(e)
  30290. }, t.prototype.getMinimapLinesRenderingData = function (e, t, n) {
  30291. var i = this.lines.getViewLinesData(e, t, n)
  30292. ;
  30293. return new g.MinimapLinesRenderingData(this.getTabSize(), i)
  30294. }, t.prototype.getAllOverviewRulerDecorations = function (e) {
  30295. return this.lines.getAllOverviewRulerDecorations(this.editorId, o.filterValidationDecorations(this.configuration.options), e)
  30296. }, t.prototype.invalidateOverviewRulerColorCache = function () {
  30297. for (var e = 0, t = this.model.getOverviewRulerDecorations(); e < t.length; e++) {
  30298. var n = t[e].options.overviewRuler;
  30299. n && n.invalidateCachedColor()
  30300. }
  30301. }, t.prototype.invalidateMinimapColorCache = function () {
  30302. for (var e = 0, t = this.model.getAllDecorations(); e < t.length; e++) {
  30303. var n = t[e].options.minimap;
  30304. n && n.invalidateCachedColor()
  30305. }
  30306. }, t.prototype.getValueInRange = function (e, t) {
  30307. var n = this.coordinatesConverter.convertViewRangeToModelRange(e);
  30308. return this.model.getValueInRange(n, t)
  30309. }, t.prototype.getModelLineMaxColumn = function (e) {
  30310. return this.model.getLineMaxColumn(e)
  30311. }, t.prototype.validateModelPosition = function (e) {
  30312. return this.model.validatePosition(e)
  30313. }, t.prototype.validateModelRange = function (e) {
  30314. return this.model.validateRange(e)
  30315. },
  30316. t.prototype.deduceModelPositionRelativeToViewPosition = function (e, t, n) {
  30317. var i = this.coordinatesConverter.convertViewPositionToModelPosition(e);
  30318. 2 === this.model.getEOL().length && (t < 0 ? t -= n : t += n);
  30319. var o = this.model.getOffsetAt(i) + t;
  30320. return this.model.getPositionAt(o)
  30321. }, t.prototype.getEOL = function () {
  30322. return this.model.getEOL()
  30323. }, t.prototype.getPlainTextToCopy = function (e, t, n) {
  30324. var i = n ? "\r\n" : this.model.getEOL();
  30325. (e = e.slice(0)).sort(a.Range.compareRangesUsingStarts);
  30326. for (var o = !1, r = !1, s = 0, l = e; s < l.length; s++) {
  30327. l[s].isEmpty() ? o = !0 : r = !0
  30328. }
  30329. if (!r) {
  30330. if (!t) return "";
  30331. for (var u = e.map((function (e) {
  30332. return e.startLineNumber
  30333. })), d = "", c = 0; c < u.length; c++) c > 0 && u[c - 1] === u[c] || (d += this.model.getLineContent(u[c]) + i);
  30334. return d
  30335. }
  30336. if (o && t) {
  30337. for (var h = [], p = 0, g = 0, f = e; g < f.length; g++) {
  30338. var m = (C = f[g]).startLineNumber;
  30339. C.isEmpty() ? m !== p && h.push(this.model.getLineContent(m)) : h.push(this.model.getValueInRange(C, n ? 2 : 0)), p = m
  30340. }
  30341. return 1 === h.length ? h[0] : h
  30342. }
  30343. for (var v = [], _ = 0, y = e; _ < y.length; _++) {
  30344. var C;
  30345. (C = y[_]).isEmpty() || v.push(this.model.getValueInRange(C, n ? 2 : 0))
  30346. }
  30347. return 1 === v.length ? v[0] : v
  30348. }, t.prototype.getRichTextToCopy = function (e, t) {
  30349. var n = this.model.getLanguageIdentifier();
  30350. if (1 === n.id) return null;
  30351. if (1 !== e.length) return null;
  30352. var i = e[0];
  30353. if (i.isEmpty()) {
  30354. if (!t) return null;
  30355. var r = i.startLineNumber;
  30356. i = new a.Range(r, this.model.getLineMinColumn(r), r, this.model.getLineMaxColumn(r))
  30357. }
  30358. var s = this.configuration.options.get(34), l = this._getColorMap(),
  30359. u = s.fontFamily === o.EDITOR_FONT_DEFAULTS.fontFamily ? s.fontFamily : "'" + s.fontFamily + "', " + o.EDITOR_FONT_DEFAULTS.fontFamily;
  30360. return {
  30361. mode: n.language,
  30362. html: '<div style="color: ' + l[1] + ";background-color: " + l[2] + ";font-family: " + u + ";font-weight: " + s.fontWeight + ";font-size: " + s.fontSize + "px;line-height: " + s.lineHeight + 'px;white-space: pre;">' + this._getHTMLToCopy(i, l) + "</div>"
  30363. }
  30364. }, t.prototype._getHTMLToCopy = function (e, t) {
  30365. for (var n = e.startLineNumber, i = e.startColumn, o = e.endLineNumber, r = e.endColumn, s = this.getTabSize(), a = "", l = n; l <= o; l++) {
  30366. var d = this.model.getLineTokens(l), c = d.getLineContent(), h = l === n ? i - 1 : 0,
  30367. p = l === o ? r - 1 : c.length
  30368. ;a += "" === c ? "<br>" : u.tokenizeLineToHTML(c, d.inflate(), t, h, p, s, v.isWindows)
  30369. }
  30370. return a
  30371. }, t.prototype._getColorMap = function () {
  30372. var e = l.TokenizationRegistry.getColorMap(), t = ["#000000"];
  30373. if (e) for (var i = 1, o = e.length; i < o; i++) t[i] = n.Color.Format.CSS.formatHex(e[i]);
  30374. return t
  30375. }, t
  30376. }(c.ViewEventEmitter);
  30377. t.ViewModel = y
  30378. })),define(n[489], i([0, 1, 19, 26, 87, 10, 38, 17]), (function (e, t, n, i, o, s, a, l) {
  30379. "use strict";
  30380. Object.defineProperty(t, "__esModule", {value: !0});
  30381. var u = function () {
  30382. function e() {
  30383. }
  30384. return e.prototype.remove = function () {
  30385. this.parent && delete this.parent.children[this.id]
  30386. }, e.findId = function (e, t) {
  30387. var n;
  30388. "string" == typeof e ? n = t.id + "/" + e : (n = t.id + "/" + e.name, void 0 !== t.children[n] && (n = t.id + "/" + e.name + "_" + e.range.startLineNumber + "_" + e.range.startColumn));
  30389. for (var i = n, o = 0; void 0 !== t.children[i]; o++) i = n + "_" + o;
  30390. return i
  30391. }, e.empty = function (e) {
  30392. for (var t in e.children) return !1;
  30393. return !0
  30394. }, e
  30395. }();
  30396. t.TreeElement = u;
  30397. var d = function (e) {
  30398. function t(t, n, i) {
  30399. var o = e.call(this) || this;
  30400. return o.id = t, o.parent = n, o.symbol = i, o.children = Object.create(null), o
  30401. }
  30402. return r(t, e), t
  30403. }(u);
  30404. t.OutlineElement = d;
  30405. var c = function (e) {
  30406. function t(t, n, i, o) {
  30407. var r = e.call(this) || this;
  30408. return r.id = t, r.parent = n, r.provider = i, r.providerIndex = o, r.children = Object.create(null), r
  30409. }
  30410. return r(t, e), t
  30411. }(u);
  30412. t.OutlineGroup = c;
  30413. var h = function () {
  30414. function e() {
  30415. this._n = 1, this._val = 0
  30416. }
  30417. return e.prototype.update = function (e) {
  30418. return this._val = this._val + (e - this._val) / this._n, this._n += 1, this
  30419. }, e
  30420. }(), p = function (e) {
  30421. function t(t) {
  30422. var n = e.call(this) || this;
  30423. return n.textModel = t, n.id = "root", n.parent = void 0, n._groups = Object.create(null), n.children = Object.create(null), n.id = "root", n.parent = void 0, n
  30424. }
  30425. return r(t, e), t.create = function (e, n) {
  30426. var o = this, r = this._keys.for(e, !0), s = t._requests.get(r);
  30427. if (!s) {
  30428. var a = new i.CancellationTokenSource;
  30429. s = {
  30430. promiseCnt: 0,
  30431. source: a,
  30432. promise: t._create(e, a.token),
  30433. model: void 0
  30434. }, t._requests.set(r, s);
  30435. var l = Date.now();
  30436. s.promise.then((function () {
  30437. var t = o._keys.for(e, !1), n = o._requestDurations.get(t);
  30438. n || (n = new h, o._requestDurations.set(t, n)), n.update(Date.now() - l)
  30439. }))
  30440. }
  30441. return s.model ? Promise.resolve(s.model) : (s.promiseCnt += 1,
  30442. n.onCancellationRequested((function () {
  30443. 0 == --s.promiseCnt && (s.source.cancel(), t._requests.delete(r))
  30444. })), new Promise((function (e, n) {
  30445. s.promise.then((function (t) {
  30446. s.model = t, e(t)
  30447. }), (function (e) {
  30448. t._requests.delete(r), n(e)
  30449. }))
  30450. })))
  30451. }, t._create = function (e, o) {
  30452. var r = new i.CancellationTokenSource(o), a = new t(e), d = l.DocumentSymbolProviderRegistry.ordered(e),
  30453. h = d.map((function (e, n) {
  30454. var i = u.findId("provider_" + n, a), o = new c(i, a, e, n);
  30455. return Promise.resolve(e.provideDocumentSymbols(a.textModel, r.token)).then((function (e) {
  30456. for (var n = 0, i = e || []; n < i.length; n++) {
  30457. var r = i[n];
  30458. t._makeOutlineElement(r, o)
  30459. }
  30460. return o
  30461. }), (function (e) {
  30462. return s.onUnexpectedExternalError(e), o
  30463. })).then((function (e) {
  30464. u.empty(e) ? e.remove() : a._groups[i] = e
  30465. }))
  30466. })), p = l.DocumentSymbolProviderRegistry.onDidChange((function () {
  30467. var t = l.DocumentSymbolProviderRegistry.ordered(e);
  30468. n.equals(t, d) || r.cancel()
  30469. }));
  30470. return Promise.all(h).then((function () {
  30471. return r.token.isCancellationRequested && !o.isCancellationRequested ? t._create(e, o) : a._compact()
  30472. })).finally((function () {
  30473. p.dispose()
  30474. }))
  30475. },
  30476. t._makeOutlineElement = function (e, n) {
  30477. var i = u.findId(e, n), o = new d(i, n, e);
  30478. if (e.children) for (var r = 0, s = e.children; r < s.length; r++) {
  30479. var a = s[r];
  30480. t._makeOutlineElement(a, o)
  30481. }
  30482. n.children[o.id] = o
  30483. }, t.prototype._compact = function () {
  30484. var e = 0;
  30485. for (var t in this._groups) {
  30486. var n = this._groups[t];
  30487. void 0 === o.first(n.children) ? delete this._groups[t] : e += 1
  30488. }
  30489. if (1 !== e) this.children = this._groups; else {
  30490. n = o.first(this._groups);
  30491. for (var t in n.children) {
  30492. var i = n.children[t];
  30493. i.parent = this, this.children[i.id] = i
  30494. }
  30495. }
  30496. return this
  30497. }, t._requestDurations = new a.LRUCache(50, .7), t._requests = new a.LRUCache(9, .75), t._keys = new (function () {
  30498. function e() {
  30499. this._counter = 1, this._data = new WeakMap
  30500. }
  30501. return e.prototype.for = function (e, t) {
  30502. return e.id + "/" + (t ? e.getVersionId() : "") + "/" + this._hash(l.DocumentSymbolProviderRegistry.all(e))
  30503. }, e.prototype._hash = function (e) {
  30504. for (var t = "", n = 0, i = e; n < i.length; n++) {
  30505. var o = i[n], r = this._data.get(o);
  30506. void 0 === r && (r = this._counter++, this._data.set(o, r)), t += r
  30507. }
  30508. return t
  30509. }, e
  30510. }()), t
  30511. }(u);
  30512. t.OutlineModel = p
  30513. })),define(n[490], i([0, 1, 30]), (function (e, t, n) {
  30514. "use strict";
  30515. Object.defineProperty(t, "__esModule", {value: !0});
  30516. var i = function () {
  30517. function e(e) {
  30518. this.editor = e, this.autoHideFoldingControls = !0, this.showFoldingHighlights = !0
  30519. }
  30520. return e.prototype.getDecorationOption = function (t) {
  30521. return t ? this.showFoldingHighlights ? e.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : e.COLLAPSED_VISUAL_DECORATION : this.autoHideFoldingControls ? e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION : e.EXPANDED_VISUAL_DECORATION
  30522. }, e.prototype.deltaDecorations = function (e, t) {
  30523. return this.editor.deltaDecorations(e, t)
  30524. }, e.prototype.changeDecorations = function (e) {
  30525. return this.editor.changeDecorations(e)
  30526. }, e.COLLAPSED_VISUAL_DECORATION = n.ModelDecorationOptions.register({
  30527. stickiness: 1,
  30528. afterContentClassName: "inline-folded",
  30529. linesDecorationsClassName: "codicon codicon-chevron-right"
  30530. }), e.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = n.ModelDecorationOptions.register({
  30531. stickiness: 1,
  30532. afterContentClassName: "inline-folded",
  30533. className: "folded-background",
  30534. isWholeLine: !0,
  30535. linesDecorationsClassName: "codicon codicon-chevron-right"
  30536. }),
  30537. e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION = n.ModelDecorationOptions.register({
  30538. stickiness: 1,
  30539. linesDecorationsClassName: "codicon codicon-chevron-down"
  30540. }), e.EXPANDED_VISUAL_DECORATION = n.ModelDecorationOptions.register({
  30541. stickiness: 1,
  30542. linesDecorationsClassName: "codicon codicon-chevron-down alwaysShowFoldIcons"
  30543. }), e
  30544. }();
  30545. t.FoldingDecorationProvider = i
  30546. })),define(n[491], i([0, 1, 150, 30, 41]), (function (e, t, n, i, o) {
  30547. "use strict";
  30548. Object.defineProperty(t, "__esModule", {value: !0});
  30549. var r = 5e3;
  30550. t.ID_INDENT_PROVIDER = "indent";
  30551. var s = function () {
  30552. function e(e) {
  30553. this.editorModel = e, this.id = t.ID_INDENT_PROVIDER
  30554. }
  30555. return e.prototype.dispose = function () {
  30556. }, e.prototype.compute = function (e) {
  30557. var t = o.LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id),
  30558. n = t && !!t.offSide, i = t && t.markers;
  30559. return Promise.resolve(l(this.editorModel, n, i))
  30560. }, e
  30561. }();
  30562. t.IndentRangeProvider = s;
  30563. var a = function () {
  30564. function e(e) {
  30565. this._startIndexes = [], this._endIndexes = [], this._indentOccurrences = [], this._length = 0, this._foldingRangesLimit = e
  30566. }
  30567. return e.prototype.insertFirst = function (e, t, i) {
  30568. if (!(e > n.MAX_LINE_NUMBER || t > n.MAX_LINE_NUMBER)) {
  30569. var o = this._length;
  30570. this._startIndexes[o] = e, this._endIndexes[o] = t, this._length++, i < 1e3 && (this._indentOccurrences[i] = (this._indentOccurrences[i] || 0) + 1)
  30571. }
  30572. }, e.prototype.toIndentRanges = function (e) {
  30573. if (this._length <= this._foldingRangesLimit) {
  30574. for (var t = new Uint32Array(this._length), o = new Uint32Array(this._length), r = this._length - 1, s = 0; r >= 0; r--, s++) t[s] = this._startIndexes[r], o[s] = this._endIndexes[r];
  30575. return new n.FoldingRegions(t, o)
  30576. }
  30577. var a = 0, l = this._indentOccurrences.length;
  30578. for (r = 0; r < this._indentOccurrences.length; r++) {
  30579. var u = this._indentOccurrences[r];
  30580. if (u) {
  30581. if (u + a > this._foldingRangesLimit) {
  30582. l = r;
  30583. break
  30584. }
  30585. a += u
  30586. }
  30587. }
  30588. var d = e.getOptions().tabSize;
  30589. for (t = new Uint32Array(this._foldingRangesLimit), o = new Uint32Array(this._foldingRangesLimit), r = this._length - 1, s = 0; r >= 0; r--) {
  30590. var c = this._startIndexes[r], h = e.getLineContent(c), p = i.TextModel.computeIndentLevel(h, d);
  30591. (p < l || p === l && a++ < this._foldingRangesLimit) && (t[s] = c, o[s] = this._endIndexes[r], s++)
  30592. }
  30593. return new n.FoldingRegions(t, o)
  30594. }, e
  30595. }();
  30596. function l(e, t, n, o) {
  30597. void 0 === o && (o = r);
  30598. var s = e.getOptions().tabSize, l = new a(o), u = void 0;
  30599. n && (u = new RegExp("(" + n.start.source + ")|(?:" + n.end.source + ")"));
  30600. var d = [], c = e.getLineCount() + 1;
  30601. d.push({indent: -1, endAbove: c, line: c});
  30602. for (var h = e.getLineCount(); h > 0; h--) {
  30603. var p = e.getLineContent(h), g = i.TextModel.computeIndentLevel(p, s), f = d[d.length - 1];
  30604. if (-1 !== g) {
  30605. var m = void 0;
  30606. if (u && (m = p.match(u))) {
  30607. if (!m[1]) {
  30608. d.push({indent: -2, endAbove: h, line: h});
  30609. continue
  30610. }
  30611. for (var v = d.length - 1; v > 0 && -2 !== d[v].indent;) v--;
  30612. if (v > 0) {
  30613. d.length = v + 1, f = d[v], l.insertFirst(h, f.line, g), f.line = h, f.indent = g, f.endAbove = h;
  30614. continue
  30615. }
  30616. }
  30617. if (f.indent > g) {
  30618. do {
  30619. d.pop(), f = d[d.length - 1]
  30620. } while (f.indent > g);
  30621. var _ = f.endAbove - 1;
  30622. _ - h >= 1 && l.insertFirst(h, _, g)
  30623. }
  30624. f.indent === g ? f.endAbove = h : d.push({indent: g, endAbove: h, line: h})
  30625. } else t && (f.endAbove = h)
  30626. }
  30627. return l.toIndentRanges(e)
  30628. }
  30629. t.RangesCollector = a, t.computeRanges = l
  30630. })),define(n[492], i([0, 1, 5, 211, 3, 22, 90, 41, 385]), (function (e, t, n, i, o, r, s, a, l) {
  30631. "use strict";
  30632. Object.defineProperty(t, "__esModule", {value: !0})
  30633. ;var u = function () {
  30634. function e(e, t, n) {
  30635. this._selection = e, this._isMovingDown = t, this._autoIndent = n, this._selectionId = null, this._moveEndLineSelectionShrink = !1
  30636. }
  30637. return e.prototype.getEditOperations = function (e, t) {
  30638. var i = e.getLineCount();
  30639. if (this._isMovingDown && this._selection.endLineNumber === i) this._selectionId = t.trackSelection(this._selection); else if (this._isMovingDown || 1 !== this._selection.startLineNumber) {
  30640. this._moveEndPositionDown = !1;
  30641. var s = this._selection;
  30642. s.startLineNumber < s.endLineNumber && 1 === s.endColumn && (this._moveEndPositionDown = !0, s = s.setEndPosition(s.endLineNumber - 1, e.getLineMaxColumn(s.endLineNumber - 1)));
  30643. var u = e.getOptions(), d = u.tabSize, c = u.indentSize, h = u.insertSpaces,
  30644. p = this.buildIndentConverter(d, c, h), g = {
  30645. getLineTokens: function (t) {
  30646. return e.getLineTokens(t)
  30647. }, getLanguageIdentifier: function () {
  30648. return e.getLanguageIdentifier()
  30649. }, getLanguageIdAtPosition: function (t, n) {
  30650. return e.getLanguageIdAtPosition(t, n)
  30651. }, getLineContent: null
  30652. };
  30653. if (s.startLineNumber === s.endLineNumber && 1 === e.getLineMaxColumn(s.startLineNumber)) {
  30654. var f = s.startLineNumber, m = this._isMovingDown ? f + 1 : f - 1;
  30655. 1 === e.getLineMaxColumn(m) ? t.addEditOperation(new o.Range(1, 1, 1, 1), null) : (t.addEditOperation(new o.Range(f, 1, f, 1), e.getLineContent(m)), t.addEditOperation(new o.Range(m, 1, m, e.getLineMaxColumn(m)), null)), s = new r.Selection(m, 1, m, 1)
  30656. } else {
  30657. var v, _ = void 0;
  30658. if (this._isMovingDown) {
  30659. v = s.endLineNumber + 1, _ = e.getLineContent(v), t.addEditOperation(new o.Range(v - 1, e.getLineMaxColumn(v - 1), v, e.getLineMaxColumn(v)), null);
  30660. var y = _;
  30661. if (this.shouldAutoIndent(e, s)) {
  30662. var C = this.matchEnterRule(e, p, d, v, s.startLineNumber - 1);
  30663. if (null !== C) {
  30664. var b = n.getLeadingWhitespace(e.getLineContent(v)), S = C + l.getSpaceCnt(b, d),
  30665. w = l.generateIndent(S, d, h);
  30666. y = w + this.trimLeft(_)
  30667. } else {
  30668. g.getLineContent = function (t) {
  30669. return t === s.startLineNumber ? e.getLineContent(v) : e.getLineContent(t)
  30670. };
  30671. var E = a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, g, e.getLanguageIdAtPosition(v, 1), s.startLineNumber, p);
  30672. if (null !== E) {
  30673. b = n.getLeadingWhitespace(e.getLineContent(v))
  30674. ;
  30675. if ((S = l.getSpaceCnt(E, d)) !== (I = l.getSpaceCnt(b, d))) {
  30676. w = l.generateIndent(S, d, h);
  30677. y = w + this.trimLeft(_)
  30678. }
  30679. }
  30680. }
  30681. if (t.addEditOperation(new o.Range(s.startLineNumber, 1, s.startLineNumber, 1), y + "\n"), null !== (N = this.matchEnterRule(e, p, d, s.startLineNumber, s.startLineNumber, y))) 0 !== N && this.getIndentEditsOfMovingBlock(e, t, s, d, h, N); else {
  30682. g.getLineContent = function (t) {
  30683. return t === s.startLineNumber ? y : t >= s.startLineNumber + 1 && t <= s.endLineNumber + 1 ? e.getLineContent(t - 1) : e.getLineContent(t)
  30684. };
  30685. var L = a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, g, e.getLanguageIdAtPosition(v, 1), s.startLineNumber + 1, p);
  30686. if (null !== L) {
  30687. b = n.getLeadingWhitespace(e.getLineContent(s.startLineNumber));
  30688. if ((S = l.getSpaceCnt(L, d)) !== (I = l.getSpaceCnt(b, d))) {
  30689. var D = S - I;
  30690. this.getIndentEditsOfMovingBlock(e, t, s, d, h, D)
  30691. }
  30692. }
  30693. }
  30694. } else t.addEditOperation(new o.Range(s.startLineNumber, 1, s.startLineNumber, 1), y + "\n")
  30695. } else {
  30696. var N;
  30697. if (v = s.startLineNumber - 1, _ = e.getLineContent(v), t.addEditOperation(new o.Range(v, 1, v + 1, 1), null),
  30698. t.addEditOperation(new o.Range(s.endLineNumber, e.getLineMaxColumn(s.endLineNumber), s.endLineNumber, e.getLineMaxColumn(s.endLineNumber)), "\n" + _), this.shouldAutoIndent(e, s)) if (g.getLineContent = function (t) {
  30699. return t === v ? e.getLineContent(s.startLineNumber) : e.getLineContent(t)
  30700. }, null !== (N = this.matchEnterRule(e, p, d, s.startLineNumber, s.startLineNumber - 2))) 0 !== N && this.getIndentEditsOfMovingBlock(e, t, s, d, h, N); else {
  30701. var x = a.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, g, e.getLanguageIdAtPosition(s.startLineNumber, 1), v, p);
  30702. if (null !== x) {
  30703. var I, M = n.getLeadingWhitespace(e.getLineContent(s.startLineNumber));
  30704. if ((S = l.getSpaceCnt(x, d)) !== (I = l.getSpaceCnt(M, d))) {
  30705. D = S - I;
  30706. this.getIndentEditsOfMovingBlock(e, t, s, d, h, D)
  30707. }
  30708. }
  30709. }
  30710. }
  30711. }
  30712. this._selectionId = t.trackSelection(s)
  30713. } else this._selectionId = t.trackSelection(this._selection)
  30714. }, e.prototype.buildIndentConverter = function (e, t, n) {
  30715. return {
  30716. shiftIndent: function (o) {
  30717. return i.ShiftCommand.shiftIndent(o, o.length + 1, e, t, n)
  30718. }, unshiftIndent: function (o) {
  30719. return i.ShiftCommand.unshiftIndent(o, o.length + 1, e, t, n)
  30720. }
  30721. }
  30722. }, e.prototype.matchEnterRule = function (e, t, i, r, u, d) {
  30723. for (var c = u; c >= 1;) {
  30724. var h = void 0;
  30725. if (h = c === u && void 0 !== d ? d : e.getLineContent(c), n.lastNonWhitespaceIndex(h) >= 0) break;
  30726. c--
  30727. }
  30728. if (c < 1 || r > e.getLineCount()) return null;
  30729. var p = e.getLineMaxColumn(c),
  30730. g = a.LanguageConfigurationRegistry.getEnterAction(this._autoIndent, e, new o.Range(c, p, c, p));
  30731. if (g) {
  30732. var f = g.indentation;
  30733. g.indentAction === s.IndentAction.None ? f = g.indentation + g.appendText : g.indentAction === s.IndentAction.Indent ? f = g.indentation + g.appendText : g.indentAction === s.IndentAction.IndentOutdent ? f = g.indentation : g.indentAction === s.IndentAction.Outdent && (f = t.unshiftIndent(g.indentation) + g.appendText);
  30734. var m = e.getLineContent(r);
  30735. if (this.trimLeft(m).indexOf(this.trimLeft(f)) >= 0) {
  30736. var v = n.getLeadingWhitespace(e.getLineContent(r)), _ = n.getLeadingWhitespace(f),
  30737. y = a.LanguageConfigurationRegistry.getIndentMetadata(e, r);
  30738. return null !== y && 2 & y && (_ = t.unshiftIndent(_)), l.getSpaceCnt(_, i) - l.getSpaceCnt(v, i)
  30739. }
  30740. }
  30741. return null
  30742. },
  30743. e.prototype.trimLeft = function (e) {
  30744. return e.replace(/^\s+/, "")
  30745. }, e.prototype.shouldAutoIndent = function (e, t) {
  30746. if (this._autoIndent < 4) return !1;
  30747. if (!e.isCheapToTokenize(t.startLineNumber)) return !1;
  30748. var n = e.getLanguageIdAtPosition(t.startLineNumber, 1);
  30749. return n === e.getLanguageIdAtPosition(t.endLineNumber, 1) && null !== a.LanguageConfigurationRegistry.getIndentRulesSupport(n)
  30750. }, e.prototype.getIndentEditsOfMovingBlock = function (e, t, i, r, s, a) {
  30751. for (var u = i.startLineNumber; u <= i.endLineNumber; u++) {
  30752. var d = e.getLineContent(u), c = n.getLeadingWhitespace(d), h = l.getSpaceCnt(c, r) + a,
  30753. p = l.generateIndent(h, r, s);
  30754. p !== c && (t.addEditOperation(new o.Range(u, 1, u, c.length + 1), p), u === i.endLineNumber && i.endColumn <= c.length + 1 && "" === p && (this._moveEndLineSelectionShrink = !0))
  30755. }
  30756. }, e.prototype.computeCursorState = function (e, t) {
  30757. var n = t.getTrackedSelection(this._selectionId);
  30758. return this._moveEndPositionDown && (n = n.setEndPosition(n.endLineNumber + 1, 1)), this._moveEndLineSelectionShrink && n.startLineNumber < n.endLineNumber && (n = n.setEndPosition(n.endLineNumber, 2)), n
  30759. }, e
  30760. }()
  30761. ;t.MoveLinesCommand = u
  30762. })),define(n[493], i([0, 1, 6, 104, 27, 127, 2, 31, 3, 30, 324]), (function (e, t, n, i, o, r, s, a, l, u) {
  30763. "use strict";
  30764. Object.defineProperty(t, "__esModule", {value: !0});
  30765. var d = new o.Color(new o.RGBA(0, 122, 204)),
  30766. c = {showArrow: !0, showFrame: !0, className: "", frameColor: d, arrowColor: d, keepEditorSelection: !1},
  30767. h = function () {
  30768. function e(e, t, n, i, o, r) {
  30769. this.id = "", this.domNode = e, this.afterLineNumber = t, this.afterColumn = n, this.heightInLines = i, this._onDomNodeTop = o, this._onComputedHeight = r
  30770. }
  30771. return e.prototype.onDomNodeTop = function (e) {
  30772. this._onDomNodeTop(e)
  30773. }, e.prototype.onComputedHeight = function (e) {
  30774. this._onComputedHeight(e)
  30775. }, e
  30776. }();
  30777. t.ViewZoneDelegate = h;
  30778. var p = function () {
  30779. function e(e, t) {
  30780. this._id = e, this._domNode = t
  30781. }
  30782. return e.prototype.getId = function () {
  30783. return this._id
  30784. }, e.prototype.getDomNode = function () {
  30785. return this._domNode
  30786. }, e.prototype.getPosition = function () {
  30787. return null
  30788. }, e
  30789. }();
  30790. t.OverlayWidgetDelegate = p;
  30791. var g = function () {
  30792. function e(t) {
  30793. this._editor = t, this._ruleName = e._IdGenerator.nextId(), this._decorations = [], this._color = null, this._height = -1
  30794. }
  30795. return e.prototype.dispose = function () {
  30796. this.hide(), n.removeCSSRulesContainingSelector(this._ruleName)
  30797. }, Object.defineProperty(e.prototype, "color", {
  30798. set: function (e) {
  30799. this._color !== e && (this._color = e, this._updateStyle())
  30800. }, enumerable: !0, configurable: !0
  30801. }), Object.defineProperty(e.prototype, "height", {
  30802. set: function (e) {
  30803. this._height !== e && (this._height = e, this._updateStyle())
  30804. }, enumerable: !0, configurable: !0
  30805. }), e.prototype._updateStyle = function () {
  30806. n.removeCSSRulesContainingSelector(this._ruleName), n.createCSSRule(".monaco-editor " + this._ruleName, "border-style: solid; border-color: transparent; border-bottom-color: " + this._color + "; border-width: " + this._height + "px; bottom: -" + this._height + "px; margin-left: -" + this._height + "px; ")
  30807. }, e.prototype.show = function (e) {
  30808. this._decorations = this._editor.deltaDecorations(this._decorations, [{
  30809. range: l.Range.fromPositions(e),
  30810. options: {className: this._ruleName, stickiness: 1}
  30811. }])
  30812. }, e.prototype.hide = function () {
  30813. this._editor.deltaDecorations(this._decorations, [])
  30814. },
  30815. e._IdGenerator = new r.IdGenerator(".arrow-decoration-"), e
  30816. }(), f = function () {
  30817. function e(e, t) {
  30818. var n = this;
  30819. void 0 === t && (t = {}), this._arrow = null, this._overlayWidget = null, this._resizeSash = null, this._positionMarkerId = [], this._viewZone = null, this._disposables = new s.DisposableStore, this.container = null, this._isShowing = !1, this.editor = e, this.options = a.deepClone(t), a.mixin(this.options, c, !1), this.domNode = document.createElement("div"), this.options.isAccessible || (this.domNode.setAttribute("aria-hidden", "true"), this.domNode.setAttribute("role", "presentation")), this._disposables.add(this.editor.onDidLayoutChange((function (e) {
  30820. var t = n._getWidth(e);
  30821. n.domNode.style.width = t + "px", n.domNode.style.left = n._getLeft(e) + "px", n._onWidth(t)
  30822. })))
  30823. }
  30824. return e.prototype.dispose = function () {
  30825. var e = this;
  30826. this._overlayWidget && (this.editor.removeOverlayWidget(this._overlayWidget), this._overlayWidget = null), this._viewZone && this.editor.changeViewZones((function (t) {
  30827. e._viewZone && t.removeZone(e._viewZone.id), e._viewZone = null
  30828. })),
  30829. this.editor.deltaDecorations(this._positionMarkerId, []), this._positionMarkerId = [], this._disposables.dispose()
  30830. }, e.prototype.create = function () {
  30831. n.addClass(this.domNode, "zone-widget"), this.options.className && n.addClass(this.domNode, this.options.className), this.container = document.createElement("div"), n.addClass(this.container, "zone-widget-container"), this.domNode.appendChild(this.container), this.options.showArrow && (this._arrow = new g(this.editor), this._disposables.add(this._arrow)), this._fillContainer(this.container), this._initSash(), this._applyStyles()
  30832. }, e.prototype.style = function (e) {
  30833. e.frameColor && (this.options.frameColor = e.frameColor), e.arrowColor && (this.options.arrowColor = e.arrowColor), this._applyStyles()
  30834. }, e.prototype._applyStyles = function () {
  30835. if (this.container && this.options.frameColor) {
  30836. var e = this.options.frameColor.toString();
  30837. this.container.style.borderTopColor = e, this.container.style.borderBottomColor = e
  30838. }
  30839. if (this._arrow && this.options.arrowColor) {
  30840. var t = this.options.arrowColor.toString();
  30841. this._arrow.color = t
  30842. }
  30843. },
  30844. e.prototype._getWidth = function (e) {
  30845. return e.width - e.minimapWidth - e.verticalScrollbarWidth
  30846. }, e.prototype._getLeft = function (e) {
  30847. return e.minimapWidth > 0 && 0 === e.minimapLeft ? e.minimapWidth : 0
  30848. }, e.prototype._onViewZoneTop = function (e) {
  30849. this.domNode.style.top = e + "px"
  30850. }, e.prototype._onViewZoneHeight = function (e) {
  30851. if (this.domNode.style.height = e + "px", this.container) {
  30852. var t = e - this._decoratingElementsHeight();
  30853. this.container.style.height = t + "px";
  30854. var n = this.editor.getLayoutInfo();
  30855. this._doLayout(t, this._getWidth(n))
  30856. }
  30857. this._resizeSash && this._resizeSash.layout()
  30858. }, Object.defineProperty(e.prototype, "position", {
  30859. get: function () {
  30860. var e = this._positionMarkerId[0];
  30861. if (e) {
  30862. var t = this.editor.getModel();
  30863. if (t) {
  30864. var n = t.getDecorationRange(e);
  30865. if (n) return n.getStartPosition()
  30866. }
  30867. }
  30868. }, enumerable: !0, configurable: !0
  30869. }), e.prototype.show = function (e, t) {
  30870. var n = l.Range.isIRange(e) ? l.Range.lift(e) : l.Range.fromPositions(e);
  30871. this._isShowing = !0, this._showImpl(n, t), this._isShowing = !1, this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{
  30872. range: n,
  30873. options: u.ModelDecorationOptions.EMPTY
  30874. }])
  30875. }, e.prototype.hide = function () {
  30876. var e = this;
  30877. this._viewZone && (this.editor.changeViewZones((function (t) {
  30878. e._viewZone && t.removeZone(e._viewZone.id)
  30879. })), this._viewZone = null), this._overlayWidget && (this.editor.removeOverlayWidget(this._overlayWidget), this._overlayWidget = null), this._arrow && this._arrow.hide()
  30880. }, e.prototype._decoratingElementsHeight = function () {
  30881. var e = this.editor.getOption(49), t = 0;
  30882. this.options.showArrow && (t += 2 * Math.round(e / 3));
  30883. this.options.showFrame && (t += 2 * Math.round(e / 9));
  30884. return t
  30885. }, e.prototype._showImpl = function (e, t) {
  30886. var n = this, i = e.getStartPosition(), o = this.editor.getLayoutInfo(), r = this._getWidth(o);
  30887. this.domNode.style.width = r + "px", this.domNode.style.left = this._getLeft(o) + "px";
  30888. var s = document.createElement("div");
  30889. s.style.overflow = "hidden";
  30890. var a = this.editor.getOption(49), l = this.editor.getLayoutInfo().height / a * .8;
  30891. t >= l && (t = l);
  30892. var u = 0, d = 0;
  30893. if (this._arrow && this.options.showArrow && (u = Math.round(a / 3), this._arrow.height = u, this._arrow.show(i)),
  30894. this.options.showFrame && (d = Math.round(a / 9)), this.editor.changeViewZones((function (e) {
  30895. n._viewZone && e.removeZone(n._viewZone.id), n._overlayWidget && (n.editor.removeOverlayWidget(n._overlayWidget), n._overlayWidget = null), n.domNode.style.top = "-1000px", n._viewZone = new h(s, i.lineNumber, i.column, t, (function (e) {
  30896. return n._onViewZoneTop(e)
  30897. }), (function (e) {
  30898. return n._onViewZoneHeight(e)
  30899. })), n._viewZone.id = e.addZone(n._viewZone), n._overlayWidget = new p("vs.editor.contrib.zoneWidget" + n._viewZone.id, n.domNode), n.editor.addOverlayWidget(n._overlayWidget)
  30900. })), this.container && this.options.showFrame) {
  30901. var c = this.options.frameWidth ? this.options.frameWidth : d;
  30902. this.container.style.borderTopWidth = c + "px", this.container.style.borderBottomWidth = c + "px"
  30903. }
  30904. var g = t * a - this._decoratingElementsHeight();
  30905. this.container && (this.container.style.top = u + "px", this.container.style.height = g + "px", this.container.style.overflow = "hidden"), this._doLayout(g, r), this.options.keepEditorSelection || this.editor.setSelection(e);
  30906. var f = this.editor.getModel();
  30907. if (f) {
  30908. var m = e.endLineNumber + 1;
  30909. m <= f.getLineCount() ? this.revealLine(m, !1) : this.revealLine(f.getLineCount(), !0)
  30910. }
  30911. }, e.prototype.revealLine = function (e, t) {
  30912. t ? this.editor.revealLineInCenter(e, 0) : this.editor.revealLine(e, 0)
  30913. }, e.prototype.setCssClass = function (e, t) {
  30914. this.container && (t && this.container.classList.remove(t), n.addClass(this.container, e))
  30915. }, e.prototype._onWidth = function (e) {
  30916. }, e.prototype._doLayout = function (e, t) {
  30917. }, e.prototype._relayout = function (e) {
  30918. var t = this;
  30919. this._viewZone && this._viewZone.heightInLines !== e && this.editor.changeViewZones((function (n) {
  30920. t._viewZone && (t._viewZone.heightInLines = e, n.layoutZone(t._viewZone.id))
  30921. }))
  30922. }, e.prototype._initSash = function () {
  30923. var e, t = this;
  30924. this._resizeSash || (this._resizeSash = this._disposables.add(new i.Sash(this.domNode, this, {orientation: 1})), this.options.isResizeable || (this._resizeSash.hide(), this._resizeSash.state = 0), this._disposables.add(this._resizeSash.onDidStart((function (n) {
  30925. t._viewZone && (e = {startY: n.startY, heightInLines: t._viewZone.heightInLines})
  30926. }))),
  30927. this._disposables.add(this._resizeSash.onDidEnd((function () {
  30928. e = void 0
  30929. }))), this._disposables.add(this._resizeSash.onDidChange((function (n) {
  30930. if (e) {
  30931. var i = (n.currentY - e.startY) / t.editor.getOption(49),
  30932. o = i < 0 ? Math.ceil(i) : Math.floor(i), r = e.heightInLines + o;
  30933. r > 5 && r < 35 && t._relayout(r)
  30934. }
  30935. }))))
  30936. }, e.prototype.getHorizontalSashLeft = function () {
  30937. return 0
  30938. }, e.prototype.getHorizontalSashTop = function () {
  30939. return (null === this.domNode.style.height ? 0 : parseInt(this.domNode.style.height)) - this._decoratingElementsHeight() / 2
  30940. }, e.prototype.getHorizontalSashWidth = function () {
  30941. var e = this.editor.getLayoutInfo();
  30942. return e.width - e.minimapWidth
  30943. }, e
  30944. }();
  30945. t.ZoneWidget = f
  30946. })),define(n[216], i([0, 1, 107, 17, 63, 203]), (function (e, t, n, i, o, r) {
  30947. "use strict";
  30948. Object.defineProperty(t, "__esModule", {value: !0});
  30949. var s = function () {
  30950. function e(e) {
  30951. this._maxCacheDepth = e, this._entries = Object.create(null)
  30952. }
  30953. return e.create = function (e, t) {
  30954. return this._INSTANCE.create(e, t)
  30955. }, e.prototype.create = function (e, t) {
  30956. if (null !== e && e.depth >= this._maxCacheDepth) return new a(e, t);
  30957. var n = a.getStackElementId(e)
  30958. ;n.length > 0 && (n += "|"), n += t;
  30959. var i = this._entries[n];
  30960. return i || (i = new a(e, t), this._entries[n] = i, i)
  30961. }, e._INSTANCE = new e(5), e
  30962. }(), a = function () {
  30963. function e(e, t) {
  30964. this.parent = e, this.state = t, this.depth = (this.parent ? this.parent.depth : 0) + 1
  30965. }
  30966. return e.getStackElementId = function (e) {
  30967. for (var t = ""; null !== e;) t.length > 0 && (t += "|"), t += e.state, e = e.parent;
  30968. return t
  30969. }, e._equals = function (e, t) {
  30970. for (; null !== e && null !== t;) {
  30971. if (e === t) return !0;
  30972. if (e.state !== t.state) return !1;
  30973. e = e.parent, t = t.parent
  30974. }
  30975. return null === e && null === t
  30976. }, e.prototype.equals = function (t) {
  30977. return e._equals(this, t)
  30978. }, e.prototype.push = function (e) {
  30979. return s.create(this, e)
  30980. }, e.prototype.pop = function () {
  30981. return this.parent
  30982. }, e.prototype.popall = function () {
  30983. for (var e = this; e.parent;) e = e.parent;
  30984. return e
  30985. }, e.prototype.switchTo = function (e) {
  30986. return s.create(this.parent, e)
  30987. }, e
  30988. }(), l = function () {
  30989. function e(e, t) {
  30990. this.modeId = e, this.state = t
  30991. }
  30992. return e.prototype.equals = function (e) {
  30993. return this.modeId === e.modeId && this.state.equals(e.state)
  30994. }, e.prototype.clone = function () {
  30995. return this.state.clone() === this.state ? this : new e(this.modeId, this.state)
  30996. }, e
  30997. }(), u = function () {
  30998. function e(e) {
  30999. this._maxCacheDepth = e, this._entries = Object.create(null)
  31000. }
  31001. return e.create = function (e, t) {
  31002. return this._INSTANCE.create(e, t)
  31003. }, e.prototype.create = function (e, t) {
  31004. if (null !== t) return new d(e, t);
  31005. if (null !== e && e.depth >= this._maxCacheDepth) return new d(e, t);
  31006. var n = a.getStackElementId(e), i = this._entries[n];
  31007. return i || (i = new d(e, null), this._entries[n] = i, i)
  31008. }, e._INSTANCE = new e(5), e
  31009. }(), d = function () {
  31010. function e(e, t) {
  31011. this.stack = e, this.embeddedModeData = t
  31012. }
  31013. return e.prototype.clone = function () {
  31014. return (this.embeddedModeData ? this.embeddedModeData.clone() : null) === this.embeddedModeData ? this : u.create(this.stack, this.embeddedModeData)
  31015. }, e.prototype.equals = function (t) {
  31016. return t instanceof e && (!!this.stack.equals(t.stack) && (null === this.embeddedModeData && null === t.embeddedModeData || null !== this.embeddedModeData && null !== t.embeddedModeData && this.embeddedModeData.equals(t.embeddedModeData)))
  31017. }, e
  31018. }(), c = function () {
  31019. function e() {
  31020. this._tokens = [],
  31021. this._language = null, this._lastTokenType = null, this._lastTokenLanguage = null
  31022. }
  31023. return e.prototype.enterMode = function (e, t) {
  31024. this._language = t
  31025. }, e.prototype.emit = function (e, t) {
  31026. this._lastTokenType === t && this._lastTokenLanguage === this._language || (this._lastTokenType = t, this._lastTokenLanguage = this._language, this._tokens.push(new n.Token(e, t, this._language)))
  31027. }, e.prototype.nestedModeTokenize = function (e, t, n) {
  31028. var o = t.modeId, r = t.state, s = i.TokenizationRegistry.get(o);
  31029. if (!s) return this.enterMode(n, o), this.emit(n, ""), r;
  31030. var a = s.tokenize(e, r, n);
  31031. return this._tokens = this._tokens.concat(a.tokens), this._lastTokenType = null, this._lastTokenLanguage = null, this._language = null, a.endState
  31032. }, e.prototype.finalize = function (e) {
  31033. return new n.TokenizationResult(this._tokens, e)
  31034. }, e
  31035. }(), h = function () {
  31036. function e(e, t) {
  31037. this._modeService = e, this._theme = t, this._prependTokens = null, this._tokens = [], this._currentLanguageId = 0, this._lastTokenMetadata = 0
  31038. }
  31039. return e.prototype.enterMode = function (e, t) {
  31040. this._currentLanguageId = this._modeService.getLanguageIdentifier(t).id
  31041. },
  31042. e.prototype.emit = function (e, t) {
  31043. var n = this._theme.match(this._currentLanguageId, t);
  31044. this._lastTokenMetadata !== n && (this._lastTokenMetadata = n, this._tokens.push(e), this._tokens.push(n))
  31045. }, e._merge = function (e, t, n) {
  31046. var i = null !== e ? e.length : 0, o = t.length, r = null !== n ? n.length : 0;
  31047. if (0 === i && 0 === o && 0 === r) return new Uint32Array(0);
  31048. if (0 === i && 0 === o) return n;
  31049. if (0 === o && 0 === r) return e;
  31050. var s = new Uint32Array(i + o + r);
  31051. null !== e && s.set(e);
  31052. for (var a = 0; a < o; a++) s[i + a] = t[a];
  31053. return null !== n && s.set(n, i + o), s
  31054. }, e.prototype.nestedModeTokenize = function (t, n, o) {
  31055. var r = n.modeId, s = n.state, a = i.TokenizationRegistry.get(r);
  31056. if (!a) return this.enterMode(o, r), this.emit(o, ""), s;
  31057. var l = a.tokenize2(t, s, o);
  31058. return this._prependTokens = e._merge(this._prependTokens, this._tokens, l.tokens), this._tokens = [], this._currentLanguageId = 0, this._lastTokenMetadata = 0, l.endState
  31059. }, e.prototype.finalize = function (t) {
  31060. return new n.TokenizationResult2(e._merge(this._prependTokens, this._tokens, null), t)
  31061. }, e
  31062. }(), p = function () {
  31063. function e(e, t, n, o) {
  31064. var r = this;
  31065. this._modeService = e,
  31066. this._standaloneThemeService = t, this._modeId = n, this._lexer = o, this._embeddedModes = Object.create(null), this.embeddedLoaded = Promise.resolve(void 0);
  31067. var s = !1;
  31068. this._tokenizationRegistryListener = i.TokenizationRegistry.onDidChange((function (e) {
  31069. if (!s) {
  31070. for (var t = !1, n = 0, o = e.changedLanguages.length; n < o; n++) {
  31071. var a = e.changedLanguages[n];
  31072. if (r._embeddedModes[a]) {
  31073. t = !0;
  31074. break
  31075. }
  31076. }
  31077. t && (s = !0, i.TokenizationRegistry.fire([r._modeId]), s = !1)
  31078. }
  31079. }))
  31080. }
  31081. return e.prototype.dispose = function () {
  31082. this._tokenizationRegistryListener.dispose()
  31083. }, e.prototype.getLoadStatus = function () {
  31084. var t = [];
  31085. for (var n in this._embeddedModes) {
  31086. var o = i.TokenizationRegistry.get(n);
  31087. if (o) {
  31088. if (o instanceof e) {
  31089. var r = o.getLoadStatus();
  31090. !1 === r.loaded && t.push(r.promise)
  31091. }
  31092. } else {
  31093. var s = i.TokenizationRegistry.getPromise(n);
  31094. s && t.push(s)
  31095. }
  31096. }
  31097. return 0 === t.length ? {loaded: !0} : {
  31098. loaded: !1, promise: Promise.all(t).then((function (e) {
  31099. }))
  31100. }
  31101. }, e.prototype.getInitialState = function () {
  31102. var e = s.create(null, this._lexer.start);
  31103. return u.create(e, null)
  31104. }, e.prototype.tokenize = function (e, t, n) {
  31105. var i = new c, o = this._tokenize(e, t, n, i);
  31106. return i.finalize(o)
  31107. }, e.prototype.tokenize2 = function (e, t, n) {
  31108. var i = new h(this._modeService, this._standaloneThemeService.getTheme().tokenTheme),
  31109. o = this._tokenize(e, t, n, i);
  31110. return i.finalize(o)
  31111. }, e.prototype._tokenize = function (e, t, n, i) {
  31112. return t.embeddedModeData ? this._nestedTokenize(e, t, n, i) : this._myTokenize(e, t, n, i)
  31113. }, e.prototype._findLeavingNestedModeOffset = function (e, t) {
  31114. var n = this._lexer.tokenizer[t.stack.state];
  31115. if (!n && !(n = r.findRules(this._lexer, t.stack.state))) throw r.createError(this._lexer, "tokenizer state is not defined: " + t.stack.state);
  31116. for (var i = -1, o = !1, s = 0, a = n; s < a.length; s++) {
  31117. var l = a[s];
  31118. if (r.isIAction(l.action) && "@pop" === l.action.nextEmbedded) {
  31119. o = !0;
  31120. var u = l.regex, d = l.regex.source;
  31121. "^(?:" === d.substr(0, 4) && ")" === d.substr(d.length - 1, 1) && (u = new RegExp(d.substr(4, d.length - 5), u.ignoreCase ? "i" : ""));
  31122. var c = e.search(u);
  31123. -1 === c || 0 !== c && l.matchOnlyAtLineStart || (-1 === i || c < i) && (i = c)
  31124. }
  31125. }
  31126. if (!o) throw r.createError(this._lexer, 'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: ' + t.stack.state);
  31127. return i
  31128. }, e.prototype._nestedTokenize = function (e, t, n, i) {
  31129. var o = this._findLeavingNestedModeOffset(e, t);
  31130. if (-1 === o) {
  31131. var r = i.nestedModeTokenize(e, t.embeddedModeData, n);
  31132. return u.create(t.stack, new l(t.embeddedModeData.modeId, r))
  31133. }
  31134. var s = e.substring(0, o);
  31135. s.length > 0 && i.nestedModeTokenize(s, t.embeddedModeData, n);
  31136. var a = e.substring(o);
  31137. return this._myTokenize(a, t, n + o, i)
  31138. }, e.prototype._safeRuleName = function (e) {
  31139. return e ? e.name : "(unknown)"
  31140. }, e.prototype._myTokenize = function (e, t, n, i) {
  31141. i.enterMode(n, this._modeId);
  31142. for (var o = e.length, s = t.embeddedModeData, a = t.stack, l = 0, d = null, c = !0; c || l < o;) {
  31143. var h = l, p = a.depth, f = d ? d.groups.length : 0, m = a.state, v = null, _ = null, y = null,
  31144. C = null, b = null;
  31145. if (d) {
  31146. v = d.matches;
  31147. var S = d.groups.shift();
  31148. _ = S.matched, y = S.action, C = d.rule, 0 === d.groups.length && (d = null)
  31149. } else {
  31150. if (!c && l >= o) break;
  31151. c = !1;
  31152. var w = this._lexer.tokenizer[m]
  31153. ;
  31154. if (!w && !(w = r.findRules(this._lexer, m))) throw r.createError(this._lexer, "tokenizer state is not defined: " + m);
  31155. for (var E = e.substr(l), L = 0, D = w; L < D.length; L++) {
  31156. var N = D[L];
  31157. if ((0 === l || !N.matchOnlyAtLineStart) && (v = E.match(N.regex))) {
  31158. _ = v[0], y = N.action;
  31159. break
  31160. }
  31161. }
  31162. }
  31163. if (v || (v = [""], _ = ""), y || (l < o && (_ = (v = [e.charAt(l)])[0]), y = this._lexer.defaultToken), null === _) break;
  31164. for (l += _.length; r.isFuzzyAction(y) && r.isIAction(y) && y.test;) y = y.test(_, v, m, l === o);
  31165. var x = null;
  31166. if ("string" == typeof y || Array.isArray(y)) x = y; else if (y.group) x = y.group; else if (null !== y.token && void 0 !== y.token) {
  31167. if (x = y.tokenSubst ? r.substituteMatches(this._lexer, y.token, _, v, m) : y.token, y.nextEmbedded) if ("@pop" === y.nextEmbedded) {
  31168. if (!s) throw r.createError(this._lexer, "cannot pop embedded mode if not inside one");
  31169. s = null
  31170. } else {
  31171. if (s) throw r.createError(this._lexer, "cannot enter embedded mode from within an embedded mode");
  31172. b = r.substituteMatches(this._lexer, y.nextEmbedded, _, v, m)
  31173. }
  31174. if (y.goBack && (l = Math.max(0, l - y.goBack)), y.switchTo && "string" == typeof y.switchTo) {
  31175. if ("@" === (I = r.substituteMatches(this._lexer, y.switchTo, _, v, m))[0] && (I = I.substr(1)), !r.findRules(this._lexer, I)) throw r.createError(this._lexer, "trying to switch to a state '" + I + "' that is undefined in rule: " + this._safeRuleName(C));
  31176. a = a.switchTo(I)
  31177. } else {
  31178. if (y.transform && "function" == typeof y.transform) throw r.createError(this._lexer, "action.transform not supported");
  31179. if (y.next) if ("@push" === y.next) {
  31180. if (a.depth >= this._lexer.maxStack) throw r.createError(this._lexer, "maximum tokenizer stack size reached: [" + a.state + "," + a.parent.state + ",...]");
  31181. a = a.push(m)
  31182. } else if ("@pop" === y.next) {
  31183. if (a.depth <= 1) throw r.createError(this._lexer, "trying to pop an empty stack in rule: " + this._safeRuleName(C));
  31184. a = a.pop()
  31185. } else if ("@popall" === y.next) a = a.popall(); else {
  31186. var I;
  31187. if ("@" === (I = r.substituteMatches(this._lexer, y.next, _, v, m))[0] && (I = I.substr(1)), !r.findRules(this._lexer, I)) throw r.createError(this._lexer, "trying to set a next state '" + I + "' that is undefined in rule: " + this._safeRuleName(C));
  31188. a = a.push(I)
  31189. }
  31190. }
  31191. y.log && "string" == typeof y.log && r.log(this._lexer, this._lexer.languageId + ": " + r.substituteMatches(this._lexer, y.log, _, v, m))
  31192. }
  31193. if (null === x) throw r.createError(this._lexer, "lexer rule has no well-defined action in rule: " + this._safeRuleName(C));
  31194. if (Array.isArray(x)) {
  31195. if (d && d.groups.length > 0) throw r.createError(this._lexer, "groups cannot be nested: " + this._safeRuleName(C));
  31196. if (v.length !== x.length + 1) throw r.createError(this._lexer, "matched number of groups does not match the number of actions in rule: " + this._safeRuleName(C));
  31197. for (var M = 0, k = 1; k < v.length; k++) M += v[k].length;
  31198. if (M !== _.length) throw r.createError(this._lexer, "with groups, all characters should be matched in consecutive groups in rule: " + this._safeRuleName(C));
  31199. d = {rule: C, matches: v, groups: []};
  31200. for (k = 0; k < x.length; k++) d.groups[k] = {action: x[k], matched: v[k + 1]};
  31201. l -= _.length
  31202. } else {
  31203. if ("@rematch" === x && (l -= _.length, _ = "", v = null, x = ""), 0 === _.length) {
  31204. if (0 === o || p !== a.depth || m !== a.state || (d ? d.groups.length : 0) !== f) continue
  31205. ;
  31206. throw r.createError(this._lexer, "no progress in tokenizer in rule: " + this._safeRuleName(C))
  31207. }
  31208. var T = null;
  31209. if (r.isString(x) && 0 === x.indexOf("@brackets")) {
  31210. var R = x.substr("@brackets".length), O = g(this._lexer, _);
  31211. if (!O) throw r.createError(this._lexer, "@brackets token returned but no bracket defined as: " + _);
  31212. T = r.sanitize(O.token + R)
  31213. } else {
  31214. var P = "" === x ? "" : x + this._lexer.tokenPostfix;
  31215. T = r.sanitize(P)
  31216. }
  31217. if (i.emit(h + n, T), null !== b) {
  31218. var A = this._modeService.getModeIdForLanguageName(b);
  31219. A && (b = A);
  31220. var F = this._getNestedEmbeddedModeData(b);
  31221. if (l < o) {
  31222. E = e.substr(l);
  31223. return this._nestedTokenize(E, u.create(a, F), n + l, i)
  31224. }
  31225. return u.create(a, F)
  31226. }
  31227. }
  31228. }
  31229. return u.create(a, s)
  31230. }, e.prototype._getNestedEmbeddedModeData = function (e) {
  31231. var t = this._locateMode(e);
  31232. if (t) {
  31233. var n = i.TokenizationRegistry.get(t);
  31234. if (n) return new l(t, n.getInitialState())
  31235. }
  31236. return new l(t || o.NULL_MODE_ID, o.NULL_STATE)
  31237. }, e.prototype._locateMode = function (e) {
  31238. if (!e || !this._modeService.isRegisteredMode(e)) return null;
  31239. if (e === this._modeId) return e;
  31240. var t = this._modeService.getModeId(e)
  31241. ;
  31242. return t && (this._modeService.triggerMode(t), this._embeddedModes[t] = !0), t
  31243. }, e
  31244. }();
  31245. function g(e, t) {
  31246. if (!t) return null;
  31247. t = r.fixCase(e, t);
  31248. for (var n = 0, i = e.brackets; n < i.length; n++) {
  31249. var o = i[n];
  31250. if (o.open === t) return {token: o.token, bracketType: 1};
  31251. if (o.close === t) return {token: o.token, bracketType: -1}
  31252. }
  31253. return null
  31254. }
  31255. t.MonarchTokenizer = p, t.createTokenizationSupport = function (e, t, n, i) {
  31256. return new p(e, t, n, i)
  31257. }
  31258. })),define(n[494], i([0, 1, 15, 5, 93, 17, 110, 69, 216]), (function (e, t, n, i, o, r, s, a, l) {
  31259. "use strict";
  31260. Object.defineProperty(t, "__esModule", {value: !0});
  31261. var u = function () {
  31262. function e() {
  31263. }
  31264. return e.colorizeElement = function (e, t, n, i) {
  31265. var o = (i = i || {}).theme || "vs",
  31266. r = i.mimeType || n.getAttribute("lang") || n.getAttribute("data-lang");
  31267. if (!r) return console.error("Mode not detected"), Promise.resolve();
  31268. e.setTheme(o);
  31269. var s = n.firstChild ? n.firstChild.nodeValue : "";
  31270. n.className += " " + o;
  31271. return this.colorize(t, s || "", r, i).then((function (e) {
  31272. n.innerHTML = e
  31273. }), (function (e) {
  31274. return console.error(e)
  31275. }))
  31276. }, e.colorize = function (e, t, o, s) {
  31277. var a = 4
  31278. ;s && "number" == typeof s.tabSize && (a = s.tabSize), i.startsWithUTF8BOM(t) && (t = t.substr(1));
  31279. var l = t.split(/\r\n|\r|\n/), u = e.getModeId(o);
  31280. if (!u) return Promise.resolve(c(l, a));
  31281. e.triggerMode(u);
  31282. var h = r.TokenizationRegistry.get(u);
  31283. if (h) return d(l, a, h);
  31284. var p = r.TokenizationRegistry.getPromise(u);
  31285. return p ? new Promise((function (e, t) {
  31286. p.then((function (n) {
  31287. d(l, a, n).then(e, t)
  31288. }), t)
  31289. })) : new Promise((function (e, t) {
  31290. var i = null, o = null, s = function () {
  31291. i && (i.dispose(), i = null), o && (o.dispose(), o = null);
  31292. var n = r.TokenizationRegistry.get(u);
  31293. n ? d(l, a, n).then(e, t) : e(c(l, a))
  31294. };
  31295. (o = new n.TimeoutTimer).cancelAndSet(s, 500), i = r.TokenizationRegistry.onDidChange((function (e) {
  31296. e.changedLanguages.indexOf(u) >= 0 && s()
  31297. }))
  31298. }))
  31299. }, e.colorizeLine = function (e, t, n, i, o) {
  31300. void 0 === o && (o = 4);
  31301. var r = a.ViewLineRenderingData.isBasicASCII(e, t), l = a.ViewLineRenderingData.containsRTL(e, r, n);
  31302. return s.renderViewLine2(new s.RenderLineInput(!1, !0, e, !1, r, l, 0, i, [], o, 0, 0, 0, -1, "none", !1, !1, null)).html
  31303. }, e.colorizeModelLine = function (e, t, n) {
  31304. void 0 === n && (n = 4);
  31305. var i = e.getLineContent(t)
  31306. ;e.forceTokenization(t);
  31307. var o = e.getLineTokens(t).inflate();
  31308. return this.colorizeLine(i, e.mightContainNonBasicASCII(), e.mightContainRTL(), o, n)
  31309. }, e
  31310. }();
  31311. function d(e, t, n) {
  31312. return new Promise((function (i, r) {
  31313. var u = function () {
  31314. var d = function (e, t, n) {
  31315. for (var i = [], r = n.getInitialState(), l = 0, u = e.length; l < u; l++) {
  31316. var d = e[l], c = n.tokenize2(d, r, 0);
  31317. o.LineTokens.convertToEndOffset(c.tokens, d.length);
  31318. var h = new o.LineTokens(c.tokens, d), p = a.ViewLineRenderingData.isBasicASCII(d, !0),
  31319. g = a.ViewLineRenderingData.containsRTL(d, p, !0),
  31320. f = s.renderViewLine2(new s.RenderLineInput(!1, !0, d, !1, p, g, 0, h.inflate(), [], t, 0, 0, 0, -1, "none", !1, !1, null));
  31321. (i = i.concat(f.html)).push("<br/>"), r = c.endState
  31322. }
  31323. return i.join("")
  31324. }(e, t, n);
  31325. if (n instanceof l.MonarchTokenizer) {
  31326. var c = n.getLoadStatus();
  31327. if (!1 === c.loaded) return void c.promise.then(u, r)
  31328. }
  31329. i(d)
  31330. };
  31331. u()
  31332. }))
  31333. }
  31334. function c(e, t) {
  31335. var n = [], i = new Uint32Array(2);
  31336. i[0] = 0, i[1] = 16793600;
  31337. for (var r = 0, l = e.length; r < l; r++) {
  31338. var u = e[r];
  31339. i[0] = u.length
  31340. ;var d = new o.LineTokens(i, u), c = a.ViewLineRenderingData.isBasicASCII(u, !0),
  31341. h = a.ViewLineRenderingData.containsRTL(u, c, !0),
  31342. p = s.renderViewLine2(new s.RenderLineInput(!1, !0, u, !1, c, h, 0, d, [], t, 0, 0, 0, -1, "none", !1, !1, null));
  31343. (n = n.concat(p.html)).push("<br/>")
  31344. }
  31345. return n.join("")
  31346. }
  31347. t.Colorizer = u
  31348. })),define(n[94], i([0, 1, 11]), (function (e, t, n) {
  31349. "use strict";
  31350. Object.defineProperty(t, "__esModule", {value: !0}), t.IStandaloneThemeService = n.createDecorator("themeService")
  31351. })),define(n[162], i([0, 1, 11]), (function (e, t, n) {
  31352. "use strict";
  31353. Object.defineProperty(t, "__esModule", {value: !0}), t.IClipboardService = n.createDecorator("clipboardService")
  31354. }));
  31355. a = this && this.__spreadArrays || function () {
  31356. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  31357. var i = Array(e), o = 0;
  31358. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  31359. return i
  31360. };
  31361. define(n[29], i([0, 1, 2, 21, 11, 4, 76, 38]), (function (e, t, n, i, o, r, s, l) {
  31362. "use strict";
  31363. Object.defineProperty(t, "__esModule", {value: !0}), t.ICommandService = o.createDecorator("commandService"),
  31364. t.CommandsRegistry = new (function () {
  31365. function e() {
  31366. this._commands = new Map, this._onDidRegisterCommand = new r.Emitter, this.onDidRegisterCommand = this._onDidRegisterCommand.event
  31367. }
  31368. return e.prototype.registerCommand = function (e, t) {
  31369. var o = this;
  31370. if (!e) throw new Error("invalid command");
  31371. if ("string" == typeof e) {
  31372. if (!t) throw new Error("invalid command");
  31373. return this.registerCommand({id: e, handler: t})
  31374. }
  31375. if (e.description) {
  31376. for (var r = [], l = 0, u = e.description.args; l < u.length; l++) {
  31377. var d = u[l];
  31378. r.push(d.constraint)
  31379. }
  31380. var c = e.handler;
  31381. e.handler = function (e) {
  31382. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  31383. return i.validateConstraints(t, r), c.apply(void 0, a([e], t))
  31384. }
  31385. }
  31386. var h = e.id, p = this._commands.get(h);
  31387. p || (p = new s.LinkedList, this._commands.set(h, p));
  31388. var g = p.unshift(e), f = n.toDisposable((function () {
  31389. g();
  31390. var e = o._commands.get(h);
  31391. (null == e ? void 0 : e.isEmpty()) && o._commands.delete(h)
  31392. }));
  31393. return this._onDidRegisterCommand.fire(h), f
  31394. }, e.prototype.registerCommandAlias = function (e, n) {
  31395. return t.CommandsRegistry.registerCommand(e, (function (e) {
  31396. for (var i, o = [], r = 1; r < arguments.length; r++) o[r - 1] = arguments[r];
  31397. return (i = e.get(t.ICommandService)).executeCommand.apply(i, a([n], o))
  31398. }))
  31399. }, e.prototype.getCommand = function (e) {
  31400. var t = this._commands.get(e);
  31401. if (t && !t.isEmpty()) return t.iterator().next().value
  31402. }, e.prototype.getCommands = function () {
  31403. for (var e = new Map, t = 0, n = l.keys(this._commands); t < n.length; t++) {
  31404. var i = n[t], o = this.getCommand(i);
  31405. o && e.set(i, o)
  31406. }
  31407. return e
  31408. }, e
  31409. }())
  31410. })), define(n[495], i([0, 1, 26, 10, 25, 3, 17, 49, 29, 2, 19]), (function (e, t, n, i, o, s, a, l, u, h, p) {
  31411. "use strict";
  31412. Object.defineProperty(t, "__esModule", {value: !0});
  31413. var g = function () {
  31414. function e(e, t) {
  31415. this._link = e, this._provider = t
  31416. }
  31417. return e.prototype.toJSON = function () {
  31418. return {range: this.range, url: this.url, tooltip: this.tooltip}
  31419. }, Object.defineProperty(e.prototype, "range", {
  31420. get: function () {
  31421. return this._link.range
  31422. }, enumerable: !0, configurable: !0
  31423. }), Object.defineProperty(e.prototype, "url", {
  31424. get: function () {
  31425. return this._link.url
  31426. }, enumerable: !0, configurable: !0
  31427. }), Object.defineProperty(e.prototype, "tooltip", {
  31428. get: function () {
  31429. return this._link.tooltip
  31430. }, enumerable: !0, configurable: !0
  31431. }), e.prototype.resolve = function (e) {
  31432. return d(this, void 0, void 0, (function () {
  31433. var t = this;
  31434. return c(this, (function (n) {
  31435. return this._link.url ? [2, this._link.url] : "function" == typeof this._provider.resolveLink ? [2, Promise.resolve(this._provider.resolveLink(this._link, e)).then((function (n) {
  31436. return t._link = n || t._link, t._link.url ? t.resolve(e) : Promise.reject(new Error("missing"))
  31437. }))] : [2, Promise.reject(new Error("missing"))]
  31438. }))
  31439. }))
  31440. }, e
  31441. }();
  31442. t.Link = g;
  31443. var f = function (e) {
  31444. function t(n) {
  31445. for (var i = e.call(this) || this, o = [], r = function (e, n) {
  31446. var i = e.links.map((function (e) {
  31447. return new g(e, n)
  31448. }));
  31449. o = t._union(o, i), h.isDisposable(n) && s._register(n)
  31450. }, s = this, a = 0, l = n; a < l.length; a++) {
  31451. var u = l[a];
  31452. r(u[0], u[1])
  31453. }
  31454. return i.links = o, i
  31455. }
  31456. return r(t, e), t._union = function (e, t) {
  31457. var n, i, o, r, a = [];
  31458. for (n = 0, o = 0, i = e.length, r = t.length; n < i && o < r;) {
  31459. var l = e[n], u = t[o];
  31460. if (s.Range.areIntersectingOrTouching(l.range, u.range)) n++; else s.Range.compareRangesUsingStarts(l.range, u.range) < 0 ? (a.push(l), n++) : (a.push(u), o++)
  31461. }
  31462. for (; n < i; n++) a.push(e[n]);
  31463. for (; o < r; o++) a.push(t[o]);
  31464. return a
  31465. }, t
  31466. }(h.Disposable);
  31467. function m(e, t) {
  31468. var n = [], o = a.LinkProviderRegistry.ordered(e).reverse().map((function (o, r) {
  31469. return Promise.resolve(o.provideLinks(e, t)).then((function (e) {
  31470. e && (n[r] = [e, o])
  31471. }), i.onUnexpectedExternalError)
  31472. }));
  31473. return Promise.all(o).then((function () {
  31474. var e = new f(p.coalesce(n));
  31475. return t.isCancellationRequested ? (e.dispose(), new f([])) : e
  31476. }))
  31477. }
  31478. t.LinksList = f, t.getLinks = m, u.CommandsRegistry.registerCommand("_executeLinkProvider", (function (e) {
  31479. for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
  31480. return d(void 0, void 0, void 0, (function () {
  31481. var i, r, s, a;
  31482. return c(this, (function (u) {
  31483. switch (u.label) {
  31484. case 0:
  31485. return (i = t[0]) instanceof o.URI && (r = e.get(l.IModelService).getModel(i)) ? [4, m(r, n.CancellationToken.None)] : [2, []];
  31486. case 1:
  31487. return (s = u.sent()) ? (a = s.links.slice(0), s.dispose(), [2, a]) : [2, []]
  31488. }
  31489. }))
  31490. }))
  31491. }))
  31492. })), define(n[496], i([0, 1, 25, 3, 49, 26, 84, 489, 87, 29, 21]), (function (e, t, n, i, o, r, s, a, l, u, h) {
  31493. "use strict";
  31494. function p(e, t, n) {
  31495. return d(this, void 0, void 0, (function () {
  31496. var i, o, r, s, u, d;
  31497. return c(this, (function (c) {
  31498. switch (c.label) {
  31499. case 0:
  31500. return [4, a.OutlineModel.create(e, n)];
  31501. case 1:
  31502. for (i = c.sent(), o = [], r = 0, s = l.values(i.children); r < s.length; r++) (u = s[r]) instanceof a.OutlineElement ? o.push(u.symbol) : o.push.apply(o, l.values(u.children).map((function (e) {
  31503. return e.symbol
  31504. })));
  31505. return d = [], n.isCancellationRequested ? [2, d] : (t ? function e(t, n, i) {
  31506. for (var o = 0, r = n; o < r.length; o++) {
  31507. var s = r[o];
  31508. t.push({
  31509. kind: s.kind,
  31510. tags: s.tags,
  31511. name: s.name,
  31512. detail: s.detail,
  31513. containerName: s.containerName || i,
  31514. range: s.range,
  31515. selectionRange: s.selectionRange,
  31516. children: void 0
  31517. }), s.children && e(t, s.children, s.name)
  31518. }
  31519. }(d, o, "") : d = o, [2, d.sort(g)])
  31520. }
  31521. }))
  31522. }))
  31523. }
  31524. function g(e, t) {
  31525. return i.Range.compareRangesUsingStarts(e.range, t.range)
  31526. }
  31527. Object.defineProperty(t, "__esModule", {value: !0}), t.getDocumentSymbols = p, u.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider", (function (e) {
  31528. for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
  31529. return d(this, void 0, void 0, (function () {
  31530. var i, a, l;
  31531. return c(this, (function (u) {
  31532. switch (u.label) {
  31533. case 0:
  31534. return i = t[0], h.assertType(n.URI.isUri(i)), (a = e.get(o.IModelService).getModel(i)) ? [2, p(a, !1, r.CancellationToken.None)] : [4, e.get(s.ITextModelService).createModelReference(i)];
  31535. case 1:
  31536. l = u.sent(), u.label = 2;
  31537. case 2:
  31538. return u.trys.push([2, , 4, 5]), [4, p(l.object.textEditorModel, !1, r.CancellationToken.None)];
  31539. case 3:
  31540. return [2, u.sent()];
  31541. case 4:
  31542. return l.dispose(), [7];
  31543. case 5:
  31544. return [2]
  31545. }
  31546. }))
  31547. }))
  31548. }))
  31549. })), define(n[18], i([0, 1, 5, 11]), (function (e, t, n, i) {
  31550. "use strict";
  31551. Object.defineProperty(t, "__esModule", {value: !0});
  31552. var o = function () {
  31553. function e() {
  31554. }
  31555. return e.has = function (e) {
  31556. return a.create(e)
  31557. }, e.equals = function (e, t) {
  31558. return l.create(e, t)
  31559. }, e.regex = function (e, t) {
  31560. return c.create(e, t)
  31561. }, e.not = function (e) {
  31562. return d.create(e)
  31563. }, e.and = function () {
  31564. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  31565. return p.create(e)
  31566. }, e.or = function () {
  31567. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  31568. return g.create(e)
  31569. }, e.deserialize = function (e, t) {
  31570. if (void 0 === t && (t = !1), e) return this._deserializeOrExpression(e, t)
  31571. }, e._deserializeOrExpression = function (e, t) {
  31572. var n = this, i = e.split("||");
  31573. return g.create(i.map((function (e) {
  31574. return n._deserializeAndExpression(e, t)
  31575. })))
  31576. }, e._deserializeAndExpression = function (e, t) {
  31577. var n = this, i = e.split("&&");
  31578. return p.create(i.map((function (e) {
  31579. return n._deserializeOne(e, t)
  31580. })))
  31581. }, e._deserializeOne = function (e, t) {
  31582. if ((e = e.trim()).indexOf("!=") >= 0) {
  31583. var n = e.split("!=");
  31584. return u.create(n[0].trim(), this._deserializeValue(n[1], t))
  31585. }
  31586. if (e.indexOf("==") >= 0) {
  31587. n = e.split("==");
  31588. return l.create(n[0].trim(), this._deserializeValue(n[1], t))
  31589. }
  31590. if (e.indexOf("=~") >= 0) {
  31591. n = e.split("=~");
  31592. return c.create(n[0].trim(), this._deserializeRegexValue(n[1], t))
  31593. }
  31594. return /^\!\s*/.test(e) ? d.create(e.substr(1).trim()) : a.create(e)
  31595. }, e._deserializeValue = function (e, t) {
  31596. if ("true" === (e = e.trim())) return !0;
  31597. if ("false" === e) return !1;
  31598. var n = /^'([^']*)'$/.exec(e);
  31599. return n ? n[1].trim() : e
  31600. }, e._deserializeRegexValue = function (e, t) {
  31601. if (n.isFalsyOrWhitespace(e)) {
  31602. if (t) throw new Error("missing regexp-value for =~-expression");
  31603. return console.warn("missing regexp-value for =~-expression"), null
  31604. }
  31605. var i = e.indexOf("/"), o = e.lastIndexOf("/");
  31606. if (i === o || i < 0) {
  31607. if (t) throw new Error("bad regexp-value '" + e + "', missing /-enclosure");
  31608. return console.warn("bad regexp-value '" + e + "', missing /-enclosure"), null
  31609. }
  31610. var r = e.slice(i + 1, o), s = "i" === e[o + 1] ? "i" : "";
  31611. try {
  31612. return new RegExp(r, s)
  31613. } catch (n) {
  31614. if (t) throw new Error("bad regexp-value '" + e + "', parse error: " + n);
  31615. return console.warn("bad regexp-value '" + e + "', parse error: " + n), null
  31616. }
  31617. }, e
  31618. }();
  31619. function s(e, t) {
  31620. var n = e.getType(), i = t.getType();
  31621. if (n !== i) return n - i;
  31622. switch (n) {
  31623. case 1:
  31624. case 2:
  31625. case 3:
  31626. case 4:
  31627. case 6:
  31628. case 7:
  31629. case 5:
  31630. return e.cmp(t);
  31631. default:
  31632. throw new Error("Unknown ContextKeyExpr!")
  31633. }
  31634. }
  31635. t.ContextKeyExpr = o;
  31636. var a = function () {
  31637. function e(e) {
  31638. this.key = e
  31639. }
  31640. return e.create = function (t) {
  31641. return new e(t)
  31642. }, e.prototype.getType = function () {
  31643. return 1
  31644. }, e.prototype.cmp = function (e) {
  31645. return this.key < e.key ? -1 : this.key > e.key ? 1 : 0
  31646. }, e.prototype.equals = function (t) {
  31647. return t instanceof e && this.key === t.key
  31648. }, e.prototype.evaluate = function (e) {
  31649. return !!e.getValue(this.key)
  31650. }, e.prototype.keys = function () {
  31651. return [this.key]
  31652. },
  31653. e.prototype.negate = function () {
  31654. return d.create(this.key)
  31655. }, e
  31656. }();
  31657. t.ContextKeyDefinedExpr = a;
  31658. var l = function () {
  31659. function e(e, t) {
  31660. this.key = e, this.value = t
  31661. }
  31662. return e.create = function (t, n) {
  31663. return "boolean" == typeof n ? n ? a.create(t) : d.create(t) : new e(t, n)
  31664. }, e.prototype.getType = function () {
  31665. return 3
  31666. }, e.prototype.cmp = function (e) {
  31667. return this.key < e.key ? -1 : this.key > e.key ? 1 : this.value < e.value ? -1 : this.value > e.value ? 1 : 0
  31668. }, e.prototype.equals = function (t) {
  31669. return t instanceof e && (this.key === t.key && this.value === t.value)
  31670. }, e.prototype.evaluate = function (e) {
  31671. return e.getValue(this.key) == this.value
  31672. }, e.prototype.keys = function () {
  31673. return [this.key]
  31674. }, e.prototype.negate = function () {
  31675. return u.create(this.key, this.value)
  31676. }, e
  31677. }();
  31678. t.ContextKeyEqualsExpr = l;
  31679. var u = function () {
  31680. function e(e, t) {
  31681. this.key = e, this.value = t
  31682. }
  31683. return e.create = function (t, n) {
  31684. return "boolean" == typeof n ? n ? d.create(t) : a.create(t) : new e(t, n)
  31685. }, e.prototype.getType = function () {
  31686. return 4
  31687. }, e.prototype.cmp = function (e) {
  31688. return this.key < e.key ? -1 : this.key > e.key ? 1 : this.value < e.value ? -1 : this.value > e.value ? 1 : 0
  31689. },
  31690. e.prototype.equals = function (t) {
  31691. return t instanceof e && (this.key === t.key && this.value === t.value)
  31692. }, e.prototype.evaluate = function (e) {
  31693. return e.getValue(this.key) != this.value
  31694. }, e.prototype.keys = function () {
  31695. return [this.key]
  31696. }, e.prototype.negate = function () {
  31697. return l.create(this.key, this.value)
  31698. }, e
  31699. }();
  31700. t.ContextKeyNotEqualsExpr = u;
  31701. var d = function () {
  31702. function e(e) {
  31703. this.key = e
  31704. }
  31705. return e.create = function (t) {
  31706. return new e(t)
  31707. }, e.prototype.getType = function () {
  31708. return 2
  31709. }, e.prototype.cmp = function (e) {
  31710. return this.key < e.key ? -1 : this.key > e.key ? 1 : 0
  31711. }, e.prototype.equals = function (t) {
  31712. return t instanceof e && this.key === t.key
  31713. }, e.prototype.evaluate = function (e) {
  31714. return !e.getValue(this.key)
  31715. }, e.prototype.keys = function () {
  31716. return [this.key]
  31717. }, e.prototype.negate = function () {
  31718. return a.create(this.key)
  31719. }, e
  31720. }();
  31721. t.ContextKeyNotExpr = d;
  31722. var c = function () {
  31723. function e(e, t) {
  31724. this.key = e, this.regexp = t
  31725. }
  31726. return e.create = function (t, n) {
  31727. return new e(t, n)
  31728. }, e.prototype.getType = function () {
  31729. return 6
  31730. }, e.prototype.cmp = function (e) {
  31731. if (this.key < e.key) return -1;
  31732. if (this.key > e.key) return 1
  31733. ;
  31734. var t = this.regexp ? this.regexp.source : "", n = e.regexp ? e.regexp.source : "";
  31735. return t < n ? -1 : t > n ? 1 : 0
  31736. }, e.prototype.equals = function (t) {
  31737. if (t instanceof e) {
  31738. var n = this.regexp ? this.regexp.source : "", i = t.regexp ? t.regexp.source : "";
  31739. return this.key === t.key && n === i
  31740. }
  31741. return !1
  31742. }, e.prototype.evaluate = function (e) {
  31743. var t = e.getValue(this.key);
  31744. return !!this.regexp && this.regexp.test(t)
  31745. }, e.prototype.keys = function () {
  31746. return [this.key]
  31747. }, e.prototype.negate = function () {
  31748. return h.create(this)
  31749. }, e
  31750. }();
  31751. t.ContextKeyRegexExpr = c;
  31752. var h = function () {
  31753. function e(e) {
  31754. this._actual = e
  31755. }
  31756. return e.create = function (t) {
  31757. return new e(t)
  31758. }, e.prototype.getType = function () {
  31759. return 7
  31760. }, e.prototype.cmp = function (e) {
  31761. return this._actual.cmp(e._actual)
  31762. }, e.prototype.equals = function (t) {
  31763. return t instanceof e && this._actual.equals(t._actual)
  31764. }, e.prototype.evaluate = function (e) {
  31765. return !this._actual.evaluate(e)
  31766. }, e.prototype.keys = function () {
  31767. return this._actual.keys()
  31768. }, e.prototype.negate = function () {
  31769. return this._actual
  31770. }, e
  31771. }();
  31772. t.ContextKeyNotRegexExpr = h;
  31773. var p = function () {
  31774. function e(e) {
  31775. this.expr = e
  31776. }
  31777. return e.create = function (t) {
  31778. var n = e._normalizeArr(t);
  31779. if (0 !== n.length) return 1 === n.length ? n[0] : new e(n)
  31780. }, e.prototype.getType = function () {
  31781. return 5
  31782. }, e.prototype.cmp = function (e) {
  31783. if (this.expr.length < e.expr.length) return -1;
  31784. if (this.expr.length > e.expr.length) return 1;
  31785. for (var t = 0, n = this.expr.length; t < n; t++) {
  31786. var i = s(this.expr[t], e.expr[t]);
  31787. if (0 !== i) return i
  31788. }
  31789. return 0
  31790. }, e.prototype.equals = function (t) {
  31791. if (t instanceof e) {
  31792. if (this.expr.length !== t.expr.length) return !1;
  31793. for (var n = 0, i = this.expr.length; n < i; n++) if (!this.expr[n].equals(t.expr[n])) return !1;
  31794. return !0
  31795. }
  31796. return !1
  31797. }, e.prototype.evaluate = function (e) {
  31798. for (var t = 0, n = this.expr.length; t < n; t++) if (!this.expr[t].evaluate(e)) return !1;
  31799. return !0
  31800. }, e._normalizeArr = function (t) {
  31801. var n = [];
  31802. if (t) {
  31803. for (var i = 0, o = t.length; i < o; i++) {
  31804. var r = t[i];
  31805. if (r) if (r instanceof e) n = n.concat(r.expr); else {
  31806. if (r instanceof g) throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');
  31807. n.push(r)
  31808. }
  31809. }
  31810. n.sort(s)
  31811. }
  31812. return n
  31813. },
  31814. e.prototype.keys = function () {
  31815. for (var e = [], t = 0, n = this.expr; t < n.length; t++) {
  31816. var i = n[t];
  31817. e.push.apply(e, i.keys())
  31818. }
  31819. return e
  31820. }, e.prototype.negate = function () {
  31821. for (var e = [], t = 0, n = this.expr; t < n.length; t++) {
  31822. var i = n[t];
  31823. e.push(i.negate())
  31824. }
  31825. return g.create(e)
  31826. }, e
  31827. }();
  31828. t.ContextKeyAndExpr = p;
  31829. var g = function () {
  31830. function e(e) {
  31831. this.expr = e
  31832. }
  31833. return e.create = function (t) {
  31834. var n = e._normalizeArr(t);
  31835. if (0 !== n.length) return 1 === n.length ? n[0] : new e(n)
  31836. }, e.prototype.getType = function () {
  31837. return 8
  31838. }, e.prototype.equals = function (t) {
  31839. if (t instanceof e) {
  31840. if (this.expr.length !== t.expr.length) return !1;
  31841. for (var n = 0, i = this.expr.length; n < i; n++) if (!this.expr[n].equals(t.expr[n])) return !1;
  31842. return !0
  31843. }
  31844. return !1
  31845. }, e.prototype.evaluate = function (e) {
  31846. for (var t = 0, n = this.expr.length; t < n; t++) if (this.expr[t].evaluate(e)) return !0;
  31847. return !1
  31848. }, e._normalizeArr = function (t) {
  31849. var n = [];
  31850. if (t) {
  31851. for (var i = 0, o = t.length; i < o; i++) {
  31852. var r = t[i];
  31853. r && (r instanceof e ? n = n.concat(r.expr) : n.push(r))
  31854. }
  31855. n.sort(s)
  31856. }
  31857. return n
  31858. }, e.prototype.keys = function () {
  31859. for (var e = [], t = 0, n = this.expr; t < n.length; t++) {
  31860. var i = n[t]
  31861. ;e.push.apply(e, i.keys())
  31862. }
  31863. return e
  31864. }, e.prototype.negate = function () {
  31865. for (var t = [], n = 0, i = this.expr; n < i.length; n++) {
  31866. var r = i[n];
  31867. t.push(r.negate())
  31868. }
  31869. for (var s = function (t) {
  31870. return t instanceof e ? t.expr : [t]
  31871. }; t.length > 1;) {
  31872. for (var a = t.shift(), l = t.shift(), u = [], d = 0, c = s(a); d < c.length; d++) for (var h = c[d], p = 0, g = s(l); p < g.length; p++) {
  31873. var f = g[p];
  31874. u.push(o.and(h, f))
  31875. }
  31876. t.unshift(o.or.apply(o, u))
  31877. }
  31878. return t[0]
  31879. }, e
  31880. }();
  31881. t.ContextKeyOrExpr = g;
  31882. var f = function (e) {
  31883. function t(t, n) {
  31884. var i = e.call(this, t) || this;
  31885. return i._defaultValue = n, i
  31886. }
  31887. return r(t, e), t.prototype.bindTo = function (e) {
  31888. return e.createKey(this.key, this._defaultValue)
  31889. }, t.prototype.getValue = function (e) {
  31890. return e.getContextKeyValue(this.key)
  31891. }, t.prototype.toNegated = function () {
  31892. return o.not(this.key)
  31893. }, t
  31894. }(a);
  31895. t.RawContextKey = f, t.IContextKeyService = i.createDecorator("contextKeyService"), t.SET_CONTEXT_COMMAND_ID = "setContext"
  31896. })), define(n[23], i([0, 1, 18]), (function (e, t, n) {
  31897. "use strict";
  31898. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  31899. e.editorSimpleInput = new n.RawContextKey("editorSimpleInput", !1), e.editorTextFocus = new n.RawContextKey("editorTextFocus", !1), e.focus = new n.RawContextKey("editorFocus", !1), e.textInputFocus = new n.RawContextKey("textInputFocus", !1), e.readOnly = new n.RawContextKey("editorReadonly", !1), e.writable = e.readOnly.toNegated(), e.hasNonEmptySelection = new n.RawContextKey("editorHasSelection", !1), e.hasOnlyEmptySelection = e.hasNonEmptySelection.toNegated(), e.hasMultipleSelections = new n.RawContextKey("editorHasMultipleSelections", !1), e.hasSingleSelection = e.hasMultipleSelections.toNegated(), e.tabMovesFocus = new n.RawContextKey("editorTabMovesFocus", !1), e.tabDoesNotMoveFocus = e.tabMovesFocus.toNegated(), e.isInEmbeddedEditor = new n.RawContextKey("isInEmbeddedEditor", !1), e.canUndo = new n.RawContextKey("canUndo", !1), e.canRedo = new n.RawContextKey("canRedo", !1), e.languageId = new n.RawContextKey("editorLangId", ""), e.hasCompletionItemProvider = new n.RawContextKey("editorHasCompletionItemProvider", !1),
  31900. e.hasCodeActionsProvider = new n.RawContextKey("editorHasCodeActionsProvider", !1), e.hasCodeLensProvider = new n.RawContextKey("editorHasCodeLensProvider", !1), e.hasDefinitionProvider = new n.RawContextKey("editorHasDefinitionProvider", !1), e.hasDeclarationProvider = new n.RawContextKey("editorHasDeclarationProvider", !1), e.hasImplementationProvider = new n.RawContextKey("editorHasImplementationProvider", !1), e.hasTypeDefinitionProvider = new n.RawContextKey("editorHasTypeDefinitionProvider", !1), e.hasHoverProvider = new n.RawContextKey("editorHasHoverProvider", !1), e.hasDocumentHighlightProvider = new n.RawContextKey("editorHasDocumentHighlightProvider", !1), e.hasDocumentSymbolProvider = new n.RawContextKey("editorHasDocumentSymbolProvider", !1), e.hasReferenceProvider = new n.RawContextKey("editorHasReferenceProvider", !1), e.hasRenameProvider = new n.RawContextKey("editorHasRenameProvider", !1), e.hasSignatureHelpProvider = new n.RawContextKey("editorHasSignatureHelpProvider", !1),
  31901. e.hasDocumentFormattingProvider = new n.RawContextKey("editorHasDocumentFormattingProvider", !1), e.hasDocumentSelectionFormattingProvider = new n.RawContextKey("editorHasDocumentSelectionFormattingProvider", !1), e.hasMultipleDocumentFormattingProvider = new n.RawContextKey("editorHasMultipleDocumentFormattingProvider", !1), e.hasMultipleDocumentSelectionFormattingProvider = new n.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider", !1)
  31902. }(t.EditorContextKeys || (t.EditorContextKeys = {}))
  31903. }));
  31904. var g = this && this.__param || function (e, t) {
  31905. return function (n, i) {
  31906. t(n, i, e)
  31907. }
  31908. };
  31909. define(n[497], i([0, 1, 2, 18]), (function (e, t, n, i) {
  31910. "use strict";
  31911. Object.defineProperty(t, "__esModule", {value: !0});
  31912. var o = function () {
  31913. function e(t, n) {
  31914. this._editor = t, this._index = 0, this._ckOtherSuggestions = e.OtherSuggestions.bindTo(n)
  31915. }
  31916. return e.prototype.dispose = function () {
  31917. this.reset()
  31918. }, e.prototype.reset = function () {
  31919. this._ckOtherSuggestions.reset(), n.dispose(this._listener), this._model = void 0, this._acceptNext = void 0, this._ignore = !1
  31920. }, e.prototype.set = function (t, n) {
  31921. var i = this, o = t.model, r = t.index;
  31922. 0 !== o.items.length ? e._moveIndex(!0, o, r) !== r ? (this._acceptNext = n, this._model = o, this._index = r, this._listener = this._editor.onDidChangeCursorPosition((function () {
  31923. i._ignore || i.reset()
  31924. })), this._ckOtherSuggestions.set(!0)) : this.reset() : this.reset()
  31925. }, e._moveIndex = function (e, t, n) {
  31926. for (var i = n; (i = (i + t.items.length + (e ? 1 : -1)) % t.items.length) !== n && t.items[i].completion.additionalTextEdits;) ;
  31927. return i
  31928. }, e.prototype.next = function () {
  31929. this._move(!0)
  31930. }, e.prototype.prev = function () {
  31931. this._move(!1)
  31932. }, e.prototype._move = function (t) {
  31933. if (this._model) try {
  31934. this._ignore = !0, this._index = e._moveIndex(t, this._model, this._index), this._acceptNext({
  31935. index: this._index,
  31936. item: this._model.items[this._index],
  31937. model: this._model
  31938. })
  31939. } finally {
  31940. this._ignore = !1
  31941. }
  31942. }, e.OtherSuggestions = new i.RawContextKey("hasOtherSuggestions", !1), e = h([g(1, i.IContextKeyService)], e)
  31943. }();
  31944. t.SuggestAlternatives = o
  31945. })), define(n[498], i([0, 1, 18, 2]), (function (e, t, n, i) {
  31946. "use strict";
  31947. Object.defineProperty(t, "__esModule", {value: !0});
  31948. var o = function (e) {
  31949. function t(n, i) {
  31950. var o = e.call(this) || this;
  31951. return o._editor = n, o._enabled = !1, o._ckAtEnd = t.AtEnd.bindTo(i), o._register(o._editor.onDidChangeConfiguration((function (e) {
  31952. return e.hasChanged(94) && o._update()
  31953. }))), o._update(), o
  31954. }
  31955. return r(t, e), t.prototype.dispose = function () {
  31956. e.prototype.dispose.call(this), i.dispose(this._selectionListener), this._ckAtEnd.reset()
  31957. }, t.prototype._update = function () {
  31958. var e = this, t = "on" === this._editor.getOption(94);
  31959. if (this._enabled !== t) if (this._enabled = t, this._enabled) {
  31960. var n = function () {
  31961. if (e._editor.hasModel()) {
  31962. var t = e._editor.getModel(), n = e._editor.getSelection(),
  31963. i = t.getWordAtPosition(n.getStartPosition());
  31964. i ? e._ckAtEnd.set(i.endColumn === n.getStartPosition().column) : e._ckAtEnd.set(!1)
  31965. } else e._ckAtEnd.set(!1)
  31966. };
  31967. this._selectionListener = this._editor.onDidChangeCursorSelection(n), n()
  31968. } else this._selectionListener && (this._ckAtEnd.reset(), this._selectionListener.dispose(), this._selectionListener = void 0)
  31969. }, t.AtEnd = new n.RawContextKey("atEndOfWord", !1), t = h([g(1, n.IContextKeyService)], t)
  31970. }(i.Disposable);
  31971. t.WordContextKey = o
  31972. })),
  31973. define(n[64], i([0, 1, 11, 18]), (function (e, t, n, i) {
  31974. "use strict";
  31975. Object.defineProperty(t, "__esModule", {value: !0}), t.IAccessibilityService = n.createDecorator("accessibilityService"), t.CONTEXT_ACCESSIBILITY_MODE_ENABLED = new i.RawContextKey("accessibilityModeEnabled", !1)
  31976. }));
  31977. a = this && this.__spreadArrays || function () {
  31978. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  31979. var i = Array(e), o = 0;
  31980. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  31981. return i
  31982. };
  31983. define(n[65], i([0, 1, 55, 11, 18, 29, 4]), (function (e, t, n, i, o, s, l) {
  31984. "use strict";
  31985. function u(e) {
  31986. return void 0 !== e.command
  31987. }
  31988. Object.defineProperty(t, "__esModule", {value: !0}), t.isIMenuItem = u, t.IMenuService = i.createDecorator("menuService"), t.MenuRegistry = new (function () {
  31989. function e() {
  31990. this._commands = new Map, this._menuItems = new Map, this._onDidChangeMenu = new l.Emitter, this.onDidChangeMenu = this._onDidChangeMenu.event
  31991. }
  31992. return e.prototype.addCommand = function (e) {
  31993. var t = this;
  31994. return this._commands.set(e.id, e), this._onDidChangeMenu.fire(0), {
  31995. dispose: function () {
  31996. t._commands.delete(e.id) && t._onDidChangeMenu.fire(0)
  31997. }
  31998. }
  31999. }, e.prototype.getCommand = function (e) {
  32000. return this._commands.get(e)
  32001. }, e.prototype.getCommands = function () {
  32002. var e = new Map;
  32003. return this._commands.forEach((function (t, n) {
  32004. return e.set(n, t)
  32005. })), e
  32006. }, e.prototype.appendMenuItem = function (e, t) {
  32007. var n = this, i = this._menuItems.get(e);
  32008. return i ? i.push(t) : (i = [t], this._menuItems.set(e, i)), this._onDidChangeMenu.fire(e), {
  32009. dispose: function () {
  32010. var o = i.indexOf(t);
  32011. o >= 0 && (i.splice(o, 1), n._onDidChangeMenu.fire(e))
  32012. }
  32013. }
  32014. }, e.prototype.getMenuItems = function (e) {
  32015. var t = (this._menuItems.get(e) || []).slice(0);
  32016. return 0 === e && this._appendImplicitItems(t), t
  32017. }, e.prototype._appendImplicitItems = function (e) {
  32018. for (var t = new Set, n = 0, i = e.filter((function (e) {
  32019. return u(e)
  32020. })); n < i.length; n++) {
  32021. var o = i[n], r = o.command, s = o.alt;
  32022. t.add(r.id), s && t.add(s.id)
  32023. }
  32024. this._commands.forEach((function (n, i) {
  32025. t.has(i) || e.push({command: n})
  32026. }))
  32027. }, e
  32028. }());
  32029. var d = function (e) {
  32030. function t(t, n, i) {
  32031. var o = e.call(this, t, n) || this;
  32032. return o._commandService = i, o
  32033. }
  32034. return r(t, e), t.prototype.run = function () {
  32035. for (var e, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  32036. return (e = this._commandService).executeCommand.apply(e, a([this.id], t))
  32037. }, t = h([g(2, s.ICommandService)], t)
  32038. }(n.Action);
  32039. t.ExecuteCommandAction = d;
  32040. var c = function (e) {
  32041. function t(t) {
  32042. var n = this;
  32043. return (n = "string" == typeof t.title ? e.call(this, "", t.title, "submenu") || this : e.call(this, "", t.title.value, "submenu") || this).item = t, n
  32044. }
  32045. return r(t, e), t
  32046. }(n.Action);
  32047. t.SubmenuItemAction = c;
  32048. var p = function (e) {
  32049. function t(n, i, o, r, s) {
  32050. var a = this;
  32051. return (a = "string" == typeof n.title ? e.call(this, n.id, n.title, s) || this : e.call(this, n.id, n.title.value, s) || this)._cssClass = void 0, a._enabled = !n.precondition || r.contextMatchesRules(n.precondition), a._checked = Boolean(n.toggled && r.contextMatchesRules(n.toggled)), a._options = o || {}, a.item = n, a.alt = i ? new t(i, void 0, a._options, r, s) : void 0, a
  32052. }
  32053. return r(t, e), t.prototype.dispose = function () {
  32054. this.alt && this.alt.dispose(), e.prototype.dispose.call(this)
  32055. }, t.prototype.run = function () {
  32056. for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  32057. var i = []
  32058. ;
  32059. return this._options.arg && (i = a(i, [this._options.arg])), this._options.shouldForwardArgs && (i = a(i, t)), e.prototype.run.apply(this, i)
  32060. }, t = h([g(3, o.IContextKeyService), g(4, s.ICommandService)], t)
  32061. }(d);
  32062. t.MenuItemAction = p
  32063. })), define(n[499], i([0, 1, 4, 2, 65, 29, 18]), (function (e, t, n, i, o, r, s) {
  32064. "use strict";
  32065. Object.defineProperty(t, "__esModule", {value: !0});
  32066. var a = function () {
  32067. function e(e) {
  32068. this._commandService = e
  32069. }
  32070. return e.prototype.createMenu = function (e, t) {
  32071. return new l(e, this._commandService, t)
  32072. }, e = h([g(0, r.ICommandService)], e)
  32073. }();
  32074. t.MenuService = a;
  32075. var l = function () {
  32076. function e(e, t, r) {
  32077. var s = this;
  32078. this._id = e, this._commandService = t, this._contextKeyService = r, this._onDidChange = new n.Emitter, this._dispoables = new i.DisposableStore, this._menuGroups = [], this._contextKeys = new Set, this._build(), this._dispoables.add(n.Event.debounce(n.Event.filter(o.MenuRegistry.onDidChangeMenu, (function (e) {
  32079. return e === s._id
  32080. })), (function () {
  32081. }), 50)(this._build, this)), this._dispoables.add(n.Event.debounce(this._contextKeyService.onDidChangeContext, (function (e, t) {
  32082. return e || t.affectsSome(s._contextKeys)
  32083. }), 50)((function (e) {
  32084. return e && s._onDidChange.fire(void 0)
  32085. }), this))
  32086. }
  32087. return e.prototype.dispose = function () {
  32088. this._dispoables.dispose(), this._onDidChange.dispose()
  32089. }, e.prototype._build = function () {
  32090. this._menuGroups.length = 0, this._contextKeys.clear();
  32091. var t, n = o.MenuRegistry.getMenuItems(this._id);
  32092. n.sort(e._compareMenuItems);
  32093. for (var i = 0, r = n; i < r.length; i++) {
  32094. var s = r[i], a = s.group || "";
  32095. t && t[0] === a || (t = [a, []], this._menuGroups.push(t)), t[1].push(s), e._fillInKbExprKeys(s.when, this._contextKeys), o.isIMenuItem(s) && s.command.precondition && e._fillInKbExprKeys(s.command.precondition, this._contextKeys), o.isIMenuItem(s) && s.command.toggled && e._fillInKbExprKeys(s.command.toggled, this._contextKeys)
  32096. }
  32097. this._onDidChange.fire(this)
  32098. }, e.prototype.getActions = function (e) {
  32099. for (var t = [], n = 0, i = this._menuGroups; n < i.length; n++) {
  32100. for (var r = i[n], s = r[0], a = [], l = 0, u = r[1]; l < u.length; l++) {
  32101. var d = u[l];
  32102. if (this._contextKeyService.contextMatchesRules(d.when)) {
  32103. var c = o.isIMenuItem(d) ? new o.MenuItemAction(d.command, d.alt, e, this._contextKeyService, this._commandService) : new o.SubmenuItemAction(d);
  32104. a.push(c)
  32105. }
  32106. }
  32107. a.length > 0 && t.push([s, a])
  32108. }
  32109. return t
  32110. }, e._fillInKbExprKeys = function (e, t) {
  32111. if (e) for (var n = 0, i = e.keys(); n < i.length; n++) {
  32112. var o = i[n];
  32113. t.add(o)
  32114. }
  32115. }, e._compareMenuItems = function (t, n) {
  32116. var i = t.group, r = n.group;
  32117. if (i !== r) {
  32118. if (!i) return 1;
  32119. if (!r) return -1;
  32120. if ("navigation" === i) return -1;
  32121. if ("navigation" === r) return 1;
  32122. var s = i.localeCompare(r);
  32123. if (0 !== s) return s
  32124. }
  32125. var a = t.order || 0, l = n.order || 0;
  32126. return a < l ? -1 : a > l ? 1 : e._compareTitles(o.isIMenuItem(t) ? t.command.title : t.title, o.isIMenuItem(n) ? n.command.title : n.title)
  32127. }, e._compareTitles = function (e, t) {
  32128. var n = "string" == typeof e ? e : e.value, i = "string" == typeof t ? t : t.value;
  32129. return n.localeCompare(i)
  32130. }, e = h([g(1, r.ICommandService), g(2, s.IContextKeyService)], e)
  32131. }()
  32132. })), define(n[66], i([0, 1, 11]), (function (e, t, n) {
  32133. "use strict";
  32134. Object.defineProperty(t, "__esModule", {value: !0}), t.IContextViewService = n.createDecorator("contextViewService"),
  32135. t.IContextMenuService = n.createDecorator("contextMenuService")
  32136. })), define(n[500], i([0, 1, 11]), (function (e, t, n) {
  32137. "use strict";
  32138. Object.defineProperty(t, "__esModule", {value: !0}), t.IDialogService = n.createDecorator("dialogService")
  32139. })), define(n[115], i([0, 1]), (function (e, t) {
  32140. "use strict";
  32141. Object.defineProperty(t, "__esModule", {value: !0});
  32142. var n = function () {
  32143. function e() {
  32144. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  32145. this._entries = new Map;
  32146. for (var n = 0, i = e; n < i.length; n++) {
  32147. var o = i[n], r = o[0], s = o[1];
  32148. this.set(r, s)
  32149. }
  32150. }
  32151. return e.prototype.set = function (e, t) {
  32152. var n = this._entries.get(e);
  32153. return this._entries.set(e, t), n
  32154. }, e.prototype.has = function (e) {
  32155. return this._entries.has(e)
  32156. }, e.prototype.get = function (e) {
  32157. return this._entries.get(e)
  32158. }, e
  32159. }();
  32160. t.ServiceCollection = n
  32161. }));
  32162. a = this && this.__spreadArrays || function () {
  32163. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  32164. var i = Array(e), o = 0;
  32165. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  32166. return i
  32167. }
  32168. ;define(n[501], i([0, 1, 10, 480, 209, 11, 115, 15]), (function (e, t, n, i, o, s, l, u) {
  32169. "use strict";
  32170. Object.defineProperty(t, "__esModule", {value: !0});
  32171. var d = "function" == typeof Proxy, c = function (e) {
  32172. function t(t) {
  32173. var n = e.call(this, "cyclic dependency between services") || this;
  32174. return n.message = t.toString(), n
  32175. }
  32176. return r(t, e), t
  32177. }(Error), h = function () {
  32178. function e(e, t, n) {
  32179. void 0 === e && (e = new l.ServiceCollection), void 0 === t && (t = !1), this._services = e, this._strict = t, this._parent = n, this._services.set(s.IInstantiationService, this)
  32180. }
  32181. return e.prototype.createChild = function (t) {
  32182. return new e(t, this._strict, this)
  32183. }, e.prototype.invokeFunction = function (e) {
  32184. for (var t = this, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];
  32185. var r = p.traceInvocation(e), l = !1;
  32186. try {
  32187. var u = {
  32188. get: function (e, i) {
  32189. if (l) throw n.illegalState("service accessor is only valid during the invocation of its target method");
  32190. var o = t._getOrCreateServiceInstance(e, r);
  32191. if (!o && i !== s.optional) throw new Error("[invokeFunction] unknown service '" + e + "'");
  32192. return o
  32193. }
  32194. };
  32195. return e.apply(void 0, a([u], i))
  32196. } finally {
  32197. l = !0,
  32198. r.stop()
  32199. }
  32200. }, e.prototype.createInstance = function (e) {
  32201. for (var t, n, i = [], r = 1; r < arguments.length; r++) i[r - 1] = arguments[r];
  32202. return e instanceof o.SyncDescriptor ? (t = p.traceCreation(e.ctor), n = this._createInstance(e.ctor, e.staticArguments.concat(i), t)) : (t = p.traceCreation(e), n = this._createInstance(e, i, t)), t.stop(), n
  32203. }, e.prototype._createInstance = function (e, t, n) {
  32204. void 0 === t && (t = []);
  32205. for (var i = s._util.getServiceDependencies(e).sort((function (e, t) {
  32206. return e.index - t.index
  32207. })), o = [], r = 0, l = i; r < l.length; r++) {
  32208. var u = l[r], d = this._getOrCreateServiceInstance(u.id, n);
  32209. if (!d && this._strict && !u.optional) throw new Error("[createInstance] " + e.name + " depends on UNKNOWN service " + u.id + ".");
  32210. o.push(d)
  32211. }
  32212. var c = i.length > 0 ? i[0].index : t.length;
  32213. if (t.length !== c) {
  32214. console.warn("[createInstance] First service dependency of " + e.name + " at position " + (c + 1) + " conflicts with " + t.length + " static arguments");
  32215. var h = c - t.length;
  32216. t = h > 0 ? t.concat(new Array(h)) : t.slice(0, c)
  32217. }
  32218. return new (e.bind.apply(e, a([void 0], a(t, o))))
  32219. }, e.prototype._setServiceInstance = function (e, t) {
  32220. if (this._services.get(e) instanceof o.SyncDescriptor) this._services.set(e, t); else {
  32221. if (!this._parent) throw new Error("illegalState - setting UNKNOWN service instance");
  32222. this._parent._setServiceInstance(e, t)
  32223. }
  32224. }, e.prototype._getServiceInstanceOrDescriptor = function (e) {
  32225. var t = this._services.get(e);
  32226. return !t && this._parent ? this._parent._getServiceInstanceOrDescriptor(e) : t
  32227. }, e.prototype._getOrCreateServiceInstance = function (e, t) {
  32228. var n = this._getServiceInstanceOrDescriptor(e);
  32229. return n instanceof o.SyncDescriptor ? this._createAndCacheServiceInstance(e, n, t.branch(e, !0)) : (t.branch(e, !1), n)
  32230. }, e.prototype._createAndCacheServiceInstance = function (e, t, n) {
  32231. for (var r = new i.Graph((function (e) {
  32232. return e.id.toString()
  32233. })), a = 0, l = [{id: e, desc: t, _trace: n}]; l.length;) {
  32234. var u = l.pop();
  32235. if (r.lookupOrInsertNode(u), a++ > 150) throw new c(r);
  32236. for (var d = 0, h = s._util.getServiceDependencies(u.desc.ctor); d < h.length; d++) {
  32237. var p = h[d], g = this._getServiceInstanceOrDescriptor(p.id)
  32238. ;
  32239. if (g || p.optional || console.warn("[createInstance] " + e + " depends on " + p.id + " which is NOT registered."), g instanceof o.SyncDescriptor) {
  32240. var f = {id: p.id, desc: g, _trace: u._trace.branch(p.id, !0)};
  32241. r.insertEdge(u, f), l.push(f)
  32242. }
  32243. }
  32244. }
  32245. for (; ;) {
  32246. var m = r.roots();
  32247. if (0 === m.length) {
  32248. if (!r.isEmpty()) throw new c(r);
  32249. break
  32250. }
  32251. for (var v = 0, _ = m; v < _.length; v++) {
  32252. var y = _[v].data,
  32253. C = this._createServiceInstanceWithOwner(y.id, y.desc.ctor, y.desc.staticArguments, y.desc.supportsDelayedInstantiation, y._trace);
  32254. this._setServiceInstance(y.id, C), r.removeNode(y)
  32255. }
  32256. }
  32257. return this._getServiceInstanceOrDescriptor(e)
  32258. }, e.prototype._createServiceInstanceWithOwner = function (e, t, n, i, r) {
  32259. if (void 0 === n && (n = []), this._services.get(e) instanceof o.SyncDescriptor) return this._createServiceInstance(t, n, i, r);
  32260. if (this._parent) return this._parent._createServiceInstanceWithOwner(e, t, n, i, r);
  32261. throw new Error("illegalState - creating UNKNOWN service instance " + t.name)
  32262. }, e.prototype._createServiceInstance = function (e, t, n, i) {
  32263. var o = this;
  32264. if (void 0 === t && (t = []), n && d) {
  32265. var r = new u.IdleValue((function () {
  32266. return o._createInstance(e, t, i)
  32267. }));
  32268. return new Proxy(Object.create(null), {
  32269. get: function (e, t) {
  32270. if (t in e) return e[t];
  32271. var n = r.getValue(), i = n[t];
  32272. return "function" != typeof i ? i : (i = i.bind(n), e[t] = i, i)
  32273. }, set: function (e, t, n) {
  32274. return r.getValue()[t] = n, !0
  32275. }
  32276. })
  32277. }
  32278. return this._createInstance(e, t, i)
  32279. }, e
  32280. }();
  32281. t.InstantiationService = h;
  32282. var p = function () {
  32283. function e(e, t) {
  32284. this.type = e, this.name = t, this._start = Date.now(), this._dep = []
  32285. }
  32286. return e.traceInvocation = function (t) {
  32287. return e._None
  32288. }, e.traceCreation = function (t) {
  32289. return e._None
  32290. }, e.prototype.branch = function (t, n) {
  32291. var i = new e(2, t.toString());
  32292. return this._dep.push([t, n, i]), i
  32293. }, e.prototype.stop = function () {
  32294. var t = Date.now() - this._start;
  32295. e._totals += t;
  32296. var n = !1;
  32297. var i = [(0 === this.type ? "CREATE" : "CALL") + " " + this.name, "" + function e(t, i) {
  32298. for (var o = [], r = new Array(t + 1).join("\t"), s = 0, a = i._dep; s < a.length; s++) {
  32299. var l = a[s], u = l[0], d = l[1], c = l[2];
  32300. if (d && c) {
  32301. n = !0, o.push(r + "CREATES -> " + u);
  32302. var h = e(t + 1, c);
  32303. h && o.push(h)
  32304. } else o.push(r + "uses -> " + u)
  32305. }
  32306. return o.join("\n")
  32307. }(1, this), "DONE, took " + t.toFixed(2) + "ms (grand total " + e._totals.toFixed(2) + "ms)"];
  32308. (t > 2 || n) && console.log(i.join("\n"))
  32309. }, e._None = new (function (e) {
  32310. function t() {
  32311. return e.call(this, -1, null) || this
  32312. }
  32313. return r(t, e), t.prototype.stop = function () {
  32314. }, t.prototype.branch = function () {
  32315. return this
  32316. }, t
  32317. }(e)), e._totals = 0, e
  32318. }()
  32319. })), define(n[502], i([0, 1, 473, 15, 4, 2]), (function (e, t, n, i, o, s) {
  32320. "use strict";
  32321. Object.defineProperty(t, "__esModule", {value: !0});
  32322. var a = function (e) {
  32323. function t(t, n, r, s) {
  32324. var a = e.call(this) || this;
  32325. return a._contextKeyService = t, a._commandService = n, a._telemetryService = r, a._notificationService = s, a._onDidUpdateKeybindings = a._register(new o.Emitter), a._currentChord = null, a._currentChordChecker = new i.IntervalTimer, a._currentChordStatusMessage = null, a
  32326. }
  32327. return r(t, e), Object.defineProperty(t.prototype, "onDidUpdateKeybindings", {
  32328. get: function () {
  32329. return this._onDidUpdateKeybindings ? this._onDidUpdateKeybindings.event : o.Event.None
  32330. }, enumerable: !0, configurable: !0
  32331. }), t.prototype.dispose = function () {
  32332. e.prototype.dispose.call(this)
  32333. },
  32334. t.prototype.getKeybindings = function () {
  32335. return this._getResolver().getKeybindings()
  32336. }, t.prototype.lookupKeybinding = function (e) {
  32337. var t = this._getResolver().lookupPrimaryKeybinding(e);
  32338. if (t) return t.resolvedKeybinding
  32339. }, t.prototype.softDispatch = function (e, t) {
  32340. var n = this.resolveKeyboardEvent(e);
  32341. if (n.isChord()) return console.warn("Unexpected keyboard event mapped to a chord"), null;
  32342. var i = n.getDispatchParts()[0];
  32343. if (null === i) return null;
  32344. var o = this._contextKeyService.getContext(t),
  32345. r = this._currentChord ? this._currentChord.keypress : null;
  32346. return this._getResolver().resolve(o, r, i)
  32347. }, t.prototype._enterChordMode = function (e, t) {
  32348. var i = this;
  32349. this._currentChord = {
  32350. keypress: e,
  32351. label: t
  32352. }, this._currentChordStatusMessage = this._notificationService.status(n.localize(0, null, t));
  32353. var o = Date.now();
  32354. this._currentChordChecker.cancelAndSet((function () {
  32355. i._documentHasFocus() ? Date.now() - o > 5e3 && i._leaveChordMode() : i._leaveChordMode()
  32356. }), 500)
  32357. }, t.prototype._leaveChordMode = function () {
  32358. this._currentChordStatusMessage && (this._currentChordStatusMessage.dispose(),
  32359. this._currentChordStatusMessage = null), this._currentChordChecker.cancel(), this._currentChord = null
  32360. }, t.prototype._dispatch = function (e, t) {
  32361. return this._doDispatch(this.resolveKeyboardEvent(e), t)
  32362. }, t.prototype._doDispatch = function (e, t) {
  32363. var i = this, o = !1;
  32364. if (e.isChord()) return console.warn("Unexpected keyboard event mapped to a chord"), !1;
  32365. var r = e.getDispatchParts()[0];
  32366. if (null === r) return o;
  32367. var s = this._contextKeyService.getContext(t),
  32368. a = this._currentChord ? this._currentChord.keypress : null, l = e.getLabel(),
  32369. u = this._getResolver().resolve(s, a, r);
  32370. return u && u.enterChord ? (o = !0, this._enterChordMode(r, l), o) : (this._currentChord && (u && u.commandId || (this._notificationService.status(n.localize(1, null, this._currentChord.label, l), {hideAfter: 1e4}), o = !0)), this._leaveChordMode(), u && u.commandId && (u.bubble || (o = !0), void 0 === u.commandArgs ? this._commandService.executeCommand(u.commandId).then(void 0, (function (e) {
  32371. return i._notificationService.warn(e)
  32372. })) : this._commandService.executeCommand(u.commandId, u.commandArgs).then(void 0, (function (e) {
  32373. return i._notificationService.warn(e)
  32374. })), this._telemetryService.publicLog2("workbenchActionExecuted", {
  32375. id: u.commandId,
  32376. from: "keybinding"
  32377. })), o)
  32378. }, t.prototype.mightProducePrintableCharacter = function (e) {
  32379. return !e.ctrlKey && !e.metaKey && (e.keyCode >= 31 && e.keyCode <= 56 || e.keyCode >= 21 && e.keyCode <= 30)
  32380. }, t
  32381. }(s.Disposable);
  32382. t.AbstractKeybindingService = a
  32383. })), define(n[503], i([0, 1, 10, 207, 36]), (function (e, t, n, i, o) {
  32384. "use strict";
  32385. Object.defineProperty(t, "__esModule", {value: !0});
  32386. var s = function (e) {
  32387. function t(t, i) {
  32388. var o = e.call(this) || this;
  32389. if (0 === i.length) throw n.illegalArgument("parts");
  32390. return o._os = t, o._parts = i, o
  32391. }
  32392. return r(t, e), t.prototype.getLabel = function () {
  32393. var e = this;
  32394. return i.UILabelProvider.toLabel(this._os, this._parts, (function (t) {
  32395. return e._getLabel(t)
  32396. }))
  32397. }, t.prototype.getAriaLabel = function () {
  32398. var e = this;
  32399. return i.AriaLabelProvider.toLabel(this._os, this._parts, (function (t) {
  32400. return e._getAriaLabel(t)
  32401. }))
  32402. }, t.prototype.isChord = function () {
  32403. return this._parts.length > 1
  32404. }, t.prototype.getParts = function () {
  32405. var e = this
  32406. ;
  32407. return this._parts.map((function (t) {
  32408. return e._getPart(t)
  32409. }))
  32410. }, t.prototype._getPart = function (e) {
  32411. return new o.ResolvedKeybindingPart(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, this._getLabel(e), this._getAriaLabel(e))
  32412. }, t.prototype.getDispatchParts = function () {
  32413. var e = this;
  32414. return this._parts.map((function (t) {
  32415. return e._getDispatchPart(t)
  32416. }))
  32417. }, t
  32418. }(o.ResolvedKeybinding);
  32419. t.BaseResolvedKeybinding = s
  32420. })), define(n[34], i([0, 1, 11]), (function (e, t, n) {
  32421. "use strict";
  32422. Object.defineProperty(t, "__esModule", {value: !0}), t.IKeybindingService = n.createDecorator("keybindingService")
  32423. })), define(n[217], i([0, 1, 18]), (function (e, t, n) {
  32424. "use strict";
  32425. Object.defineProperty(t, "__esModule", {value: !0});
  32426. var i = function () {
  32427. function e(t, n) {
  32428. this._defaultKeybindings = t, this._defaultBoundCommands = new Map;
  32429. for (var i = 0, o = t.length; i < o; i++) {
  32430. var r = t[i].command;
  32431. r && this._defaultBoundCommands.set(r, !0)
  32432. }
  32433. this._map = new Map, this._lookupMap = new Map, this._keybindings = e.combine(t, n);
  32434. for (i = 0, o = this._keybindings.length; i < o; i++) {
  32435. var s = this._keybindings[i]
  32436. ;0 !== s.keypressParts.length && this._addKeyPress(s.keypressParts[0], s)
  32437. }
  32438. }
  32439. return e._isTargetedForRemoval = function (e, t, n, i, o) {
  32440. if (e.command !== i) return !1;
  32441. if (t && e.keypressParts[0] !== t) return !1;
  32442. if (n && e.keypressParts[1] !== n) return !1;
  32443. if (o) {
  32444. if (!e.when) return !1;
  32445. if (!o.equals(e.when)) return !1
  32446. }
  32447. return !0
  32448. }, e.combine = function (e, t) {
  32449. e = e.slice(0);
  32450. for (var n = [], i = 0, o = t; i < o.length; i++) {
  32451. var r = o[i];
  32452. if (r.command && 0 !== r.command.length && "-" === r.command.charAt(0)) for (var s = r.command.substr(1), a = r.keypressParts[0], l = r.keypressParts[1], u = r.when, d = e.length - 1; d >= 0; d--) this._isTargetedForRemoval(e[d], a, l, s, u) && e.splice(d, 1); else n.push(r)
  32453. }
  32454. return e.concat(n)
  32455. }, e.prototype._addKeyPress = function (t, n) {
  32456. var i = this._map.get(t);
  32457. if (void 0 === i) return this._map.set(t, [n]), void this._addToLookupMap(n);
  32458. for (var o = i.length - 1; o >= 0; o--) {
  32459. var r = i[o];
  32460. if (r.command !== n.command) {
  32461. var s = r.keypressParts.length > 1, a = n.keypressParts.length > 1;
  32462. s && a && r.keypressParts[1] !== n.keypressParts[1] || e.whenIsEntirelyIncluded(r.when, n.when) && this._removeFromLookupMap(r)
  32463. }
  32464. }
  32465. i.push(n),
  32466. this._addToLookupMap(n)
  32467. }, e.prototype._addToLookupMap = function (e) {
  32468. if (e.command) {
  32469. var t = this._lookupMap.get(e.command);
  32470. void 0 === t ? (t = [e], this._lookupMap.set(e.command, t)) : t.push(e)
  32471. }
  32472. }, e.prototype._removeFromLookupMap = function (e) {
  32473. if (e.command) {
  32474. var t = this._lookupMap.get(e.command);
  32475. if (void 0 !== t) for (var n = 0, i = t.length; n < i; n++) if (t[n] === e) return void t.splice(n, 1)
  32476. }
  32477. }, e.whenIsEntirelyIncluded = function (e, t) {
  32478. return !t || !!e && this._implies(e, t)
  32479. }, e._implies = function (e, t) {
  32480. for (var i = function (e) {
  32481. return e instanceof n.ContextKeyOrExpr ? e.expr : [e]
  32482. }, o = i(e.negate()).concat(i(t)), r = 0; r < o.length; r++) for (var s = o[r].negate(), a = r + 1; a < o.length; a++) {
  32483. var l = o[a];
  32484. if (s.equals(l)) return !0
  32485. }
  32486. return !1
  32487. }, e.prototype.getKeybindings = function () {
  32488. return this._keybindings
  32489. }, e.prototype.lookupPrimaryKeybinding = function (e) {
  32490. var t = this._lookupMap.get(e);
  32491. return void 0 === t || 0 === t.length ? null : t[t.length - 1]
  32492. }, e.prototype.resolve = function (e, t, n) {
  32493. var i = null;
  32494. if (null !== t) {
  32495. if (void 0 === (a = this._map.get(t))) return null;
  32496. i = [];
  32497. for (var o = 0, r = a.length; o < r; o++) {
  32498. var s = a[o]
  32499. ;s.keypressParts[1] === n && i.push(s)
  32500. }
  32501. } else {
  32502. var a;
  32503. if (void 0 === (a = this._map.get(n))) return null;
  32504. i = a
  32505. }
  32506. var l = this._findCommand(e, i);
  32507. return l ? null === t && l.keypressParts.length > 1 && null !== l.keypressParts[1] ? {
  32508. enterChord: !0,
  32509. commandId: null,
  32510. commandArgs: null,
  32511. bubble: !1
  32512. } : {enterChord: !1, commandId: l.command, commandArgs: l.commandArgs, bubble: l.bubble} : null
  32513. }, e.prototype._findCommand = function (t, n) {
  32514. for (var i = n.length - 1; i >= 0; i--) {
  32515. var o = n[i];
  32516. if (e.contextMatchesRules(t, o.when)) return o
  32517. }
  32518. return null
  32519. }, e.contextMatchesRules = function (e, t) {
  32520. return !t || t.evaluate(e)
  32521. }, e
  32522. }();
  32523. t.KeybindingResolver = i
  32524. })), define(n[504], i([0, 1]), (function (e, t) {
  32525. "use strict";
  32526. Object.defineProperty(t, "__esModule", {value: !0});
  32527. var n = function (e, t, n, o, r) {
  32528. this.resolvedKeybinding = e, this.keypressParts = e ? i(e.getDispatchParts()) : [], this.bubble = !!t && 94 === t.charCodeAt(0), this.command = this.bubble ? t.substr(1) : t, this.commandArgs = n, this.when = o, this.isDefault = r
  32529. };
  32530. function i(e) {
  32531. for (var t = [], n = 0, i = e.length; n < i; n++) {
  32532. var o = e[n];
  32533. if (!o) return t;
  32534. t.push(o)
  32535. }
  32536. return t
  32537. }
  32538. t.ResolvedKeybindingItem = n,
  32539. t.removeElementsAfterNulls = i
  32540. })), define(n[505], i([0, 1, 36, 503]), (function (e, t, n, i) {
  32541. "use strict";
  32542. Object.defineProperty(t, "__esModule", {value: !0});
  32543. var o = function (e) {
  32544. function t(t, n) {
  32545. return e.call(this, n, t.parts) || this
  32546. }
  32547. return r(t, e), t.prototype._keyCodeToUILabel = function (e) {
  32548. if (2 === this._os) switch (e) {
  32549. case 15:
  32550. return "←";
  32551. case 16:
  32552. return "↑";
  32553. case 17:
  32554. return "→";
  32555. case 18:
  32556. return "↓"
  32557. }
  32558. return n.KeyCodeUtils.toString(e)
  32559. }, t.prototype._getLabel = function (e) {
  32560. return e.isDuplicateModifierCase() ? "" : this._keyCodeToUILabel(e.keyCode)
  32561. }, t.prototype._getAriaLabel = function (e) {
  32562. return e.isDuplicateModifierCase() ? "" : n.KeyCodeUtils.toString(e.keyCode)
  32563. }, t.prototype._getDispatchPart = function (e) {
  32564. return t.getDispatchStr(e)
  32565. }, t.getDispatchStr = function (e) {
  32566. if (e.isModifierKey()) return null;
  32567. var t = "";
  32568. return e.ctrlKey && (t += "ctrl+"), e.shiftKey && (t += "shift+"), e.altKey && (t += "alt+"), e.metaKey && (t += "meta+"), t += n.KeyCodeUtils.toString(e.keyCode)
  32569. }, t
  32570. }(i.BaseResolvedKeybinding);
  32571. t.USLayoutResolvedKeybinding = o
  32572. })), define(n[116], i([0, 1, 11]), (function (e, t, n) {
  32573. "use strict"
  32574. ;Object.defineProperty(t, "__esModule", {value: !0});
  32575. t.ILabelService = n.createDecorator("label")
  32576. })), define(n[218], i([0, 1, 11]), (function (e, t, n) {
  32577. "use strict";
  32578. Object.defineProperty(t, "__esModule", {value: !0}), t.ILayoutService = n.createDecorator("layoutService")
  32579. })), define(n[506], i([0, 1, 265, 2, 218]), (function (e, t, n, i, o) {
  32580. "use strict";
  32581. Object.defineProperty(t, "__esModule", {value: !0});
  32582. var s = function (e) {
  32583. function t(t) {
  32584. var i = e.call(this) || this;
  32585. return i.layoutService = t, i.contextView = i._register(new n.ContextView(t.container)), i.layout(), i._register(t.onLayout((function () {
  32586. return i.layout()
  32587. }))), i
  32588. }
  32589. return r(t, e), t.prototype.setContainer = function (e) {
  32590. this.contextView.setContainer(e)
  32591. }, t.prototype.showContextView = function (e) {
  32592. this.contextView.show(e)
  32593. }, t.prototype.layout = function () {
  32594. this.contextView.layout()
  32595. }, t.prototype.hideContextView = function (e) {
  32596. this.contextView.hide(e)
  32597. }, t = h([g(0, o.ILayoutService)], t)
  32598. }(i.Disposable);
  32599. t.ContextViewService = s
  32600. })), define(n[95], i([0, 1, 11]), (function (e, t, n) {
  32601. "use strict";
  32602. var i
  32603. ;Object.defineProperty(t, "__esModule", {value: !0}), t.ILogService = n.createDecorator("logService"), function (e) {
  32604. e[e.Trace = 0] = "Trace", e[e.Debug = 1] = "Debug", e[e.Info = 2] = "Info", e[e.Warning = 3] = "Warning", e[e.Error = 4] = "Error", e[e.Critical = 5] = "Critical", e[e.Off = 6] = "Off"
  32605. }(i = t.LogLevel || (t.LogLevel = {}));
  32606. var o = function () {
  32607. function e() {
  32608. }
  32609. return e.prototype.getLevel = function () {
  32610. return i.Info
  32611. }, e.prototype.trace = function (e) {
  32612. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]
  32613. }, e.prototype.error = function (e) {
  32614. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]
  32615. }, e.prototype.dispose = function () {
  32616. }, e
  32617. }();
  32618. t.NullLogService = o
  32619. })), define(n[219], i([0, 1, 15, 2, 182, 258, 3, 17, 41, 365, 49, 114, 5, 19, 95, 132]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C) {
  32620. "use strict";
  32621. Object.defineProperty(t, "__esModule", {value: !0});
  32622. var b = 6e4, S = 3e5;
  32623. function w(e, t) {
  32624. var n = e.getModel(t);
  32625. return !!n && !n.isTooLargeForSyncing()
  32626. }
  32627. var E = function (e) {
  32628. function t(t, n, i) {
  32629. var o = e.call(this) || this;
  32630. return o._modelService = t, o._workerManager = o._register(new D(o._modelService)),
  32631. o._logService = i, o._register(l.LinkProviderRegistry.register("*", {
  32632. provideLinks: function (e, t) {
  32633. return w(o._modelService, e.uri) ? o._workerManager.withWorker().then((function (t) {
  32634. return t.computeLinks(e.uri)
  32635. })).then((function (e) {
  32636. return e && {links: e}
  32637. })) : Promise.resolve({links: []})
  32638. }
  32639. })), o._register(l.CompletionProviderRegistry.register("*", new L(o._workerManager, n, o._modelService))), o
  32640. }
  32641. return r(t, e), t.prototype.dispose = function () {
  32642. e.prototype.dispose.call(this)
  32643. }, t.prototype.canComputeDiff = function (e, t) {
  32644. return w(this._modelService, e) && w(this._modelService, t)
  32645. }, t.prototype.computeDiff = function (e, t, n, i) {
  32646. return this._workerManager.withWorker().then((function (o) {
  32647. return o.computeDiff(e, t, n, i)
  32648. }))
  32649. }, t.prototype.computeMoreMinimalEdits = function (e, t) {
  32650. var n = this;
  32651. if (_.isNonEmptyArray(t)) {
  32652. if (!w(this._modelService, e)) return Promise.resolve(t);
  32653. var i = C.StopWatch.create(!0), o = this._workerManager.withWorker().then((function (n) {
  32654. return n.computeMoreMinimalEdits(e, t)
  32655. }));
  32656. return o.finally((function () {
  32657. return n._logService.trace("FORMAT#computeMoreMinimalEdits", e.toString(!0), i.elapsed())
  32658. })), o
  32659. }
  32660. return Promise.resolve(void 0)
  32661. }, t.prototype.canNavigateValueSet = function (e) {
  32662. return w(this._modelService, e)
  32663. }, t.prototype.navigateValueSet = function (e, t, n) {
  32664. return this._workerManager.withWorker().then((function (i) {
  32665. return i.navigateValueSet(e, t, n)
  32666. }))
  32667. }, t.prototype.canComputeWordRanges = function (e) {
  32668. return w(this._modelService, e)
  32669. }, t.prototype.computeWordRanges = function (e, t) {
  32670. return this._workerManager.withWorker().then((function (n) {
  32671. return n.computeWordRanges(e, t)
  32672. }))
  32673. }, t = h([g(0, f.IModelService), g(1, m.ITextResourceConfigurationService), g(2, y.ILogService)], t)
  32674. }(i.Disposable);
  32675. t.EditorWorkerServiceImpl = E;
  32676. var L = function () {
  32677. function e(e, t, n) {
  32678. this._debugDisplayName = "wordbasedCompletions", this._workerManager = e, this._configurationService = t, this._modelService = n
  32679. }
  32680. return e.prototype.provideCompletionItems = function (e, t) {
  32681. return d(this, void 0, void 0, (function () {
  32682. var n, i, o, r;
  32683. return c(this, (function (s) {
  32684. switch (s.label) {
  32685. case 0:
  32686. return this._configurationService.getValue(e.uri, t, "editor").wordBasedSuggestions && w(this._modelService, e.uri) ? (n = e.getWordAtPosition(t), i = n ? new a.Range(t.lineNumber, n.startColumn, t.lineNumber, n.endColumn) : a.Range.fromPositions(t), o = i.setEndPosition(t.lineNumber, t.column), [4, this._workerManager.withWorker()]) : [2, void 0];
  32687. case 1:
  32688. return [4, s.sent().textualSuggest(e.uri, t)];
  32689. case 2:
  32690. return (r = s.sent()) ? [2, {
  32691. suggestions: r.map((function (e) {
  32692. return {kind: 18, label: e, insertText: e, range: {insert: o, replace: i}}
  32693. }))
  32694. }] : [2, void 0]
  32695. }
  32696. }))
  32697. }))
  32698. }, e
  32699. }(), D = function (e) {
  32700. function t(t) {
  32701. var i = e.call(this) || this;
  32702. return i._modelService = t, i._editorWorkerClient = null, i._lastWorkerUsedTime = (new Date).getTime(), i._register(new n.IntervalTimer).cancelAndSet((function () {
  32703. return i._checkStopIdleWorker()
  32704. }), Math.round(S / 2)), i._register(i._modelService.onModelRemoved((function (e) {
  32705. return i._checkStopEmptyWorker()
  32706. }))), i
  32707. }
  32708. return r(t, e), t.prototype.dispose = function () {
  32709. this._editorWorkerClient && (this._editorWorkerClient.dispose(), this._editorWorkerClient = null),
  32710. e.prototype.dispose.call(this)
  32711. }, t.prototype._checkStopEmptyWorker = function () {
  32712. this._editorWorkerClient && (0 === this._modelService.getModels().length && (this._editorWorkerClient.dispose(), this._editorWorkerClient = null))
  32713. }, t.prototype._checkStopIdleWorker = function () {
  32714. this._editorWorkerClient && ((new Date).getTime() - this._lastWorkerUsedTime > S && (this._editorWorkerClient.dispose(), this._editorWorkerClient = null))
  32715. }, t.prototype.withWorker = function () {
  32716. return this._lastWorkerUsedTime = (new Date).getTime(), this._editorWorkerClient || (this._editorWorkerClient = new M(this._modelService, !1, "editorWorkerService")), Promise.resolve(this._editorWorkerClient)
  32717. }, t
  32718. }(i.Disposable), N = function (e) {
  32719. function t(t, i, o) {
  32720. var r = e.call(this) || this;
  32721. if (r._syncedModels = Object.create(null), r._syncedModelsLastUsedTime = Object.create(null), r._proxy = t, r._modelService = i, !o) {
  32722. var s = new n.IntervalTimer;
  32723. s.cancelAndSet((function () {
  32724. return r._checkStopModelSync()
  32725. }), Math.round(b / 2)), r._register(s)
  32726. }
  32727. return r
  32728. }
  32729. return r(t, e), t.prototype.dispose = function () {
  32730. for (var t in this._syncedModels) i.dispose(this._syncedModels[t]);
  32731. this._syncedModels = Object.create(null), this._syncedModelsLastUsedTime = Object.create(null), e.prototype.dispose.call(this)
  32732. }, t.prototype.ensureSyncedResources = function (e) {
  32733. for (var t = 0, n = e; t < n.length; t++) {
  32734. var i = n[t], o = i.toString();
  32735. this._syncedModels[o] || this._beginModelSync(i), this._syncedModels[o] && (this._syncedModelsLastUsedTime[o] = (new Date).getTime())
  32736. }
  32737. }, t.prototype._checkStopModelSync = function () {
  32738. var e = (new Date).getTime(), t = [];
  32739. for (var n in this._syncedModelsLastUsedTime) {
  32740. e - this._syncedModelsLastUsedTime[n] > b && t.push(n)
  32741. }
  32742. for (var i = 0, o = t; i < o.length; i++) {
  32743. var r = o[i];
  32744. this._stopModelSync(r)
  32745. }
  32746. }, t.prototype._beginModelSync = function (e) {
  32747. var t = this, n = this._modelService.getModel(e);
  32748. if (n && !n.isTooLargeForSyncing()) {
  32749. var o = e.toString();
  32750. this._proxy.acceptNewModel({
  32751. url: n.uri.toString(),
  32752. lines: n.getLinesContent(),
  32753. EOL: n.getEOL(),
  32754. versionId: n.getVersionId()
  32755. });
  32756. var r = new i.DisposableStore;
  32757. r.add(n.onDidChangeContent((function (e) {
  32758. t._proxy.acceptModelChanged(o.toString(), e)
  32759. }))), r.add(n.onWillDispose((function () {
  32760. t._stopModelSync(o)
  32761. }))), r.add(i.toDisposable((function () {
  32762. t._proxy.acceptRemovedModel(o)
  32763. }))), this._syncedModels[o] = r
  32764. }
  32765. }, t.prototype._stopModelSync = function (e) {
  32766. var t = this._syncedModels[e];
  32767. delete this._syncedModels[e], delete this._syncedModelsLastUsedTime[e], i.dispose(t)
  32768. }, t
  32769. }(i.Disposable), x = function () {
  32770. function e(e) {
  32771. this._instance = e, this._proxyObj = Promise.resolve(this._instance)
  32772. }
  32773. return e.prototype.dispose = function () {
  32774. this._instance.dispose()
  32775. }, e.prototype.getProxyObject = function () {
  32776. return this._proxyObj
  32777. }, e
  32778. }(), I = function () {
  32779. function e(e) {
  32780. this._workerClient = e
  32781. }
  32782. return e.prototype.fhr = function (e, t) {
  32783. return this._workerClient.fhr(e, t)
  32784. }, e
  32785. }();
  32786. t.EditorWorkerHost = I;
  32787. var M = function (e) {
  32788. function t(t, n, i) {
  32789. var o = e.call(this) || this;
  32790. return o._modelService = t, o._keepIdleModels = n, o._workerFactory = new s.DefaultWorkerFactory(i), o._worker = null, o._modelManager = null, o
  32791. }
  32792. return r(t, e), t.prototype.fhr = function (e, t) {
  32793. throw new Error("Not implemented!")
  32794. }, t.prototype._getOrCreateWorker = function () {
  32795. if (!this._worker) try {
  32796. this._worker = this._register(new o.SimpleWorkerClient(this._workerFactory, "vs/editor/common/services/editorSimpleWorker", new I(this)))
  32797. } catch (e) {
  32798. o.logOnceWebWorkerWarning(e), this._worker = new x(new p.EditorSimpleWorker(new I(this), null))
  32799. }
  32800. return this._worker
  32801. }, t.prototype._getProxy = function () {
  32802. var e = this;
  32803. return this._getOrCreateWorker().getProxyObject().then(void 0, (function (t) {
  32804. return o.logOnceWebWorkerWarning(t), e._worker = new x(new p.EditorSimpleWorker(new I(e), null)), e._getOrCreateWorker().getProxyObject()
  32805. }))
  32806. }, t.prototype._getOrCreateModelManager = function (e) {
  32807. return this._modelManager || (this._modelManager = this._register(new N(e, this._modelService, this._keepIdleModels))), this._modelManager
  32808. }, t.prototype._withSyncedResources = function (e) {
  32809. var t = this;
  32810. return this._getProxy().then((function (n) {
  32811. return t._getOrCreateModelManager(n).ensureSyncedResources(e), n
  32812. }))
  32813. }, t.prototype.computeDiff = function (e, t, n, i) {
  32814. return this._withSyncedResources([e, t]).then((function (o) {
  32815. return o.computeDiff(e.toString(), t.toString(), n, i)
  32816. }))
  32817. }, t.prototype.computeMoreMinimalEdits = function (e, t) {
  32818. return this._withSyncedResources([e]).then((function (n) {
  32819. return n.computeMoreMinimalEdits(e.toString(), t)
  32820. }))
  32821. }, t.prototype.computeLinks = function (e) {
  32822. return this._withSyncedResources([e]).then((function (t) {
  32823. return t.computeLinks(e.toString())
  32824. }))
  32825. }, t.prototype.textualSuggest = function (e, t) {
  32826. var n = this;
  32827. return this._withSyncedResources([e]).then((function (i) {
  32828. var o = n._modelService.getModel(e);
  32829. if (!o) return null;
  32830. var r = u.LanguageConfigurationRegistry.getWordDefinition(o.getLanguageIdentifier().id),
  32831. s = r.source, a = v.regExpFlags(r);
  32832. return i.textualSuggest(e.toString(), t, s, a)
  32833. }))
  32834. }, t.prototype.computeWordRanges = function (e, t) {
  32835. var n = this;
  32836. return this._withSyncedResources([e]).then((function (i) {
  32837. var o = n._modelService.getModel(e);
  32838. if (!o) return Promise.resolve(null);
  32839. var r = u.LanguageConfigurationRegistry.getWordDefinition(o.getLanguageIdentifier().id),
  32840. s = r.source, a = v.regExpFlags(r);
  32841. return i.computeWordRanges(e.toString(), t, s, a)
  32842. }))
  32843. },
  32844. t.prototype.navigateValueSet = function (e, t, n) {
  32845. var i = this;
  32846. return this._withSyncedResources([e]).then((function (o) {
  32847. var r = i._modelService.getModel(e);
  32848. if (!r) return null;
  32849. var s = u.LanguageConfigurationRegistry.getWordDefinition(r.getLanguageIdentifier().id),
  32850. a = s.source, l = v.regExpFlags(s);
  32851. return o.navigateValueSet(e.toString(), t, n, a, l)
  32852. }))
  32853. }, t
  32854. }(i.Disposable);
  32855. t.EditorWorkerClient = M
  32856. })), define(n[507], i([0, 1, 219, 21]), (function (e, t, n, i) {
  32857. "use strict";
  32858. Object.defineProperty(t, "__esModule", {value: !0}), t.createWebWorker = function (e, t) {
  32859. return new o(e, t)
  32860. };
  32861. var o = function (e) {
  32862. function t(t, n) {
  32863. var i = e.call(this, t, n.keepIdleModels || !1, n.label) || this;
  32864. return i._foreignModuleId = n.moduleId, i._foreignModuleCreateData = n.createData || null, i._foreignModuleHost = n.host || null, i._foreignProxy = null, i
  32865. }
  32866. return r(t, e), t.prototype.fhr = function (e, t) {
  32867. if (!this._foreignModuleHost || "function" != typeof this._foreignModuleHost[e]) return Promise.reject(new Error("Missing method " + e + " or missing main thread foreign host."));
  32868. try {
  32869. return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost, t))
  32870. } catch (e) {
  32871. return Promise.reject(e)
  32872. }
  32873. }, t.prototype._getForeignProxy = function () {
  32874. var e = this;
  32875. return this._foreignProxy || (this._foreignProxy = this._getProxy().then((function (t) {
  32876. var n = e._foreignModuleHost ? i.getAllMethodNames(e._foreignModuleHost) : [];
  32877. return t.loadForeignModule(e._foreignModuleId, e._foreignModuleCreateData, n).then((function (n) {
  32878. e._foreignModuleCreateData = null;
  32879. for (var i = function (e, n) {
  32880. return t.fmr(e, n)
  32881. }, o = function (e, t) {
  32882. return function () {
  32883. var n = Array.prototype.slice.call(arguments, 0);
  32884. return t(e, n)
  32885. }
  32886. }, r = {}, s = 0, a = n; s < a.length; s++) {
  32887. var l = a[s];
  32888. r[l] = o(l, i)
  32889. }
  32890. return r
  32891. }))
  32892. }))), this._foreignProxy
  32893. }, t.prototype.getProxy = function () {
  32894. return this._getForeignProxy()
  32895. }, t.prototype.withSyncedResources = function (e) {
  32896. var t = this;
  32897. return this._withSyncedResources(e).then((function (e) {
  32898. return t.getProxy()
  32899. }))
  32900. }, t
  32901. }(n.EditorWorkerClient)
  32902. })), define(n[72], i([0, 1, 11, 475, 112]), (function (e, t, n, i, o) {
  32903. "use strict";
  32904. var r;
  32905. Object.defineProperty(t, "__esModule", {
  32906. value: !0
  32907. }), function (e) {
  32908. e[e.Hint = 1] = "Hint", e[e.Info = 2] = "Info", e[e.Warning = 4] = "Warning", e[e.Error = 8] = "Error"
  32909. }(r = t.MarkerSeverity || (t.MarkerSeverity = {})), function (e) {
  32910. e.compare = function (e, t) {
  32911. return t - e
  32912. };
  32913. var t = Object.create(null);
  32914. t[e.Error] = i.localize(0, null), t[e.Warning] = i.localize(1, null), t[e.Info] = i.localize(2, null), e.toString = function (e) {
  32915. return t[e] || ""
  32916. }, e.fromSeverity = function (t) {
  32917. switch (t) {
  32918. case o.default.Error:
  32919. return e.Error;
  32920. case o.default.Warning:
  32921. return e.Warning;
  32922. case o.default.Info:
  32923. return e.Info;
  32924. case o.default.Ignore:
  32925. return e.Hint
  32926. }
  32927. }, e.toSeverity = function (t) {
  32928. switch (t) {
  32929. case e.Error:
  32930. return o.default.Error;
  32931. case e.Warning:
  32932. return o.default.Warning;
  32933. case e.Info:
  32934. return o.default.Info;
  32935. case e.Hint:
  32936. return o.default.Ignore
  32937. }
  32938. }
  32939. }(r = t.MarkerSeverity || (t.MarkerSeverity = {})), function (e) {
  32940. var t = "";
  32941. function n(e, n) {
  32942. var i = [t];
  32943. return e.source ? i.push(e.source.replace("¦", "¦")) : i.push(t), e.code ? "string" == typeof e.code ? i.push(e.code.replace("¦", "¦")) : i.push(e.code.value.replace("¦", "¦")) : i.push(t),
  32944. void 0 !== e.severity && null !== e.severity ? i.push(r.toString(e.severity)) : i.push(t), e.message && n ? i.push(e.message.replace("¦", "¦")) : i.push(t), void 0 !== e.startLineNumber && null !== e.startLineNumber ? i.push(e.startLineNumber.toString()) : i.push(t), void 0 !== e.startColumn && null !== e.startColumn ? i.push(e.startColumn.toString()) : i.push(t), void 0 !== e.endLineNumber && null !== e.endLineNumber ? i.push(e.endLineNumber.toString()) : i.push(t), void 0 !== e.endColumn && null !== e.endColumn ? i.push(e.endColumn.toString()) : i.push(t), i.push(t), i.join("¦")
  32945. }
  32946. e.makeKey = function (e) {
  32947. return n(e, !0)
  32948. }, e.makeKeyOptionalMessage = n
  32949. }(t.IMarkerData || (t.IMarkerData = {})), t.IMarkerService = n.createDecorator("markerService")
  32950. })), define(n[508], i([0, 1, 19, 46, 21, 4, 72]), (function (e, t, n, i, o, r, s) {
  32951. "use strict";
  32952. var a;
  32953. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  32954. e.get = function (e, t, n) {
  32955. if (e[t]) return e[t][n]
  32956. }, e.set = function (e, t, n, i) {
  32957. e[t] || (e[t] = Object.create(null)), e[t][n] = i
  32958. }, e.remove = function (e, t, n) {
  32959. return !(!e[t] || !e[t][n]) && (delete e[t][n],
  32960. o.isEmptyObject(e[t]) && delete e[t], !0)
  32961. }
  32962. }(a || (a = {}));
  32963. var l = function () {
  32964. function e(e) {
  32965. this.errors = 0, this.infos = 0, this.warnings = 0, this.unknowns = 0, this._data = Object.create(null), this._service = e, this._subscription = e.onMarkerChanged(this._update, this)
  32966. }
  32967. return e.prototype.dispose = function () {
  32968. this._subscription.dispose(), this._data = void 0
  32969. }, e.prototype._update = function (e) {
  32970. if (this._data) for (var t = 0, n = e; t < n.length; t++) {
  32971. var i = n[t], o = i.toString(), r = this._data[o];
  32972. r && this._substract(r);
  32973. var s = this._resourceStats(i);
  32974. this._add(s), this._data[o] = s
  32975. }
  32976. }, e.prototype._resourceStats = function (e) {
  32977. var t = {errors: 0, warnings: 0, infos: 0, unknowns: 0};
  32978. if (e.scheme === i.Schemas.inMemory || e.scheme === i.Schemas.walkThrough || e.scheme === i.Schemas.walkThroughSnippet) return t;
  32979. for (var n = 0, o = this._service.read({resource: e}); n < o.length; n++) {
  32980. var r = o[n].severity;
  32981. r === s.MarkerSeverity.Error ? t.errors += 1 : r === s.MarkerSeverity.Warning ? t.warnings += 1 : r === s.MarkerSeverity.Info ? t.infos += 1 : t.unknowns += 1
  32982. }
  32983. return t
  32984. }, e.prototype._substract = function (e) {
  32985. this.errors -= e.errors,
  32986. this.warnings -= e.warnings, this.infos -= e.infos, this.unknowns -= e.unknowns
  32987. }, e.prototype._add = function (e) {
  32988. this.errors += e.errors, this.warnings += e.warnings, this.infos += e.infos, this.unknowns += e.unknowns
  32989. }, e
  32990. }(), u = function () {
  32991. function e() {
  32992. this._onMarkerChanged = new r.Emitter, this._onMarkerChangedEvent = r.Event.debounce(this._onMarkerChanged.event, e._debouncer, 0), this._byResource = Object.create(null), this._byOwner = Object.create(null), this._stats = new l(this)
  32993. }
  32994. return e.prototype.dispose = function () {
  32995. this._stats.dispose()
  32996. }, Object.defineProperty(e.prototype, "onMarkerChanged", {
  32997. get: function () {
  32998. return this._onMarkerChangedEvent
  32999. }, enumerable: !0, configurable: !0
  33000. }), e.prototype.remove = function (e, t) {
  33001. for (var n = 0, i = t || []; n < i.length; n++) {
  33002. var o = i[n];
  33003. this.changeOne(e, o, [])
  33004. }
  33005. }, e.prototype.changeOne = function (t, i, o) {
  33006. if (n.isFalsyOrEmpty(o)) {
  33007. var r = a.remove(this._byResource, i.toString(), t), s = a.remove(this._byOwner, t, i.toString());
  33008. if (r !== s) throw new Error("invalid marker service state");
  33009. r && s && this._onMarkerChanged.fire([i])
  33010. } else {
  33011. for (var l = [], u = 0, d = o; u < d.length; u++) {
  33012. var c = d[u], h = e._toMarker(t, i, c);
  33013. h && l.push(h)
  33014. }
  33015. a.set(this._byResource, i.toString(), t, l), a.set(this._byOwner, t, i.toString(), l), this._onMarkerChanged.fire([i])
  33016. }
  33017. }, e._toMarker = function (e, t, n) {
  33018. var i = n.code, o = n.severity, r = n.message, s = n.source, a = n.startLineNumber, l = n.startColumn,
  33019. u = n.endLineNumber, d = n.endColumn, c = n.relatedInformation, h = n.tags;
  33020. if (r) return {
  33021. resource: t,
  33022. owner: e,
  33023. code: i,
  33024. severity: o,
  33025. message: r,
  33026. source: s,
  33027. startLineNumber: a = a > 0 ? a : 1,
  33028. startColumn: l = l > 0 ? l : 1,
  33029. endLineNumber: u = u >= a ? u : a,
  33030. endColumn: d = d > 0 ? d : l,
  33031. relatedInformation: c,
  33032. tags: h
  33033. }
  33034. }, e.prototype.read = function (t) {
  33035. void 0 === t && (t = Object.create(null));
  33036. var n = t.owner, i = t.resource, o = t.severities, r = t.take;
  33037. if ((!r || r < 0) && (r = -1), n && i) {
  33038. if (C = a.get(this._byResource, i.toString(), n)) {
  33039. for (var s = [], l = 0, u = C; l < u.length; l++) {
  33040. var d = u[l];
  33041. if (e._accept(d, o)) {
  33042. var c = s.push(d);
  33043. if (r > 0 && c === r) break
  33044. }
  33045. }
  33046. return s
  33047. }
  33048. return []
  33049. }
  33050. if (n || i) {
  33051. var h = n ? this._byOwner[n] : i ? this._byResource[i.toString()] : void 0;
  33052. if (!h) return [];
  33053. s = [];
  33054. for (var p in h) for (var g = 0, f = h[p]; g < f.length; g++) {
  33055. C = f[g]
  33056. ;
  33057. if (e._accept(C, o)) {
  33058. c = s.push(C);
  33059. if (r > 0 && c === r) return s
  33060. }
  33061. }
  33062. return s
  33063. }
  33064. var s = [];
  33065. for (var m in this._byResource) for (var v in this._byResource[m]) for (var _ = 0, y = this._byResource[m][v]; _ < y.length; _++) {
  33066. var C = y[_];
  33067. if (e._accept(C, o)) {
  33068. var c = s.push(C);
  33069. if (r > 0 && c === r) return s
  33070. }
  33071. }
  33072. return s
  33073. }, e._accept = function (e, t) {
  33074. return void 0 === t || (t & e.severity) === e.severity
  33075. }, e._debouncer = function (t, n) {
  33076. t || (e._dedupeMap = Object.create(null), t = []);
  33077. for (var i = 0, o = n; i < o.length; i++) {
  33078. var r = o[i];
  33079. void 0 === e._dedupeMap[r.toString()] && (e._dedupeMap[r.toString()] = !0, t.push(r))
  33080. }
  33081. return t
  33082. }, e
  33083. }();
  33084. t.MarkerService = u
  33085. })), define(n[35], i([0, 1, 112, 11]), (function (e, t, n, i) {
  33086. "use strict";
  33087. Object.defineProperty(t, "__esModule", {value: !0}), t.Severity = n.default, t.INotificationService = i.createDecorator("notificationService");
  33088. var o = function () {
  33089. };
  33090. t.NoOpNotification = o
  33091. })), define(n[51], i([0, 1, 25, 11, 2, 5]), (function (e, t, n, i, o, r) {
  33092. "use strict";
  33093. Object.defineProperty(t, "__esModule", {value: !0}), t.IOpenerService = i.createDecorator("openerService"), t.NullOpenerService = Object.freeze({
  33094. _serviceBrand: void 0, registerOpener: function () {
  33095. return o.Disposable.None
  33096. }, registerValidator: function () {
  33097. return o.Disposable.None
  33098. }, registerExternalUriResolver: function () {
  33099. return o.Disposable.None
  33100. }, setExternalOpener: function () {
  33101. }, open: function () {
  33102. return d(this, void 0, void 0, (function () {
  33103. return c(this, (function (e) {
  33104. return [2, !1]
  33105. }))
  33106. }))
  33107. }, resolveExternalUri: function (e) {
  33108. return d(this, void 0, void 0, (function () {
  33109. return c(this, (function (t) {
  33110. return [2, {
  33111. resolved: e, dispose: function () {
  33112. }
  33113. }]
  33114. }))
  33115. }))
  33116. }
  33117. }), t.matchesScheme = function (e, t) {
  33118. return n.URI.isUri(e) ? r.equalsIgnoreCase(e.scheme, t) : r.startsWithIgnoreCase(e, t + ":")
  33119. }
  33120. }));
  33121. a = this && this.__spreadArrays || function () {
  33122. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  33123. var i = Array(e), o = 0;
  33124. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  33125. return i
  33126. };
  33127. define(n[509], i([0, 1, 6, 76, 180, 46, 39, 25, 32, 29, 51, 478]), (function (e, t, n, i, o, r, s, l, u, p, f, m) {
  33128. "use strict";
  33129. Object.defineProperty(t, "__esModule", {value: !0});
  33130. var v = function () {
  33131. function e(e) {
  33132. this._commandService = e
  33133. }
  33134. return e.prototype.open = function (e) {
  33135. return d(this, void 0, void 0, (function () {
  33136. var t, n;
  33137. return c(this, (function (i) {
  33138. switch (i.label) {
  33139. case 0:
  33140. if (!f.matchesScheme(e, r.Schemas.command)) return [2, !1];
  33141. if ("string" == typeof e && (e = l.URI.parse(e)), !p.CommandsRegistry.getCommand(e.path)) throw new Error("command '" + e.path + "' NOT known");
  33142. t = [];
  33143. try {
  33144. t = o.parse(decodeURIComponent(e.query))
  33145. } catch (n) {
  33146. try {
  33147. t = o.parse(e.query)
  33148. } catch (e) {
  33149. }
  33150. }
  33151. return Array.isArray(t) || (t = [t]), [4, (n = this._commandService).executeCommand.apply(n, a([e.path], t))];
  33152. case 1:
  33153. return i.sent(), [2, !0]
  33154. }
  33155. }))
  33156. }))
  33157. }, e = h([g(0, p.ICommandService)], e)
  33158. }(), _ = function () {
  33159. function e(e) {
  33160. this._editorService = e
  33161. }
  33162. return e.prototype.open = function (e, t) {
  33163. return d(this, void 0, void 0, (function () {
  33164. var n, i;
  33165. return c(this, (function (o) {
  33166. switch (o.label) {
  33167. case 0:
  33168. return "string" == typeof e && (e = l.URI.parse(e)), n = void 0, (i = /^L?(\d+)(?:,(\d+))?/.exec(e.fragment)) && (n = {
  33169. startLineNumber: parseInt(i[1]),
  33170. startColumn: i[2] ? parseInt(i[2]) : 1
  33171. }, e = e.with({fragment: ""})), e.scheme === r.Schemas.file && (e = s.normalizePath(e)),
  33172. [4, this._editorService.openCodeEditor({
  33173. resource: e,
  33174. options: {
  33175. selection: n,
  33176. context: (null == t ? void 0 : t.fromUserGesture) ? m.EditorOpenContext.USER : m.EditorOpenContext.API
  33177. }
  33178. }, this._editorService.getFocusedCodeEditor(), null == t ? void 0 : t.openToSide)];
  33179. case 1:
  33180. return o.sent(), [2, !0]
  33181. }
  33182. }))
  33183. }))
  33184. }, e = h([g(0, u.ICodeEditorService)], e)
  33185. }(), y = function () {
  33186. function e(e, t) {
  33187. var o = this;
  33188. this._openers = new i.LinkedList, this._validators = new i.LinkedList, this._resolvers = new i.LinkedList, this._externalOpener = {
  33189. openExternal: function (e) {
  33190. return n.windowOpenNoOpener(e), Promise.resolve(!0)
  33191. }
  33192. }, this._openers.push({
  33193. open: function (e, t) {
  33194. return d(o, void 0, void 0, (function () {
  33195. return c(this, (function (n) {
  33196. switch (n.label) {
  33197. case 0:
  33198. return (null == t ? void 0 : t.openExternal) || f.matchesScheme(e, r.Schemas.mailto) || f.matchesScheme(e, r.Schemas.http) || f.matchesScheme(e, r.Schemas.https) ? [4, this._doOpenExternal(e, t)] : [3, 2];
  33199. case 1:
  33200. return n.sent(), [2, !0];
  33201. case 2:
  33202. return [2, !1]
  33203. }
  33204. }))
  33205. }))
  33206. }
  33207. }), this._openers.push(new v(t)), this._openers.push(new _(e))
  33208. }
  33209. return e.prototype.open = function (e, t) {
  33210. return d(this, void 0, void 0, (function () {
  33211. var n, i, o, r;
  33212. return c(this, (function (s) {
  33213. switch (s.label) {
  33214. case 0:
  33215. n = 0, i = this._validators.toArray(), s.label = 1;
  33216. case 1:
  33217. return n < i.length ? [4, i[n].shouldOpen(e)] : [3, 4];
  33218. case 2:
  33219. if (!s.sent()) return [2, !1];
  33220. s.label = 3;
  33221. case 3:
  33222. return n++, [3, 1];
  33223. case 4:
  33224. o = 0, r = this._openers.toArray(), s.label = 5;
  33225. case 5:
  33226. return o < r.length ? [4, r[o].open(e, t)] : [3, 8];
  33227. case 6:
  33228. if (s.sent()) return [2, !0];
  33229. s.label = 7;
  33230. case 7:
  33231. return o++, [3, 5];
  33232. case 8:
  33233. return [2, !1]
  33234. }
  33235. }))
  33236. }))
  33237. }, e.prototype.resolveExternalUri = function (e, t) {
  33238. return d(this, void 0, void 0, (function () {
  33239. var n, i, o;
  33240. return c(this, (function (r) {
  33241. switch (r.label) {
  33242. case 0:
  33243. n = 0, i = this._resolvers.toArray(), r.label = 1;
  33244. case 1:
  33245. return n < i.length ? [4, i[n].resolveExternalUri(e, t)] : [3, 4];
  33246. case 2:
  33247. if (o = r.sent()) return [2, o];
  33248. r.label = 3;
  33249. case 3:
  33250. return n++, [3, 1];
  33251. case 4:
  33252. return [2, {
  33253. resolved: e, dispose: function () {
  33254. }
  33255. }]
  33256. }
  33257. }))
  33258. }))
  33259. }, e.prototype._doOpenExternal = function (e, t) {
  33260. return d(this, void 0, void 0, (function () {
  33261. var n, i;
  33262. return c(this, (function (o) {
  33263. switch (o.label) {
  33264. case 0:
  33265. return n = "string" == typeof e ? l.URI.parse(e) : e,
  33266. [4, this.resolveExternalUri(n, t)];
  33267. case 1:
  33268. return i = o.sent().resolved, "string" == typeof e && n.toString() === i.toString() ? [2, this._externalOpener.openExternal(e)] : [2, this._externalOpener.openExternal(encodeURI(i.toString(!0)))]
  33269. }
  33270. }))
  33271. }))
  33272. }, e.prototype.dispose = function () {
  33273. this._validators.clear()
  33274. }, e = h([g(0, u.ICodeEditorService), g(1, p.ICommandService)], e)
  33275. }();
  33276. t.OpenerService = y
  33277. })), define(n[117], i([0, 1, 248, 51, 71, 10, 214, 11, 4, 2, 17]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  33278. "use strict";
  33279. Object.defineProperty(t, "__esModule", {value: !0});
  33280. var p = function (e) {
  33281. function t(t, n, o) {
  33282. void 0 === o && (o = i.NullOpenerService);
  33283. var r = e.call(this) || this;
  33284. return r._editor = t, r._modeService = n, r._openerService = o, r._onDidRenderCodeBlock = r._register(new u.Emitter), r.onDidRenderCodeBlock = r._onDidRenderCodeBlock.event, r
  33285. }
  33286. return r(t, e), t.prototype.getOptions = function (e) {
  33287. var t = this;
  33288. return {
  33289. codeBlockRenderer: function (e, n) {
  33290. var i = null;
  33291. if (e) i = t._modeService.getModeIdForLanguageName(e); else {
  33292. var o = t._editor.getModel();
  33293. o && (i = o.getLanguageIdentifier().language)
  33294. }
  33295. return t._modeService.triggerMode(i || ""), Promise.resolve(!0).then((function (e) {
  33296. var t = c.TokenizationRegistry.getPromise(i || "");
  33297. return t ? t.then((function (e) {
  33298. return a.tokenizeToString(n, e)
  33299. })) : a.tokenizeToString(n, void 0)
  33300. })).then((function (e) {
  33301. return '<span style="font-family: ' + t._editor.getOption(34).fontFamily + '">' + e + "</span>"
  33302. }))
  33303. }, codeBlockRenderCallback: function () {
  33304. return t._onDidRenderCodeBlock.fire()
  33305. }, actionHandler: {
  33306. callback: function (e) {
  33307. t._openerService.open(e, {fromUserGesture: !0}).catch(s.onUnexpectedError)
  33308. }, disposeables: e
  33309. }
  33310. }
  33311. }, t.prototype.render = function (e) {
  33312. var t = new d.DisposableStore;
  33313. return {
  33314. element: e ? n.renderMarkdown(e, this.getOptions(t)) : document.createElement("span"),
  33315. dispose: function () {
  33316. return t.dispose()
  33317. }
  33318. }
  33319. }, t = h([g(1, o.IModeService), g(2, l.optional(i.IOpenerService))], t)
  33320. }(d.Disposable);
  33321. t.MarkdownRenderer = p
  33322. })), define(n[510], i([0, 1, 6, 75, 2, 200, 201, 117, 51, 19]), (function (e, t, n, i, o, s, a, l, u, d) {
  33323. "use strict";
  33324. Object.defineProperty(t, "__esModule", {value: !0});
  33325. var c = function () {
  33326. function e(e) {
  33327. this._editor = e,
  33328. this._lineNumber = -1, this._result = []
  33329. }
  33330. return e.prototype.setLineNumber = function (e) {
  33331. this._lineNumber = e, this._result = []
  33332. }, e.prototype.clearResult = function () {
  33333. this._result = []
  33334. }, e.prototype.computeSync = function () {
  33335. var e = function (e) {
  33336. return {value: e}
  33337. }, t = this._editor.getLineDecorations(this._lineNumber), n = [];
  33338. if (!t) return n;
  33339. for (var o = 0, r = t; o < r.length; o++) {
  33340. var s = r[o];
  33341. if (s.options.glyphMarginClassName) {
  33342. var a = s.options.glyphMarginHoverMessage;
  33343. a && !i.isEmptyMarkdownString(a) && n.push.apply(n, d.asArray(a).map(e))
  33344. }
  33345. }
  33346. return n
  33347. }, e.prototype.onResult = function (e, t) {
  33348. this._result = this._result.concat(e)
  33349. }, e.prototype.getResult = function () {
  33350. return this._result
  33351. }, e.prototype.getResultWithLoadingMessage = function () {
  33352. return this.getResult()
  33353. }, e
  33354. }(), h = function (e) {
  33355. function t(n, i, r) {
  33356. void 0 === r && (r = u.NullOpenerService);
  33357. var a = e.call(this, t.ID, n) || this;
  33358. return a._renderDisposeables = a._register(new o.DisposableStore), a._messages = [], a._lastLineNumber = -1, a._markdownRenderer = a._register(new l.MarkdownRenderer(a._editor, i, r)), a._computer = new c(a._editor),
  33359. a._hoverOperation = new s.HoverOperation(a._computer, (function (e) {
  33360. return a._withResult(e)
  33361. }), void 0, (function (e) {
  33362. return a._withResult(e)
  33363. }), 300), a
  33364. }
  33365. return r(t, e), t.prototype.dispose = function () {
  33366. this._hoverOperation.cancel(), e.prototype.dispose.call(this)
  33367. }, t.prototype.onModelDecorationsChanged = function () {
  33368. this.isVisible && (this._hoverOperation.cancel(), this._computer.clearResult(), this._hoverOperation.start(0))
  33369. }, t.prototype.startShowingAt = function (e) {
  33370. this._lastLineNumber !== e && (this._hoverOperation.cancel(), this.hide(), this._lastLineNumber = e, this._computer.setLineNumber(e), this._hoverOperation.start(0))
  33371. }, t.prototype.hide = function () {
  33372. this._lastLineNumber = -1, this._hoverOperation.cancel(), e.prototype.hide.call(this)
  33373. }, t.prototype._withResult = function (e) {
  33374. this._messages = e, this._messages.length > 0 ? this._renderMessages(this._lastLineNumber, this._messages) : this.hide()
  33375. }, t.prototype._renderMessages = function (e, t) {
  33376. this._renderDisposeables.clear();
  33377. for (var i = document.createDocumentFragment(), o = 0, r = t; o < r.length; o++) {
  33378. var s = r[o], a = this._markdownRenderer.render(s.value);
  33379. this._renderDisposeables.add(a), i.appendChild(n.$("div.hover-row", void 0, a.element))
  33380. }
  33381. this.updateContents(i), this.showAt(e)
  33382. }, t.ID = "editor.contrib.modesGlyphHoverWidget", t
  33383. }(a.GlyphHoverWidget);
  33384. t.ModesGlyphHoverWidget = h
  33385. })), define(n[73], i([0, 1, 11]), (function (e, t, n) {
  33386. "use strict";
  33387. Object.defineProperty(t, "__esModule", {value: !0}), t.IEditorProgressService = n.createDecorator("editorProgressService")
  33388. })), define(n[42], i([0, 1, 21, 124]), (function (e, t, n, i) {
  33389. "use strict";
  33390. Object.defineProperty(t, "__esModule", {value: !0});
  33391. var o = function () {
  33392. function e() {
  33393. this.data = new Map
  33394. }
  33395. return e.prototype.add = function (e, t) {
  33396. i.ok(n.isString(e)), i.ok(n.isObject(t)), i.ok(!this.data.has(e), "There is already an extension with this id"), this.data.set(e, t)
  33397. }, e.prototype.as = function (e) {
  33398. return this.data.get(e) || null
  33399. }, e
  33400. }();
  33401. t.Registry = new o
  33402. })), define(n[118], i([0, 1, 425, 4, 17, 41, 42]), (function (e, t, n, i, o, r, s) {
  33403. "use strict";
  33404. Object.defineProperty(t, "__esModule", {value: !0}), t.Extensions = {
  33405. ModesRegistry: "editor.modesRegistry"
  33406. };
  33407. var a = function () {
  33408. function e() {
  33409. this._onDidChangeLanguages = new i.Emitter, this.onDidChangeLanguages = this._onDidChangeLanguages.event, this._languages = [], this._dynamicLanguages = []
  33410. }
  33411. return e.prototype.registerLanguage = function (e) {
  33412. this._languages.push(e), this._onDidChangeLanguages.fire(void 0)
  33413. }, e.prototype.getLanguages = function () {
  33414. return [].concat(this._languages).concat(this._dynamicLanguages)
  33415. }, e
  33416. }();
  33417. t.EditorModesRegistry = a, t.ModesRegistry = new a, s.Registry.add(t.Extensions.ModesRegistry, t.ModesRegistry), t.PLAINTEXT_MODE_ID = "plaintext", t.PLAINTEXT_LANGUAGE_IDENTIFIER = new o.LanguageIdentifier(t.PLAINTEXT_MODE_ID, 1), t.ModesRegistry.registerLanguage({
  33418. id: t.PLAINTEXT_MODE_ID,
  33419. extensions: [".txt", ".gitignore"],
  33420. aliases: [n.localize(0, null), "text"],
  33421. mimetypes: ["text/plain"]
  33422. }), r.LanguageConfigurationRegistry.register(t.PLAINTEXT_LANGUAGE_IDENTIFIER, {
  33423. brackets: [["(", ")"], ["[", "]"], ["{", "}"]],
  33424. surroundingPairs: [{open: "{", close: "}"}, {open: "[", close: "]"}, {open: "(", close: ")"}, {
  33425. open: "<",
  33426. close: ">"
  33427. }, {
  33428. open: '"', close: '"'
  33429. }, {open: "'", close: "'"}, {open: "`", close: "`"}],
  33430. folding: {offSide: !0}
  33431. })
  33432. })), define(n[511], i([0, 1, 46, 39, 118, 208]), (function (e, t, n, i, o, r) {
  33433. "use strict";
  33434. function s(e, t, r) {
  33435. if (!r) return null;
  33436. var s = null;
  33437. if (r.scheme === n.Schemas.data) {
  33438. var a = i.DataUri.parseMetaData(r).get(i.DataUri.META_DATA_MIME);
  33439. a && (s = t.getModeId(a))
  33440. } else {
  33441. var l = e.getModel(r);
  33442. l && (s = l.getModeId())
  33443. }
  33444. return s && s !== o.PLAINTEXT_MODE_ID ? s : t.getModeIdByFilepathOrFirstLine(r)
  33445. }
  33446. function a(e) {
  33447. return e.replace(/\s/g, "\\$&")
  33448. }
  33449. Object.defineProperty(t, "__esModule", {value: !0}), t.getIconClasses = function (e, t, o, l) {
  33450. var u = l === r.FileKind.ROOT_FOLDER ? ["rootfolder-icon"] : l === r.FileKind.FOLDER ? ["folder-icon"] : ["file-icon"];
  33451. if (o) {
  33452. var d;
  33453. if (o.scheme === n.Schemas.data) d = i.DataUri.parseMetaData(o).get(i.DataUri.META_DATA_LABEL); else d = a(i.basenameOrAuthority(o).toLowerCase());
  33454. if (l === r.FileKind.FOLDER) u.push(d + "-name-folder-icon"); else {
  33455. if (d) {
  33456. u.push(d + "-name-file-icon");
  33457. for (var c = d.split("."), h = 1; h < c.length; h++) u.push(c.slice(h).join(".") + "-ext-file-icon")
  33458. ;
  33459. u.push("ext-file-icon")
  33460. }
  33461. var p = s(e, t, o);
  33462. p && u.push(a(p) + "-lang-file-icon")
  33463. }
  33464. }
  33465. return u
  33466. }, t.detectModeId = s, t.cssEscape = a
  33467. })), define(n[220], i([0, 1, 42, 4]), (function (e, t, n, i) {
  33468. "use strict";
  33469. Object.defineProperty(t, "__esModule", {value: !0}), t.Extensions = {JSONContribution: "base.contributions.json"};
  33470. var o = new (function () {
  33471. function e() {
  33472. this._onDidChangeSchema = new i.Emitter, this.schemasById = {}
  33473. }
  33474. return e.prototype.registerSchema = function (e, t) {
  33475. var n;
  33476. this.schemasById[(n = e, n.length > 0 && "#" === n.charAt(n.length - 1) ? n.substring(0, n.length - 1) : n)] = t, this._onDidChangeSchema.fire(e)
  33477. }, e.prototype.notifySchemaChanged = function (e) {
  33478. this._onDidChangeSchema.fire(e)
  33479. }, e
  33480. }());
  33481. n.Registry.add(t.Extensions.JSONContribution, o)
  33482. })), define(n[85], i([0, 1, 472, 4, 42, 21, 220, 38]), (function (e, t, n, i, o, r, s, a) {
  33483. "use strict";
  33484. Object.defineProperty(t, "__esModule", {value: !0}), t.Extensions = {Configuration: "base.contributions.configuration"}, t.allSettings = {
  33485. properties: {},
  33486. patternProperties: {}
  33487. }, t.applicationSettings = {properties: {}, patternProperties: {}}, t.machineSettings = {
  33488. properties: {}, patternProperties: {}
  33489. }, t.machineOverridableSettings = {properties: {}, patternProperties: {}}, t.windowSettings = {
  33490. properties: {},
  33491. patternProperties: {}
  33492. }, t.resourceSettings = {
  33493. properties: {},
  33494. patternProperties: {}
  33495. }, t.resourceLanguageSettingsSchemaId = "vscode://schemas/settings/resourceLanguage";
  33496. var l = o.Registry.as(s.Extensions.JSONContribution), u = function () {
  33497. function e() {
  33498. this.overrideIdentifiers = new Set, this._onDidSchemaChange = new i.Emitter, this._onDidUpdateConfiguration = new i.Emitter, this.defaultOverridesConfigurationNode = {
  33499. id: "defaultOverrides",
  33500. title: n.localize(0, null),
  33501. properties: {}
  33502. }, this.configurationContributors = [this.defaultOverridesConfigurationNode], this.resourceLanguageSettingsSchema = {
  33503. properties: {},
  33504. patternProperties: {},
  33505. additionalProperties: !1,
  33506. errorMessage: "Unknown editor configuration setting",
  33507. allowTrailingCommas: !0,
  33508. allowComments: !0
  33509. }, this.configurationProperties = {}, this.excludedConfigurationProperties = {}, l.registerSchema(t.resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema)
  33510. }
  33511. return e.prototype.registerConfiguration = function (e, t) {
  33512. void 0 === t && (t = !0), this.registerConfigurations([e], t)
  33513. }, e.prototype.registerConfigurations = function (e, n) {
  33514. var i = this;
  33515. void 0 === n && (n = !0);
  33516. var o = [];
  33517. e.forEach((function (e) {
  33518. o.push.apply(o, i.validateAndRegisterProperties(e, n)), i.configurationContributors.push(e), i.registerJSONConfiguration(e)
  33519. })), l.registerSchema(t.resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema), this._onDidSchemaChange.fire(), this._onDidUpdateConfiguration.fire(o)
  33520. }, e.prototype.registerOverrideIdentifiers = function (e) {
  33521. for (var t = 0, n = e; t < n.length; t++) {
  33522. var i = n[t];
  33523. this.overrideIdentifiers.add(i)
  33524. }
  33525. this.updateOverridePropertyPatternKey()
  33526. }, e.prototype.validateAndRegisterProperties = function (e, n, i) {
  33527. void 0 === n && (n = !0), void 0 === i && (i = 3), i = r.isUndefinedOrNull(e.scope) ? i : e.scope;
  33528. var o = [], s = e.properties;
  33529. if (s) for (var a in s) if (n && h(a)) delete s[a]; else {
  33530. var l = s[a], u = l.default;
  33531. r.isUndefined(u) && (l.default = d(l.type)),
  33532. t.OVERRIDE_PROPERTY_PATTERN.test(a) ? l.scope = void 0 : l.scope = r.isUndefinedOrNull(l.scope) ? i : l.scope, !s[a].hasOwnProperty("included") || s[a].included ? (this.configurationProperties[a] = s[a], o.push(a)) : (this.excludedConfigurationProperties[a] = s[a], delete s[a])
  33533. }
  33534. var c = e.allOf;
  33535. if (c) for (var p = 0, g = c; p < g.length; p++) {
  33536. var f = g[p];
  33537. o.push.apply(o, this.validateAndRegisterProperties(f, n, i))
  33538. }
  33539. return o
  33540. }, e.prototype.getConfigurationProperties = function () {
  33541. return this.configurationProperties
  33542. }, e.prototype.registerJSONConfiguration = function (e) {
  33543. var n = this, i = function (e) {
  33544. var o = e.properties;
  33545. if (o) for (var r in o) switch (t.allSettings.properties[r] = o[r], o[r].scope) {
  33546. case 1:
  33547. t.applicationSettings.properties[r] = o[r];
  33548. break;
  33549. case 2:
  33550. t.machineSettings.properties[r] = o[r];
  33551. break;
  33552. case 6:
  33553. t.machineOverridableSettings.properties[r] = o[r];
  33554. break;
  33555. case 3:
  33556. t.windowSettings.properties[r] = o[r];
  33557. break;
  33558. case 4:
  33559. t.resourceSettings.properties[r] = o[r];
  33560. break;
  33561. case 5:
  33562. t.resourceSettings.properties[r] = o[r], n.resourceLanguageSettingsSchema.properties[r] = o[r]
  33563. }
  33564. var s = e.allOf
  33565. ;s && s.forEach(i)
  33566. };
  33567. i(e)
  33568. }, e.prototype.updateOverridePropertyPatternKey = function () {
  33569. for (var e, i = 0, o = a.values(this.overrideIdentifiers); i < o.length; i++) {
  33570. var r = "[" + o[i] + "]", s = {
  33571. type: "object",
  33572. description: n.localize(1, null),
  33573. errorMessage: n.localize(2, null),
  33574. $ref: t.resourceLanguageSettingsSchemaId,
  33575. default: null === (e = this.defaultOverridesConfigurationNode.properties[r]) || void 0 === e ? void 0 : e.default
  33576. };
  33577. t.allSettings.properties[r] = s, t.applicationSettings.properties[r] = s, t.machineSettings.properties[r] = s, t.machineOverridableSettings.properties[r] = s, t.windowSettings.properties[r] = s, t.resourceSettings.properties[r] = s
  33578. }
  33579. this._onDidSchemaChange.fire()
  33580. }, e
  33581. }();
  33582. function d(e) {
  33583. switch (Array.isArray(e) ? e[0] : e) {
  33584. case"boolean":
  33585. return !1;
  33586. case"integer":
  33587. case"number":
  33588. return 0;
  33589. case"string":
  33590. return "";
  33591. case"array":
  33592. return [];
  33593. case"object":
  33594. return {};
  33595. default:
  33596. return null
  33597. }
  33598. }
  33599. t.OVERRIDE_PROPERTY_PATTERN = new RegExp("\\[.*\\]$"), t.getDefaultValue = d;
  33600. var c = new u;
  33601. function h(e) {
  33602. return t.OVERRIDE_PROPERTY_PATTERN.test(e) ? n.localize(3, null, e) : void 0 !== c.getConfigurationProperties()[e] ? n.localize(4, null, e) : null
  33603. }
  33604. o.Registry.add(t.Extensions.Configuration, c), t.validateProperty = h
  33605. })), define(n[163], i([0, 1, 422, 4, 2, 31, 19, 33, 105, 142, 85, 42, 87]), (function (e, t, n, i, o, s, a, u, d, c, h, p, g) {
  33606. "use strict";
  33607. Object.defineProperty(t, "__esModule", {value: !0}), t.TabFocus = new (function () {
  33608. function e() {
  33609. this._tabFocus = !1, this._onDidChangeTabFocus = new i.Emitter, this.onDidChangeTabFocus = this._onDidChangeTabFocus.event
  33610. }
  33611. return e.prototype.getTabFocusMode = function () {
  33612. return this._tabFocus
  33613. }, e.prototype.setTabFocusMode = function (e) {
  33614. this._tabFocus !== e && (this._tabFocus = e, this._onDidChangeTabFocus.fire(this._tabFocus))
  33615. }, e
  33616. }());
  33617. var f = Object.hasOwnProperty, m = function () {
  33618. function e() {
  33619. this._values = []
  33620. }
  33621. return e.prototype._read = function (e) {
  33622. return this._values[e]
  33623. }, e.prototype.get = function (e) {
  33624. return this._values[e]
  33625. }, e.prototype._write = function (e, t) {
  33626. this._values[e] = t
  33627. }, e
  33628. }();
  33629. t.ComputedEditorOptions = m;
  33630. var v = function () {
  33631. function e() {
  33632. this._values = []
  33633. }
  33634. return e.prototype._read = function (e) {
  33635. return this._values[e]
  33636. }, e.prototype._write = function (e, t) {
  33637. this._values[e] = t
  33638. }, e
  33639. }(), _ = function () {
  33640. function e() {
  33641. }
  33642. return e.readOptions = function (e) {
  33643. for (var t = e, n = new v, i = 0, o = u.editorOptionsRegistry; i < o.length; i++) {
  33644. var r = o[i], s = "_never_" === r.name ? void 0 : t[r.name];
  33645. n._write(r.id, s)
  33646. }
  33647. return n
  33648. }, e.validateOptions = function (e) {
  33649. for (var t = new u.ValidatedEditorOptions, n = 0, i = u.editorOptionsRegistry; n < i.length; n++) {
  33650. var o = i[n];
  33651. t._write(o.id, o.validate(e._read(o.id)))
  33652. }
  33653. return t
  33654. }, e.computeOptions = function (e, t) {
  33655. for (var n = new m, i = 0, o = u.editorOptionsRegistry; i < o.length; i++) {
  33656. var r = o[i];
  33657. n._write(r.id, r.compute(t, n, e._read(r.id)))
  33658. }
  33659. return n
  33660. }, e._deepEquals = function (t, n) {
  33661. if ("object" != typeof t || "object" != typeof n) return t === n;
  33662. if (Array.isArray(t) || Array.isArray(n)) return !(!Array.isArray(t) || !Array.isArray(n)) && a.equals(t, n);
  33663. for (var i in t) if (!e._deepEquals(t[i], n[i])) return !1;
  33664. return !0
  33665. }, e.checkEquals = function (t, n) {
  33666. for (var i = [], o = !1, r = 0, s = u.editorOptionsRegistry; r < s.length; r++) {
  33667. var a = s[r], l = !e._deepEquals(t._read(a.id), n._read(a.id));
  33668. i[a.id] = l, l && (o = !0)
  33669. }
  33670. return o ? new u.ConfigurationChangedEvent(i) : null
  33671. }, e
  33672. }();
  33673. function y(e) {
  33674. var t = s.deepClone(e);
  33675. return function (e) {
  33676. var t = e.wordWrap;
  33677. !0 === t ? e.wordWrap = "on" : !1 === t && (e.wordWrap = "off");
  33678. var n = e.lineNumbers;
  33679. !0 === n ? e.lineNumbers = "on" : !1 === n && (e.lineNumbers = "off"), !1 === e.autoClosingBrackets && (e.autoClosingBrackets = "never", e.autoClosingQuotes = "never", e.autoSurround = "never"), "visible" === e.cursorBlinking && (e.cursorBlinking = "solid");
  33680. var i = e.renderWhitespace;
  33681. !0 === i ? e.renderWhitespace = "boundary" : !1 === i && (e.renderWhitespace = "none");
  33682. var o = e.renderLineHighlight;
  33683. !0 === o ? e.renderLineHighlight = "line" : !1 === o && (e.renderLineHighlight = "none");
  33684. var r = e.acceptSuggestionOnEnter;
  33685. !0 === r ? e.acceptSuggestionOnEnter = "on" : !1 === r && (e.acceptSuggestionOnEnter = "off");
  33686. var s = e.tabCompletion;
  33687. !1 === s ? e.tabCompletion = "off" : !0 === s && (e.tabCompletion = "onlySnippets");
  33688. var a = e.suggest;
  33689. if (a && "object" == typeof a.filteredTypes && a.filteredTypes) {
  33690. var l = {
  33691. method: "showMethods",
  33692. function: "showFunctions",
  33693. constructor: "showConstructors",
  33694. field: "showFields",
  33695. variable: "showVariables",
  33696. class: "showClasses",
  33697. struct: "showStructs",
  33698. interface: "showInterfaces",
  33699. module: "showModules",
  33700. property: "showProperties",
  33701. event: "showEvents",
  33702. operator: "showOperators",
  33703. unit: "showUnits",
  33704. value: "showValues",
  33705. constant: "showConstants",
  33706. enum: "showEnums",
  33707. enumMember: "showEnumMembers",
  33708. keyword: "showKeywords",
  33709. text: "showWords",
  33710. color: "showColors",
  33711. file: "showFiles",
  33712. reference: "showReferences",
  33713. folder: "showFolders",
  33714. typeParameter: "showTypeParameters",
  33715. snippet: "showSnippets"
  33716. };
  33717. g.forEach(l, (function (e) {
  33718. var t = a.filteredTypes[e.key];
  33719. !1 === t && (a[e.value] = t)
  33720. }))
  33721. }
  33722. var u = e.hover;
  33723. !0 === u ? e.hover = {enabled: !0} : !1 === u && (e.hover = {enabled: !1});
  33724. var d = e.parameterHints;
  33725. !0 === d ? e.parameterHints = {enabled: !0} : !1 === d && (e.parameterHints = {enabled: !1});
  33726. var c = e.autoIndent;
  33727. !0 === c ? e.autoIndent = "full" : !1 === c && (e.autoIndent = "advanced");
  33728. var h = e.matchBrackets;
  33729. !0 === h ? e.matchBrackets = "always" : !1 === h && (e.matchBrackets = "never")
  33730. }(t), t
  33731. }
  33732. var C = function (e) {
  33733. function n(n, o) {
  33734. var r = e.call(this) || this;
  33735. return r._onDidChange = r._register(new i.Emitter), r.onDidChange = r._onDidChange.event, r.isSimpleWidget = n, r._isDominatedByLongLines = !1, r._lineNumbersDigitCount = 1, r._rawOptions = y(o), r._readOptions = _.readOptions(r._rawOptions), r._validatedOptions = _.validateOptions(r._readOptions), r._register(d.EditorZoom.onDidChangeZoomLevel((function (e) {
  33736. return r._recomputeOptions()
  33737. }))), r._register(t.TabFocus.onDidChangeTabFocus((function (e) {
  33738. return r._recomputeOptions()
  33739. }))), r
  33740. }
  33741. return r(n, e), n.prototype.observeReferenceElement = function (e) {
  33742. }, n.prototype.dispose = function () {
  33743. e.prototype.dispose.call(this)
  33744. }, n.prototype._recomputeOptions = function () {
  33745. var e = this.options, t = this._computeInternalOptions();
  33746. if (e) {
  33747. var n = _.checkEquals(e, t);
  33748. if (null === n) return;
  33749. this.options = t, this._onDidChange.fire(n)
  33750. } else this.options = t
  33751. }, n.prototype.getRawOptions = function () {
  33752. return this._rawOptions
  33753. }, n.prototype._computeInternalOptions = function () {
  33754. var e = this._getEnvConfiguration(),
  33755. n = c.BareFontInfo.createFromValidatedSettings(this._validatedOptions, e.zoomLevel, this.isSimpleWidget),
  33756. i = {
  33757. outerWidth: e.outerWidth,
  33758. outerHeight: e.outerHeight,
  33759. fontInfo: this.readConfiguration(n),
  33760. extraEditorClassName: e.extraEditorClassName,
  33761. isDominatedByLongLines: this._isDominatedByLongLines,
  33762. lineNumbersDigitCount: this._lineNumbersDigitCount,
  33763. emptySelectionClipboard: e.emptySelectionClipboard,
  33764. pixelRatio: e.pixelRatio,
  33765. tabFocusMode: t.TabFocus.getTabFocusMode(),
  33766. accessibilitySupport: e.accessibilitySupport
  33767. };
  33768. return _.computeOptions(this._validatedOptions, i)
  33769. }, n._subsetEquals = function (e, t) {
  33770. for (var n in t) if (f.call(t, n)) {
  33771. var i = t[n], o = e[n];
  33772. if (o === i) continue;
  33773. if (Array.isArray(o) && Array.isArray(i)) {
  33774. if (!a.equals(o, i)) return !1;
  33775. continue
  33776. }
  33777. if ("object" == typeof o && "object" == typeof i) {
  33778. if (!this._subsetEquals(o, i)) return !1;
  33779. continue
  33780. }
  33781. return !1
  33782. }
  33783. return !0
  33784. }, n.prototype.updateOptions = function (e) {
  33785. if (void 0 !== e) {
  33786. var t = y(e);
  33787. n._subsetEquals(this._rawOptions, t) || (this._rawOptions = s.mixin(this._rawOptions, t || {}),
  33788. this._readOptions = _.readOptions(this._rawOptions), this._validatedOptions = _.validateOptions(this._readOptions), this._recomputeOptions())
  33789. }
  33790. }, n.prototype.setIsDominatedByLongLines = function (e) {
  33791. this._isDominatedByLongLines = e, this._recomputeOptions()
  33792. }, n.prototype.setMaxLineNumber = function (e) {
  33793. var t = n._digitCount(e);
  33794. this._lineNumbersDigitCount !== t && (this._lineNumbersDigitCount = t, this._recomputeOptions())
  33795. }, n._digitCount = function (e) {
  33796. for (var t = 0; e;) e = Math.floor(e / 10), t++;
  33797. return t || 1
  33798. }, n
  33799. }(o.Disposable);
  33800. t.CommonEditorConfiguration = C, t.editorConfigurationBaseNode = Object.freeze({
  33801. id: "editor",
  33802. order: 5,
  33803. type: "object",
  33804. title: n.localize(0, null),
  33805. scope: 5
  33806. });
  33807. var b, S = p.Registry.as(h.Extensions.Configuration), w = l(l({}, t.editorConfigurationBaseNode), {
  33808. properties: {
  33809. "editor.tabSize": {
  33810. type: "number",
  33811. default: u.EDITOR_MODEL_DEFAULTS.tabSize,
  33812. minimum: 1,
  33813. markdownDescription: n.localize(1, null)
  33814. },
  33815. "editor.insertSpaces": {
  33816. type: "boolean",
  33817. default: u.EDITOR_MODEL_DEFAULTS.insertSpaces,
  33818. markdownDescription: n.localize(2, null)
  33819. },
  33820. "editor.detectIndentation": {
  33821. type: "boolean",
  33822. default: u.EDITOR_MODEL_DEFAULTS.detectIndentation,
  33823. markdownDescription: n.localize(3, null)
  33824. },
  33825. "editor.trimAutoWhitespace": {
  33826. type: "boolean",
  33827. default: u.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,
  33828. description: n.localize(4, null)
  33829. },
  33830. "editor.largeFileOptimizations": {
  33831. type: "boolean",
  33832. default: u.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,
  33833. description: n.localize(5, null)
  33834. },
  33835. "editor.wordBasedSuggestions": {type: "boolean", default: !0, description: n.localize(6, null)},
  33836. "editor.semanticHighlighting.enabled": {type: "boolean", default: !1, description: n.localize(7, null)},
  33837. "editor.stablePeek": {type: "boolean", default: !1, markdownDescription: n.localize(8, null)},
  33838. "editor.maxTokenizationLineLength": {type: "integer", default: 2e4, description: n.localize(9, null)},
  33839. "diffEditor.maxComputationTime": {type: "number", default: 5e3, description: n.localize(10, null)},
  33840. "diffEditor.renderSideBySide": {type: "boolean", default: !0, description: n.localize(11, null)},
  33841. "diffEditor.ignoreTrimWhitespace": {type: "boolean", default: !0, description: n.localize(12, null)},
  33842. "diffEditor.renderIndicators": {type: "boolean", default: !0, description: n.localize(13, null)}
  33843. }
  33844. });
  33845. for (var E = 0, L = u.editorOptionsRegistry; E < L.length; E++) {
  33846. var D = L[E], N = D.schema;
  33847. if (void 0 !== N) if (void 0 !== (b = N).type || void 0 !== b.anyOf) w.properties["editor." + D.name] = N; else for (var x in N) f.call(N, x) && (w.properties[x] = N[x])
  33848. }
  33849. var I = null;
  33850. function M() {
  33851. return null === I && (I = Object.create(null), Object.keys(w.properties).forEach((function (e) {
  33852. I[e] = !0
  33853. }))), I
  33854. }
  33855. t.isEditorConfigurationKey = function (e) {
  33856. return M()["editor." + e] || !1
  33857. }, t.isDiffEditorConfigurationKey = function (e) {
  33858. return M()["diffEditor." + e] || !1
  33859. }, S.registerConfiguration(w)
  33860. })), define(n[60], i([0, 1, 24, 4, 2, 16, 333, 185, 163, 33, 142]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  33861. "use strict";
  33862. Object.defineProperty(t, "__esModule", {value: !0});
  33863. var h = function () {
  33864. function e() {
  33865. this._keys = Object.create(null), this._values = Object.create(null)
  33866. }
  33867. return e.prototype.has = function (e) {
  33868. var t = e.getId();
  33869. return !!this._values[t]
  33870. }, e.prototype.get = function (e) {
  33871. var t = e.getId();
  33872. return this._values[t]
  33873. },
  33874. e.prototype.put = function (e, t) {
  33875. var n = e.getId();
  33876. this._keys[n] = e, this._values[n] = t
  33877. }, e.prototype.remove = function (e) {
  33878. var t = e.getId();
  33879. delete this._keys[t], delete this._values[t]
  33880. }, e.prototype.getValues = function () {
  33881. var e = this;
  33882. return Object.keys(this._keys).map((function (t) {
  33883. return e._values[t]
  33884. }))
  33885. }, e
  33886. }();
  33887. t.clearAllFontInfos = function () {
  33888. p.INSTANCE.clearCache()
  33889. };
  33890. var p = function (e) {
  33891. function t() {
  33892. var t = e.call(this) || this;
  33893. return t._onDidChange = t._register(new i.Emitter), t.onDidChange = t._onDidChange.event, t._cache = new h, t._evictUntrustedReadingsTimeout = -1, t
  33894. }
  33895. return r(t, e), t.prototype.dispose = function () {
  33896. -1 !== this._evictUntrustedReadingsTimeout && (clearTimeout(this._evictUntrustedReadingsTimeout), this._evictUntrustedReadingsTimeout = -1), e.prototype.dispose.call(this)
  33897. }, t.prototype.clearCache = function () {
  33898. this._cache = new h, this._onDidChange.fire()
  33899. }, t.prototype._writeToCache = function (e, t) {
  33900. var n = this;
  33901. this._cache.put(e, t), t.isTrusted || -1 !== this._evictUntrustedReadingsTimeout || (this._evictUntrustedReadingsTimeout = setTimeout((function () {
  33902. n._evictUntrustedReadingsTimeout = -1, n._evictUntrustedReadings()
  33903. }), 5e3))
  33904. }, t.prototype._evictUntrustedReadings = function () {
  33905. for (var e = this._cache.getValues(), t = !1, n = 0, i = e.length; n < i; n++) {
  33906. var o = e[n];
  33907. o.isTrusted || (t = !0, this._cache.remove(o))
  33908. }
  33909. t && this._onDidChange.fire()
  33910. }, t.prototype.readConfiguration = function (e) {
  33911. if (!this._cache.has(e)) {
  33912. var i = t._actualReadConfiguration(e);
  33913. (i.typicalHalfwidthCharacterWidth <= 2 || i.typicalFullwidthCharacterWidth <= 2 || i.spaceWidth <= 2 || i.maxDigitWidth <= 2) && (i = new c.FontInfo({
  33914. zoomLevel: n.getZoomLevel(),
  33915. fontFamily: i.fontFamily,
  33916. fontWeight: i.fontWeight,
  33917. fontSize: i.fontSize,
  33918. fontFeatureSettings: i.fontFeatureSettings,
  33919. lineHeight: i.lineHeight,
  33920. letterSpacing: i.letterSpacing,
  33921. isMonospace: i.isMonospace,
  33922. typicalHalfwidthCharacterWidth: Math.max(i.typicalHalfwidthCharacterWidth, 5),
  33923. typicalFullwidthCharacterWidth: Math.max(i.typicalFullwidthCharacterWidth, 5),
  33924. canUseHalfwidthRightwardsArrow: i.canUseHalfwidthRightwardsArrow,
  33925. spaceWidth: Math.max(i.spaceWidth, 5),
  33926. middotWidth: Math.max(i.middotWidth, 5),
  33927. maxDigitWidth: Math.max(i.maxDigitWidth, 5)
  33928. }, !1)), this._writeToCache(e, i)
  33929. }
  33930. return this._cache.get(e)
  33931. }, t.createRequest = function (e, t, n, i) {
  33932. var o = new a.CharWidthRequest(e, t);
  33933. return n.push(o), i && i.push(o), o
  33934. }, t._actualReadConfiguration = function (e) {
  33935. var t = [], i = [], o = this.createRequest("n", 0, t, i), r = this.createRequest("m", 0, t, null),
  33936. s = this.createRequest(" ", 0, t, i), l = this.createRequest("0", 0, t, i),
  33937. u = this.createRequest("1", 0, t, i), h = this.createRequest("2", 0, t, i),
  33938. p = this.createRequest("3", 0, t, i), g = this.createRequest("4", 0, t, i),
  33939. f = this.createRequest("5", 0, t, i), m = this.createRequest("6", 0, t, i),
  33940. v = this.createRequest("7", 0, t, i), _ = this.createRequest("8", 0, t, i),
  33941. y = this.createRequest("9", 0, t, i), C = this.createRequest("→", 0, t, i),
  33942. b = this.createRequest("→", 0, t, null), S = this.createRequest("·", 0, t, i);
  33943. this.createRequest("|", 0, t, i), this.createRequest("/", 0, t, i), this.createRequest("-", 0, t, i), this.createRequest("_", 0, t, i), this.createRequest("i", 0, t, i), this.createRequest("l", 0, t, i), this.createRequest("m", 0, t, i), this.createRequest("|", 1, t, i),
  33944. this.createRequest("_", 1, t, i), this.createRequest("i", 1, t, i), this.createRequest("l", 1, t, i), this.createRequest("m", 1, t, i), this.createRequest("n", 1, t, i), this.createRequest("|", 2, t, i), this.createRequest("_", 2, t, i), this.createRequest("i", 2, t, i), this.createRequest("l", 2, t, i), this.createRequest("m", 2, t, i), this.createRequest("n", 2, t, i), a.readCharWidths(e, t);
  33945. for (var w = Math.max(l.width, u.width, h.width, p.width, g.width, f.width, m.width, v.width, _.width, y.width), E = e.fontFeatureSettings === d.EditorFontLigatures.OFF, L = i[0].width, D = 1, N = i.length; E && D < N; D++) {
  33946. var x = L - i[D].width;
  33947. if (x < -.001 || x > .001) {
  33948. E = !1;
  33949. break
  33950. }
  33951. }
  33952. var I = !0;
  33953. E && b.width !== L && (I = !1), b.width > C.width && (I = !1);
  33954. var M = n.getTimeSinceLastZoomLevelChanged() > 2e3;
  33955. return new c.FontInfo({
  33956. zoomLevel: n.getZoomLevel(),
  33957. fontFamily: e.fontFamily,
  33958. fontWeight: e.fontWeight,
  33959. fontSize: e.fontSize,
  33960. fontFeatureSettings: e.fontFeatureSettings,
  33961. lineHeight: e.lineHeight,
  33962. letterSpacing: e.letterSpacing,
  33963. isMonospace: E,
  33964. typicalHalfwidthCharacterWidth: o.width,
  33965. typicalFullwidthCharacterWidth: r.width,
  33966. canUseHalfwidthRightwardsArrow: I,
  33967. spaceWidth: s.width,
  33968. middotWidth: S.width,
  33969. maxDigitWidth: w
  33970. }, M)
  33971. }, t.INSTANCE = new t, t
  33972. }(o.Disposable), g = function (e) {
  33973. function t(t, i, o, r) {
  33974. void 0 === o && (o = null);
  33975. var s = e.call(this, t, i) || this;
  33976. return s.accessibilityService = r, s._elementSizeObserver = s._register(new l.ElementSizeObserver(o, i.dimension, (function () {
  33977. return s._onReferenceDomElementSizeChanged()
  33978. }))), s._register(p.INSTANCE.onDidChange((function () {
  33979. return s._onCSSBasedConfigurationChanged()
  33980. }))), s._validatedOptions.get(9) && s._elementSizeObserver.startObserving(), s._register(n.onDidChangeZoomLevel((function (e) {
  33981. return s._recomputeOptions()
  33982. }))), s._register(s.accessibilityService.onDidChangeScreenReaderOptimized((function () {
  33983. return s._recomputeOptions()
  33984. }))), s._recomputeOptions(), s
  33985. }
  33986. return r(t, e), t.applyFontInfoSlow = function (e, t) {
  33987. e.style.fontFamily = t.getMassagedFontFamily(), e.style.fontWeight = t.fontWeight, e.style.fontSize = t.fontSize + "px", e.style.fontFeatureSettings = t.fontFeatureSettings, e.style.lineHeight = t.lineHeight + "px",
  33988. e.style.letterSpacing = t.letterSpacing + "px"
  33989. }, t.applyFontInfo = function (e, t) {
  33990. e.setFontFamily(t.getMassagedFontFamily()), e.setFontWeight(t.fontWeight), e.setFontSize(t.fontSize), e.setFontFeatureSettings(t.fontFeatureSettings), e.setLineHeight(t.lineHeight), e.setLetterSpacing(t.letterSpacing)
  33991. }, t.prototype._onReferenceDomElementSizeChanged = function () {
  33992. this._recomputeOptions()
  33993. }, t.prototype._onCSSBasedConfigurationChanged = function () {
  33994. this._recomputeOptions()
  33995. }, t.prototype.observeReferenceElement = function (e) {
  33996. this._elementSizeObserver.observe(e)
  33997. }, t.prototype.dispose = function () {
  33998. e.prototype.dispose.call(this)
  33999. }, t.prototype._getExtraEditorClassName = function () {
  34000. var e = "";
  34001. return n.isSafari || n.isWebkitWebView || (e += "no-user-select "), s.isMacintosh && (e += "mac "), e
  34002. }, t.prototype._getEnvConfiguration = function () {
  34003. return {
  34004. extraEditorClassName: this._getExtraEditorClassName(),
  34005. outerWidth: this._elementSizeObserver.getWidth(),
  34006. outerHeight: this._elementSizeObserver.getHeight(),
  34007. emptySelectionClipboard: n.isWebKit || n.isFirefox,
  34008. pixelRatio: n.getPixelRatio(),
  34009. zoomLevel: n.getZoomLevel(),
  34010. accessibilitySupport: this.accessibilityService.isScreenReaderOptimized() ? 2 : this.accessibilityService.getAccessibilitySupport()
  34011. }
  34012. }, t.prototype.readConfiguration = function (e) {
  34013. return p.INSTANCE.readConfiguration(e)
  34014. }, t
  34015. }(u.CommonEditorConfiguration);
  34016. t.Configuration = g
  34017. })), define(n[512], i([0, 1, 161, 106, 5, 60]), (function (e, t, n, i, o, r) {
  34018. "use strict";
  34019. Object.defineProperty(t, "__esModule", {value: !0});
  34020. var s = function () {
  34021. function e() {
  34022. }
  34023. return e.create = function () {
  34024. return new e
  34025. }, e.prototype.createLineBreaksComputer = function (e, t, s, u) {
  34026. t |= 0, s = +s;
  34027. var d = [];
  34028. return {
  34029. addRequest: function (e, t) {
  34030. d.push(e)
  34031. }, finalize: function () {
  34032. return function (e, t, s, u, d) {
  34033. if (-1 === u) {
  34034. for (var c = [], h = 0, p = e.length; h < p; h++) c[h] = null;
  34035. return c
  34036. }
  34037. var g = Math.round(u * t.typicalHalfwidthCharacterWidth);
  34038. 2 !== d && 3 !== d || (d = 1);
  34039. var f = document.createElement("div");
  34040. r.Configuration.applyFontInfoSlow(f, t);
  34041. var m = i.createStringBuilder(1e4), v = [], _ = [], y = [], C = [], b = [];
  34042. for (h = 0; h < e.length; h++) {
  34043. var S = e[h], w = 0, E = 0, L = g
  34044. ;
  34045. if (0 !== d) if (-1 === (w = o.firstNonWhitespaceIndex(S))) w = 0; else {
  34046. for (var D = 0; D < w; D++) {
  34047. var N = 9 === S.charCodeAt(D) ? s - E % s : 1;
  34048. E += N
  34049. }
  34050. var x = Math.ceil(t.spaceWidth * E);
  34051. x + t.typicalFullwidthCharacterWidth > g ? (w = 0, E = 0) : L = g - x
  34052. }
  34053. var I = S.substr(w), M = a(I, E, s, L, m);
  34054. v[h] = w, _[h] = E, y[h] = I, C[h] = M[0], b[h] = M[1]
  34055. }
  34056. f.innerHTML = m.build(), f.style.position = "absolute", f.style.top = "10000", f.style.wordWrap = "break-word", document.body.appendChild(f);
  34057. var k = document.createRange(), T = Array.prototype.slice.call(f.children, 0), R = [];
  34058. for (h = 0; h < e.length; h++) {
  34059. var O = T[h], P = l(k, O, y[h], C[h]);
  34060. if (null !== P) {
  34061. w = v[h], E = _[h];
  34062. var A = b[h], F = [], W = 0;
  34063. for (p = P.length; W < p; W++) F[W] = A[P[W]];
  34064. if (0 !== w) for (W = 0, p = P.length; W < p; W++) P[W] += w;
  34065. R[h] = new n.LineBreakData(P, F, E)
  34066. } else R[h] = null
  34067. }
  34068. return document.body.removeChild(f), R
  34069. }(d, e, t, s, u)
  34070. }
  34071. }
  34072. }, e
  34073. }();
  34074. function a(e, t, n, i, r) {
  34075. r.appendASCIIString('<div style="width:'), r.appendASCIIString(String(i)), r.appendASCIIString('px;">');
  34076. for (var s = e.length, a = t, l = 0, u = [], d = [], c = 0 < s ? e.charCodeAt(0) : 0, h = 0; h < s; h++) {
  34077. u[h] = l, d[h] = a;
  34078. var p = c;
  34079. c = h + 1 < s ? e.charCodeAt(h + 1) : 0
  34080. ;var g = 1, f = 1;
  34081. switch (p) {
  34082. case 9:
  34083. f = g = n - a % n;
  34084. for (var m = 1; m <= g; m++) m < g ? r.write1(160) : r.appendASCII(32);
  34085. break;
  34086. case 32:
  34087. 32 === c ? r.write1(160) : r.appendASCII(32);
  34088. break;
  34089. case 60:
  34090. r.appendASCIIString("&lt;");
  34091. break;
  34092. case 62:
  34093. r.appendASCIIString("&gt;");
  34094. break;
  34095. case 38:
  34096. r.appendASCIIString("&amp;");
  34097. break;
  34098. case 0:
  34099. r.appendASCIIString("&#00;");
  34100. break;
  34101. case 65279:
  34102. case 8232:
  34103. r.write1(65533);
  34104. break;
  34105. default:
  34106. o.isFullWidthCharacter(p) && f++, r.write1(p)
  34107. }
  34108. l += g, a += f
  34109. }
  34110. return u[e.length] = l, d[e.length] = a, r.appendASCIIString("</div>"), [u, d]
  34111. }
  34112. function l(e, t, n, i) {
  34113. if (n.length <= 1) return null;
  34114. var o = [];
  34115. return function e(t, n, i, o, r, s, a, l) {
  34116. if (o === s) return;
  34117. r = r || u(t, n, i[o], i[o + 1]);
  34118. a = a || u(t, n, i[s], i[s + 1]);
  34119. if (Math.abs(r[0].top - a[0].top) <= .1) return;
  34120. if (o + 1 === s) return void l.push(s);
  34121. var d = o + (s - o) / 2 | 0;
  34122. var c = u(t, n, i[d], i[d + 1]);
  34123. e(t, n, i, o, r, d, c, l);
  34124. e(t, n, i, d, c, s, a, l)
  34125. }(e, t.firstChild, i, 0, null, n.length - 1, null, o), 0 === o.length ? null : (o.push(n.length), o)
  34126. }
  34127. function u(e, t, n, i) {
  34128. return e.setStart(t, n), e.setEnd(t, i), e.getClientRects()
  34129. }
  34130. t.DOMLineBreaksComputerFactory = s
  34131. })),
  34132. define(n[513], i([0, 1, 28, 60, 143, 37]), (function (e, t, n, i, o, s) {
  34133. "use strict";
  34134. Object.defineProperty(t, "__esModule", {value: !0});
  34135. var a = function (e) {
  34136. function t(t) {
  34137. var n = e.call(this, t) || this;
  34138. return n._visibleLines = new o.VisibleLinesCollection(n), n.domNode = n._visibleLines.domNode, n._dynamicOverlays = [], n._isFocused = !1, n.domNode.setClassName("view-overlays"), n
  34139. }
  34140. return r(t, e), t.prototype.shouldRender = function () {
  34141. if (e.prototype.shouldRender.call(this)) return !0;
  34142. for (var t = 0, n = this._dynamicOverlays.length; t < n; t++) {
  34143. if (this._dynamicOverlays[t].shouldRender()) return !0
  34144. }
  34145. return !1
  34146. }, t.prototype.dispose = function () {
  34147. e.prototype.dispose.call(this);
  34148. for (var t = 0, n = this._dynamicOverlays.length; t < n; t++) {
  34149. this._dynamicOverlays[t].dispose()
  34150. }
  34151. this._dynamicOverlays = []
  34152. }, t.prototype.getDomNode = function () {
  34153. return this.domNode
  34154. }, t.prototype.createVisibleLine = function () {
  34155. return new l(this._context.configuration, this._dynamicOverlays)
  34156. }, t.prototype.addDynamicOverlay = function (e) {
  34157. this._dynamicOverlays.push(e)
  34158. }, t.prototype.onConfigurationChanged = function (e) {
  34159. this._visibleLines.onConfigurationChanged(e);
  34160. for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = t; i <= n; i++) {
  34161. this._visibleLines.getVisibleLine(i).onConfigurationChanged(e)
  34162. }
  34163. return !0
  34164. }, t.prototype.onFlushed = function (e) {
  34165. return this._visibleLines.onFlushed(e)
  34166. }, t.prototype.onFocusChanged = function (e) {
  34167. return this._isFocused = e.isFocused, !0
  34168. }, t.prototype.onLinesChanged = function (e) {
  34169. return this._visibleLines.onLinesChanged(e)
  34170. }, t.prototype.onLinesDeleted = function (e) {
  34171. return this._visibleLines.onLinesDeleted(e)
  34172. }, t.prototype.onLinesInserted = function (e) {
  34173. return this._visibleLines.onLinesInserted(e)
  34174. }, t.prototype.onScrollChanged = function (e) {
  34175. return this._visibleLines.onScrollChanged(e) || !0
  34176. }, t.prototype.onTokensChanged = function (e) {
  34177. return this._visibleLines.onTokensChanged(e)
  34178. }, t.prototype.onZonesChanged = function (e) {
  34179. return this._visibleLines.onZonesChanged(e)
  34180. }, t.prototype.prepareRender = function (e) {
  34181. for (var t = this._dynamicOverlays.filter((function (e) {
  34182. return e.shouldRender()
  34183. })), n = 0, i = t.length; n < i; n++) {
  34184. var o = t[n];
  34185. o.prepareRender(e), o.onDidRender()
  34186. }
  34187. }, t.prototype.render = function (e) {
  34188. this._viewOverlaysRender(e), this.domNode.toggleClassName("focused", this._isFocused)
  34189. }, t.prototype._viewOverlaysRender = function (e) {
  34190. this._visibleLines.renderLines(e.viewportData)
  34191. }, t
  34192. }(s.ViewPart);
  34193. t.ViewOverlays = a;
  34194. var l = function () {
  34195. function e(e, t) {
  34196. this._configuration = e, this._lineHeight = this._configuration.options.get(49), this._dynamicOverlays = t, this._domNode = null, this._renderedContent = null
  34197. }
  34198. return e.prototype.getDomNode = function () {
  34199. return this._domNode ? this._domNode.domNode : null
  34200. }, e.prototype.setDomNode = function (e) {
  34201. this._domNode = n.createFastDomNode(e)
  34202. }, e.prototype.onContentChanged = function () {
  34203. }, e.prototype.onTokensChanged = function () {
  34204. }, e.prototype.onConfigurationChanged = function (e) {
  34205. this._lineHeight = this._configuration.options.get(49)
  34206. }, e.prototype.renderLine = function (e, t, n, i) {
  34207. for (var o = "", r = 0, s = this._dynamicOverlays.length; r < s; r++) {
  34208. o += this._dynamicOverlays[r].render(n.startLineNumber, e)
  34209. }
  34210. return this._renderedContent !== o && (this._renderedContent = o, i.appendASCIIString('<div style="position:absolute;top:'), i.appendASCIIString(String(t)), i.appendASCIIString("px;width:100%;height:"), i.appendASCIIString(String(this._lineHeight)), i.appendASCIIString('px;">'), i.appendASCIIString(o), i.appendASCIIString("</div>"), !0)
  34211. }, e.prototype.layoutLine = function (e, t) {
  34212. this._domNode && (this._domNode.setTop(t), this._domNode.setHeight(this._lineHeight))
  34213. }, e
  34214. }();
  34215. t.ViewOverlayLine = l;
  34216. var u = function (e) {
  34217. function t(t) {
  34218. var n = e.call(this, t) || this, i = n._context.configuration.options.get(107);
  34219. return n._contentWidth = i.contentWidth, n.domNode.setHeight(0), n
  34220. }
  34221. return r(t, e), t.prototype.onConfigurationChanged = function (t) {
  34222. var n = this._context.configuration.options.get(107);
  34223. return this._contentWidth = n.contentWidth, e.prototype.onConfigurationChanged.call(this, t) || !0
  34224. }, t.prototype.onScrollChanged = function (t) {
  34225. return e.prototype.onScrollChanged.call(this, t) || t.scrollWidthChanged
  34226. }, t.prototype._viewOverlaysRender = function (t) {
  34227. e.prototype._viewOverlaysRender.call(this, t), this.domNode.setWidth(Math.max(t.scrollWidth, this._contentWidth))
  34228. }, t
  34229. }(a);
  34230. t.ContentViewOverlays = u;
  34231. var d = function (e) {
  34232. function t(t) {
  34233. var n = e.call(this, t) || this, o = n._context.configuration.options, r = o.get(107);
  34234. return n._contentLeft = r.contentLeft, n.domNode.setClassName("margin-view-overlays"), n.domNode.setWidth(1), i.Configuration.applyFontInfo(n.domNode, o.get(34)), n
  34235. }
  34236. return r(t, e), t.prototype.onConfigurationChanged = function (t) {
  34237. var n = this._context.configuration.options;
  34238. i.Configuration.applyFontInfo(this.domNode, n.get(34));
  34239. var o = n.get(107);
  34240. return this._contentLeft = o.contentLeft, e.prototype.onConfigurationChanged.call(this, t) || !0
  34241. }, t.prototype.onScrollChanged = function (t) {
  34242. return e.prototype.onScrollChanged.call(this, t) || t.scrollHeightChanged
  34243. }, t.prototype._viewOverlaysRender = function (t) {
  34244. e.prototype._viewOverlaysRender.call(this, t);
  34245. var n = Math.min(t.scrollHeight, 1e6);
  34246. this.domNode.setHeight(n), this.domNode.setWidth(this._contentLeft)
  34247. }, t
  34248. }(a);
  34249. t.MarginViewOverlays = d
  34250. })),
  34251. define(n[514], i([0, 1, 6, 28, 5, 60, 33, 13, 3]), (function (e, t, n, i, o, r, s, a, l) {
  34252. "use strict";
  34253. Object.defineProperty(t, "__esModule", {value: !0});
  34254. var u = function (e, t, n, i, o, r) {
  34255. this.top = e, this.left = t, this.width = n, this.height = i, this.textContent = o, this.textContentClassName = r
  34256. }, d = function () {
  34257. function e(e) {
  34258. this._context = e;
  34259. var t = this._context.configuration.options, n = t.get(34);
  34260. this._cursorStyle = t.get(18), this._lineHeight = t.get(49), this._typicalHalfwidthCharacterWidth = n.typicalHalfwidthCharacterWidth, this._lineCursorWidth = Math.min(t.get(21), this._typicalHalfwidthCharacterWidth), this._isVisible = !0, this._domNode = i.createFastDomNode(document.createElement("div")), this._domNode.setClassName("cursor"), this._domNode.setHeight(this._lineHeight), this._domNode.setTop(0), this._domNode.setLeft(0), r.Configuration.applyFontInfo(this._domNode, n), this._domNode.setDisplay("none"), this._position = new a.Position(1, 1), this._lastRenderedContent = "", this._renderData = null
  34261. }
  34262. return e.prototype.getDomNode = function () {
  34263. return this._domNode
  34264. },
  34265. e.prototype.getPosition = function () {
  34266. return this._position
  34267. }, e.prototype.show = function () {
  34268. this._isVisible || (this._domNode.setVisibility("inherit"), this._isVisible = !0)
  34269. }, e.prototype.hide = function () {
  34270. this._isVisible && (this._domNode.setVisibility("hidden"), this._isVisible = !1)
  34271. }, e.prototype.onConfigurationChanged = function (e) {
  34272. var t = this._context.configuration.options, n = t.get(34);
  34273. return this._cursorStyle = t.get(18), this._lineHeight = t.get(49), this._typicalHalfwidthCharacterWidth = n.typicalHalfwidthCharacterWidth, this._lineCursorWidth = Math.min(t.get(21), this._typicalHalfwidthCharacterWidth), r.Configuration.applyFontInfo(this._domNode, n), !0
  34274. }, e.prototype.onCursorPositionChanged = function (e) {
  34275. return this._position = e, !0
  34276. }, e.prototype._prepareRender = function (e) {
  34277. var t = "";
  34278. if (this._cursorStyle === s.TextEditorCursorStyle.Line || this._cursorStyle === s.TextEditorCursorStyle.LineThin) {
  34279. var i, r = e.visibleRangeForPosition(this._position);
  34280. if (!r || r.outsideRenderedLine) return null;
  34281. if (this._cursorStyle === s.TextEditorCursorStyle.Line) {
  34282. if ((i = n.computeScreenAwareSize(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2)) > 2) {
  34283. var a = this._context.model.getLineContent(this._position.lineNumber),
  34284. d = o.nextCharLength(a, this._position.column - 1);
  34285. t = a.substr(this._position.column - 1, d)
  34286. }
  34287. } else i = n.computeScreenAwareSize(1);
  34288. var c = r.left;
  34289. i >= 2 && c >= 1 && (c -= 1);
  34290. var h = e.getVerticalOffsetForLineNumber(this._position.lineNumber) - e.bigNumbersDelta;
  34291. return new u(h, c, i, this._lineHeight, t, "")
  34292. }
  34293. var p = this._context.model.getLineContent(this._position.lineNumber),
  34294. g = o.nextCharLength(p, this._position.column - 1),
  34295. f = e.linesVisibleRangesForRange(new l.Range(this._position.lineNumber, this._position.column, this._position.lineNumber, this._position.column + g), !1);
  34296. if (!f || 0 === f.length) return null;
  34297. var m = f[0];
  34298. if (m.outsideRenderedLine || 0 === m.ranges.length) return null;
  34299. var v = m.ranges[0], _ = v.width < 1 ? this._typicalHalfwidthCharacterWidth : v.width, y = "";
  34300. if (this._cursorStyle === s.TextEditorCursorStyle.Block) {
  34301. var C = this._context.model.getViewLineData(this._position.lineNumber)
  34302. ;t = p.substr(this._position.column - 1, g);
  34303. var b = C.tokens.findTokenIndexAtOffset(this._position.column - 1);
  34304. y = C.tokens.getClassName(b)
  34305. }
  34306. var S = e.getVerticalOffsetForLineNumber(this._position.lineNumber) - e.bigNumbersDelta,
  34307. w = this._lineHeight;
  34308. return this._cursorStyle !== s.TextEditorCursorStyle.Underline && this._cursorStyle !== s.TextEditorCursorStyle.UnderlineThin || (S += this._lineHeight - 2, w = 2), new u(S, v.left, _, w, t, y)
  34309. }, e.prototype.prepareRender = function (e) {
  34310. this._renderData = this._prepareRender(e)
  34311. }, e.prototype.render = function (e) {
  34312. return this._renderData ? (this._lastRenderedContent !== this._renderData.textContent && (this._lastRenderedContent = this._renderData.textContent, this._domNode.domNode.textContent = this._lastRenderedContent), this._domNode.setClassName("cursor " + this._renderData.textContentClassName), this._domNode.setDisplay("block"), this._domNode.setTop(this._renderData.top), this._domNode.setLeft(this._renderData.left), this._domNode.setWidth(this._renderData.width), this._domNode.setLineHeight(this._renderData.height),
  34313. this._domNode.setHeight(this._renderData.height), {
  34314. domNode: this._domNode.domNode,
  34315. position: this._position,
  34316. contentLeft: this._renderData.left,
  34317. height: this._renderData.height,
  34318. width: 2
  34319. }) : (this._domNode.setDisplay("none"), null)
  34320. }, e
  34321. }();
  34322. t.ViewCursor = d
  34323. })), define(n[515], i([0, 1, 10, 4, 2, 252, 5, 17, 118, 63, 85, 42]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
  34324. "use strict";
  34325. Object.defineProperty(t, "__esModule", {value: !0});
  34326. var p = Object.prototype.hasOwnProperty, g = function (e) {
  34327. function t(t, n) {
  34328. void 0 === t && (t = !0), void 0 === n && (n = !1);
  34329. var o = e.call(this) || this;
  34330. return o._onDidChange = o._register(new i.Emitter), o.onDidChange = o._onDidChange.event, o._warnOnOverwrite = n, o._nextLanguageId2 = 1, o._languageIdToLanguage = [], o._languageToLanguageId = Object.create(null), o._languages = {}, o._mimeTypesMap = {}, o._nameMap = {}, o._lowercaseNameMap = {}, t && (o._initializeFromRegistry(), o._register(u.ModesRegistry.onDidChangeLanguages((function (e) {
  34331. return o._initializeFromRegistry()
  34332. })))), o
  34333. }
  34334. return r(t, e), t.prototype._initializeFromRegistry = function () {
  34335. this._languages = {},
  34336. this._mimeTypesMap = {}, this._nameMap = {}, this._lowercaseNameMap = {};
  34337. var e = u.ModesRegistry.getLanguages();
  34338. this._registerLanguages(e)
  34339. }, t.prototype._registerLanguages = function (e) {
  34340. for (var t = this, n = 0, i = e; n < i.length; n++) {
  34341. var o = i[n];
  34342. this._registerLanguage(o)
  34343. }
  34344. this._mimeTypesMap = {}, this._nameMap = {}, this._lowercaseNameMap = {}, Object.keys(this._languages).forEach((function (e) {
  34345. var n = t._languages[e];
  34346. n.name && (t._nameMap[n.name] = n.identifier), n.aliases.forEach((function (e) {
  34347. t._lowercaseNameMap[e.toLowerCase()] = n.identifier
  34348. })), n.mimetypes.forEach((function (e) {
  34349. t._mimeTypesMap[e] = n.identifier
  34350. }))
  34351. })), h.Registry.as(c.Extensions.Configuration).registerOverrideIdentifiers(u.ModesRegistry.getLanguages().map((function (e) {
  34352. return e.id
  34353. }))), this._onDidChange.fire()
  34354. }, t.prototype._getLanguageId = function (e) {
  34355. if (this._languageToLanguageId[e]) return this._languageToLanguageId[e];
  34356. var t = this._nextLanguageId2++;
  34357. return this._languageIdToLanguage[t] = e, this._languageToLanguageId[e] = t, t
  34358. }, t.prototype._registerLanguage = function (e) {
  34359. var t, n = e.id
  34360. ;
  34361. if (p.call(this._languages, n)) t = this._languages[n]; else {
  34362. var i = this._getLanguageId(n);
  34363. t = {
  34364. identifier: new l.LanguageIdentifier(n, i),
  34365. name: null,
  34366. mimetypes: [],
  34367. aliases: [],
  34368. extensions: [],
  34369. filenames: [],
  34370. configurationFiles: []
  34371. }, this._languages[n] = t
  34372. }
  34373. this._mergeLanguage(t, e)
  34374. }, t.prototype._mergeLanguage = function (e, t) {
  34375. var i, o = t.id, r = null;
  34376. if (Array.isArray(t.mimetypes) && t.mimetypes.length > 0 && ((i = e.mimetypes).push.apply(i, t.mimetypes), r = t.mimetypes[0]), r || (r = "text/x-" + o, e.mimetypes.push(r)), Array.isArray(t.extensions)) for (var l = 0, u = t.extensions; l < u.length; l++) {
  34377. var d = u[l];
  34378. s.registerTextMime({id: o, mime: r, extension: d}, this._warnOnOverwrite), e.extensions.push(d)
  34379. }
  34380. if (Array.isArray(t.filenames)) for (var c = 0, h = t.filenames; c < h.length; c++) {
  34381. var p = h[c];
  34382. s.registerTextMime({id: o, mime: r, filename: p}, this._warnOnOverwrite), e.filenames.push(p)
  34383. }
  34384. if (Array.isArray(t.filenamePatterns)) for (var g = 0, f = t.filenamePatterns; g < f.length; g++) {
  34385. var m = f[g];
  34386. s.registerTextMime({id: o, mime: r, filepattern: m}, this._warnOnOverwrite)
  34387. }
  34388. if ("string" == typeof t.firstLine && t.firstLine.length > 0) {
  34389. var v = t.firstLine;
  34390. "^" !== v.charAt(0) && (v = "^" + v);
  34391. try {
  34392. var _ = new RegExp(v);
  34393. a.regExpLeadsToEndlessLoop(_) || s.registerTextMime({
  34394. id: o,
  34395. mime: r,
  34396. firstline: _
  34397. }, this._warnOnOverwrite)
  34398. } catch (e) {
  34399. n.onUnexpectedError(e)
  34400. }
  34401. }
  34402. e.aliases.push(o);
  34403. var y = null;
  34404. if (void 0 !== t.aliases && Array.isArray(t.aliases) && (y = 0 === t.aliases.length ? [null] : t.aliases), null !== y) for (var C = 0, b = y; C < b.length; C++) {
  34405. var S = b[C];
  34406. S && 0 !== S.length && e.aliases.push(S)
  34407. }
  34408. var w = null !== y && y.length > 0;
  34409. if (w && null === y[0]) ; else {
  34410. var E = (w ? y[0] : null) || o;
  34411. !w && e.name || (e.name = E)
  34412. }
  34413. t.configuration && e.configurationFiles.push(t.configuration)
  34414. }, t.prototype.isRegisteredMode = function (e) {
  34415. return !!p.call(this._mimeTypesMap, e) || p.call(this._languages, e)
  34416. }, t.prototype.getModeIdForLanguageNameLowercase = function (e) {
  34417. return p.call(this._lowercaseNameMap, e) ? this._lowercaseNameMap[e].language : null
  34418. }, t.prototype.extractModeIds = function (e) {
  34419. var t = this;
  34420. return e ? e.split(",").map((function (e) {
  34421. return e.trim()
  34422. })).map((function (e) {
  34423. return p.call(t._mimeTypesMap, e) ? t._mimeTypesMap[e].language : e
  34424. })).filter((function (e) {
  34425. return p.call(t._languages, e)
  34426. })) : []
  34427. }, t.prototype.getLanguageIdentifier = function (e) {
  34428. if (e === d.NULL_MODE_ID || 0 === e) return d.NULL_LANGUAGE_IDENTIFIER;
  34429. var t;
  34430. if ("string" == typeof e) t = e; else if (!(t = this._languageIdToLanguage[e])) return null;
  34431. return p.call(this._languages, t) ? this._languages[t].identifier : null
  34432. }, t.prototype.getModeIdsFromFilepathOrFirstLine = function (e, t) {
  34433. if (!e && !t) return [];
  34434. var n = s.guessMimeTypes(e, t);
  34435. return this.extractModeIds(n.join(","))
  34436. }, t
  34437. }(o.Disposable);
  34438. t.LanguagesRegistry = g
  34439. })), define(n[516], i([0, 1, 4, 2, 349, 63, 515, 19]), (function (e, t, n, i, o, s, a, l) {
  34440. "use strict";
  34441. Object.defineProperty(t, "__esModule", {value: !0});
  34442. var u = function (e) {
  34443. function t(t, i) {
  34444. var o = e.call(this) || this;
  34445. return o._onDidChange = o._register(new n.Emitter), o.onDidChange = o._onDidChange.event, o._selector = i, o.languageIdentifier = o._selector(), o._register(t((function () {
  34446. return o._evaluate()
  34447. }))), o
  34448. }
  34449. return r(t, e), t.prototype._evaluate = function () {
  34450. var e = this._selector()
  34451. ;e.id !== this.languageIdentifier.id && (this.languageIdentifier = e, this._onDidChange.fire(this.languageIdentifier))
  34452. }, t
  34453. }(i.Disposable), d = function () {
  34454. function e(e) {
  34455. var t = this;
  34456. void 0 === e && (e = !1), this._onDidCreateMode = new n.Emitter, this.onDidCreateMode = this._onDidCreateMode.event, this._onLanguagesMaybeChanged = new n.Emitter, this.onLanguagesMaybeChanged = this._onLanguagesMaybeChanged.event, this._instantiatedModes = {}, this._registry = new a.LanguagesRegistry(!0, e), this._registry.onDidChange((function () {
  34457. return t._onLanguagesMaybeChanged.fire()
  34458. }))
  34459. }
  34460. return e.prototype.isRegisteredMode = function (e) {
  34461. return this._registry.isRegisteredMode(e)
  34462. }, e.prototype.getModeIdForLanguageName = function (e) {
  34463. return this._registry.getModeIdForLanguageNameLowercase(e)
  34464. }, e.prototype.getModeIdByFilepathOrFirstLine = function (e, t) {
  34465. var n = this._registry.getModeIdsFromFilepathOrFirstLine(e, t);
  34466. return l.firstOrDefault(n, null)
  34467. }, e.prototype.getModeId = function (e) {
  34468. var t = this._registry.extractModeIds(e);
  34469. return l.firstOrDefault(t, null)
  34470. },
  34471. e.prototype.getLanguageIdentifier = function (e) {
  34472. return this._registry.getLanguageIdentifier(e)
  34473. }, e.prototype.create = function (e) {
  34474. var t = this;
  34475. return new u(this.onLanguagesMaybeChanged, (function () {
  34476. var n = t.getModeId(e);
  34477. return t._createModeAndGetLanguageIdentifier(n)
  34478. }))
  34479. }, e.prototype.createByFilepathOrFirstLine = function (e, t) {
  34480. var n = this;
  34481. return new u(this.onLanguagesMaybeChanged, (function () {
  34482. var i = n.getModeIdByFilepathOrFirstLine(e, t);
  34483. return n._createModeAndGetLanguageIdentifier(i)
  34484. }))
  34485. }, e.prototype._createModeAndGetLanguageIdentifier = function (e) {
  34486. var t = this.getLanguageIdentifier(e || "plaintext") || s.NULL_LANGUAGE_IDENTIFIER;
  34487. return this._getOrCreateMode(t.language), t
  34488. }, e.prototype.triggerMode = function (e) {
  34489. var t = this.getModeId(e);
  34490. this._getOrCreateMode(t || "plaintext")
  34491. }, e.prototype._getOrCreateMode = function (e) {
  34492. if (!this._instantiatedModes.hasOwnProperty(e)) {
  34493. var t = this.getLanguageIdentifier(e) || s.NULL_LANGUAGE_IDENTIFIER;
  34494. this._instantiatedModes[e] = new o.FrankensteinMode(t), this._onDidCreateMode.fire(this._instantiatedModes[e])
  34495. }
  34496. return this._instantiatedModes[e]
  34497. }, e
  34498. }();
  34499. t.ModeServiceImpl = d
  34500. })), define(n[43], i([0, 1, 42, 11, 85]), (function (e, t, n, i, o) {
  34501. "use strict";
  34502. function r(e, t, n, i) {
  34503. for (var o = t.split("."), r = o.pop(), s = e, a = 0; a < o.length; a++) {
  34504. var l = o[a], u = s[l];
  34505. switch (typeof u) {
  34506. case"undefined":
  34507. u = s[l] = Object.create(null);
  34508. break;
  34509. case"object":
  34510. break;
  34511. default:
  34512. return void i("Ignoring " + t + " as " + o.slice(0, a + 1).join(".") + " is " + JSON.stringify(u))
  34513. }
  34514. s = u
  34515. }
  34516. "object" == typeof s ? s[r] = n : i("Ignoring " + t + " as " + o.join(".") + " is " + JSON.stringify(s))
  34517. }
  34518. Object.defineProperty(t, "__esModule", {value: !0}), t.IConfigurationService = i.createDecorator("configurationService"), t.toValuesTree = function (e, t) {
  34519. var n = Object.create(null);
  34520. for (var i in e) r(n, i, e[i], t);
  34521. return n
  34522. }, t.addToValueTree = r, t.removeFromValueTree = function (e, t) {
  34523. !function e(t, n) {
  34524. var i = n.shift();
  34525. if (0 === n.length) return void delete t[i];
  34526. if (-1 !== Object.keys(t).indexOf(i)) {
  34527. var o = t[i];
  34528. "object" != typeof o || Array.isArray(o) || (e(o, n), 0 === Object.keys(o).length && delete t[i])
  34529. }
  34530. }(e, t.split("."))
  34531. }, t.getConfigurationValue = function (e, t, n) {
  34532. var i = function (e, t) {
  34533. for (var n = e, i = 0, o = t; i < o.length; i++) {
  34534. var r = o[i];
  34535. if ("object" != typeof n || null === n) return;
  34536. n = n[r]
  34537. }
  34538. return n
  34539. }(e, t.split("."));
  34540. return void 0 === i ? n : i
  34541. }, t.getConfigurationKeys = function () {
  34542. var e = n.Registry.as(o.Extensions.Configuration).getConfigurationProperties();
  34543. return Object.keys(e)
  34544. }, t.getDefaultValues = function () {
  34545. var e = Object.create(null), t = n.Registry.as(o.Extensions.Configuration).getConfigurationProperties();
  34546. for (var i in t) {
  34547. r(e, i, t[i].default, (function (e) {
  34548. return console.error("Conflict in default settings: " + e)
  34549. }))
  34550. }
  34551. return e
  34552. }, t.overrideIdentifierFromKey = function (e) {
  34553. return e.substring(1, e.length - 1)
  34554. }, t.getMigratedSettingValue = function (e, t, n) {
  34555. var i = e.inspect(t), o = e.inspect(n);
  34556. return void 0 !== i.userValue || void 0 !== i.workspaceValue || void 0 !== i.workspaceFolderValue ? i.value : void 0 !== o.userValue || void 0 !== o.workspaceValue || void 0 !== o.workspaceFolderValue ? o.value : i.defaultValue
  34557. }
  34558. })), define(n[517], i([0, 1, 2, 64, 4, 18, 43]), (function (e, t, n, i, o, s, a) {
  34559. "use strict";
  34560. Object.defineProperty(t, "__esModule", {value: !0})
  34561. ;var l = function (e) {
  34562. function t(t, n) {
  34563. var r = e.call(this) || this;
  34564. r._contextKeyService = t, r._configurationService = n, r._accessibilitySupport = 0, r._onDidChangeScreenReaderOptimized = new o.Emitter, r._accessibilityModeEnabledContext = i.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(r._contextKeyService);
  34565. var s = function () {
  34566. return r._accessibilityModeEnabledContext.set(r.isScreenReaderOptimized())
  34567. };
  34568. return r._register(r._configurationService.onDidChangeConfiguration((function (e) {
  34569. e.affectsConfiguration("editor.accessibilitySupport") && (s(), r._onDidChangeScreenReaderOptimized.fire())
  34570. }))), s(), r.onDidChangeScreenReaderOptimized((function () {
  34571. return s()
  34572. })), r
  34573. }
  34574. return r(t, e), Object.defineProperty(t.prototype, "onDidChangeScreenReaderOptimized", {
  34575. get: function () {
  34576. return this._onDidChangeScreenReaderOptimized.event
  34577. }, enumerable: !0, configurable: !0
  34578. }), t.prototype.isScreenReaderOptimized = function () {
  34579. var e = this._configurationService.getValue("editor.accessibilitySupport");
  34580. return "on" === e || "auto" === e && 2 === this._accessibilitySupport
  34581. },
  34582. t.prototype.getAccessibilitySupport = function () {
  34583. return this._accessibilitySupport
  34584. }, t = h([g(0, s.IContextKeyService), g(1, a.IConfigurationService)], t)
  34585. }(n.Disposable);
  34586. t.AccessibilityService = l
  34587. }));
  34588. a = this && this.__spreadArrays || function () {
  34589. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  34590. var i = Array(e), o = 0;
  34591. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  34592. return i
  34593. };
  34594. define(n[518], i([0, 1, 38, 19, 21, 31, 85, 43]), (function (e, t, n, i, o, s, l, u) {
  34595. "use strict";
  34596. Object.defineProperty(t, "__esModule", {value: !0});
  34597. var d = function () {
  34598. function e(e, t, n) {
  34599. void 0 === e && (e = {}), void 0 === t && (t = []), void 0 === n && (n = []), this._contents = e, this._keys = t, this._overrides = n, this.isFrozen = !1
  34600. }
  34601. return Object.defineProperty(e.prototype, "contents", {
  34602. get: function () {
  34603. return this.checkAndFreeze(this._contents)
  34604. }, enumerable: !0, configurable: !0
  34605. }), Object.defineProperty(e.prototype, "overrides", {
  34606. get: function () {
  34607. return this.checkAndFreeze(this._overrides)
  34608. }, enumerable: !0, configurable: !0
  34609. }), Object.defineProperty(e.prototype, "keys", {
  34610. get: function () {
  34611. return this.checkAndFreeze(this._keys)
  34612. }, enumerable: !0, configurable: !0
  34613. }), e.prototype.isEmpty = function () {
  34614. return 0 === this._keys.length && 0 === Object.keys(this._contents).length && 0 === this._overrides.length
  34615. }, e.prototype.getValue = function (e) {
  34616. return e ? u.getConfigurationValue(this.contents, e) : this.contents
  34617. }, e.prototype.getOverrideValue = function (e, t) {
  34618. var n = this.getContentsForOverrideIdentifer(t);
  34619. return n ? e ? u.getConfigurationValue(n, e) : n : void 0
  34620. }, e.prototype.override = function (t) {
  34621. var n = this.getContentsForOverrideIdentifer(t);
  34622. if (!n || "object" != typeof n || !Object.keys(n).length) return this;
  34623. for (var o = {}, r = 0, l = i.distinct(a(Object.keys(this.contents), Object.keys(n))); r < l.length; r++) {
  34624. var u = l[r], d = this.contents[u], c = n[u];
  34625. c && ("object" == typeof d && "object" == typeof c ? (d = s.deepClone(d), this.mergeContents(d, c)) : d = c), o[u] = d
  34626. }
  34627. return new e(o, this.keys, this.overrides)
  34628. }, e.prototype.merge = function () {
  34629. for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]
  34630. ;
  34631. for (var o = s.deepClone(this.contents), r = s.deepClone(this.overrides), l = a(this.keys), u = 0, d = t; u < d.length; u++) {
  34632. var c = d[u];
  34633. this.mergeContents(o, c.contents);
  34634. for (var h = function (e) {
  34635. var t = r.filter((function (t) {
  34636. return i.equals(t.identifiers, e.identifiers)
  34637. }))[0];
  34638. t ? p.mergeContents(t.contents, e.contents) : r.push(s.deepClone(e))
  34639. }, p = this, g = 0, f = c.overrides; g < f.length; g++) {
  34640. var m = f[g];
  34641. h(m)
  34642. }
  34643. for (var v = 0, _ = c.keys; v < _.length; v++) {
  34644. var y = _[v];
  34645. -1 === l.indexOf(y) && l.push(y)
  34646. }
  34647. }
  34648. return new e(o, l, r)
  34649. }, e.prototype.freeze = function () {
  34650. return this.isFrozen = !0, this
  34651. }, e.prototype.mergeContents = function (e, t) {
  34652. for (var n = 0, i = Object.keys(t); n < i.length; n++) {
  34653. var r = i[n];
  34654. r in e && o.isObject(e[r]) && o.isObject(t[r]) ? this.mergeContents(e[r], t[r]) : e[r] = s.deepClone(t[r])
  34655. }
  34656. }, e.prototype.checkAndFreeze = function (e) {
  34657. return this.isFrozen && !Object.isFrozen(e) ? s.deepFreeze(e) : e
  34658. }, e.prototype.getContentsForOverrideIdentifer = function (e) {
  34659. for (var t = 0, n = this.overrides; t < n.length; t++) {
  34660. var i = n[t];
  34661. if (-1 !== i.identifiers.indexOf(e)) return i.contents
  34662. }
  34663. return null
  34664. },
  34665. e.prototype.toJSON = function () {
  34666. return {contents: this.contents, overrides: this.overrides, keys: this.keys}
  34667. }, e.prototype.setValue = function (e, t) {
  34668. this.addKey(e), u.addToValueTree(this.contents, e, t, (function (e) {
  34669. throw new Error(e)
  34670. }))
  34671. }, e.prototype.removeValue = function (e) {
  34672. this.removeKey(e) && u.removeFromValueTree(this.contents, e)
  34673. }, e.prototype.addKey = function (e) {
  34674. for (var t = this.keys.length, n = 0; n < t; n++) 0 === e.indexOf(this.keys[n]) && (t = n);
  34675. this.keys.splice(t, 1, e)
  34676. }, e.prototype.removeKey = function (e) {
  34677. var t = this.keys.indexOf(e);
  34678. return -1 !== t && (this.keys.splice(t, 1), !0)
  34679. }, e
  34680. }();
  34681. t.ConfigurationModel = d;
  34682. var c = function (e) {
  34683. function t() {
  34684. for (var t = u.getDefaultValues(), n = u.getConfigurationKeys(), i = [], o = 0, r = Object.keys(t); o < r.length; o++) {
  34685. var s = r[o];
  34686. l.OVERRIDE_PROPERTY_PATTERN.test(s) && i.push({
  34687. identifiers: [u.overrideIdentifierFromKey(s).trim()],
  34688. keys: Object.keys(t[s]),
  34689. contents: u.toValuesTree(t[s], (function (e) {
  34690. return console.error("Conflict in default settings file: " + e)
  34691. }))
  34692. })
  34693. }
  34694. return e.call(this, t, n, i) || this
  34695. }
  34696. return r(t, e), t
  34697. }(d)
  34698. ;t.DefaultConfigurationModel = c;
  34699. var h = function () {
  34700. function e(e, t, i, o, r, s, a, l) {
  34701. void 0 === i && (i = new d), void 0 === o && (o = new d), void 0 === r && (r = new n.ResourceMap), void 0 === s && (s = new d), void 0 === a && (a = new n.ResourceMap), void 0 === l && (l = !0), this._defaultConfiguration = e, this._localUserConfiguration = t, this._remoteUserConfiguration = i, this._workspaceConfiguration = o, this._folderConfigurations = r, this._memoryConfiguration = s, this._memoryConfigurationByResource = a, this._freeze = l, this._workspaceConsolidatedConfiguration = null, this._foldersConsolidatedConfigurations = new n.ResourceMap, this._userConfiguration = null
  34702. }
  34703. return e.prototype.getValue = function (e, t, n) {
  34704. return this.getConsolidateConfigurationModel(t, n).getValue(e)
  34705. }, e.prototype.updateValue = function (e, t, n) {
  34706. var i;
  34707. void 0 === n && (n = {}), n.resource ? (i = this._memoryConfigurationByResource.get(n.resource)) || (i = new d, this._memoryConfigurationByResource.set(n.resource, i)) : i = this._memoryConfiguration, void 0 === t ? i.removeValue(e) : i.setValue(e, t),
  34708. n.resource || (this._workspaceConsolidatedConfiguration = null)
  34709. }, e.prototype.inspect = function (e, t, n) {
  34710. var o = this.getConsolidateConfigurationModel(t, n),
  34711. r = this.getFolderConfigurationModelForResource(t.resource, n),
  34712. s = t.resource && this._memoryConfigurationByResource.get(t.resource) || this._memoryConfiguration,
  34713. a = t.overrideIdentifier ? this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this._defaultConfiguration.freeze().getValue(e),
  34714. l = t.overrideIdentifier ? this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this.userConfiguration.freeze().getValue(e),
  34715. u = t.overrideIdentifier ? this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this.localUserConfiguration.freeze().getValue(e),
  34716. d = t.overrideIdentifier ? this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this.remoteUserConfiguration.freeze().getValue(e),
  34717. c = n ? t.overrideIdentifier ? this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e) : this._workspaceConfiguration.freeze().getValue(e) : void 0,
  34718. h = r ? t.overrideIdentifier ? r.freeze().override(t.overrideIdentifier).getValue(e) : r.freeze().getValue(e) : void 0,
  34719. p = t.overrideIdentifier ? s.override(t.overrideIdentifier).getValue(e) : s.getValue(e),
  34720. g = o.getValue(e), f = i.distinct(i.flatten(o.overrides.map((function (e) {
  34721. return e.identifiers
  34722. })))).filter((function (t) {
  34723. return void 0 !== o.getOverrideValue(e, t)
  34724. }));
  34725. return {
  34726. defaultValue: a,
  34727. userValue: l,
  34728. userLocalValue: u,
  34729. userRemoteValue: d,
  34730. workspaceValue: c,
  34731. workspaceFolderValue: h,
  34732. memoryValue: p,
  34733. value: g,
  34734. default: void 0 !== a ? {
  34735. value: this._defaultConfiguration.freeze().getValue(e),
  34736. override: t.overrideIdentifier ? this._defaultConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
  34737. } : void 0,
  34738. user: void 0 !== l ? {
  34739. value: this.userConfiguration.freeze().getValue(e),
  34740. override: t.overrideIdentifier ? this.userConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
  34741. } : void 0,
  34742. userLocal: void 0 !== u ? {
  34743. value: this.localUserConfiguration.freeze().getValue(e),
  34744. override: t.overrideIdentifier ? this.localUserConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
  34745. } : void 0,
  34746. userRemote: void 0 !== d ? {
  34747. value: this.remoteUserConfiguration.freeze().getValue(e),
  34748. override: t.overrideIdentifier ? this.remoteUserConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
  34749. } : void 0,
  34750. workspace: void 0 !== c ? {
  34751. value: this._workspaceConfiguration.freeze().getValue(e),
  34752. override: t.overrideIdentifier ? this._workspaceConfiguration.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
  34753. } : void 0,
  34754. workspaceFolder: void 0 !== h ? {
  34755. value: null == r ? void 0 : r.freeze().getValue(e),
  34756. override: t.overrideIdentifier ? null == r ? void 0 : r.freeze().getOverrideValue(e, t.overrideIdentifier) : void 0
  34757. } : void 0,
  34758. memory: void 0 !== p ? {
  34759. value: s.getValue(e),
  34760. override: t.overrideIdentifier ? s.getOverrideValue(e, t.overrideIdentifier) : void 0
  34761. } : void 0,
  34762. overrideIdentifiers: f.length ? f : void 0
  34763. }
  34764. }, Object.defineProperty(e.prototype, "userConfiguration", {
  34765. get: function () {
  34766. return this._userConfiguration || (this._userConfiguration = this._remoteUserConfiguration.isEmpty() ? this._localUserConfiguration : this._localUserConfiguration.merge(this._remoteUserConfiguration), this._freeze && this._userConfiguration.freeze()), this._userConfiguration
  34767. }, enumerable: !0, configurable: !0
  34768. }), Object.defineProperty(e.prototype, "localUserConfiguration", {
  34769. get: function () {
  34770. return this._localUserConfiguration
  34771. }, enumerable: !0, configurable: !0
  34772. }), Object.defineProperty(e.prototype, "remoteUserConfiguration", {
  34773. get: function () {
  34774. return this._remoteUserConfiguration
  34775. }, enumerable: !0, configurable: !0
  34776. }), e.prototype.getConsolidateConfigurationModel = function (e, t) {
  34777. var n = this.getConsolidatedConfigurationModelForResource(e, t);
  34778. return e.overrideIdentifier ? n.override(e.overrideIdentifier) : n
  34779. }, e.prototype.getConsolidatedConfigurationModelForResource = function (e, t) {
  34780. var n = e.resource, i = this.getWorkspaceConsolidatedConfiguration();
  34781. if (t && n) {
  34782. var o = t.getFolder(n);
  34783. o && (i = this.getFolderConsolidatedConfiguration(o.uri) || i);
  34784. var r = this._memoryConfigurationByResource.get(n);
  34785. r && (i = i.merge(r))
  34786. }
  34787. return i
  34788. }, e.prototype.getWorkspaceConsolidatedConfiguration = function () {
  34789. return this._workspaceConsolidatedConfiguration || (this._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration),
  34790. this._freeze && (this._workspaceConfiguration = this._workspaceConfiguration.freeze())), this._workspaceConsolidatedConfiguration
  34791. }, e.prototype.getFolderConsolidatedConfiguration = function (e) {
  34792. var t = this._foldersConsolidatedConfigurations.get(e);
  34793. if (!t) {
  34794. var n = this.getWorkspaceConsolidatedConfiguration(), i = this._folderConfigurations.get(e);
  34795. i ? (t = n.merge(i), this._freeze && (t = t.freeze()), this._foldersConsolidatedConfigurations.set(e, t)) : t = n
  34796. }
  34797. return t
  34798. }, e.prototype.getFolderConfigurationModelForResource = function (e, t) {
  34799. if (t && e) {
  34800. var n = t.getFolder(e);
  34801. if (n) return this._folderConfigurations.get(n.uri)
  34802. }
  34803. }, e
  34804. }();
  34805. t.Configuration = h
  34806. })), define(n[519], i([0, 1, 4, 2, 38, 29, 43, 18, 217]), (function (e, t, n, i, o, s, a, l, u) {
  34807. "use strict";
  34808. Object.defineProperty(t, "__esModule", {value: !0});
  34809. var d = "data-keybinding-context", c = function () {
  34810. function e(e, t) {
  34811. this._id = e, this._parent = t, this._value = Object.create(null), this._value._contextId = e
  34812. }
  34813. return e.prototype.setValue = function (e, t) {
  34814. return this._value[e] !== t && (this._value[e] = t, !0)
  34815. }, e.prototype.removeValue = function (e) {
  34816. return e in this._value && (delete this._value[e], !0)
  34817. }, e.prototype.getValue = function (e) {
  34818. var t = this._value[e];
  34819. return void 0 === t && this._parent ? this._parent.getValue(e) : t
  34820. }, e
  34821. }();
  34822. t.Context = c;
  34823. var p = function (e) {
  34824. function t() {
  34825. return e.call(this, -1, null) || this
  34826. }
  34827. return r(t, e), t.prototype.setValue = function (e, t) {
  34828. return !1
  34829. }, t.prototype.removeValue = function (e) {
  34830. return !1
  34831. }, t.prototype.getValue = function (e) {
  34832. }, t.INSTANCE = new t, t
  34833. }(c), f = function (e) {
  34834. function t(t, n, i) {
  34835. var r = e.call(this, t, null) || this;
  34836. return r._configurationService = n, r._values = new Map, r._listener = r._configurationService.onDidChangeConfiguration((function (e) {
  34837. if (6 === e.source) {
  34838. var t = o.keys(r._values);
  34839. r._values.clear(), i.fire(new _(t))
  34840. } else {
  34841. for (var n = [], s = 0, a = e.affectedKeys; s < a.length; s++) {
  34842. var l = "config." + a[s];
  34843. r._values.has(l) && (r._values.delete(l), n.push(l))
  34844. }
  34845. i.fire(new _(n))
  34846. }
  34847. })), r
  34848. }
  34849. return r(t, e), t.prototype.dispose = function () {
  34850. this._listener.dispose()
  34851. }, t.prototype.getValue = function (n) {
  34852. if (0 !== n.indexOf(t._keyPrefix)) return e.prototype.getValue.call(this, n)
  34853. ;
  34854. if (this._values.has(n)) return this._values.get(n);
  34855. var i = n.substr(t._keyPrefix.length), o = this._configurationService.getValue(i), r = void 0;
  34856. switch (typeof o) {
  34857. case"number":
  34858. case"boolean":
  34859. case"string":
  34860. r = o
  34861. }
  34862. return this._values.set(n, r), r
  34863. }, t.prototype.setValue = function (t, n) {
  34864. return e.prototype.setValue.call(this, t, n)
  34865. }, t.prototype.removeValue = function (t) {
  34866. return e.prototype.removeValue.call(this, t)
  34867. }, t._keyPrefix = "config.", t
  34868. }(c), m = function () {
  34869. function e(e, t, n) {
  34870. this._service = e, this._key = t, this._defaultValue = n, this.reset()
  34871. }
  34872. return e.prototype.set = function (e) {
  34873. this._service.setContext(this._key, e)
  34874. }, e.prototype.reset = function () {
  34875. void 0 === this._defaultValue ? this._service.removeContext(this._key) : this._service.setContext(this._key, this._defaultValue)
  34876. }, e.prototype.get = function () {
  34877. return this._service.getContextKeyValue(this._key)
  34878. }, e
  34879. }(), v = function () {
  34880. function e(e) {
  34881. this.key = e
  34882. }
  34883. return e.prototype.affectsSome = function (e) {
  34884. return e.has(this.key)
  34885. }, e
  34886. }(), _ = function () {
  34887. function e(e) {
  34888. this.keys = e
  34889. }
  34890. return e.prototype.affectsSome = function (e) {
  34891. for (var t = 0, n = this.keys; t < n.length; t++) {
  34892. var i = n[t];
  34893. if (e.has(i)) return !0
  34894. }
  34895. return !1
  34896. }, e
  34897. }(), y = function () {
  34898. function e(e) {
  34899. this.events = e
  34900. }
  34901. return e.prototype.affectsSome = function (e) {
  34902. for (var t = 0, n = this.events; t < n.length; t++) {
  34903. if (n[t].affectsSome(e)) return !0
  34904. }
  34905. return !1
  34906. }, e
  34907. }(), C = function () {
  34908. function e(e) {
  34909. this._onDidChangeContext = new n.PauseableEmitter({
  34910. merge: function (e) {
  34911. return new y(e)
  34912. }
  34913. }), this._isDisposed = !1, this._myContextId = e
  34914. }
  34915. return e.prototype.createKey = function (e, t) {
  34916. if (this._isDisposed) throw new Error("AbstractContextKeyService has been disposed");
  34917. return new m(this, e, t)
  34918. }, Object.defineProperty(e.prototype, "onDidChangeContext", {
  34919. get: function () {
  34920. return this._onDidChangeContext.event
  34921. }, enumerable: !0, configurable: !0
  34922. }), e.prototype.bufferChangeEvents = function (e) {
  34923. this._onDidChangeContext.pause();
  34924. try {
  34925. e()
  34926. } finally {
  34927. this._onDidChangeContext.resume()
  34928. }
  34929. }, e.prototype.createScoped = function (e) {
  34930. if (this._isDisposed) throw new Error("AbstractContextKeyService has been disposed");
  34931. return new S(this, e)
  34932. }, e.prototype.contextMatchesRules = function (e) {
  34933. if (this._isDisposed) throw new Error("AbstractContextKeyService has been disposed");
  34934. var t = this.getContextValuesContainer(this._myContextId);
  34935. return u.KeybindingResolver.contextMatchesRules(t, e)
  34936. }, e.prototype.getContextKeyValue = function (e) {
  34937. if (!this._isDisposed) return this.getContextValuesContainer(this._myContextId).getValue(e)
  34938. }, e.prototype.setContext = function (e, t) {
  34939. if (!this._isDisposed) {
  34940. var n = this.getContextValuesContainer(this._myContextId);
  34941. n && n.setValue(e, t) && this._onDidChangeContext.fire(new v(e))
  34942. }
  34943. }, e.prototype.removeContext = function (e) {
  34944. this._isDisposed || this.getContextValuesContainer(this._myContextId).removeValue(e) && this._onDidChangeContext.fire(new v(e))
  34945. }, e.prototype.getContext = function (e) {
  34946. return this._isDisposed ? p.INSTANCE : this.getContextValuesContainer(function (e) {
  34947. for (; e;) {
  34948. if (e.hasAttribute(d)) {
  34949. var t = e.getAttribute(d);
  34950. return t ? parseInt(t, 10) : NaN
  34951. }
  34952. e = e.parentElement
  34953. }
  34954. return 0
  34955. }(e))
  34956. }, e
  34957. }();
  34958. t.AbstractContextKeyService = C;
  34959. var b = function (e) {
  34960. function t(t) {
  34961. var n = e.call(this, 0) || this;
  34962. n._contexts = new Map,
  34963. n._toDispose = new i.DisposableStore, n._lastContextId = 0;
  34964. var o = new f(n._myContextId, t, n._onDidChangeContext);
  34965. return n._contexts.set(n._myContextId, o), n._toDispose.add(o), n
  34966. }
  34967. return r(t, e), t.prototype.dispose = function () {
  34968. this._isDisposed = !0, this._toDispose.dispose()
  34969. }, t.prototype.getContextValuesContainer = function (e) {
  34970. return this._isDisposed ? p.INSTANCE : this._contexts.get(e) || p.INSTANCE
  34971. }, t.prototype.createChildContext = function (e) {
  34972. if (void 0 === e && (e = this._myContextId), this._isDisposed) throw new Error("ContextKeyService has been disposed");
  34973. var t = ++this._lastContextId;
  34974. return this._contexts.set(t, new c(t, this.getContextValuesContainer(e))), t
  34975. }, t.prototype.disposeContext = function (e) {
  34976. this._isDisposed || this._contexts.delete(e)
  34977. }, t = h([g(0, a.IConfigurationService)], t)
  34978. }(C);
  34979. t.ContextKeyService = b;
  34980. var S = function (e) {
  34981. function t(t, n) {
  34982. var i = e.call(this, t.createChildContext()) || this;
  34983. return i._parent = t, n && (i._domNode = n, i._domNode.setAttribute(d, String(i._myContextId))), i
  34984. }
  34985. return r(t, e), t.prototype.dispose = function () {
  34986. this._isDisposed = !0,
  34987. this._parent.disposeContext(this._myContextId), this._domNode && (this._domNode.removeAttribute(d), this._domNode = void 0)
  34988. }, Object.defineProperty(t.prototype, "onDidChangeContext", {
  34989. get: function () {
  34990. return n.Event.any(this._parent.onDidChangeContext, this._onDidChangeContext.event)
  34991. }, enumerable: !0, configurable: !0
  34992. }), t.prototype.getContextValuesContainer = function (e) {
  34993. return this._isDisposed ? p.INSTANCE : this._parent.getContextValuesContainer(e)
  34994. }, t.prototype.createChildContext = function (e) {
  34995. if (void 0 === e && (e = this._myContextId), this._isDisposed) throw new Error("ScopedContextKeyService has been disposed");
  34996. return this._parent.createChildContext(e)
  34997. }, t.prototype.disposeContext = function (e) {
  34998. this._isDisposed || this._parent.disposeContext(e)
  34999. }, t
  35000. }(C);
  35001. s.CommandsRegistry.registerCommand(l.SET_CONTEXT_COMMAND_ID, (function (e, t, n) {
  35002. e.get(l.IContextKeyService).createKey(String(t), n)
  35003. }))
  35004. })), define(n[86], i([0, 1, 36, 16, 29, 42]), (function (e, t, n, i, o, r) {
  35005. "use strict";
  35006. Object.defineProperty(t, "__esModule", {value: !0});
  35007. var s = function () {
  35008. function e() {
  35009. this._coreKeybindings = [], this._extensionKeybindings = [], this._cachedMergedKeybindings = null
  35010. }
  35011. return e.bindToCurrentPlatform = function (e) {
  35012. if (1 === i.OS) {
  35013. if (e && e.win) return e.win
  35014. } else if (2 === i.OS) {
  35015. if (e && e.mac) return e.mac
  35016. } else if (e && e.linux) return e.linux;
  35017. return e
  35018. }, e.prototype.registerKeybindingRule = function (t) {
  35019. var o = e.bindToCurrentPlatform(t);
  35020. o && o.primary && ((a = n.createKeybinding(o.primary, i.OS)) && this._registerDefaultKeybinding(a, t.id, t.args, t.weight, 0, t.when));
  35021. if (o && Array.isArray(o.secondary)) for (var r = 0, s = o.secondary.length; r < s; r++) {
  35022. var a, l = o.secondary[r];
  35023. (a = n.createKeybinding(l, i.OS)) && this._registerDefaultKeybinding(a, t.id, t.args, t.weight, -r - 1, t.when)
  35024. }
  35025. }, e.prototype.registerCommandAndKeybindingRule = function (e) {
  35026. this.registerKeybindingRule(e), o.CommandsRegistry.registerCommand(e)
  35027. }, e._mightProduceChar = function (e) {
  35028. return e >= 21 && e <= 30 || (e >= 31 && e <= 56 || (80 === e || 81 === e || 82 === e || 83 === e || 84 === e || 85 === e || 86 === e || 110 === e || 111 === e || 87 === e || 88 === e || 89 === e || 90 === e || 91 === e || 92 === e))
  35029. }, e.prototype._assertNoCtrlAlt = function (t, n) {
  35030. t.ctrlKey && t.altKey && !t.metaKey && e._mightProduceChar(t.keyCode) && console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ", t, " for ", n)
  35031. }, e.prototype._registerDefaultKeybinding = function (e, t, n, o, r, s) {
  35032. 1 === i.OS && this._assertNoCtrlAlt(e.parts[0], t), this._coreKeybindings.push({
  35033. keybinding: e,
  35034. command: t,
  35035. commandArgs: n,
  35036. when: s,
  35037. weight1: o,
  35038. weight2: r
  35039. }), this._cachedMergedKeybindings = null
  35040. }, e.prototype.getDefaultKeybindings = function () {
  35041. return this._cachedMergedKeybindings || (this._cachedMergedKeybindings = [].concat(this._coreKeybindings).concat(this._extensionKeybindings), this._cachedMergedKeybindings.sort(a)), this._cachedMergedKeybindings.slice(0)
  35042. }, e
  35043. }();
  35044. function a(e, t) {
  35045. return e.weight1 !== t.weight1 ? e.weight1 - t.weight1 : e.command < t.command ? -1 : e.command > t.command ? 1 : e.weight2 - t.weight2
  35046. }
  35047. t.KeybindingsRegistry = new s, t.Extensions = {EditorModes: "platform.keybindingsRegistry"}, r.Registry.add(t.Extensions.EditorModes, t.KeybindingsRegistry)
  35048. })), define(n[520], i([0, 1, 18, 400, 86, 401]), (function (e, t, n, i, o, s) {
  35049. "use strict";
  35050. function a(e, t) {
  35051. return e.getContext(document.activeElement).getValue(t)
  35052. }
  35053. function l(e, i) {
  35054. var o = function (e, t) {
  35055. return e.createScoped(t.target)
  35056. }(e, i);
  35057. return function (e, t, i) {
  35058. new n.RawContextKey(i, t).bindTo(e)
  35059. }(o, i, t.HistoryNavigationWidgetContext), {
  35060. scopedContextKeyService: o,
  35061. historyNavigationEnablement: new n.RawContextKey(t.HistoryNavigationEnablementContext, !0).bindTo(o)
  35062. }
  35063. }
  35064. Object.defineProperty(t, "__esModule", {value: !0}), t.HistoryNavigationWidgetContext = "historyNavigationWidget", t.HistoryNavigationEnablementContext = "historyNavigationEnabled", t.createAndBindHistoryNavigationWidgetScopedContextKeyService = l;
  35065. var u = function (e) {
  35066. function t(t, n, i, o, r) {
  35067. void 0 === r && (r = !1);
  35068. var s = e.call(this, t, n, r, i) || this;
  35069. return s._register(l(o, {
  35070. target: s.inputBox.element,
  35071. historyNavigator: s.inputBox
  35072. }).scopedContextKeyService), s
  35073. }
  35074. return r(t, e), t = h([g(3, n.IContextKeyService)], t)
  35075. }(i.FindInput);
  35076. t.ContextScopedFindInput = u;
  35077. var d = function (e) {
  35078. function t(t, n, i, o, r) {
  35079. void 0 === r && (r = !1);
  35080. var s = e.call(this, t, n, r, i) || this;
  35081. return s._register(l(o, {
  35082. target: s.inputBox.element, historyNavigator: s.inputBox
  35083. }).scopedContextKeyService), s
  35084. }
  35085. return r(t, e), t = h([g(3, n.IContextKeyService)], t)
  35086. }(s.ReplaceInput);
  35087. t.ContextScopedReplaceInput = d, o.KeybindingsRegistry.registerCommandAndKeybindingRule({
  35088. id: "history.showPrevious",
  35089. weight: 200,
  35090. when: n.ContextKeyExpr.and(n.ContextKeyExpr.has(t.HistoryNavigationWidgetContext), n.ContextKeyExpr.equals(t.HistoryNavigationEnablementContext, !0)),
  35091. primary: 16,
  35092. secondary: [528],
  35093. handler: function (e, i) {
  35094. var o = a(e.get(n.IContextKeyService), t.HistoryNavigationWidgetContext);
  35095. o && o.historyNavigator.showPreviousValue()
  35096. }
  35097. }), o.KeybindingsRegistry.registerCommandAndKeybindingRule({
  35098. id: "history.showNext",
  35099. weight: 200,
  35100. when: n.ContextKeyExpr.and(n.ContextKeyExpr.has(t.HistoryNavigationWidgetContext), n.ContextKeyExpr.equals(t.HistoryNavigationEnablementContext, !0)),
  35101. primary: 18,
  35102. secondary: [530],
  35103. handler: function (e, i) {
  35104. var o = a(e.get(n.IContextKeyService), t.HistoryNavigationWidgetContext);
  35105. o && o.historyNavigator.showNextValue()
  35106. }
  35107. })
  35108. })),
  35109. define(n[74], i([0, 1, 11, 4, 2, 21]), (function (e, t, n, i, o, s) {
  35110. "use strict";
  35111. Object.defineProperty(t, "__esModule", {value: !0}), t.IStorageService = n.createDecorator("storageService"), function (e) {
  35112. e[e.NONE = 0] = "NONE", e[e.SHUTDOWN = 1] = "SHUTDOWN"
  35113. }(t.WillSaveStateReason || (t.WillSaveStateReason = {}));
  35114. var a = function (e) {
  35115. function t() {
  35116. var t = null !== e && e.apply(this, arguments) || this;
  35117. return t._onDidChangeStorage = t._register(new i.Emitter), t.onDidChangeStorage = t._onDidChangeStorage.event, t._onWillSaveState = t._register(new i.Emitter), t.onWillSaveState = t._onWillSaveState.event, t.globalCache = new Map, t.workspaceCache = new Map, t
  35118. }
  35119. return r(t, e), t.prototype.getCache = function (e) {
  35120. return 0 === e ? this.globalCache : this.workspaceCache
  35121. }, t.prototype.get = function (e, t, n) {
  35122. var i = this.getCache(t).get(e);
  35123. return s.isUndefinedOrNull(i) ? n : i
  35124. }, t.prototype.getBoolean = function (e, t, n) {
  35125. var i = this.getCache(t).get(e);
  35126. return s.isUndefinedOrNull(i) ? n : "true" === i
  35127. }, t.prototype.store = function (e, t, n) {
  35128. if (s.isUndefinedOrNull(t)) return this.remove(e, n);
  35129. var i = String(t)
  35130. ;
  35131. return this.getCache(n).get(e) === i ? Promise.resolve() : (this.getCache(n).set(e, i), this._onDidChangeStorage.fire({
  35132. scope: n,
  35133. key: e
  35134. }), Promise.resolve())
  35135. }, t.prototype.remove = function (e, t) {
  35136. return this.getCache(t).delete(e) ? (this._onDidChangeStorage.fire({
  35137. scope: t,
  35138. key: e
  35139. }), Promise.resolve()) : Promise.resolve()
  35140. }, t
  35141. }(o.Disposable);
  35142. t.InMemoryStorageService = a
  35143. })), define(n[521], i([0, 1, 38, 74, 17, 2, 15, 11, 43, 83]), (function (e, t, n, i, o, s, a, l, u, d) {
  35144. "use strict";
  35145. Object.defineProperty(t, "__esModule", {value: !0});
  35146. var c = function () {
  35147. function e() {
  35148. }
  35149. return e.prototype.select = function (e, t, n) {
  35150. if (0 === n.length) return 0;
  35151. for (var i = n[0].score[0], o = 1; o < n.length; o++) {
  35152. var r = n[o], s = r.score, a = r.completion;
  35153. if (s[0] !== i) break;
  35154. if (a.preselect) return o
  35155. }
  35156. return 0
  35157. }, e
  35158. }();
  35159. t.Memory = c;
  35160. var p = function (e) {
  35161. function t() {
  35162. return null !== e && e.apply(this, arguments) || this
  35163. }
  35164. return r(t, e), t.prototype.memorize = function (e, t, n) {
  35165. }, t.prototype.toJSON = function () {
  35166. }, t.prototype.fromJSON = function () {
  35167. }, t
  35168. }(c);
  35169. t.NoMemory = p;
  35170. var f = function (e) {
  35171. function t() {
  35172. var t = null !== e && e.apply(this, arguments) || this;
  35173. return t._cache = new n.LRUCache(300, .66), t._seq = 0, t
  35174. }
  35175. return r(t, e), t.prototype.memorize = function (e, t, n) {
  35176. var i = n.completion.label, o = e.getLanguageIdentifier().language + "/" + i;
  35177. this._cache.set(o, {touch: this._seq++, type: n.completion.kind, insertText: n.completion.insertText})
  35178. }, t.prototype.select = function (t, n, i) {
  35179. if (0 === i.length) return 0;
  35180. var o = t.getLineContent(n.lineNumber).substr(n.column - 10, n.column - 1);
  35181. if (/\s$/.test(o)) return e.prototype.select.call(this, t, n, i);
  35182. for (var r = i[0].score[0], s = -1, a = -1, l = -1, u = 0; u < i.length && i[u].score[0] === r; u++) {
  35183. var d = t.getLanguageIdentifier().language + "/" + i[u].completion.label, c = this._cache.peek(d);
  35184. if (c && c.touch > l && c.type === i[u].completion.kind && c.insertText === i[u].completion.insertText && (l = c.touch, a = u), i[u].completion.preselect && -1 === s) return u
  35185. }
  35186. return -1 !== a ? a : -1 !== s ? s : 0
  35187. }, t.prototype.toJSON = function () {
  35188. var e = [];
  35189. return this._cache.forEach((function (t, n) {
  35190. e.push([n, t])
  35191. })), e
  35192. }, t.prototype.fromJSON = function (e) {
  35193. this._cache.clear()
  35194. ;
  35195. for (var t = 0, n = e; t < n.length; t++) {
  35196. var i = n[t], r = i[0], s = i[1];
  35197. s.touch = 0, s.type = "number" == typeof s.type ? s.type : o.completionKindFromString(s.type), this._cache.set(r, s)
  35198. }
  35199. this._seq = this._cache.size
  35200. }, t
  35201. }(c);
  35202. t.LRUMemory = f;
  35203. var m = function (e) {
  35204. function t() {
  35205. var t = null !== e && e.apply(this, arguments) || this;
  35206. return t._trie = n.TernarySearchTree.forStrings(), t._seq = 0, t
  35207. }
  35208. return r(t, e), t.prototype.memorize = function (e, t, n) {
  35209. var i = e.getWordUntilPosition(t).word, o = e.getLanguageIdentifier().language + "/" + i;
  35210. this._trie.set(o, {type: n.completion.kind, insertText: n.completion.insertText, touch: this._seq++})
  35211. }, t.prototype.select = function (t, n, i) {
  35212. var o = t.getWordUntilPosition(n).word;
  35213. if (!o) return e.prototype.select.call(this, t, n, i);
  35214. var r = t.getLanguageIdentifier().language + "/" + o, s = this._trie.get(r);
  35215. if (s || (s = this._trie.findSubstr(r)), s) for (var a = 0; a < i.length; a++) {
  35216. var l = i[a].completion, u = l.kind, d = l.insertText;
  35217. if (u === s.type && d === s.insertText) return a
  35218. }
  35219. return e.prototype.select.call(this, t, n, i)
  35220. }, t.prototype.toJSON = function () {
  35221. var e = []
  35222. ;
  35223. return this._trie.forEach((function (t, n) {
  35224. return e.push([n, t])
  35225. })), e.sort((function (e, t) {
  35226. return -(e[1].touch - t[1].touch)
  35227. })).forEach((function (e, t) {
  35228. return e[1].touch = t
  35229. })), e.slice(0, 200)
  35230. }, t.prototype.fromJSON = function (e) {
  35231. if (this._trie.clear(), e.length > 0) {
  35232. this._seq = e[0][1].touch + 1;
  35233. for (var t = 0, n = e; t < n.length; t++) {
  35234. var i = n[t], r = i[0], s = i[1];
  35235. s.type = "number" == typeof s.type ? s.type : o.completionKindFromString(s.type), this._trie.set(r, s)
  35236. }
  35237. }
  35238. }, t
  35239. }(c);
  35240. t.PrefixMemory = m;
  35241. var v = function (e) {
  35242. function t(t, n) {
  35243. var o = e.call(this) || this;
  35244. o._storageService = t, o._configService = n, o._storagePrefix = "suggest/memories";
  35245. var r = function () {
  35246. var e = o._configService.getValue("editor.suggestSelection"),
  35247. t = o._configService.getValue("editor.suggest.shareSuggestSelections");
  35248. o._update(e, t, !1)
  35249. };
  35250. return o._persistSoon = o._register(new a.RunOnceScheduler((function () {
  35251. return o._saveState()
  35252. }), 500)), o._register(t.onWillSaveState((function (e) {
  35253. e.reason === i.WillSaveStateReason.SHUTDOWN && o._saveState()
  35254. }))), o._register(o._configService.onDidChangeConfiguration((function (e) {
  35255. (e.affectsConfiguration("editor.suggestSelection") || e.affectsConfiguration("editor.suggest.shareSuggestSelections")) && r()
  35256. }))), o._register(o._storageService.onDidChangeStorage((function (e) {
  35257. 0 === e.scope && 0 === e.key.indexOf(o._storagePrefix) && (document.hasFocus() || o._update(o._mode, o._shareMem, !0))
  35258. }))), r(), o
  35259. }
  35260. return r(t, e), t.prototype._update = function (e, t, n) {
  35261. if (n || this._mode !== e || this._shareMem !== t) {
  35262. this._shareMem = t, this._mode = e, this._strategy = "recentlyUsedByPrefix" === e ? new m : "recentlyUsed" === e ? new f : new p;
  35263. try {
  35264. var i = t ? 0 : 1, o = this._storageService.get(this._storagePrefix + "/" + this._mode, i);
  35265. o && this._strategy.fromJSON(JSON.parse(o))
  35266. } catch (e) {
  35267. }
  35268. }
  35269. }, t.prototype.memorize = function (e, t, n) {
  35270. this._strategy.memorize(e, t, n), this._persistSoon.schedule()
  35271. }, t.prototype.select = function (e, t, n) {
  35272. return this._strategy.select(e, t, n)
  35273. }, t.prototype._saveState = function () {
  35274. var e = JSON.stringify(this._strategy), t = this._shareMem ? 0 : 1;
  35275. this._storageService.store(this._storagePrefix + "/" + this._mode, e, t)
  35276. },
  35277. t = h([g(0, i.IStorageService), g(1, u.IConfigurationService)], t)
  35278. }(s.Disposable);
  35279. t.SuggestMemoryService = v, t.ISuggestMemoryService = l.createDecorator("ISuggestMemories"), d.registerSingleton(t.ISuggestMemoryService, v, !0)
  35280. })), define(n[96], i([0, 1, 11]), (function (e, t, n) {
  35281. "use strict";
  35282. Object.defineProperty(t, "__esModule", {value: !0}), t.ITelemetryService = n.createDecorator("telemetryService")
  35283. })), define(n[12], i([0, 1, 10, 25, 32, 13, 49, 84, 65, 29, 18, 86, 42, 96, 21]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f) {
  35284. "use strict";
  35285. Object.defineProperty(t, "__esModule", {value: !0});
  35286. var m = function () {
  35287. function e(e) {
  35288. this.id = e.id, this.precondition = e.precondition, this._kbOpts = e.kbOpts, this._menuOpts = e.menuOpts, this._description = e.description
  35289. }
  35290. return e.prototype.register = function () {
  35291. var e = this;
  35292. if (Array.isArray(this._menuOpts) ? this._menuOpts.forEach(this._registerMenuItem, this) : this._menuOpts && this._registerMenuItem(this._menuOpts), this._kbOpts) {
  35293. var t = this._kbOpts.kbExpr;
  35294. this.precondition && (t = t ? c.ContextKeyExpr.and(t, this.precondition) : this.precondition),
  35295. h.KeybindingsRegistry.registerCommandAndKeybindingRule({
  35296. id: this.id,
  35297. handler: function (t, n) {
  35298. return e.runCommand(t, n)
  35299. },
  35300. weight: this._kbOpts.weight,
  35301. when: t,
  35302. primary: this._kbOpts.primary,
  35303. secondary: this._kbOpts.secondary,
  35304. win: this._kbOpts.win,
  35305. linux: this._kbOpts.linux,
  35306. mac: this._kbOpts.mac,
  35307. description: this._description
  35308. })
  35309. } else d.CommandsRegistry.registerCommand({
  35310. id: this.id, handler: function (t, n) {
  35311. return e.runCommand(t, n)
  35312. }, description: this._description
  35313. })
  35314. }, e.prototype._registerMenuItem = function (e) {
  35315. u.MenuRegistry.appendMenuItem(e.menuId, {
  35316. group: e.group,
  35317. command: {id: this.id, title: e.title},
  35318. when: e.when,
  35319. order: e.order
  35320. })
  35321. }, e
  35322. }();
  35323. t.Command = m;
  35324. var v = function (e) {
  35325. function t() {
  35326. return null !== e && e.apply(this, arguments) || this
  35327. }
  35328. return r(t, e), t.bindToContribution = function (e) {
  35329. return function (t) {
  35330. function n(e) {
  35331. var n = t.call(this, e) || this;
  35332. return n._callback = e.handler, n
  35333. }
  35334. return r(n, t), n.prototype.runEditorCommand = function (t, n, i) {
  35335. e(n) && this._callback(e(n), i)
  35336. }, n
  35337. }(t)
  35338. }, t.prototype.runCommand = function (e, t) {
  35339. var n = this, i = e.get(o.ICodeEditorService), r = i.getFocusedCodeEditor() || i.getActiveCodeEditor();
  35340. if (r) return r.invokeWithinContext((function (e) {
  35341. if (e.get(c.IContextKeyService).contextMatchesRules(f.withNullAsUndefined(n.precondition))) return n.runEditorCommand(e, r, t)
  35342. }))
  35343. }, t
  35344. }(m);
  35345. t.EditorCommand = v;
  35346. var _ = function (e) {
  35347. function t(n) {
  35348. var i = e.call(this, t.convertOptions(n)) || this;
  35349. return i.label = n.label, i.alias = n.alias, i
  35350. }
  35351. return r(t, e), t.convertOptions = function (e) {
  35352. var t;
  35353. function n(t) {
  35354. return t.menuId || (t.menuId = 7), t.title || (t.title = e.label), t.when = c.ContextKeyExpr.and(e.precondition, t.when), t
  35355. }
  35356. return t = Array.isArray(e.menuOpts) ? e.menuOpts : e.menuOpts ? [e.menuOpts] : [], Array.isArray(e.contextMenuOpts) ? t.push.apply(t, e.contextMenuOpts.map(n)) : e.contextMenuOpts && t.push(n(e.contextMenuOpts)), e.menuOpts = t, e
  35357. }, t.prototype.runEditorCommand = function (e, t, n) {
  35358. return this.reportTelemetry(e, t), this.run(e, t, n || {})
  35359. }, t.prototype.reportTelemetry = function (e, t) {
  35360. e.get(g.ITelemetryService).publicLog2("editorActionInvoked", {name: this.label, id: this.id})
  35361. }, t
  35362. }(v);
  35363. function y(e, t) {
  35364. d.CommandsRegistry.registerCommand(e, (function (e, n) {
  35365. return t(e, n || {})
  35366. }))
  35367. }
  35368. t.EditorAction = _, t.registerLanguageCommand = y, t.registerDefaultLanguageCommand = function (e, t) {
  35369. y(e, (function (e, o) {
  35370. var r = o.resource, u = o.position;
  35371. if (!(r instanceof i.URI)) throw n.illegalArgument("resource");
  35372. if (!s.Position.isIPosition(u)) throw n.illegalArgument("position");
  35373. var d = e.get(a.IModelService).getModel(r);
  35374. if (d) {
  35375. var c = s.Position.lift(u);
  35376. return t(d, c, o)
  35377. }
  35378. return e.get(l.ITextModelService).createModelReference(r).then((function (e) {
  35379. return new Promise((function (n, i) {
  35380. try {
  35381. n(t(e.object.textEditorModel, s.Position.lift(u), o))
  35382. } catch (e) {
  35383. i(e)
  35384. }
  35385. })).finally((function () {
  35386. e.dispose()
  35387. }))
  35388. }))
  35389. }))
  35390. }, t.registerModelAndPositionCommand = function (e, t) {
  35391. d.CommandsRegistry.registerCommand(e, (function (e) {
  35392. for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];
  35393. var r = n[0], u = n[1];
  35394. f.assertType(i.URI.isUri(r)), f.assertType(s.Position.isIPosition(u));
  35395. var d = e.get(a.IModelService).getModel(r);
  35396. if (d) {
  35397. var c = s.Position.lift(u);
  35398. return t(d, c, n.slice(2))
  35399. }
  35400. return e.get(l.ITextModelService).createModelReference(r).then((function (e) {
  35401. return new Promise((function (i, o) {
  35402. try {
  35403. i(t(e.object.textEditorModel, s.Position.lift(u), n.slice(2)))
  35404. } catch (e) {
  35405. o(e)
  35406. }
  35407. })).finally((function () {
  35408. e.dispose()
  35409. }))
  35410. }))
  35411. }))
  35412. }, t.registerModelCommand = function (e, t) {
  35413. d.CommandsRegistry.registerCommand(e, (function (e) {
  35414. for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o];
  35415. var r = n[0];
  35416. f.assertType(i.URI.isUri(r));
  35417. var s = e.get(a.IModelService).getModel(r);
  35418. return s ? t(s, n.slice(1)) : e.get(l.ITextModelService).createModelReference(r).then((function (e) {
  35419. return new Promise((function (i, o) {
  35420. try {
  35421. i(t(e.object.textEditorModel, n.slice(1)))
  35422. } catch (e) {
  35423. o(e)
  35424. }
  35425. })).finally((function () {
  35426. e.dispose()
  35427. }))
  35428. }))
  35429. }))
  35430. }, t.registerEditorCommand = function (e) {
  35431. return C.INSTANCE.registerEditorCommand(e), e
  35432. }, t.registerEditorAction = function (e) {
  35433. C.INSTANCE.registerEditorAction(new e)
  35434. }, t.registerInstantiatedEditorAction = function (e) {
  35435. C.INSTANCE.registerEditorAction(e)
  35436. }, t.registerEditorContribution = function (e, t) {
  35437. C.INSTANCE.registerEditorContribution(e, t)
  35438. },
  35439. function (e) {
  35440. e.getEditorCommand = function (e) {
  35441. return C.INSTANCE.getEditorCommand(e)
  35442. }, e.getEditorActions = function () {
  35443. return C.INSTANCE.getEditorActions()
  35444. }, e.getEditorContributions = function () {
  35445. return C.INSTANCE.getEditorContributions()
  35446. }, e.getSomeEditorContributions = function (e) {
  35447. return C.INSTANCE.getEditorContributions().filter((function (t) {
  35448. return e.indexOf(t.id) >= 0
  35449. }))
  35450. }, e.getDiffEditorContributions = function () {
  35451. return C.INSTANCE.getDiffEditorContributions()
  35452. }
  35453. }(t.EditorExtensionsRegistry || (t.EditorExtensionsRegistry = {}));
  35454. var C = function () {
  35455. function e() {
  35456. this.editorContributions = [], this.diffEditorContributions = [], this.editorActions = [], this.editorCommands = Object.create(null)
  35457. }
  35458. return e.prototype.registerEditorContribution = function (e, t) {
  35459. this.editorContributions.push({id: e, ctor: t})
  35460. }, e.prototype.getEditorContributions = function () {
  35461. return this.editorContributions.slice(0)
  35462. }, e.prototype.getDiffEditorContributions = function () {
  35463. return this.diffEditorContributions.slice(0)
  35464. }, e.prototype.registerEditorAction = function (e) {
  35465. e.register(),
  35466. this.editorActions.push(e)
  35467. }, e.prototype.getEditorActions = function () {
  35468. return this.editorActions.slice(0)
  35469. }, e.prototype.registerEditorCommand = function (e) {
  35470. e.register(), this.editorCommands[e.id] = e
  35471. }, e.prototype.getEditorCommand = function (e) {
  35472. return this.editorCommands[e] || null
  35473. }, e.INSTANCE = new e, e
  35474. }();
  35475. p.Registry.add("editor.contributions", C.INSTANCE)
  35476. })), define(n[164], i([0, 1, 415, 21, 12, 32, 483, 40, 212, 213, 159, 13, 3, 68, 23, 18]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m) {
  35477. "use strict";
  35478. Object.defineProperty(t, "__esModule", {value: !0});
  35479. var v, _, y, C = 0, b = function (e) {
  35480. function t() {
  35481. return null !== e && e.apply(this, arguments) || this
  35482. }
  35483. return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
  35484. var i = t._getCursors();
  35485. i && this.runCoreEditorCommand(i, n || {})
  35486. }, t
  35487. }(o.EditorCommand);
  35488. function S(e) {
  35489. e.register()
  35490. }
  35491. t.CoreEditorCommand = b, function (e) {
  35492. e.description = {
  35493. description: "Scroll editor in the given direction", args: [{
  35494. name: "Editor scroll argument object",
  35495. description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",
  35496. constraint: function (e) {
  35497. if (!i.isObject(e)) return !1;
  35498. var t = e;
  35499. return !!i.isString(t.to) && (!(!i.isUndefined(t.by) && !i.isString(t.by)) && (!(!i.isUndefined(t.value) && !i.isNumber(t.value)) && !(!i.isUndefined(t.revealCursor) && !i.isBoolean(t.revealCursor))))
  35500. },
  35501. schema: {
  35502. type: "object",
  35503. required: ["to"],
  35504. properties: {
  35505. to: {type: "string", enum: ["up", "down"]},
  35506. by: {type: "string", enum: ["line", "wrappedLine", "page", "halfPage"]},
  35507. value: {type: "number", default: 1},
  35508. revealCursor: {type: "boolean"}
  35509. }
  35510. }
  35511. }]
  35512. }, e.RawDirection = {Up: "up", Down: "down"}, e.RawUnit = {
  35513. Line: "line", WrappedLine: "wrappedLine", Page: "page", HalfPage: "halfPage"
  35514. }, e.parse = function (t) {
  35515. var n, i;
  35516. switch (t.to) {
  35517. case e.RawDirection.Up:
  35518. n = 1;
  35519. break;
  35520. case e.RawDirection.Down:
  35521. n = 2;
  35522. break;
  35523. default:
  35524. return null
  35525. }
  35526. switch (t.by) {
  35527. case e.RawUnit.Line:
  35528. i = 1;
  35529. break;
  35530. case e.RawUnit.WrappedLine:
  35531. i = 2;
  35532. break;
  35533. case e.RawUnit.Page:
  35534. i = 3;
  35535. break;
  35536. case e.RawUnit.HalfPage:
  35537. i = 4;
  35538. break;
  35539. default:
  35540. i = 2
  35541. }
  35542. return {
  35543. direction: n,
  35544. unit: i,
  35545. value: Math.floor(t.value || 1),
  35546. revealCursor: !!t.revealCursor,
  35547. select: !!t.select
  35548. }
  35549. }
  35550. }(v = t.EditorScroll_ || (t.EditorScroll_ = {})), function (e) {
  35551. e.description = {
  35552. description: "Reveal the given line at the given logical position", args: [{
  35553. name: "Reveal line argument object",
  35554. description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",
  35555. constraint: function (e) {
  35556. if (!i.isObject(e)) return !1;
  35557. var t = e
  35558. ;
  35559. return !!i.isNumber(t.lineNumber) && !(!i.isUndefined(t.at) && !i.isString(t.at))
  35560. },
  35561. schema: {
  35562. type: "object",
  35563. required: ["lineNumber"],
  35564. properties: {
  35565. lineNumber: {type: "number"},
  35566. at: {type: "string", enum: ["top", "center", "bottom"]}
  35567. }
  35568. }
  35569. }]
  35570. }, e.RawAtArgument = {Top: "top", Center: "center", Bottom: "bottom"}
  35571. }(_ = t.RevealLine_ || (t.RevealLine_ = {})), function (e) {
  35572. var t = function (e) {
  35573. function t(t) {
  35574. var n = e.call(this, t) || this;
  35575. return n._inSelectionMode = t.inSelectionMode, n
  35576. }
  35577. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35578. e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.moveTo(e.context, e.getPrimaryCursor(), this._inSelectionMode, t.position, t.viewPosition)]), e.reveal(t.source, !0, 0, 0)
  35579. }, t
  35580. }(b);
  35581. e.MoveTo = o.registerEditorCommand(new t({
  35582. id: "_moveTo",
  35583. inSelectionMode: !1,
  35584. precondition: void 0
  35585. })), e.MoveToSelect = o.registerEditorCommand(new t({
  35586. id: "_moveToSelect",
  35587. inSelectionMode: !0,
  35588. precondition: void 0
  35589. }));
  35590. var n = function (e) {
  35591. function t() {
  35592. return null !== e && e.apply(this, arguments) || this
  35593. }
  35594. return r(t, e),
  35595. t.prototype.runCoreEditorCommand = function (e, t) {
  35596. e.context.model.pushStackElement();
  35597. var n = this._getColumnSelectResult(e.context, e.getPrimaryCursor(), e.getColumnSelectData(), t);
  35598. e.setStates(t.source, 3, n.viewStates.map((function (e) {
  35599. return l.CursorState.fromViewState(e)
  35600. }))), e.setColumnSelectData({
  35601. isReal: !0,
  35602. fromViewLineNumber: n.fromLineNumber,
  35603. fromViewVisualColumn: n.fromVisualColumn,
  35604. toViewLineNumber: n.toLineNumber,
  35605. toViewVisualColumn: n.toVisualColumn
  35606. }), e.reveal(t.source, !0, n.reversed ? 1 : 2, 0)
  35607. }, t
  35608. }(b);
  35609. e.ColumnSelect = o.registerEditorCommand(new (function (e) {
  35610. function t() {
  35611. return e.call(this, {id: "columnSelect", precondition: void 0}) || this
  35612. }
  35613. return r(t, e), t.prototype._getColumnSelectResult = function (e, t, n, i) {
  35614. var o = e.model.validatePosition(i.position),
  35615. r = e.validateViewPosition(new h.Position(i.viewPosition.lineNumber, i.viewPosition.column), o),
  35616. s = i.doColumnSelect ? n.fromViewLineNumber : r.lineNumber,
  35617. l = i.doColumnSelect ? n.fromViewVisualColumn : i.mouseColumn - 1
  35618. ;
  35619. return a.ColumnSelection.columnSelect(e.config, e.viewModel, s, l, r.lineNumber, i.mouseColumn - 1)
  35620. }, t
  35621. }(n))), e.CursorColumnSelectLeft = o.registerEditorCommand(new (function (e) {
  35622. function t() {
  35623. return e.call(this, {
  35624. id: "cursorColumnSelectLeft",
  35625. precondition: void 0,
  35626. kbOpts: {
  35627. weight: C,
  35628. kbExpr: f.EditorContextKeys.textInputFocus,
  35629. primary: 3599,
  35630. linux: {primary: 0}
  35631. }
  35632. }) || this
  35633. }
  35634. return r(t, e), t.prototype._getColumnSelectResult = function (e, t, n, i) {
  35635. return a.ColumnSelection.columnSelectLeft(e.config, e.viewModel, n)
  35636. }, t
  35637. }(n))), e.CursorColumnSelectRight = o.registerEditorCommand(new (function (e) {
  35638. function t() {
  35639. return e.call(this, {
  35640. id: "cursorColumnSelectRight",
  35641. precondition: void 0,
  35642. kbOpts: {
  35643. weight: C,
  35644. kbExpr: f.EditorContextKeys.textInputFocus,
  35645. primary: 3601,
  35646. linux: {primary: 0}
  35647. }
  35648. }) || this
  35649. }
  35650. return r(t, e), t.prototype._getColumnSelectResult = function (e, t, n, i) {
  35651. return a.ColumnSelection.columnSelectRight(e.config, e.viewModel, n)
  35652. }, t
  35653. }(n)));
  35654. var i = function (e) {
  35655. function t(t) {
  35656. var n = e.call(this, t) || this;
  35657. return n._isPaged = t.isPaged, n
  35658. }
  35659. return r(t, e),
  35660. t.prototype._getColumnSelectResult = function (e, t, n, i) {
  35661. return a.ColumnSelection.columnSelectUp(e.config, e.viewModel, n, this._isPaged)
  35662. }, t
  35663. }(n);
  35664. e.CursorColumnSelectUp = o.registerEditorCommand(new i({
  35665. isPaged: !1,
  35666. id: "cursorColumnSelectUp",
  35667. precondition: void 0,
  35668. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3600, linux: {primary: 0}}
  35669. })), e.CursorColumnSelectPageUp = o.registerEditorCommand(new i({
  35670. isPaged: !0,
  35671. id: "cursorColumnSelectPageUp",
  35672. precondition: void 0,
  35673. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3595, linux: {primary: 0}}
  35674. }));
  35675. var s = function (e) {
  35676. function t(t) {
  35677. var n = e.call(this, t) || this;
  35678. return n._isPaged = t.isPaged, n
  35679. }
  35680. return r(t, e), t.prototype._getColumnSelectResult = function (e, t, n, i) {
  35681. return a.ColumnSelection.columnSelectDown(e.config, e.viewModel, n, this._isPaged)
  35682. }, t
  35683. }(n);
  35684. e.CursorColumnSelectDown = o.registerEditorCommand(new s({
  35685. isPaged: !1,
  35686. id: "cursorColumnSelectDown",
  35687. precondition: void 0,
  35688. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3602, linux: {primary: 0}}
  35689. })),
  35690. e.CursorColumnSelectPageDown = o.registerEditorCommand(new s({
  35691. isPaged: !0,
  35692. id: "cursorColumnSelectPageDown",
  35693. precondition: void 0,
  35694. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3596, linux: {primary: 0}}
  35695. }));
  35696. var u = function (e) {
  35697. function t() {
  35698. return e.call(this, {
  35699. id: "cursorMove",
  35700. precondition: void 0,
  35701. description: d.CursorMove.description
  35702. }) || this
  35703. }
  35704. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35705. var n = d.CursorMove.parse(t);
  35706. n && this._runCursorMove(e, t.source, n)
  35707. }, t.prototype._runCursorMove = function (e, t, n) {
  35708. e.context.model.pushStackElement(), e.setStates(t, 3, d.CursorMoveCommands.move(e.context, e.getAll(), n)), e.reveal(t, !0, 0, 0)
  35709. }, t
  35710. }(b);
  35711. e.CursorMoveImpl = u, e.CursorMove = o.registerEditorCommand(new u);
  35712. var c = function (t) {
  35713. function n(e) {
  35714. var n = t.call(this, e) || this;
  35715. return n._staticArgs = e.args, n
  35716. }
  35717. return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
  35718. var i = this._staticArgs;
  35719. -1 === this._staticArgs.value && (i = {
  35720. direction: this._staticArgs.direction,
  35721. unit: this._staticArgs.unit,
  35722. select: this._staticArgs.select,
  35723. value: t.context.config.pageSize
  35724. }), e.CursorMove._runCursorMove(t, n.source, i)
  35725. }, n
  35726. }(b);
  35727. e.CursorLeft = o.registerEditorCommand(new c({
  35728. args: {direction: 0, unit: 0, select: !1, value: 1},
  35729. id: "cursorLeft",
  35730. precondition: void 0,
  35731. kbOpts: {
  35732. weight: C,
  35733. kbExpr: f.EditorContextKeys.textInputFocus,
  35734. primary: 15,
  35735. mac: {primary: 15, secondary: [288]}
  35736. }
  35737. })), e.CursorLeftSelect = o.registerEditorCommand(new c({
  35738. args: {
  35739. direction: 0,
  35740. unit: 0,
  35741. select: !0,
  35742. value: 1
  35743. },
  35744. id: "cursorLeftSelect",
  35745. precondition: void 0,
  35746. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1039}
  35747. })), e.CursorRight = o.registerEditorCommand(new c({
  35748. args: {direction: 1, unit: 0, select: !1, value: 1},
  35749. id: "cursorRight",
  35750. precondition: void 0,
  35751. kbOpts: {
  35752. weight: C,
  35753. kbExpr: f.EditorContextKeys.textInputFocus,
  35754. primary: 17,
  35755. mac: {primary: 17, secondary: [292]}
  35756. }
  35757. })), e.CursorRightSelect = o.registerEditorCommand(new c({
  35758. args: {
  35759. direction: 1,
  35760. unit: 0,
  35761. select: !0,
  35762. value: 1
  35763. },
  35764. id: "cursorRightSelect",
  35765. precondition: void 0,
  35766. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1041}
  35767. })), e.CursorUp = o.registerEditorCommand(new c({
  35768. args: {
  35769. direction: 2, unit: 2, select: !1, value: 1
  35770. },
  35771. id: "cursorUp",
  35772. precondition: void 0,
  35773. kbOpts: {
  35774. weight: C,
  35775. kbExpr: f.EditorContextKeys.textInputFocus,
  35776. primary: 16,
  35777. mac: {primary: 16, secondary: [302]}
  35778. }
  35779. })), e.CursorUpSelect = o.registerEditorCommand(new c({
  35780. args: {direction: 2, unit: 2, select: !0, value: 1},
  35781. id: "cursorUpSelect",
  35782. precondition: void 0,
  35783. kbOpts: {
  35784. weight: C,
  35785. kbExpr: f.EditorContextKeys.textInputFocus,
  35786. primary: 1040,
  35787. secondary: [3088],
  35788. mac: {primary: 1040},
  35789. linux: {primary: 1040}
  35790. }
  35791. })), e.CursorPageUp = o.registerEditorCommand(new c({
  35792. args: {direction: 2, unit: 2, select: !1, value: -1},
  35793. id: "cursorPageUp",
  35794. precondition: void 0,
  35795. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 11}
  35796. })), e.CursorPageUpSelect = o.registerEditorCommand(new c({
  35797. args: {
  35798. direction: 2,
  35799. unit: 2,
  35800. select: !0,
  35801. value: -1
  35802. },
  35803. id: "cursorPageUpSelect",
  35804. precondition: void 0,
  35805. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1035}
  35806. })), e.CursorDown = o.registerEditorCommand(new c({
  35807. args: {direction: 3, unit: 2, select: !1, value: 1}, id: "cursorDown", precondition: void 0, kbOpts: {
  35808. weight: C,
  35809. kbExpr: f.EditorContextKeys.textInputFocus, primary: 18, mac: {primary: 18, secondary: [300]}
  35810. }
  35811. })), e.CursorDownSelect = o.registerEditorCommand(new c({
  35812. args: {
  35813. direction: 3,
  35814. unit: 2,
  35815. select: !0,
  35816. value: 1
  35817. },
  35818. id: "cursorDownSelect",
  35819. precondition: void 0,
  35820. kbOpts: {
  35821. weight: C,
  35822. kbExpr: f.EditorContextKeys.textInputFocus,
  35823. primary: 1042,
  35824. secondary: [3090],
  35825. mac: {primary: 1042},
  35826. linux: {primary: 1042}
  35827. }
  35828. })), e.CursorPageDown = o.registerEditorCommand(new c({
  35829. args: {direction: 3, unit: 2, select: !1, value: -1},
  35830. id: "cursorPageDown",
  35831. precondition: void 0,
  35832. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 12}
  35833. })), e.CursorPageDownSelect = o.registerEditorCommand(new c({
  35834. args: {
  35835. direction: 3,
  35836. unit: 2,
  35837. select: !0,
  35838. value: -1
  35839. },
  35840. id: "cursorPageDownSelect",
  35841. precondition: void 0,
  35842. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1036}
  35843. })), e.CreateCursor = o.registerEditorCommand(new (function (e) {
  35844. function t() {
  35845. return e.call(this, {id: "createCursor", precondition: void 0}) || this
  35846. }
  35847. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35848. var n, i = e.context
  35849. ;n = t.wholeLine ? d.CursorMoveCommands.line(i, e.getPrimaryCursor(), !1, t.position, t.viewPosition) : d.CursorMoveCommands.moveTo(i, e.getPrimaryCursor(), !1, t.position, t.viewPosition);
  35850. var o = e.getAll();
  35851. if (o.length > 1) for (var r = n.modelState ? n.modelState.position : null, s = n.viewState ? n.viewState.position : null, a = 0, l = o.length; a < l; a++) {
  35852. var u = o[a];
  35853. if ((!r || u.modelState.selection.containsPosition(r)) && (!s || u.viewState.selection.containsPosition(s))) return o.splice(a, 1), e.context.model.pushStackElement(), void e.setStates(t.source, 3, o)
  35854. }
  35855. o.push(n), e.context.model.pushStackElement(), e.setStates(t.source, 3, o)
  35856. }, t
  35857. }(b))), e.LastCursorMoveToSelect = o.registerEditorCommand(new (function (e) {
  35858. function t() {
  35859. return e.call(this, {id: "_lastCursorMoveToSelect", precondition: void 0}) || this
  35860. }
  35861. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35862. var n = e.context, i = e.getLastAddedCursorIndex(), o = e.getAll(), r = o.slice(0);
  35863. r[i] = d.CursorMoveCommands.moveTo(n, o[i], !0, t.position, t.viewPosition), e.context.model.pushStackElement(), e.setStates(t.source, 3, r)
  35864. }, t
  35865. }(b)));
  35866. var g = function (e) {
  35867. function t(t) {
  35868. var n = e.call(this, t) || this;
  35869. return n._inSelectionMode = t.inSelectionMode, n
  35870. }
  35871. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35872. e.context.model.pushStackElement(), e.setStates(t.source, 3, d.CursorMoveCommands.moveToBeginningOfLine(e.context, e.getAll(), this._inSelectionMode)), e.reveal(t.source, !0, 0, 0)
  35873. }, t
  35874. }(b);
  35875. e.CursorHome = o.registerEditorCommand(new g({
  35876. inSelectionMode: !1,
  35877. id: "cursorHome",
  35878. precondition: void 0,
  35879. kbOpts: {
  35880. weight: C,
  35881. kbExpr: f.EditorContextKeys.textInputFocus,
  35882. primary: 14,
  35883. mac: {primary: 14, secondary: [2063]}
  35884. }
  35885. })), e.CursorHomeSelect = o.registerEditorCommand(new g({
  35886. inSelectionMode: !0,
  35887. id: "cursorHomeSelect",
  35888. precondition: void 0,
  35889. kbOpts: {
  35890. weight: C,
  35891. kbExpr: f.EditorContextKeys.textInputFocus,
  35892. primary: 1038,
  35893. mac: {primary: 1038, secondary: [3087]}
  35894. }
  35895. })), e.CursorLineStart = o.registerEditorCommand(new (function (e) {
  35896. function t() {
  35897. return e.call(this, {
  35898. id: "cursorLineStart",
  35899. precondition: void 0,
  35900. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 287}}
  35901. }) || this
  35902. }
  35903. return r(t, e),
  35904. t.prototype.runCoreEditorCommand = function (e, t) {
  35905. e.context.model.pushStackElement(), e.setStates(t.source, 3, this._exec(e.context, e.getAll())), e.reveal(t.source, !0, 0, 0)
  35906. }, t.prototype._exec = function (e, t) {
  35907. for (var n = [], i = 0, o = t.length; i < o; i++) {
  35908. var r = t[i], s = r.modelState.position.lineNumber;
  35909. n[i] = l.CursorState.fromModelState(r.modelState.move(!1, s, 1, 0))
  35910. }
  35911. return n
  35912. }, t
  35913. }(b)));
  35914. var m = function (e) {
  35915. function t(t) {
  35916. var n = e.call(this, t) || this;
  35917. return n._inSelectionMode = t.inSelectionMode, n
  35918. }
  35919. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35920. e.context.model.pushStackElement(), e.setStates(t.source, 3, d.CursorMoveCommands.moveToEndOfLine(e.context, e.getAll(), this._inSelectionMode)), e.reveal(t.source, !0, 0, 0)
  35921. }, t
  35922. }(b);
  35923. e.CursorEnd = o.registerEditorCommand(new m({
  35924. inSelectionMode: !1,
  35925. id: "cursorEnd",
  35926. precondition: void 0,
  35927. kbOpts: {
  35928. weight: C,
  35929. kbExpr: f.EditorContextKeys.textInputFocus,
  35930. primary: 13,
  35931. mac: {primary: 13, secondary: [2065]}
  35932. }
  35933. })), e.CursorEndSelect = o.registerEditorCommand(new m({
  35934. inSelectionMode: !0, id: "cursorEndSelect", precondition: void 0, kbOpts: {
  35935. weight: C,
  35936. kbExpr: f.EditorContextKeys.textInputFocus,
  35937. primary: 1037,
  35938. mac: {primary: 1037, secondary: [3089]}
  35939. }
  35940. })), e.CursorLineEnd = o.registerEditorCommand(new (function (e) {
  35941. function t() {
  35942. return e.call(this, {
  35943. id: "cursorLineEnd",
  35944. precondition: void 0,
  35945. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 291}}
  35946. }) || this
  35947. }
  35948. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35949. e.context.model.pushStackElement(), e.setStates(t.source, 3, this._exec(e.context, e.getAll())), e.reveal(t.source, !0, 0, 0)
  35950. }, t.prototype._exec = function (e, t) {
  35951. for (var n = [], i = 0, o = t.length; i < o; i++) {
  35952. var r = t[i], s = r.modelState.position.lineNumber, a = e.model.getLineMaxColumn(s);
  35953. n[i] = l.CursorState.fromModelState(r.modelState.move(!1, s, a, 0))
  35954. }
  35955. return n
  35956. }, t
  35957. }(b)));
  35958. var y = function (e) {
  35959. function t(t) {
  35960. var n = e.call(this, t) || this;
  35961. return n._inSelectionMode = t.inSelectionMode, n
  35962. }
  35963. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35964. e.context.model.pushStackElement(),
  35965. e.setStates(t.source, 3, d.CursorMoveCommands.moveToBeginningOfBuffer(e.context, e.getAll(), this._inSelectionMode)), e.reveal(t.source, !0, 0, 0)
  35966. }, t
  35967. }(b);
  35968. e.CursorTop = o.registerEditorCommand(new y({
  35969. inSelectionMode: !1,
  35970. id: "cursorTop",
  35971. precondition: void 0,
  35972. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2062, mac: {primary: 2064}}
  35973. })), e.CursorTopSelect = o.registerEditorCommand(new y({
  35974. inSelectionMode: !0,
  35975. id: "cursorTopSelect",
  35976. precondition: void 0,
  35977. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3086, mac: {primary: 3088}}
  35978. }));
  35979. var S = function (e) {
  35980. function t(t) {
  35981. var n = e.call(this, t) || this;
  35982. return n._inSelectionMode = t.inSelectionMode, n
  35983. }
  35984. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  35985. e.context.model.pushStackElement(), e.setStates(t.source, 3, d.CursorMoveCommands.moveToEndOfBuffer(e.context, e.getAll(), this._inSelectionMode)), e.reveal(t.source, !0, 0, 0)
  35986. }, t
  35987. }(b);
  35988. e.CursorBottom = o.registerEditorCommand(new S({
  35989. inSelectionMode: !1, id: "cursorBottom", precondition: void 0, kbOpts: {
  35990. weight: C,
  35991. kbExpr: f.EditorContextKeys.textInputFocus, primary: 2061, mac: {primary: 2066}
  35992. }
  35993. })), e.CursorBottomSelect = o.registerEditorCommand(new S({
  35994. inSelectionMode: !0,
  35995. id: "cursorBottomSelect",
  35996. precondition: void 0,
  35997. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 3085, mac: {primary: 3090}}
  35998. }));
  35999. var w = function (e) {
  36000. function t() {
  36001. return e.call(this, {id: "editorScroll", precondition: void 0, description: v.description}) || this
  36002. }
  36003. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36004. var n = v.parse(t);
  36005. n && this._runEditorScroll(e, t.source, n)
  36006. }, t.prototype._runEditorScroll = function (e, t, n) {
  36007. var i = this._computeDesiredScrollTop(e.context, n);
  36008. if (n.revealCursor) {
  36009. var o = e.context.getCompletelyVisibleViewRangeAtScrollTop(i);
  36010. e.setStates(t, 3, [d.CursorMoveCommands.findPositionInViewportIfOutside(e.context, e.getPrimaryCursor(), o, n.select)])
  36011. }
  36012. e.scrollTo(i)
  36013. }, t.prototype._computeDesiredScrollTop = function (e, t) {
  36014. if (1 === t.unit) {
  36015. var n = e.getCompletelyVisibleModelRange(), i = void 0
  36016. ;i = 1 === t.direction ? Math.max(1, n.startLineNumber - t.value) : Math.min(e.model.getLineCount(), n.startLineNumber + t.value);
  36017. var o = e.convertModelPositionToViewPosition(new h.Position(i, 1));
  36018. return e.getVerticalOffsetForViewLine(o.lineNumber)
  36019. }
  36020. var r;
  36021. r = 3 === t.unit ? e.config.pageSize * t.value : 4 === t.unit ? Math.round(e.config.pageSize / 2) * t.value : t.value;
  36022. var s = (1 === t.direction ? -1 : 1) * r;
  36023. return e.getCurrentScrollTop() + s * e.config.lineHeight
  36024. }, t
  36025. }(b);
  36026. e.EditorScrollImpl = w, e.EditorScroll = o.registerEditorCommand(new w), e.ScrollLineUp = o.registerEditorCommand(new (function (t) {
  36027. function n() {
  36028. return t.call(this, {
  36029. id: "scrollLineUp",
  36030. precondition: void 0,
  36031. kbOpts: {
  36032. weight: C,
  36033. kbExpr: f.EditorContextKeys.textInputFocus,
  36034. primary: 2064,
  36035. mac: {primary: 267}
  36036. }
  36037. }) || this
  36038. }
  36039. return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
  36040. e.EditorScroll._runEditorScroll(t, n.source, {
  36041. direction: 1,
  36042. unit: 2,
  36043. value: 1,
  36044. revealCursor: !1,
  36045. select: !1
  36046. })
  36047. }, n
  36048. }(b))), e.ScrollPageUp = o.registerEditorCommand(new (function (t) {
  36049. function n() {
  36050. return t.call(this, {
  36051. id: "scrollPageUp", precondition: void 0, kbOpts: {
  36052. weight: C,
  36053. kbExpr: f.EditorContextKeys.textInputFocus,
  36054. primary: 2059,
  36055. win: {primary: 523},
  36056. linux: {primary: 523}
  36057. }
  36058. }) || this
  36059. }
  36060. return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
  36061. e.EditorScroll._runEditorScroll(t, n.source, {
  36062. direction: 1,
  36063. unit: 3,
  36064. value: 1,
  36065. revealCursor: !1,
  36066. select: !1
  36067. })
  36068. }, n
  36069. }(b))), e.ScrollLineDown = o.registerEditorCommand(new (function (t) {
  36070. function n() {
  36071. return t.call(this, {
  36072. id: "scrollLineDown",
  36073. precondition: void 0,
  36074. kbOpts: {
  36075. weight: C,
  36076. kbExpr: f.EditorContextKeys.textInputFocus,
  36077. primary: 2066,
  36078. mac: {primary: 268}
  36079. }
  36080. }) || this
  36081. }
  36082. return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
  36083. e.EditorScroll._runEditorScroll(t, n.source, {
  36084. direction: 2,
  36085. unit: 2,
  36086. value: 1,
  36087. revealCursor: !1,
  36088. select: !1
  36089. })
  36090. }, n
  36091. }(b))), e.ScrollPageDown = o.registerEditorCommand(new (function (t) {
  36092. function n() {
  36093. return t.call(this, {
  36094. id: "scrollPageDown",
  36095. precondition: void 0,
  36096. kbOpts: {
  36097. weight: C,
  36098. kbExpr: f.EditorContextKeys.textInputFocus,
  36099. primary: 2060,
  36100. win: {primary: 524},
  36101. linux: {primary: 524}
  36102. }
  36103. }) || this
  36104. }
  36105. return r(n, t), n.prototype.runCoreEditorCommand = function (t, n) {
  36106. e.EditorScroll._runEditorScroll(t, n.source, {
  36107. direction: 2,
  36108. unit: 3,
  36109. value: 1,
  36110. revealCursor: !1,
  36111. select: !1
  36112. })
  36113. }, n
  36114. }(b)));
  36115. var E = function (e) {
  36116. function t(t) {
  36117. var n = e.call(this, t) || this;
  36118. return n._inSelectionMode = t.inSelectionMode, n
  36119. }
  36120. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36121. e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.word(e.context, e.getPrimaryCursor(), this._inSelectionMode, t.position)]), e.reveal(t.source, !0, 0, 0)
  36122. }, t
  36123. }(b);
  36124. e.WordSelect = o.registerEditorCommand(new E({
  36125. inSelectionMode: !1,
  36126. id: "_wordSelect",
  36127. precondition: void 0
  36128. })), e.WordSelectDrag = o.registerEditorCommand(new E({
  36129. inSelectionMode: !0,
  36130. id: "_wordSelectDrag",
  36131. precondition: void 0
  36132. })), e.LastCursorWordSelect = o.registerEditorCommand(new (function (e) {
  36133. function t() {
  36134. return e.call(this, {id: "lastCursorWordSelect", precondition: void 0}) || this
  36135. }
  36136. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36137. var n = e.context, i = e.getLastAddedCursorIndex(), o = e.getAll(), r = o.slice(0), s = o[i]
  36138. ;r[i] = d.CursorMoveCommands.word(n, s, s.modelState.hasSelection(), t.position), n.model.pushStackElement(), e.setStates(t.source, 3, r)
  36139. }, t
  36140. }(b)));
  36141. var L = function (e) {
  36142. function t(t) {
  36143. var n = e.call(this, t) || this;
  36144. return n._inSelectionMode = t.inSelectionMode, n
  36145. }
  36146. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36147. e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.line(e.context, e.getPrimaryCursor(), this._inSelectionMode, t.position, t.viewPosition)]), e.reveal(t.source, !1, 0, 0)
  36148. }, t
  36149. }(b);
  36150. e.LineSelect = o.registerEditorCommand(new L({
  36151. inSelectionMode: !1,
  36152. id: "_lineSelect",
  36153. precondition: void 0
  36154. })), e.LineSelectDrag = o.registerEditorCommand(new L({
  36155. inSelectionMode: !0,
  36156. id: "_lineSelectDrag",
  36157. precondition: void 0
  36158. }));
  36159. var D = function (e) {
  36160. function t(t) {
  36161. var n = e.call(this, t) || this;
  36162. return n._inSelectionMode = t.inSelectionMode, n
  36163. }
  36164. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36165. var n = e.getLastAddedCursorIndex(), i = e.getAll(), o = i.slice(0)
  36166. ;o[n] = d.CursorMoveCommands.line(e.context, i[n], this._inSelectionMode, t.position, t.viewPosition), e.context.model.pushStackElement(), e.setStates(t.source, 3, o)
  36167. }, t
  36168. }(b);
  36169. e.LastCursorLineSelect = o.registerEditorCommand(new D({
  36170. inSelectionMode: !1,
  36171. id: "lastCursorLineSelect",
  36172. precondition: void 0
  36173. })), e.LastCursorLineSelectDrag = o.registerEditorCommand(new D({
  36174. inSelectionMode: !0,
  36175. id: "lastCursorLineSelectDrag",
  36176. precondition: void 0
  36177. })), e.ExpandLineSelection = o.registerEditorCommand(new (function (e) {
  36178. function t() {
  36179. return e.call(this, {
  36180. id: "expandLineSelection",
  36181. precondition: void 0,
  36182. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2090}
  36183. }) || this
  36184. }
  36185. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36186. e.context.model.pushStackElement(), e.setStates(t.source, 3, d.CursorMoveCommands.expandLineSelection(e.context, e.getAll())), e.reveal(t.source, !0, 0, 0)
  36187. }, t
  36188. }(b))), e.CancelSelection = o.registerEditorCommand(new (function (e) {
  36189. function t() {
  36190. return e.call(this, {
  36191. id: "cancelSelection", precondition: f.EditorContextKeys.hasNonEmptySelection,
  36192. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 9, secondary: [1033]}
  36193. }) || this
  36194. }
  36195. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36196. e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.cancelSelection(e.context, e.getPrimaryCursor())]), e.reveal(t.source, !0, 0, 0)
  36197. }, t
  36198. }(b))), e.RemoveSecondaryCursors = o.registerEditorCommand(new (function (e) {
  36199. function t() {
  36200. return e.call(this, {
  36201. id: "removeSecondaryCursors",
  36202. precondition: f.EditorContextKeys.hasMultipleSelections,
  36203. kbOpts: {
  36204. weight: C + 1,
  36205. kbExpr: f.EditorContextKeys.textInputFocus,
  36206. primary: 9,
  36207. secondary: [1033]
  36208. }
  36209. }) || this
  36210. }
  36211. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36212. e.context.model.pushStackElement(), e.setStates(t.source, 3, [e.getPrimaryCursor()]), e.reveal(t.source, !0, 0, 0)
  36213. }, t
  36214. }(b))), e.RevealLine = o.registerEditorCommand(new (function (e) {
  36215. function t() {
  36216. return e.call(this, {id: "revealLine", precondition: void 0, description: _.description}) || this
  36217. }
  36218. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36219. var n = t, i = (n.lineNumber || 0) + 1
  36220. ;i < 1 && (i = 1);
  36221. var o = e.context.model.getLineCount();
  36222. i > o && (i = o);
  36223. var r = new p.Range(i, 1, i, e.context.model.getLineMaxColumn(i)), s = 0;
  36224. if (n.at) switch (n.at) {
  36225. case _.RawAtArgument.Top:
  36226. s = 3;
  36227. break;
  36228. case _.RawAtArgument.Center:
  36229. s = 1;
  36230. break;
  36231. case _.RawAtArgument.Bottom:
  36232. s = 4
  36233. }
  36234. var a = e.context.convertModelRangeToViewRange(r);
  36235. e.revealRange(t.source, !1, a, s, 0)
  36236. }, t
  36237. }(b))), e.SelectAll = o.registerEditorCommand(new (function (e) {
  36238. function t() {
  36239. return e.call(this, {id: "selectAll", precondition: void 0}) || this
  36240. }
  36241. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36242. e.context.model.pushStackElement(), e.setStates(t.source, 3, [d.CursorMoveCommands.selectAll(e.context, e.getPrimaryCursor())])
  36243. }, t
  36244. }(b))), e.SetSelection = o.registerEditorCommand(new (function (e) {
  36245. function t() {
  36246. return e.call(this, {id: "setSelection", precondition: void 0}) || this
  36247. }
  36248. return r(t, e), t.prototype.runCoreEditorCommand = function (e, t) {
  36249. e.context.model.pushStackElement(), e.setStates(t.source, 3, [l.CursorState.fromModelSelection(t.selection)])
  36250. }, t
  36251. }(b)))
  36252. }(y = t.CoreNavigationCommands || (t.CoreNavigationCommands = {})), function (e) {
  36253. var t = function (e) {
  36254. function t() {
  36255. return null !== e && e.apply(this, arguments) || this
  36256. }
  36257. return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
  36258. var i = t._getCursors();
  36259. i && this.runCoreEditingCommand(t, i, n || {})
  36260. }, t
  36261. }(o.EditorCommand);
  36262. e.CoreEditingCommand = t, e.LineBreakInsert = o.registerEditorCommand(new (function (e) {
  36263. function t() {
  36264. return e.call(this, {
  36265. id: "lineBreakInsert",
  36266. precondition: f.EditorContextKeys.writable,
  36267. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 301}}
  36268. }) || this
  36269. }
  36270. return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
  36271. e.pushUndoStop(), e.executeCommands(this.id, c.TypeOperations.lineBreakInsert(t.context.config, t.context.model, t.getAll().map((function (e) {
  36272. return e.modelState.selection
  36273. }))))
  36274. }, t
  36275. }(t))), e.Outdent = o.registerEditorCommand(new (function (e) {
  36276. function t() {
  36277. return e.call(this, {
  36278. id: "outdent", precondition: f.EditorContextKeys.writable, kbOpts: {
  36279. weight: C,
  36280. kbExpr: m.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus, f.EditorContextKeys.tabDoesNotMoveFocus),
  36281. primary: 1026
  36282. }
  36283. }) || this
  36284. }
  36285. return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
  36286. e.pushUndoStop(), e.executeCommands(this.id, c.TypeOperations.outdent(t.context.config, t.context.model, t.getAll().map((function (e) {
  36287. return e.modelState.selection
  36288. })))), e.pushUndoStop()
  36289. }, t
  36290. }(t))), e.Tab = o.registerEditorCommand(new (function (e) {
  36291. function t() {
  36292. return e.call(this, {
  36293. id: "tab",
  36294. precondition: f.EditorContextKeys.writable,
  36295. kbOpts: {
  36296. weight: C,
  36297. kbExpr: m.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus, f.EditorContextKeys.tabDoesNotMoveFocus),
  36298. primary: 2
  36299. }
  36300. }) || this
  36301. }
  36302. return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
  36303. e.pushUndoStop(), e.executeCommands(this.id, c.TypeOperations.tab(t.context.config, t.context.model, t.getAll().map((function (e) {
  36304. return e.modelState.selection
  36305. })))), e.pushUndoStop()
  36306. }, t
  36307. }(t))), e.DeleteLeft = o.registerEditorCommand(new (function (e) {
  36308. function t() {
  36309. return e.call(this, {
  36310. id: "deleteLeft",
  36311. precondition: f.EditorContextKeys.writable,
  36312. kbOpts: {
  36313. weight: C,
  36314. kbExpr: f.EditorContextKeys.textInputFocus,
  36315. primary: 1,
  36316. secondary: [1025],
  36317. mac: {primary: 1, secondary: [1025, 294, 257]}
  36318. }
  36319. }) || this
  36320. }
  36321. return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
  36322. var i = u.DeleteOperations.deleteLeft(t.getPrevEditOperationType(), t.context.config, t.context.model, t.getAll().map((function (e) {
  36323. return e.modelState.selection
  36324. }))), o = i[0], r = i[1];
  36325. o && e.pushUndoStop(), e.executeCommands(this.id, r), t.setPrevEditOperationType(2)
  36326. }, t
  36327. }(t))), e.DeleteRight = o.registerEditorCommand(new (function (e) {
  36328. function t() {
  36329. return e.call(this, {
  36330. id: "deleteRight",
  36331. precondition: f.EditorContextKeys.writable,
  36332. kbOpts: {
  36333. weight: C,
  36334. kbExpr: f.EditorContextKeys.textInputFocus,
  36335. primary: 20,
  36336. mac: {primary: 20, secondary: [290, 276]}
  36337. }
  36338. }) || this
  36339. }
  36340. return r(t, e), t.prototype.runCoreEditingCommand = function (e, t, n) {
  36341. var i = u.DeleteOperations.deleteRight(t.getPrevEditOperationType(), t.context.config, t.context.model, t.getAll().map((function (e) {
  36342. return e.modelState.selection
  36343. }))), o = i[0], r = i[1]
  36344. ;o && e.pushUndoStop(), e.executeCommands(this.id, r), t.setPrevEditOperationType(3)
  36345. }, t
  36346. }(t)))
  36347. }(t.CoreEditingCommands || (t.CoreEditingCommands = {}));
  36348. var w = function (e) {
  36349. function t(t) {
  36350. var n = e.call(this, t) || this;
  36351. return n._editorHandler = t.editorHandler, n._inputHandler = t.inputHandler, n
  36352. }
  36353. return r(t, e), t.prototype.runCommand = function (e, t) {
  36354. var n = e.get(s.ICodeEditorService).getFocusedCodeEditor();
  36355. if (n && n.hasTextFocus()) return this._runEditorHandler(e, n, t);
  36356. var i = document.activeElement;
  36357. if (!(i && ["input", "textarea"].indexOf(i.tagName.toLowerCase()) >= 0)) {
  36358. var o = e.get(s.ICodeEditorService).getActiveCodeEditor();
  36359. return o ? (o.focus(), this._runEditorHandler(e, o, t)) : void 0
  36360. }
  36361. document.execCommand(this._inputHandler)
  36362. }, t.prototype._runEditorHandler = function (e, t, n) {
  36363. var i = this._editorHandler;
  36364. "string" == typeof i ? t.trigger("keyboard", i, n) : ((n = n || {}).source = "keyboard", i.runEditorCommand(e, t, n))
  36365. }, t
  36366. }(o.Command), E = function (e) {
  36367. function t(t, n, i) {
  36368. var o = e.call(this, {id: t, precondition: void 0, description: i}) || this;
  36369. return o._handlerId = n, o
  36370. }
  36371. return r(t, e),
  36372. t.prototype.runCommand = function (e, t) {
  36373. var n = e.get(s.ICodeEditorService).getFocusedCodeEditor();
  36374. n && n.trigger("keyboard", this._handlerId, t)
  36375. }, t
  36376. }(o.Command);
  36377. function L(e, t) {
  36378. S(new E("default:" + e, e)), S(new E(e, e, t))
  36379. }
  36380. S(new w({
  36381. editorHandler: y.SelectAll,
  36382. inputHandler: "selectAll",
  36383. id: "editor.action.selectAll",
  36384. precondition: f.EditorContextKeys.textInputFocus,
  36385. kbOpts: {weight: C, kbExpr: null, primary: 2079},
  36386. menuOpts: {menuId: 25, group: "1_basic", title: n.localize(0, null), order: 1}
  36387. })), S(new w({
  36388. editorHandler: g.Handler.Undo,
  36389. inputHandler: "undo",
  36390. id: g.Handler.Undo,
  36391. precondition: f.EditorContextKeys.writable,
  36392. kbOpts: {weight: C, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2104},
  36393. menuOpts: {menuId: 17, group: "1_do", title: n.localize(1, null), order: 1}
  36394. })), S(new E("default:" + g.Handler.Undo, g.Handler.Undo)), S(new w({
  36395. editorHandler: g.Handler.Redo,
  36396. inputHandler: "redo",
  36397. id: g.Handler.Redo,
  36398. precondition: f.EditorContextKeys.writable,
  36399. kbOpts: {
  36400. weight: C,
  36401. kbExpr: f.EditorContextKeys.textInputFocus,
  36402. primary: 2103,
  36403. secondary: [3128],
  36404. mac: {primary: 3128}
  36405. },
  36406. menuOpts: {
  36407. menuId: 17,
  36408. group: "1_do", title: n.localize(2, null), order: 2
  36409. }
  36410. })), S(new E("default:" + g.Handler.Redo, g.Handler.Redo)), L(g.Handler.Type, {
  36411. description: "Type",
  36412. args: [{name: "args", schema: {type: "object", required: ["text"], properties: {text: {type: "string"}}}}]
  36413. }), L(g.Handler.ReplacePreviousChar), L(g.Handler.CompositionStart), L(g.Handler.CompositionEnd), L(g.Handler.Paste), L(g.Handler.Cut)
  36414. })), define(n[522], i([0, 1, 12, 18, 26, 76, 11, 83]), (function (e, t, n, i, o, s, a, l) {
  36415. "use strict";
  36416. Object.defineProperty(t, "__esModule", {value: !0});
  36417. var u = a.createDecorator("IEditorCancelService"), d = new i.RawContextKey("cancellableOperation", !1);
  36418. l.registerSingleton(u, function () {
  36419. function e() {
  36420. this._tokens = new WeakMap
  36421. }
  36422. return e.prototype.add = function (e, t) {
  36423. var n, o = this._tokens.get(e);
  36424. return o || (o = e.invokeWithinContext((function (e) {
  36425. return {key: d.bindTo(e.get(i.IContextKeyService)), tokens: new s.LinkedList}
  36426. })), this._tokens.set(e, o)), o.key.set(!0), n = o.tokens.push(t), function () {
  36427. n && (n(), o.key.set(!o.tokens.isEmpty()), n = void 0)
  36428. }
  36429. }, e.prototype.cancel = function (e) {
  36430. var t = this._tokens.get(e);
  36431. if (t) {
  36432. var n = t.tokens.pop();
  36433. n && (n.cancel(), t.key.set(!t.tokens.isEmpty()))
  36434. }
  36435. }, e
  36436. }(), !0);
  36437. var c = function (e) {
  36438. function t(t, n) {
  36439. var i = e.call(this, n) || this;
  36440. return i.editor = t, i._unregister = t.invokeWithinContext((function (e) {
  36441. return e.get(u).add(t, i)
  36442. })), i
  36443. }
  36444. return r(t, e), t.prototype.dispose = function () {
  36445. this._unregister(), e.prototype.dispose.call(this)
  36446. }, t
  36447. }(o.CancellationTokenSource);
  36448. t.EditorKeybindingCancellationTokenSource = c, n.registerEditorCommand(new (function (e) {
  36449. function t() {
  36450. return e.call(this, {
  36451. id: "editor.cancelOperation",
  36452. kbOpts: {weight: 100, primary: 9},
  36453. precondition: d
  36454. }) || this
  36455. }
  36456. return r(t, e), t.prototype.runEditorCommand = function (e, t) {
  36457. e.get(u).cancel(t)
  36458. }, t
  36459. }(n.EditorCommand)))
  36460. })), define(n[67], i([0, 1, 5, 26, 2, 522]), (function (e, t, n, i, o, s) {
  36461. "use strict";
  36462. Object.defineProperty(t, "__esModule", {value: !0});
  36463. var a = function () {
  36464. function e(e, t) {
  36465. if (this.flags = t, 0 != (1 & this.flags)) {
  36466. var i = e.getModel();
  36467. this.modelVersionId = i ? n.format("{0}#{1}", i.uri.toString(), i.getVersionId()) : null
  36468. } else this.modelVersionId = null
  36469. ;
  36470. 0 != (4 & this.flags) ? this.position = e.getPosition() : this.position = null, 0 != (2 & this.flags) ? this.selection = e.getSelection() : this.selection = null, 0 != (8 & this.flags) ? (this.scrollLeft = e.getScrollLeft(), this.scrollTop = e.getScrollTop()) : (this.scrollLeft = -1, this.scrollTop = -1)
  36471. }
  36472. return e.prototype._equals = function (t) {
  36473. if (!(t instanceof e)) return !1;
  36474. var n = t;
  36475. return this.modelVersionId === n.modelVersionId && (this.scrollLeft === n.scrollLeft && this.scrollTop === n.scrollTop && (!(!this.position && n.position || this.position && !n.position || this.position && n.position && !this.position.equals(n.position)) && !(!this.selection && n.selection || this.selection && !n.selection || this.selection && n.selection && !this.selection.equalsRange(n.selection))))
  36476. }, e.prototype.validate = function (t) {
  36477. return this._equals(new e(t, this.flags))
  36478. }, e
  36479. }();
  36480. t.EditorState = a;
  36481. var l = function (e) {
  36482. function t(t, n, i) {
  36483. var r = e.call(this, t, i) || this;
  36484. return r.editor = t, r._listener = new o.DisposableStore, 4 & n && r._listener.add(t.onDidChangeCursorPosition((function (e) {
  36485. return r.cancel()
  36486. }))),
  36487. 2 & n && r._listener.add(t.onDidChangeCursorSelection((function (e) {
  36488. return r.cancel()
  36489. }))), 8 & n && r._listener.add(t.onDidScrollChange((function (e) {
  36490. return r.cancel()
  36491. }))), 1 & n && (r._listener.add(t.onDidChangeModel((function (e) {
  36492. return r.cancel()
  36493. }))), r._listener.add(t.onDidChangeModelContent((function (e) {
  36494. return r.cancel()
  36495. })))), r
  36496. }
  36497. return r(t, e), t.prototype.dispose = function () {
  36498. this._listener.dispose(), e.prototype.dispose.call(this)
  36499. }, t
  36500. }(s.EditorKeybindingCancellationTokenSource);
  36501. t.EditorStateCancellationTokenSource = l;
  36502. var u = function (e) {
  36503. function t(t, n) {
  36504. var i = e.call(this, n) || this;
  36505. return i._listener = t.onDidChangeContent((function () {
  36506. return i.cancel()
  36507. })), i
  36508. }
  36509. return r(t, e), t.prototype.dispose = function () {
  36510. this._listener.dispose(), e.prototype.dispose.call(this)
  36511. }, t
  36512. }(i.CancellationTokenSource);
  36513. t.TextModelCancellationTokenSource = u;
  36514. var d = function () {
  36515. function e(e, t) {
  36516. this._visiblePosition = e, this._visiblePositionScrollDelta = t
  36517. }
  36518. return e.capture = function (t) {
  36519. var n = null, i = 0;
  36520. if (0 !== t.getScrollTop()) {
  36521. var o = t.getVisibleRanges();
  36522. if (o.length > 0) {
  36523. n = o[0].getStartPosition();
  36524. var r = t.getTopForPosition(n.lineNumber, n.column);
  36525. i = t.getScrollTop() - r
  36526. }
  36527. }
  36528. return new e(n, i)
  36529. }, e.prototype.restore = function (e) {
  36530. if (this._visiblePosition) {
  36531. var t = e.getTopForPosition(this._visiblePosition.lineNumber, this._visiblePosition.column);
  36532. e.setScrollTop(t + this._visiblePositionScrollDelta)
  36533. }
  36534. }, e
  36535. }();
  36536. t.StableEditorScrollState = d
  36537. })), define(n[523], i([0, 1, 164, 13, 16]), (function (e, t, n, i, o) {
  36538. "use strict";
  36539. Object.defineProperty(t, "__esModule", {value: !0});
  36540. var r = function () {
  36541. function e(e, t, n, i) {
  36542. this.configuration = e, this.viewModel = t, this.outgoingEvents = n, this.commandDelegate = i
  36543. }
  36544. return e.prototype._execMouseCommand = function (e, t) {
  36545. t.source = "mouse", this.commandDelegate.executeEditorCommand(e, t)
  36546. }, e.prototype.paste = function (e, t, n, i, o) {
  36547. this.commandDelegate.paste(e, t, n, i, o)
  36548. }, e.prototype.type = function (e, t) {
  36549. this.commandDelegate.type(e, t)
  36550. }, e.prototype.replacePreviousChar = function (e, t, n) {
  36551. this.commandDelegate.replacePreviousChar(e, t, n)
  36552. }, e.prototype.compositionStart = function (e) {
  36553. this.commandDelegate.compositionStart(e)
  36554. },
  36555. e.prototype.compositionEnd = function (e) {
  36556. this.commandDelegate.compositionEnd(e)
  36557. }, e.prototype.cut = function (e) {
  36558. this.commandDelegate.cut(e)
  36559. }, e.prototype.setSelection = function (e, t) {
  36560. this.commandDelegate.executeEditorCommand(n.CoreNavigationCommands.SetSelection, {
  36561. source: e,
  36562. selection: t
  36563. })
  36564. }, e.prototype._validateViewColumn = function (e) {
  36565. var t = this.viewModel.getLineMinColumn(e.lineNumber);
  36566. return e.column < t ? new i.Position(e.lineNumber, t) : e
  36567. }, e.prototype._hasMulticursorModifier = function (e) {
  36568. switch (this.configuration.options.get(59)) {
  36569. case"altKey":
  36570. return e.altKey;
  36571. case"ctrlKey":
  36572. return e.ctrlKey;
  36573. case"metaKey":
  36574. return e.metaKey
  36575. }
  36576. return !1
  36577. }, e.prototype._hasNonMulticursorModifier = function (e) {
  36578. switch (this.configuration.options.get(59)) {
  36579. case"altKey":
  36580. return e.ctrlKey || e.metaKey;
  36581. case"ctrlKey":
  36582. return e.altKey || e.metaKey;
  36583. case"metaKey":
  36584. return e.ctrlKey || e.altKey
  36585. }
  36586. return !1
  36587. }, e.prototype.dispatchMouse = function (e) {
  36588. var t = o.isLinux && this.configuration.options.get(81)
  36589. ;e.middleButton && !t ? this._columnSelect(e.position, e.mouseColumn, e.inSelectionMode) : e.startedOnLineNumbers ? this._hasMulticursorModifier(e) ? e.inSelectionMode ? this._lastCursorLineSelect(e.position) : this._createCursor(e.position, !0) : e.inSelectionMode ? this._lineSelectDrag(e.position) : this._lineSelect(e.position) : e.mouseDownCount >= 4 ? this._selectAll() : 3 === e.mouseDownCount ? this._hasMulticursorModifier(e) ? e.inSelectionMode ? this._lastCursorLineSelectDrag(e.position) : this._lastCursorLineSelect(e.position) : e.inSelectionMode ? this._lineSelectDrag(e.position) : this._lineSelect(e.position) : 2 === e.mouseDownCount ? this._hasMulticursorModifier(e) ? this._lastCursorWordSelect(e.position) : e.inSelectionMode ? this._wordSelectDrag(e.position) : this._wordSelect(e.position) : this._hasMulticursorModifier(e) ? this._hasNonMulticursorModifier(e) || (e.shiftKey ? this._columnSelect(e.position, e.mouseColumn, !0) : e.inSelectionMode ? this._lastCursorMoveToSelect(e.position) : this._createCursor(e.position, !1)) : e.inSelectionMode ? e.altKey ? this._columnSelect(e.position, e.mouseColumn, !0) : this._moveToSelect(e.position) : this.moveTo(e.position)
  36590. }, e.prototype._usualArgs = function (e) {
  36591. return e = this._validateViewColumn(e), {position: this._convertViewToModelPosition(e), viewPosition: e}
  36592. }, e.prototype.moveTo = function (e) {
  36593. this._execMouseCommand(n.CoreNavigationCommands.MoveTo, this._usualArgs(e))
  36594. }, e.prototype._moveToSelect = function (e) {
  36595. this._execMouseCommand(n.CoreNavigationCommands.MoveToSelect, this._usualArgs(e))
  36596. }, e.prototype._columnSelect = function (e, t, i) {
  36597. e = this._validateViewColumn(e), this._execMouseCommand(n.CoreNavigationCommands.ColumnSelect, {
  36598. position: this._convertViewToModelPosition(e),
  36599. viewPosition: e,
  36600. mouseColumn: t,
  36601. doColumnSelect: i
  36602. })
  36603. }, e.prototype._createCursor = function (e, t) {
  36604. e = this._validateViewColumn(e), this._execMouseCommand(n.CoreNavigationCommands.CreateCursor, {
  36605. position: this._convertViewToModelPosition(e),
  36606. viewPosition: e,
  36607. wholeLine: t
  36608. })
  36609. }, e.prototype._lastCursorMoveToSelect = function (e) {
  36610. this._execMouseCommand(n.CoreNavigationCommands.LastCursorMoveToSelect, this._usualArgs(e))
  36611. }, e.prototype._wordSelect = function (e) {
  36612. this._execMouseCommand(n.CoreNavigationCommands.WordSelect, this._usualArgs(e))
  36613. }, e.prototype._wordSelectDrag = function (e) {
  36614. this._execMouseCommand(n.CoreNavigationCommands.WordSelectDrag, this._usualArgs(e))
  36615. }, e.prototype._lastCursorWordSelect = function (e) {
  36616. this._execMouseCommand(n.CoreNavigationCommands.LastCursorWordSelect, this._usualArgs(e))
  36617. }, e.prototype._lineSelect = function (e) {
  36618. this._execMouseCommand(n.CoreNavigationCommands.LineSelect, this._usualArgs(e))
  36619. }, e.prototype._lineSelectDrag = function (e) {
  36620. this._execMouseCommand(n.CoreNavigationCommands.LineSelectDrag, this._usualArgs(e))
  36621. }, e.prototype._lastCursorLineSelect = function (e) {
  36622. this._execMouseCommand(n.CoreNavigationCommands.LastCursorLineSelect, this._usualArgs(e))
  36623. }, e.prototype._lastCursorLineSelectDrag = function (e) {
  36624. this._execMouseCommand(n.CoreNavigationCommands.LastCursorLineSelectDrag, this._usualArgs(e))
  36625. }, e.prototype._selectAll = function () {
  36626. this._execMouseCommand(n.CoreNavigationCommands.SelectAll, {})
  36627. }, e.prototype._convertViewToModelPosition = function (e) {
  36628. return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)
  36629. }, e.prototype.emitKeyDown = function (e) {
  36630. this.outgoingEvents.emitKeyDown(e)
  36631. }, e.prototype.emitKeyUp = function (e) {
  36632. this.outgoingEvents.emitKeyUp(e)
  36633. }, e.prototype.emitContextMenu = function (e) {
  36634. this.outgoingEvents.emitContextMenu(e)
  36635. }, e.prototype.emitMouseMove = function (e) {
  36636. this.outgoingEvents.emitMouseMove(e)
  36637. }, e.prototype.emitMouseLeave = function (e) {
  36638. this.outgoingEvents.emitMouseLeave(e)
  36639. }, e.prototype.emitMouseUp = function (e) {
  36640. this.outgoingEvents.emitMouseUp(e)
  36641. }, e.prototype.emitMouseDown = function (e) {
  36642. this.outgoingEvents.emitMouseDown(e)
  36643. }, e.prototype.emitMouseDrag = function (e) {
  36644. this.outgoingEvents.emitMouseDrag(e)
  36645. }, e.prototype.emitMouseDrop = function (e) {
  36646. this.outgoingEvents.emitMouseDrop(e)
  36647. }, e.prototype.emitMouseWheel = function (e) {
  36648. this.outgoingEvents.emitMouseWheel(e)
  36649. }, e
  36650. }();
  36651. t.ViewController = r
  36652. })), define(n[524], i([0, 1, 429, 12, 23, 374]), (function (e, t, n, i, o, s) {
  36653. "use strict";
  36654. Object.defineProperty(t, "__esModule", {value: !0});
  36655. var a = function (e) {
  36656. function t(t, n) {
  36657. var i = e.call(this, n) || this;
  36658. return i.left = t, i
  36659. }
  36660. return r(t, e), t.prototype.run = function (e, t) {
  36661. if (t.hasModel()) {
  36662. for (var n = [], i = 0, o = t.getSelections(); i < o.length; i++) {
  36663. var r = o[i];
  36664. n.push(new s.MoveCaretCommand(r, this.left))
  36665. }
  36666. t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop()
  36667. }
  36668. }, t
  36669. }(i.EditorAction), l = function (e) {
  36670. function t() {
  36671. return e.call(this, !0, {
  36672. id: "editor.action.moveCarretLeftAction",
  36673. label: n.localize(0, null),
  36674. alias: "Move Caret Left",
  36675. precondition: o.EditorContextKeys.writable
  36676. }) || this
  36677. }
  36678. return r(t, e), t
  36679. }(a), u = function (e) {
  36680. function t() {
  36681. return e.call(this, !1, {
  36682. id: "editor.action.moveCarretRightAction",
  36683. label: n.localize(1, null),
  36684. alias: "Move Caret Right",
  36685. precondition: o.EditorContextKeys.writable
  36686. }) || this
  36687. }
  36688. return r(t, e), t
  36689. }(a);
  36690. i.registerEditorAction(l), i.registerEditorAction(u)
  36691. })), define(n[525], i([0, 1, 430, 12, 80, 3, 23, 158]), (function (e, t, n, i, o, s, a, l) {
  36692. "use strict";
  36693. Object.defineProperty(t, "__esModule", {value: !0});
  36694. var u = function (e) {
  36695. function t() {
  36696. return e.call(this, {
  36697. id: "editor.action.transposeLetters",
  36698. label: n.localize(0, null),
  36699. alias: "Transpose Letters",
  36700. precondition: a.EditorContextKeys.writable,
  36701. kbOpts: {kbExpr: a.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 306}, weight: 100}
  36702. }) || this
  36703. }
  36704. return r(t, e), t.prototype.run = function (e, t) {
  36705. if (t.hasModel()) {
  36706. for (var n = t.getModel(), i = [], r = 0, a = t.getSelections(); r < a.length; r++) {
  36707. var u = a[r];
  36708. if (u.isEmpty()) {
  36709. var d = u.startLineNumber, c = u.startColumn, h = n.getLineMaxColumn(d);
  36710. if (1 !== d || 1 !== c && (2 !== c || 2 !== h)) {
  36711. var p = c === h ? u.getPosition() : l.MoveOperations.rightPosition(n, u.getPosition().lineNumber, u.getPosition().column),
  36712. g = l.MoveOperations.leftPosition(n, p.lineNumber, p.column),
  36713. f = l.MoveOperations.leftPosition(n, g.lineNumber, g.column),
  36714. m = n.getValueInRange(s.Range.fromPositions(f, g)),
  36715. v = n.getValueInRange(s.Range.fromPositions(g, p)), _ = s.Range.fromPositions(f, p);
  36716. i.push(new o.ReplaceCommand(_, v + m))
  36717. }
  36718. }
  36719. }
  36720. i.length > 0 && (t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop())
  36721. }
  36722. }, t
  36723. }(i.EditorAction);
  36724. i.registerEditorAction(u)
  36725. })), define(n[526], i([0, 1, 431, 24, 16, 189, 12, 32, 23, 303]), (function (e, t, n, i, o, s, a, l, u) {
  36726. "use strict";
  36727. Object.defineProperty(t, "__esModule", {value: !0});
  36728. var d = "9_cutcopypaste", c = o.isNative || document.queryCommandSupported("cut"),
  36729. h = o.isNative || document.queryCommandSupported("copy"), p = h && !i.isEdgeOrIE,
  36730. g = o.isNative || !i.isChrome && document.queryCommandSupported("paste"), f = function (e) {
  36731. function t(t, n) {
  36732. var i = e.call(this, n) || this;
  36733. return i.browserCommand = t, i
  36734. }
  36735. return r(t, e), t.prototype.runCommand = function (e, t) {
  36736. var n = e.get(l.ICodeEditorService).getFocusedCodeEditor();
  36737. n && n.hasTextFocus() ? n.trigger("keyboard", this.id, t) : document.execCommand(this.browserCommand)
  36738. }, t.prototype.run = function (e, t) {
  36739. t.focus(), document.execCommand(this.browserCommand)
  36740. }, t
  36741. }(a.EditorAction), m = function (e) {
  36742. function t() {
  36743. var t = {
  36744. kbExpr: u.EditorContextKeys.textInputFocus,
  36745. primary: 2102,
  36746. win: {primary: 2102, secondary: [1044]},
  36747. weight: 100
  36748. };
  36749. return o.isNative || (t = void 0), e.call(this, "cut", {
  36750. id: "editor.action.clipboardCutAction",
  36751. label: n.localize(0, null),
  36752. alias: "Cut",
  36753. precondition: u.EditorContextKeys.writable,
  36754. kbOpts: t,
  36755. contextMenuOpts: {group: d, order: 1},
  36756. menuOpts: {
  36757. menuId: 17, group: "2_ccp", title: n.localize(1, null), order: 1
  36758. }
  36759. }) || this
  36760. }
  36761. return r(t, e), t.prototype.run = function (t, n) {
  36762. n.hasModel() && (!n.getOption(25) && n.getSelection().isEmpty() || e.prototype.run.call(this, t, n))
  36763. }, t
  36764. }(f), v = function (e) {
  36765. function t() {
  36766. var t = {
  36767. kbExpr: u.EditorContextKeys.textInputFocus,
  36768. primary: 2081,
  36769. win: {primary: 2081, secondary: [2067]},
  36770. weight: 100
  36771. };
  36772. return o.isNative || (t = void 0), e.call(this, "copy", {
  36773. id: "editor.action.clipboardCopyAction",
  36774. label: n.localize(2, null),
  36775. alias: "Copy",
  36776. precondition: void 0,
  36777. kbOpts: t,
  36778. contextMenuOpts: {group: d, order: 2},
  36779. menuOpts: {menuId: 17, group: "2_ccp", title: n.localize(3, null), order: 2}
  36780. }) || this
  36781. }
  36782. return r(t, e), t.prototype.run = function (t, n) {
  36783. n.hasModel() && (!n.getOption(25) && n.getSelection().isEmpty() || e.prototype.run.call(this, t, n))
  36784. }, t
  36785. }(f), _ = function (e) {
  36786. function t() {
  36787. var t = {
  36788. kbExpr: u.EditorContextKeys.textInputFocus,
  36789. primary: 2100,
  36790. win: {primary: 2100, secondary: [1043]},
  36791. weight: 100
  36792. };
  36793. return o.isNative || (t = void 0), e.call(this, "paste", {
  36794. id: "editor.action.clipboardPasteAction",
  36795. label: n.localize(4, null),
  36796. alias: "Paste",
  36797. precondition: u.EditorContextKeys.writable,
  36798. kbOpts: t,
  36799. contextMenuOpts: {group: d, order: 3},
  36800. menuOpts: {menuId: 17, group: "2_ccp", title: n.localize(5, null), order: 3}
  36801. }) || this
  36802. }
  36803. return r(t, e), t
  36804. }(f), y = function (e) {
  36805. function t() {
  36806. return e.call(this, "copy", {
  36807. id: "editor.action.clipboardCopyWithSyntaxHighlightingAction",
  36808. label: n.localize(6, null),
  36809. alias: "Copy With Syntax Highlighting",
  36810. precondition: void 0,
  36811. kbOpts: {kbExpr: u.EditorContextKeys.textInputFocus, primary: 0, weight: 100}
  36812. }) || this
  36813. }
  36814. return r(t, e), t.prototype.run = function (t, n) {
  36815. n.hasModel() && (!n.getOption(25) && n.getSelection().isEmpty() || (s.CopyOptions.forceCopyWithSyntaxHighlighting = !0, e.prototype.run.call(this, t, n), s.CopyOptions.forceCopyWithSyntaxHighlighting = !1))
  36816. }, t
  36817. }(f);
  36818. c && a.registerEditorAction(m), h && a.registerEditorAction(v), g && a.registerEditorAction(_), p && a.registerEditorAction(y)
  36819. }));
  36820. a = this && this.__spreadArrays || function () {
  36821. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  36822. var i = Array(e), o = 0;
  36823. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s]
  36824. ;
  36825. return i
  36826. };
  36827. define(n[119], i([0, 1, 19, 26, 10, 2, 25, 67, 12, 3, 22, 17, 49, 111]), (function (e, t, n, i, o, s, l, u, h, p, g, f, m, v) {
  36828. "use strict";
  36829. Object.defineProperty(t, "__esModule", {value: !0}), t.codeActionCommandId = "editor.action.codeAction", t.refactorCommandId = "editor.action.refactor", t.sourceActionCommandId = "editor.action.sourceAction", t.organizeImportsCommandId = "editor.action.organizeImports", t.fixAllCommandId = "editor.action.fixAll";
  36830. var _ = function (e) {
  36831. function t(i, o) {
  36832. var r = e.call(this) || this;
  36833. return r._register(o), r.allActions = n.mergeSort(a(i), t.codeActionsComparator), r.validActions = r.allActions.filter((function (e) {
  36834. return !e.disabled
  36835. })), r
  36836. }
  36837. return r(t, e), t.codeActionsComparator = function (e, t) {
  36838. return n.isNonEmptyArray(e.diagnostics) ? n.isNonEmptyArray(t.diagnostics) ? e.diagnostics[0].message.localeCompare(t.diagnostics[0].message) : -1 : n.isNonEmptyArray(t.diagnostics) ? 1 : 0
  36839. }, Object.defineProperty(t.prototype, "hasAutoFix", {
  36840. get: function () {
  36841. return this.validActions.some((function (e) {
  36842. return !!e.kind && v.CodeActionKind.QuickFix.contains(new v.CodeActionKind(e.kind)) && !!e.isPreferred
  36843. }))
  36844. }, enumerable: !0, configurable: !0
  36845. }), t
  36846. }(s.Disposable);
  36847. function y(e, t, i, r) {
  36848. var a, l = this, h = i.filter || {},
  36849. p = {only: null === (a = h.include) || void 0 === a ? void 0 : a.value, trigger: i.type},
  36850. g = new u.TextModelCancellationTokenSource(e, r), m = function (e, t) {
  36851. return f.CodeActionProviderRegistry.all(e).filter((function (e) {
  36852. return !e.providedCodeActionKinds || e.providedCodeActionKinds.some((function (e) {
  36853. return v.mayIncludeActionsOfKind(t, new v.CodeActionKind(e))
  36854. }))
  36855. }))
  36856. }(e, h), y = new s.DisposableStore, C = m.map((function (n) {
  36857. return d(l, void 0, void 0, (function () {
  36858. var i, r;
  36859. return c(this, (function (s) {
  36860. switch (s.label) {
  36861. case 0:
  36862. return s.trys.push([0, 2, , 3]), [4, n.provideCodeActions(e, t, p, g.token)];
  36863. case 1:
  36864. return i = s.sent(), g.token.isCancellationRequested || !i ? [2, []] : (y.add(i), [2, i.actions.filter((function (e) {
  36865. return e && v.filtersAction(h, e)
  36866. }))]);
  36867. case 2:
  36868. if (r = s.sent(), o.isPromiseCanceledError(r)) throw r;
  36869. return o.onUnexpectedExternalError(r), [2, []];
  36870. case 3:
  36871. return [2]
  36872. }
  36873. }))
  36874. }))
  36875. })), b = f.CodeActionProviderRegistry.onDidChange((function () {
  36876. var t = f.CodeActionProviderRegistry.all(e);
  36877. n.equals(t, m) || g.cancel()
  36878. }));
  36879. return Promise.all(C).then(n.flatten).then((function (e) {
  36880. return new _(e, y)
  36881. })).finally((function () {
  36882. b.dispose(), g.dispose()
  36883. }))
  36884. }
  36885. t.getCodeActions = y, h.registerLanguageCommand("_executeCodeActionProvider", (function (e, t) {
  36886. return d(this, void 0, void 0, (function () {
  36887. var n, r, s, a, u, d;
  36888. return c(this, (function (c) {
  36889. switch (c.label) {
  36890. case 0:
  36891. if (n = t.resource, r = t.rangeOrSelection, s = t.kind, !(n instanceof l.URI)) throw o.illegalArgument();
  36892. if (!(a = e.get(m.IModelService).getModel(n))) throw o.illegalArgument();
  36893. if (!(u = g.Selection.isISelection(r) ? g.Selection.liftSelection(r) : p.Range.isIRange(r) ? a.validateRange(r) : void 0)) throw o.illegalArgument();
  36894. return [4, y(a, u, {
  36895. type: 2,
  36896. filter: {
  36897. includeSourceActions: !0,
  36898. include: s && s.value ? new v.CodeActionKind(s.value) : void 0
  36899. }
  36900. }, i.CancellationToken.None)];
  36901. case 1:
  36902. return d = c.sent(), setTimeout((function () {
  36903. return d.dispose()
  36904. }), 100), [2, d.validActions]
  36905. }
  36906. }))
  36907. }))
  36908. }))
  36909. }))
  36910. ;a = this && this.__spreadArrays || function () {
  36911. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  36912. var i = Array(e), o = 0;
  36913. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  36914. return i
  36915. };
  36916. define(n[527], i([0, 1, 6, 70, 55, 10, 128, 2, 13, 17, 119, 111, 66, 34]), (function (e, t, n, i, o, s, u, p, f, m, v, _, y, C) {
  36917. "use strict";
  36918. Object.defineProperty(t, "__esModule", {value: !0});
  36919. var b = function (e) {
  36920. function t(t, n) {
  36921. var i = e.call(this, t.command ? t.command.id : t.title, t.title, void 0, !t.disabled, n) || this;
  36922. return i.action = t, i
  36923. }
  36924. return r(t, e), t
  36925. }(o.Action), S = function (e) {
  36926. function t(t, n, i, o) {
  36927. var r = e.call(this) || this;
  36928. return r._editor = t, r._delegate = n, r._contextMenuService = i, r._visible = !1, r._showingActions = r._register(new p.MutableDisposable), r._keybindingResolver = new w({
  36929. getKeybindings: function () {
  36930. return o.getKeybindings()
  36931. }
  36932. }), r
  36933. }
  36934. return r(t, e), Object.defineProperty(t.prototype, "isVisible", {
  36935. get: function () {
  36936. return this._visible
  36937. }, enumerable: !0, configurable: !0
  36938. }), t.prototype.show = function (e, t, n, i) {
  36939. return d(this, void 0, void 0, (function () {
  36940. var o, r, a, l, u = this;
  36941. return c(this, (function (d) {
  36942. if (!(o = i.includeDisabledActions ? t.allActions : t.validActions).length) return this._visible = !1, [2];
  36943. if (!this._editor.getDomNode()) throw this._visible = !1, s.canceled();
  36944. return this._visible = !0, this._showingActions.value = t, r = this.getMenuActions(e, o), a = f.Position.isIPosition(n) ? this._toCoords(n) : n || {
  36945. x: 0,
  36946. y: 0
  36947. }, l = this._keybindingResolver.getResolver(), this._contextMenuService.showContextMenu({
  36948. getAnchor: function () {
  36949. return a
  36950. }, getActions: function () {
  36951. return r
  36952. }, onHide: function () {
  36953. u._visible = !1, u._editor.focus()
  36954. }, autoSelectFirstItem: !0, getKeyBinding: function (e) {
  36955. return e instanceof b ? l(e.action) : void 0
  36956. }
  36957. }), [2]
  36958. }))
  36959. }))
  36960. }, t.prototype.getMenuActions = function (e, t) {
  36961. var n, o, r = this, s = function (e) {
  36962. return new b(e, (function () {
  36963. return r._delegate.onSelectCodeAction(e)
  36964. }))
  36965. }, l = t.map(s), u = this._editor.getModel();
  36966. if (u && l.length) for (var d = 0, c = m.CodeActionProviderRegistry.all(u); d < c.length; d++) {
  36967. var h = c[d];
  36968. if (h._getAdditionalMenuItems) {
  36969. var p = h._getAdditionalMenuItems({
  36970. trigger: e.type,
  36971. only: null === (o = null === (n = e.filter) || void 0 === n ? void 0 : n.include) || void 0 === o ? void 0 : o.value
  36972. }, t);
  36973. p.length && l.push.apply(l, a([new i.Separator], p.map((function (e) {
  36974. return s({title: e.title, command: e})
  36975. }))))
  36976. }
  36977. }
  36978. return l
  36979. }, t.prototype._toCoords = function (e) {
  36980. if (!this._editor.hasModel()) return {x: 0, y: 0};
  36981. this._editor.revealPosition(e, 1), this._editor.render();
  36982. var t = this._editor.getScrolledVisiblePosition(e),
  36983. i = n.getDomNodePagePosition(this._editor.getDomNode());
  36984. return {x: i.left + t.left, y: i.top + t.top + t.height}
  36985. }, t = h([g(2, y.IContextMenuService), g(3, C.IKeybindingService)], t)
  36986. }(p.Disposable);
  36987. t.CodeActionMenu = S;
  36988. var w = function () {
  36989. function e(e) {
  36990. this._keybindingProvider = e
  36991. }
  36992. return e.prototype.getResolver = function () {
  36993. var t = this, n = new u.Lazy((function () {
  36994. return t._keybindingProvider.getKeybindings().filter((function (t) {
  36995. return e.codeActionCommands.indexOf(t.command) >= 0
  36996. })).filter((function (e) {
  36997. return e.resolvedKeybinding
  36998. })).map((function (e) {
  36999. var t = e.commandArgs;
  37000. return e.command === v.organizeImportsCommandId ? t = {
  37001. kind: _.CodeActionKind.SourceOrganizeImports.value
  37002. } : e.command === v.fixAllCommandId && (t = {kind: _.CodeActionKind.SourceFixAll.value}), l({resolvedKeybinding: e.resolvedKeybinding}, _.CodeActionCommandArgs.fromUser(t, {
  37003. kind: _.CodeActionKind.None,
  37004. apply: "never"
  37005. }))
  37006. }))
  37007. }));
  37008. return function (e) {
  37009. if (e.kind) {
  37010. var i = t.bestKeybindingForCodeAction(e, n.getValue());
  37011. return null == i ? void 0 : i.resolvedKeybinding
  37012. }
  37013. }
  37014. }, e.prototype.bestKeybindingForCodeAction = function (e, t) {
  37015. if (e.kind) {
  37016. var n = new _.CodeActionKind(e.kind);
  37017. return t.filter((function (e) {
  37018. return e.kind.contains(n)
  37019. })).filter((function (t) {
  37020. return !t.preferred || e.isPreferred
  37021. })).reduceRight((function (e, t) {
  37022. return e ? e.kind.contains(t.kind) ? t : e : t
  37023. }), void 0)
  37024. }
  37025. }, e.codeActionCommands = [v.refactorCommandId, v.codeActionCommandId, v.sourceActionCommandId, v.organizeImportsCommandId, v.fixAllCommandId], e
  37026. }();
  37027. t.CodeActionKeybindingResolver = w
  37028. })), define(n[528], i([0, 1, 15, 4, 2, 3, 17, 18, 119, 39]), (function (e, t, n, i, o, s, a, l, u, d) {
  37029. "use strict";
  37030. Object.defineProperty(t, "__esModule", {value: !0}),
  37031. t.SUPPORTED_CODE_ACTIONS = new l.RawContextKey("supportedCodeAction", "");
  37032. var c, h = function (e) {
  37033. function t(t, i, o, r) {
  37034. void 0 === r && (r = 250);
  37035. var s = e.call(this) || this;
  37036. return s._editor = t, s._markerService = i, s._signalChange = o, s._delay = r, s._autoTriggerTimer = s._register(new n.TimeoutTimer), s._register(s._markerService.onMarkerChanged((function (e) {
  37037. return s._onMarkerChanges(e)
  37038. }))), s._register(s._editor.onDidChangeCursorPosition((function () {
  37039. return s._onCursorChange()
  37040. }))), s
  37041. }
  37042. return r(t, e), t.prototype.trigger = function (e) {
  37043. var t = this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);
  37044. return this._createEventAndSignalChange(e, t)
  37045. }, t.prototype._onMarkerChanges = function (e) {
  37046. var t = this, n = this._editor.getModel();
  37047. n && e.some((function (e) {
  37048. return d.isEqual(e, n.uri)
  37049. })) && this._autoTriggerTimer.cancelAndSet((function () {
  37050. t.trigger({type: 1})
  37051. }), this._delay)
  37052. }, t.prototype._onCursorChange = function () {
  37053. var e = this;
  37054. this._autoTriggerTimer.cancelAndSet((function () {
  37055. e.trigger({type: 1})
  37056. }), this._delay)
  37057. }, t.prototype._getRangeOfMarker = function (e) {
  37058. var t = this._editor.getModel();
  37059. if (t) for (var n = 0, i = this._markerService.read({resource: t.uri}); n < i.length; n++) {
  37060. var o = i[n], r = t.validateRange(o);
  37061. if (s.Range.intersectRanges(r, e)) return s.Range.lift(r)
  37062. }
  37063. }, t.prototype._getRangeOfSelectionUnlessWhitespaceEnclosed = function (e) {
  37064. if (this._editor.hasModel()) {
  37065. var t = this._editor.getModel(), n = this._editor.getSelection();
  37066. if (n.isEmpty() && 1 === e.type) {
  37067. var i = n.getPosition(), o = i.lineNumber, r = i.column, s = t.getLineContent(o);
  37068. if (0 === s.length) return;
  37069. if (1 === r) {
  37070. if (/\s/.test(s[0])) return
  37071. } else if (r === t.getLineMaxColumn(o)) {
  37072. if (/\s/.test(s[s.length - 1])) return
  37073. } else if (/\s/.test(s[r - 2]) && /\s/.test(s[r - 1])) return
  37074. }
  37075. return n
  37076. }
  37077. }, t.prototype._createEventAndSignalChange = function (e, t) {
  37078. var n = this._editor.getModel();
  37079. if (t && n) {
  37080. var i = this._getRangeOfMarker(t), o = i ? i.getStartPosition() : t.getStartPosition(),
  37081. r = {trigger: e, selection: t, position: o};
  37082. return this._signalChange(r), r
  37083. }
  37084. this._signalChange(void 0)
  37085. }, t
  37086. }(o.Disposable);
  37087. !function (e) {
  37088. e.Empty = {type: 0};
  37089. var t = function (e, t, n, i) {
  37090. this.trigger = e, this.rangeOrSelection = t,
  37091. this.position = n, this.actions = i, this.type = 1
  37092. };
  37093. e.Triggered = t
  37094. }(c = t.CodeActionsState || (t.CodeActionsState = {}));
  37095. var p = function (e) {
  37096. function s(n, r, s, l) {
  37097. var u = e.call(this) || this;
  37098. return u._editor = n, u._markerService = r, u._progressService = l, u._codeActionOracle = u._register(new o.MutableDisposable), u._state = c.Empty, u._onDidChangeState = u._register(new i.Emitter), u.onDidChangeState = u._onDidChangeState.event, u._supportedCodeActions = t.SUPPORTED_CODE_ACTIONS.bindTo(s), u._register(u._editor.onDidChangeModel((function () {
  37099. return u._update()
  37100. }))), u._register(u._editor.onDidChangeModelLanguage((function () {
  37101. return u._update()
  37102. }))), u._register(a.CodeActionProviderRegistry.onDidChange((function () {
  37103. return u._update()
  37104. }))), u._update(), u
  37105. }
  37106. return r(s, e), s.prototype.dispose = function () {
  37107. e.prototype.dispose.call(this), this.setState(c.Empty, !0)
  37108. }, s.prototype._update = function () {
  37109. var e = this;
  37110. this._codeActionOracle.value = void 0, this.setState(c.Empty);
  37111. var t = this._editor.getModel();
  37112. if (t && a.CodeActionProviderRegistry.has(t) && !this._editor.getOption(68)) {
  37113. for (var i = [], o = 0, r = a.CodeActionProviderRegistry.all(t); o < r.length; o++) {
  37114. var s = r[o];
  37115. Array.isArray(s.providedCodeActionKinds) && i.push.apply(i, s.providedCodeActionKinds)
  37116. }
  37117. this._supportedCodeActions.set(i.join(" ")), this._codeActionOracle.value = new h(this._editor, this._markerService, (function (i) {
  37118. if (i) {
  37119. var o = n.createCancelablePromise((function (e) {
  37120. return u.getCodeActions(t, i.selection, i.trigger, e)
  37121. }));
  37122. e._progressService && 2 === i.trigger.type && e._progressService.showWhile(o, 250), e.setState(new c.Triggered(i.trigger, i.selection, i.position, o))
  37123. } else e.setState(c.Empty)
  37124. }), void 0), this._codeActionOracle.value.trigger({type: 1})
  37125. } else this._supportedCodeActions.reset()
  37126. }, s.prototype.trigger = function (e) {
  37127. this._codeActionOracle.value && this._codeActionOracle.value.trigger(e)
  37128. }, s.prototype.setState = function (e, t) {
  37129. e !== this._state && (1 === this._state.type && this._state.actions.cancel(), this._state = e, t || this._onDidChangeState.fire(e))
  37130. }, s
  37131. }(o.Disposable);
  37132. t.CodeActionModel = p
  37133. })),
  37134. define(n[221], i([0, 1, 19, 26, 10, 25, 12, 17, 49, 2]), (function (e, t, n, i, o, r, s, a, l, u) {
  37135. "use strict";
  37136. Object.defineProperty(t, "__esModule", {value: !0});
  37137. var d = function () {
  37138. function e() {
  37139. this.lenses = [], this._disposables = new u.DisposableStore
  37140. }
  37141. return e.prototype.dispose = function () {
  37142. this._disposables.dispose()
  37143. }, e.prototype.add = function (e, t) {
  37144. this._disposables.add(e);
  37145. for (var n = 0, i = e.lenses; n < i.length; n++) {
  37146. var o = i[n];
  37147. this.lenses.push({symbol: o, provider: t})
  37148. }
  37149. }, e
  37150. }();
  37151. function c(e, t) {
  37152. var i = a.CodeLensProviderRegistry.ordered(e), r = new Map, s = new d, l = i.map((function (n, i) {
  37153. return r.set(n, i), Promise.resolve(n.provideCodeLenses(e, t)).then((function (e) {
  37154. return e && s.add(e, n)
  37155. })).catch(o.onUnexpectedExternalError)
  37156. }));
  37157. return Promise.all(l).then((function () {
  37158. return s.lenses = n.mergeSort(s.lenses, (function (e, t) {
  37159. return e.symbol.range.startLineNumber < t.symbol.range.startLineNumber ? -1 : e.symbol.range.startLineNumber > t.symbol.range.startLineNumber ? 1 : r.get(e.provider) < r.get(t.provider) ? -1 : r.get(e.provider) > r.get(t.provider) ? 1 : e.symbol.range.startColumn < t.symbol.range.startColumn ? -1 : e.symbol.range.startColumn > t.symbol.range.startColumn ? 1 : 0
  37160. })), s
  37161. }))
  37162. }
  37163. t.CodeLensModel = d, t.getCodeLensData = c, s.registerLanguageCommand("_executeCodeLensProvider", (function (e, t) {
  37164. var n = t.resource, s = t.itemResolveCount;
  37165. if (!(n instanceof r.URI)) throw o.illegalArgument();
  37166. var a = e.get(l.IModelService).getModel(n);
  37167. if (!a) throw o.illegalArgument();
  37168. var d = [], h = new u.DisposableStore;
  37169. return c(a, i.CancellationToken.None).then((function (e) {
  37170. h.add(e);
  37171. for (var t = [], n = function (e) {
  37172. void 0 === s || Boolean(e.symbol.command) ? d.push(e.symbol) : s-- > 0 && e.provider.resolveCodeLens && t.push(Promise.resolve(e.provider.resolveCodeLens(a, e.symbol, i.CancellationToken.None)).then((function (t) {
  37173. return d.push(t || e.symbol)
  37174. })))
  37175. }, o = 0, r = e.lenses; o < r.length; o++) {
  37176. n(r[o])
  37177. }
  37178. return Promise.all(t)
  37179. })).then((function () {
  37180. return d
  37181. })).finally((function () {
  37182. setTimeout((function () {
  37183. return h.dispose()
  37184. }), 100)
  37185. }))
  37186. }))
  37187. })), define(n[529], i([0, 1, 11, 83, 221, 38, 74, 3, 15, 102]), (function (e, t, n, i, o, r, s, a, l, u) {
  37188. "use strict";
  37189. Object.defineProperty(t, "__esModule", {value: !0}), t.ICodeLensCache = n.createDecorator("ICodeLensCache");
  37190. var d = function (e, t) {
  37191. this.lineCount = e, this.data = t
  37192. }, c = function () {
  37193. function e(e) {
  37194. var t = this;
  37195. this._fakeProvider = new (function () {
  37196. function e() {
  37197. }
  37198. return e.prototype.provideCodeLenses = function () {
  37199. throw new Error("not supported")
  37200. }, e
  37201. }()), this._cache = new r.LRUCache(20, .75);
  37202. l.runWhenIdle((function () {
  37203. return e.remove("codelens/cache", 1)
  37204. }));
  37205. var n = "codelens/cache2", i = e.get(n, 1, "{}");
  37206. this._deserialize(i), u.once(e.onWillSaveState)((function (i) {
  37207. i.reason === s.WillSaveStateReason.SHUTDOWN && e.store(n, t._serialize(), 1)
  37208. }))
  37209. }
  37210. return e.prototype.put = function (e, t) {
  37211. var n = t.lenses.map((function (e) {
  37212. var t;
  37213. return {
  37214. range: e.symbol.range,
  37215. command: e.symbol.command && {
  37216. id: "",
  37217. title: null === (t = e.symbol.command) || void 0 === t ? void 0 : t.title
  37218. }
  37219. }
  37220. })), i = new o.CodeLensModel;
  37221. i.add({
  37222. lenses: n, dispose: function () {
  37223. }
  37224. }, this._fakeProvider);
  37225. var r = new d(e.getLineCount(), i);
  37226. this._cache.set(e.uri.toString(), r)
  37227. }, e.prototype.get = function (e) {
  37228. var t = this._cache.get(e.uri.toString());
  37229. return t && t.lineCount === e.getLineCount() ? t.data : void 0
  37230. }, e.prototype.delete = function (e) {
  37231. this._cache.delete(e.uri.toString())
  37232. }, e.prototype._serialize = function () {
  37233. var e = Object.create(null);
  37234. return this._cache.forEach((function (t, n) {
  37235. for (var i = new Set, o = 0, s = t.data.lenses; o < s.length; o++) {
  37236. var a = s[o];
  37237. i.add(a.symbol.range.startLineNumber)
  37238. }
  37239. e[n] = {lineCount: t.lineCount, lines: r.values(i)}
  37240. })), JSON.stringify(e)
  37241. }, e.prototype._deserialize = function (e) {
  37242. try {
  37243. var t = JSON.parse(e);
  37244. for (var n in t) {
  37245. for (var i = t[n], r = [], s = 0, l = i.lines; s < l.length; s++) {
  37246. var u = l[s];
  37247. r.push({range: new a.Range(u, 1, u, 11)})
  37248. }
  37249. var c = new o.CodeLensModel;
  37250. c.add({
  37251. lenses: r, dispose: function () {
  37252. }
  37253. }, this._fakeProvider), this._cache.set(n, new d(i.lineCount, c))
  37254. }
  37255. } catch (e) {
  37256. }
  37257. }, e = h([g(0, s.IStorageService)], e)
  37258. }();
  37259. t.CodeLensCache = c,
  37260. i.registerSingleton(t.ICodeLensCache, c)
  37261. })), define(n[222], i([0, 1, 26, 10, 25, 12, 3, 17, 49]), (function (e, t, n, i, o, r, s, a, l) {
  37262. "use strict";
  37263. Object.defineProperty(t, "__esModule", {value: !0}), t.getColors = function (e, t) {
  37264. var n = [], i = a.ColorProviderRegistry.ordered(e).reverse().map((function (i) {
  37265. return Promise.resolve(i.provideDocumentColors(e, t)).then((function (e) {
  37266. if (Array.isArray(e)) for (var t = 0, o = e; t < o.length; t++) {
  37267. var r = o[t];
  37268. n.push({colorInfo: r, provider: i})
  37269. }
  37270. }))
  37271. }));
  37272. return Promise.all(i).then((function () {
  37273. return n
  37274. }))
  37275. }, t.getColorPresentations = function (e, t, n, i) {
  37276. return Promise.resolve(n.provideColorPresentations(e, t, i))
  37277. }, r.registerLanguageCommand("_executeDocumentColorProvider", (function (e, t) {
  37278. var r = t.resource;
  37279. if (!(r instanceof o.URI)) throw i.illegalArgument();
  37280. var s = e.get(l.IModelService).getModel(r);
  37281. if (!s) throw i.illegalArgument();
  37282. var u = [], d = a.ColorProviderRegistry.ordered(s).reverse().map((function (e) {
  37283. return Promise.resolve(e.provideDocumentColors(s, n.CancellationToken.None)).then((function (e) {
  37284. if (Array.isArray(e)) for (var t = 0, n = e; t < n.length; t++) {
  37285. var i = n[t];
  37286. u.push({range: i.range, color: [i.color.red, i.color.green, i.color.blue, i.color.alpha]})
  37287. }
  37288. }))
  37289. }));
  37290. return Promise.all(d).then((function () {
  37291. return u
  37292. }))
  37293. })), r.registerLanguageCommand("_executeColorPresentationProvider", (function (e, t) {
  37294. var r = t.resource, u = t.color, d = t.range;
  37295. if (!(r instanceof o.URI && Array.isArray(u) && 4 === u.length && s.Range.isIRange(d))) throw i.illegalArgument();
  37296. var c = u[0], h = u[1], p = u[2], g = u[3], f = e.get(l.IModelService).getModel(r);
  37297. if (!f) throw i.illegalArgument();
  37298. var m = {range: d, color: {red: c, green: h, blue: p, alpha: g}}, v = [],
  37299. _ = a.ColorProviderRegistry.ordered(f).reverse().map((function (e) {
  37300. return Promise.resolve(e.provideColorPresentations(f, m, n.CancellationToken.None)).then((function (e) {
  37301. Array.isArray(e) && v.push.apply(v, e)
  37302. }))
  37303. }));
  37304. return Promise.all(_).then((function () {
  37305. return v
  37306. }))
  37307. }))
  37308. })), define(n[223], i([0, 1, 15, 27, 10, 125, 2, 12, 32, 3, 30, 17, 222, 43]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m) {
  37309. "use strict";
  37310. Object.defineProperty(t, "__esModule", {value: !0})
  37311. ;var v = function (e) {
  37312. function t(t, n, i) {
  37313. var o = e.call(this) || this;
  37314. return o._editor = t, o._codeEditorService = n, o._configurationService = i, o._localToDispose = o._register(new a.DisposableStore), o._decorationsIds = [], o._colorDatas = new Map, o._colorDecoratorIds = [], o._decorationsTypes = new Set, o._register(t.onDidChangeModel((function (e) {
  37315. o._isEnabled = o.isEnabled(), o.onModelChanged()
  37316. }))), o._register(t.onDidChangeModelLanguage((function (e) {
  37317. return o.onModelChanged()
  37318. }))), o._register(p.ColorProviderRegistry.onDidChange((function (e) {
  37319. return o.onModelChanged()
  37320. }))), o._register(t.onDidChangeConfiguration((function (e) {
  37321. var t = o._isEnabled;
  37322. o._isEnabled = o.isEnabled(), t !== o._isEnabled && (o._isEnabled ? o.onModelChanged() : o.removeAllDecorations())
  37323. }))), o._timeoutTimer = null, o._computePromise = null, o._isEnabled = o.isEnabled(), o.onModelChanged(), o
  37324. }
  37325. return r(t, e), t.prototype.isEnabled = function () {
  37326. var e = this._editor.getModel();
  37327. if (!e) return !1;
  37328. var t = e.getLanguageIdentifier(), n = this._configurationService.getValue(t.language);
  37329. if (n) {
  37330. var i = n.colorDecorators
  37331. ;
  37332. if (i && void 0 !== i.enable && !i.enable) return i.enable
  37333. }
  37334. return this._editor.getOption(12)
  37335. }, t.get = function (e) {
  37336. return e.getContribution(this.ID)
  37337. }, t.prototype.dispose = function () {
  37338. this.stop(), this.removeAllDecorations(), e.prototype.dispose.call(this)
  37339. }, t.prototype.onModelChanged = function () {
  37340. var e = this;
  37341. if (this.stop(), this._isEnabled) {
  37342. var i = this._editor.getModel();
  37343. i && p.ColorProviderRegistry.has(i) && (this._localToDispose.add(this._editor.onDidChangeModelContent((function (i) {
  37344. e._timeoutTimer || (e._timeoutTimer = new n.TimeoutTimer, e._timeoutTimer.cancelAndSet((function () {
  37345. e._timeoutTimer = null, e.beginCompute()
  37346. }), t.RECOMPUTE_TIME))
  37347. }))), this.beginCompute())
  37348. }
  37349. }, t.prototype.beginCompute = function () {
  37350. var e = this;
  37351. this._computePromise = n.createCancelablePromise((function (t) {
  37352. var n = e._editor.getModel();
  37353. return n ? f.getColors(n, t) : Promise.resolve([])
  37354. })), this._computePromise.then((function (t) {
  37355. e.updateDecorations(t), e.updateColorDecorators(t), e._computePromise = null
  37356. }), o.onUnexpectedError)
  37357. }, t.prototype.stop = function () {
  37358. this._timeoutTimer && (this._timeoutTimer.cancel(), this._timeoutTimer = null), this._computePromise && (this._computePromise.cancel(), this._computePromise = null), this._localToDispose.clear()
  37359. }, t.prototype.updateDecorations = function (e) {
  37360. var t = this, n = e.map((function (e) {
  37361. return {
  37362. range: {
  37363. startLineNumber: e.colorInfo.range.startLineNumber,
  37364. startColumn: e.colorInfo.range.startColumn,
  37365. endLineNumber: e.colorInfo.range.endLineNumber,
  37366. endColumn: e.colorInfo.range.endColumn
  37367. }, options: c.ModelDecorationOptions.EMPTY
  37368. }
  37369. }));
  37370. this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, n), this._colorDatas = new Map, this._decorationsIds.forEach((function (n, i) {
  37371. return t._colorDatas.set(n, e[i])
  37372. }))
  37373. }, t.prototype.updateColorDecorators = function (e) {
  37374. for (var t = this, n = [], o = {}, r = 0; r < e.length && n.length < 500; r++) {
  37375. var a = e[r].colorInfo.color, l = a.red, u = a.green, d = a.blue, c = a.alpha,
  37376. h = new i.RGBA(Math.round(255 * l), Math.round(255 * u), Math.round(255 * d), c),
  37377. p = s.hash(h).toString(16), g = "rgba(" + h.r + ", " + h.g + ", " + h.b + ", " + h.a + ")",
  37378. f = "colorBox-" + p
  37379. ;this._decorationsTypes.has(f) || o[f] || this._codeEditorService.registerDecorationType(f, {
  37380. before: {
  37381. contentText: " ",
  37382. border: "solid 0.1em #000",
  37383. margin: "0.1em 0.2em 0 0.2em",
  37384. width: "0.8em",
  37385. height: "0.8em",
  37386. backgroundColor: g
  37387. }, dark: {before: {border: "solid 0.1em #eee"}}
  37388. }, void 0, this._editor), o[f] = !0, n.push({
  37389. range: {
  37390. startLineNumber: e[r].colorInfo.range.startLineNumber,
  37391. startColumn: e[r].colorInfo.range.startColumn,
  37392. endLineNumber: e[r].colorInfo.range.endLineNumber,
  37393. endColumn: e[r].colorInfo.range.endColumn
  37394. }, options: this._codeEditorService.resolveDecorationOptions(f, !0)
  37395. })
  37396. }
  37397. this._decorationsTypes.forEach((function (e) {
  37398. o[e] || t._codeEditorService.removeDecorationType(e)
  37399. })), this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, n)
  37400. }, t.prototype.removeAllDecorations = function () {
  37401. var e = this;
  37402. this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, []), this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, []), this._decorationsTypes.forEach((function (t) {
  37403. e._codeEditorService.removeDecorationType(t)
  37404. }))
  37405. }, t.prototype.getColorData = function (e) {
  37406. var t = this, n = this._editor.getModel();
  37407. if (!n) return null;
  37408. var i = n.getDecorationsInRange(d.Range.fromPositions(e, e)).filter((function (e) {
  37409. return t._colorDatas.has(e.id)
  37410. }));
  37411. return 0 === i.length ? null : this._colorDatas.get(i[0].id)
  37412. }, t.ID = "editor.contrib.colorDetector", t.RECOMPUTE_TIME = 1e3, t = h([g(1, u.ICodeEditorService), g(2, m.IConfigurationService)], t)
  37413. }(a.Disposable);
  37414. t.ColorDetector = v, l.registerEditorContribution(v.ID, v)
  37415. })), define(n[530], i([0, 1, 434, 36, 12, 23, 196, 376]), (function (e, t, n, i, o, s, a, l) {
  37416. "use strict";
  37417. Object.defineProperty(t, "__esModule", {value: !0});
  37418. var u = function (e) {
  37419. function t(t, n) {
  37420. var i = e.call(this, n) || this;
  37421. return i._type = t, i
  37422. }
  37423. return r(t, e), t.prototype.run = function (e, t) {
  37424. if (t.hasModel()) {
  37425. for (var n = t.getModel(), i = [], o = t.getSelections(), r = n.getOptions(), s = t.getOption(13), a = 0, u = o; a < u.length; a++) {
  37426. var d = u[a];
  37427. i.push(new l.LineCommentCommand(d, r.tabSize, this._type, s.insertSpace))
  37428. }
  37429. t.pushUndoStop(), t.executeCommands(this.id, i),
  37430. t.pushUndoStop()
  37431. }
  37432. }, t
  37433. }(o.EditorAction), d = function (e) {
  37434. function t() {
  37435. return e.call(this, 0, {
  37436. id: "editor.action.commentLine",
  37437. label: n.localize(0, null),
  37438. alias: "Toggle Line Comment",
  37439. precondition: s.EditorContextKeys.writable,
  37440. kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: 2133, weight: 100},
  37441. menuOpts: {menuId: 17, group: "5_insert", title: n.localize(1, null), order: 1}
  37442. }) || this
  37443. }
  37444. return r(t, e), t
  37445. }(u), c = function (e) {
  37446. function t() {
  37447. return e.call(this, 1, {
  37448. id: "editor.action.addCommentLine",
  37449. label: n.localize(2, null),
  37450. alias: "Add Line Comment",
  37451. precondition: s.EditorContextKeys.writable,
  37452. kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: i.KeyChord(2089, 2081), weight: 100}
  37453. }) || this
  37454. }
  37455. return r(t, e), t
  37456. }(u), h = function (e) {
  37457. function t() {
  37458. return e.call(this, 2, {
  37459. id: "editor.action.removeCommentLine",
  37460. label: n.localize(3, null),
  37461. alias: "Remove Line Comment",
  37462. precondition: s.EditorContextKeys.writable,
  37463. kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: i.KeyChord(2089, 2099), weight: 100}
  37464. }) || this
  37465. }
  37466. return r(t, e), t
  37467. }(u), p = function (e) {
  37468. function t() {
  37469. return e.call(this, {
  37470. id: "editor.action.blockComment",
  37471. label: n.localize(4, null),
  37472. alias: "Toggle Block Comment",
  37473. precondition: s.EditorContextKeys.writable,
  37474. kbOpts: {
  37475. kbExpr: s.EditorContextKeys.editorTextFocus,
  37476. primary: 1567,
  37477. linux: {primary: 3103},
  37478. weight: 100
  37479. },
  37480. menuOpts: {menuId: 17, group: "5_insert", title: n.localize(5, null), order: 2}
  37481. }) || this
  37482. }
  37483. return r(t, e), t.prototype.run = function (e, t) {
  37484. if (t.hasModel()) {
  37485. for (var n = t.getOption(13), i = [], o = 0, r = t.getSelections(); o < r.length; o++) {
  37486. var s = r[o];
  37487. i.push(new a.BlockCommentCommand(s, n.insertSpace))
  37488. }
  37489. t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop()
  37490. }
  37491. }, t
  37492. }(o.EditorAction);
  37493. o.registerEditorAction(d), o.registerEditorAction(c), o.registerEditorAction(h), o.registerEditorAction(p)
  37494. })), define(n[531], i([0, 1, 435, 6, 70, 2, 12, 23, 65, 18, 66, 34, 405]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f) {
  37495. "use strict";
  37496. Object.defineProperty(t, "__esModule", {value: !0});
  37497. var m = function () {
  37498. function e(e, t, n, i, o, r) {
  37499. var a = this;
  37500. this._contextMenuService = t, this._contextViewService = n, this._contextKeyService = i, this._keybindingService = o,
  37501. this._menuService = r, this._toDispose = new s.DisposableStore, this._contextMenuIsBeingShownCount = 0, this._editor = e, this._toDispose.add(this._editor.onContextMenu((function (e) {
  37502. return a._onContextMenu(e)
  37503. }))), this._toDispose.add(this._editor.onMouseWheel((function (e) {
  37504. a._contextMenuIsBeingShownCount > 0 && a._contextViewService.hideContextView()
  37505. }))), this._toDispose.add(this._editor.onKeyDown((function (e) {
  37506. 58 === e.keyCode && (e.preventDefault(), e.stopPropagation(), a.showContextMenu())
  37507. })))
  37508. }
  37509. return e.get = function (t) {
  37510. return t.getContribution(e.ID)
  37511. }, e.prototype._onContextMenu = function (e) {
  37512. if (this._editor.hasModel()) {
  37513. if (!this._editor.getOption(14)) return this._editor.focus(), void (e.target.position && !this._editor.getSelection().containsPosition(e.target.position) && this._editor.setPosition(e.target.position));
  37514. if (12 !== e.target.type && (e.event.preventDefault(), 6 === e.target.type || 7 === e.target.type || 1 === e.target.type)) {
  37515. if (this._editor.focus(), e.target.position) {
  37516. for (var t = !1, n = 0, i = this._editor.getSelections(); n < i.length; n++) {
  37517. if (i[n].containsPosition(e.target.position)) {
  37518. t = !0;
  37519. break
  37520. }
  37521. }
  37522. t || this._editor.setPosition(e.target.position)
  37523. }
  37524. var o = null;
  37525. 1 !== e.target.type && (o = {
  37526. x: e.event.posx - 1,
  37527. width: 2,
  37528. y: e.event.posy - 1,
  37529. height: 2
  37530. }), this.showContextMenu(o)
  37531. }
  37532. }
  37533. }, e.prototype.showContextMenu = function (e) {
  37534. if (this._editor.getOption(14) && this._editor.hasModel()) if (this._contextMenuService) {
  37535. var t = this._getMenuActions(this._editor.getModel(), 7);
  37536. t.length > 0 && this._doShowContextMenu(t, e)
  37537. } else this._editor.focus()
  37538. }, e.prototype._getMenuActions = function (e, t) {
  37539. var n = [], i = this._menuService.createMenu(t, this._contextKeyService),
  37540. r = i.getActions({arg: e.uri});
  37541. i.dispose();
  37542. for (var s = 0, a = r; s < a.length; s++) {
  37543. for (var l = 0, d = 0, c = a[s][1]; d < c.length; d++) {
  37544. var h = c[d];
  37545. if (h instanceof u.SubmenuItemAction) {
  37546. var p = this._getMenuActions(e, h.item.submenu);
  37547. p.length > 0 && (n.push(new f.ContextSubMenu(h.label, p)), l++)
  37548. } else n.push(h), l++
  37549. }
  37550. l && n.push(new o.Separator)
  37551. }
  37552. return n.length && n.pop(), n
  37553. }, e.prototype._doShowContextMenu = function (e, t) {
  37554. var n = this;
  37555. if (void 0 === t && (t = null), this._editor.hasModel()) {
  37556. var r = this._editor.getOption(44);
  37557. if (this._editor.updateOptions({hover: {enabled: !1}}), !t) {
  37558. this._editor.revealPosition(this._editor.getPosition(), 1), this._editor.render();
  37559. var s = this._editor.getScrolledVisiblePosition(this._editor.getPosition()),
  37560. a = i.getDomNodePagePosition(this._editor.getDomNode()), l = a.left + s.left,
  37561. u = a.top + s.top + s.height;
  37562. t = {x: l, y: u}
  37563. }
  37564. this._contextMenuIsBeingShownCount++, this._contextMenuService.showContextMenu({
  37565. getAnchor: function () {
  37566. return t
  37567. }, getActions: function () {
  37568. return e
  37569. }, getActionViewItem: function (e) {
  37570. var t = n._keybindingFor(e);
  37571. if (t) return new o.ActionViewItem(e, e, {label: !0, keybinding: t.getLabel(), isMenu: !0});
  37572. var i = e;
  37573. return "function" == typeof i.getActionViewItem ? i.getActionViewItem() : new o.ActionViewItem(e, e, {
  37574. icon: !0,
  37575. label: !0,
  37576. isMenu: !0
  37577. })
  37578. }, getKeyBinding: function (e) {
  37579. return n._keybindingFor(e)
  37580. }, onHide: function (e) {
  37581. n._contextMenuIsBeingShownCount--, n._editor.focus(), n._editor.updateOptions({hover: r})
  37582. }
  37583. })
  37584. }
  37585. }, e.prototype._keybindingFor = function (e) {
  37586. return this._keybindingService.lookupKeybinding(e.id)
  37587. },
  37588. e.prototype.dispose = function () {
  37589. this._contextMenuIsBeingShownCount > 0 && this._contextViewService.hideContextView(), this._toDispose.dispose()
  37590. }, e.ID = "editor.contrib.contextmenu", e = h([g(1, c.IContextMenuService), g(2, c.IContextViewService), g(3, d.IContextKeyService), g(4, p.IKeybindingService), g(5, u.IMenuService)], e)
  37591. }();
  37592. t.ContextMenuController = m;
  37593. var v = function (e) {
  37594. function t() {
  37595. return e.call(this, {
  37596. id: "editor.action.showContextMenu",
  37597. label: n.localize(0, null),
  37598. alias: "Show Editor Context Menu",
  37599. precondition: void 0,
  37600. kbOpts: {kbExpr: l.EditorContextKeys.textInputFocus, primary: 1092, weight: 100}
  37601. }) || this
  37602. }
  37603. return r(t, e), t.prototype.run = function (e, t) {
  37604. m.get(t).showContextMenu()
  37605. }, t
  37606. }(a.EditorAction);
  37607. a.registerEditorContribution(m.ID, m), a.registerEditorAction(v)
  37608. })), define(n[532], i([0, 1, 436, 2, 12, 23]), (function (e, t, n, i, o, s) {
  37609. "use strict";
  37610. Object.defineProperty(t, "__esModule", {value: !0});
  37611. var a = function () {
  37612. function e(e) {
  37613. this.selections = e
  37614. }
  37615. return e.prototype.equals = function (e) {
  37616. var t = this.selections.length;
  37617. if (t !== e.selections.length) return !1
  37618. ;
  37619. for (var n = 0; n < t; n++) if (!this.selections[n].equalsSelection(e.selections[n])) return !1;
  37620. return !0
  37621. }, e
  37622. }(), l = function (e, t, n) {
  37623. this.cursorState = e, this.scrollTop = t, this.scrollLeft = n
  37624. }, u = function (e) {
  37625. function t(t) {
  37626. var n = e.call(this) || this;
  37627. return n._editor = t, n._isCursorUndoRedo = !1, n._undoStack = [], n._redoStack = [], n._register(t.onDidChangeModel((function (e) {
  37628. n._undoStack = [], n._redoStack = []
  37629. }))), n._register(t.onDidChangeModelContent((function (e) {
  37630. n._undoStack = [], n._redoStack = []
  37631. }))), n._register(t.onDidChangeCursorSelection((function (e) {
  37632. if (!n._isCursorUndoRedo && e.oldSelections && e.oldModelVersionId === e.modelVersionId) {
  37633. var i = new a(e.oldSelections);
  37634. n._undoStack.length > 0 && n._undoStack[n._undoStack.length - 1].cursorState.equals(i) || (n._undoStack.push(new l(i, t.getScrollTop(), t.getScrollLeft())), n._redoStack = [], n._undoStack.length > 50 && n._undoStack.shift())
  37635. }
  37636. }))), n
  37637. }
  37638. return r(t, e), t.get = function (e) {
  37639. return e.getContribution(t.ID)
  37640. }, t.prototype.cursorUndo = function () {
  37641. this._editor.hasModel() && 0 !== this._undoStack.length && (this._redoStack.push(new l(new a(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft())), this._applyState(this._undoStack.pop()))
  37642. }, t.prototype.cursorRedo = function () {
  37643. this._editor.hasModel() && 0 !== this._redoStack.length && (this._undoStack.push(new l(new a(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft())), this._applyState(this._redoStack.pop()))
  37644. }, t.prototype._applyState = function (e) {
  37645. this._isCursorUndoRedo = !0, this._editor.setSelections(e.cursorState.selections), this._editor.setScrollPosition({
  37646. scrollTop: e.scrollTop,
  37647. scrollLeft: e.scrollLeft
  37648. }), this._isCursorUndoRedo = !1
  37649. }, t.ID = "editor.contrib.cursorUndoRedoController", t
  37650. }(i.Disposable);
  37651. t.CursorUndoRedoController = u;
  37652. var d = function (e) {
  37653. function t() {
  37654. return e.call(this, {
  37655. id: "cursorUndo",
  37656. label: n.localize(0, null),
  37657. alias: "Cursor Undo",
  37658. precondition: void 0,
  37659. kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 2099, weight: 100}
  37660. }) || this
  37661. }
  37662. return r(t, e),
  37663. t.prototype.run = function (e, t, n) {
  37664. u.get(t).cursorUndo()
  37665. }, t
  37666. }(o.EditorAction);
  37667. t.CursorUndo = d;
  37668. var c = function (e) {
  37669. function t() {
  37670. return e.call(this, {
  37671. id: "cursorRedo",
  37672. label: n.localize(1, null),
  37673. alias: "Cursor Redo",
  37674. precondition: void 0
  37675. }) || this
  37676. }
  37677. return r(t, e), t.prototype.run = function (e, t, n) {
  37678. u.get(t).cursorRedo()
  37679. }, t
  37680. }(o.EditorAction);
  37681. t.CursorRedo = c, o.registerEditorContribution(u.ID, u), o.registerEditorAction(d), o.registerEditorAction(c)
  37682. })), define(n[533], i([0, 1, 2, 16, 12, 13, 3, 22, 377, 30, 307]), (function (e, t, n, i, o, s, a, l, u, d) {
  37683. "use strict";
  37684. function c(e) {
  37685. return i.isMacintosh ? e.altKey : e.ctrlKey
  37686. }
  37687. Object.defineProperty(t, "__esModule", {value: !0});
  37688. var h = function (e) {
  37689. function t(t) {
  37690. var n = e.call(this) || this;
  37691. return n._editor = t, n._register(n._editor.onMouseDown((function (e) {
  37692. return n._onEditorMouseDown(e)
  37693. }))), n._register(n._editor.onMouseUp((function (e) {
  37694. return n._onEditorMouseUp(e)
  37695. }))), n._register(n._editor.onMouseDrag((function (e) {
  37696. return n._onEditorMouseDrag(e)
  37697. }))), n._register(n._editor.onMouseDrop((function (e) {
  37698. return n._onEditorMouseDrop(e)
  37699. }))),
  37700. n._register(n._editor.onKeyDown((function (e) {
  37701. return n.onEditorKeyDown(e)
  37702. }))), n._register(n._editor.onKeyUp((function (e) {
  37703. return n.onEditorKeyUp(e)
  37704. }))), n._register(n._editor.onDidBlurEditorWidget((function () {
  37705. return n.onEditorBlur()
  37706. }))), n._dndDecorationIds = [], n._mouseDown = !1, n._modifierPressed = !1, n._dragSelection = null, n
  37707. }
  37708. return r(t, e), t.prototype.onEditorBlur = function () {
  37709. this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1, this._modifierPressed = !1
  37710. }, t.prototype.onEditorKeyDown = function (e) {
  37711. this._editor.getOption(24) && (c(e) && (this._modifierPressed = !0), this._mouseDown && c(e) && this._editor.updateOptions({mouseStyle: "copy"}))
  37712. }, t.prototype.onEditorKeyUp = function (e) {
  37713. this._editor.getOption(24) && (c(e) && (this._modifierPressed = !1), this._mouseDown && e.keyCode === t.TRIGGER_KEY_VALUE && this._editor.updateOptions({mouseStyle: "default"}))
  37714. }, t.prototype._onEditorMouseDown = function (e) {
  37715. this._mouseDown = !0
  37716. }, t.prototype._onEditorMouseUp = function (e) {
  37717. this._mouseDown = !1, this._editor.updateOptions({mouseStyle: "text"})
  37718. },
  37719. t.prototype._onEditorMouseDrag = function (e) {
  37720. var t = e.target;
  37721. if (null === this._dragSelection) {
  37722. var n = (this._editor.getSelections() || []).filter((function (e) {
  37723. return t.position && e.containsPosition(t.position)
  37724. }));
  37725. if (1 !== n.length) return;
  37726. this._dragSelection = n[0]
  37727. }
  37728. c(e.event) ? this._editor.updateOptions({mouseStyle: "copy"}) : this._editor.updateOptions({mouseStyle: "default"}), t.position && (this._dragSelection.containsPosition(t.position) ? this._removeDecoration() : this.showAt(t.position))
  37729. }, t.prototype._onEditorMouseDrop = function (e) {
  37730. if (e.target && (this._hitContent(e.target) || this._hitMargin(e.target)) && e.target.position) {
  37731. var n = new s.Position(e.target.position.lineNumber, e.target.position.column);
  37732. if (null === this._dragSelection) {
  37733. var i = null;
  37734. if (e.event.shiftKey) {
  37735. var o = this._editor.getSelection();
  37736. if (o) {
  37737. var r = o.selectionStartLineNumber, a = o.selectionStartColumn;
  37738. i = [new l.Selection(r, a, n.lineNumber, n.column)]
  37739. }
  37740. } else i = (this._editor.getSelections() || []).map((function (e) {
  37741. return e.containsPosition(n) ? new l.Selection(n.lineNumber, n.column, n.lineNumber, n.column) : e
  37742. }));
  37743. this._editor.setSelections(i || [], "mouse")
  37744. } else (!this._dragSelection.containsPosition(n) || (c(e.event) || this._modifierPressed) && (this._dragSelection.getEndPosition().equals(n) || this._dragSelection.getStartPosition().equals(n))) && (this._editor.pushUndoStop(), this._editor.executeCommand(t.ID, new u.DragAndDropCommand(this._dragSelection, n, c(e.event) || this._modifierPressed)), this._editor.pushUndoStop())
  37745. }
  37746. this._editor.updateOptions({mouseStyle: "text"}), this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1
  37747. }, t.prototype.showAt = function (e) {
  37748. var n = [{
  37749. range: new a.Range(e.lineNumber, e.column, e.lineNumber, e.column),
  37750. options: t._DECORATION_OPTIONS
  37751. }];
  37752. this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, n), this._editor.revealPosition(e, 1)
  37753. }, t.prototype._removeDecoration = function () {
  37754. this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, [])
  37755. }, t.prototype._hitContent = function (e) {
  37756. return 6 === e.type || 7 === e.type
  37757. }, t.prototype._hitMargin = function (e) {
  37758. return 2 === e.type || 3 === e.type || 4 === e.type
  37759. }, t.prototype.dispose = function () {
  37760. this._removeDecoration(), this._dragSelection = null, this._mouseDown = !1, this._modifierPressed = !1, e.prototype.dispose.call(this)
  37761. }, t.ID = "editor.contrib.dragAndDrop", t.TRIGGER_KEY_VALUE = i.isMacintosh ? 6 : 5, t._DECORATION_OPTIONS = d.ModelDecorationOptions.register({className: "dnd-target"}), t
  37762. }(n.Disposable);
  37763. t.DragAndDropController = h, o.registerEditorContribution(h.ID, h)
  37764. })), define(n[534], i([0, 1, 441, 12, 105]), (function (e, t, n, i, o) {
  37765. "use strict";
  37766. Object.defineProperty(t, "__esModule", {value: !0});
  37767. var s = function (e) {
  37768. function t() {
  37769. return e.call(this, {
  37770. id: "editor.action.fontZoomIn",
  37771. label: n.localize(0, null),
  37772. alias: "Editor Font Zoom In",
  37773. precondition: void 0
  37774. }) || this
  37775. }
  37776. return r(t, e), t.prototype.run = function (e, t) {
  37777. o.EditorZoom.setZoomLevel(o.EditorZoom.getZoomLevel() + 1)
  37778. }, t
  37779. }(i.EditorAction), a = function (e) {
  37780. function t() {
  37781. return e.call(this, {
  37782. id: "editor.action.fontZoomOut", label: n.localize(1, null),
  37783. alias: "Editor Font Zoom Out", precondition: void 0
  37784. }) || this
  37785. }
  37786. return r(t, e), t.prototype.run = function (e, t) {
  37787. o.EditorZoom.setZoomLevel(o.EditorZoom.getZoomLevel() - 1)
  37788. }, t
  37789. }(i.EditorAction), l = function (e) {
  37790. function t() {
  37791. return e.call(this, {
  37792. id: "editor.action.fontZoomReset",
  37793. label: n.localize(2, null),
  37794. alias: "Editor Font Zoom Reset",
  37795. precondition: void 0
  37796. }) || this
  37797. }
  37798. return r(t, e), t.prototype.run = function (e, t) {
  37799. o.EditorZoom.setZoomLevel(0)
  37800. }, t
  37801. }(i.EditorAction);
  37802. i.registerEditorAction(s), i.registerEditorAction(a), i.registerEditorAction(l)
  37803. })), define(n[535], i([0, 1, 50, 19, 26, 10, 25, 67, 108, 13, 3, 22, 17, 62, 49, 198, 442, 479, 11, 76, 29, 21]), (function (e, t, n, i, o, r, s, a, l, u, h, p, g, f, m, v, _, y, C, b, S, w) {
  37804. "use strict";
  37805. function E(e) {
  37806. if ((e = e.filter((function (e) {
  37807. return e.range
  37808. }))).length) {
  37809. for (var t = e[0].range, i = 1; i < e.length; i++) t = h.Range.plusRange(t, e[i].range);
  37810. var o = t.startLineNumber, r = t.endLineNumber
  37811. ;o === r ? 1 === e.length ? n.alert(_.localize(0, null, o)) : n.alert(_.localize(1, null, e.length, o)) : 1 === e.length ? n.alert(_.localize(2, null, o, r)) : n.alert(_.localize(3, null, e.length, o, r))
  37812. }
  37813. }
  37814. function L(e) {
  37815. for (var t = [], n = new Set, i = 0, o = g.DocumentFormattingEditProviderRegistry.ordered(e); i < o.length; i++) {
  37816. var r = o[i];
  37817. t.push(r), r.extensionId && n.add(y.ExtensionIdentifier.toKey(r.extensionId))
  37818. }
  37819. for (var s = function (e) {
  37820. if (e.extensionId) {
  37821. if (n.has(y.ExtensionIdentifier.toKey(e.extensionId))) return "continue";
  37822. n.add(y.ExtensionIdentifier.toKey(e.extensionId))
  37823. }
  37824. t.push({
  37825. displayName: e.displayName,
  37826. extensionId: e.extensionId,
  37827. provideDocumentFormattingEdits: function (t, n, i) {
  37828. return e.provideDocumentRangeFormattingEdits(t, t.getFullModelRange(), n, i)
  37829. }
  37830. })
  37831. }, a = 0, l = g.DocumentRangeFormattingEditProviderRegistry.ordered(e); a < l.length; a++) {
  37832. s(r = l[a])
  37833. }
  37834. return t
  37835. }
  37836. Object.defineProperty(t, "__esModule", {value: !0}), t.alertFormattingEdits = E, t.getRealAndSyntheticDocumentFormattersOrdered = L;
  37837. var D = function () {
  37838. function e() {
  37839. }
  37840. return e.select = function (t, n, i) {
  37841. return d(this, void 0, void 0, (function () {
  37842. var o;
  37843. return c(this, (function (r) {
  37844. switch (r.label) {
  37845. case 0:
  37846. return 0 === t.length ? [2, void 0] : (o = e._selectors.iterator().next().value) ? [4, o(t, n, i)] : [3, 2];
  37847. case 1:
  37848. return [2, r.sent()];
  37849. case 2:
  37850. return [2, t[0]]
  37851. }
  37852. }))
  37853. }))
  37854. }, e._selectors = new b.LinkedList, e
  37855. }();
  37856. function N(e, t, n, i, o) {
  37857. return d(this, void 0, void 0, (function () {
  37858. var r, s, u, d, g, m, _;
  37859. return c(this, (function (c) {
  37860. switch (c.label) {
  37861. case 0:
  37862. r = e.get(f.IEditorWorkerService), l.isCodeEditor(n) ? (s = n.getModel(), u = new a.EditorStateCancellationTokenSource(n, 5, o)) : (s = n, u = new a.TextModelCancellationTokenSource(n, o)), c.label = 1;
  37863. case 1:
  37864. return c.trys.push([1, , 4, 5]), [4, t.provideDocumentRangeFormattingEdits(s, i, s.getFormattingOptions(), u.token)];
  37865. case 2:
  37866. return g = c.sent(), [4, r.computeMoreMinimalEdits(s.uri, g)];
  37867. case 3:
  37868. return d = c.sent(), u.token.isCancellationRequested ? [2, !0] : [3, 5];
  37869. case 4:
  37870. return u.dispose(), [7];
  37871. case 5:
  37872. return d && 0 !== d.length ? (l.isCodeEditor(n) ? (v.FormattingEdit.execute(n, d), E(d), n.pushUndoStop(),
  37873. n.revealPositionInCenterIfOutsideViewport(n.getPosition(), 1)) : (m = d[0].range, _ = new p.Selection(m.startLineNumber, m.startColumn, m.endLineNumber, m.endColumn), s.pushEditOperations([_], d.map((function (e) {
  37874. return {text: e.text, range: h.Range.lift(e.range), forceMoveMarkers: !0}
  37875. })), (function (e) {
  37876. for (var t = 0, n = e; t < n.length; t++) {
  37877. var i = n[t].range;
  37878. if (h.Range.areIntersectingOrTouching(i, _)) return [new p.Selection(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn)]
  37879. }
  37880. return null
  37881. }))), [2, !0]) : [2, !1]
  37882. }
  37883. }))
  37884. }))
  37885. }
  37886. function x(e, t, n, i, o) {
  37887. return d(this, void 0, void 0, (function () {
  37888. var r, s, u, d, g, m, _;
  37889. return c(this, (function (c) {
  37890. switch (c.label) {
  37891. case 0:
  37892. r = e.get(f.IEditorWorkerService), l.isCodeEditor(n) ? (s = n.getModel(), u = new a.EditorStateCancellationTokenSource(n, 5, o)) : (s = n, u = new a.TextModelCancellationTokenSource(n, o)), c.label = 1;
  37893. case 1:
  37894. return c.trys.push([1, , 4, 5]), [4, t.provideDocumentFormattingEdits(s, s.getFormattingOptions(), u.token)];
  37895. case 2:
  37896. return g = c.sent(), [4, r.computeMoreMinimalEdits(s.uri, g)];
  37897. case 3:
  37898. return d = c.sent(),
  37899. u.token.isCancellationRequested ? [2, !0] : [3, 5];
  37900. case 4:
  37901. return u.dispose(), [7];
  37902. case 5:
  37903. return d && 0 !== d.length ? (l.isCodeEditor(n) ? (v.FormattingEdit.execute(n, d), 2 !== i && (E(d), n.pushUndoStop(), n.revealPositionInCenterIfOutsideViewport(n.getPosition(), 1))) : (m = d[0].range, _ = new p.Selection(m.startLineNumber, m.startColumn, m.endLineNumber, m.endColumn), s.pushEditOperations([_], d.map((function (e) {
  37904. return {text: e.text, range: h.Range.lift(e.range), forceMoveMarkers: !0}
  37905. })), (function (e) {
  37906. for (var t = 0, n = e; t < n.length; t++) {
  37907. var i = n[t].range;
  37908. if (h.Range.areIntersectingOrTouching(i, _)) return [new p.Selection(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn)]
  37909. }
  37910. return null
  37911. }))), [2, !0]) : [2, !1]
  37912. }
  37913. }))
  37914. }))
  37915. }
  37916. function I(e, t, n, o, s) {
  37917. return d(this, void 0, void 0, (function () {
  37918. var a, l, u, d, h;
  37919. return c(this, (function (c) {
  37920. switch (c.label) {
  37921. case 0:
  37922. a = g.DocumentRangeFormattingEditProviderRegistry.ordered(t), l = 0, u = a, c.label = 1;
  37923. case 1:
  37924. return l < u.length ? (d = u[l],
  37925. [4, Promise.resolve(d.provideDocumentRangeFormattingEdits(t, n, o, s)).catch(r.onUnexpectedExternalError)]) : [3, 5];
  37926. case 2:
  37927. return h = c.sent(), i.isNonEmptyArray(h) ? [4, e.computeMoreMinimalEdits(t.uri, h)] : [3, 4];
  37928. case 3:
  37929. return [2, c.sent()];
  37930. case 4:
  37931. return l++, [3, 1];
  37932. case 5:
  37933. return [2, void 0]
  37934. }
  37935. }))
  37936. }))
  37937. }
  37938. function M(e, t, n, o) {
  37939. return d(this, void 0, void 0, (function () {
  37940. var s, a, l, u, d;
  37941. return c(this, (function (c) {
  37942. switch (c.label) {
  37943. case 0:
  37944. s = L(t), a = 0, l = s, c.label = 1;
  37945. case 1:
  37946. return a < l.length ? (u = l[a], [4, Promise.resolve(u.provideDocumentFormattingEdits(t, n, o)).catch(r.onUnexpectedExternalError)]) : [3, 5];
  37947. case 2:
  37948. return d = c.sent(), i.isNonEmptyArray(d) ? [4, e.computeMoreMinimalEdits(t.uri, d)] : [3, 4];
  37949. case 3:
  37950. return [2, c.sent()];
  37951. case 4:
  37952. return a++, [3, 1];
  37953. case 5:
  37954. return [2, void 0]
  37955. }
  37956. }))
  37957. }))
  37958. }
  37959. function k(e, t, n, i, s) {
  37960. var a = g.OnTypeFormattingEditProviderRegistry.ordered(t)
  37961. ;
  37962. return 0 === a.length ? Promise.resolve(void 0) : a[0].autoFormatTriggerCharacters.indexOf(i) < 0 ? Promise.resolve(void 0) : Promise.resolve(a[0].provideOnTypeFormattingEdits(t, n, i, s, o.CancellationToken.None)).catch(r.onUnexpectedExternalError).then((function (n) {
  37963. return e.computeMoreMinimalEdits(t.uri, n)
  37964. }))
  37965. }
  37966. t.FormattingConflicts = D, t.formatDocumentRangeWithSelectedProvider = function (e, t, n, i, o) {
  37967. return d(this, void 0, void 0, (function () {
  37968. var r, s, a, u;
  37969. return c(this, (function (d) {
  37970. switch (d.label) {
  37971. case 0:
  37972. return r = e.get(C.IInstantiationService), s = l.isCodeEditor(t) ? t.getModel() : t, a = g.DocumentRangeFormattingEditProviderRegistry.ordered(s), [4, D.select(a, s, i)];
  37973. case 1:
  37974. return (u = d.sent()) ? [4, r.invokeFunction(N, u, t, n, o)] : [3, 3];
  37975. case 2:
  37976. d.sent(), d.label = 3;
  37977. case 3:
  37978. return [2]
  37979. }
  37980. }))
  37981. }))
  37982. }, t.formatDocumentRangeWithProvider = N, t.formatDocumentWithSelectedProvider = function (e, t, n, i) {
  37983. return d(this, void 0, void 0, (function () {
  37984. var o, r, s, a;
  37985. return c(this, (function (u) {
  37986. switch (u.label) {
  37987. case 0:
  37988. return o = e.get(C.IInstantiationService), r = l.isCodeEditor(t) ? t.getModel() : t,
  37989. s = L(r), [4, D.select(s, r, n)];
  37990. case 1:
  37991. return (a = u.sent()) ? [4, o.invokeFunction(x, a, t, n, i)] : [3, 3];
  37992. case 2:
  37993. u.sent(), u.label = 3;
  37994. case 3:
  37995. return [2]
  37996. }
  37997. }))
  37998. }))
  37999. }, t.formatDocumentWithProvider = x, t.getDocumentRangeFormattingEditsUntilResult = I, t.getDocumentFormattingEditsUntilResult = M, t.getOnTypeFormattingEdits = k, S.CommandsRegistry.registerCommand("_executeFormatRangeProvider", (function (e) {
  38000. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  38001. var i = t[0], a = t[1], l = t[2];
  38002. w.assertType(s.URI.isUri(i)), w.assertType(h.Range.isIRange(a));
  38003. var u = e.get(m.IModelService).getModel(i);
  38004. if (!u) throw r.illegalArgument("resource");
  38005. return I(e.get(f.IEditorWorkerService), u, h.Range.lift(a), l, o.CancellationToken.None)
  38006. })), S.CommandsRegistry.registerCommand("_executeFormatDocumentProvider", (function (e) {
  38007. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  38008. var i = t[0], a = t[1];
  38009. w.assertType(s.URI.isUri(i));
  38010. var l = e.get(m.IModelService).getModel(i);
  38011. if (!l) throw r.illegalArgument("resource")
  38012. ;
  38013. return M(e.get(f.IEditorWorkerService), l, a, o.CancellationToken.None)
  38014. })), S.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider", (function (e) {
  38015. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  38016. var i = t[0], o = t[1], a = t[2], l = t[3];
  38017. w.assertType(s.URI.isUri(i)), w.assertType(u.Position.isIPosition(o)), w.assertType("string" == typeof a);
  38018. var d = e.get(m.IModelService).getModel(i);
  38019. if (!d) throw r.illegalArgument("resource");
  38020. return k(e.get(f.IEditorWorkerService), d, u.Position.lift(o), a, l)
  38021. }))
  38022. })), define(n[536], i([0, 1, 19, 26, 36, 2, 12, 32, 79, 3, 23, 17, 62, 535, 198, 443, 29, 18, 11, 10]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E) {
  38023. "use strict";
  38024. Object.defineProperty(t, "__esModule", {value: !0});
  38025. var L = function () {
  38026. function e(e, t) {
  38027. var n = this;
  38028. this._workerService = t, this._callOnDispose = new s.DisposableStore, this._callOnModel = new s.DisposableStore, this._editor = e, this._callOnDispose.add(e.onDidChangeConfiguration((function () {
  38029. return n._update()
  38030. }))), this._callOnDispose.add(e.onDidChangeModel((function () {
  38031. return n._update()
  38032. }))),
  38033. this._callOnDispose.add(e.onDidChangeModelLanguage((function () {
  38034. return n._update()
  38035. }))), this._callOnDispose.add(m.OnTypeFormattingEditProviderRegistry.onDidChange(this._update, this))
  38036. }
  38037. return e.prototype.dispose = function () {
  38038. this._callOnDispose.dispose(), this._callOnModel.dispose()
  38039. }, e.prototype._update = function () {
  38040. var e = this;
  38041. if (this._callOnModel.clear(), this._editor.getOption(39) && this._editor.hasModel()) {
  38042. var t = this._editor.getModel(), n = m.OnTypeFormattingEditProviderRegistry.ordered(t)[0];
  38043. if (n && n.autoFormatTriggerCharacters) {
  38044. for (var i = new u.CharacterSet, o = 0, r = n.autoFormatTriggerCharacters; o < r.length; o++) {
  38045. var s = r[o];
  38046. i.add(s.charCodeAt(0))
  38047. }
  38048. this._callOnModel.add(this._editor.onDidType((function (t) {
  38049. var n = t.charCodeAt(t.length - 1);
  38050. i.has(n) && e._trigger(String.fromCharCode(n))
  38051. })))
  38052. }
  38053. }
  38054. }, e.prototype._trigger = function (e) {
  38055. var t = this;
  38056. if (this._editor.hasModel() && !(this._editor.getSelections().length > 1)) {
  38057. var i = this._editor.getModel(), o = this._editor.getPosition(), r = !1,
  38058. s = this._editor.onDidChangeModelContent((function (e) {
  38059. if (e.isFlush) return r = !0, void s.dispose();
  38060. for (var t = 0, n = e.changes.length; t < n; t++) {
  38061. if (e.changes[t].range.endLineNumber <= o.lineNumber) return r = !0, void s.dispose()
  38062. }
  38063. }));
  38064. _.getOnTypeFormattingEdits(this._workerService, i, o, e, i.getFormattingOptions()).then((function (e) {
  38065. s.dispose(), r || n.isNonEmptyArray(e) && (y.FormattingEdit.execute(t._editor, e), _.alertFormattingEdits(e))
  38066. }), (function (e) {
  38067. throw s.dispose(), e
  38068. }))
  38069. }
  38070. }, e.ID = "editor.contrib.autoFormat", e = h([g(1, v.IEditorWorkerService)], e)
  38071. }(), D = function () {
  38072. function e(e, t) {
  38073. var n = this;
  38074. this.editor = e, this._instantiationService = t, this._callOnDispose = new s.DisposableStore, this._callOnModel = new s.DisposableStore, this._callOnDispose.add(e.onDidChangeConfiguration((function () {
  38075. return n._update()
  38076. }))), this._callOnDispose.add(e.onDidChangeModel((function () {
  38077. return n._update()
  38078. }))), this._callOnDispose.add(e.onDidChangeModelLanguage((function () {
  38079. return n._update()
  38080. }))), this._callOnDispose.add(m.DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update, this))
  38081. }
  38082. return e.prototype.dispose = function () {
  38083. this._callOnDispose.dispose(), this._callOnModel.dispose()
  38084. }, e.prototype._update = function () {
  38085. var e = this;
  38086. this._callOnModel.clear(), this.editor.getOption(38) && this.editor.hasModel() && m.DocumentRangeFormattingEditProviderRegistry.has(this.editor.getModel()) && this._callOnModel.add(this.editor.onDidPaste((function (t) {
  38087. var n = t.range;
  38088. return e._trigger(n)
  38089. })))
  38090. }, e.prototype._trigger = function (e) {
  38091. this.editor.hasModel() && (this.editor.getSelections().length > 1 || this._instantiationService.invokeFunction(_.formatDocumentRangeWithSelectedProvider, this.editor, e, 2, i.CancellationToken.None).catch(E.onUnexpectedError))
  38092. }, e.ID = "editor.contrib.formatOnPaste", e = h([g(1, w.IInstantiationService)], e)
  38093. }(), N = function (e) {
  38094. function t() {
  38095. return e.call(this, {
  38096. id: "editor.action.formatDocument",
  38097. label: C.localize(0, null),
  38098. alias: "Format Document",
  38099. precondition: S.ContextKeyExpr.and(f.EditorContextKeys.writable, f.EditorContextKeys.hasDocumentFormattingProvider),
  38100. kbOpts: {
  38101. kbExpr: S.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus, f.EditorContextKeys.hasDocumentFormattingProvider),
  38102. primary: 1572,
  38103. linux: {primary: 3111},
  38104. weight: 100
  38105. },
  38106. contextMenuOpts: {
  38107. when: f.EditorContextKeys.hasDocumentFormattingProvider,
  38108. group: "1_modification",
  38109. order: 1.3
  38110. }
  38111. }) || this
  38112. }
  38113. return r(t, e), t.prototype.run = function (e, t) {
  38114. return d(this, void 0, void 0, (function () {
  38115. return c(this, (function (n) {
  38116. switch (n.label) {
  38117. case 0:
  38118. return t.hasModel() ? [4, e.get(w.IInstantiationService).invokeFunction(_.formatDocumentWithSelectedProvider, t, 1, i.CancellationToken.None)] : [3, 2];
  38119. case 1:
  38120. n.sent(), n.label = 2;
  38121. case 2:
  38122. return [2]
  38123. }
  38124. }))
  38125. }))
  38126. }, t
  38127. }(a.EditorAction), x = function (e) {
  38128. function t() {
  38129. return e.call(this, {
  38130. id: "editor.action.formatSelection",
  38131. label: C.localize(1, null),
  38132. alias: "Format Selection",
  38133. precondition: S.ContextKeyExpr.and(f.EditorContextKeys.writable, f.EditorContextKeys.hasDocumentSelectionFormattingProvider),
  38134. kbOpts: {
  38135. kbExpr: S.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus, f.EditorContextKeys.hasDocumentSelectionFormattingProvider),
  38136. primary: o.KeyChord(2089, 2084), weight: 100
  38137. },
  38138. contextMenuOpts: {
  38139. when: S.ContextKeyExpr.and(f.EditorContextKeys.hasDocumentSelectionFormattingProvider, f.EditorContextKeys.hasNonEmptySelection),
  38140. group: "1_modification",
  38141. order: 1.31
  38142. }
  38143. }) || this
  38144. }
  38145. return r(t, e), t.prototype.run = function (e, t) {
  38146. return d(this, void 0, void 0, (function () {
  38147. var n, o, r;
  38148. return c(this, (function (s) {
  38149. switch (s.label) {
  38150. case 0:
  38151. return t.hasModel() ? (n = e.get(w.IInstantiationService), o = t.getModel(), (r = t.getSelection()).isEmpty() && (r = new p.Range(r.startLineNumber, 1, r.startLineNumber, o.getLineMaxColumn(r.startLineNumber))), [4, n.invokeFunction(_.formatDocumentRangeWithSelectedProvider, t, r, 1, i.CancellationToken.None)]) : [2];
  38152. case 1:
  38153. return s.sent(), [2]
  38154. }
  38155. }))
  38156. }))
  38157. }, t
  38158. }(a.EditorAction);
  38159. a.registerEditorContribution(L.ID, L), a.registerEditorContribution(D.ID, D), a.registerEditorAction(N), a.registerEditorAction(x), b.CommandsRegistry.registerCommand("editor.action.format", (function (e) {
  38160. return d(void 0, void 0, void 0, (function () {
  38161. var t, n;
  38162. return c(this, (function (i) {
  38163. switch (i.label) {
  38164. case 0:
  38165. return (t = e.get(l.ICodeEditorService).getFocusedCodeEditor()) && t.hasModel() ? (n = e.get(b.ICommandService), t.getSelection().isEmpty() ? [4, n.executeCommand("editor.action.formatDocument")] : [3, 2]) : [2];
  38166. case 1:
  38167. return i.sent(), [3, 4];
  38168. case 2:
  38169. return [4, n.executeCommand("editor.action.formatSelection")];
  38170. case 3:
  38171. i.sent(), i.label = 4;
  38172. case 4:
  38173. return [2]
  38174. }
  38175. }))
  38176. }))
  38177. }))
  38178. })), define(n[224], i([0, 1, 19, 26, 10, 12, 17]), (function (e, t, n, i, o, r, s) {
  38179. "use strict";
  38180. function a(e, t, i, r) {
  38181. var s = i.ordered(e).map((function (n) {
  38182. return Promise.resolve(r(n, e, t)).then(void 0, (function (e) {
  38183. o.onUnexpectedExternalError(e)
  38184. }))
  38185. }));
  38186. return Promise.all(s).then(n.flatten).then(n.coalesce)
  38187. }
  38188. function l(e, t, n) {
  38189. return a(e, t, s.DefinitionProviderRegistry, (function (e, t, i) {
  38190. return e.provideDefinition(t, i, n)
  38191. }))
  38192. }
  38193. function u(e, t, n) {
  38194. return a(e, t, s.DeclarationProviderRegistry, (function (e, t, i) {
  38195. return e.provideDeclaration(t, i, n)
  38196. }))
  38197. }
  38198. function h(e, t, n) {
  38199. return a(e, t, s.ImplementationProviderRegistry, (function (e, t, i) {
  38200. return e.provideImplementation(t, i, n)
  38201. }))
  38202. }
  38203. function p(e, t, n) {
  38204. return a(e, t, s.TypeDefinitionProviderRegistry, (function (e, t, i) {
  38205. return e.provideTypeDefinition(t, i, n)
  38206. }))
  38207. }
  38208. function g(e, t, n, i) {
  38209. var o = this;
  38210. return a(e, t, s.ReferenceProviderRegistry, (function (e, t, r) {
  38211. return d(o, void 0, void 0, (function () {
  38212. var o, s;
  38213. return c(this, (function (a) {
  38214. switch (a.label) {
  38215. case 0:
  38216. return [4, e.provideReferences(t, r, {includeDeclaration: !0}, i)];
  38217. case 1:
  38218. return o = a.sent(), n && o && 2 === o.length ? [4, e.provideReferences(t, r, {includeDeclaration: !1}, i)] : [2, o];
  38219. case 2:
  38220. return (s = a.sent()) && 1 === s.length ? [2, s] : [2, o]
  38221. }
  38222. }))
  38223. }))
  38224. }))
  38225. }
  38226. Object.defineProperty(t, "__esModule", {value: !0}), t.getDefinitionsAtPosition = l, t.getDeclarationsAtPosition = u, t.getImplementationsAtPosition = h, t.getTypeDefinitionsAtPosition = p, t.getReferencesAtPosition = g, r.registerModelAndPositionCommand("_executeDefinitionProvider", (function (e, t) {
  38227. return l(e, t, i.CancellationToken.None)
  38228. })), r.registerModelAndPositionCommand("_executeDeclarationProvider", (function (e, t) {
  38229. return u(e, t, i.CancellationToken.None)
  38230. })),
  38231. r.registerModelAndPositionCommand("_executeImplementationProvider", (function (e, t) {
  38232. return h(e, t, i.CancellationToken.None)
  38233. })), r.registerModelAndPositionCommand("_executeTypeDefinitionProvider", (function (e, t) {
  38234. return p(e, t, i.CancellationToken.None)
  38235. })), r.registerModelAndPositionCommand("_executeReferenceProvider", (function (e, t) {
  38236. return g(e, t, !1, i.CancellationToken.None)
  38237. }))
  38238. })), define(n[537], i([0, 1, 18, 11, 83, 86, 12, 32, 3, 2, 4, 452, 34, 35, 39]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v) {
  38239. "use strict";
  38240. Object.defineProperty(t, "__esModule", {value: !0}), t.ctxHasSymbols = new n.RawContextKey("hasSymbols", !1), t.ISymbolNavigationService = i.createDecorator("ISymbolNavigationService");
  38241. var _ = function () {
  38242. function e(e, n, i, o) {
  38243. this._editorService = n, this._notificationService = i, this._keybindingService = o, this._currentModel = void 0, this._currentIdx = -1, this._ignoreEditorChange = !1, this._ctxHasSymbols = t.ctxHasSymbols.bindTo(e)
  38244. }
  38245. return e.prototype.reset = function () {
  38246. this._ctxHasSymbols.reset(), d.dispose(this._currentState), d.dispose(this._currentMessage),
  38247. this._currentModel = void 0, this._currentIdx = -1
  38248. }, e.prototype.put = function (e) {
  38249. var t = this, n = e.parent.parent;
  38250. if (n.references.length <= 1) this.reset(); else {
  38251. this._currentModel = n, this._currentIdx = n.references.indexOf(e), this._ctxHasSymbols.set(!0), this._showMessage();
  38252. var i = new y(this._editorService), o = i.onDidChange((function (e) {
  38253. if (!t._ignoreEditorChange) {
  38254. var i = t._editorService.getActiveCodeEditor();
  38255. if (i) {
  38256. var o = i.getModel(), r = i.getPosition();
  38257. if (o && r) {
  38258. for (var s = !1, a = !1, l = 0, d = n.references; l < d.length; l++) {
  38259. var c = d[l];
  38260. if (v.isEqual(c.uri, o.uri)) s = !0, a = a || u.Range.containsPosition(c.range, r); else if (s) break
  38261. }
  38262. s && a || t.reset()
  38263. }
  38264. }
  38265. }
  38266. }));
  38267. this._currentState = d.combinedDisposable(i, o)
  38268. }
  38269. }, e.prototype.revealNext = function (e) {
  38270. var t = this;
  38271. if (!this._currentModel) return Promise.resolve();
  38272. this._currentIdx += 1, this._currentIdx %= this._currentModel.references.length;
  38273. var n = this._currentModel.references[this._currentIdx];
  38274. return this._showMessage(), this._ignoreEditorChange = !0, this._editorService.openCodeEditor({
  38275. resource: n.uri, options: {
  38276. selection: u.Range.collapseToStart(n.range), revealInCenterIfOutsideViewport: !0
  38277. }
  38278. }, e).finally((function () {
  38279. t._ignoreEditorChange = !1
  38280. }))
  38281. }, e.prototype._showMessage = function () {
  38282. d.dispose(this._currentMessage);
  38283. var e = this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),
  38284. t = e ? p.localize(0, null, this._currentIdx + 1, this._currentModel.references.length, e.getLabel()) : p.localize(1, null, this._currentIdx + 1, this._currentModel.references.length);
  38285. this._currentMessage = this._notificationService.status(t)
  38286. }, e = h([g(0, n.IContextKeyService), g(1, l.ICodeEditorService), g(2, m.INotificationService), g(3, f.IKeybindingService)], e)
  38287. }();
  38288. o.registerSingleton(t.ISymbolNavigationService, _, !0), a.registerEditorCommand(new (function (e) {
  38289. function n() {
  38290. return e.call(this, {
  38291. id: "editor.gotoNextSymbolFromResult",
  38292. precondition: t.ctxHasSymbols,
  38293. kbOpts: {weight: 100, primary: 70}
  38294. }) || this
  38295. }
  38296. return r(n, e), n.prototype.runEditorCommand = function (e, n) {
  38297. return e.get(t.ISymbolNavigationService).revealNext(n)
  38298. }, n
  38299. }(a.EditorCommand))),
  38300. s.KeybindingsRegistry.registerCommandAndKeybindingRule({
  38301. id: "editor.gotoNextSymbolFromResult.cancel",
  38302. weight: 100,
  38303. when: t.ctxHasSymbols,
  38304. primary: 9,
  38305. handler: function (e) {
  38306. e.get(t.ISymbolNavigationService).reset()
  38307. }
  38308. });
  38309. var y = function () {
  38310. function e(e) {
  38311. this._listener = new Map, this._disposables = new d.DisposableStore, this._onDidChange = new c.Emitter, this.onDidChange = this._onDidChange.event, this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor, this)), this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor, this)), e.listCodeEditors().forEach(this._onDidAddEditor, this)
  38312. }
  38313. return e.prototype.dispose = function () {
  38314. this._disposables.dispose(), this._onDidChange.dispose(), this._listener.forEach(d.dispose)
  38315. }, e.prototype._onDidAddEditor = function (e) {
  38316. var t = this;
  38317. this._listener.set(e, d.combinedDisposable(e.onDidChangeCursorPosition((function (n) {
  38318. return t._onDidChange.fire({editor: e})
  38319. })), e.onDidChangeModelContent((function (n) {
  38320. return t._onDidChange.fire({editor: e})
  38321. }))))
  38322. }, e.prototype._onDidRemoveEditor = function (e) {
  38323. d.dispose(this._listener.get(e)), this._listener.delete(e)
  38324. }, e = h([g(0, l.ICodeEditorService)], e)
  38325. }()
  38326. })), define(n[538], i([0, 1, 19, 26, 10, 12, 17]), (function (e, t, n, i, o, r, s) {
  38327. "use strict";
  38328. function a(e, t, i) {
  38329. var r = s.HoverProviderRegistry.ordered(e).map((function (n) {
  38330. return Promise.resolve(n.provideHover(e, t, i)).then((function (e) {
  38331. return e && (n = void 0 !== (t = e).range, i = void 0 !== t.contents && t.contents && t.contents.length > 0, n && i) ? e : void 0;
  38332. var t, n, i
  38333. }), (function (e) {
  38334. o.onUnexpectedExternalError(e)
  38335. }))
  38336. }));
  38337. return Promise.all(r).then(n.coalesce)
  38338. }
  38339. Object.defineProperty(t, "__esModule", {value: !0}), t.getHover = a, r.registerModelAndPositionCommand("_executeHoverProvider", (function (e, t) {
  38340. return a(e, t, i.CancellationToken.None)
  38341. }))
  38342. })), define(n[539], i([0, 1, 456, 36, 164, 12, 80, 338, 159, 58, 13, 3, 22, 23, 386, 492, 387]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v) {
  38343. "use strict";
  38344. Object.defineProperty(t, "__esModule", {value: !0});
  38345. var _ = function (e) {
  38346. function t(t, n) {
  38347. var i = e.call(this, n) || this;
  38348. return i.down = t, i
  38349. }
  38350. return r(t, e), t.prototype.run = function (e, t) {
  38351. for (var n = [], i = 0, o = t.getSelections() || []; i < o.length; i++) {
  38352. var r = o[i];
  38353. n.push(new f.CopyLinesCommand(r, this.down))
  38354. }
  38355. t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop()
  38356. }, t
  38357. }(s.EditorAction), y = function (e) {
  38358. function t() {
  38359. return e.call(this, !1, {
  38360. id: "editor.action.copyLinesUpAction",
  38361. label: n.localize(0, null),
  38362. alias: "Copy Line Up",
  38363. precondition: g.EditorContextKeys.writable,
  38364. kbOpts: {
  38365. kbExpr: g.EditorContextKeys.editorTextFocus,
  38366. primary: 1552,
  38367. linux: {primary: 3600},
  38368. weight: 100
  38369. },
  38370. menuOpts: {menuId: 25, group: "2_line", title: n.localize(1, null), order: 1}
  38371. }) || this
  38372. }
  38373. return r(t, e), t
  38374. }(_), C = function (e) {
  38375. function t() {
  38376. return e.call(this, !0, {
  38377. id: "editor.action.copyLinesDownAction",
  38378. label: n.localize(2, null),
  38379. alias: "Copy Line Down",
  38380. precondition: g.EditorContextKeys.writable,
  38381. kbOpts: {
  38382. kbExpr: g.EditorContextKeys.editorTextFocus,
  38383. primary: 1554,
  38384. linux: {primary: 3602},
  38385. weight: 100
  38386. },
  38387. menuOpts: {menuId: 25, group: "2_line", title: n.localize(3, null), order: 2}
  38388. }) || this
  38389. }
  38390. return r(t, e), t
  38391. }(_), b = function (e) {
  38392. function t() {
  38393. return e.call(this, {
  38394. id: "editor.action.duplicateSelection",
  38395. label: n.localize(4, null),
  38396. alias: "Duplicate Selection",
  38397. precondition: g.EditorContextKeys.writable,
  38398. menuOpts: {menuId: 25, group: "2_line", title: n.localize(5, null), order: 5}
  38399. }) || this
  38400. }
  38401. return r(t, e), t.prototype.run = function (e, t, n) {
  38402. if (t.hasModel()) {
  38403. for (var i = [], o = t.getSelections(), r = t.getModel(), s = 0, l = o; s < l.length; s++) {
  38404. var u = l[s];
  38405. if (u.isEmpty()) i.push(new f.CopyLinesCommand(u, !0)); else {
  38406. var d = new p.Selection(u.endLineNumber, u.endColumn, u.endLineNumber, u.endColumn);
  38407. i.push(new a.ReplaceCommandThatSelectsText(d, r.getValueInRange(u)))
  38408. }
  38409. }
  38410. t.pushUndoStop(), t.executeCommands(this.id, i), t.pushUndoStop()
  38411. }
  38412. }, t
  38413. }(s.EditorAction);
  38414. t.DuplicateSelectionAction = b;
  38415. var S = function (e) {
  38416. function t(t, n) {
  38417. var i = e.call(this, n) || this;
  38418. return i.down = t, i
  38419. }
  38420. return r(t, e), t.prototype.run = function (e, t) {
  38421. for (var n = [], i = t.getSelections() || [], o = t.getOption(8), r = 0, s = i; r < s.length; r++) {
  38422. var a = s[r];
  38423. n.push(new m.MoveLinesCommand(a, this.down, o))
  38424. }
  38425. t.pushUndoStop(), t.executeCommands(this.id, n), t.pushUndoStop()
  38426. }, t
  38427. }(s.EditorAction), w = function (e) {
  38428. function t() {
  38429. return e.call(this, !1, {
  38430. id: "editor.action.moveLinesUpAction",
  38431. label: n.localize(6, null),
  38432. alias: "Move Line Up",
  38433. precondition: g.EditorContextKeys.writable,
  38434. kbOpts: {
  38435. kbExpr: g.EditorContextKeys.editorTextFocus,
  38436. primary: 528,
  38437. linux: {primary: 528},
  38438. weight: 100
  38439. },
  38440. menuOpts: {menuId: 25, group: "2_line", title: n.localize(7, null), order: 3}
  38441. }) || this
  38442. }
  38443. return r(t, e), t
  38444. }(S), E = function (e) {
  38445. function t() {
  38446. return e.call(this, !0, {
  38447. id: "editor.action.moveLinesDownAction",
  38448. label: n.localize(8, null),
  38449. alias: "Move Line Down",
  38450. precondition: g.EditorContextKeys.writable,
  38451. kbOpts: {
  38452. kbExpr: g.EditorContextKeys.editorTextFocus,
  38453. primary: 530,
  38454. linux: {primary: 530},
  38455. weight: 100
  38456. },
  38457. menuOpts: {menuId: 25, group: "2_line", title: n.localize(9, null), order: 4}
  38458. }) || this
  38459. }
  38460. return r(t, e), t
  38461. }(S), L = function (e) {
  38462. function t(t, n) {
  38463. var i = e.call(this, n) || this;
  38464. return i.descending = t, i
  38465. }
  38466. return r(t, e), t.prototype.run = function (e, t) {
  38467. for (var n = t.getSelections() || [], i = 0, o = n; i < o.length; i++) {
  38468. var r = o[i];
  38469. if (!v.SortLinesCommand.canRun(t.getModel(), r, this.descending)) return
  38470. }
  38471. for (var s = [], a = 0, l = n.length; a < l; a++) s[a] = new v.SortLinesCommand(n[a], this.descending);
  38472. t.pushUndoStop(), t.executeCommands(this.id, s), t.pushUndoStop()
  38473. }, t
  38474. }(s.EditorAction);
  38475. t.AbstractSortLinesAction = L;
  38476. var D = function (e) {
  38477. function t() {
  38478. return e.call(this, !1, {
  38479. id: "editor.action.sortLinesAscending",
  38480. label: n.localize(10, null),
  38481. alias: "Sort Lines Ascending",
  38482. precondition: g.EditorContextKeys.writable
  38483. }) || this
  38484. }
  38485. return r(t, e), t
  38486. }(L);
  38487. t.SortLinesAscendingAction = D;
  38488. var N = function (e) {
  38489. function t() {
  38490. return e.call(this, !0, {
  38491. id: "editor.action.sortLinesDescending",
  38492. label: n.localize(11, null),
  38493. alias: "Sort Lines Descending",
  38494. precondition: g.EditorContextKeys.writable
  38495. }) || this
  38496. }
  38497. return r(t, e), t
  38498. }(L);
  38499. t.SortLinesDescendingAction = N;
  38500. var x = function (e) {
  38501. function t() {
  38502. return e.call(this, {
  38503. id: t.ID,
  38504. label: n.localize(12, null),
  38505. alias: "Trim Trailing Whitespace",
  38506. precondition: g.EditorContextKeys.writable,
  38507. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: i.KeyChord(2089, 2102), weight: 100}
  38508. }) || this
  38509. }
  38510. return r(t, e), t.prototype.run = function (e, t, n) {
  38511. var i = []
  38512. ;"auto-save" === n.reason && (i = (t.getSelections() || []).map((function (e) {
  38513. return new c.Position(e.positionLineNumber, e.positionColumn)
  38514. })));
  38515. var o = t.getSelection();
  38516. if (null !== o) {
  38517. var r = new l.TrimTrailingWhitespaceCommand(o, i);
  38518. t.pushUndoStop(), t.executeCommands(this.id, [r]), t.pushUndoStop()
  38519. }
  38520. }, t.ID = "editor.action.trimTrailingWhitespace", t
  38521. }(s.EditorAction);
  38522. t.TrimTrailingWhitespaceAction = x;
  38523. var I = function (e) {
  38524. function t() {
  38525. return e.call(this, {
  38526. id: "editor.action.deleteLines",
  38527. label: n.localize(13, null),
  38528. alias: "Delete Line",
  38529. precondition: g.EditorContextKeys.writable,
  38530. kbOpts: {kbExpr: g.EditorContextKeys.textInputFocus, primary: 3113, weight: 100}
  38531. }) || this
  38532. }
  38533. return r(t, e), t.prototype.run = function (e, t) {
  38534. if (t.hasModel()) {
  38535. var n = this._getLinesToRemove(t), i = t.getModel();
  38536. if (1 !== i.getLineCount() || 1 !== i.getLineMaxColumn(1)) {
  38537. for (var o = 0, r = [], s = [], a = 0, l = n.length; a < l; a++) {
  38538. var u = n[a], c = u.startLineNumber, h = u.endLineNumber, g = 1, f = i.getLineMaxColumn(h);
  38539. h < i.getLineCount() ? (h += 1, f = 1) : c > 1 && (c -= 1, g = i.getLineMaxColumn(c)),
  38540. r.push(d.EditOperation.replace(new p.Selection(c, g, h, f), "")), s.push(new p.Selection(c - o, u.positionColumn, c - o, u.positionColumn)), o += u.endLineNumber - u.startLineNumber + 1
  38541. }
  38542. t.pushUndoStop(), t.executeEdits(this.id, r, s), t.pushUndoStop()
  38543. }
  38544. }
  38545. }, t.prototype._getLinesToRemove = function (e) {
  38546. var t = e.getSelections().map((function (e) {
  38547. var t = e.endLineNumber;
  38548. return e.startLineNumber < e.endLineNumber && 1 === e.endColumn && (t -= 1), {
  38549. startLineNumber: e.startLineNumber,
  38550. selectionStartColumn: e.selectionStartColumn,
  38551. endLineNumber: t,
  38552. positionColumn: e.positionColumn
  38553. }
  38554. }));
  38555. t.sort((function (e, t) {
  38556. return e.startLineNumber === t.startLineNumber ? e.endLineNumber - t.endLineNumber : e.startLineNumber - t.startLineNumber
  38557. }));
  38558. for (var n = [], i = t[0], o = 1; o < t.length; o++) i.endLineNumber + 1 >= t[o].startLineNumber ? i.endLineNumber = t[o].endLineNumber : (n.push(i), i = t[o]);
  38559. return n.push(i), n
  38560. }, t
  38561. }(s.EditorAction);
  38562. t.DeleteLinesAction = I;
  38563. var M = function (e) {
  38564. function t() {
  38565. return e.call(this, {
  38566. id: "editor.action.indentLines",
  38567. label: n.localize(14, null),
  38568. alias: "Indent Line",
  38569. precondition: g.EditorContextKeys.writable,
  38570. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 2137, weight: 100}
  38571. }) || this
  38572. }
  38573. return r(t, e), t.prototype.run = function (e, t) {
  38574. var n = t._getCursors();
  38575. n && (t.pushUndoStop(), t.executeCommands(this.id, u.TypeOperations.indent(n.context.config, t.getModel(), t.getSelections())), t.pushUndoStop())
  38576. }, t
  38577. }(s.EditorAction);
  38578. t.IndentLinesAction = M;
  38579. var k = function (e) {
  38580. function t() {
  38581. return e.call(this, {
  38582. id: "editor.action.outdentLines",
  38583. label: n.localize(15, null),
  38584. alias: "Outdent Line",
  38585. precondition: g.EditorContextKeys.writable,
  38586. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 2135, weight: 100}
  38587. }) || this
  38588. }
  38589. return r(t, e), t.prototype.run = function (e, t) {
  38590. o.CoreEditingCommands.Outdent.runEditorCommand(e, t, null)
  38591. }, t
  38592. }(s.EditorAction), T = function (e) {
  38593. function t() {
  38594. return e.call(this, {
  38595. id: "editor.action.insertLineBefore",
  38596. label: n.localize(16, null),
  38597. alias: "Insert Line Above",
  38598. precondition: g.EditorContextKeys.writable,
  38599. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 3075, weight: 100}
  38600. }) || this
  38601. }
  38602. return r(t, e), t.prototype.run = function (e, t) {
  38603. var n = t._getCursors();
  38604. n && (t.pushUndoStop(), t.executeCommands(this.id, u.TypeOperations.lineInsertBefore(n.context.config, t.getModel(), t.getSelections())))
  38605. }, t
  38606. }(s.EditorAction);
  38607. t.InsertLineBeforeAction = T;
  38608. var R = function (e) {
  38609. function t() {
  38610. return e.call(this, {
  38611. id: "editor.action.insertLineAfter",
  38612. label: n.localize(17, null),
  38613. alias: "Insert Line Below",
  38614. precondition: g.EditorContextKeys.writable,
  38615. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 2051, weight: 100}
  38616. }) || this
  38617. }
  38618. return r(t, e), t.prototype.run = function (e, t) {
  38619. var n = t._getCursors();
  38620. n && (t.pushUndoStop(), t.executeCommands(this.id, u.TypeOperations.lineInsertAfter(n.context.config, t.getModel(), t.getSelections())))
  38621. }, t
  38622. }(s.EditorAction);
  38623. t.InsertLineAfterAction = R;
  38624. var O = function (e) {
  38625. function t() {
  38626. return null !== e && e.apply(this, arguments) || this
  38627. }
  38628. return r(t, e), t.prototype.run = function (e, t) {
  38629. if (t.hasModel()) {
  38630. for (var n = t.getSelection(), i = this._getRangesToDelete(t), o = [], r = 0, s = i.length - 1; r < s; r++) {
  38631. var a = i[r], l = i[r + 1]
  38632. ;null === h.Range.intersectRanges(a, l) ? o.push(a) : i[r + 1] = h.Range.plusRange(a, l)
  38633. }
  38634. o.push(i[i.length - 1]);
  38635. var u = this._getEndCursorState(n, o), c = o.map((function (e) {
  38636. return d.EditOperation.replace(e, "")
  38637. }));
  38638. t.pushUndoStop(), t.executeEdits(this.id, c, u), t.pushUndoStop()
  38639. }
  38640. }, t
  38641. }(s.EditorAction);
  38642. t.AbstractDeleteAllToBoundaryAction = O;
  38643. var P = function (e) {
  38644. function t() {
  38645. return e.call(this, {
  38646. id: "deleteAllLeft",
  38647. label: n.localize(18, null),
  38648. alias: "Delete All Left",
  38649. precondition: g.EditorContextKeys.writable,
  38650. kbOpts: {kbExpr: g.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 2049}, weight: 100}
  38651. }) || this
  38652. }
  38653. return r(t, e), t.prototype._getEndCursorState = function (e, t) {
  38654. var n = null, i = [], o = 0;
  38655. return t.forEach((function (t) {
  38656. var r;
  38657. if (1 === t.endColumn && o > 0) {
  38658. var s = t.startLineNumber - o;
  38659. r = new p.Selection(s, t.startColumn, s, t.startColumn)
  38660. } else r = new p.Selection(t.startLineNumber, t.startColumn, t.startLineNumber, t.startColumn);
  38661. o += t.endLineNumber - t.startLineNumber, t.intersectRanges(e) ? n = r : i.push(r)
  38662. })), n && i.unshift(n), i
  38663. }, t.prototype._getRangesToDelete = function (e) {
  38664. var t = e.getSelections();
  38665. if (null === t) return [];
  38666. var n = t, i = e.getModel();
  38667. return null === i ? [] : (n.sort(h.Range.compareRangesUsingStarts), n = n.map((function (e) {
  38668. if (e.isEmpty()) {
  38669. if (1 === e.startColumn) {
  38670. var t = Math.max(1, e.startLineNumber - 1),
  38671. n = 1 === e.startLineNumber ? 1 : i.getLineContent(t).length + 1;
  38672. return new h.Range(t, n, e.startLineNumber, 1)
  38673. }
  38674. return new h.Range(e.startLineNumber, 1, e.startLineNumber, e.startColumn)
  38675. }
  38676. return new h.Range(e.startLineNumber, 1, e.endLineNumber, e.endColumn)
  38677. })))
  38678. }, t
  38679. }(O);
  38680. t.DeleteAllLeftAction = P;
  38681. var A = function (e) {
  38682. function t() {
  38683. return e.call(this, {
  38684. id: "deleteAllRight",
  38685. label: n.localize(19, null),
  38686. alias: "Delete All Right",
  38687. precondition: g.EditorContextKeys.writable,
  38688. kbOpts: {
  38689. kbExpr: g.EditorContextKeys.textInputFocus,
  38690. primary: 0,
  38691. mac: {primary: 297, secondary: [2068]},
  38692. weight: 100
  38693. }
  38694. }) || this
  38695. }
  38696. return r(t, e), t.prototype._getEndCursorState = function (e, t) {
  38697. for (var n = null, i = [], o = 0, r = t.length; o < r; o++) {
  38698. var s = t[o],
  38699. a = new p.Selection(s.startLineNumber - 0, s.startColumn, s.startLineNumber - 0, s.startColumn);
  38700. s.intersectRanges(e) ? n = a : i.push(a)
  38701. }
  38702. return n && i.unshift(n), i
  38703. }, t.prototype._getRangesToDelete = function (e) {
  38704. var t = e.getModel();
  38705. if (null === t) return [];
  38706. var n = e.getSelections();
  38707. if (null === n) return [];
  38708. var i = n.map((function (e) {
  38709. if (e.isEmpty()) {
  38710. var n = t.getLineMaxColumn(e.startLineNumber);
  38711. return e.startColumn === n ? new h.Range(e.startLineNumber, e.startColumn, e.startLineNumber + 1, 1) : new h.Range(e.startLineNumber, e.startColumn, e.startLineNumber, n)
  38712. }
  38713. return e
  38714. }));
  38715. return i.sort(h.Range.compareRangesUsingStarts), i
  38716. }, t
  38717. }(O);
  38718. t.DeleteAllRightAction = A;
  38719. var F = function (e) {
  38720. function t() {
  38721. return e.call(this, {
  38722. id: "editor.action.joinLines",
  38723. label: n.localize(20, null),
  38724. alias: "Join Lines",
  38725. precondition: g.EditorContextKeys.writable,
  38726. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 0, mac: {primary: 296}, weight: 100}
  38727. }) || this
  38728. }
  38729. return r(t, e), t.prototype.run = function (e, t) {
  38730. var n = t.getSelections();
  38731. if (null !== n) {
  38732. var i = t.getSelection();
  38733. if (null !== i) {
  38734. n.sort(h.Range.compareRangesUsingStarts);
  38735. var o = [], r = n.reduce((function (e, t) {
  38736. return e.isEmpty() ? e.endLineNumber === t.startLineNumber ? (i.equalsSelection(e) && (i = t), t) : t.startLineNumber > e.endLineNumber + 1 ? (o.push(e), t) : new p.Selection(e.startLineNumber, e.startColumn, t.endLineNumber, t.endColumn) : t.startLineNumber > e.endLineNumber ? (o.push(e), t) : new p.Selection(e.startLineNumber, e.startColumn, t.endLineNumber, t.endColumn)
  38737. }));
  38738. o.push(r);
  38739. var s = t.getModel();
  38740. if (null !== s) {
  38741. for (var a = [], l = [], u = i, c = 0, g = 0, f = o.length; g < f; g++) {
  38742. var m = o[g], v = m.startLineNumber, _ = 0, y = void 0, C = void 0,
  38743. b = s.getLineContent(m.endLineNumber).length - m.endColumn;
  38744. if (m.isEmpty() || m.startLineNumber === m.endLineNumber) {
  38745. var S = m.getStartPosition();
  38746. S.lineNumber < s.getLineCount() ? (y = v + 1, C = s.getLineMaxColumn(y)) : (y = S.lineNumber, C = s.getLineMaxColumn(S.lineNumber))
  38747. } else y = m.endLineNumber, C = s.getLineMaxColumn(y);
  38748. for (var w = s.getLineContent(v), E = v + 1; E <= y; E++) {
  38749. var L = s.getLineContent(E), D = s.getLineFirstNonWhitespaceColumn(E);
  38750. if (D >= 1) {
  38751. var N = !0;
  38752. "" === w && (N = !1), !N || " " !== w.charAt(w.length - 1) && "\t" !== w.charAt(w.length - 1) || (N = !1,
  38753. w = w.replace(/[\s\uFEFF\xA0]+$/g, " "));
  38754. var x = L.substr(D - 1);
  38755. w += (N ? " " : "") + x, _ = N ? x.length + 1 : x.length
  38756. } else _ = 0
  38757. }
  38758. var I = new h.Range(v, 1, y, C);
  38759. if (!I.isEmpty()) {
  38760. var M = void 0;
  38761. m.isEmpty() ? (a.push(d.EditOperation.replace(I, w)), M = new p.Selection(I.startLineNumber - c, w.length - _ + 1, v - c, w.length - _ + 1)) : m.startLineNumber === m.endLineNumber ? (a.push(d.EditOperation.replace(I, w)), M = new p.Selection(m.startLineNumber - c, m.startColumn, m.endLineNumber - c, m.endColumn)) : (a.push(d.EditOperation.replace(I, w)), M = new p.Selection(m.startLineNumber - c, m.startColumn, m.startLineNumber - c, w.length - b)), null !== h.Range.intersectRanges(I, i) ? u = M : l.push(M)
  38762. }
  38763. c += I.endLineNumber - I.startLineNumber
  38764. }
  38765. l.unshift(u), t.pushUndoStop(), t.executeEdits(this.id, a, l), t.pushUndoStop()
  38766. }
  38767. }
  38768. }
  38769. }, t
  38770. }(s.EditorAction);
  38771. t.JoinLinesAction = F;
  38772. var W = function (e) {
  38773. function t() {
  38774. return e.call(this, {
  38775. id: "editor.action.transpose",
  38776. label: n.localize(21, null),
  38777. alias: "Transpose characters around the cursor",
  38778. precondition: g.EditorContextKeys.writable
  38779. }) || this
  38780. }
  38781. return r(t, e), t.prototype.run = function (e, t) {
  38782. var n = t.getSelections();
  38783. if (null !== n) {
  38784. var i = t.getModel();
  38785. if (null !== i) {
  38786. for (var o = [], r = 0, s = n.length; r < s; r++) {
  38787. var l = n[r];
  38788. if (l.isEmpty()) {
  38789. var u = l.getStartPosition(), d = i.getLineMaxColumn(u.lineNumber);
  38790. if (u.column >= d) {
  38791. if (u.lineNumber === i.getLineCount()) continue;
  38792. var c = new h.Range(u.lineNumber, Math.max(1, u.column - 1), u.lineNumber + 1, 1),
  38793. g = i.getValueInRange(c).split("").reverse().join("");
  38794. o.push(new a.ReplaceCommand(new p.Selection(u.lineNumber, Math.max(1, u.column - 1), u.lineNumber + 1, 1), g))
  38795. } else {
  38796. c = new h.Range(u.lineNumber, Math.max(1, u.column - 1), u.lineNumber, u.column + 1), g = i.getValueInRange(c).split("").reverse().join("");
  38797. o.push(new a.ReplaceCommandThatPreservesSelection(c, g, new p.Selection(u.lineNumber, u.column + 1, u.lineNumber, u.column + 1)))
  38798. }
  38799. }
  38800. }
  38801. t.pushUndoStop(), t.executeCommands(this.id, o), t.pushUndoStop()
  38802. }
  38803. }
  38804. }, t
  38805. }(s.EditorAction);
  38806. t.TransposeAction = W;
  38807. var B = function (e) {
  38808. function t() {
  38809. return null !== e && e.apply(this, arguments) || this
  38810. }
  38811. return r(t, e), t.prototype.run = function (e, t) {
  38812. var n = t.getSelections();
  38813. if (null !== n) {
  38814. var i = t.getModel()
  38815. ;
  38816. if (null !== i) {
  38817. for (var o = t.getOption(96), r = [], s = 0, l = n.length; s < l; s++) {
  38818. var u = n[s];
  38819. if (u.isEmpty()) {
  38820. var d = u.getStartPosition(), c = i.getWordAtPosition(d);
  38821. if (!c) continue;
  38822. var g = new h.Range(d.lineNumber, c.startColumn, d.lineNumber, c.endColumn),
  38823. f = i.getValueInRange(g);
  38824. r.push(new a.ReplaceCommandThatPreservesSelection(g, this._modifyText(f, o), new p.Selection(d.lineNumber, d.column, d.lineNumber, d.column)))
  38825. } else {
  38826. f = i.getValueInRange(u);
  38827. r.push(new a.ReplaceCommandThatPreservesSelection(u, this._modifyText(f, o), u))
  38828. }
  38829. }
  38830. t.pushUndoStop(), t.executeCommands(this.id, r), t.pushUndoStop()
  38831. }
  38832. }
  38833. }, t
  38834. }(s.EditorAction);
  38835. t.AbstractCaseAction = B;
  38836. var V = function (e) {
  38837. function t() {
  38838. return e.call(this, {
  38839. id: "editor.action.transformToUppercase",
  38840. label: n.localize(22, null),
  38841. alias: "Transform to Uppercase",
  38842. precondition: g.EditorContextKeys.writable
  38843. }) || this
  38844. }
  38845. return r(t, e), t.prototype._modifyText = function (e, t) {
  38846. return e.toLocaleUpperCase()
  38847. }, t
  38848. }(B);
  38849. t.UpperCaseAction = V;
  38850. var z = function (e) {
  38851. function t() {
  38852. return e.call(this, {
  38853. id: "editor.action.transformToLowercase",
  38854. label: n.localize(23, null),
  38855. alias: "Transform to Lowercase",
  38856. precondition: g.EditorContextKeys.writable
  38857. }) || this
  38858. }
  38859. return r(t, e), t.prototype._modifyText = function (e, t) {
  38860. return e.toLocaleLowerCase()
  38861. }, t
  38862. }(B);
  38863. t.LowerCaseAction = z;
  38864. var H = function (e) {
  38865. function t() {
  38866. return e.call(this, {
  38867. id: "editor.action.transformToTitlecase",
  38868. label: n.localize(24, null),
  38869. alias: "Transform to Title Case",
  38870. precondition: g.EditorContextKeys.writable
  38871. }) || this
  38872. }
  38873. return r(t, e), t.prototype._modifyText = function (e, t) {
  38874. for (var n = ("\r\n\t " + t).split(""), i = "", o = !0, r = 0; r < e.length; r++) {
  38875. var s = e[r];
  38876. n.indexOf(s) >= 0 ? (o = !0, i += s) : o ? (o = !1, i += s.toLocaleUpperCase()) : i += s.toLocaleLowerCase()
  38877. }
  38878. return i
  38879. }, t
  38880. }(B);
  38881. t.TitleCaseAction = H, s.registerEditorAction(y), s.registerEditorAction(C), s.registerEditorAction(b), s.registerEditorAction(w), s.registerEditorAction(E), s.registerEditorAction(D), s.registerEditorAction(N), s.registerEditorAction(x), s.registerEditorAction(I), s.registerEditorAction(M), s.registerEditorAction(k), s.registerEditorAction(T), s.registerEditorAction(R),
  38882. s.registerEditorAction(P), s.registerEditorAction(A), s.registerEditorAction(F), s.registerEditorAction(W), s.registerEditorAction(V), s.registerEditorAction(z), s.registerEditorAction(H)
  38883. })), define(n[165], i([0, 1, 15, 10, 12, 17, 18, 26]), (function (e, t, n, i, o, r, s, a) {
  38884. "use strict";
  38885. function l(e, t, o, s) {
  38886. var a = r.SignatureHelpProviderRegistry.ordered(e);
  38887. return n.first(a.map((function (n) {
  38888. return function () {
  38889. return Promise.resolve(n.provideSignatureHelp(e, t, s, o)).catch((function (e) {
  38890. return i.onUnexpectedExternalError(e)
  38891. }))
  38892. }
  38893. })))
  38894. }
  38895. Object.defineProperty(t, "__esModule", {value: !0}), t.Context = {
  38896. Visible: new s.RawContextKey("parameterHintsVisible", !1),
  38897. MultipleSignatures: new s.RawContextKey("parameterHintsMultipleSignatures", !1)
  38898. }, t.provideSignatureHelp = l, o.registerDefaultLanguageCommand("_executeSignatureHelpProvider", (function (e, t, n) {
  38899. return d(void 0, void 0, void 0, (function () {
  38900. var i;
  38901. return c(this, (function (o) {
  38902. switch (o.label) {
  38903. case 0:
  38904. return [4, l(e, t, {
  38905. triggerKind: r.SignatureHelpTriggerKind.Invoke,
  38906. isRetrigger: !1,
  38907. triggerCharacter: n.triggerCharacter
  38908. }, a.CancellationToken.None)];
  38909. case 1:
  38910. return (i = o.sent()) ? (setTimeout((function () {
  38911. return i.dispose()
  38912. }), 0), [2, i.value]) : [2, void 0]
  38913. }
  38914. }))
  38915. }))
  38916. }))
  38917. })), define(n[540], i([0, 1, 15, 10, 4, 2, 79, 17, 165]), (function (e, t, n, i, o, s, a, u, h) {
  38918. "use strict";
  38919. var p;
  38920. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  38921. e.Default = {type: 0};
  38922. var t = function (e) {
  38923. this.request = e, this.type = 2
  38924. };
  38925. e.Pending = t;
  38926. var n = function (e) {
  38927. this.hints = e, this.type = 1
  38928. };
  38929. e.Active = n
  38930. }(p || (p = {}));
  38931. var g = function (e) {
  38932. function t(i, r) {
  38933. void 0 === r && (r = t.DEFAULT_DELAY);
  38934. var l = e.call(this) || this;
  38935. return l._onChangedHints = l._register(new o.Emitter), l.onChangedHints = l._onChangedHints.event, l.triggerOnType = !1, l._state = p.Default, l._pendingTriggers = [], l._lastSignatureHelpResult = l._register(new s.MutableDisposable), l.triggerChars = new a.CharacterSet, l.retriggerChars = new a.CharacterSet, l.triggerId = 0, l.editor = i, l.throttledDelayer = new n.Delayer(r), l._register(l.editor.onDidChangeConfiguration((function () {
  38936. return l.onEditorConfigurationChange()
  38937. }))),
  38938. l._register(l.editor.onDidChangeModel((function (e) {
  38939. return l.onModelChanged()
  38940. }))), l._register(l.editor.onDidChangeModelLanguage((function (e) {
  38941. return l.onModelChanged()
  38942. }))), l._register(l.editor.onDidChangeCursorSelection((function (e) {
  38943. return l.onCursorChange(e)
  38944. }))), l._register(l.editor.onDidChangeModelContent((function (e) {
  38945. return l.onModelContentChange()
  38946. }))), l._register(u.SignatureHelpProviderRegistry.onDidChange(l.onModelChanged, l)), l._register(l.editor.onDidType((function (e) {
  38947. return l.onDidType(e)
  38948. }))), l.onEditorConfigurationChange(), l.onModelChanged(), l
  38949. }
  38950. return r(t, e), Object.defineProperty(t.prototype, "state", {
  38951. get: function () {
  38952. return this._state
  38953. }, set: function (e) {
  38954. 2 === this._state.type && this._state.request.cancel(), this._state = e
  38955. }, enumerable: !0, configurable: !0
  38956. }), t.prototype.cancel = function (e) {
  38957. void 0 === e && (e = !1), this.state = p.Default, this.throttledDelayer.cancel(), e || this._onChangedHints.fire(void 0)
  38958. }, t.prototype.trigger = function (e, t) {
  38959. var n = this, o = this.editor.getModel();
  38960. if (o && u.SignatureHelpProviderRegistry.has(o)) {
  38961. var r = ++this.triggerId;
  38962. this._pendingTriggers.push(e), this.throttledDelayer.trigger((function () {
  38963. return n.doTrigger(r)
  38964. }), t).catch(i.onUnexpectedError)
  38965. }
  38966. }, t.prototype.next = function () {
  38967. if (1 === this.state.type) {
  38968. var e = this.state.hints.signatures.length, t = this.state.hints.activeSignature,
  38969. n = t % e == e - 1, i = this.editor.getOption(64).cycle;
  38970. !(e < 2 || n) || i ? this.updateActiveSignature(n && i ? 0 : t + 1) : this.cancel()
  38971. }
  38972. }, t.prototype.previous = function () {
  38973. if (1 === this.state.type) {
  38974. var e = this.state.hints.signatures.length, t = this.state.hints.activeSignature, n = 0 === t,
  38975. i = this.editor.getOption(64).cycle;
  38976. !(e < 2 || n) || i ? this.updateActiveSignature(n && i ? e - 1 : t - 1) : this.cancel()
  38977. }
  38978. }, t.prototype.updateActiveSignature = function (e) {
  38979. 1 === this.state.type && (this.state = new p.Active(l(l({}, this.state.hints), {activeSignature: e})), this._onChangedHints.fire(this.state.hints))
  38980. }, t.prototype.doTrigger = function (e) {
  38981. return d(this, void 0, void 0, (function () {
  38982. var t, o, r, s, a, l, u, d;
  38983. return c(this, (function (c) {
  38984. switch (c.label) {
  38985. case 0:
  38986. if (t = 1 === this.state.type || 2 === this.state.type,
  38987. o = 1 === this.state.type ? this.state.hints : void 0, this.cancel(!0), 0 === this._pendingTriggers.length) return [2, !1];
  38988. if (r = this._pendingTriggers.reduce(f), this._pendingTriggers = [], s = {
  38989. triggerKind: r.triggerKind,
  38990. triggerCharacter: r.triggerCharacter,
  38991. isRetrigger: t,
  38992. activeSignatureHelp: o
  38993. }, !this.editor.hasModel()) return [2, !1];
  38994. a = this.editor.getModel(), l = this.editor.getPosition(), this.state = new p.Pending(n.createCancelablePromise((function (e) {
  38995. return h.provideSignatureHelp(a, l, s, e)
  38996. }))), c.label = 1;
  38997. case 1:
  38998. return c.trys.push([1, 3, , 4]), [4, this.state.request];
  38999. case 2:
  39000. return u = c.sent(), e !== this.triggerId ? (null == u || u.dispose(), [2, !1]) : u && u.value.signatures && 0 !== u.value.signatures.length ? (this.state = new p.Active(u.value), this._lastSignatureHelpResult.value = u, this._onChangedHints.fire(this.state.hints), [2, !0]) : (null == u || u.dispose(), this._lastSignatureHelpResult.clear(), this.cancel(), [2, !1]);
  39001. case 3:
  39002. return d = c.sent(), e === this.triggerId && (this.state = p.Default), i.onUnexpectedError(d), [2, !1];
  39003. case 4:
  39004. return [2]
  39005. }
  39006. }))
  39007. }))
  39008. },
  39009. Object.defineProperty(t.prototype, "isTriggered", {
  39010. get: function () {
  39011. return 1 === this.state.type || 2 === this.state.type || this.throttledDelayer.isTriggered()
  39012. }, enumerable: !0, configurable: !0
  39013. }), t.prototype.onModelChanged = function () {
  39014. this.cancel(), this.triggerChars = new a.CharacterSet, this.retriggerChars = new a.CharacterSet;
  39015. var e = this.editor.getModel();
  39016. if (e) for (var t = 0, n = u.SignatureHelpProviderRegistry.ordered(e); t < n.length; t++) {
  39017. for (var i = n[t], o = 0, r = i.signatureHelpTriggerCharacters || []; o < r.length; o++) {
  39018. var s = r[o];
  39019. this.triggerChars.add(s.charCodeAt(0)), this.retriggerChars.add(s.charCodeAt(0))
  39020. }
  39021. for (var l = 0, d = i.signatureHelpRetriggerCharacters || []; l < d.length; l++) {
  39022. s = d[l];
  39023. this.retriggerChars.add(s.charCodeAt(0))
  39024. }
  39025. }
  39026. }, t.prototype.onDidType = function (e) {
  39027. if (this.triggerOnType) {
  39028. var t = e.length - 1, n = e.charCodeAt(t);
  39029. (this.triggerChars.has(n) || this.isTriggered && this.retriggerChars.has(n)) && this.trigger({
  39030. triggerKind: u.SignatureHelpTriggerKind.TriggerCharacter,
  39031. triggerCharacter: e.charAt(t)
  39032. })
  39033. }
  39034. }, t.prototype.onCursorChange = function (e) {
  39035. "mouse" === e.source ? this.cancel() : this.isTriggered && this.trigger({triggerKind: u.SignatureHelpTriggerKind.ContentChange})
  39036. }, t.prototype.onModelContentChange = function () {
  39037. this.isTriggered && this.trigger({triggerKind: u.SignatureHelpTriggerKind.ContentChange})
  39038. }, t.prototype.onEditorConfigurationChange = function () {
  39039. this.triggerOnType = this.editor.getOption(64).enabled, this.triggerOnType || this.cancel()
  39040. }, t.prototype.dispose = function () {
  39041. this.cancel(!0), e.prototype.dispose.call(this)
  39042. }, t.DEFAULT_DELAY = 120, t
  39043. }(s.Disposable);
  39044. function f(e, t) {
  39045. switch (t.triggerKind) {
  39046. case u.SignatureHelpTriggerKind.Invoke:
  39047. return t;
  39048. case u.SignatureHelpTriggerKind.ContentChange:
  39049. return e;
  39050. case u.SignatureHelpTriggerKind.TriggerCharacter:
  39051. default:
  39052. return t
  39053. }
  39054. }
  39055. t.ParameterHintsModel = g
  39056. })), define(n[541], i([0, 1, 19, 26, 12, 13, 3, 22, 23, 17, 465, 2, 388, 202, 29, 10]), (function (e, t, n, i, o, s, a, l, u, h, p, g, f, m, v, _) {
  39057. "use strict";
  39058. Object.defineProperty(t, "__esModule", {value: !0});
  39059. var y = function () {
  39060. function e(e, t) {
  39061. this.index = e, this.ranges = t
  39062. }
  39063. return e.prototype.mov = function (t) {
  39064. var n = this.index + (t ? 1 : -1);
  39065. if (n < 0 || n >= this.ranges.length) return this;
  39066. var i = new e(n, this.ranges);
  39067. return i.ranges[n].equalsRange(this.ranges[this.index]) ? i.mov(t) : i
  39068. }, e
  39069. }(), C = function () {
  39070. function e(e) {
  39071. this._ignoreSelection = !1, this._editor = e
  39072. }
  39073. return e.get = function (t) {
  39074. return t.getContribution(e.ID)
  39075. }, e.prototype.dispose = function () {
  39076. g.dispose(this._selectionListener)
  39077. }, e.prototype.run = function (e) {
  39078. var t = this;
  39079. if (this._editor.hasModel()) {
  39080. var o = this._editor.getSelections(), r = this._editor.getModel();
  39081. if (h.SelectionRangeRegistry.has(r)) {
  39082. var s = Promise.resolve(void 0);
  39083. return this._state || (s = E(r, o.map((function (e) {
  39084. return e.getPosition()
  39085. })), i.CancellationToken.None).then((function (e) {
  39086. if (n.isNonEmptyArray(e) && e.length === o.length && t._editor.hasModel() && n.equals(t._editor.getSelections(), o, (function (e, t) {
  39087. return e.equalsSelection(t)
  39088. }))) {
  39089. for (var i = function (t) {
  39090. e[t] = e[t].filter((function (e) {
  39091. return e.containsPosition(o[t].getStartPosition()) && e.containsPosition(o[t].getEndPosition())
  39092. })), e[t].unshift(o[t])
  39093. }, r = 0; r < e.length; r++) i(r)
  39094. ;
  39095. t._state = e.map((function (e) {
  39096. return new y(0, e)
  39097. })), g.dispose(t._selectionListener), t._selectionListener = t._editor.onDidChangeCursorPosition((function () {
  39098. t._ignoreSelection || (g.dispose(t._selectionListener), t._state = void 0)
  39099. }))
  39100. }
  39101. }))), s.then((function () {
  39102. if (t._state) {
  39103. t._state = t._state.map((function (t) {
  39104. return t.mov(e)
  39105. }));
  39106. var n = t._state.map((function (e) {
  39107. return l.Selection.fromPositions(e.ranges[e.index].getStartPosition(), e.ranges[e.index].getEndPosition())
  39108. }));
  39109. t._ignoreSelection = !0;
  39110. try {
  39111. t._editor.setSelections(n)
  39112. } finally {
  39113. t._ignoreSelection = !1
  39114. }
  39115. }
  39116. }))
  39117. }
  39118. }
  39119. }, e.ID = "editor.contrib.smartSelectController", e
  39120. }(), b = function (e) {
  39121. function t(t, n) {
  39122. var i = e.call(this, n) || this;
  39123. return i._forward = t, i
  39124. }
  39125. return r(t, e), t.prototype.run = function (e, t) {
  39126. return d(this, void 0, void 0, (function () {
  39127. var e;
  39128. return c(this, (function (n) {
  39129. switch (n.label) {
  39130. case 0:
  39131. return (e = C.get(t)) ? [4, e.run(this._forward)] : [3, 2];
  39132. case 1:
  39133. n.sent(), n.label = 2;
  39134. case 2:
  39135. return [2]
  39136. }
  39137. }))
  39138. }))
  39139. }, t
  39140. }(o.EditorAction), S = function (e) {
  39141. function t() {
  39142. return e.call(this, !0, {
  39143. id: "editor.action.smartSelect.expand",
  39144. label: p.localize(0, null),
  39145. alias: "Expand Selection",
  39146. precondition: void 0,
  39147. kbOpts: {
  39148. kbExpr: u.EditorContextKeys.editorTextFocus,
  39149. primary: 1553,
  39150. mac: {primary: 3345, secondary: [1297]},
  39151. weight: 100
  39152. },
  39153. menuOpts: {menuId: 25, group: "1_basic", title: p.localize(1, null), order: 2}
  39154. }) || this
  39155. }
  39156. return r(t, e), t
  39157. }(b);
  39158. v.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow", "editor.action.smartSelect.expand");
  39159. var w = function (e) {
  39160. function t() {
  39161. return e.call(this, !1, {
  39162. id: "editor.action.smartSelect.shrink",
  39163. label: p.localize(2, null),
  39164. alias: "Shrink Selection",
  39165. precondition: void 0,
  39166. kbOpts: {
  39167. kbExpr: u.EditorContextKeys.editorTextFocus,
  39168. primary: 1551,
  39169. mac: {primary: 3343, secondary: [1295]},
  39170. weight: 100
  39171. },
  39172. menuOpts: {menuId: 25, group: "1_basic", title: p.localize(3, null), order: 3}
  39173. }) || this
  39174. }
  39175. return r(t, e), t
  39176. }(b);
  39177. function E(e, t, i) {
  39178. var o = h.SelectionRangeRegistry.all(e);
  39179. 1 === o.length && o.unshift(new m.BracketSelectionRangeProvider);
  39180. for (var r = [], l = [], u = 0, d = o; u < d.length; u++) {
  39181. var c = d[u];
  39182. r.push(Promise.resolve(c.provideSelectionRanges(e, t, i)).then((function (e) {
  39183. if (n.isNonEmptyArray(e) && e.length === t.length) for (var i = 0; i < t.length; i++) {
  39184. l[i] || (l[i] = []);
  39185. for (var o = 0, r = e[i]; o < r.length; o++) {
  39186. var s = r[o];
  39187. a.Range.isIRange(s.range) && a.Range.containsPosition(s.range, t[i]) && l[i].push(a.Range.lift(s.range))
  39188. }
  39189. }
  39190. }), _.onUnexpectedExternalError))
  39191. }
  39192. return Promise.all(r).then((function () {
  39193. return l.map((function (t) {
  39194. if (0 === t.length) return [];
  39195. t.sort((function (e, t) {
  39196. return s.Position.isBefore(e.getStartPosition(), t.getStartPosition()) ? 1 : s.Position.isBefore(t.getStartPosition(), e.getStartPosition()) ? -1 : s.Position.isBefore(e.getEndPosition(), t.getEndPosition()) ? -1 : s.Position.isBefore(t.getEndPosition(), e.getEndPosition()) ? 1 : 0
  39197. }));
  39198. for (var n, i = [], o = 0, r = t; o < r.length; o++) {
  39199. var l = r[o];
  39200. (!n || a.Range.containsRange(l, n) && !a.Range.equalsRange(l, n)) && (i.push(l), n = l)
  39201. }
  39202. for (var u = [i[0]], d = 1; d < i.length; d++) {
  39203. var c = i[d - 1], h = i[d];
  39204. if (h.startLineNumber !== c.startLineNumber || h.endLineNumber !== c.endLineNumber) {
  39205. var p = new a.Range(c.startLineNumber, e.getLineFirstNonWhitespaceColumn(c.startLineNumber), c.endLineNumber, e.getLineLastNonWhitespaceColumn(c.endLineNumber));
  39206. p.containsRange(c) && !p.equalsRange(c) && h.containsRange(p) && !h.equalsRange(p) && u.push(p);
  39207. var g = new a.Range(c.startLineNumber, 1, c.endLineNumber, e.getLineMaxColumn(c.endLineNumber));
  39208. g.containsRange(c) && !g.equalsRange(p) && h.containsRange(g) && !h.equalsRange(g) && u.push(g)
  39209. }
  39210. u.push(h)
  39211. }
  39212. return u
  39213. }))
  39214. }))
  39215. }
  39216. o.registerEditorContribution(C.ID, C), o.registerEditorAction(S), o.registerEditorAction(w), h.SelectionRangeRegistry.register("*", new f.WordSelectionRangeProvider), t.provideSelectionRanges = E, o.registerModelCommand("_executeSelectionRangeProvider", (function (e) {
  39217. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  39218. var o = t[0];
  39219. return E(e, o, i.CancellationToken.None)
  39220. }))
  39221. })), define(n[120], i([0, 1, 15, 31, 10, 12, 17, 13, 18, 26, 3, 61, 2]), (function (e, t, n, i, o, r, s, a, l, u, h, p, g) {
  39222. "use strict";
  39223. Object.defineProperty(t, "__esModule", {value: !0}), t.Context = {
  39224. Visible: new l.RawContextKey("suggestWidgetVisible", !1),
  39225. MultipleSuggestions: new l.RawContextKey("suggestWidgetMultipleSuggestions", !1),
  39226. MakesTextEdit: new l.RawContextKey("suggestionMakesTextEdit", !0),
  39227. AcceptSuggestionsOnEnter: new l.RawContextKey("acceptSuggestionOnEnter", !0)
  39228. };
  39229. var f = function (e, t, n, r, s) {
  39230. var l = this;
  39231. this.position = e, this.completion = t, this.container = n, this.provider = r, this.isResolved = !1, this.score = p.FuzzyScore.Default, this.distance = 0, this.textLabel = "string" == typeof t.label ? t.label : t.label.name, this.labelLow = this.textLabel.toLowerCase(), this.sortTextLow = t.sortText && t.sortText.toLowerCase(), this.filterTextLow = t.filterText && t.filterText.toLowerCase(), h.Range.isIRange(t.range) ? (this.editStart = new a.Position(t.range.startLineNumber, t.range.startColumn), this.editInsertEnd = new a.Position(t.range.endLineNumber, t.range.endColumn), this.editReplaceEnd = new a.Position(t.range.endLineNumber, t.range.endColumn)) : (this.editStart = new a.Position(t.range.insert.startLineNumber, t.range.insert.startColumn),
  39232. this.editInsertEnd = new a.Position(t.range.insert.endLineNumber, t.range.insert.endColumn), this.editReplaceEnd = new a.Position(t.range.replace.endLineNumber, t.range.replace.endColumn));
  39233. var u, d = r.resolveCompletionItem;
  39234. "function" != typeof d ? (this.resolve = function () {
  39235. return Promise.resolve()
  39236. }, this.isResolved = !0) : this.resolve = function (n) {
  39237. return u || (u = Promise.resolve(d.call(r, s, e, t, n)).then((function (e) {
  39238. i.assign(t, e), l.isResolved = !0
  39239. }), (function (e) {
  39240. o.isPromiseCanceledError(e) && (u = void 0)
  39241. })), n.onCancellationRequested((function () {
  39242. l.isResolved || (u = void 0)
  39243. }))), u
  39244. }
  39245. };
  39246. t.CompletionItem = f;
  39247. var m, v = function () {
  39248. function e(e, t, n) {
  39249. void 0 === e && (e = 2), void 0 === t && (t = new Set), void 0 === n && (n = new Set), this.snippetSortOrder = e, this.kindFilter = t, this.providerFilter = n
  39250. }
  39251. return e.default = new e, e
  39252. }();
  39253. function _(e, t, i, r, a) {
  39254. void 0 === i && (i = v.default), void 0 === r && (r = {triggerKind: 0}), void 0 === a && (a = u.CancellationToken.None)
  39255. ;var l = e.getWordAtPosition(t),
  39256. d = l ? new h.Range(t.lineNumber, l.startColumn, t.lineNumber, l.endColumn) : h.Range.fromPositions(t),
  39257. c = d.setEndPosition(t.lineNumber, t.column);
  39258. t = t.clone();
  39259. var p = s.CompletionProviderRegistry.orderedGroups(e);
  39260. !i.kindFilter.has(25) && m && p.unshift([m]);
  39261. var _ = [], y = new g.DisposableStore, C = !1, S = p.map((function (n) {
  39262. return function () {
  39263. return Promise.all(n.map((function (n) {
  39264. if (!(i.providerFilter.size > 0) || i.providerFilter.has(n)) return Promise.resolve(n.provideCompletionItems(e, t, r, a)).then((function (o) {
  39265. var r = _.length;
  39266. if (o) {
  39267. for (var s = 0, a = o.suggestions || []; s < a.length; s++) {
  39268. var l = a[s];
  39269. i.kindFilter.has(l.kind) || (l.range || (l.range = {
  39270. insert: c,
  39271. replace: d
  39272. }), l.sortText || (l.sortText = "string" == typeof l.label ? l.label : l.label.name), _.push(new f(t, l, o, n, e)))
  39273. }
  39274. g.isDisposable(o) && y.add(o)
  39275. }
  39276. r !== _.length && n !== m && (C = !0)
  39277. }), o.onUnexpectedExternalError)
  39278. })))
  39279. }
  39280. }));
  39281. return n.first(S, (function () {
  39282. return C || a.isCancellationRequested
  39283. })).then((function () {
  39284. return a.isCancellationRequested ? (y.dispose(),
  39285. Promise.reject(o.canceled())) : _.sort(b(i.snippetSortOrder))
  39286. }))
  39287. }
  39288. function y(e, t) {
  39289. if (e.sortTextLow && t.sortTextLow) {
  39290. if (e.sortTextLow < t.sortTextLow) return -1;
  39291. if (e.sortTextLow > t.sortTextLow) return 1
  39292. }
  39293. return e.completion.label < t.completion.label ? -1 : e.completion.label > t.completion.label ? 1 : e.completion.kind - t.completion.kind
  39294. }
  39295. t.CompletionOptions = v, t.getSnippetSuggestSupport = function () {
  39296. return m
  39297. }, t.provideSuggestionItems = _;
  39298. var C = new Map;
  39299. function b(e) {
  39300. return C.get(e)
  39301. }
  39302. C.set(0, (function (e, t) {
  39303. if (e.completion.kind !== t.completion.kind) {
  39304. if (25 === e.completion.kind) return -1;
  39305. if (25 === t.completion.kind) return 1
  39306. }
  39307. return y(e, t)
  39308. })), C.set(2, (function (e, t) {
  39309. if (e.completion.kind !== t.completion.kind) {
  39310. if (25 === e.completion.kind) return 1;
  39311. if (25 === t.completion.kind) return -1
  39312. }
  39313. return y(e, t)
  39314. })), C.set(1, y), t.getSuggestionComparator = b, r.registerDefaultLanguageCommand("_executeCompletionItemProvider", (function (e, t, n) {
  39315. return d(void 0, void 0, void 0, (function () {
  39316. var i, o, r, s, a, l, d, h;
  39317. return c(this, (function (c) {
  39318. switch (c.label) {
  39319. case 0:
  39320. return i = {
  39321. incomplete: !1,
  39322. suggestions: []
  39323. }, o = new g.DisposableStore, r = [], s = n.maxItemsToResolve || 0, [4, _(e, t)];
  39324. case 1:
  39325. for (a = c.sent(), l = 0, d = a; l < d.length; l++) h = d[l], r.length < s && r.push(h.resolve(u.CancellationToken.None)), i.incomplete = i.incomplete || h.container.incomplete, i.suggestions.push(h.completion), g.isDisposable(h.container) && o.add(h.container);
  39326. c.label = 2;
  39327. case 2:
  39328. return c.trys.push([2, , 4, 5]), [4, Promise.all(r)];
  39329. case 3:
  39330. return c.sent(), [2, i];
  39331. case 4:
  39332. return setTimeout((function () {
  39333. return o.dispose()
  39334. }), 100), [7];
  39335. case 5:
  39336. return [2]
  39337. }
  39338. }))
  39339. }))
  39340. }));
  39341. var S = new (function () {
  39342. function e() {
  39343. this.onlyOnceSuggestions = []
  39344. }
  39345. return e.prototype.provideCompletionItems = function () {
  39346. var e = {suggestions: this.onlyOnceSuggestions.slice(0)};
  39347. return this.onlyOnceSuggestions.length = 0, e
  39348. }, e
  39349. }());
  39350. s.CompletionProviderRegistry.register("*", S), t.showSimpleSuggestions = function (e, t) {
  39351. setTimeout((function () {
  39352. var n;
  39353. (n = S.onlyOnceSuggestions).push.apply(n, t), e.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(S))
  39354. }), 0)
  39355. }
  39356. })),
  39357. define(n[225], i([0, 1, 469, 50, 12, 163]), (function (e, t, n, i, o, s) {
  39358. "use strict";
  39359. Object.defineProperty(t, "__esModule", {value: !0});
  39360. var a = function (e) {
  39361. function t() {
  39362. return e.call(this, {
  39363. id: t.ID,
  39364. label: n.localize(0, null),
  39365. alias: "Toggle Tab Key Moves Focus",
  39366. precondition: void 0,
  39367. kbOpts: {kbExpr: null, primary: 2091, mac: {primary: 1323}, weight: 100}
  39368. }) || this
  39369. }
  39370. return r(t, e), t.prototype.run = function (e, t) {
  39371. var o = !s.TabFocus.getTabFocusMode();
  39372. s.TabFocus.setTabFocusMode(o), o ? i.alert(n.localize(1, null)) : i.alert(n.localize(2, null))
  39373. }, t.ID = "editor.action.toggleTabFocusMode", t
  39374. }(o.EditorAction);
  39375. t.ToggleTabFocusModeAction = a, o.registerEditorAction(a)
  39376. })), define(n[542], i([0, 1, 470, 12, 132]), (function (e, t, n, i, o) {
  39377. "use strict";
  39378. Object.defineProperty(t, "__esModule", {value: !0});
  39379. var s = function (e) {
  39380. function t() {
  39381. return e.call(this, {
  39382. id: "editor.action.forceRetokenize",
  39383. label: n.localize(0, null),
  39384. alias: "Developer: Force Retokenize",
  39385. precondition: void 0
  39386. }) || this
  39387. }
  39388. return r(t, e), t.prototype.run = function (e, t) {
  39389. if (t.hasModel()) {
  39390. var n = t.getModel();
  39391. n.resetTokenization()
  39392. ;var i = new o.StopWatch(!0);
  39393. n.forceTokenization(n.getLineCount()), i.stop(), console.log("tokenization took " + i.elapsed())
  39394. }
  39395. }, t
  39396. }(i.EditorAction);
  39397. i.registerEditorAction(s)
  39398. })), define(n[226], i([0, 1, 12, 80, 40, 160, 89, 13, 3, 22, 23, 64, 18, 33]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g) {
  39399. "use strict";
  39400. Object.defineProperty(t, "__esModule", {value: !0});
  39401. var f = function (e) {
  39402. function t(t) {
  39403. var n = e.call(this, t) || this;
  39404. return n._inSelectionMode = t.inSelectionMode, n._wordNavigationType = t.wordNavigationType, n
  39405. }
  39406. return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
  39407. var i = this;
  39408. if (t.hasModel()) {
  39409. var r = a.getMapForWordSeparators(t.getOption(96)), s = t.getModel(),
  39410. u = t.getSelections().map((function (e) {
  39411. var t = new l.Position(e.positionLineNumber, e.positionColumn),
  39412. n = i._move(r, s, t, i._wordNavigationType);
  39413. return i._moveTo(e, n, i._inSelectionMode)
  39414. }));
  39415. if (t._getCursors().setStates("moveWordCommand", 0, u.map((function (e) {
  39416. return o.CursorState.fromModelSelection(e)
  39417. }))), 1 === u.length) {
  39418. var d = new l.Position(u[0].positionLineNumber, u[0].positionColumn)
  39419. ;t.revealPosition(d, 0)
  39420. }
  39421. }
  39422. }, t.prototype._moveTo = function (e, t, n) {
  39423. return n ? new d.Selection(e.selectionStartLineNumber, e.selectionStartColumn, t.lineNumber, t.column) : new d.Selection(t.lineNumber, t.column, t.lineNumber, t.column)
  39424. }, t
  39425. }(n.EditorCommand);
  39426. t.MoveWordCommand = f;
  39427. var m = function (e) {
  39428. function t() {
  39429. return null !== e && e.apply(this, arguments) || this
  39430. }
  39431. return r(t, e), t.prototype._move = function (e, t, n, i) {
  39432. return s.WordOperations.moveWordLeft(e, t, n, i)
  39433. }, t
  39434. }(f);
  39435. t.WordLeftCommand = m;
  39436. var v = function (e) {
  39437. function t() {
  39438. return null !== e && e.apply(this, arguments) || this
  39439. }
  39440. return r(t, e), t.prototype._move = function (e, t, n, i) {
  39441. return s.WordOperations.moveWordRight(e, t, n, i)
  39442. }, t
  39443. }(f);
  39444. t.WordRightCommand = v;
  39445. var _ = function (e) {
  39446. function t() {
  39447. return e.call(this, {
  39448. inSelectionMode: !1,
  39449. wordNavigationType: 0,
  39450. id: "cursorWordStartLeft",
  39451. precondition: void 0,
  39452. kbOpts: {
  39453. kbExpr: c.EditorContextKeys.textInputFocus,
  39454. primary: 2063,
  39455. mac: {primary: 527},
  39456. weight: 100
  39457. }
  39458. }) || this
  39459. }
  39460. return r(t, e), t
  39461. }(m);
  39462. t.CursorWordStartLeft = _;
  39463. var y = function (e) {
  39464. function t() {
  39465. return e.call(this, {
  39466. inSelectionMode: !1,
  39467. wordNavigationType: 2, id: "cursorWordEndLeft", precondition: void 0
  39468. }) || this
  39469. }
  39470. return r(t, e), t
  39471. }(m);
  39472. t.CursorWordEndLeft = y;
  39473. var C = function (e) {
  39474. function t() {
  39475. return e.call(this, {
  39476. inSelectionMode: !1,
  39477. wordNavigationType: 1,
  39478. id: "cursorWordLeft",
  39479. precondition: void 0
  39480. }) || this
  39481. }
  39482. return r(t, e), t
  39483. }(m);
  39484. t.CursorWordLeft = C;
  39485. var b = function (e) {
  39486. function t() {
  39487. return e.call(this, {
  39488. inSelectionMode: !0,
  39489. wordNavigationType: 0,
  39490. id: "cursorWordStartLeftSelect",
  39491. precondition: void 0,
  39492. kbOpts: {
  39493. kbExpr: c.EditorContextKeys.textInputFocus,
  39494. primary: 3087,
  39495. mac: {primary: 1551},
  39496. weight: 100
  39497. }
  39498. }) || this
  39499. }
  39500. return r(t, e), t
  39501. }(m);
  39502. t.CursorWordStartLeftSelect = b;
  39503. var S = function (e) {
  39504. function t() {
  39505. return e.call(this, {
  39506. inSelectionMode: !0,
  39507. wordNavigationType: 2,
  39508. id: "cursorWordEndLeftSelect",
  39509. precondition: void 0
  39510. }) || this
  39511. }
  39512. return r(t, e), t
  39513. }(m);
  39514. t.CursorWordEndLeftSelect = S;
  39515. var w = function (e) {
  39516. function t() {
  39517. return e.call(this, {
  39518. inSelectionMode: !0,
  39519. wordNavigationType: 1,
  39520. id: "cursorWordLeftSelect",
  39521. precondition: void 0
  39522. }) || this
  39523. }
  39524. return r(t, e), t
  39525. }(m);
  39526. t.CursorWordLeftSelect = w;
  39527. var E = function (e) {
  39528. function t() {
  39529. return e.call(this, {
  39530. inSelectionMode: !1,
  39531. wordNavigationType: 3,
  39532. id: "cursorWordAccessibilityLeft",
  39533. precondition: void 0,
  39534. kbOpts: {
  39535. kbExpr: p.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus, h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),
  39536. win: {primary: 2063},
  39537. weight: 101
  39538. }
  39539. }) || this
  39540. }
  39541. return r(t, e), t.prototype._move = function (t, n, i, o) {
  39542. return e.prototype._move.call(this, a.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue), n, i, o)
  39543. }, t
  39544. }(m);
  39545. t.CursorWordAccessibilityLeft = E;
  39546. var L = function (e) {
  39547. function t() {
  39548. return e.call(this, {
  39549. inSelectionMode: !0,
  39550. wordNavigationType: 3,
  39551. id: "cursorWordAccessibilityLeftSelect",
  39552. precondition: void 0,
  39553. kbOpts: {
  39554. kbExpr: p.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus, h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),
  39555. win: {primary: 3087},
  39556. weight: 101
  39557. }
  39558. }) || this
  39559. }
  39560. return r(t, e), t.prototype._move = function (t, n, i, o) {
  39561. return e.prototype._move.call(this, a.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue), n, i, o)
  39562. }, t
  39563. }(m);
  39564. t.CursorWordAccessibilityLeftSelect = L;
  39565. var D = function (e) {
  39566. function t() {
  39567. return e.call(this, {
  39568. inSelectionMode: !1,
  39569. wordNavigationType: 0, id: "cursorWordStartRight", precondition: void 0
  39570. }) || this
  39571. }
  39572. return r(t, e), t
  39573. }(v);
  39574. t.CursorWordStartRight = D;
  39575. var N = function (e) {
  39576. function t() {
  39577. return e.call(this, {
  39578. inSelectionMode: !1,
  39579. wordNavigationType: 2,
  39580. id: "cursorWordEndRight",
  39581. precondition: void 0,
  39582. kbOpts: {
  39583. kbExpr: c.EditorContextKeys.textInputFocus,
  39584. primary: 2065,
  39585. mac: {primary: 529},
  39586. weight: 100
  39587. }
  39588. }) || this
  39589. }
  39590. return r(t, e), t
  39591. }(v);
  39592. t.CursorWordEndRight = N;
  39593. var x = function (e) {
  39594. function t() {
  39595. return e.call(this, {
  39596. inSelectionMode: !1,
  39597. wordNavigationType: 2,
  39598. id: "cursorWordRight",
  39599. precondition: void 0
  39600. }) || this
  39601. }
  39602. return r(t, e), t
  39603. }(v);
  39604. t.CursorWordRight = x;
  39605. var I = function (e) {
  39606. function t() {
  39607. return e.call(this, {
  39608. inSelectionMode: !0,
  39609. wordNavigationType: 0,
  39610. id: "cursorWordStartRightSelect",
  39611. precondition: void 0
  39612. }) || this
  39613. }
  39614. return r(t, e), t
  39615. }(v);
  39616. t.CursorWordStartRightSelect = I;
  39617. var M = function (e) {
  39618. function t() {
  39619. return e.call(this, {
  39620. inSelectionMode: !0,
  39621. wordNavigationType: 2,
  39622. id: "cursorWordEndRightSelect",
  39623. precondition: void 0,
  39624. kbOpts: {
  39625. kbExpr: c.EditorContextKeys.textInputFocus,
  39626. primary: 3089,
  39627. mac: {primary: 1553},
  39628. weight: 100
  39629. }
  39630. }) || this
  39631. }
  39632. return r(t, e), t
  39633. }(v);
  39634. t.CursorWordEndRightSelect = M;
  39635. var k = function (e) {
  39636. function t() {
  39637. return e.call(this, {
  39638. inSelectionMode: !0,
  39639. wordNavigationType: 2,
  39640. id: "cursorWordRightSelect",
  39641. precondition: void 0
  39642. }) || this
  39643. }
  39644. return r(t, e), t
  39645. }(v);
  39646. t.CursorWordRightSelect = k;
  39647. var T = function (e) {
  39648. function t() {
  39649. return e.call(this, {
  39650. inSelectionMode: !1,
  39651. wordNavigationType: 3,
  39652. id: "cursorWordAccessibilityRight",
  39653. precondition: void 0,
  39654. kbOpts: {
  39655. kbExpr: p.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus, h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),
  39656. win: {primary: 2065},
  39657. weight: 101
  39658. }
  39659. }) || this
  39660. }
  39661. return r(t, e), t.prototype._move = function (t, n, i, o) {
  39662. return e.prototype._move.call(this, a.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue), n, i, o)
  39663. }, t
  39664. }(v);
  39665. t.CursorWordAccessibilityRight = T;
  39666. var R = function (e) {
  39667. function t() {
  39668. return e.call(this, {
  39669. inSelectionMode: !0,
  39670. wordNavigationType: 3,
  39671. id: "cursorWordAccessibilityRightSelect",
  39672. precondition: void 0,
  39673. kbOpts: {
  39674. kbExpr: p.ContextKeyExpr.and(c.EditorContextKeys.textInputFocus, h.CONTEXT_ACCESSIBILITY_MODE_ENABLED),
  39675. win: {primary: 3089},
  39676. weight: 101
  39677. }
  39678. }) || this
  39679. }
  39680. return r(t, e), t.prototype._move = function (t, n, i, o) {
  39681. return e.prototype._move.call(this, a.getMapForWordSeparators(g.EditorOptions.wordSeparators.defaultValue), n, i, o)
  39682. }, t
  39683. }(v);
  39684. t.CursorWordAccessibilityRightSelect = R;
  39685. var O = function (e) {
  39686. function t(t) {
  39687. var n = e.call(this, t) || this;
  39688. return n._whitespaceHeuristics = t.whitespaceHeuristics, n._wordNavigationType = t.wordNavigationType, n
  39689. }
  39690. return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
  39691. var o = this;
  39692. if (t.hasModel()) {
  39693. var r = a.getMapForWordSeparators(t.getOption(96)), s = t.getModel(),
  39694. l = t.getSelections().map((function (e) {
  39695. var t = o._delete(r, s, e, o._whitespaceHeuristics, o._wordNavigationType);
  39696. return new i.ReplaceCommand(t, "")
  39697. }));
  39698. t.pushUndoStop(), t.executeCommands(this.id, l), t.pushUndoStop()
  39699. }
  39700. }, t
  39701. }(n.EditorCommand);
  39702. t.DeleteWordCommand = O;
  39703. var P = function (e) {
  39704. function t() {
  39705. return null !== e && e.apply(this, arguments) || this
  39706. }
  39707. return r(t, e), t.prototype._delete = function (e, t, n, i, o) {
  39708. var r = s.WordOperations.deleteWordLeft(e, t, n, i, o);
  39709. return r || new u.Range(1, 1, 1, 1)
  39710. }, t
  39711. }(O)
  39712. ;t.DeleteWordLeftCommand = P;
  39713. var A = function (e) {
  39714. function t() {
  39715. return null !== e && e.apply(this, arguments) || this
  39716. }
  39717. return r(t, e), t.prototype._delete = function (e, t, n, i, o) {
  39718. var r = s.WordOperations.deleteWordRight(e, t, n, i, o);
  39719. if (r) return r;
  39720. var a = t.getLineCount(), l = t.getLineMaxColumn(a);
  39721. return new u.Range(a, l, a, l)
  39722. }, t
  39723. }(O);
  39724. t.DeleteWordRightCommand = A;
  39725. var F = function (e) {
  39726. function t() {
  39727. return e.call(this, {
  39728. whitespaceHeuristics: !1,
  39729. wordNavigationType: 0,
  39730. id: "deleteWordStartLeft",
  39731. precondition: c.EditorContextKeys.writable
  39732. }) || this
  39733. }
  39734. return r(t, e), t
  39735. }(P);
  39736. t.DeleteWordStartLeft = F;
  39737. var W = function (e) {
  39738. function t() {
  39739. return e.call(this, {
  39740. whitespaceHeuristics: !1,
  39741. wordNavigationType: 2,
  39742. id: "deleteWordEndLeft",
  39743. precondition: c.EditorContextKeys.writable
  39744. }) || this
  39745. }
  39746. return r(t, e), t
  39747. }(P);
  39748. t.DeleteWordEndLeft = W;
  39749. var B = function (e) {
  39750. function t() {
  39751. return e.call(this, {
  39752. whitespaceHeuristics: !0,
  39753. wordNavigationType: 0,
  39754. id: "deleteWordLeft",
  39755. precondition: c.EditorContextKeys.writable,
  39756. kbOpts: {
  39757. kbExpr: c.EditorContextKeys.textInputFocus,
  39758. primary: 2049,
  39759. mac: {primary: 513},
  39760. weight: 100
  39761. }
  39762. }) || this
  39763. }
  39764. return r(t, e), t
  39765. }(P);
  39766. t.DeleteWordLeft = B;
  39767. var V = function (e) {
  39768. function t() {
  39769. return e.call(this, {
  39770. whitespaceHeuristics: !1,
  39771. wordNavigationType: 0,
  39772. id: "deleteWordStartRight",
  39773. precondition: c.EditorContextKeys.writable
  39774. }) || this
  39775. }
  39776. return r(t, e), t
  39777. }(A);
  39778. t.DeleteWordStartRight = V;
  39779. var z = function (e) {
  39780. function t() {
  39781. return e.call(this, {
  39782. whitespaceHeuristics: !1,
  39783. wordNavigationType: 2,
  39784. id: "deleteWordEndRight",
  39785. precondition: c.EditorContextKeys.writable
  39786. }) || this
  39787. }
  39788. return r(t, e), t
  39789. }(A);
  39790. t.DeleteWordEndRight = z;
  39791. var H = function (e) {
  39792. function t() {
  39793. return e.call(this, {
  39794. whitespaceHeuristics: !0,
  39795. wordNavigationType: 2,
  39796. id: "deleteWordRight",
  39797. precondition: c.EditorContextKeys.writable,
  39798. kbOpts: {
  39799. kbExpr: c.EditorContextKeys.textInputFocus,
  39800. primary: 2068,
  39801. mac: {primary: 532},
  39802. weight: 100
  39803. }
  39804. }) || this
  39805. }
  39806. return r(t, e), t
  39807. }(A);
  39808. t.DeleteWordRight = H, n.registerEditorCommand(new _), n.registerEditorCommand(new y), n.registerEditorCommand(new C), n.registerEditorCommand(new b), n.registerEditorCommand(new S), n.registerEditorCommand(new w), n.registerEditorCommand(new D), n.registerEditorCommand(new N),
  39809. n.registerEditorCommand(new x), n.registerEditorCommand(new I), n.registerEditorCommand(new M), n.registerEditorCommand(new k), n.registerEditorCommand(new E), n.registerEditorCommand(new L), n.registerEditorCommand(new T), n.registerEditorCommand(new R), n.registerEditorCommand(new F), n.registerEditorCommand(new W), n.registerEditorCommand(new B), n.registerEditorCommand(new V), n.registerEditorCommand(new z), n.registerEditorCommand(new H)
  39810. })), define(n[543], i([0, 1, 12, 160, 3, 23, 226, 29]), (function (e, t, n, i, o, s, a, l) {
  39811. "use strict";
  39812. Object.defineProperty(t, "__esModule", {value: !0});
  39813. var u = function (e) {
  39814. function t() {
  39815. return e.call(this, {
  39816. whitespaceHeuristics: !0,
  39817. wordNavigationType: 0,
  39818. id: "deleteWordPartLeft",
  39819. precondition: s.EditorContextKeys.writable,
  39820. kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 769}, weight: 100}
  39821. }) || this
  39822. }
  39823. return r(t, e), t.prototype._delete = function (e, t, n, r, s) {
  39824. var a = i.WordPartOperations.deleteWordPartLeft(e, t, n, r);
  39825. return a || new o.Range(1, 1, 1, 1)
  39826. }, t
  39827. }(a.DeleteWordCommand);
  39828. t.DeleteWordPartLeft = u
  39829. ;var d = function (e) {
  39830. function t() {
  39831. return e.call(this, {
  39832. whitespaceHeuristics: !0,
  39833. wordNavigationType: 2,
  39834. id: "deleteWordPartRight",
  39835. precondition: s.EditorContextKeys.writable,
  39836. kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 788}, weight: 100}
  39837. }) || this
  39838. }
  39839. return r(t, e), t.prototype._delete = function (e, t, n, r, s) {
  39840. var a = i.WordPartOperations.deleteWordPartRight(e, t, n, r);
  39841. if (a) return a;
  39842. var l = t.getLineCount(), u = t.getLineMaxColumn(l);
  39843. return new o.Range(l, u, l, u)
  39844. }, t
  39845. }(a.DeleteWordCommand);
  39846. t.DeleteWordPartRight = d;
  39847. var c = function (e) {
  39848. function t() {
  39849. return null !== e && e.apply(this, arguments) || this
  39850. }
  39851. return r(t, e), t.prototype._move = function (e, t, n, o) {
  39852. return i.WordPartOperations.moveWordPartLeft(e, t, n)
  39853. }, t
  39854. }(a.MoveWordCommand);
  39855. t.WordPartLeftCommand = c;
  39856. var h = function (e) {
  39857. function t() {
  39858. return e.call(this, {
  39859. inSelectionMode: !1,
  39860. wordNavigationType: 0,
  39861. id: "cursorWordPartLeft",
  39862. precondition: void 0,
  39863. kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 783}, weight: 100}
  39864. }) || this
  39865. }
  39866. return r(t, e), t
  39867. }(c);
  39868. t.CursorWordPartLeft = h,
  39869. l.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft", "cursorWordPartLeft");
  39870. var p = function (e) {
  39871. function t() {
  39872. return e.call(this, {
  39873. inSelectionMode: !0,
  39874. wordNavigationType: 0,
  39875. id: "cursorWordPartLeftSelect",
  39876. precondition: void 0,
  39877. kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 1807}, weight: 100}
  39878. }) || this
  39879. }
  39880. return r(t, e), t
  39881. }(c);
  39882. t.CursorWordPartLeftSelect = p, l.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect", "cursorWordPartLeftSelect");
  39883. var g = function (e) {
  39884. function t() {
  39885. return null !== e && e.apply(this, arguments) || this
  39886. }
  39887. return r(t, e), t.prototype._move = function (e, t, n, o) {
  39888. return i.WordPartOperations.moveWordPartRight(e, t, n)
  39889. }, t
  39890. }(a.MoveWordCommand);
  39891. t.WordPartRightCommand = g;
  39892. var f = function (e) {
  39893. function t() {
  39894. return e.call(this, {
  39895. inSelectionMode: !1,
  39896. wordNavigationType: 2,
  39897. id: "cursorWordPartRight",
  39898. precondition: void 0,
  39899. kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 785}, weight: 100}
  39900. }) || this
  39901. }
  39902. return r(t, e), t
  39903. }(g);
  39904. t.CursorWordPartRight = f;
  39905. var m = function (e) {
  39906. function t() {
  39907. return e.call(this, {
  39908. inSelectionMode: !0,
  39909. wordNavigationType: 2,
  39910. id: "cursorWordPartRightSelect",
  39911. precondition: void 0,
  39912. kbOpts: {kbExpr: s.EditorContextKeys.textInputFocus, primary: 0, mac: {primary: 1809}, weight: 100}
  39913. }) || this
  39914. }
  39915. return r(t, e), t
  39916. }(g);
  39917. t.CursorWordPartRightSelect = m, n.registerEditorCommand(new u), n.registerEditorCommand(new d), n.registerEditorCommand(new h), n.registerEditorCommand(new p), n.registerEditorCommand(new f), n.registerEditorCommand(new m)
  39918. })), define(n[544], i([0, 1, 24, 6, 2, 12, 326]), (function (e, t, n, i, o, s) {
  39919. "use strict";
  39920. Object.defineProperty(t, "__esModule", {value: !0});
  39921. var a = function (e) {
  39922. function t(t) {
  39923. var i = e.call(this) || this;
  39924. return i.editor = t, i.widget = null, n.isIPad && (i._register(t.onDidChangeConfiguration((function () {
  39925. return i.update()
  39926. }))), i.update()), i
  39927. }
  39928. return r(t, e), t.prototype.update = function () {
  39929. var e = !this.editor.getOption(68);
  39930. !this.widget && e ? this.widget = new l(this.editor) : this.widget && !e && (this.widget.dispose(), this.widget = null)
  39931. }, t.prototype.dispose = function () {
  39932. e.prototype.dispose.call(this),
  39933. this.widget && (this.widget.dispose(), this.widget = null)
  39934. }, t.ID = "editor.contrib.iPadShowKeyboard", t
  39935. }(o.Disposable);
  39936. t.IPadShowKeyboard = a;
  39937. var l = function (e) {
  39938. function t(t) {
  39939. var n = e.call(this) || this;
  39940. return n.editor = t, n._domNode = document.createElement("textarea"), n._domNode.className = "iPadShowKeyboard", n._register(i.addDisposableListener(n._domNode, "touchstart", (function (e) {
  39941. n.editor.focus()
  39942. }))), n._register(i.addDisposableListener(n._domNode, "focus", (function (e) {
  39943. n.editor.focus()
  39944. }))), n.editor.addOverlayWidget(n), n
  39945. }
  39946. return r(t, e), t.prototype.dispose = function () {
  39947. this.editor.removeOverlayWidget(this), e.prototype.dispose.call(this)
  39948. }, t.prototype.getId = function () {
  39949. return t.ID
  39950. }, t.prototype.getDomNode = function () {
  39951. return this._domNode
  39952. }, t.prototype.getPosition = function () {
  39953. return {preference: 1}
  39954. }, t.ID = "editor.contrib.ShowKeyboardWidget", t
  39955. }(o.Disposable);
  39956. s.registerEditorContribution(a.ID, a)
  39957. })), define(n[545], i([0, 1, 12, 94, 59]), (function (e, t, n, i, o) {
  39958. "use strict";
  39959. Object.defineProperty(t, "__esModule", {value: !0});
  39960. var s = function (e) {
  39961. function t() {
  39962. var t = e.call(this, {
  39963. id: "editor.action.toggleHighContrast",
  39964. label: o.ToggleHighContrastNLS.toggleHighContrast,
  39965. alias: "Toggle High Contrast Theme",
  39966. precondition: void 0
  39967. }) || this;
  39968. return t._originalThemeName = null, t
  39969. }
  39970. return r(t, e), t.prototype.run = function (e, t) {
  39971. var n = e.get(i.IStandaloneThemeService);
  39972. this._originalThemeName ? (n.setTheme(this._originalThemeName), this._originalThemeName = null) : (this._originalThemeName = n.getTheme().themeName, n.setTheme("hc-black"))
  39973. }, t
  39974. }(n.EditorAction);
  39975. n.registerEditorAction(s)
  39976. })), define(n[20], i([0, 1, 42, 27, 4, 476, 220, 15]), (function (e, t, n, i, o, r, s, a) {
  39977. "use strict";
  39978. Object.defineProperty(t, "__esModule", {value: !0}), t.Extensions = {ColorContribution: "base.contributions.colors"};
  39979. var l = new (function () {
  39980. function e() {
  39981. this._onDidChangeSchema = new o.Emitter, this.onDidChangeSchema = this._onDidChangeSchema.event, this.colorSchema = {
  39982. type: "object",
  39983. properties: {}
  39984. }, this.colorReferenceSchema = {type: "string", enum: [], enumDescriptions: []}, this.colorsById = {}
  39985. }
  39986. return e.prototype.registerColor = function (e, t, n, i, o) {
  39987. void 0 === i && (i = !1)
  39988. ;var r = {id: e, description: n, defaults: t, needsTransparency: i, deprecationMessage: o};
  39989. this.colorsById[e] = r;
  39990. var s = {
  39991. type: "string",
  39992. description: n,
  39993. format: "color-hex",
  39994. defaultSnippets: [{body: "${1:#ff0000}"}]
  39995. };
  39996. return o && (s.deprecationMessage = o), this.colorSchema.properties[e] = s, this.colorReferenceSchema.enum.push(e), this.colorReferenceSchema.enumDescriptions.push(n), this._onDidChangeSchema.fire(), e
  39997. }, e.prototype.resolveDefaultColor = function (e, t) {
  39998. var n = this.colorsById[e];
  39999. if (n && n.defaults) return g(n.defaults[t.type], t)
  40000. }, e.prototype.getColorSchema = function () {
  40001. return this.colorSchema
  40002. }, e.prototype.toString = function () {
  40003. var e = this;
  40004. return Object.keys(this.colorsById).sort((function (e, t) {
  40005. var n = -1 === e.indexOf(".") ? 0 : 1, i = -1 === t.indexOf(".") ? 0 : 1;
  40006. return n !== i ? n - i : e.localeCompare(t)
  40007. })).map((function (t) {
  40008. return "- `" + t + "`: " + e.colorsById[t].description
  40009. })).join("\n")
  40010. }, e
  40011. }());
  40012. function u(e, t, n, i, o) {
  40013. return l.registerColor(e, t, n, i, o)
  40014. }
  40015. function d(e, t) {
  40016. return function (n) {
  40017. var i = g(e, n);
  40018. if (i) return i.darken(t)
  40019. }
  40020. }
  40021. function c(e, t) {
  40022. return function (n) {
  40023. var i = g(e, n);
  40024. if (i) return i.lighten(t)
  40025. }
  40026. }
  40027. function h(e, t) {
  40028. return function (n) {
  40029. var i = g(e, n);
  40030. if (i) return i.transparent(t)
  40031. }
  40032. }
  40033. function p(e, t, n, o) {
  40034. return function (r) {
  40035. var s = g(e, r);
  40036. if (s) {
  40037. var a = g(t, r);
  40038. return a ? s.isDarkerThan(a) ? i.Color.getLighterColor(s, a, n).transparent(o) : i.Color.getDarkerColor(s, a, n).transparent(o) : s.transparent(n * o)
  40039. }
  40040. }
  40041. }
  40042. function g(e, t) {
  40043. if (null !== e) return "string" == typeof e ? "#" === e[0] ? i.Color.fromHex(e) : t.getColor(e) : e instanceof i.Color ? e : "function" == typeof e ? e(t) : void 0
  40044. }
  40045. n.Registry.add(t.Extensions.ColorContribution, l), t.registerColor = u, t.foreground = u("foreground", {
  40046. dark: "#CCCCCC",
  40047. light: "#616161",
  40048. hc: "#FFFFFF"
  40049. }, r.localize(0, null)), t.errorForeground = u("errorForeground", {
  40050. dark: "#F48771",
  40051. light: "#A1260D",
  40052. hc: "#F48771"
  40053. }, r.localize(1, null)), t.focusBorder = u("focusBorder", {
  40054. dark: i.Color.fromHex("#0E639C").transparent(.8),
  40055. light: i.Color.fromHex("#007ACC").transparent(.4),
  40056. hc: "#F38518"
  40057. }, r.localize(2, null)), t.contrastBorder = u("contrastBorder", {
  40058. light: null,
  40059. dark: null,
  40060. hc: "#6FC3DF"
  40061. }, r.localize(3, null)),
  40062. t.activeContrastBorder = u("contrastActiveBorder", {
  40063. light: null,
  40064. dark: null,
  40065. hc: t.focusBorder
  40066. }, r.localize(4, null)), t.textLinkForeground = u("textLink.foreground", {
  40067. light: "#006AB1",
  40068. dark: "#3794FF",
  40069. hc: "#3794FF"
  40070. }, r.localize(5, null)), t.textCodeBlockBackground = u("textCodeBlock.background", {
  40071. light: "#dcdcdc66",
  40072. dark: "#0a0a0a66",
  40073. hc: i.Color.black
  40074. }, r.localize(6, null)), t.widgetShadow = u("widget.shadow", {
  40075. dark: "#000000",
  40076. light: "#A8A8A8",
  40077. hc: null
  40078. }, r.localize(7, null)), t.inputBackground = u("input.background", {
  40079. dark: "#3C3C3C",
  40080. light: i.Color.white,
  40081. hc: i.Color.black
  40082. }, r.localize(8, null)), t.inputForeground = u("input.foreground", {
  40083. dark: t.foreground,
  40084. light: t.foreground,
  40085. hc: t.foreground
  40086. }, r.localize(9, null)), t.inputBorder = u("input.border", {
  40087. dark: null,
  40088. light: null,
  40089. hc: t.contrastBorder
  40090. }, r.localize(10, null)), t.inputActiveOptionBorder = u("inputOption.activeBorder", {
  40091. dark: "#007ACC00",
  40092. light: "#007ACC00",
  40093. hc: t.contrastBorder
  40094. }, r.localize(11, null)), t.inputActiveOptionBackground = u("inputOption.activeBackground", {
  40095. dark: h(t.focusBorder, .5), light: h(t.focusBorder, .3), hc: null
  40096. }, r.localize(12, null)), t.inputValidationInfoBackground = u("inputValidation.infoBackground", {
  40097. dark: "#063B49",
  40098. light: "#D6ECF2",
  40099. hc: i.Color.black
  40100. }, r.localize(13, null)), t.inputValidationInfoForeground = u("inputValidation.infoForeground", {
  40101. dark: null,
  40102. light: null,
  40103. hc: null
  40104. }, r.localize(14, null)), t.inputValidationInfoBorder = u("inputValidation.infoBorder", {
  40105. dark: "#007acc",
  40106. light: "#007acc",
  40107. hc: t.contrastBorder
  40108. }, r.localize(15, null)), t.inputValidationWarningBackground = u("inputValidation.warningBackground", {
  40109. dark: "#352A05",
  40110. light: "#F6F5D2",
  40111. hc: i.Color.black
  40112. }, r.localize(16, null)), t.inputValidationWarningForeground = u("inputValidation.warningForeground", {
  40113. dark: null,
  40114. light: null,
  40115. hc: null
  40116. }, r.localize(17, null)), t.inputValidationWarningBorder = u("inputValidation.warningBorder", {
  40117. dark: "#B89500",
  40118. light: "#B89500",
  40119. hc: t.contrastBorder
  40120. }, r.localize(18, null)), t.inputValidationErrorBackground = u("inputValidation.errorBackground", {
  40121. dark: "#5A1D1D",
  40122. light: "#F2DEDE",
  40123. hc: i.Color.black
  40124. }, r.localize(19, null)),
  40125. t.inputValidationErrorForeground = u("inputValidation.errorForeground", {
  40126. dark: null,
  40127. light: null,
  40128. hc: null
  40129. }, r.localize(20, null)), t.inputValidationErrorBorder = u("inputValidation.errorBorder", {
  40130. dark: "#BE1100",
  40131. light: "#BE1100",
  40132. hc: t.contrastBorder
  40133. }, r.localize(21, null)), t.selectBackground = u("dropdown.background", {
  40134. dark: "#3C3C3C",
  40135. light: i.Color.white,
  40136. hc: i.Color.black
  40137. }, r.localize(22, null)), t.selectForeground = u("dropdown.foreground", {
  40138. dark: "#F0F0F0",
  40139. light: null,
  40140. hc: i.Color.white
  40141. }, r.localize(23, null)), t.pickerGroupForeground = u("pickerGroup.foreground", {
  40142. dark: "#3794FF",
  40143. light: "#0066BF",
  40144. hc: i.Color.white
  40145. }, r.localize(24, null)), t.pickerGroupBorder = u("pickerGroup.border", {
  40146. dark: "#3F3F46",
  40147. light: "#CCCEDB",
  40148. hc: i.Color.white
  40149. }, r.localize(25, null)), t.badgeBackground = u("badge.background", {
  40150. dark: "#4D4D4D",
  40151. light: "#C4C4C4",
  40152. hc: i.Color.black
  40153. }, r.localize(26, null)), t.badgeForeground = u("badge.foreground", {
  40154. dark: i.Color.white,
  40155. light: "#333",
  40156. hc: i.Color.white
  40157. }, r.localize(27, null)), t.scrollbarShadow = u("scrollbar.shadow", {
  40158. dark: "#000000", light: "#DDDDDD", hc: null
  40159. }, r.localize(28, null)), t.scrollbarSliderBackground = u("scrollbarSlider.background", {
  40160. dark: i.Color.fromHex("#797979").transparent(.4),
  40161. light: i.Color.fromHex("#646464").transparent(.4),
  40162. hc: h(t.contrastBorder, .6)
  40163. }, r.localize(29, null)), t.scrollbarSliderHoverBackground = u("scrollbarSlider.hoverBackground", {
  40164. dark: i.Color.fromHex("#646464").transparent(.7),
  40165. light: i.Color.fromHex("#646464").transparent(.7),
  40166. hc: h(t.contrastBorder, .8)
  40167. }, r.localize(30, null)), t.scrollbarSliderActiveBackground = u("scrollbarSlider.activeBackground", {
  40168. dark: i.Color.fromHex("#BFBFBF").transparent(.4),
  40169. light: i.Color.fromHex("#000000").transparent(.6),
  40170. hc: t.contrastBorder
  40171. }, r.localize(31, null)), t.progressBarBackground = u("progressBar.background", {
  40172. dark: i.Color.fromHex("#0E70C0"),
  40173. light: i.Color.fromHex("#0E70C0"),
  40174. hc: t.contrastBorder
  40175. }, r.localize(32, null)), t.editorErrorForeground = u("editorError.foreground", {
  40176. dark: "#F48771",
  40177. light: "#E51400",
  40178. hc: null
  40179. }, r.localize(33, null)), t.editorErrorBorder = u("editorError.border", {
  40180. dark: null, light: null,
  40181. hc: i.Color.fromHex("#E47777").transparent(.8)
  40182. }, r.localize(34, null)), t.editorWarningForeground = u("editorWarning.foreground", {
  40183. dark: "#CCA700",
  40184. light: "#E9A700",
  40185. hc: null
  40186. }, r.localize(35, null)), t.editorWarningBorder = u("editorWarning.border", {
  40187. dark: null,
  40188. light: null,
  40189. hc: i.Color.fromHex("#FFCC00").transparent(.8)
  40190. }, r.localize(36, null)), t.editorInfoForeground = u("editorInfo.foreground", {
  40191. dark: "#75BEFF",
  40192. light: "#75BEFF",
  40193. hc: null
  40194. }, r.localize(37, null)), t.editorInfoBorder = u("editorInfo.border", {
  40195. dark: null,
  40196. light: null,
  40197. hc: i.Color.fromHex("#75BEFF").transparent(.8)
  40198. }, r.localize(38, null)), t.editorHintForeground = u("editorHint.foreground", {
  40199. dark: i.Color.fromHex("#eeeeee").transparent(.7),
  40200. light: "#6c6c6c",
  40201. hc: null
  40202. }, r.localize(39, null)), t.editorHintBorder = u("editorHint.border", {
  40203. dark: null,
  40204. light: null,
  40205. hc: i.Color.fromHex("#eeeeee").transparent(.8)
  40206. }, r.localize(40, null)), t.editorBackground = u("editor.background", {
  40207. light: "#fffffe",
  40208. dark: "#1E1E1E",
  40209. hc: i.Color.black
  40210. }, r.localize(41, null)), t.editorForeground = u("editor.foreground", {
  40211. light: "#333333", dark: "#BBBBBB",
  40212. hc: i.Color.white
  40213. }, r.localize(42, null)), t.editorWidgetBackground = u("editorWidget.background", {
  40214. dark: "#252526",
  40215. light: "#F3F3F3",
  40216. hc: "#0C141F"
  40217. }, r.localize(43, null)), t.editorWidgetForeground = u("editorWidget.foreground", {
  40218. dark: t.foreground,
  40219. light: t.foreground,
  40220. hc: t.foreground
  40221. }, r.localize(44, null)), t.editorWidgetBorder = u("editorWidget.border", {
  40222. dark: "#454545",
  40223. light: "#C8C8C8",
  40224. hc: t.contrastBorder
  40225. }, r.localize(45, null)), t.editorWidgetResizeBorder = u("editorWidget.resizeBorder", {
  40226. light: null,
  40227. dark: null,
  40228. hc: null
  40229. }, r.localize(46, null)), t.editorSelectionBackground = u("editor.selectionBackground", {
  40230. light: "#ADD6FF",
  40231. dark: "#264F78",
  40232. hc: "#f3f518"
  40233. }, r.localize(47, null)), t.editorSelectionForeground = u("editor.selectionForeground", {
  40234. light: null,
  40235. dark: null,
  40236. hc: "#000000"
  40237. }, r.localize(48, null)), t.editorInactiveSelection = u("editor.inactiveSelectionBackground", {
  40238. light: h(t.editorSelectionBackground, .5),
  40239. dark: h(t.editorSelectionBackground, .5),
  40240. hc: h(t.editorSelectionBackground, .5)
  40241. }, r.localize(49, null), !0),
  40242. t.editorSelectionHighlight = u("editor.selectionHighlightBackground", {
  40243. light: p(t.editorSelectionBackground, t.editorBackground, .3, .6),
  40244. dark: p(t.editorSelectionBackground, t.editorBackground, .3, .6),
  40245. hc: null
  40246. }, r.localize(50, null), !0), t.editorSelectionHighlightBorder = u("editor.selectionHighlightBorder", {
  40247. light: null,
  40248. dark: null,
  40249. hc: t.activeContrastBorder
  40250. }, r.localize(51, null)), t.editorFindMatch = u("editor.findMatchBackground", {
  40251. light: "#A8AC94",
  40252. dark: "#515C6A",
  40253. hc: null
  40254. }, r.localize(52, null)), t.editorFindMatchHighlight = u("editor.findMatchHighlightBackground", {
  40255. light: "#EA5C0055",
  40256. dark: "#EA5C0055",
  40257. hc: null
  40258. }, r.localize(53, null), !0), t.editorFindRangeHighlight = u("editor.findRangeHighlightBackground", {
  40259. dark: "#3a3d4166",
  40260. light: "#b4b4b44d",
  40261. hc: null
  40262. }, r.localize(54, null), !0), t.editorFindMatchBorder = u("editor.findMatchBorder", {
  40263. light: null,
  40264. dark: null,
  40265. hc: t.activeContrastBorder
  40266. }, r.localize(55, null)), t.editorFindMatchHighlightBorder = u("editor.findMatchHighlightBorder", {
  40267. light: null,
  40268. dark: null,
  40269. hc: t.activeContrastBorder
  40270. }, r.localize(56, null)),
  40271. t.editorFindRangeHighlightBorder = u("editor.findRangeHighlightBorder", {
  40272. dark: null,
  40273. light: null,
  40274. hc: h(t.activeContrastBorder, .4)
  40275. }, r.localize(57, null), !0), t.editorHoverHighlight = u("editor.hoverHighlightBackground", {
  40276. light: "#ADD6FF26",
  40277. dark: "#264f7840",
  40278. hc: "#ADD6FF26"
  40279. }, r.localize(58, null), !0), t.editorHoverBackground = u("editorHoverWidget.background", {
  40280. light: t.editorWidgetBackground,
  40281. dark: t.editorWidgetBackground,
  40282. hc: t.editorWidgetBackground
  40283. }, r.localize(59, null)), t.editorHoverForeground = u("editorHoverWidget.foreground", {
  40284. light: t.editorWidgetForeground,
  40285. dark: t.editorWidgetForeground,
  40286. hc: t.editorWidgetForeground
  40287. }, r.localize(60, null)), t.editorHoverBorder = u("editorHoverWidget.border", {
  40288. light: t.editorWidgetBorder,
  40289. dark: t.editorWidgetBorder,
  40290. hc: t.editorWidgetBorder
  40291. }, r.localize(61, null)), t.editorHoverStatusBarBackground = u("editorHoverWidget.statusBarBackground", {
  40292. dark: c(t.editorHoverBackground, .2),
  40293. light: d(t.editorHoverBackground, .05),
  40294. hc: t.editorWidgetBackground
  40295. }, r.localize(62, null)),
  40296. t.editorActiveLinkForeground = u("editorLink.activeForeground", {
  40297. dark: "#4E94CE",
  40298. light: i.Color.blue,
  40299. hc: i.Color.cyan
  40300. }, r.localize(63, null)), t.editorLightBulbForeground = u("editorLightBulb.foreground", {
  40301. dark: "#FFCC00",
  40302. light: "#DDB100",
  40303. hc: "#FFCC00"
  40304. }, r.localize(64, null)), t.editorLightBulbAutoFixForeground = u("editorLightBulbAutoFix.foreground", {
  40305. dark: "#75BEFF",
  40306. light: "#007ACC",
  40307. hc: "#75BEFF"
  40308. }, r.localize(65, null)), t.defaultInsertColor = new i.Color(new i.RGBA(155, 185, 85, .2)), t.defaultRemoveColor = new i.Color(new i.RGBA(255, 0, 0, .2)), t.diffInserted = u("diffEditor.insertedTextBackground", {
  40309. dark: t.defaultInsertColor,
  40310. light: t.defaultInsertColor,
  40311. hc: null
  40312. }, r.localize(66, null), !0), t.diffRemoved = u("diffEditor.removedTextBackground", {
  40313. dark: t.defaultRemoveColor,
  40314. light: t.defaultRemoveColor,
  40315. hc: null
  40316. }, r.localize(67, null), !0), t.diffInsertedOutline = u("diffEditor.insertedTextBorder", {
  40317. dark: null,
  40318. light: null,
  40319. hc: "#33ff2eff"
  40320. }, r.localize(68, null)), t.diffRemovedOutline = u("diffEditor.removedTextBorder", {
  40321. dark: null,
  40322. light: null,
  40323. hc: "#FF008F"
  40324. }, r.localize(69, null)),
  40325. t.diffBorder = u("diffEditor.border", {
  40326. dark: null,
  40327. light: null,
  40328. hc: t.contrastBorder
  40329. }, r.localize(70, null)), t.listFocusBackground = u("list.focusBackground", {
  40330. dark: "#062F4A",
  40331. light: "#D6EBFF",
  40332. hc: null
  40333. }, r.localize(71, null)), t.listFocusForeground = u("list.focusForeground", {
  40334. dark: null,
  40335. light: null,
  40336. hc: null
  40337. }, r.localize(72, null)), t.listActiveSelectionBackground = u("list.activeSelectionBackground", {
  40338. dark: "#094771",
  40339. light: "#0074E8",
  40340. hc: null
  40341. }, r.localize(73, null)), t.listActiveSelectionForeground = u("list.activeSelectionForeground", {
  40342. dark: i.Color.white,
  40343. light: i.Color.white,
  40344. hc: null
  40345. }, r.localize(74, null)), t.listInactiveSelectionBackground = u("list.inactiveSelectionBackground", {
  40346. dark: "#37373D",
  40347. light: "#E4E6F1",
  40348. hc: null
  40349. }, r.localize(75, null)), t.listInactiveSelectionForeground = u("list.inactiveSelectionForeground", {
  40350. dark: null,
  40351. light: null,
  40352. hc: null
  40353. }, r.localize(76, null)), t.listInactiveFocusBackground = u("list.inactiveFocusBackground", {
  40354. dark: null,
  40355. light: null,
  40356. hc: null
  40357. }, r.localize(77, null)), t.listHoverBackground = u("list.hoverBackground", {
  40358. dark: "#2A2D2E", light: "#F0F0F0",
  40359. hc: null
  40360. }, r.localize(78, null)), t.listHoverForeground = u("list.hoverForeground", {
  40361. dark: null,
  40362. light: null,
  40363. hc: null
  40364. }, r.localize(79, null)), t.listDropBackground = u("list.dropBackground", {
  40365. dark: t.listFocusBackground,
  40366. light: t.listFocusBackground,
  40367. hc: null
  40368. }, r.localize(80, null)), t.listHighlightForeground = u("list.highlightForeground", {
  40369. dark: "#0097fb",
  40370. light: "#0066BF",
  40371. hc: t.focusBorder
  40372. }, r.localize(81, null)), t.listFilterWidgetBackground = u("listFilterWidget.background", {
  40373. light: "#efc1ad",
  40374. dark: "#653723",
  40375. hc: i.Color.black
  40376. }, r.localize(82, null)), t.listFilterWidgetOutline = u("listFilterWidget.outline", {
  40377. dark: i.Color.transparent,
  40378. light: i.Color.transparent,
  40379. hc: "#f38518"
  40380. }, r.localize(83, null)), t.listFilterWidgetNoMatchesOutline = u("listFilterWidget.noMatchesOutline", {
  40381. dark: "#BE1100",
  40382. light: "#BE1100",
  40383. hc: t.contrastBorder
  40384. }, r.localize(84, null)), t.treeIndentGuidesStroke = u("tree.indentGuidesStroke", {
  40385. dark: "#585858",
  40386. light: "#a9a9a9",
  40387. hc: "#a9a9a9"
  40388. }, r.localize(85, null)), t.menuBorder = u("menu.border", {
  40389. dark: null,
  40390. light: null,
  40391. hc: t.contrastBorder
  40392. }, r.localize(86, null)),
  40393. t.menuForeground = u("menu.foreground", {
  40394. dark: t.selectForeground,
  40395. light: t.foreground,
  40396. hc: t.selectForeground
  40397. }, r.localize(87, null)), t.menuBackground = u("menu.background", {
  40398. dark: t.selectBackground,
  40399. light: t.selectBackground,
  40400. hc: t.selectBackground
  40401. }, r.localize(88, null)), t.menuSelectionForeground = u("menu.selectionForeground", {
  40402. dark: t.listActiveSelectionForeground,
  40403. light: t.listActiveSelectionForeground,
  40404. hc: t.listActiveSelectionForeground
  40405. }, r.localize(89, null)), t.menuSelectionBackground = u("menu.selectionBackground", {
  40406. dark: t.listActiveSelectionBackground,
  40407. light: t.listActiveSelectionBackground,
  40408. hc: t.listActiveSelectionBackground
  40409. }, r.localize(90, null)), t.menuSelectionBorder = u("menu.selectionBorder", {
  40410. dark: null,
  40411. light: null,
  40412. hc: t.activeContrastBorder
  40413. }, r.localize(91, null)), t.menuSeparatorBackground = u("menu.separatorBackground", {
  40414. dark: "#BBBBBB",
  40415. light: "#888888",
  40416. hc: t.contrastBorder
  40417. }, r.localize(92, null)), t.snippetTabstopHighlightBackground = u("editor.snippetTabstopHighlightBackground", {
  40418. dark: new i.Color(new i.RGBA(124, 124, 124, .3)),
  40419. light: new i.Color(new i.RGBA(10, 50, 100, .2)), hc: new i.Color(new i.RGBA(124, 124, 124, .3))
  40420. }, r.localize(93, null)), t.snippetTabstopHighlightBorder = u("editor.snippetTabstopHighlightBorder", {
  40421. dark: null,
  40422. light: null,
  40423. hc: null
  40424. }, r.localize(94, null)), t.snippetFinalTabstopHighlightBackground = u("editor.snippetFinalTabstopHighlightBackground", {
  40425. dark: null,
  40426. light: null,
  40427. hc: null
  40428. }, r.localize(95, null)), t.snippetFinalTabstopHighlightBorder = u("editor.snippetFinalTabstopHighlightBorder", {
  40429. dark: "#525252",
  40430. light: new i.Color(new i.RGBA(10, 50, 100, .5)),
  40431. hc: "#525252"
  40432. }, r.localize(96, null)),t.overviewRulerFindMatchForeground = u("editorOverviewRuler.findMatchForeground", {
  40433. dark: "#d186167e",
  40434. light: "#d186167e",
  40435. hc: "#AB5A00"
  40436. }, r.localize(97, null), !0),t.overviewRulerSelectionHighlightForeground = u("editorOverviewRuler.selectionHighlightForeground", {
  40437. dark: "#A0A0A0CC",
  40438. light: "#A0A0A0CC",
  40439. hc: "#A0A0A0CC"
  40440. }, r.localize(98, null), !0),t.minimapFindMatch = u("minimap.findMatchHighlight", {
  40441. light: "#d18616",
  40442. dark: "#d18616",
  40443. hc: "#AB5A00"
  40444. }, r.localize(99, null), !0),
  40445. t.minimapSelection = u("minimap.selectionHighlight", {
  40446. light: "#ADD6FF",
  40447. dark: "#264F78",
  40448. hc: "#ffffff"
  40449. }, r.localize(100, null), !0),t.minimapError = u("minimap.errorHighlight", {
  40450. dark: new i.Color(new i.RGBA(255, 18, 18, .7)),
  40451. light: new i.Color(new i.RGBA(255, 18, 18, .7)),
  40452. hc: new i.Color(new i.RGBA(255, 50, 50, 1))
  40453. }, r.localize(101, null)),t.minimapWarning = u("minimap.warningHighlight", {
  40454. dark: t.editorWarningForeground,
  40455. light: t.editorWarningForeground,
  40456. hc: t.editorWarningBorder
  40457. }, r.localize(102, null)),t.problemsErrorIconForeground = u("problemsErrorIcon.foreground", {
  40458. dark: t.editorErrorForeground,
  40459. light: t.editorErrorForeground,
  40460. hc: t.editorErrorForeground
  40461. }, r.localize(103, null)),t.problemsWarningIconForeground = u("problemsWarningIcon.foreground", {
  40462. dark: t.editorWarningForeground,
  40463. light: t.editorWarningForeground,
  40464. hc: t.editorWarningForeground
  40465. }, r.localize(104, null)),t.problemsInfoIconForeground = u("problemsInfoIcon.foreground", {
  40466. dark: t.editorInfoForeground,
  40467. light: t.editorInfoForeground,
  40468. hc: t.editorInfoForeground
  40469. }, r.localize(105, null)),t.darken = d,t.lighten = c,
  40470. t.transparent = h,t.oneOf = function () {
  40471. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  40472. return function (t) {
  40473. for (var n = 0, i = e; n < i.length; n++) {
  40474. var o = g(i[n], t);
  40475. if (o) return o
  40476. }
  40477. }
  40478. },t.resolveColorValue = g,t.workbenchColorsSchemaId = "vscode://schemas/workbench-colors";
  40479. var f = n.Registry.as(s.Extensions.JSONContribution);
  40480. f.registerSchema(t.workbenchColorsSchemaId, l.getColorSchema());
  40481. var m = new a.RunOnceScheduler((function () {
  40482. return f.notifySchemaChanged(t.workbenchColorsSchemaId)
  40483. }), 200);
  40484. l.onDidChangeSchema((function () {
  40485. m.isScheduled() || m.schedule()
  40486. }))
  40487. })), define(n[97], i([0, 1, 20]), (function (e, t, n) {
  40488. "use strict";
  40489. function i(e, t) {
  40490. var i = Object.create(null);
  40491. for (var o in t) {
  40492. var r = t[o];
  40493. r && (i[o] = n.resolveColorValue(r, e))
  40494. }
  40495. return i
  40496. }
  40497. function o(e, t, n) {
  40498. function o(o) {
  40499. var r = i(e.getTheme(), t);
  40500. "function" == typeof n ? n(r) : n.style(r)
  40501. }
  40502. return o(e.getTheme()), e.onThemeChange(o)
  40503. }
  40504. Object.defineProperty(t, "__esModule", {value: !0}), t.computeStyles = i, t.attachStyler = o, t.attachBadgeStyler = function (e, t, i) {
  40505. return o(t, {
  40506. badgeBackground: i && i.badgeBackground || n.badgeBackground,
  40507. badgeForeground: i && i.badgeForeground || n.badgeForeground,
  40508. badgeBorder: n.contrastBorder
  40509. }, e)
  40510. }, t.attachQuickOpenStyler = function (e, t, i) {
  40511. return o(t, {
  40512. foreground: i && i.foreground || n.foreground,
  40513. background: i && i.background || n.editorBackground,
  40514. borderColor: i && i.borderColor || n.contrastBorder,
  40515. widgetShadow: i && i.widgetShadow || n.widgetShadow,
  40516. progressBarBackground: i && i.progressBarBackground || n.progressBarBackground,
  40517. pickerGroupForeground: i && i.pickerGroupForeground || n.pickerGroupForeground,
  40518. pickerGroupBorder: i && i.pickerGroupBorder || n.pickerGroupBorder,
  40519. inputBackground: i && i.inputBackground || n.inputBackground,
  40520. inputForeground: i && i.inputForeground || n.inputForeground,
  40521. inputBorder: i && i.inputBorder || n.inputBorder,
  40522. inputValidationInfoBorder: i && i.inputValidationInfoBorder || n.inputValidationInfoBorder,
  40523. inputValidationInfoBackground: i && i.inputValidationInfoBackground || n.inputValidationInfoBackground,
  40524. inputValidationInfoForeground: i && i.inputValidationInfoForeground || n.inputValidationInfoForeground,
  40525. inputValidationWarningBorder: i && i.inputValidationWarningBorder || n.inputValidationWarningBorder,
  40526. inputValidationWarningBackground: i && i.inputValidationWarningBackground || n.inputValidationWarningBackground,
  40527. inputValidationWarningForeground: i && i.inputValidationWarningForeground || n.inputValidationWarningForeground,
  40528. inputValidationErrorBorder: i && i.inputValidationErrorBorder || n.inputValidationErrorBorder,
  40529. inputValidationErrorBackground: i && i.inputValidationErrorBackground || n.inputValidationErrorBackground,
  40530. inputValidationErrorForeground: i && i.inputValidationErrorForeground || n.inputValidationErrorForeground,
  40531. listFocusBackground: i && i.listFocusBackground || n.listFocusBackground,
  40532. listFocusForeground: i && i.listFocusForeground || n.listFocusForeground,
  40533. listActiveSelectionBackground: i && i.listActiveSelectionBackground || n.darken(n.listActiveSelectionBackground, .1),
  40534. listActiveSelectionForeground: i && i.listActiveSelectionForeground || n.listActiveSelectionForeground,
  40535. listFocusAndSelectionBackground: i && i.listFocusAndSelectionBackground || n.listActiveSelectionBackground,
  40536. listFocusAndSelectionForeground: i && i.listFocusAndSelectionForeground || n.listActiveSelectionForeground,
  40537. listInactiveSelectionBackground: i && i.listInactiveSelectionBackground || n.listInactiveSelectionBackground,
  40538. listInactiveSelectionForeground: i && i.listInactiveSelectionForeground || n.listInactiveSelectionForeground,
  40539. listInactiveFocusBackground: i && i.listInactiveFocusBackground || n.listInactiveFocusBackground,
  40540. listHoverBackground: i && i.listHoverBackground || n.listHoverBackground,
  40541. listHoverForeground: i && i.listHoverForeground || n.listHoverForeground,
  40542. listDropBackground: i && i.listDropBackground || n.listDropBackground,
  40543. listFocusOutline: i && i.listFocusOutline || n.activeContrastBorder,
  40544. listSelectionOutline: i && i.listSelectionOutline || n.activeContrastBorder,
  40545. listHoverOutline: i && i.listHoverOutline || n.activeContrastBorder
  40546. }, e)
  40547. },
  40548. t.attachListStyler = function (e, n, i) {
  40549. return o(n, l(l({}, t.defaultListStyles), i || {}), e)
  40550. }, t.defaultListStyles = {
  40551. listFocusBackground: n.listFocusBackground,
  40552. listFocusForeground: n.listFocusForeground,
  40553. listActiveSelectionBackground: n.darken(n.listActiveSelectionBackground, .1),
  40554. listActiveSelectionForeground: n.listActiveSelectionForeground,
  40555. listFocusAndSelectionBackground: n.listActiveSelectionBackground,
  40556. listFocusAndSelectionForeground: n.listActiveSelectionForeground,
  40557. listInactiveSelectionBackground: n.listInactiveSelectionBackground,
  40558. listInactiveSelectionForeground: n.listInactiveSelectionForeground,
  40559. listInactiveFocusBackground: n.listInactiveFocusBackground,
  40560. listHoverBackground: n.listHoverBackground,
  40561. listHoverForeground: n.listHoverForeground,
  40562. listDropBackground: n.listDropBackground,
  40563. listFocusOutline: n.activeContrastBorder,
  40564. listSelectionOutline: n.activeContrastBorder,
  40565. listHoverOutline: n.activeContrastBorder,
  40566. listFilterWidgetBackground: n.listFilterWidgetBackground,
  40567. listFilterWidgetOutline: n.listFilterWidgetOutline,
  40568. listFilterWidgetNoMatchesOutline: n.listFilterWidgetNoMatchesOutline,
  40569. listMatchesShadow: n.widgetShadow,
  40570. treeIndentGuidesStroke: n.treeIndentGuidesStroke
  40571. }, t.defaultMenuStyles = {
  40572. shadowColor: n.widgetShadow,
  40573. borderColor: n.menuBorder,
  40574. foregroundColor: n.menuForeground,
  40575. backgroundColor: n.menuBackground,
  40576. selectionForegroundColor: n.menuSelectionForeground,
  40577. selectionBackgroundColor: n.menuSelectionBackground,
  40578. selectionBorderColor: n.menuSelectionBorder,
  40579. separatorColor: n.menuSeparatorBackground
  40580. }, t.attachMenuStyler = function (e, n, i) {
  40581. return o(n, l(l({}, t.defaultMenuStyles), i), e)
  40582. }
  40583. })), define(n[546], i([0, 1, 6, 414, 20, 97]), (function (e, t, n, i, o, r) {
  40584. "use strict";
  40585. Object.defineProperty(t, "__esModule", {value: !0});
  40586. var s = function () {
  40587. function e(e, t, n, s, a, l) {
  40588. this.codeEditor = e, this.themeService = l, this.visible = !1, this.domNode = document.createElement("div"), this.quickOpenWidget = new i.QuickOpenWidget(this.domNode, {
  40589. onOk: t,
  40590. onCancel: n,
  40591. onType: s
  40592. }, {inputPlaceHolder: void 0, inputAriaLabel: a.inputAriaLabel, keyboardSupport: !0}),
  40593. this.styler = r.attachQuickOpenStyler(this.quickOpenWidget, this.themeService, {pickerGroupForeground: o.foreground}), this.quickOpenWidget.create(), this.codeEditor.addOverlayWidget(this)
  40594. }
  40595. return e.prototype.setInput = function (e, t) {
  40596. this.quickOpenWidget.setInput(e, t)
  40597. }, e.prototype.getId = function () {
  40598. return e.ID
  40599. }, e.prototype.getDomNode = function () {
  40600. return this.domNode
  40601. }, e.prototype.destroy = function () {
  40602. this.codeEditor.removeOverlayWidget(this), this.quickOpenWidget.dispose(), this.styler.dispose()
  40603. }, e.prototype.show = function (e) {
  40604. this.visible = !0;
  40605. var t = this.codeEditor.getLayoutInfo();
  40606. t && this.quickOpenWidget.layout(new n.Dimension(t.width, t.height)), this.quickOpenWidget.show(e), this.codeEditor.layoutOverlayWidget(this)
  40607. }, e.prototype.getPosition = function () {
  40608. return this.visible ? {preference: 2} : null
  40609. }, e.ID = "editor.contrib.quickOpenEditorWidget", e
  40610. }();
  40611. t.QuickOpenEditorWidget = s
  40612. })), define(n[547], i([0, 1, 55, 2, 205, 6, 97, 52, 45, 332]), (function (e, t, n, i, o, r, s, a, l) {
  40613. "use strict";
  40614. Object.defineProperty(t, "__esModule", {value: !0});
  40615. var u = function () {
  40616. function e(e, t, n, i, o) {
  40617. this.contextViewService = e, this.telemetryService = t, this.notificationService = n, this.keybindingService = i, this.themeService = o, this.focusToReturn = null, this.block = null, this.options = {blockMouse: !0}
  40618. }
  40619. return e.prototype.configure = function (e) {
  40620. this.options = e
  40621. }, e.prototype.showContextMenu = function (e) {
  40622. var t, u = this, d = e.getActions();
  40623. d.length && (this.focusToReturn = document.activeElement, this.contextViewService.showContextView({
  40624. getAnchor: function () {
  40625. return e.getAnchor()
  40626. }, canRelayout: !1, anchorAlignment: e.anchorAlignment, render: function (c) {
  40627. var h = e.getMenuClassName ? e.getMenuClassName() : "";
  40628. h && (c.className += " " + h), u.options.blockMouse && (u.block = c.appendChild(r.$(".context-view-block")));
  40629. var p = new i.DisposableStore, g = e.actionRunner || new n.ActionRunner;
  40630. return g.onDidBeforeRun(u.onActionRun, u, p), g.onDidRun(u.onDidActionRun, u, p), t = new o.Menu(c, d, {
  40631. actionViewItemProvider: e.getActionViewItem,
  40632. context: e.getActionsContext ? e.getActionsContext() : null,
  40633. actionRunner: g,
  40634. getKeyBinding: e.getKeyBinding ? e.getKeyBinding : function (e) {
  40635. return u.keybindingService.lookupKeybinding(e.id)
  40636. }
  40637. }), p.add(s.attachMenuStyler(t, u.themeService)), t.onDidCancel((function () {
  40638. return u.contextViewService.hideContextView(!0)
  40639. }), null, p), t.onDidBlur((function () {
  40640. return u.contextViewService.hideContextView(!0)
  40641. }), null, p), a.domEvent(window, r.EventType.BLUR)((function () {
  40642. u.contextViewService.hideContextView(!0)
  40643. }), null, p), a.domEvent(window, r.EventType.MOUSE_DOWN)((function (e) {
  40644. if (!e.defaultPrevented) {
  40645. var t = new l.StandardMouseEvent(e), n = t.target;
  40646. if (!t.rightButton) {
  40647. for (; n;) {
  40648. if (n === c) return;
  40649. n = n.parentElement
  40650. }
  40651. u.contextViewService.hideContextView(!0)
  40652. }
  40653. }
  40654. }), null, p), i.combinedDisposable(p, t)
  40655. }, focus: function () {
  40656. t && t.focus(!!e.autoSelectFirstItem)
  40657. }, onHide: function (t) {
  40658. e.onHide && e.onHide(!!t), u.block && (r.removeNode(u.block), u.block = null), u.focusToReturn && u.focusToReturn.focus()
  40659. }
  40660. }))
  40661. }, e.prototype.onActionRun = function (e) {
  40662. this.telemetryService && this.telemetryService.publicLog2("workbenchActionExecuted", {
  40663. id: e.action.id,
  40664. from: "contextMenu"
  40665. }), this.contextViewService.hideContextView(!1),
  40666. this.focusToReturn && this.focusToReturn.focus()
  40667. }, e.prototype.onDidActionRun = function (e) {
  40668. e.error && this.notificationService && this.notificationService.error(e.error)
  40669. }, e
  40670. }();
  40671. t.ContextMenuHandler = u
  40672. })), define(n[14], i([0, 1, 11, 2, 42, 4]), (function (e, t, n, i, o, r) {
  40673. "use strict";
  40674. Object.defineProperty(t, "__esModule", {value: !0}), t.IThemeService = n.createDecorator("themeService"), t.themeColorFromId = function (e) {
  40675. return {id: e}
  40676. }, t.DARK = "dark", t.HIGH_CONTRAST = "hc", t.getThemeTypeSelector = function (e) {
  40677. switch (e) {
  40678. case t.DARK:
  40679. return "vs-dark";
  40680. case t.HIGH_CONTRAST:
  40681. return "hc-black";
  40682. default:
  40683. return "vs"
  40684. }
  40685. }, t.Extensions = {ThemingContribution: "base.contributions.theming"};
  40686. var s = new (function () {
  40687. function e() {
  40688. this.themingParticipants = [], this.themingParticipants = [], this.onThemingParticipantAddedEmitter = new r.Emitter
  40689. }
  40690. return e.prototype.onThemeChange = function (e) {
  40691. var t = this;
  40692. return this.themingParticipants.push(e), this.onThemingParticipantAddedEmitter.fire(e), i.toDisposable((function () {
  40693. var n = t.themingParticipants.indexOf(e);
  40694. t.themingParticipants.splice(n, 1)
  40695. }))
  40696. }, e.prototype.getThemingParticipants = function () {
  40697. return this.themingParticipants
  40698. }, e
  40699. }());
  40700. o.Registry.add(t.Extensions.ThemingContribution, s), t.registerThemingParticipant = function (e) {
  40701. return s.onThemeChange(e)
  40702. }
  40703. })), define(n[548], i([0, 1, 6, 2, 5, 25, 334, 68, 48, 14]), (function (e, t, n, i, o, s, a, l, u, d) {
  40704. "use strict";
  40705. Object.defineProperty(t, "__esModule", {value: !0});
  40706. var c = function () {
  40707. function e(e, t, n) {
  40708. this._parent = e, this._editorId = t, this.styleSheet = n, this._refCount = 0
  40709. }
  40710. return e.prototype.ref = function () {
  40711. this._refCount++
  40712. }, e.prototype.unref = function () {
  40713. var e;
  40714. this._refCount--, 0 === this._refCount && (null === (e = this.styleSheet.parentNode) || void 0 === e || e.removeChild(this.styleSheet), this._parent._removeEditorStyleSheets(this._editorId))
  40715. }, e
  40716. }(), p = function () {
  40717. function e(e) {
  40718. this.styleSheet = e
  40719. }
  40720. return e.prototype.ref = function () {
  40721. }, e.prototype.unref = function () {
  40722. }, e
  40723. }(), f = function (e) {
  40724. function t(t, n) {
  40725. void 0 === n && (n = null);
  40726. var i = e.call(this) || this;
  40727. return i._decorationOptionProviders = new Map, i._editorStyleSheets = new Map, i._globalStyleSheet = n ? new p(n) : null,
  40728. i._themeService = t, i
  40729. }
  40730. return r(t, e), t.prototype._getOrCreateGlobalStyleSheet = function () {
  40731. return this._globalStyleSheet || (this._globalStyleSheet = new p(n.createStyleSheet())), this._globalStyleSheet
  40732. }, t.prototype._getOrCreateStyleSheet = function (e) {
  40733. if (!e) return this._getOrCreateGlobalStyleSheet();
  40734. var t = e.getContainerDomNode();
  40735. if (!n.isInShadowDOM(t)) return this._getOrCreateGlobalStyleSheet();
  40736. var i = e.getId();
  40737. if (!this._editorStyleSheets.has(i)) {
  40738. var o = new c(this, i, n.createStyleSheet(t));
  40739. this._editorStyleSheets.set(i, o)
  40740. }
  40741. return this._editorStyleSheets.get(i)
  40742. }, t.prototype._removeEditorStyleSheets = function (e) {
  40743. this._editorStyleSheets.delete(e)
  40744. }, t.prototype.registerDecorationType = function (e, t, n, i) {
  40745. var o = this._decorationOptionProviders.get(e);
  40746. if (!o) {
  40747. var r = this._getOrCreateStyleSheet(i),
  40748. s = {styleSheet: r.styleSheet, key: e, parentTypeKey: n, options: t || Object.create(null)};
  40749. o = n ? new m(this._themeService, r, s) : new v(this._themeService, r, s), this._decorationOptionProviders.set(e, o)
  40750. }
  40751. o.refCount++
  40752. }, t.prototype.removeDecorationType = function (e) {
  40753. var t = this._decorationOptionProviders.get(e);
  40754. t && (t.refCount--, t.refCount <= 0 && (this._decorationOptionProviders.delete(e), t.dispose(), this.listCodeEditors().forEach((function (t) {
  40755. return t.removeDecorations(e)
  40756. }))))
  40757. }, t.prototype.resolveDecorationOptions = function (e, t) {
  40758. var n = this._decorationOptionProviders.get(e);
  40759. if (!n) throw new Error("Unknown decoration type key: " + e);
  40760. return n.getOptions(this, t)
  40761. }, t = h([g(0, d.IThemeService)], t)
  40762. }(a.AbstractCodeEditorService);
  40763. t.CodeEditorServiceImpl = f;
  40764. var m = function () {
  40765. function e(e, t, n) {
  40766. this._styleSheet = t, this._styleSheet.ref(), this._parentTypeKey = n.parentTypeKey, this.refCount = 0, this._beforeContentRules = new y(3, n, e), this._afterContentRules = new y(4, n, e)
  40767. }
  40768. return e.prototype.getOptions = function (e, t) {
  40769. var n = e.resolveDecorationOptions(this._parentTypeKey, !0);
  40770. return this._beforeContentRules && (n.beforeContentClassName = this._beforeContentRules.className), this._afterContentRules && (n.afterContentClassName = this._afterContentRules.className), n
  40771. }, e.prototype.dispose = function () {
  40772. this._beforeContentRules && (this._beforeContentRules.dispose(), this._beforeContentRules = null), this._afterContentRules && (this._afterContentRules.dispose(), this._afterContentRules = null), this._styleSheet.unref()
  40773. }, e
  40774. }(), v = function () {
  40775. function e(e, t, n) {
  40776. var o = this;
  40777. this._disposables = new i.DisposableStore, this._styleSheet = t, this._styleSheet.ref(), this.refCount = 0;
  40778. var r = function (t) {
  40779. var i = new y(t, n, e);
  40780. if (o._disposables.add(i), i.hasContent) return i.className
  40781. };
  40782. this.className = r(0);
  40783. var s, a = (s = new y(1, n, e), o._disposables.add(s), s.hasContent ? {
  40784. className: s.className,
  40785. hasLetterSpacing: s.hasLetterSpacing
  40786. } : null);
  40787. a && (this.inlineClassName = a.className, this.inlineClassNameAffectsLetterSpacing = a.hasLetterSpacing), this.beforeContentClassName = r(3), this.afterContentClassName = r(4), this.glyphMarginClassName = r(2);
  40788. var l = n.options;
  40789. this.isWholeLine = Boolean(l.isWholeLine), this.stickiness = l.rangeBehavior;
  40790. var d = l.light && l.light.overviewRulerColor || l.overviewRulerColor,
  40791. c = l.dark && l.dark.overviewRulerColor || l.overviewRulerColor
  40792. ;void 0 === d && void 0 === c || (this.overviewRuler = {
  40793. color: d || c,
  40794. darkColor: c || d,
  40795. position: l.overviewRulerLane || u.OverviewRulerLane.Center
  40796. })
  40797. }
  40798. return e.prototype.getOptions = function (e, t) {
  40799. return t ? {
  40800. inlineClassName: this.inlineClassName,
  40801. beforeContentClassName: this.beforeContentClassName,
  40802. afterContentClassName: this.afterContentClassName,
  40803. className: this.className,
  40804. glyphMarginClassName: this.glyphMarginClassName,
  40805. isWholeLine: this.isWholeLine,
  40806. overviewRuler: this.overviewRuler,
  40807. stickiness: this.stickiness
  40808. } : this
  40809. }, e.prototype.dispose = function () {
  40810. this._disposables.dispose(), this._styleSheet.unref()
  40811. }, e
  40812. }(), _ = {
  40813. color: "color:{0} !important;",
  40814. opacity: "opacity:{0};",
  40815. backgroundColor: "background-color:{0};",
  40816. outline: "outline:{0};",
  40817. outlineColor: "outline-color:{0};",
  40818. outlineStyle: "outline-style:{0};",
  40819. outlineWidth: "outline-width:{0};",
  40820. border: "border:{0};",
  40821. borderColor: "border-color:{0};",
  40822. borderRadius: "border-radius:{0};",
  40823. borderSpacing: "border-spacing:{0};",
  40824. borderStyle: "border-style:{0};",
  40825. borderWidth: "border-width:{0};",
  40826. fontStyle: "font-style:{0};",
  40827. fontWeight: "font-weight:{0};",
  40828. textDecoration: "text-decoration:{0};",
  40829. cursor: "cursor:{0};",
  40830. letterSpacing: "letter-spacing:{0};",
  40831. gutterIconPath: "background:{0} center center no-repeat;",
  40832. gutterIconSize: "background-size:{0};",
  40833. contentText: "content:'{0}';",
  40834. contentIconPath: "content:{0};",
  40835. margin: "margin:{0};",
  40836. width: "width:{0};",
  40837. height: "height:{0};"
  40838. }, y = function () {
  40839. function e(e, t, n) {
  40840. var i = this;
  40841. this._theme = n.getTheme(), this._ruleType = e, this._providerArgs = t, this._usesThemeColors = !1, this._hasContent = !1, this._hasLetterSpacing = !1;
  40842. var o = C.getClassName(this._providerArgs.key, e);
  40843. this._providerArgs.parentTypeKey && (o = o + " " + C.getClassName(this._providerArgs.parentTypeKey, e)), this._className = o, this._unThemedSelector = C.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, e), this._buildCSS(), this._usesThemeColors ? this._themeListener = n.onThemeChange((function (e) {
  40844. i._theme = n.getTheme(), i._removeCSS(), i._buildCSS()
  40845. })) : this._themeListener = null
  40846. }
  40847. return e.prototype.dispose = function () {
  40848. this._hasContent && (this._removeCSS(),
  40849. this._hasContent = !1), this._themeListener && (this._themeListener.dispose(), this._themeListener = null)
  40850. }, Object.defineProperty(e.prototype, "hasContent", {
  40851. get: function () {
  40852. return this._hasContent
  40853. }, enumerable: !0, configurable: !0
  40854. }), Object.defineProperty(e.prototype, "hasLetterSpacing", {
  40855. get: function () {
  40856. return this._hasLetterSpacing
  40857. }, enumerable: !0, configurable: !0
  40858. }), Object.defineProperty(e.prototype, "className", {
  40859. get: function () {
  40860. return this._className
  40861. }, enumerable: !0, configurable: !0
  40862. }), e.prototype._buildCSS = function () {
  40863. var e, t, n, i = this._providerArgs.options;
  40864. switch (this._ruleType) {
  40865. case 0:
  40866. e = this.getCSSTextForModelDecorationClassName(i), t = this.getCSSTextForModelDecorationClassName(i.light), n = this.getCSSTextForModelDecorationClassName(i.dark);
  40867. break;
  40868. case 1:
  40869. e = this.getCSSTextForModelDecorationInlineClassName(i), t = this.getCSSTextForModelDecorationInlineClassName(i.light), n = this.getCSSTextForModelDecorationInlineClassName(i.dark);
  40870. break;
  40871. case 2:
  40872. e = this.getCSSTextForModelDecorationGlyphMarginClassName(i),
  40873. t = this.getCSSTextForModelDecorationGlyphMarginClassName(i.light), n = this.getCSSTextForModelDecorationGlyphMarginClassName(i.dark);
  40874. break;
  40875. case 3:
  40876. e = this.getCSSTextForModelDecorationContentClassName(i.before), t = this.getCSSTextForModelDecorationContentClassName(i.light && i.light.before), n = this.getCSSTextForModelDecorationContentClassName(i.dark && i.dark.before);
  40877. break;
  40878. case 4:
  40879. e = this.getCSSTextForModelDecorationContentClassName(i.after), t = this.getCSSTextForModelDecorationContentClassName(i.light && i.light.after), n = this.getCSSTextForModelDecorationContentClassName(i.dark && i.dark.after);
  40880. break;
  40881. default:
  40882. throw new Error("Unknown rule type: " + this._ruleType)
  40883. }
  40884. var o = this._providerArgs.styleSheet.sheet, r = !1;
  40885. e.length > 0 && (o.insertRule(this._unThemedSelector + " {" + e + "}", 0), r = !0), t.length > 0 && (o.insertRule(".vs" + this._unThemedSelector + " {" + t + "}", 0), r = !0), n.length > 0 && (o.insertRule(".vs-dark" + this._unThemedSelector + ", .hc-black" + this._unThemedSelector + " {" + n + "}", 0), r = !0), this._hasContent = r
  40886. }, e.prototype._removeCSS = function () {
  40887. n.removeCSSRulesContainingSelector(this._unThemedSelector, this._providerArgs.styleSheet)
  40888. }, e.prototype.getCSSTextForModelDecorationClassName = function (e) {
  40889. if (!e) return "";
  40890. var t = [];
  40891. return this.collectCSSText(e, ["backgroundColor"], t), this.collectCSSText(e, ["outline", "outlineColor", "outlineStyle", "outlineWidth"], t), this.collectBorderSettingsCSSText(e, t), t.join("")
  40892. }, e.prototype.getCSSTextForModelDecorationInlineClassName = function (e) {
  40893. if (!e) return "";
  40894. var t = [];
  40895. return this.collectCSSText(e, ["fontStyle", "fontWeight", "textDecoration", "cursor", "color", "opacity", "letterSpacing"], t), e.letterSpacing && (this._hasLetterSpacing = !0), t.join("")
  40896. }, e.prototype.getCSSTextForModelDecorationContentClassName = function (e) {
  40897. if (!e) return "";
  40898. var t = [];
  40899. if (void 0 !== e) {
  40900. if (this.collectBorderSettingsCSSText(e, t), void 0 !== e.contentIconPath && t.push(o.format(_.contentIconPath, n.asCSSUrl(s.URI.revive(e.contentIconPath)))), "string" == typeof e.contentText) {
  40901. var i = e.contentText.match(/^.*$/m)[0].replace(/['\\]/g, "\\$&");
  40902. t.push(o.format(_.contentText, i))
  40903. }
  40904. this.collectCSSText(e, ["fontStyle", "fontWeight", "textDecoration", "color", "opacity", "backgroundColor", "margin"], t), this.collectCSSText(e, ["width", "height"], t) && t.push("display:inline-block;")
  40905. }
  40906. return t.join("")
  40907. }, e.prototype.getCSSTextForModelDecorationGlyphMarginClassName = function (e) {
  40908. if (!e) return "";
  40909. var t = [];
  40910. return void 0 !== e.gutterIconPath && (t.push(o.format(_.gutterIconPath, n.asCSSUrl(s.URI.revive(e.gutterIconPath)))), void 0 !== e.gutterIconSize && t.push(o.format(_.gutterIconSize, e.gutterIconSize))), t.join("")
  40911. }, e.prototype.collectBorderSettingsCSSText = function (e, t) {
  40912. return !!this.collectCSSText(e, ["border", "borderColor", "borderRadius", "borderSpacing", "borderStyle", "borderWidth"], t) && (t.push(o.format("box-sizing: border-box;")), !0)
  40913. }, e.prototype.collectCSSText = function (e, t, n) {
  40914. for (var i = n.length, r = 0, s = t; r < s.length; r++) {
  40915. var a = s[r], l = this.resolveValue(e[a]);
  40916. "string" == typeof l && n.push(o.format(_[a], l))
  40917. }
  40918. return n.length !== i
  40919. }, e.prototype.resolveValue = function (e) {
  40920. if (l.isThemeColor(e)) {
  40921. this._usesThemeColors = !0
  40922. ;var t = this._theme.getColor(e.id);
  40923. return t ? t.toString() : "transparent"
  40924. }
  40925. return e
  40926. }, e
  40927. }(), C = function () {
  40928. function e() {
  40929. }
  40930. return e.getClassName = function (e, t) {
  40931. return "ced-" + e + "-" + t
  40932. }, e.getSelector = function (e, t, n) {
  40933. var i = ".monaco-editor ." + this.getClassName(e, n);
  40934. return t && (i = i + "." + this.getClassName(t, n)), 3 === n ? i += "::before" : 4 === n && (i += "::after"), i
  40935. }, e
  40936. }()
  40937. })), define(n[549], i([0, 1, 6, 28, 53, 37, 14]), (function (e, t, n, i, o, s, a) {
  40938. "use strict";
  40939. Object.defineProperty(t, "__esModule", {value: !0});
  40940. var l = function (e) {
  40941. function t(t, r, l, u) {
  40942. var d = e.call(this, t) || this, c = d._context.configuration.options, h = c.get(78), p = c.get(56),
  40943. g = c.get(27), f = {
  40944. listenOnDomNode: l.domNode,
  40945. className: "editor-scrollable " + a.getThemeTypeSelector(t.theme.type),
  40946. useShadows: !1,
  40947. lazyRender: !0,
  40948. vertical: h.vertical,
  40949. horizontal: h.horizontal,
  40950. verticalHasArrows: h.verticalHasArrows,
  40951. horizontalHasArrows: h.horizontalHasArrows,
  40952. verticalScrollbarSize: h.verticalScrollbarSize,
  40953. verticalSliderSize: h.verticalSliderSize,
  40954. horizontalScrollbarSize: h.horizontalScrollbarSize,
  40955. horizontalSliderSize: h.horizontalSliderSize,
  40956. handleMouseWheel: h.handleMouseWheel,
  40957. alwaysConsumeMouseWheel: h.alwaysConsumeMouseWheel,
  40958. arrowSize: h.arrowSize,
  40959. mouseWheelScrollSensitivity: p,
  40960. fastScrollSensitivity: g
  40961. };
  40962. d.scrollbar = d._register(new o.SmoothScrollableElement(r.domNode, f, d._context.viewLayout.getScrollable())), s.PartFingerprints.write(d.scrollbar.getDomNode(), 5), d.scrollbarDomNode = i.createFastDomNode(d.scrollbar.getDomNode()), d.scrollbarDomNode.setPosition("absolute"), d._setLayout();
  40963. var m = function (e, t, n) {
  40964. var i = {};
  40965. if (t) {
  40966. var o = e.scrollTop;
  40967. o && (i.scrollTop = d._context.viewLayout.getCurrentScrollTop() + o, e.scrollTop = 0)
  40968. }
  40969. if (n) {
  40970. var r = e.scrollLeft;
  40971. r && (i.scrollLeft = d._context.viewLayout.getCurrentScrollLeft() + r, e.scrollLeft = 0)
  40972. }
  40973. d._context.viewLayout.setScrollPositionNow(i)
  40974. };
  40975. return d._register(n.addDisposableListener(l.domNode, "scroll", (function (e) {
  40976. return m(l.domNode, !0, !0)
  40977. }))), d._register(n.addDisposableListener(r.domNode, "scroll", (function (e) {
  40978. return m(r.domNode, !0, !1)
  40979. }))),
  40980. d._register(n.addDisposableListener(u.domNode, "scroll", (function (e) {
  40981. return m(u.domNode, !0, !1)
  40982. }))), d._register(n.addDisposableListener(d.scrollbarDomNode.domNode, "scroll", (function (e) {
  40983. return m(d.scrollbarDomNode.domNode, !0, !1)
  40984. }))), d
  40985. }
  40986. return r(t, e), t.prototype.dispose = function () {
  40987. e.prototype.dispose.call(this)
  40988. }, t.prototype._setLayout = function () {
  40989. var e = this._context.configuration.options, t = e.get(107);
  40990. this.scrollbarDomNode.setLeft(t.contentLeft), "right" === e.get(54).side ? this.scrollbarDomNode.setWidth(t.contentWidth + t.minimapWidth) : this.scrollbarDomNode.setWidth(t.contentWidth), this.scrollbarDomNode.setHeight(t.height)
  40991. }, t.prototype.getOverviewRulerLayoutInfo = function () {
  40992. return this.scrollbar.getOverviewRulerLayoutInfo()
  40993. }, t.prototype.getDomNode = function () {
  40994. return this.scrollbarDomNode
  40995. }, t.prototype.delegateVerticalScrollbarMouseDown = function (e) {
  40996. this.scrollbar.delegateVerticalScrollbarMouseDown(e)
  40997. }, t.prototype.onConfigurationChanged = function (e) {
  40998. if (e.hasChanged(78) || e.hasChanged(56) || e.hasChanged(27)) {
  40999. var t = this._context.configuration.options, n = t.get(78), i = t.get(56), o = t.get(27), r = {
  41000. handleMouseWheel: n.handleMouseWheel,
  41001. mouseWheelScrollSensitivity: i,
  41002. fastScrollSensitivity: o
  41003. };
  41004. this.scrollbar.updateOptions(r)
  41005. }
  41006. return e.hasChanged(107) && this._setLayout(), !0
  41007. }, t.prototype.onScrollChanged = function (e) {
  41008. return !0
  41009. }, t.prototype.onThemeChanged = function (e) {
  41010. return this.scrollbar.updateClassName("editor-scrollable " + a.getThemeTypeSelector(this._context.theme.type)), !0
  41011. }, t.prototype.prepareRender = function (e) {
  41012. }, t.prototype.render = function (e) {
  41013. this.scrollbar.renderNow()
  41014. }, t
  41015. }(s.ViewPart);
  41016. t.EditorScrollbar = l
  41017. })), define(n[227], i([0, 1, 24, 28, 16, 359, 91, 148, 110, 14, 33]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  41018. "use strict";
  41019. Object.defineProperty(t, "__esModule", {value: !0});
  41020. var h = !!o.isNative || !(o.isLinux || n.isFirefox || n.isSafari), p = n.isEdgeOrIE, g = function () {
  41021. function e(e, t) {
  41022. this._domNode = e, this._clientRectDeltaLeft = 0, this._clientRectDeltaLeftRead = !1, this.endNode = t
  41023. }
  41024. return Object.defineProperty(e.prototype, "clientRectDeltaLeft", {
  41025. get: function () {
  41026. return this._clientRectDeltaLeftRead || (this._clientRectDeltaLeftRead = !0, this._clientRectDeltaLeft = this._domNode.getBoundingClientRect().left), this._clientRectDeltaLeft
  41027. }, enumerable: !0, configurable: !0
  41028. }), e
  41029. }();
  41030. t.DomReadingContext = g;
  41031. var f = function () {
  41032. function e(e, t) {
  41033. this.themeType = t;
  41034. var n = e.options, i = n.get(34);
  41035. this.renderWhitespace = n.get(74), this.renderControlCharacters = n.get(69), this.spaceWidth = i.spaceWidth, this.middotWidth = i.middotWidth, this.useMonospaceOptimizations = i.isMonospace && !n.get(23), this.canUseHalfwidthRightwardsArrow = i.canUseHalfwidthRightwardsArrow, this.lineHeight = n.get(49), this.stopRenderingLineAfter = n.get(88), this.fontLigatures = n.get(35)
  41036. }
  41037. return e.prototype.equals = function (e) {
  41038. return this.themeType === e.themeType && this.renderWhitespace === e.renderWhitespace && this.renderControlCharacters === e.renderControlCharacters && this.spaceWidth === e.spaceWidth && this.middotWidth === e.middotWidth && this.useMonospaceOptimizations === e.useMonospaceOptimizations && this.canUseHalfwidthRightwardsArrow === e.canUseHalfwidthRightwardsArrow && this.lineHeight === e.lineHeight && this.stopRenderingLineAfter === e.stopRenderingLineAfter && this.fontLigatures === e.fontLigatures
  41039. }, e
  41040. }();
  41041. t.ViewLineOptions = f;
  41042. var m = function () {
  41043. function e(e) {
  41044. this._options = e, this._isMaybeInvalid = !0, this._renderedViewLine = null
  41045. }
  41046. return e.prototype.getDomNode = function () {
  41047. return this._renderedViewLine && this._renderedViewLine.domNode ? this._renderedViewLine.domNode.domNode : null
  41048. }, e.prototype.setDomNode = function (e) {
  41049. if (!this._renderedViewLine) throw new Error("I have no rendered view line to set the dom node to...");
  41050. this._renderedViewLine.domNode = i.createFastDomNode(e)
  41051. }, e.prototype.onContentChanged = function () {
  41052. this._isMaybeInvalid = !0
  41053. },
  41054. e.prototype.onTokensChanged = function () {
  41055. this._isMaybeInvalid = !0
  41056. }, e.prototype.onDecorationsChanged = function () {
  41057. this._isMaybeInvalid = !0
  41058. }, e.prototype.onOptionsChanged = function (e) {
  41059. this._isMaybeInvalid = !0, this._options = e
  41060. }, e.prototype.onSelectionChanged = function () {
  41061. return !(!p && this._options.themeType !== d.HIGH_CONTRAST && "selection" !== this._options.renderWhitespace) && (this._isMaybeInvalid = !0, !0)
  41062. }, e.prototype.renderLine = function (t, n, i, o) {
  41063. if (!1 === this._isMaybeInvalid) return !1;
  41064. this._isMaybeInvalid = !1;
  41065. var r = i.getViewLineRenderingData(t), s = this._options,
  41066. a = l.LineDecoration.filter(r.inlineDecorations, t, r.minColumn, r.maxColumn), g = null;
  41067. if (p || s.themeType === d.HIGH_CONTRAST || "selection" === this._options.renderWhitespace) for (var f = 0, m = i.selections; f < m.length; f++) {
  41068. var _ = m[f];
  41069. if (!(_.endLineNumber < t || _.startLineNumber > t)) {
  41070. var y = _.startLineNumber === t ? _.startColumn : r.minColumn,
  41071. b = _.endLineNumber === t ? _.endColumn : r.maxColumn
  41072. ;y < b && ("selection" !== this._options.renderWhitespace ? a.push(new l.LineDecoration(y, b, "inline-selected-text", 0)) : (g || (g = []), g.push(new u.LineRange(y - 1, b - 1))))
  41073. }
  41074. }
  41075. var S = new u.RenderLineInput(s.useMonospaceOptimizations, s.canUseHalfwidthRightwardsArrow, r.content, r.continuesWithWrappedLine, r.isBasicASCII, r.containsRTL, r.minColumn - 1, r.tokens, a, r.tabSize, r.startVisibleColumn, s.spaceWidth, s.middotWidth, s.stopRenderingLineAfter, s.renderWhitespace, s.renderControlCharacters, s.fontLigatures !== c.EditorFontLigatures.OFF, g);
  41076. if (this._renderedViewLine && this._renderedViewLine.input.equals(S)) return !1;
  41077. o.appendASCIIString('<div style="top:'), o.appendASCIIString(String(n)), o.appendASCIIString("px;height:"), o.appendASCIIString(String(this._options.lineHeight)), o.appendASCIIString('px;" class="'), o.appendASCIIString(e.CLASS_NAME), o.appendASCIIString('">');
  41078. var w = u.renderViewLine(S, o);
  41079. o.appendASCIIString("</div>");
  41080. var E = null
  41081. ;
  41082. return h && r.isBasicASCII && s.useMonospaceOptimizations && 0 === w.containsForeignElements && r.content.length < 300 && S.lineTokens.getCount() < 100 && (E = new v(this._renderedViewLine ? this._renderedViewLine.domNode : null, S, w.characterMapping)), E || (E = C(this._renderedViewLine ? this._renderedViewLine.domNode : null, S, w.characterMapping, w.containsRTL, w.containsForeignElements)), this._renderedViewLine = E, !0
  41083. }, e.prototype.layoutLine = function (e, t) {
  41084. this._renderedViewLine && this._renderedViewLine.domNode && (this._renderedViewLine.domNode.setTop(t), this._renderedViewLine.domNode.setHeight(this._options.lineHeight))
  41085. }, e.prototype.getWidth = function () {
  41086. return this._renderedViewLine ? this._renderedViewLine.getWidth() : 0
  41087. }, e.prototype.getWidthIsFast = function () {
  41088. return !this._renderedViewLine || this._renderedViewLine.getWidthIsFast()
  41089. }, e.prototype.getVisibleRangesForRange = function (e, t, n) {
  41090. if (!this._renderedViewLine) return null;
  41091. e |= 0, t |= 0, e = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, e)),
  41092. t = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, t));
  41093. var i = 0 | this._renderedViewLine.input.stopRenderingLineAfter, o = !1;
  41094. -1 !== i && e > i + 1 && t > i + 1 && (o = !0), -1 !== i && e > i + 1 && (e = i + 1), -1 !== i && t > i + 1 && (t = i + 1);
  41095. var r = this._renderedViewLine.getVisibleRangesForRange(e, t, n);
  41096. return r && r.length > 0 ? new a.VisibleRanges(o, r) : null
  41097. }, e.prototype.getColumnOfNodeOffset = function (e, t, n) {
  41098. return this._renderedViewLine ? this._renderedViewLine.getColumnOfNodeOffset(e, t, n) : 1
  41099. }, e.CLASS_NAME = "view-line", e
  41100. }();
  41101. t.ViewLine = m;
  41102. var v = function () {
  41103. function e(e, t, n) {
  41104. this.domNode = e, this.input = t, this._characterMapping = n, this._charWidth = t.spaceWidth
  41105. }
  41106. return e.prototype.getWidth = function () {
  41107. return this._getCharPosition(this._characterMapping.length)
  41108. }, e.prototype.getWidthIsFast = function () {
  41109. return !0
  41110. }, e.prototype.getVisibleRangesForRange = function (e, t, n) {
  41111. var i = this._getCharPosition(e), o = this._getCharPosition(t);
  41112. return [new a.HorizontalRange(i, o - i)]
  41113. }, e.prototype._getCharPosition = function (e) {
  41114. var t = this._characterMapping.getAbsoluteOffsets()
  41115. ;
  41116. return 0 === t.length ? 0 : Math.round(this._charWidth * t[e - 1])
  41117. }, e.prototype.getColumnOfNodeOffset = function (e, t, n) {
  41118. for (var i = t.textContent.length, o = -1; t;) t = t.previousSibling, o++;
  41119. return this._characterMapping.partDataToCharOffset(o, i, n) + 1
  41120. }, e
  41121. }(), _ = function () {
  41122. function e(e, t, n, i, o) {
  41123. if (this.domNode = e, this.input = t, this._characterMapping = n, this._isWhitespaceOnly = /^\s*$/.test(t.lineContent), this._containsForeignElements = o, this._cachedWidth = -1, this._pixelOffsetCache = null, !i || 0 === this._characterMapping.length) {
  41124. this._pixelOffsetCache = new Int32Array(Math.max(2, this._characterMapping.length + 1));
  41125. for (var r = 0, s = this._characterMapping.length; r <= s; r++) this._pixelOffsetCache[r] = -1
  41126. }
  41127. }
  41128. return e.prototype._getReadingTarget = function (e) {
  41129. return e.domNode.firstChild
  41130. }, e.prototype.getWidth = function () {
  41131. return this.domNode ? (-1 === this._cachedWidth && (this._cachedWidth = this._getReadingTarget(this.domNode).offsetWidth), this._cachedWidth) : 0
  41132. }, e.prototype.getWidthIsFast = function () {
  41133. return -1 !== this._cachedWidth
  41134. },
  41135. e.prototype.getVisibleRangesForRange = function (e, t, n) {
  41136. if (!this.domNode) return null;
  41137. if (null !== this._pixelOffsetCache) {
  41138. var i = this._readPixelOffset(this.domNode, e, n);
  41139. if (-1 === i) return null;
  41140. var o = this._readPixelOffset(this.domNode, t, n);
  41141. return -1 === o ? null : [new a.HorizontalRange(i, o - i)]
  41142. }
  41143. return this._readVisibleRangesForRange(this.domNode, e, t, n)
  41144. }, e.prototype._readVisibleRangesForRange = function (e, t, n, i) {
  41145. if (t === n) {
  41146. var o = this._readPixelOffset(e, t, i);
  41147. return -1 === o ? null : [new a.HorizontalRange(o, 0)]
  41148. }
  41149. return this._readRawVisibleRangesForRange(e, t, n, i)
  41150. }, e.prototype._readPixelOffset = function (e, t, n) {
  41151. if (0 === this._characterMapping.length) {
  41152. if (0 === this._containsForeignElements) return 0;
  41153. if (2 === this._containsForeignElements) return 0;
  41154. if (1 === this._containsForeignElements) return this.getWidth();
  41155. var i = this._getReadingTarget(e);
  41156. return i.firstChild ? i.firstChild.offsetWidth : 0
  41157. }
  41158. if (null !== this._pixelOffsetCache) {
  41159. var o = this._pixelOffsetCache[t];
  41160. if (-1 !== o) return o;
  41161. var r = this._actualReadPixelOffset(e, t, n);
  41162. return this._pixelOffsetCache[t] = r, r
  41163. }
  41164. return this._actualReadPixelOffset(e, t, n)
  41165. }, e.prototype._actualReadPixelOffset = function (e, t, n) {
  41166. if (0 === this._characterMapping.length) {
  41167. var i = s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e), 0, 0, 0, 0, n.clientRectDeltaLeft, n.endNode);
  41168. return i && 0 !== i.length ? i[0].left : -1
  41169. }
  41170. if (t === this._characterMapping.length && this._isWhitespaceOnly && 0 === this._containsForeignElements) return this.getWidth();
  41171. var o = this._characterMapping.charOffsetToPartData(t - 1), r = u.CharacterMapping.getPartIndex(o),
  41172. a = u.CharacterMapping.getCharIndex(o),
  41173. l = s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e), r, a, r, a, n.clientRectDeltaLeft, n.endNode);
  41174. return l && 0 !== l.length ? l[0].left : -1
  41175. }, e.prototype._readRawVisibleRangesForRange = function (e, t, n, i) {
  41176. if (1 === t && n === this._characterMapping.length) return [new a.HorizontalRange(0, this.getWidth())]
  41177. ;
  41178. var o = this._characterMapping.charOffsetToPartData(t - 1), r = u.CharacterMapping.getPartIndex(o),
  41179. l = u.CharacterMapping.getCharIndex(o), d = this._characterMapping.charOffsetToPartData(n - 1),
  41180. c = u.CharacterMapping.getPartIndex(d), h = u.CharacterMapping.getCharIndex(d);
  41181. return s.RangeUtil.readHorizontalRanges(this._getReadingTarget(e), r, l, c, h, i.clientRectDeltaLeft, i.endNode)
  41182. }, e.prototype.getColumnOfNodeOffset = function (e, t, n) {
  41183. for (var i = t.textContent.length, o = -1; t;) t = t.previousSibling, o++;
  41184. return this._characterMapping.partDataToCharOffset(o, i, n) + 1
  41185. }, e
  41186. }(), y = function (e) {
  41187. function t() {
  41188. return null !== e && e.apply(this, arguments) || this
  41189. }
  41190. return r(t, e), t.prototype._readVisibleRangesForRange = function (t, n, i, o) {
  41191. var r = e.prototype._readVisibleRangesForRange.call(this, t, n, i, o);
  41192. if (!r || 0 === r.length || n === i || 1 === n && i === this._characterMapping.length) return r;
  41193. if (!this.input.containsRTL) {
  41194. var s = this._readPixelOffset(t, i, o);
  41195. if (-1 !== s) {
  41196. var a = r[r.length - 1];
  41197. a.left < s && (a.width = s - a.left)
  41198. }
  41199. }
  41200. return r
  41201. }, t
  41202. }(_), C = n.isWebKit ? b : S;
  41203. function b(e, t, n, i, o) {
  41204. return new y(e, t, n, i, o)
  41205. }
  41206. function S(e, t, n, i, o) {
  41207. return new _(e, t, n, i, o)
  41208. }
  41209. })), define(n[166], i([0, 1, 24, 141, 37, 227, 13, 3, 40, 6]), (function (e, t, n, i, o, s, a, l, u, d) {
  41210. "use strict";
  41211. Object.defineProperty(t, "__esModule", {value: !0});
  41212. var c = function (e, t) {
  41213. this.lastViewCursorsRenderData = e, this.lastTextareaPosition = t
  41214. };
  41215. t.PointerHandlerLastRenderData = c;
  41216. var h = function () {
  41217. function e(e, t, n, i, o, r) {
  41218. void 0 === n && (n = 0), void 0 === i && (i = null), void 0 === o && (o = null), void 0 === r && (r = null), this.element = e, this.type = t, this.mouseColumn = n, this.position = i, !o && i && (o = new l.Range(i.lineNumber, i.column, i.lineNumber, i.column)), this.range = o, this.detail = r
  41219. }
  41220. return e._typeToString = function (e) {
  41221. return 1 === e ? "TEXTAREA" : 2 === e ? "GUTTER_GLYPH_MARGIN" : 3 === e ? "GUTTER_LINE_NUMBERS" : 4 === e ? "GUTTER_LINE_DECORATIONS" : 5 === e ? "GUTTER_VIEW_ZONE" : 6 === e ? "CONTENT_TEXT" : 7 === e ? "CONTENT_EMPTY" : 8 === e ? "CONTENT_VIEW_ZONE" : 9 === e ? "CONTENT_WIDGET" : 10 === e ? "OVERVIEW_RULER" : 11 === e ? "SCROLLBAR" : 12 === e ? "OVERLAY_WIDGET" : "UNKNOWN"
  41222. }, e.toString = function (e) {
  41223. return this._typeToString(e.type) + ": " + e.position + " - " + e.range + " - " + e.detail
  41224. }, e.prototype.toString = function () {
  41225. return e.toString(this)
  41226. }, e
  41227. }();
  41228. t.MouseTarget = h;
  41229. var p = function () {
  41230. function e() {
  41231. }
  41232. return e.isTextArea = function (e) {
  41233. return 2 === e.length && 3 === e[0] && 6 === e[1]
  41234. }, e.isChildOfViewLines = function (e) {
  41235. return e.length >= 4 && 3 === e[0] && 7 === e[3]
  41236. }, e.isStrictChildOfViewLines = function (e) {
  41237. return e.length > 4 && 3 === e[0] && 7 === e[3]
  41238. }, e.isChildOfScrollableElement = function (e) {
  41239. return e.length >= 2 && 3 === e[0] && 5 === e[1]
  41240. }, e.isChildOfMinimap = function (e) {
  41241. return e.length >= 2 && 3 === e[0] && 8 === e[1]
  41242. }, e.isChildOfContentWidgets = function (e) {
  41243. return e.length >= 4 && 3 === e[0] && 1 === e[3]
  41244. }, e.isChildOfOverflowingContentWidgets = function (e) {
  41245. return e.length >= 1 && 2 === e[0]
  41246. }, e.isChildOfOverlayWidgets = function (e) {
  41247. return e.length >= 2 && 3 === e[0] && 4 === e[1]
  41248. }, e
  41249. }(), g = function () {
  41250. function e(e, t, n) {
  41251. this.model = e.model;
  41252. var i = e.configuration.options;
  41253. this.layoutInfo = i.get(107), this.viewDomNode = t.viewDomNode, this.lineHeight = i.get(49),
  41254. this.typicalHalfwidthCharacterWidth = i.get(34).typicalHalfwidthCharacterWidth, this.lastRenderData = n, this._context = e, this._viewHelper = t
  41255. }
  41256. return e.prototype.getZoneAtCoord = function (t) {
  41257. return e.getZoneAtCoord(this._context, t)
  41258. }, e.getZoneAtCoord = function (e, t) {
  41259. var n = e.viewLayout.getWhitespaceAtVerticalOffset(t);
  41260. if (n) {
  41261. var i = n.verticalOffset + n.height / 2, o = e.model.getLineCount(), r = null, s = void 0, l = null;
  41262. return n.afterLineNumber !== o && (l = new a.Position(n.afterLineNumber + 1, 1)), n.afterLineNumber > 0 && (r = new a.Position(n.afterLineNumber, e.model.getLineMaxColumn(n.afterLineNumber))), s = null === l ? r : null === r ? l : t < i ? r : l, {
  41263. viewZoneId: n.id,
  41264. afterLineNumber: n.afterLineNumber,
  41265. positionBefore: r,
  41266. positionAfter: l,
  41267. position: s
  41268. }
  41269. }
  41270. return null
  41271. }, e.prototype.getFullLineRangeAtCoord = function (e) {
  41272. if (this._context.viewLayout.isAfterLines(e)) {
  41273. var t = this._context.model.getLineCount(), n = this._context.model.getLineMaxColumn(t);
  41274. return {range: new l.Range(t, n, t, n), isAfterLines: !0}
  41275. }
  41276. var i = this._context.viewLayout.getLineNumberAtVerticalOffset(e),
  41277. o = this._context.model.getLineMaxColumn(i);
  41278. return {range: new l.Range(i, 1, i, o), isAfterLines: !1}
  41279. }, e.prototype.getLineNumberAtVerticalOffset = function (e) {
  41280. return this._context.viewLayout.getLineNumberAtVerticalOffset(e)
  41281. }, e.prototype.isAfterLines = function (e) {
  41282. return this._context.viewLayout.isAfterLines(e)
  41283. }, e.prototype.getVerticalOffsetForLineNumber = function (e) {
  41284. return this._context.viewLayout.getVerticalOffsetForLineNumber(e)
  41285. }, e.prototype.findAttribute = function (t, n) {
  41286. return e._findAttribute(t, n, this._viewHelper.viewDomNode)
  41287. }, e._findAttribute = function (e, t, n) {
  41288. for (; e && e !== document.body;) {
  41289. if (e.hasAttribute && e.hasAttribute(t)) return e.getAttribute(t);
  41290. if (e === n) return null;
  41291. e = e.parentNode
  41292. }
  41293. return null
  41294. }, e.prototype.getLineWidth = function (e) {
  41295. return this._viewHelper.getLineWidth(e)
  41296. }, e.prototype.visibleRangeForPosition = function (e, t) {
  41297. return this._viewHelper.visibleRangeForPosition(e, t)
  41298. }, e.prototype.getPositionFromDOMInfo = function (e, t) {
  41299. return this._viewHelper.getPositionFromDOMInfo(e, t)
  41300. }, e.prototype.getCurrentScrollTop = function () {
  41301. return this._context.viewLayout.getCurrentScrollTop()
  41302. }, e.prototype.getCurrentScrollLeft = function () {
  41303. return this._context.viewLayout.getCurrentScrollLeft()
  41304. }, e
  41305. }();
  41306. t.HitTestContext = g;
  41307. var f = function (e) {
  41308. function t(t, n, i, r) {
  41309. var s = e.call(this, t, n, i) || this;
  41310. return s._ctx = t, r ? (s.target = r, s.targetPath = o.PartFingerprints.collect(r, t.viewDomNode)) : (s.target = null, s.targetPath = new Uint8Array(0)), s
  41311. }
  41312. return r(t, e), t.prototype.toString = function () {
  41313. return "pos(" + this.pos.x + "," + this.pos.y + "), editorPos(" + this.editorPos.x + "," + this.editorPos.y + "), mouseVerticalOffset: " + this.mouseVerticalOffset + ", mouseContentHorizontalOffset: " + this.mouseContentHorizontalOffset + "\n\ttarget: " + (this.target ? this.target.outerHTML : null)
  41314. }, t.prototype.fulfill = function (e, t, n, i) {
  41315. void 0 === t && (t = null), void 0 === n && (n = null), void 0 === i && (i = null);
  41316. var o = this.mouseColumn
  41317. ;
  41318. return t && t.column < this._ctx.model.getLineMaxColumn(t.lineNumber) && (o = u.CursorColumns.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber), t.column, this._ctx.model.getOptions().tabSize) + 1), new h(this.target, e, o, t, n, i)
  41319. }, t.prototype.withTarget = function (e) {
  41320. return new t(this._ctx, this.editorPos, this.pos, e)
  41321. }, t
  41322. }((function (e, t, n) {
  41323. this.editorPos = t, this.pos = n, this.mouseVerticalOffset = Math.max(0, e.getCurrentScrollTop() + n.y - t.y), this.mouseContentHorizontalOffset = e.getCurrentScrollLeft() + n.x - t.x - e.layoutInfo.contentLeft, this.isInMarginArea = n.x - t.x < e.layoutInfo.contentLeft && n.x - t.x >= e.layoutInfo.glyphMarginLeft, this.isInContentArea = !this.isInMarginArea, this.mouseColumn = Math.max(0, _._getMouseColumn(this.mouseContentHorizontalOffset, e.typicalHalfwidthCharacterWidth))
  41324. })), m = {isAfterLines: !0};
  41325. function v(e) {
  41326. return {isAfterLines: !1, horizontalDistanceToText: e}
  41327. }
  41328. var _ = function () {
  41329. function e(e, t) {
  41330. this._context = e, this._viewHelper = t
  41331. }
  41332. return e.prototype.mouseTargetIsWidget = function (e) {
  41333. var t = e.target, n = o.PartFingerprints.collect(t, this._viewHelper.viewDomNode);
  41334. return !(!p.isChildOfContentWidgets(n) && !p.isChildOfOverflowingContentWidgets(n)) || !!p.isChildOfOverlayWidgets(n)
  41335. }, e.prototype.createMouseTarget = function (t, n, i, o) {
  41336. var r = new g(this._context, this._viewHelper, t), s = new f(r, n, i, o);
  41337. try {
  41338. return e._createMouseTarget(r, s, !1)
  41339. } catch (e) {
  41340. return s.fulfill(0)
  41341. }
  41342. }, e._createMouseTarget = function (t, n, i) {
  41343. if (null === n.target) {
  41344. if (i) return n.fulfill(0);
  41345. var o = e._doHitTest(t, n);
  41346. return o.position ? e.createMouseTargetFromHitTestPosition(t, n, o.position.lineNumber, o.position.column) : this._createMouseTarget(t, n.withTarget(o.hitTarget), !0)
  41347. }
  41348. var r = n, s = null;
  41349. return (s = (s = (s = (s = (s = (s = (s = (s = (s = (s = s || e._hitTestContentWidget(t, r)) || e._hitTestOverlayWidget(t, r)) || e._hitTestMinimap(t, r)) || e._hitTestScrollbarSlider(t, r)) || e._hitTestViewZone(t, r)) || e._hitTestMargin(t, r)) || e._hitTestViewCursor(t, r)) || e._hitTestTextArea(t, r)) || e._hitTestViewLines(t, r, i)) || e._hitTestScrollbar(t, r)) || n.fulfill(0)
  41350. }, e._hitTestContentWidget = function (e, t) {
  41351. if (p.isChildOfContentWidgets(t.targetPath) || p.isChildOfOverflowingContentWidgets(t.targetPath)) {
  41352. var n = e.findAttribute(t.target, "widgetId");
  41353. return n ? t.fulfill(9, null, null, n) : t.fulfill(0)
  41354. }
  41355. return null
  41356. }, e._hitTestOverlayWidget = function (e, t) {
  41357. if (p.isChildOfOverlayWidgets(t.targetPath)) {
  41358. var n = e.findAttribute(t.target, "widgetId");
  41359. return n ? t.fulfill(12, null, null, n) : t.fulfill(0)
  41360. }
  41361. return null
  41362. }, e._hitTestViewCursor = function (e, t) {
  41363. if (t.target) for (var n = 0, i = r = e.lastRenderData.lastViewCursorsRenderData; n < i.length; n++) {
  41364. var o = i[n];
  41365. if (t.target === o.domNode) return t.fulfill(6, o.position)
  41366. }
  41367. if (t.isInContentArea) for (var r = e.lastRenderData.lastViewCursorsRenderData, s = t.mouseContentHorizontalOffset, a = t.mouseVerticalOffset, l = 0, u = r; l < u.length; l++) {
  41368. if (!(s < (o = u[l]).contentLeft) && !(s > o.contentLeft + o.width)) {
  41369. var d = e.getVerticalOffsetForLineNumber(o.position.lineNumber);
  41370. if (d <= a && a <= d + o.height) return t.fulfill(6, o.position)
  41371. }
  41372. }
  41373. return null
  41374. }, e._hitTestViewZone = function (e, t) {
  41375. var n = e.getZoneAtCoord(t.mouseVerticalOffset);
  41376. if (n) {
  41377. var i = t.isInContentArea ? 8 : 5;
  41378. return t.fulfill(i, n.position, null, n)
  41379. }
  41380. return null
  41381. }, e._hitTestTextArea = function (e, t) {
  41382. return p.isTextArea(t.targetPath) ? e.lastRenderData.lastTextareaPosition ? t.fulfill(6, e.lastRenderData.lastTextareaPosition) : t.fulfill(1, e.lastRenderData.lastTextareaPosition) : null
  41383. }, e._hitTestMargin = function (e, t) {
  41384. if (t.isInMarginArea) {
  41385. var n = e.getFullLineRangeAtCoord(t.mouseVerticalOffset), i = n.range.getStartPosition(),
  41386. o = Math.abs(t.pos.x - t.editorPos.x), r = {
  41387. isAfterLines: n.isAfterLines,
  41388. glyphMarginLeft: e.layoutInfo.glyphMarginLeft,
  41389. glyphMarginWidth: e.layoutInfo.glyphMarginWidth,
  41390. lineNumbersWidth: e.layoutInfo.lineNumbersWidth,
  41391. offsetX: o
  41392. };
  41393. return (o -= e.layoutInfo.glyphMarginLeft) <= e.layoutInfo.glyphMarginWidth ? t.fulfill(2, i, n.range, r) : (o -= e.layoutInfo.glyphMarginWidth) <= e.layoutInfo.lineNumbersWidth ? t.fulfill(3, i, n.range, r) : (o -= e.layoutInfo.lineNumbersWidth, t.fulfill(4, i, n.range, r))
  41394. }
  41395. return null
  41396. }, e._hitTestViewLines = function (t, n, i) {
  41397. if (!p.isChildOfViewLines(n.targetPath)) return null
  41398. ;
  41399. if (t.isAfterLines(n.mouseVerticalOffset)) {
  41400. var o = t.model.getLineCount(), r = t.model.getLineMaxColumn(o);
  41401. return n.fulfill(7, new a.Position(o, r), void 0, m)
  41402. }
  41403. if (i) {
  41404. if (p.isStrictChildOfViewLines(n.targetPath)) {
  41405. var s = t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);
  41406. if (0 === t.model.getLineLength(s)) {
  41407. var l = t.getLineWidth(s), u = v(n.mouseContentHorizontalOffset - l);
  41408. return n.fulfill(7, new a.Position(s, 1), void 0, u)
  41409. }
  41410. var d = t.getLineWidth(s);
  41411. if (n.mouseContentHorizontalOffset >= d) {
  41412. u = v(n.mouseContentHorizontalOffset - d);
  41413. var c = new a.Position(s, t.model.getLineMaxColumn(s));
  41414. return n.fulfill(7, c, void 0, u)
  41415. }
  41416. }
  41417. return n.fulfill(0)
  41418. }
  41419. var h = e._doHitTest(t, n);
  41420. return h.position ? e.createMouseTargetFromHitTestPosition(t, n, h.position.lineNumber, h.position.column) : this._createMouseTarget(t, n.withTarget(h.hitTarget), !0)
  41421. }, e._hitTestMinimap = function (e, t) {
  41422. if (p.isChildOfMinimap(t.targetPath)) {
  41423. var n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), i = e.model.getLineMaxColumn(n);
  41424. return t.fulfill(11, new a.Position(n, i))
  41425. }
  41426. return null
  41427. },
  41428. e._hitTestScrollbarSlider = function (e, t) {
  41429. if (p.isChildOfScrollableElement(t.targetPath) && t.target && 1 === t.target.nodeType) {
  41430. var n = t.target.className;
  41431. if (n && /\b(slider|scrollbar)\b/.test(n)) {
  41432. var i = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),
  41433. o = e.model.getLineMaxColumn(i);
  41434. return t.fulfill(11, new a.Position(i, o))
  41435. }
  41436. }
  41437. return null
  41438. }, e._hitTestScrollbar = function (e, t) {
  41439. if (p.isChildOfScrollableElement(t.targetPath)) {
  41440. var n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset), i = e.model.getLineMaxColumn(n);
  41441. return t.fulfill(11, new a.Position(n, i))
  41442. }
  41443. return null
  41444. }, e.prototype.getMouseColumn = function (t, n) {
  41445. var i = this._context.configuration.options, o = i.get(107),
  41446. r = this._context.viewLayout.getCurrentScrollLeft() + n.x - t.x - o.contentLeft;
  41447. return e._getMouseColumn(r, i.get(34).typicalHalfwidthCharacterWidth)
  41448. }, e._getMouseColumn = function (e, t) {
  41449. return e < 0 ? 1 : Math.round(e / t) + 1
  41450. }, e.createMouseTargetFromHitTestPosition = function (e, t, i, o) {
  41451. var r = new a.Position(i, o), s = e.getLineWidth(i);
  41452. if (t.mouseContentHorizontalOffset > s) {
  41453. if (n.isEdge && 1 === r.column) {
  41454. var u = v(t.mouseContentHorizontalOffset - s);
  41455. return t.fulfill(7, new a.Position(i, e.model.getLineMaxColumn(i)), void 0, u)
  41456. }
  41457. var d = v(t.mouseContentHorizontalOffset - s);
  41458. return t.fulfill(7, r, void 0, d)
  41459. }
  41460. var c = e.visibleRangeForPosition(i, o);
  41461. if (!c) return t.fulfill(0, r);
  41462. var h = c.left;
  41463. if (t.mouseContentHorizontalOffset === h) return t.fulfill(6, r);
  41464. var p = [];
  41465. if (p.push({offset: c.left, column: o}), o > 1) {
  41466. var g = e.visibleRangeForPosition(i, o - 1);
  41467. g && p.push({offset: g.left, column: o - 1})
  41468. }
  41469. if (o < e.model.getLineMaxColumn(i)) {
  41470. var f = e.visibleRangeForPosition(i, o + 1);
  41471. f && p.push({offset: f.left, column: o + 1})
  41472. }
  41473. p.sort((function (e, t) {
  41474. return e.offset - t.offset
  41475. }));
  41476. for (var m = 1; m < p.length; m++) {
  41477. var _ = p[m - 1], y = p[m];
  41478. if (_.offset <= t.mouseContentHorizontalOffset && t.mouseContentHorizontalOffset <= y.offset) {
  41479. var C = new l.Range(i, _.column, i, y.column);
  41480. return t.fulfill(6, r, C)
  41481. }
  41482. }
  41483. return t.fulfill(6, r)
  41484. }, e._doHitTestWithCaretRangeFromPoint = function (e, t) {
  41485. var n = e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),
  41486. o = e.getVerticalOffsetForLineNumber(n) + Math.floor(e.lineHeight / 2),
  41487. r = t.pos.y + (o - t.mouseVerticalOffset);
  41488. r <= t.editorPos.y && (r = t.editorPos.y + 1), r >= t.editorPos.y + e.layoutInfo.height && (r = t.editorPos.y + e.layoutInfo.height - 1);
  41489. var s = new i.PageCoordinates(t.pos.x, r),
  41490. a = this._actualDoHitTestWithCaretRangeFromPoint(e, s.toClientCoordinates());
  41491. return a.position ? a : this._actualDoHitTestWithCaretRangeFromPoint(e, t.pos.toClientCoordinates())
  41492. }, e._actualDoHitTestWithCaretRangeFromPoint = function (e, t) {
  41493. var n, i = d.getShadowRoot(e.viewDomNode);
  41494. if (!(n = i ? void 0 === i.caretRangeFromPoint ? y(i, t.clientX, t.clientY) : i.caretRangeFromPoint(t.clientX, t.clientY) : document.caretRangeFromPoint(t.clientX, t.clientY)) || !n.startContainer) return {
  41495. position: null,
  41496. hitTarget: null
  41497. };
  41498. var o = n.startContainer, r = null;
  41499. if (o.nodeType === o.TEXT_NODE) {
  41500. var a = (u = (l = o.parentNode) ? l.parentNode : null) ? u.parentNode : null;
  41501. if ((a && a.nodeType === a.ELEMENT_NODE ? a.className : null) === s.ViewLine.CLASS_NAME) return {
  41502. position: e.getPositionFromDOMInfo(l, n.startOffset), hitTarget: null
  41503. };
  41504. r = o.parentNode
  41505. } else if (o.nodeType === o.ELEMENT_NODE) {
  41506. var l, u;
  41507. if (((u = (l = o.parentNode) ? l.parentNode : null) && u.nodeType === u.ELEMENT_NODE ? u.className : null) === s.ViewLine.CLASS_NAME) return {
  41508. position: e.getPositionFromDOMInfo(o, o.textContent.length),
  41509. hitTarget: null
  41510. };
  41511. r = o
  41512. }
  41513. return {position: null, hitTarget: r}
  41514. }, e._doHitTestWithCaretPositionFromPoint = function (e, t) {
  41515. var n = document.caretPositionFromPoint(t.clientX, t.clientY);
  41516. if (n.offsetNode.nodeType === n.offsetNode.TEXT_NODE) {
  41517. var i = n.offsetNode.parentNode, o = i ? i.parentNode : null, r = o ? o.parentNode : null;
  41518. return (r && r.nodeType === r.ELEMENT_NODE ? r.className : null) === s.ViewLine.CLASS_NAME ? {
  41519. position: e.getPositionFromDOMInfo(n.offsetNode.parentNode, n.offset),
  41520. hitTarget: null
  41521. } : {position: null, hitTarget: n.offsetNode.parentNode}
  41522. }
  41523. return {position: null, hitTarget: n.offsetNode}
  41524. }, e._doHitTestWithMoveToPoint = function (e, t) {
  41525. var n = null, i = null, o = document.body.createTextRange();
  41526. try {
  41527. o.moveToPoint(t.clientX, t.clientY)
  41528. } catch (e) {
  41529. return {
  41530. position: null,
  41531. hitTarget: null
  41532. }
  41533. }
  41534. o.collapse(!0);
  41535. var r = o ? o.parentElement() : null, a = r ? r.parentNode : null, l = a ? a.parentNode : null;
  41536. if ((l && l.nodeType === l.ELEMENT_NODE ? l.className : "") === s.ViewLine.CLASS_NAME) {
  41537. var u = o.duplicate();
  41538. u.moveToElementText(r), u.setEndPoint("EndToStart", o), n = e.getPositionFromDOMInfo(r, u.text.length), u.moveToElementText(e.viewDomNode)
  41539. } else i = r;
  41540. return o.moveToElementText(e.viewDomNode), {position: n, hitTarget: i}
  41541. }, e._doHitTest = function (e, t) {
  41542. return "function" == typeof document.caretRangeFromPoint ? this._doHitTestWithCaretRangeFromPoint(e, t) : document.caretPositionFromPoint ? this._doHitTestWithCaretPositionFromPoint(e, t.pos.toClientCoordinates()) : document.body.createTextRange ? this._doHitTestWithMoveToPoint(e, t.pos.toClientCoordinates()) : {
  41543. position: null,
  41544. hitTarget: null
  41545. }
  41546. }, e
  41547. }();
  41548. function y(e, t, n) {
  41549. var i = document.createRange(), o = e.elementFromPoint(t, n);
  41550. if (null !== o) {
  41551. for (; o && o.firstChild && o.firstChild.nodeType !== o.firstChild.TEXT_NODE;) o = o.lastChild
  41552. ;
  41553. var r = o.getBoundingClientRect(), s = window.getComputedStyle(o, null).getPropertyValue("font"),
  41554. a = o.innerText, l = r.left, u = 0, d = void 0;
  41555. if (t > r.left + r.width) u = a.length; else for (var c = C.getInstance(), h = 0; h < a.length + 1; h++) {
  41556. if (t < (l += d = c.getCharWidth(a.charAt(h), s) / 2)) {
  41557. u = h;
  41558. break
  41559. }
  41560. l += d
  41561. }
  41562. i.setStart(o.firstChild, u), i.setEnd(o.firstChild, u)
  41563. }
  41564. return i
  41565. }
  41566. t.MouseTargetFactory = _, t.shadowCaretRangeFromPoint = y;
  41567. var C = function () {
  41568. function e() {
  41569. this._cache = {}, this._canvas = document.createElement("canvas")
  41570. }
  41571. return e.getInstance = function () {
  41572. return e._INSTANCE || (e._INSTANCE = new e), e._INSTANCE
  41573. }, e.prototype.getCharWidth = function (e, t) {
  41574. var n = e + t;
  41575. if (this._cache[n]) return this._cache[n];
  41576. var i = this._canvas.getContext("2d");
  41577. i.font = t;
  41578. var o = i.measureText(e).width;
  41579. return this._cache[n] = o, o
  41580. }, e._INSTANCE = null, e
  41581. }()
  41582. })), define(n[550], i([0, 1, 24, 6, 45, 15, 2, 16, 166, 141, 105, 13, 22, 92]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g) {
  41583. "use strict";
  41584. function f(e) {
  41585. return function (t, n) {
  41586. var i = !1;
  41587. return e && (i = e.mouseTargetIsWidget(n)), i || n.preventDefault(), n
  41588. }
  41589. }
  41590. Object.defineProperty(t, "__esModule", {value: !0}), t.createMouseMoveEventMerger = f;
  41591. var m = function (e) {
  41592. function t(r, a, l) {
  41593. var h = e.call(this) || this;
  41594. h._isFocused = !1, h._context = r, h.viewController = a, h.viewHelper = l, h.mouseTargetFactory = new u.MouseTargetFactory(h._context, l), h._mouseDownOperation = h._register(new v(h._context, h.viewController, h.viewHelper, (function (e, t) {
  41595. return h._createMouseTarget(e, t)
  41596. }), (function (e) {
  41597. return h._getMouseColumn(e)
  41598. }))), h._asyncFocus = h._register(new s.RunOnceScheduler((function () {
  41599. return h.viewHelper.focusTextArea()
  41600. }), 0)), h.lastMouseLeaveTime = -1;
  41601. var p = new d.EditorMouseEventFactory(h.viewHelper.viewDomNode);
  41602. h._register(p.onContextMenu(h.viewHelper.viewDomNode, (function (e) {
  41603. return h._onContextMenu(e, !0)
  41604. }))), h._register(p.onMouseMoveThrottled(h.viewHelper.viewDomNode, (function (e) {
  41605. return h._onMouseMove(e)
  41606. }), f(h.mouseTargetFactory), t.MOUSE_MOVE_MINIMUM_TIME)), h._register(p.onMouseUp(h.viewHelper.viewDomNode, (function (e) {
  41607. return h._onMouseUp(e)
  41608. }))),
  41609. h._register(p.onMouseLeave(h.viewHelper.viewDomNode, (function (e) {
  41610. return h._onMouseLeave(e)
  41611. }))), h._register(p.onMouseDown(h.viewHelper.viewDomNode, (function (e) {
  41612. return h._onMouseDown(e)
  41613. })));
  41614. return h._register(i.addDisposableListener(h.viewHelper.viewDomNode, n.isEdgeOrIE ? "mousewheel" : "wheel", (function (e) {
  41615. if (h.viewController.emitMouseWheel(e), h._context.configuration.options.get(57)) {
  41616. var t = new o.StandardWheelEvent(e);
  41617. if (t.browserEvent.ctrlKey || t.browserEvent.metaKey) {
  41618. var n = c.EditorZoom.getZoomLevel(), i = t.deltaY > 0 ? 1 : -1;
  41619. c.EditorZoom.setZoomLevel(n + i), t.preventDefault(), t.stopPropagation()
  41620. }
  41621. }
  41622. }), {capture: !0, passive: !1})), h._context.addEventHandler(h), h
  41623. }
  41624. return r(t, e), t.prototype.dispose = function () {
  41625. this._context.removeEventHandler(this), e.prototype.dispose.call(this)
  41626. }, t.prototype.onCursorStateChanged = function (e) {
  41627. return this._mouseDownOperation.onCursorStateChanged(e), !1
  41628. }, t.prototype.onFocusChanged = function (e) {
  41629. return this._isFocused = e.isFocused, !1
  41630. }, t.prototype.onScrollChanged = function (e) {
  41631. return this._mouseDownOperation.onScrollChanged(), !1
  41632. }, t.prototype.getTargetAtClientPoint = function (e, t) {
  41633. var n = new d.ClientCoordinates(e, t).toPageCoordinates(),
  41634. i = d.createEditorPagePosition(this.viewHelper.viewDomNode);
  41635. return n.y < i.y || n.y > i.y + i.height || n.x < i.x || n.x > i.x + i.width ? null : this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), i, n, null)
  41636. }, t.prototype._createMouseTarget = function (e, t) {
  41637. return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), e.editorPos, e.pos, t ? e.target : null)
  41638. }, t.prototype._getMouseColumn = function (e) {
  41639. return this.mouseTargetFactory.getMouseColumn(e.editorPos, e.pos)
  41640. }, t.prototype._onContextMenu = function (e, t) {
  41641. this.viewController.emitContextMenu({event: e, target: this._createMouseTarget(e, t)})
  41642. }, t.prototype._onMouseMove = function (e) {
  41643. this._mouseDownOperation.isActive() || (e.timestamp < this.lastMouseLeaveTime || this.viewController.emitMouseMove({
  41644. event: e,
  41645. target: this._createMouseTarget(e, !0)
  41646. }))
  41647. }, t.prototype._onMouseLeave = function (e) {
  41648. this.lastMouseLeaveTime = (new Date).getTime(), this.viewController.emitMouseLeave({
  41649. event: e,
  41650. target: null
  41651. })
  41652. }, t.prototype._onMouseUp = function (e) {
  41653. this.viewController.emitMouseUp({event: e, target: this._createMouseTarget(e, !0)})
  41654. }, t.prototype._onMouseDown = function (e) {
  41655. var t = this, i = this._createMouseTarget(e, !0), o = 6 === i.type || 7 === i.type,
  41656. r = 2 === i.type || 3 === i.type || 4 === i.type, s = 3 === i.type,
  41657. a = this._context.configuration.options.get(83), u = 8 === i.type || 5 === i.type, d = 9 === i.type,
  41658. c = e.leftButton || e.middleButton;
  41659. l.isMacintosh && e.leftButton && e.ctrlKey && (c = !1);
  41660. var h = function () {
  41661. n.isIE && !t._isFocused ? t._asyncFocus.schedule() : (e.preventDefault(), t.viewHelper.focusTextArea())
  41662. };
  41663. if (c && (o || s && a)) h(), this._mouseDownOperation.start(i.type, e); else if (r) e.preventDefault(); else if (u) {
  41664. var p = i.detail;
  41665. this.viewHelper.shouldSuppressMouseDownOnViewZone(p.viewZoneId) && (h(), this._mouseDownOperation.start(i.type, e), e.preventDefault())
  41666. } else d && this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail) && (h(), e.preventDefault())
  41667. ;
  41668. this.viewController.emitMouseDown({event: e, target: i})
  41669. }, t.MOUSE_MOVE_MINIMUM_TIME = 100, t
  41670. }(g.ViewEventHandler);
  41671. t.MouseHandler = m;
  41672. var v = function (e) {
  41673. function t(t, n, i, o, r) {
  41674. var a = e.call(this) || this;
  41675. return a._context = t, a._viewController = n, a._viewHelper = i, a._createMouseTarget = o, a._getMouseColumn = r, a._mouseMoveMonitor = a._register(new d.GlobalEditorMouseMoveMonitor(a._viewHelper.viewDomNode)), a._onScrollTimeout = a._register(new s.TimeoutTimer), a._mouseState = new _, a._currentSelection = new p.Selection(1, 1, 1, 1), a._isActive = !1, a._lastMouseEvent = null, a
  41676. }
  41677. return r(t, e), t.prototype.dispose = function () {
  41678. e.prototype.dispose.call(this)
  41679. }, t.prototype.isActive = function () {
  41680. return this._isActive
  41681. }, t.prototype._onMouseDownThenMove = function (e) {
  41682. this._lastMouseEvent = e, this._mouseState.setModifiers(e);
  41683. var t = this._findMousePosition(e, !0);
  41684. t && (this._mouseState.isDragAndDrop ? this._viewController.emitMouseDrag({
  41685. event: e,
  41686. target: t
  41687. }) : this._dispatchMouse(t, !0))
  41688. }, t.prototype.start = function (e, t) {
  41689. var n = this;
  41690. this._lastMouseEvent = t,
  41691. this._mouseState.setStartedOnLineNumbers(3 === e), this._mouseState.setStartButtons(t), this._mouseState.setModifiers(t);
  41692. var i = this._findMousePosition(t, !0);
  41693. if (i && i.position) {
  41694. this._mouseState.trySetCount(t.detail, i.position), t.detail = this._mouseState.count;
  41695. var o = this._context.configuration.options;
  41696. if (!o.get(68) && o.get(24) && !this._mouseState.altKey && t.detail < 2 && !this._isActive && !this._currentSelection.isEmpty() && 6 === i.type && i.position && this._currentSelection.containsPosition(i.position)) return this._mouseState.isDragAndDrop = !0, this._isActive = !0, void this._mouseMoveMonitor.startMonitoring(t.target, t.buttons, f(null), (function (e) {
  41697. return n._onMouseDownThenMove(e)
  41698. }), (function () {
  41699. var e = n._findMousePosition(n._lastMouseEvent, !0);
  41700. n._viewController.emitMouseDrop({
  41701. event: n._lastMouseEvent,
  41702. target: e ? n._createMouseTarget(n._lastMouseEvent, !0) : null
  41703. }), n._stop()
  41704. }));
  41705. this._mouseState.isDragAndDrop = !1, this._dispatchMouse(i, t.shiftKey), this._isActive || (this._isActive = !0,
  41706. this._mouseMoveMonitor.startMonitoring(t.target, t.buttons, f(null), (function (e) {
  41707. return n._onMouseDownThenMove(e)
  41708. }), (function () {
  41709. return n._stop()
  41710. })))
  41711. }
  41712. }, t.prototype._stop = function () {
  41713. this._isActive = !1, this._onScrollTimeout.cancel()
  41714. }, t.prototype.onScrollChanged = function () {
  41715. var e = this;
  41716. this._isActive && this._onScrollTimeout.setIfNotSet((function () {
  41717. if (e._lastMouseEvent) {
  41718. var t = e._findMousePosition(e._lastMouseEvent, !1);
  41719. t && (e._mouseState.isDragAndDrop || e._dispatchMouse(t, !0))
  41720. }
  41721. }), 10)
  41722. }, t.prototype.onCursorStateChanged = function (e) {
  41723. this._currentSelection = e.selections[0]
  41724. }, t.prototype._getPositionOutsideEditor = function (e) {
  41725. var t = e.editorPos, n = this._context.model, i = this._context.viewLayout, o = this._getMouseColumn(e);
  41726. if (e.posy < t.y) {
  41727. var r = Math.max(i.getCurrentScrollTop() - (t.y - e.posy), 0);
  41728. if (a = u.HitTestContext.getZoneAtCoord(this._context, r)) if (l = this._helpPositionJumpOverViewZone(a)) return new u.MouseTarget(null, 13, o, l);
  41729. var s = i.getLineNumberAtVerticalOffset(r);
  41730. return new u.MouseTarget(null, 13, o, new h.Position(s, 1))
  41731. }
  41732. if (e.posy > t.y + t.height) {
  41733. var a, l;
  41734. r = i.getCurrentScrollTop() + (e.posy - t.y);
  41735. if (a = u.HitTestContext.getZoneAtCoord(this._context, r)) if (l = this._helpPositionJumpOverViewZone(a)) return new u.MouseTarget(null, 13, o, l);
  41736. var d = i.getLineNumberAtVerticalOffset(r);
  41737. return new u.MouseTarget(null, 13, o, new h.Position(d, n.getLineMaxColumn(d)))
  41738. }
  41739. var c = i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop() + (e.posy - t.y));
  41740. return e.posx < t.x ? new u.MouseTarget(null, 13, o, new h.Position(c, 1)) : e.posx > t.x + t.width ? new u.MouseTarget(null, 13, o, new h.Position(c, n.getLineMaxColumn(c))) : null
  41741. }, t.prototype._findMousePosition = function (e, t) {
  41742. var n = this._getPositionOutsideEditor(e);
  41743. if (n) return n;
  41744. var i = this._createMouseTarget(e, t);
  41745. if (!i.position) return null;
  41746. if (8 === i.type || 5 === i.type) {
  41747. var o = this._helpPositionJumpOverViewZone(i.detail);
  41748. if (o) return new u.MouseTarget(i.element, i.type, i.mouseColumn, o, null, i.detail)
  41749. }
  41750. return i
  41751. }, t.prototype._helpPositionJumpOverViewZone = function (e) {
  41752. var t = new h.Position(this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn),
  41753. n = e.positionBefore, i = e.positionAfter;
  41754. return n && i ? n.isBefore(t) ? n : i : null
  41755. }, t.prototype._dispatchMouse = function (e, t) {
  41756. e.position && this._viewController.dispatchMouse({
  41757. position: e.position,
  41758. mouseColumn: e.mouseColumn,
  41759. startedOnLineNumbers: this._mouseState.startedOnLineNumbers,
  41760. inSelectionMode: t,
  41761. mouseDownCount: this._mouseState.count,
  41762. altKey: this._mouseState.altKey,
  41763. ctrlKey: this._mouseState.ctrlKey,
  41764. metaKey: this._mouseState.metaKey,
  41765. shiftKey: this._mouseState.shiftKey,
  41766. leftButton: this._mouseState.leftButton,
  41767. middleButton: this._mouseState.middleButton
  41768. })
  41769. }, t
  41770. }(a.Disposable), _ = function () {
  41771. function e() {
  41772. this._altKey = !1, this._ctrlKey = !1, this._metaKey = !1, this._shiftKey = !1, this._leftButton = !1, this._middleButton = !1, this._startedOnLineNumbers = !1, this._lastMouseDownPosition = null, this._lastMouseDownPositionEqualCount = 0, this._lastMouseDownCount = 0, this._lastSetMouseDownCountTime = 0, this.isDragAndDrop = !1
  41773. }
  41774. return Object.defineProperty(e.prototype, "altKey", {
  41775. get: function () {
  41776. return this._altKey
  41777. }, enumerable: !0, configurable: !0
  41778. }), Object.defineProperty(e.prototype, "ctrlKey", {
  41779. get: function () {
  41780. return this._ctrlKey
  41781. }, enumerable: !0, configurable: !0
  41782. }), Object.defineProperty(e.prototype, "metaKey", {
  41783. get: function () {
  41784. return this._metaKey
  41785. }, enumerable: !0, configurable: !0
  41786. }), Object.defineProperty(e.prototype, "shiftKey", {
  41787. get: function () {
  41788. return this._shiftKey
  41789. }, enumerable: !0, configurable: !0
  41790. }), Object.defineProperty(e.prototype, "leftButton", {
  41791. get: function () {
  41792. return this._leftButton
  41793. }, enumerable: !0, configurable: !0
  41794. }), Object.defineProperty(e.prototype, "middleButton", {
  41795. get: function () {
  41796. return this._middleButton
  41797. }, enumerable: !0, configurable: !0
  41798. }), Object.defineProperty(e.prototype, "startedOnLineNumbers", {
  41799. get: function () {
  41800. return this._startedOnLineNumbers
  41801. }, enumerable: !0, configurable: !0
  41802. }), Object.defineProperty(e.prototype, "count", {
  41803. get: function () {
  41804. return this._lastMouseDownCount
  41805. }, enumerable: !0, configurable: !0
  41806. }), e.prototype.setModifiers = function (e) {
  41807. this._altKey = e.altKey, this._ctrlKey = e.ctrlKey, this._metaKey = e.metaKey, this._shiftKey = e.shiftKey
  41808. }, e.prototype.setStartButtons = function (e) {
  41809. this._leftButton = e.leftButton, this._middleButton = e.middleButton
  41810. }, e.prototype.setStartedOnLineNumbers = function (e) {
  41811. this._startedOnLineNumbers = e
  41812. }, e.prototype.trySetCount = function (t, n) {
  41813. var i = (new Date).getTime();
  41814. i - this._lastSetMouseDownCountTime > e.CLEAR_MOUSE_DOWN_COUNT_TIME && (t = 1), this._lastSetMouseDownCountTime = i, t > this._lastMouseDownCount + 1 && (t = this._lastMouseDownCount + 1), this._lastMouseDownPosition && this._lastMouseDownPosition.equals(n) ? this._lastMouseDownPositionEqualCount++ : this._lastMouseDownPositionEqualCount = 1, this._lastMouseDownPosition = n, this._lastMouseDownCount = Math.min(t, this._lastMouseDownPositionEqualCount)
  41815. }, e.CLEAR_MOUSE_DOWN_COUNT_TIME = 400, e
  41816. }()
  41817. })), define(n[551], i([0, 1, 6, 16, 57, 2, 550, 141, 88]), (function (e, t, n, i, o, s, a, l, u) {
  41818. "use strict";
  41819. function d(e, t) {
  41820. var n = {translationY: t.translationY, translationX: t.translationX};
  41821. return e && (n.translationY += e.translationY,
  41822. n.translationX += e.translationX), n
  41823. }
  41824. Object.defineProperty(t, "__esModule", {value: !0});
  41825. var c = function (e) {
  41826. function t(t, i, o) {
  41827. var r = e.call(this, t, i, o) || this;
  41828. return r.viewHelper.linesContentDomNode.style.msTouchAction = "none", r.viewHelper.linesContentDomNode.style.msContentZooming = "none", r._installGestureHandlerTimeout = window.setTimeout((function () {
  41829. if (r._installGestureHandlerTimeout = -1, window.MSGesture) {
  41830. var e = new MSGesture, t = new MSGesture;
  41831. e.target = r.viewHelper.linesContentDomNode, t.target = r.viewHelper.linesContentDomNode, r.viewHelper.linesContentDomNode.addEventListener("MSPointerDown", (function (n) {
  41832. var i = n.pointerType;
  41833. i !== (n.MSPOINTER_TYPE_MOUSE || "mouse") ? i === (n.MSPOINTER_TYPE_TOUCH || "touch") ? (r._lastPointerType = "touch", e.addPointer(n.pointerId)) : (r._lastPointerType = "pen", t.addPointer(n.pointerId)) : r._lastPointerType = "mouse"
  41834. })), r._register(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode, "MSGestureChange", (function (e) {
  41835. return r._onGestureChange(e)
  41836. }), d)),
  41837. r._register(n.addDisposableListener(r.viewHelper.linesContentDomNode, "MSGestureTap", (function (e) {
  41838. return r._onCaptureGestureTap(e)
  41839. }), !0))
  41840. }
  41841. }), 100), r._lastPointerType = "mouse", r
  41842. }
  41843. return r(t, e), t.prototype._onMouseDown = function (t) {
  41844. "mouse" === this._lastPointerType && e.prototype._onMouseDown.call(this, t)
  41845. }, t.prototype._onCaptureGestureTap = function (e) {
  41846. var t = this, n = new l.EditorMouseEvent(e, this.viewHelper.viewDomNode),
  41847. i = this._createMouseTarget(n, !1);
  41848. i.position && this.viewController.moveTo(i.position), n.browserEvent.fromElement ? (n.preventDefault(), this.viewHelper.focusTextArea()) : setTimeout((function () {
  41849. t.viewHelper.focusTextArea()
  41850. }))
  41851. }, t.prototype._onGestureChange = function (e) {
  41852. this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY)
  41853. }, t.prototype.dispose = function () {
  41854. window.clearTimeout(this._installGestureHandlerTimeout), e.prototype.dispose.call(this)
  41855. }, t
  41856. }(a.MouseHandler), h = function (e) {
  41857. function t(t, i, o) {
  41858. var r = e.call(this, t, i, o) || this;
  41859. return r.viewHelper.linesContentDomNode.style.touchAction = "none",
  41860. r._installGestureHandlerTimeout = window.setTimeout((function () {
  41861. if (r._installGestureHandlerTimeout = -1, window.MSGesture) {
  41862. var e = new MSGesture, t = new MSGesture;
  41863. e.target = r.viewHelper.linesContentDomNode, t.target = r.viewHelper.linesContentDomNode, r.viewHelper.linesContentDomNode.addEventListener("pointerdown", (function (n) {
  41864. var i = n.pointerType;
  41865. "mouse" !== i ? "touch" === i ? (r._lastPointerType = "touch", e.addPointer(n.pointerId)) : (r._lastPointerType = "pen", t.addPointer(n.pointerId)) : r._lastPointerType = "mouse"
  41866. })), r._register(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode, "MSGestureChange", (function (e) {
  41867. return r._onGestureChange(e)
  41868. }), d)), r._register(n.addDisposableListener(r.viewHelper.linesContentDomNode, "MSGestureTap", (function (e) {
  41869. return r._onCaptureGestureTap(e)
  41870. }), !0))
  41871. }
  41872. }), 100), r._lastPointerType = "mouse", r
  41873. }
  41874. return r(t, e), t.prototype._onMouseDown = function (t) {
  41875. "mouse" === this._lastPointerType && e.prototype._onMouseDown.call(this, t)
  41876. }, t.prototype._onCaptureGestureTap = function (e) {
  41877. var t = this, n = new l.EditorMouseEvent(e, this.viewHelper.viewDomNode),
  41878. i = this._createMouseTarget(n, !1);
  41879. i.position && this.viewController.moveTo(i.position), n.browserEvent.fromElement ? (n.preventDefault(), this.viewHelper.focusTextArea()) : setTimeout((function () {
  41880. t.viewHelper.focusTextArea()
  41881. }))
  41882. }, t.prototype._onGestureChange = function (e) {
  41883. this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY)
  41884. }, t.prototype.dispose = function () {
  41885. window.clearTimeout(this._installGestureHandlerTimeout), e.prototype.dispose.call(this)
  41886. }, t
  41887. }(a.MouseHandler), p = function (e) {
  41888. function t(t, i, r) {
  41889. var s = e.call(this, t, i, r) || this;
  41890. s._register(o.Gesture.addTarget(s.viewHelper.linesContentDomNode)), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Tap, (function (e) {
  41891. return s.onTap(e)
  41892. }))), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Change, (function (e) {
  41893. return s.onChange(e)
  41894. }))), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Contextmenu, (function (e) {
  41895. return s._onContextMenu(new l.EditorMouseEvent(e, s.viewHelper.viewDomNode), !1)
  41896. }))), s._lastPointerType = "mouse", s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, "pointerdown", (function (e) {
  41897. var t = e.pointerType;
  41898. s._lastPointerType = "mouse" !== t ? "touch" === t ? "touch" : "pen" : "mouse"
  41899. })));
  41900. var u = new l.EditorPointerEventFactory(s.viewHelper.viewDomNode);
  41901. return s._register(u.onPointerMoveThrottled(s.viewHelper.viewDomNode, (function (e) {
  41902. return s._onMouseMove(e)
  41903. }), a.createMouseMoveEventMerger(s.mouseTargetFactory), a.MouseHandler.MOUSE_MOVE_MINIMUM_TIME)), s._register(u.onPointerUp(s.viewHelper.viewDomNode, (function (e) {
  41904. return s._onMouseUp(e)
  41905. }))), s._register(u.onPointerLeave(s.viewHelper.viewDomNode, (function (e) {
  41906. return s._onMouseLeave(e)
  41907. }))), s._register(u.onPointerDown(s.viewHelper.viewDomNode, (function (e) {
  41908. return s._onMouseDown(e)
  41909. }))), s
  41910. }
  41911. return r(t, e), t.prototype.onTap = function (e) {
  41912. if (e.initialTarget && this.viewHelper.linesContentDomNode.contains(e.initialTarget)) {
  41913. e.preventDefault(), this.viewHelper.focusTextArea()
  41914. ;var t = this._createMouseTarget(new l.EditorMouseEvent(e, this.viewHelper.viewDomNode), !1);
  41915. t.position && this.viewController.dispatchMouse({
  41916. position: t.position,
  41917. mouseColumn: t.position.column,
  41918. startedOnLineNumbers: !1,
  41919. mouseDownCount: e.tapCount,
  41920. inSelectionMode: !1,
  41921. altKey: !1,
  41922. ctrlKey: !1,
  41923. metaKey: !1,
  41924. shiftKey: !1,
  41925. leftButton: !1,
  41926. middleButton: !1
  41927. })
  41928. }
  41929. }, t.prototype.onChange = function (e) {
  41930. "touch" === this._lastPointerType && this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY)
  41931. }, t.prototype._onMouseDown = function (t) {
  41932. t.target && this.viewHelper.linesContentDomNode.contains(t.target) && "touch" === this._lastPointerType || e.prototype._onMouseDown.call(this, t)
  41933. }, t
  41934. }(a.MouseHandler);
  41935. t.PointerEventHandler = p;
  41936. var g = function (e) {
  41937. function t(t, i, r) {
  41938. var s = e.call(this, t, i, r) || this;
  41939. return s._register(o.Gesture.addTarget(s.viewHelper.linesContentDomNode)), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Tap, (function (e) {
  41940. return s.onTap(e)
  41941. }))),
  41942. s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Change, (function (e) {
  41943. return s.onChange(e)
  41944. }))), s._register(n.addDisposableListener(s.viewHelper.linesContentDomNode, o.EventType.Contextmenu, (function (e) {
  41945. return s._onContextMenu(new l.EditorMouseEvent(e, s.viewHelper.viewDomNode), !1)
  41946. }))), s
  41947. }
  41948. return r(t, e), t.prototype.onTap = function (e) {
  41949. e.preventDefault(), this.viewHelper.focusTextArea();
  41950. var t = this._createMouseTarget(new l.EditorMouseEvent(e, this.viewHelper.viewDomNode), !1);
  41951. t.position && this.viewController.moveTo(t.position)
  41952. }, t.prototype.onChange = function (e) {
  41953. this._context.viewLayout.deltaScrollNow(-e.translationX, -e.translationY)
  41954. }, t
  41955. }(a.MouseHandler), f = function (e) {
  41956. function t(t, n, o) {
  41957. var r = e.call(this) || this
  41958. ;
  41959. return window.navigator.msPointerEnabled ? r.handler = r._register(new c(t, n, o)) : i.isIOS && u.BrowserFeatures.pointerEvents ? r.handler = r._register(new p(t, n, o)) : window.TouchEvent ? r.handler = r._register(new g(t, n, o)) : window.navigator.pointerEnabled || window.PointerEvent ? r.handler = r._register(new h(t, n, o)) : r.handler = r._register(new a.MouseHandler(t, n, o)), r
  41960. }
  41961. return r(t, e), t.prototype.getTargetAtClientPoint = function (e, t) {
  41962. return this.handler.getTargetAtClientPoint(e, t)
  41963. }, t
  41964. }(s.Disposable);
  41965. t.PointerHandler = f
  41966. })), define(n[228], i([0, 1, 2, 166]), (function (e, t, n, i) {
  41967. "use strict";
  41968. Object.defineProperty(t, "__esModule", {value: !0});
  41969. var o = function (e) {
  41970. function t(t) {
  41971. var n = e.call(this) || this;
  41972. return n.onDidContentSizeChange = null, n.onDidScroll = null, n.onDidGainFocus = null, n.onDidLoseFocus = null, n.onKeyDown = null, n.onKeyUp = null, n.onContextMenu = null, n.onMouseMove = null, n.onMouseLeave = null, n.onMouseUp = null, n.onMouseDown = null, n.onMouseDrag = null, n.onMouseDrop = null, n.onMouseWheel = null, n._viewModel = t, n
  41973. }
  41974. return r(t, e),
  41975. t.prototype.emitContentSizeChange = function (e) {
  41976. this.onDidContentSizeChange && this.onDidContentSizeChange(e)
  41977. }, t.prototype.emitScrollChanged = function (e) {
  41978. this.onDidScroll && this.onDidScroll(e)
  41979. }, t.prototype.emitViewFocusGained = function () {
  41980. this.onDidGainFocus && this.onDidGainFocus(void 0)
  41981. }, t.prototype.emitViewFocusLost = function () {
  41982. this.onDidLoseFocus && this.onDidLoseFocus(void 0)
  41983. }, t.prototype.emitKeyDown = function (e) {
  41984. this.onKeyDown && this.onKeyDown(e)
  41985. }, t.prototype.emitKeyUp = function (e) {
  41986. this.onKeyUp && this.onKeyUp(e)
  41987. }, t.prototype.emitContextMenu = function (e) {
  41988. this.onContextMenu && this.onContextMenu(this._convertViewToModelMouseEvent(e))
  41989. }, t.prototype.emitMouseMove = function (e) {
  41990. this.onMouseMove && this.onMouseMove(this._convertViewToModelMouseEvent(e))
  41991. }, t.prototype.emitMouseLeave = function (e) {
  41992. this.onMouseLeave && this.onMouseLeave(this._convertViewToModelMouseEvent(e))
  41993. }, t.prototype.emitMouseUp = function (e) {
  41994. this.onMouseUp && this.onMouseUp(this._convertViewToModelMouseEvent(e))
  41995. }, t.prototype.emitMouseDown = function (e) {
  41996. this.onMouseDown && this.onMouseDown(this._convertViewToModelMouseEvent(e))
  41997. }, t.prototype.emitMouseDrag = function (e) {
  41998. this.onMouseDrag && this.onMouseDrag(this._convertViewToModelMouseEvent(e))
  41999. }, t.prototype.emitMouseDrop = function (e) {
  42000. this.onMouseDrop && this.onMouseDrop(this._convertViewToModelMouseEvent(e))
  42001. }, t.prototype.emitMouseWheel = function (e) {
  42002. this.onMouseWheel && this.onMouseWheel(e)
  42003. }, t.prototype._convertViewToModelMouseEvent = function (e) {
  42004. return e.target ? {event: e.event, target: this._convertViewToModelMouseTarget(e.target)} : e
  42005. }, t.prototype._convertViewToModelMouseTarget = function (e) {
  42006. return t.convertViewToModelMouseTarget(e, this._viewModel.coordinatesConverter)
  42007. }, t.convertViewToModelMouseTarget = function (e, t) {
  42008. return new s(e.element, e.type, e.mouseColumn, e.position ? t.convertViewPositionToModelPosition(e.position) : null, e.range ? t.convertViewRangeToModelRange(e.range) : null, e.detail)
  42009. }, t
  42010. }(n.Disposable);
  42011. t.ViewOutgoingEvents = o;
  42012. var s = function () {
  42013. function e(e, t, n, i, o, r) {
  42014. this.element = e, this.type = t, this.mouseColumn = n, this.position = i,
  42015. this.range = o, this.detail = r
  42016. }
  42017. return e.prototype.toString = function () {
  42018. return i.MouseTarget.toString(this)
  42019. }, e
  42020. }()
  42021. })), define(n[552], i([0, 1, 15, 60, 143, 37, 227, 13, 3, 91, 290]), (function (e, t, n, i, o, s, a, l, u, d) {
  42022. "use strict";
  42023. Object.defineProperty(t, "__esModule", {value: !0});
  42024. var c = function () {
  42025. function e() {
  42026. this._currentVisibleRange = new u.Range(1, 1, 1, 1)
  42027. }
  42028. return e.prototype.getCurrentVisibleRange = function () {
  42029. return this._currentVisibleRange
  42030. }, e.prototype.setCurrentVisibleRange = function (e) {
  42031. this._currentVisibleRange = e
  42032. }, e
  42033. }(), h = function (e, t, n, i, o, r) {
  42034. this.lineNumber = e, this.startColumn = t, this.endColumn = n, this.startScrollTop = i, this.stopScrollTop = o, this.scrollType = r
  42035. }, p = function (e) {
  42036. function t(t, r) {
  42037. var l = e.call(this, t) || this;
  42038. l._linesContent = r, l._textRangeRestingSpot = document.createElement("div"), l._visibleLines = new o.VisibleLinesCollection(l), l.domNode = l._visibleLines.domNode;
  42039. var u = l._context.configuration, d = l._context.configuration.options, h = d.get(34), p = d.get(108);
  42040. return l._lineHeight = d.get(49),
  42041. l._typicalHalfwidthCharacterWidth = h.typicalHalfwidthCharacterWidth, l._isViewportWrapping = p.isViewportWrapping, l._revealHorizontalRightPadding = d.get(75), l._cursorSurroundingLines = d.get(19), l._cursorSurroundingLinesStyle = d.get(20), l._canUseLayerHinting = !d.get(22), l._viewLineOptions = new a.ViewLineOptions(u, l._context.theme.type), s.PartFingerprints.write(l.domNode, 7), l.domNode.setClassName("view-lines"), i.Configuration.applyFontInfo(l.domNode, h), l._maxLineWidth = 0, l._asyncUpdateLineWidths = new n.RunOnceScheduler((function () {
  42042. l._updateLineWidthsSlow()
  42043. }), 200), l._lastRenderedData = new c, l._horizontalRevealRequest = null, l
  42044. }
  42045. return r(t, e), t.prototype.dispose = function () {
  42046. this._asyncUpdateLineWidths.dispose(), e.prototype.dispose.call(this)
  42047. }, t.prototype.getDomNode = function () {
  42048. return this.domNode
  42049. }, t.prototype.createVisibleLine = function () {
  42050. return new a.ViewLine(this._viewLineOptions)
  42051. }, t.prototype.onConfigurationChanged = function (e) {
  42052. this._visibleLines.onConfigurationChanged(e), e.hasChanged(108) && (this._maxLineWidth = 0)
  42053. ;var t = this._context.configuration.options, n = t.get(34), o = t.get(108);
  42054. return this._lineHeight = t.get(49), this._typicalHalfwidthCharacterWidth = n.typicalHalfwidthCharacterWidth, this._isViewportWrapping = o.isViewportWrapping, this._revealHorizontalRightPadding = t.get(75), this._cursorSurroundingLines = t.get(19), this._cursorSurroundingLinesStyle = t.get(20), this._canUseLayerHinting = !t.get(22), i.Configuration.applyFontInfo(this.domNode, n), this._onOptionsMaybeChanged(), e.hasChanged(107) && (this._maxLineWidth = 0), !0
  42055. }, t.prototype._onOptionsMaybeChanged = function () {
  42056. var e = this._context.configuration, t = new a.ViewLineOptions(e, this._context.theme.type);
  42057. if (!this._viewLineOptions.equals(t)) {
  42058. this._viewLineOptions = t;
  42059. for (var n = this._visibleLines.getStartLineNumber(), i = this._visibleLines.getEndLineNumber(), o = n; o <= i; o++) {
  42060. this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions)
  42061. }
  42062. return !0
  42063. }
  42064. return !1
  42065. }, t.prototype.onCursorStateChanged = function (e) {
  42066. for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = !1, o = t; o <= n; o++) i = this._visibleLines.getVisibleLine(o).onSelectionChanged() || i;
  42067. return i
  42068. }, t.prototype.onDecorationsChanged = function (e) {
  42069. for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = t; i <= n; i++) this._visibleLines.getVisibleLine(i).onDecorationsChanged();
  42070. return !0
  42071. }, t.prototype.onFlushed = function (e) {
  42072. var t = this._visibleLines.onFlushed(e);
  42073. return this._maxLineWidth = 0, t
  42074. }, t.prototype.onLinesChanged = function (e) {
  42075. return this._visibleLines.onLinesChanged(e)
  42076. }, t.prototype.onLinesDeleted = function (e) {
  42077. return this._visibleLines.onLinesDeleted(e)
  42078. }, t.prototype.onLinesInserted = function (e) {
  42079. return this._visibleLines.onLinesInserted(e)
  42080. }, t.prototype.onRevealRangeRequest = function (e) {
  42081. var t = this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(), e.source, e.range, e.verticalType),
  42082. n = this._context.viewLayout.validateScrollPosition({scrollTop: t})
  42083. ;e.revealHorizontal ? e.range.startLineNumber !== e.range.endLineNumber ? n = {
  42084. scrollTop: n.scrollTop,
  42085. scrollLeft: 0
  42086. } : this._horizontalRevealRequest = new h(e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), n.scrollTop, e.scrollType) : this._horizontalRevealRequest = null;
  42087. var i = Math.abs(this._context.viewLayout.getCurrentScrollTop() - n.scrollTop);
  42088. return 0 === e.scrollType && i > this._lineHeight ? this._context.viewLayout.setScrollPositionSmooth(n) : this._context.viewLayout.setScrollPositionNow(n), !0
  42089. }, t.prototype.onScrollChanged = function (e) {
  42090. if (this._horizontalRevealRequest && e.scrollLeftChanged && (this._horizontalRevealRequest = null), this._horizontalRevealRequest && e.scrollTopChanged) {
  42091. var t = Math.min(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop),
  42092. n = Math.max(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop);
  42093. (e.scrollTop < t || e.scrollTop > n) && (this._horizontalRevealRequest = null)
  42094. }
  42095. return this.domNode.setWidth(e.scrollWidth), this._visibleLines.onScrollChanged(e) || !0
  42096. }, t.prototype.onTokensChanged = function (e) {
  42097. return this._visibleLines.onTokensChanged(e)
  42098. }, t.prototype.onZonesChanged = function (e) {
  42099. return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth), this._visibleLines.onZonesChanged(e)
  42100. }, t.prototype.onThemeChanged = function (e) {
  42101. return this._onOptionsMaybeChanged()
  42102. }, t.prototype.getPositionFromDOMInfo = function (e, t) {
  42103. var n = this._getViewLineDomNode(e);
  42104. if (null === n) return null;
  42105. var i = this._getLineNumberFor(n);
  42106. if (-1 === i) return null;
  42107. if (i < 1 || i > this._context.model.getLineCount()) return null;
  42108. if (1 === this._context.model.getLineMaxColumn(i)) return new l.Position(i, 1);
  42109. var o = this._visibleLines.getStartLineNumber(), r = this._visibleLines.getEndLineNumber();
  42110. if (i < o || i > r) return null;
  42111. var s = this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i, e, t),
  42112. a = this._context.model.getLineMinColumn(i);
  42113. return s < a && (s = a), new l.Position(i, s)
  42114. }, t.prototype._getViewLineDomNode = function (e) {
  42115. for (; e && 1 === e.nodeType;) {
  42116. if (e.className === a.ViewLine.CLASS_NAME) return e;
  42117. e = e.parentElement
  42118. }
  42119. return null
  42120. }, t.prototype._getLineNumberFor = function (e) {
  42121. for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = t; i <= n; i++) {
  42122. if (e === this._visibleLines.getVisibleLine(i).getDomNode()) return i
  42123. }
  42124. return -1
  42125. }, t.prototype.getLineWidth = function (e) {
  42126. var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber();
  42127. return e < t || e > n ? -1 : this._visibleLines.getVisibleLine(e).getWidth()
  42128. }, t.prototype.linesVisibleRangesForRange = function (e, t) {
  42129. if (this.shouldRender()) return null;
  42130. var n = e.endLineNumber,
  42131. i = u.Range.intersectRanges(e, this._lastRenderedData.getCurrentVisibleRange());
  42132. if (!i) return null;
  42133. var o = [], r = 0, s = new a.DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot), c = 0;
  42134. t && (c = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(i.startLineNumber, 1)).lineNumber)
  42135. ;
  42136. for (var h = this._visibleLines.getStartLineNumber(), p = this._visibleLines.getEndLineNumber(), g = i.startLineNumber; g <= i.endLineNumber; g++) if (!(g < h || g > p)) {
  42137. var f = g === i.startLineNumber ? i.startColumn : 1,
  42138. m = g === i.endLineNumber ? i.endColumn : this._context.model.getLineMaxColumn(g),
  42139. v = this._visibleLines.getVisibleLine(g).getVisibleRangesForRange(f, m, s);
  42140. if (v) {
  42141. if (t && g < n) c !== (c = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new l.Position(g + 1, 1)).lineNumber) && (v.ranges[v.ranges.length - 1].width += this._typicalHalfwidthCharacterWidth);
  42142. o[r++] = new d.LineVisibleRanges(v.outsideRenderedLine, g, v.ranges)
  42143. }
  42144. }
  42145. return 0 === r ? null : o
  42146. }, t.prototype._visibleRangesForLineRange = function (e, t, n) {
  42147. return this.shouldRender() ? null : e < this._visibleLines.getStartLineNumber() || e > this._visibleLines.getEndLineNumber() ? null : this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t, n, new a.DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot))
  42148. }, t.prototype.visibleRangeForPosition = function (e) {
  42149. var t = this._visibleRangesForLineRange(e.lineNumber, e.column, e.column);
  42150. return t ? new d.HorizontalPosition(t.outsideRenderedLine, t.ranges[0].left) : null
  42151. }, t.prototype.updateLineWidths = function () {
  42152. this._updateLineWidths(!1)
  42153. }, t.prototype._updateLineWidthsFast = function () {
  42154. return this._updateLineWidths(!0)
  42155. }, t.prototype._updateLineWidthsSlow = function () {
  42156. this._updateLineWidths(!1)
  42157. }, t.prototype._updateLineWidths = function (e) {
  42158. for (var t = this._visibleLines.getStartLineNumber(), n = this._visibleLines.getEndLineNumber(), i = 1, o = !0, r = t; r <= n; r++) {
  42159. var s = this._visibleLines.getVisibleLine(r);
  42160. !e || s.getWidthIsFast() ? i = Math.max(i, s.getWidth()) : o = !1
  42161. }
  42162. return o && 1 === t && n === this._context.model.getLineCount() && (this._maxLineWidth = 0), this._ensureMaxLineWidth(i), o
  42163. }, t.prototype.prepareRender = function () {
  42164. throw new Error("Not supported")
  42165. }, t.prototype.render = function () {
  42166. throw new Error("Not supported")
  42167. }, t.prototype.renderText = function (e) {
  42168. if (this._visibleLines.renderLines(e), this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),
  42169. this.domNode.setWidth(this._context.viewLayout.getScrollWidth()), this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1e6)), this._horizontalRevealRequest) {
  42170. var t = this._horizontalRevealRequest.lineNumber, n = this._horizontalRevealRequest.startColumn,
  42171. i = this._horizontalRevealRequest.endColumn, o = this._horizontalRevealRequest.scrollType;
  42172. if (e.startLineNumber <= t && t <= e.endLineNumber) {
  42173. this._horizontalRevealRequest = null, this.onDidRender();
  42174. var r = this._computeScrollLeftToRevealRange(t, n, i);
  42175. this._isViewportWrapping || this._ensureMaxLineWidth(r.maxHorizontalOffset), 0 === o ? this._context.viewLayout.setScrollPositionSmooth({scrollLeft: r.scrollLeft}) : this._context.viewLayout.setScrollPositionNow({scrollLeft: r.scrollLeft})
  42176. }
  42177. }
  42178. this._updateLineWidthsFast() || this._asyncUpdateLineWidths.schedule(), this._linesContent.setLayerHinting(this._canUseLayerHinting), this._linesContent.setContain("strict");
  42179. var s = this._context.viewLayout.getCurrentScrollTop() - e.bigNumbersDelta;
  42180. this._linesContent.setTop(-s),
  42181. this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())
  42182. }, t.prototype._ensureMaxLineWidth = function (e) {
  42183. var t = Math.ceil(e);
  42184. this._maxLineWidth < t && (this._maxLineWidth = t, this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth))
  42185. }, t.prototype._computeScrollTopToRevealRange = function (e, t, n, i) {
  42186. var o, r, s, a = e.top, l = e.height, u = a + l;
  42187. if (o = this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber), r = this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber) + this._lineHeight, !("mouse" === t && "default" === this._cursorSurroundingLinesStyle)) {
  42188. var d = Math.min(l / this._lineHeight / 2, this._cursorSurroundingLines);
  42189. o -= d * this._lineHeight, r += Math.max(0, d - 1) * this._lineHeight
  42190. }
  42191. if (0 !== i && 4 !== i || (r += this._lineHeight), r - o > l) s = o; else if (1 === i || 2 === i) if (2 === i && a <= o && r <= u) s = a; else {
  42192. var c = (o + r) / 2;
  42193. s = Math.max(0, c - l / 2)
  42194. } else s = this._computeMinimumScrolling(a, u, o, r, 3 === i, 4 === i);
  42195. return s
  42196. }, t.prototype._computeScrollLeftToRevealRange = function (e, n, i) {
  42197. var o = 0, r = this._context.viewLayout.getCurrentViewport(), s = r.left, a = s + r.width,
  42198. l = this._visibleRangesForLineRange(e, n, i), u = 1073741824, d = 0;
  42199. if (!l) return {scrollLeft: s, maxHorizontalOffset: o};
  42200. for (var c = 0, h = l.ranges; c < h.length; c++) {
  42201. var p = h[c];
  42202. p.left < u && (u = p.left), p.left + p.width > d && (d = p.left + p.width)
  42203. }
  42204. return o = d, u = Math.max(0, u - t.HORIZONTAL_EXTRA_PX), d += this._revealHorizontalRightPadding, {
  42205. scrollLeft: this._computeMinimumScrolling(s, a, u, d),
  42206. maxHorizontalOffset: o
  42207. }
  42208. }, t.prototype._computeMinimumScrolling = function (e, t, n, i, o, r) {
  42209. o = !!o, r = !!r;
  42210. var s = (t |= 0) - (e |= 0);
  42211. return (i |= 0) - (n |= 0) < s ? o ? n : r ? Math.max(0, i - s) : n < e ? n : i > t ? Math.max(0, i - s) : e : n
  42212. }, t.HORIZONTAL_EXTRA_PX = 30, t
  42213. }(s.ViewPart);
  42214. t.ViewLines = p
  42215. })), define(n[553], i([0, 1, 6, 28, 78, 16, 5, 143, 37, 33, 3, 215, 81, 20, 14, 57, 337, 48, 102, 293]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y) {
  42216. "use strict";
  42217. function C(e, t) {
  42218. return 1 === e ? 2 * t : 3 * t
  42219. }
  42220. function b(e, t) {
  42221. return 1 * t
  42222. }
  42223. Object.defineProperty(t, "__esModule", {value: !0});
  42224. var S = 140, w = function () {
  42225. function e(e) {
  42226. var t = this, n = e.options, i = n.get(105), o = n.get(107), r = n.get(34);
  42227. this.renderMinimap = 0 | o.renderMinimap, this.scrollBeyondLastLine = n.get(80);
  42228. var s = n.get(54);
  42229. this.showSlider = s.showSlider, this.fontScale = Math.round(s.scale * i), this.charRenderer = y.once((function () {
  42230. return v.MinimapCharRendererFactory.create(t.fontScale, r.fontFamily)
  42231. })), this.pixelRatio = i, this.typicalHalfwidthCharacterWidth = r.typicalHalfwidthCharacterWidth, this.lineHeight = n.get(49), this.minimapLeft = o.minimapLeft, this.minimapWidth = o.minimapWidth, this.minimapHeight = o.height, this.canvasInnerWidth = Math.floor(i * this.minimapWidth), this.canvasInnerHeight = Math.floor(i * this.minimapHeight), this.canvasOuterWidth = this.canvasInnerWidth / i, this.canvasOuterHeight = this.canvasInnerHeight / i
  42232. }
  42233. return e.prototype.equals = function (e) {
  42234. return this.renderMinimap === e.renderMinimap && this.scrollBeyondLastLine === e.scrollBeyondLastLine && this.showSlider === e.showSlider && this.pixelRatio === e.pixelRatio && this.typicalHalfwidthCharacterWidth === e.typicalHalfwidthCharacterWidth && this.lineHeight === e.lineHeight && this.fontScale === e.fontScale && this.minimapLeft === e.minimapLeft && this.minimapWidth === e.minimapWidth && this.minimapHeight === e.minimapHeight && this.canvasInnerWidth === e.canvasInnerWidth && this.canvasInnerHeight === e.canvasInnerHeight && this.canvasOuterWidth === e.canvasOuterWidth && this.canvasOuterHeight === e.canvasOuterHeight
  42235. }, e
  42236. }(), E = function () {
  42237. function e(e, t, n, i, o, r, s) {
  42238. this.scrollTop = e, this.scrollHeight = t, this._computedSliderRatio = n, this.sliderTop = i, this.sliderHeight = o, this.startLineNumber = r, this.endLineNumber = s
  42239. }
  42240. return e.prototype.getDesiredScrollTopFromDelta = function (e) {
  42241. var t = this.sliderTop + e;
  42242. return Math.round(t / this._computedSliderRatio)
  42243. }, e.prototype.getDesiredScrollTopFromTouchLocation = function (e) {
  42244. return Math.round((e - this.sliderHeight / 2) / this._computedSliderRatio)
  42245. }, e.create = function (t, n, i, o, r, s, a, l, u) {
  42246. var d, c, h = t.pixelRatio, p = C(t.renderMinimap, t.fontScale),
  42247. g = Math.floor(t.canvasInnerHeight / p), f = t.lineHeight;
  42248. if (r && i !== s) {
  42249. var m = i - n + 1;
  42250. d = Math.floor(m * p / h)
  42251. } else {
  42252. var v = o / f;
  42253. d = Math.floor(v * p / h)
  42254. }
  42255. c = t.scrollBeyondLastLine ? (s - 1) * p / h : Math.max(0, s * p / h - d);
  42256. var _ = (c = Math.min(t.minimapHeight - d, c)) / (l - o), y = a * _, b = 0;
  42257. t.scrollBeyondLastLine && (b = v = o / f);
  42258. if (g >= s + b) return new e(a, l, _, y, d, S = 1, s);
  42259. var S = Math.max(1, Math.floor(n - y * h / p));
  42260. return u && u.scrollHeight === l && (u.scrollTop > a && (S = Math.min(S, u.startLineNumber)), u.scrollTop < a && (S = Math.max(S, u.startLineNumber))), new e(a, l, _, y, d, S, Math.min(s, S + g - 1))
  42261. }, e
  42262. }(), L = function () {
  42263. function e(e) {
  42264. this.dy = e
  42265. }
  42266. return e.prototype.onContentChanged = function () {
  42267. this.dy = -1
  42268. }, e.prototype.onTokensChanged = function () {
  42269. this.dy = -1
  42270. }, e.INVALID = new e(-1), e
  42271. }(), D = function () {
  42272. function e(e, t, n) {
  42273. this.renderedLayout = e, this._imageData = t, this._renderedLines = new l.RenderedLinesCollection((function () {
  42274. return L.INVALID
  42275. })),
  42276. this._renderedLines._set(e.startLineNumber, n)
  42277. }
  42278. return e.prototype.linesEquals = function (e) {
  42279. if (!this.scrollEquals(e)) return !1;
  42280. for (var t = this._renderedLines._get().lines, n = 0, i = t.length; n < i; n++) if (-1 === t[n].dy) return !1;
  42281. return !0
  42282. }, e.prototype.scrollEquals = function (e) {
  42283. return this.renderedLayout.startLineNumber === e.startLineNumber && this.renderedLayout.endLineNumber === e.endLineNumber
  42284. }, e.prototype._get = function () {
  42285. var e = this._renderedLines._get();
  42286. return {imageData: this._imageData, rendLineNumberStart: e.rendLineNumberStart, lines: e.lines}
  42287. }, e.prototype.onLinesChanged = function (e) {
  42288. return this._renderedLines.onLinesChanged(e.fromLineNumber, e.toLineNumber)
  42289. }, e.prototype.onLinesDeleted = function (e) {
  42290. this._renderedLines.onLinesDeleted(e.fromLineNumber, e.toLineNumber)
  42291. }, e.prototype.onLinesInserted = function (e) {
  42292. this._renderedLines.onLinesInserted(e.fromLineNumber, e.toLineNumber)
  42293. }, e.prototype.onTokensChanged = function (e) {
  42294. return this._renderedLines.onTokensChanged(e.ranges)
  42295. }, e
  42296. }(), N = function () {
  42297. function e(t, n, i, o) {
  42298. this._backgroundFillData = e._createBackgroundFillData(n, i, o), this._buffers = [t.createImageData(n, i), t.createImageData(n, i)], this._lastUsedBuffer = 0
  42299. }
  42300. return e.prototype.getBuffer = function () {
  42301. this._lastUsedBuffer = 1 - this._lastUsedBuffer;
  42302. var e = this._buffers[this._lastUsedBuffer];
  42303. return e.data.set(this._backgroundFillData), e
  42304. }, e._createBackgroundFillData = function (e, t, n) {
  42305. for (var i = n.r, o = n.g, r = n.b, s = new Uint8ClampedArray(e * t * 4), a = 0, l = 0; l < t; l++) for (var u = 0; u < e; u++) s[a] = i, s[a + 1] = o, s[a + 2] = r, s[a + 3] = 255, a += 4;
  42306. return s
  42307. }, e
  42308. }(), x = function (e) {
  42309. function t(t) {
  42310. var r = e.call(this, t) || this;
  42311. return r._selections = [], r._renderDecorations = !1, r._gestureInProgress = !1, r._options = new w(r._context.configuration), r._lastRenderData = null, r._buffers = null, r._selectionColor = r._context.theme.getColor(g.minimapSelection), r._domNode = i.createFastDomNode(document.createElement("div")), u.PartFingerprints.write(r._domNode, 8), r._domNode.setClassName(r._getMinimapDomNodeClassName()), r._domNode.setPosition("absolute"), r._domNode.setAttribute("role", "presentation"),
  42312. r._domNode.setAttribute("aria-hidden", "true"), r._shadow = i.createFastDomNode(document.createElement("div")), r._shadow.setClassName("minimap-shadow-hidden"), r._domNode.appendChild(r._shadow), r._canvas = i.createFastDomNode(document.createElement("canvas")), r._canvas.setPosition("absolute"), r._canvas.setLeft(0), r._domNode.appendChild(r._canvas), r._decorationsCanvas = i.createFastDomNode(document.createElement("canvas")), r._decorationsCanvas.setPosition("absolute"), r._decorationsCanvas.setClassName("minimap-decorations-layer"), r._decorationsCanvas.setLeft(0), r._domNode.appendChild(r._decorationsCanvas), r._slider = i.createFastDomNode(document.createElement("div")), r._slider.setPosition("absolute"), r._slider.setClassName("minimap-slider"), r._slider.setLayerHinting(!0), r._slider.setContain("strict"), r._domNode.appendChild(r._slider), r._sliderHorizontal = i.createFastDomNode(document.createElement("div")), r._sliderHorizontal.setPosition("absolute"), r._sliderHorizontal.setClassName("minimap-slider-horizontal"),
  42313. r._slider.appendChild(r._sliderHorizontal), r._tokensColorTracker = h.MinimapTokensColorTracker.getInstance(), r._applyLayout(), r._mouseDownListener = n.addStandardDisposableListener(r._domNode.domNode, "mousedown", (function (e) {
  42314. e.preventDefault();
  42315. var t = r._options.renderMinimap;
  42316. if (0 !== t && r._lastRenderData) {
  42317. var n = C(t, r._options.fontScale), i = r._options.pixelRatio * e.browserEvent.offsetY,
  42318. o = Math.floor(i / n) + r._lastRenderData.renderedLayout.startLineNumber;
  42319. o = Math.min(o, r._context.model.getLineCount()), r._context.privateViewEventBus.emit(new p.ViewRevealRangeRequestEvent("mouse", new c.Range(o, 1, o, 1), 1, !1, 0))
  42320. }
  42321. })), r._sliderMouseMoveMonitor = new o.GlobalMouseMoveMonitor, r._sliderMouseDownListener = n.addStandardDisposableListener(r._slider.domNode, "mousedown", (function (e) {
  42322. if (e.preventDefault(), e.stopPropagation(), e.leftButton && r._lastRenderData) {
  42323. var t = e.posy, n = e.posx, i = r._lastRenderData.renderedLayout;
  42324. r._slider.toggleClassName("active", !0),
  42325. r._sliderMouseMoveMonitor.startMonitoring(e.target, e.buttons, o.standardMouseMoveMerger, (function (e) {
  42326. var o = Math.abs(e.posx - n);
  42327. if (s.isWindows && o > S) r._context.viewLayout.setScrollPositionNow({scrollTop: i.scrollTop}); else {
  42328. var a = e.posy - t;
  42329. r._context.viewLayout.setScrollPositionNow({scrollTop: i.getDesiredScrollTopFromDelta(a)})
  42330. }
  42331. }), (function () {
  42332. r._slider.toggleClassName("active", !1)
  42333. }))
  42334. }
  42335. })), r._gestureDisposable = m.Gesture.addTarget(r._domNode.domNode), r._sliderTouchStartListener = n.addDisposableListener(r._domNode.domNode, m.EventType.Start, (function (e) {
  42336. e.preventDefault(), e.stopPropagation(), r._lastRenderData && (r._slider.toggleClassName("active", !0), r._gestureInProgress = !0, r.scrollDueToTouchEvent(e))
  42337. })), r._sliderTouchMoveListener = n.addStandardDisposableListener(r._domNode.domNode, m.EventType.Change, (function (e) {
  42338. e.preventDefault(), e.stopPropagation(), r._lastRenderData && r._gestureInProgress && r.scrollDueToTouchEvent(e)
  42339. })),
  42340. r._sliderTouchEndListener = n.addStandardDisposableListener(r._domNode.domNode, m.EventType.End, (function (e) {
  42341. e.preventDefault(), e.stopPropagation(), r._gestureInProgress = !1, r._slider.toggleClassName("active", !1)
  42342. })), r
  42343. }
  42344. return r(t, e), t.prototype.scrollDueToTouchEvent = function (e) {
  42345. var t = this._domNode.domNode.getBoundingClientRect().top,
  42346. n = this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY - t);
  42347. this._context.viewLayout.setScrollPositionNow({scrollTop: n})
  42348. }, t.prototype.dispose = function () {
  42349. this._mouseDownListener.dispose(), this._sliderMouseMoveMonitor.dispose(), this._sliderMouseDownListener.dispose(), this._gestureDisposable.dispose(), this._sliderTouchStartListener.dispose(), this._sliderTouchMoveListener.dispose(), this._sliderTouchEndListener.dispose(), e.prototype.dispose.call(this)
  42350. }, t.prototype._getMinimapDomNodeClassName = function () {
  42351. return "always" === this._options.showSlider ? "minimap slider-always" : "minimap slider-mouseover"
  42352. }, t.prototype.getDomNode = function () {
  42353. return this._domNode
  42354. },
  42355. t.prototype._applyLayout = function () {
  42356. this._domNode.setLeft(this._options.minimapLeft), this._domNode.setWidth(this._options.minimapWidth), this._domNode.setHeight(this._options.minimapHeight), this._shadow.setHeight(this._options.minimapHeight), this._canvas.setWidth(this._options.canvasOuterWidth), this._canvas.setHeight(this._options.canvasOuterHeight), this._canvas.domNode.width = this._options.canvasInnerWidth, this._canvas.domNode.height = this._options.canvasInnerHeight, this._decorationsCanvas.setWidth(this._options.canvasOuterWidth), this._decorationsCanvas.setHeight(this._options.canvasOuterHeight), this._decorationsCanvas.domNode.width = this._options.canvasInnerWidth, this._decorationsCanvas.domNode.height = this._options.canvasInnerHeight, this._slider.setWidth(this._options.minimapWidth)
  42357. }, t.prototype._getBuffer = function () {
  42358. return this._buffers || this._options.canvasInnerWidth > 0 && this._options.canvasInnerHeight > 0 && (this._buffers = new N(this._canvas.domNode.getContext("2d"), this._options.canvasInnerWidth, this._options.canvasInnerHeight, this._tokensColorTracker.getColor(2))), this._buffers ? this._buffers.getBuffer() : null
  42359. }, t.prototype._onOptionsMaybeChanged = function () {
  42360. var e = new w(this._context.configuration);
  42361. return !this._options.equals(e) && (this._options = e, this._lastRenderData = null, this._buffers = null, this._applyLayout(), this._domNode.setClassName(this._getMinimapDomNodeClassName()), !0)
  42362. }, t.prototype.onConfigurationChanged = function (e) {
  42363. return this._onOptionsMaybeChanged()
  42364. }, t.prototype.onCursorStateChanged = function (e) {
  42365. return this._selections = e.selections, this._renderDecorations = !0, !0
  42366. }, t.prototype.onFlushed = function (e) {
  42367. return this._lastRenderData = null, !0
  42368. }, t.prototype.onLinesChanged = function (e) {
  42369. return !!this._lastRenderData && this._lastRenderData.onLinesChanged(e)
  42370. }, t.prototype.onLinesDeleted = function (e) {
  42371. return this._lastRenderData && this._lastRenderData.onLinesDeleted(e), !0
  42372. }, t.prototype.onLinesInserted = function (e) {
  42373. return this._lastRenderData && this._lastRenderData.onLinesInserted(e), !0
  42374. }, t.prototype.onScrollChanged = function (e) {
  42375. return this._renderDecorations = !0, !0
  42376. }, t.prototype.onTokensChanged = function (e) {
  42377. return !!this._lastRenderData && this._lastRenderData.onTokensChanged(e)
  42378. }, t.prototype.onTokensColorsChanged = function (e) {
  42379. return this._lastRenderData = null, this._buffers = null, !0
  42380. }, t.prototype.onZonesChanged = function (e) {
  42381. return this._lastRenderData = null, !0
  42382. }, t.prototype.onDecorationsChanged = function (e) {
  42383. return this._renderDecorations = !0, !0
  42384. }, t.prototype.onThemeChanged = function (e) {
  42385. return this._context.model.invalidateMinimapColorCache(), this._selectionColor = this._context.theme.getColor(g.minimapSelection), this._renderDecorations = !0, !0
  42386. }, t.prototype.prepareRender = function (e) {
  42387. }, t.prototype.render = function (e) {
  42388. if (0 === this._options.renderMinimap) return this._shadow.setClassName("minimap-shadow-hidden"),
  42389. this._sliderHorizontal.setWidth(0), void this._sliderHorizontal.setHeight(0);
  42390. e.scrollLeft + e.viewportWidth >= e.scrollWidth ? this._shadow.setClassName("minimap-shadow-hidden") : this._shadow.setClassName("minimap-shadow-visible");
  42391. var t = E.create(this._options, e.visibleRange.startLineNumber, e.visibleRange.endLineNumber, e.viewportHeight, e.viewportData.whitespaceViewportData.length > 0, this._context.model.getLineCount(), e.scrollTop, e.scrollHeight, this._lastRenderData ? this._lastRenderData.renderedLayout : null);
  42392. this._slider.setTop(t.sliderTop), this._slider.setHeight(t.sliderHeight);
  42393. var n = e.scrollLeft / this._options.typicalHalfwidthCharacterWidth,
  42394. i = Math.min(this._options.minimapWidth, Math.round(n * b(this._options.renderMinimap, this._options.fontScale) / this._options.pixelRatio));
  42395. this._sliderHorizontal.setLeft(i), this._sliderHorizontal.setWidth(this._options.minimapWidth - i), this._sliderHorizontal.setTop(0), this._sliderHorizontal.setHeight(t.sliderHeight), this.renderDecorations(t), this._lastRenderData = this.renderLines(t)
  42396. },
  42397. t.prototype.renderDecorations = function (e) {
  42398. if (this._renderDecorations) {
  42399. this._renderDecorations = !1;
  42400. var t = this._context.model.getDecorationsInViewport(new c.Range(e.startLineNumber, 1, e.endLineNumber, this._context.model.getLineMaxColumn(e.endLineNumber))),
  42401. n = this._options, i = n.renderMinimap, o = n.canvasInnerWidth, r = n.canvasInnerHeight,
  42402. s = C(i, this._options.fontScale), a = b(0, this._options.fontScale),
  42403. l = this._context.model.getOptions().tabSize,
  42404. u = this._decorationsCanvas.domNode.getContext("2d");
  42405. u.clearRect(0, 0, o, r);
  42406. for (var d = new Map, h = 0; h < this._selections.length; h++) for (var p = this._selections[h], g = p.startLineNumber; g <= p.endLineNumber; g++) this.renderDecorationOnLine(u, d, p, this._selectionColor, e, g, s, s, l, a);
  42407. for (h = 0; h < t.length; h++) {
  42408. var f = t[h];
  42409. if (f.options.minimap) {
  42410. var m = f.options.minimap.getColor(this._context.theme);
  42411. for (g = f.range.startLineNumber; g <= f.range.endLineNumber; g++) switch (f.options.minimap.position) {
  42412. case _.MinimapPosition.Inline:
  42413. this.renderDecorationOnLine(u, d, f.range, m, e, g, s, s, l, a);
  42414. continue
  42415. ;
  42416. case _.MinimapPosition.Gutter:
  42417. var v = (g - e.startLineNumber) * s;
  42418. this.renderDecoration(u, m, 2, v, 2, s);
  42419. continue
  42420. }
  42421. }
  42422. }
  42423. }
  42424. }, t.prototype.renderDecorationOnLine = function (e, t, n, i, o, r, s, l, u, c) {
  42425. var h = (r - o.startLineNumber) * l;
  42426. if (!(h + s < 0 || h > this._options.canvasInnerHeight)) {
  42427. var p = t.get(r), g = !p;
  42428. if (!p) {
  42429. var f = this._context.model.getLineContent(r);
  42430. p = [d.MINIMAP_GUTTER_WIDTH];
  42431. for (var m = 1; m < f.length + 1; m++) {
  42432. var v = f.charCodeAt(m - 1), _ = 9 === v ? u * c : a.isFullWidthCharacter(v) ? 2 * c : c;
  42433. p[m] = p[m - 1] + _
  42434. }
  42435. t.set(r, p)
  42436. }
  42437. var y = n.startColumn, C = n.endColumn, b = n.startLineNumber, S = n.endLineNumber,
  42438. w = b === r ? p[y - 1] : d.MINIMAP_GUTTER_WIDTH, E = S > r ? p.length - 1 : C - 1;
  42439. if (E > 0) {
  42440. var L = p[E] - w || 2;
  42441. this.renderDecoration(e, i, w, h, L, s)
  42442. }
  42443. g && this.renderLineHighlight(e, i, h, s)
  42444. }
  42445. }, t.prototype.renderLineHighlight = function (e, t, n, i) {
  42446. e.fillStyle = t && t.transparent(.5).toString() || "", e.fillRect(d.MINIMAP_GUTTER_WIDTH, n, e.canvas.width, i)
  42447. }, t.prototype.renderDecoration = function (e, t, n, i, o, r) {
  42448. e.fillStyle = t && t.toString() || "", e.fillRect(n, i, o, r)
  42449. }, t.prototype.renderLines = function (e) {
  42450. var n = this._options.renderMinimap, i = this._options.charRenderer(), o = e.startLineNumber,
  42451. r = e.endLineNumber, s = C(n, this._options.fontScale);
  42452. if (this._lastRenderData && this._lastRenderData.linesEquals(e)) {
  42453. var a = this._lastRenderData._get();
  42454. return new D(e, a.imageData, a.lines)
  42455. }
  42456. var l = this._getBuffer();
  42457. if (!l) return null;
  42458. for (var u = t._renderUntouchedLines(l, o, r, s, this._lastRenderData), d = u[0], c = u[1], h = u[2], p = this._context.model.getMinimapLinesRenderingData(o, r, h), g = p.tabSize, f = this._tokensColorTracker.getColor(2), m = this._tokensColorTracker.backgroundIsLight(), v = 0, _ = [], y = 0, b = r - o + 1; y < b; y++) h[y] && t._renderLine(l, f, m, n, this._tokensColorTracker, i, v, g, p.data[y], this._options.fontScale), _[y] = new L(v), v += s;
  42459. var S = -1 === d ? 0 : d, w = (-1 === c ? l.height : c) - S;
  42460. return this._canvas.domNode.getContext("2d").putImageData(l, 0, 0, 0, S, l.width, w), new D(e, l, _)
  42461. }, t._renderUntouchedLines = function (e, t, n, i, o) {
  42462. var r = [];
  42463. if (!o) {
  42464. for (var s = 0, a = n - t + 1; s < a; s++) r[s] = !0;
  42465. return [-1, -1, r]
  42466. }
  42467. for (var l = o._get(), u = l.imageData.data, d = l.rendLineNumberStart, c = l.lines, h = c.length, p = e.width, g = e.data, f = (n - t + 1) * i * p * 4, m = -1, v = -1, _ = -1, y = -1, C = -1, b = -1, S = 0, w = t; w <= n; w++) {
  42468. var E = w - t, L = w - d, D = L >= 0 && L < h ? c[L].dy : -1;
  42469. if (-1 !== D) {
  42470. var N = D * p * 4, x = (D + i) * p * 4, I = S * p * 4, M = (S + i) * p * 4;
  42471. y === N && b === I ? (y = x, b = M) : (-1 !== _ && (g.set(u.subarray(_, y), C), -1 === m && 0 === _ && _ === C && (m = y), -1 === v && y === f && _ === C && (v = _)), _ = N, y = x, C = I, b = M), r[E] = !1, S += i
  42472. } else r[E] = !0, S += i
  42473. }
  42474. return -1 !== _ && (g.set(u.subarray(_, y), C), -1 === m && 0 === _ && _ === C && (m = y), -1 === v && y === f && _ === C && (v = _)), [-1 === m ? -1 : m / (4 * p), -1 === v ? -1 : v / (4 * p), r]
  42475. }, t._renderLine = function (e, t, n, i, o, r, s, l, u, c) {
  42476. for (var h = u.content, p = u.tokens, g = b(0, c), f = e.width - g, m = d.MINIMAP_GUTTER_WIDTH, v = 0, _ = 0, y = 0, C = p.getCount(); y < C; y++) for (var S = p.getEndOffset(y), w = p.getForeground(y), E = o.getColor(w); v < S; v++) {
  42477. if (m > f) return;
  42478. var L = h.charCodeAt(v);
  42479. if (9 === L) {
  42480. var D = l - (v + _) % l;
  42481. _ += D - 1, m += D * g
  42482. } else if (32 === L) m += g; else for (var N = a.isFullWidthCharacter(L) ? 2 : 1, x = 0; x < N; x++) if (2 === i ? r.blockRenderChar(e, m, s, E, t, n) : r.renderChar(e, m, s, L, E, t, c, n),
  42483. (m += g) > f) return
  42484. }
  42485. }, t
  42486. }(u.ViewPart);
  42487. t.Minimap = x, f.registerThemingParticipant((function (e, t) {
  42488. var n = e.getColor(g.scrollbarSliderBackground);
  42489. if (n) {
  42490. var i = n.transparent(.5);
  42491. t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: " + i + "; }")
  42492. }
  42493. var o = e.getColor(g.scrollbarSliderHoverBackground);
  42494. if (o) {
  42495. var r = o.transparent(.5);
  42496. t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: " + r + "; }")
  42497. }
  42498. var s = e.getColor(g.scrollbarSliderActiveBackground);
  42499. if (s) {
  42500. var a = s.transparent(.5);
  42501. t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: " + a + "; }")
  42502. }
  42503. var l = e.getColor(g.scrollbarShadow);
  42504. l && t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: " + l + " -6px 0 6px -6px inset; }")
  42505. }))
  42506. })), define(n[554], i([0, 1, 28, 37, 20, 14, 296]), (function (e, t, n, i, o, s) {
  42507. "use strict";
  42508. Object.defineProperty(t, "__esModule", {value: !0});
  42509. var a = function (e) {
  42510. function t(t) {
  42511. var i = e.call(this, t) || this;
  42512. i._scrollTop = 0, i._width = 0, i._updateWidth(), i._shouldShow = !1;
  42513. var o = i._context.configuration.options.get(78);
  42514. return i._useShadows = o.useShadows, i._domNode = n.createFastDomNode(document.createElement("div")), i._domNode.setAttribute("role", "presentation"), i._domNode.setAttribute("aria-hidden", "true"), i
  42515. }
  42516. return r(t, e), t.prototype.dispose = function () {
  42517. e.prototype.dispose.call(this)
  42518. }, t.prototype._updateShouldShow = function () {
  42519. var e = this._useShadows && this._scrollTop > 0;
  42520. return this._shouldShow !== e && (this._shouldShow = e, !0)
  42521. }, t.prototype.getDomNode = function () {
  42522. return this._domNode
  42523. }, t.prototype._updateWidth = function () {
  42524. var e = this._context.configuration.options.get(107);
  42525. 0 === e.renderMinimap || e.minimapWidth > 0 && 0 === e.minimapLeft ? this._width = e.width : this._width = e.width - e.minimapWidth - e.verticalScrollbarWidth
  42526. }, t.prototype.onConfigurationChanged = function (e) {
  42527. var t = this._context.configuration.options.get(78);
  42528. return this._useShadows = t.useShadows, this._updateWidth(), this._updateShouldShow(), !0
  42529. },
  42530. t.prototype.onScrollChanged = function (e) {
  42531. return this._scrollTop = e.scrollTop, this._updateShouldShow()
  42532. }, t.prototype.prepareRender = function (e) {
  42533. }, t.prototype.render = function (e) {
  42534. this._domNode.setWidth(this._width), this._domNode.setClassName(this._shouldShow ? "scroll-decoration" : "")
  42535. }, t
  42536. }(i.ViewPart);
  42537. t.ScrollDecorationViewPart = a, s.registerThemingParticipant((function (e, t) {
  42538. var n = e.getColor(o.scrollbarShadow);
  42539. n && t.addRule(".monaco-editor .scroll-decoration { box-shadow: " + n + " 0 6px 6px -6px inset; }")
  42540. }))
  42541. })), define(n[555], i([0, 1, 24, 82, 20, 14, 297]), (function (e, t, n, i, o, s) {
  42542. "use strict";
  42543. Object.defineProperty(t, "__esModule", {value: !0});
  42544. var a = function (e) {
  42545. this.left = e.left, this.width = e.width, this.startStyle = null, this.endStyle = null
  42546. }, l = function (e, t) {
  42547. this.lineNumber = e, this.ranges = t
  42548. };
  42549. function u(e) {
  42550. return new a(e)
  42551. }
  42552. function d(e) {
  42553. return new l(e.lineNumber, e.ranges.map(u))
  42554. }
  42555. var c = n.isEdgeOrIE, h = function (e) {
  42556. function t(t) {
  42557. var n = e.call(this) || this;
  42558. n._previousFrameVisibleRangesWithStyle = [], n._context = t;
  42559. var i = n._context.configuration.options
  42560. ;
  42561. return n._lineHeight = i.get(49), n._roundedSelection = i.get(76), n._typicalHalfwidthCharacterWidth = i.get(34).typicalHalfwidthCharacterWidth, n._selections = [], n._renderResult = null, n._context.addEventHandler(n), n
  42562. }
  42563. return r(t, e), t.prototype.dispose = function () {
  42564. this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
  42565. }, t.prototype.onConfigurationChanged = function (e) {
  42566. var t = this._context.configuration.options;
  42567. return this._lineHeight = t.get(49), this._roundedSelection = t.get(76), this._typicalHalfwidthCharacterWidth = t.get(34).typicalHalfwidthCharacterWidth, !0
  42568. }, t.prototype.onCursorStateChanged = function (e) {
  42569. return this._selections = e.selections.slice(0), !0
  42570. }, t.prototype.onDecorationsChanged = function (e) {
  42571. return !0
  42572. }, t.prototype.onFlushed = function (e) {
  42573. return !0
  42574. }, t.prototype.onLinesChanged = function (e) {
  42575. return !0
  42576. }, t.prototype.onLinesDeleted = function (e) {
  42577. return !0
  42578. }, t.prototype.onLinesInserted = function (e) {
  42579. return !0
  42580. }, t.prototype.onScrollChanged = function (e) {
  42581. return e.scrollTopChanged
  42582. },
  42583. t.prototype.onZonesChanged = function (e) {
  42584. return !0
  42585. }, t.prototype._visibleRangesHaveGaps = function (e) {
  42586. for (var t = 0, n = e.length; t < n; t++) {
  42587. if (e[t].ranges.length > 1) return !0
  42588. }
  42589. return !1
  42590. }, t.prototype._enrichVisibleRangesWithStyle = function (e, t, n) {
  42591. var i = this._typicalHalfwidthCharacterWidth / 4, o = null, r = null;
  42592. if (n && n.length > 0 && t.length > 0) {
  42593. var s = t[0].lineNumber;
  42594. if (s === e.startLineNumber) for (var a = 0; !o && a < n.length; a++) n[a].lineNumber === s && (o = n[a].ranges[0]);
  42595. var l = t[t.length - 1].lineNumber;
  42596. if (l === e.endLineNumber) for (a = n.length - 1; !r && a >= 0; a--) n[a].lineNumber === l && (r = n[a].ranges[0]);
  42597. o && !o.startStyle && (o = null), r && !r.startStyle && (r = null)
  42598. }
  42599. a = 0;
  42600. for (var u = t.length; a < u; a++) {
  42601. var d = t[a].ranges[0], c = d.left, h = d.left + d.width, g = {top: 0, bottom: 0},
  42602. f = {top: 0, bottom: 0};
  42603. if (a > 0) {
  42604. var m = t[a - 1].ranges[0].left, v = t[a - 1].ranges[0].left + t[a - 1].ranges[0].width;
  42605. p(c - m) < i ? g.top = 2 : c > m && (g.top = 1), p(h - v) < i ? f.top = 2 : m < h && h < v && (f.top = 1)
  42606. } else o && (g.top = o.startStyle.top, f.top = o.endStyle.top);
  42607. if (a + 1 < u) {
  42608. var _ = t[a + 1].ranges[0].left, y = t[a + 1].ranges[0].left + t[a + 1].ranges[0].width
  42609. ;p(c - _) < i ? g.bottom = 2 : _ < c && c < y && (g.bottom = 1), p(h - y) < i ? f.bottom = 2 : h < y && (f.bottom = 1)
  42610. } else r && (g.bottom = r.startStyle.bottom, f.bottom = r.endStyle.bottom);
  42611. d.startStyle = g, d.endStyle = f
  42612. }
  42613. }, t.prototype._getVisibleRangesWithStyle = function (e, t, n) {
  42614. var i = (t.linesVisibleRangesForRange(e, !0) || []).map(d), o = this._visibleRangesHaveGaps(i);
  42615. return c || o || !this._roundedSelection || this._enrichVisibleRangesWithStyle(t.visibleRange, i, n), i
  42616. }, t.prototype._createSelectionPiece = function (e, t, n, i, o) {
  42617. return '<div class="cslr ' + n + '" style="top:' + e.toString() + "px;left:" + i.toString() + "px;width:" + o.toString() + "px;height:" + t + 'px;"></div>'
  42618. }, t.prototype._actualRenderOneSelection = function (e, n, i, o) {
  42619. if (0 !== o.length) for (var r = !!o[0].ranges[0].startStyle, s = this._lineHeight.toString(), a = (this._lineHeight - 1).toString(), l = o[0].lineNumber, u = o[o.length - 1].lineNumber, d = 0, c = o.length; d < c; d++) {
  42620. for (var h = o[d], p = h.lineNumber, g = p - n, f = i && (p === u || p === l) ? a : s, m = i && p === l ? 1 : 0, v = "", _ = "", y = 0, C = h.ranges.length; y < C; y++) {
  42621. var b = h.ranges[y];
  42622. if (r) {
  42623. var S = b.startStyle, w = b.endStyle
  42624. ;
  42625. if (1 === S.top || 1 === S.bottom) {
  42626. v += this._createSelectionPiece(m, f, t.SELECTION_CLASS_NAME, b.left - t.ROUNDED_PIECE_WIDTH, t.ROUNDED_PIECE_WIDTH);
  42627. var E = t.EDITOR_BACKGROUND_CLASS_NAME;
  42628. 1 === S.top && (E += " " + t.SELECTION_TOP_RIGHT), 1 === S.bottom && (E += " " + t.SELECTION_BOTTOM_RIGHT), v += this._createSelectionPiece(m, f, E, b.left - t.ROUNDED_PIECE_WIDTH, t.ROUNDED_PIECE_WIDTH)
  42629. }
  42630. if (1 === w.top || 1 === w.bottom) {
  42631. v += this._createSelectionPiece(m, f, t.SELECTION_CLASS_NAME, b.left + b.width, t.ROUNDED_PIECE_WIDTH);
  42632. var L = t.EDITOR_BACKGROUND_CLASS_NAME;
  42633. 1 === w.top && (L += " " + t.SELECTION_TOP_LEFT), 1 === w.bottom && (L += " " + t.SELECTION_BOTTOM_LEFT), v += this._createSelectionPiece(m, f, L, b.left + b.width, t.ROUNDED_PIECE_WIDTH)
  42634. }
  42635. }
  42636. var D = t.SELECTION_CLASS_NAME;
  42637. if (r) {
  42638. S = b.startStyle, w = b.endStyle;
  42639. 0 === S.top && (D += " " + t.SELECTION_TOP_LEFT), 0 === S.bottom && (D += " " + t.SELECTION_BOTTOM_LEFT), 0 === w.top && (D += " " + t.SELECTION_TOP_RIGHT), 0 === w.bottom && (D += " " + t.SELECTION_BOTTOM_RIGHT)
  42640. }
  42641. _ += this._createSelectionPiece(m, f, D, b.left, b.width)
  42642. }
  42643. e[g][0] += v, e[g][1] += _
  42644. }
  42645. },
  42646. t.prototype.prepareRender = function (e) {
  42647. for (var t = [], n = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, o = n; o <= i; o++) {
  42648. t[o - n] = ["", ""]
  42649. }
  42650. for (var r = [], s = 0, a = this._selections.length; s < a; s++) {
  42651. var l = this._selections[s];
  42652. if (l.isEmpty()) r[s] = null; else {
  42653. var u = this._getVisibleRangesWithStyle(l, e, this._previousFrameVisibleRangesWithStyle[s]);
  42654. r[s] = u, this._actualRenderOneSelection(t, n, this._selections.length > 1, u)
  42655. }
  42656. }
  42657. this._previousFrameVisibleRangesWithStyle = r, this._renderResult = t.map((function (e) {
  42658. return e[0] + e[1]
  42659. }))
  42660. }, t.prototype.render = function (e, t) {
  42661. if (!this._renderResult) return "";
  42662. var n = t - e;
  42663. return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
  42664. }, t.SELECTION_CLASS_NAME = "selected-text", t.SELECTION_TOP_LEFT = "top-left-radius", t.SELECTION_BOTTOM_LEFT = "bottom-left-radius", t.SELECTION_TOP_RIGHT = "top-right-radius", t.SELECTION_BOTTOM_RIGHT = "bottom-right-radius", t.EDITOR_BACKGROUND_CLASS_NAME = "monaco-editor-background", t.ROUNDED_PIECE_WIDTH = 10, t
  42665. }(i.DynamicViewOverlay);
  42666. function p(e) {
  42667. return e < 0 ? -e : e
  42668. }
  42669. t.SelectionsOverlay = h, s.registerThemingParticipant((function (e, t) {
  42670. var n = e.getColor(o.editorSelectionBackground);
  42671. n && t.addRule(".monaco-editor .focused .selected-text { background-color: " + n + "; }");
  42672. var i = e.getColor(o.editorInactiveSelection);
  42673. i && t.addRule(".monaco-editor .selected-text { background-color: " + i + "; }");
  42674. var r = e.getColor(o.editorSelectionForeground);
  42675. r && t.addRule(".monaco-editor .view-line span.inline-selected-text { color: " + r + "; }")
  42676. }))
  42677. })), define(n[556], i([0, 1, 4, 2, 16, 10, 33, 30, 17, 118, 114, 43, 15, 26, 157, 14, 95]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y) {
  42678. "use strict";
  42679. function C(e) {
  42680. return e.toString()
  42681. }
  42682. Object.defineProperty(t, "__esModule", {value: !0});
  42683. var b = function () {
  42684. function e(e, t, n) {
  42685. this._modelEventListeners = new i.DisposableStore, this.model = e, this._languageSelection = null, this._languageSelectionListener = null, this._modelEventListeners.add(e.onWillDispose((function () {
  42686. return t(e)
  42687. }))), this._modelEventListeners.add(e.onDidChangeLanguage((function (t) {
  42688. return n(e, t)
  42689. })))
  42690. }
  42691. return e.prototype._disposeLanguageSelection = function () {
  42692. this._languageSelectionListener && (this._languageSelectionListener.dispose(), this._languageSelectionListener = null), this._languageSelection && (this._languageSelection.dispose(), this._languageSelection = null)
  42693. }, e.prototype.dispose = function () {
  42694. this._modelEventListeners.dispose(), this._disposeLanguageSelection()
  42695. }, e.prototype.setLanguage = function (e) {
  42696. var t = this;
  42697. this._disposeLanguageSelection(), this._languageSelection = e, this._languageSelectionListener = this._languageSelection.onDidChange((function () {
  42698. return t.model.setMode(e.languageIdentifier)
  42699. })), this.model.setMode(e.languageIdentifier)
  42700. }, e
  42701. }(), S = o.isLinux || o.isMacintosh ? 1 : 2, w = function (e) {
  42702. function t(t, i, o, r) {
  42703. var s = e.call(this) || this;
  42704. return s._onModelAdded = s._register(new n.Emitter), s.onModelAdded = s._onModelAdded.event, s._onModelRemoved = s._register(new n.Emitter), s.onModelRemoved = s._onModelRemoved.event, s._onModelModeChanged = s._register(new n.Emitter), s.onModelModeChanged = s._onModelModeChanged.event,
  42705. s._configurationService = t, s._resourcePropertiesService = i, s._models = {}, s._modelCreationOptionsByLanguageAndResource = Object.create(null), s._configurationServiceSubscription = s._configurationService.onDidChangeConfiguration((function (e) {
  42706. return s._updateModelOptions()
  42707. })), s._updateModelOptions(), s._register(new E(s, o, t, r)), s
  42708. }
  42709. return r(t, e), t._readModelOptions = function (e, t) {
  42710. var n = a.EDITOR_MODEL_DEFAULTS.tabSize;
  42711. if (e.editor && void 0 !== e.editor.tabSize) {
  42712. var i = parseInt(e.editor.tabSize, 10);
  42713. isNaN(i) || (n = i), n < 1 && (n = 1)
  42714. }
  42715. var o = n;
  42716. if (e.editor && void 0 !== e.editor.indentSize && "tabSize" !== e.editor.indentSize) {
  42717. var r = parseInt(e.editor.indentSize, 10);
  42718. isNaN(r) || (o = r), o < 1 && (o = 1)
  42719. }
  42720. var s = a.EDITOR_MODEL_DEFAULTS.insertSpaces;
  42721. e.editor && void 0 !== e.editor.insertSpaces && (s = "false" !== e.editor.insertSpaces && Boolean(e.editor.insertSpaces));
  42722. var l = S, u = e.eol;
  42723. "\r\n" === u ? l = 2 : "\n" === u && (l = 1);
  42724. var d = a.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace
  42725. ;e.editor && void 0 !== e.editor.trimAutoWhitespace && (d = "false" !== e.editor.trimAutoWhitespace && Boolean(e.editor.trimAutoWhitespace));
  42726. var c = a.EDITOR_MODEL_DEFAULTS.detectIndentation;
  42727. e.editor && void 0 !== e.editor.detectIndentation && (c = "false" !== e.editor.detectIndentation && Boolean(e.editor.detectIndentation));
  42728. var h = a.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;
  42729. return e.editor && void 0 !== e.editor.largeFileOptimizations && (h = "false" !== e.editor.largeFileOptimizations && Boolean(e.editor.largeFileOptimizations)), {
  42730. isForSimpleWidget: t,
  42731. tabSize: n,
  42732. indentSize: o,
  42733. insertSpaces: s,
  42734. detectIndentation: c,
  42735. defaultEOL: l,
  42736. trimAutoWhitespace: d,
  42737. largeFileOptimizations: h
  42738. }
  42739. }, t.prototype.getCreationOptions = function (e, n, i) {
  42740. var o = this._modelCreationOptionsByLanguageAndResource[e + n];
  42741. if (!o) {
  42742. var r = this._configurationService.getValue("editor", {overrideIdentifier: e, resource: n}),
  42743. s = this._resourcePropertiesService.getEOL(n, e);
  42744. o = t._readModelOptions({
  42745. editor: r,
  42746. eol: s
  42747. }, i), this._modelCreationOptionsByLanguageAndResource[e + n] = o
  42748. }
  42749. return o
  42750. },
  42751. t.prototype._updateModelOptions = function () {
  42752. var e = this._modelCreationOptionsByLanguageAndResource;
  42753. this._modelCreationOptionsByLanguageAndResource = Object.create(null);
  42754. for (var n = Object.keys(this._models), i = 0, o = n.length; i < o; i++) {
  42755. var r = n[i], s = this._models[r], a = s.model.getLanguageIdentifier().language,
  42756. l = s.model.uri, u = e[a + l], d = this.getCreationOptions(a, l, s.model.isForSimpleWidget);
  42757. t._setModelOptionsForModel(s.model, d, u)
  42758. }
  42759. }, t._setModelOptionsForModel = function (e, t, n) {
  42760. n && n.defaultEOL !== t.defaultEOL && 1 === e.getLineCount() && e.setEOL(1 === t.defaultEOL ? 0 : 1), n && n.detectIndentation === t.detectIndentation && n.insertSpaces === t.insertSpaces && n.tabSize === t.tabSize && n.indentSize === t.indentSize && n.trimAutoWhitespace === t.trimAutoWhitespace || (t.detectIndentation ? (e.detectIndentation(t.insertSpaces, t.tabSize), e.updateOptions({trimAutoWhitespace: t.trimAutoWhitespace})) : e.updateOptions({
  42761. insertSpaces: t.insertSpaces,
  42762. tabSize: t.tabSize,
  42763. indentSize: t.indentSize,
  42764. trimAutoWhitespace: t.trimAutoWhitespace
  42765. }))
  42766. }, t.prototype.dispose = function () {
  42767. this._configurationServiceSubscription.dispose(), e.prototype.dispose.call(this)
  42768. }, t.prototype._createModelData = function (e, t, n, i) {
  42769. var o = this, r = this.getCreationOptions(t.language, n, i), s = new l.TextModel(e, r, t, n),
  42770. a = C(s.uri);
  42771. if (this._models[a]) throw new Error("ModelService: Cannot add model because it already exists!");
  42772. var u = new b(s, (function (e) {
  42773. return o._onWillDispose(e)
  42774. }), (function (e, t) {
  42775. return o._onDidChangeLanguage(e, t)
  42776. }));
  42777. return this._models[a] = u, u
  42778. }, t.prototype.createModel = function (e, t, n, i) {
  42779. var o;
  42780. return void 0 === i && (i = !1), t ? (o = this._createModelData(e, t.languageIdentifier, n, i), this.setMode(o.model, t)) : o = this._createModelData(e, d.PLAINTEXT_LANGUAGE_IDENTIFIER, n, i), this._onModelAdded.fire(o.model), o.model
  42781. }, t.prototype.setMode = function (e, t) {
  42782. if (t) {
  42783. var n = this._models[C(e.uri)];
  42784. n && n.setLanguage(t)
  42785. }
  42786. }, t.prototype.getModels = function () {
  42787. for (var e = [], t = Object.keys(this._models), n = 0, i = t.length; n < i; n++) {
  42788. var o = t[n];
  42789. e.push(this._models[o].model)
  42790. }
  42791. return e
  42792. }, t.prototype.getModel = function (e) {
  42793. var t = C(e), n = this._models[t]
  42794. ;
  42795. return n ? n.model : null
  42796. }, t.prototype._onWillDispose = function (e) {
  42797. var t = C(e.uri), n = this._models[t];
  42798. delete this._models[t], n.dispose(), delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageIdentifier().language + e.uri], this._onModelRemoved.fire(e)
  42799. }, t.prototype._onDidChangeLanguage = function (e, n) {
  42800. var i = n.oldLanguage, o = e.getLanguageIdentifier().language,
  42801. r = this.getCreationOptions(i, e.uri, e.isForSimpleWidget),
  42802. s = this.getCreationOptions(o, e.uri, e.isForSimpleWidget);
  42803. t._setModelOptionsForModel(e, s, r), this._onModelModeChanged.fire({model: e, oldModeId: i})
  42804. }, t = h([g(0, p.IConfigurationService), g(1, c.ITextResourcePropertiesService), g(2, _.IThemeService), g(3, y.ILogService)], t)
  42805. }(i.Disposable);
  42806. t.ModelServiceImpl = w;
  42807. var E = function (e) {
  42808. function t(n, i, o, r) {
  42809. var s = e.call(this) || this;
  42810. s._configurationService = o, s._watchers = Object.create(null), s._semanticStyling = s._register(new L(i, r));
  42811. var a = function (e) {
  42812. var n = o.getValue(t.SETTING_ID, {
  42813. overrideIdentifier: e.getLanguageIdentifier().language,
  42814. resource: e.uri
  42815. });
  42816. return n && n.enabled
  42817. }, l = function (e) {
  42818. s._watchers[e.uri.toString()] = new M(e, i, s._semanticStyling)
  42819. }, u = function (e, t) {
  42820. t.dispose(), delete s._watchers[e.uri.toString()]
  42821. };
  42822. return s._register(n.onModelAdded((function (e) {
  42823. a(e) && l(e)
  42824. }))), s._register(n.onModelRemoved((function (e) {
  42825. var t = s._watchers[e.uri.toString()];
  42826. t && u(e, t)
  42827. }))), s._configurationService.onDidChangeConfiguration((function (e) {
  42828. if (e.affectsConfiguration(t.SETTING_ID)) for (var i = 0, o = n.getModels(); i < o.length; i++) {
  42829. var r = o[i], d = s._watchers[r.uri.toString()];
  42830. a(r) ? d || l(r) : d && u(r, d)
  42831. }
  42832. })), s
  42833. }
  42834. return r(t, e), t.SETTING_ID = "editor.semanticHighlighting", t
  42835. }(i.Disposable), L = function (e) {
  42836. function t(t, n) {
  42837. var i = e.call(this) || this;
  42838. return i._themeService = t, i._logService = n, i._caches = new WeakMap, i._themeService && i._register(i._themeService.onThemeChange((function () {
  42839. i._caches = new WeakMap
  42840. }))), i
  42841. }
  42842. return r(t, e), t.prototype.get = function (e) {
  42843. return this._caches.has(e) || this._caches.set(e, new x(e.getLegend(), this._themeService, this._logService)), this._caches.get(e)
  42844. }, t
  42845. }(i.Disposable), D = function (e, t, n) {
  42846. this.tokenTypeIndex = e, this.tokenModifierSet = t, this.metadata = n, this.next = null
  42847. }, N = function () {
  42848. function e() {
  42849. this._elementsCount = 0, this._currentLengthIndex = 0, this._currentLength = e._SIZES[this._currentLengthIndex], this._growCount = Math.round(this._currentLengthIndex + 1 < e._SIZES.length ? 2 / 3 * this._currentLength : 0), this._elements = [], e._nullOutEntries(this._elements, this._currentLength)
  42850. }
  42851. return e._nullOutEntries = function (e, t) {
  42852. for (var n = 0; n < t; n++) e[n] = null
  42853. }, e.prototype._hashFunc = function (e, t) {
  42854. return ((e << 5) - e + t | 0) % this._currentLength
  42855. }, e.prototype.get = function (e, t) {
  42856. for (var n = this._hashFunc(e, t), i = this._elements[n]; i;) {
  42857. if (i.tokenTypeIndex === e && i.tokenModifierSet === t) return i;
  42858. i = i.next
  42859. }
  42860. return null
  42861. }, e.prototype.add = function (t, n, i) {
  42862. if (this._elementsCount++, 0 !== this._growCount && this._elementsCount >= this._growCount) {
  42863. var o = this._elements;
  42864. this._currentLengthIndex++, this._currentLength = e._SIZES[this._currentLengthIndex], this._growCount = Math.round(this._currentLengthIndex + 1 < e._SIZES.length ? 2 / 3 * this._currentLength : 0), this._elements = [],
  42865. e._nullOutEntries(this._elements, this._currentLength);
  42866. for (var r = 0, s = o; r < s.length; r++) for (var a = s[r]; a;) {
  42867. var l = a.next;
  42868. a.next = null, this._add(a), a = l
  42869. }
  42870. }
  42871. this._add(new D(t, n, i))
  42872. }, e.prototype._add = function (e) {
  42873. var t = this._hashFunc(e.tokenTypeIndex, e.tokenModifierSet);
  42874. e.next = this._elements[t], this._elements[t] = e
  42875. }, e._SIZES = [3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143], e
  42876. }(), x = function () {
  42877. function e(e, t, n) {
  42878. this._legend = e, this._themeService = t, this._logService = n, this._hashTable = new N
  42879. }
  42880. return e.prototype.getMetadata = function (e, t) {
  42881. var n, i = this._hashTable.get(e, t);
  42882. if (i) n = i.metadata; else {
  42883. for (var o = this._legend.tokenTypes[e], r = [], s = t, a = 0; s > 0 && a < this._legend.tokenModifiers.length; a++) 1 & s && r.push(this._legend.tokenModifiers[a]), s >>= 1;
  42884. var l = this._themeService.getTheme().getTokenStyleMetadata(o, r);
  42885. if (void 0 === l) n = 2147483647; else {
  42886. if (n = 0, void 0 !== l.italic) n |= 1 | (l.italic ? 1 : 0) << 11;
  42887. if (void 0 !== l.bold) n |= 2 | (l.bold ? 2 : 0) << 11;
  42888. if (void 0 !== l.underline) n |= 4 | (l.underline ? 4 : 0) << 11
  42889. ;
  42890. if (l.foreground) n |= 8 | l.foreground << 14;
  42891. 0 === n && (n = 2147483647)
  42892. }
  42893. this._hashTable.add(e, t, n)
  42894. }
  42895. if (this._logService.getLevel() === y.LogLevel.Trace) {
  42896. var d = this._legend.tokenTypes[e],
  42897. c = t ? " " + this._legend.tokenModifiers.filter((function (e, n) {
  42898. return t & 1 << n
  42899. })).join(" ") : "";
  42900. this._logService.trace("tokenStyleMetadata " + (i ? "[CACHED] " : "") + d + c + ": foreground " + u.TokenMetadata.getForeground(n) + ", fontStyle " + u.TokenMetadata.getFontStyle(n).toString(2))
  42901. }
  42902. return n
  42903. }, e
  42904. }(), I = function () {
  42905. function e(e, t, n) {
  42906. this._provider = e, this.resultId = t, this.data = n
  42907. }
  42908. return e.prototype.dispose = function () {
  42909. this._provider.releaseDocumentSemanticTokens(this.resultId)
  42910. }, e
  42911. }(), M = function (e) {
  42912. function t(t, n, i) {
  42913. var o = e.call(this) || this;
  42914. return o._isDisposed = !1, o._model = t, o._semanticStyling = i, o._fetchSemanticTokens = o._register(new f.RunOnceScheduler((function () {
  42915. return o._fetchSemanticTokensNow()
  42916. }), 300)), o._currentResponse = null, o._currentRequestCancellationTokenSource = null, o._register(o._model.onDidChangeContent((function (e) {
  42917. o._fetchSemanticTokens.isScheduled() || o._fetchSemanticTokens.schedule()
  42918. }))), o._register(u.DocumentSemanticTokensProviderRegistry.onDidChange((function (e) {
  42919. return o._fetchSemanticTokens.schedule()
  42920. }))), n && o._register(n.onThemeChange((function (e) {
  42921. o._setSemanticTokens(null, null, null, []), o._fetchSemanticTokens.schedule()
  42922. }))), o._fetchSemanticTokens.schedule(0), o
  42923. }
  42924. return r(t, e), t.prototype.dispose = function () {
  42925. this._currentResponse && (this._currentResponse.dispose(), this._currentResponse = null), this._currentRequestCancellationTokenSource && (this._currentRequestCancellationTokenSource.cancel(), this._currentRequestCancellationTokenSource = null), this._setSemanticTokens(null, null, null, []), this._isDisposed = !0, e.prototype.dispose.call(this)
  42926. }, t.prototype._fetchSemanticTokensNow = function () {
  42927. var e = this;
  42928. if (!this._currentRequestCancellationTokenSource) {
  42929. var t = this._getSemanticColoringProvider();
  42930. if (t) {
  42931. this._currentRequestCancellationTokenSource = new m.CancellationTokenSource;
  42932. var n = [], i = this._model.onDidChangeContent((function (e) {
  42933. n.push(e)
  42934. })), o = this._semanticStyling.get(t),
  42935. r = this._currentResponse && this._currentResponse.resultId || null;
  42936. Promise.resolve(t.provideDocumentSemanticTokens(this._model, r, this._currentRequestCancellationTokenSource.token)).then((function (r) {
  42937. e._currentRequestCancellationTokenSource = null, i.dispose(), e._setSemanticTokens(t, r || null, o, n)
  42938. }), (function (t) {
  42939. t && "string" == typeof t.message && -1 !== t.message.indexOf("busy") || s.onUnexpectedError(t), e._currentRequestCancellationTokenSource = null, i.dispose(), n.length > 0 && (e._fetchSemanticTokens.isScheduled() || e._fetchSemanticTokens.schedule())
  42940. }))
  42941. }
  42942. }
  42943. }, t._isSemanticTokens = function (e) {
  42944. return e && !!e.data
  42945. }, t._isSemanticTokensEdits = function (e) {
  42946. return e && Array.isArray(e.edits)
  42947. }, t._copy = function (e, t, n, i, o) {
  42948. for (var r = 0; r < o; r++) n[i + r] = e[t + r]
  42949. }, t.prototype._setSemanticTokens = function (e, n, i, o) {
  42950. var r = this._currentResponse;
  42951. if (this._currentResponse && (this._currentResponse.dispose(), this._currentResponse = null), this._isDisposed) e && n && e.releaseDocumentSemanticTokens(n.resultId); else if (e && n && i) {
  42952. if (t._isSemanticTokensEdits(n)) {
  42953. if (!r) return void this._model.setSemanticTokens(null);
  42954. if (0 === n.edits.length) n = {resultId: n.resultId, data: r.data}; else {
  42955. for (var s = 0, a = 0, l = n.edits; a < l.length; a++) {
  42956. s += ((g = l[a]).data ? g.data.length : 0) - g.deleteCount
  42957. }
  42958. for (var u = r.data, d = new Uint32Array(u.length + s), c = u.length, h = d.length, p = n.edits.length - 1; p >= 0; p--) {
  42959. var g, f = c - ((g = n.edits[p]).start + g.deleteCount);
  42960. f > 0 && (t._copy(u, c - f, d, h - f, f), h -= f), g.data && (t._copy(g.data, 0, d, h - g.data.length, g.data.length), h -= g.data.length), c = g.start
  42961. }
  42962. c > 0 && t._copy(u, 0, d, 0, c), n = {resultId: n.resultId, data: d}
  42963. }
  42964. }
  42965. if (t._isSemanticTokens(n)) {
  42966. this._currentResponse = new I(e, n.resultId, n.data);
  42967. u = n.data;
  42968. for (var m = n.data.length / 5 | 0, _ = Math.max(Math.ceil(m / 1024), 400), y = [], C = 0, b = 1, S = 0; C < m;) {
  42969. var w = C, E = Math.min(w + _, m);
  42970. if (E < m) {
  42971. for (var L = E; L - 1 > w && 0 === u[5 * L];) L--;
  42972. if (L - 1 === w) {
  42973. for (var D = E; D + 1 < m && 0 === u[5 * D];) D++;
  42974. E = D
  42975. } else E = L
  42976. }
  42977. d = new Uint32Array(4 * (E - w));
  42978. for (var N = 0, x = 0; C < E;) {
  42979. var M = 5 * C, k = u[M], T = u[M + 1], R = b + k, O = 0 === k ? S + T : T, P = u[M + 2],
  42980. A = u[M + 3], F = u[M + 4], W = i.getMetadata(A, F)
  42981. ;2147483647 !== W && (0 === x && (x = R), d[N] = R - x, d[N + 1] = O, d[N + 2] = O + P, d[N + 3] = W, N += 4), b = R, S = O, C++
  42982. }
  42983. N !== d.length && (d = d.subarray(0, N));
  42984. var B = new v.MultilineTokens2(x, new v.SparseEncodedTokens(d));
  42985. y.push(B)
  42986. }
  42987. if (o.length > 0) {
  42988. for (var V = 0, z = o; V < z.length; V++) for (var H = z[V], K = 0, U = y; K < U.length; K++) for (var j = U[K], q = 0, G = H.changes; q < G.length; q++) {
  42989. var Y = G[q];
  42990. j.applyEdit(Y.range, Y.text)
  42991. }
  42992. this._fetchSemanticTokens.isScheduled() || this._fetchSemanticTokens.schedule()
  42993. }
  42994. this._model.setSemanticTokens(y)
  42995. } else this._model.setSemanticTokens(null)
  42996. } else this._model.setSemanticTokens(null)
  42997. }, t.prototype._getSemanticColoringProvider = function () {
  42998. var e = u.DocumentSemanticTokensProviderRegistry.ordered(this._model);
  42999. return e.length > 0 ? e[0] : null
  43000. }, t
  43001. }(i.Disposable)
  43002. })), define(n[44], i([0, 1, 427, 27, 20, 14]), (function (e, t, n, i, o, r) {
  43003. "use strict";
  43004. Object.defineProperty(t, "__esModule", {value: !0}), t.editorLineHighlight = o.registerColor("editor.lineHighlightBackground", {
  43005. dark: null,
  43006. light: null,
  43007. hc: null
  43008. }, n.localize(0, null)),
  43009. t.editorLineHighlightBorder = o.registerColor("editor.lineHighlightBorder", {
  43010. dark: "#282828",
  43011. light: "#eeeeee",
  43012. hc: "#f38518"
  43013. }, n.localize(1, null)), t.editorRangeHighlight = o.registerColor("editor.rangeHighlightBackground", {
  43014. dark: "#ffffff0b",
  43015. light: "#fdff0033",
  43016. hc: null
  43017. }, n.localize(2, null), !0), t.editorRangeHighlightBorder = o.registerColor("editor.rangeHighlightBorder", {
  43018. dark: null,
  43019. light: null,
  43020. hc: o.activeContrastBorder
  43021. }, n.localize(3, null), !0), t.editorSymbolHighlight = o.registerColor("editor.symbolHighlightBackground", {
  43022. dark: o.editorFindMatchHighlight,
  43023. light: o.editorFindMatchHighlight,
  43024. hc: null
  43025. }, n.localize(4, null), !0), t.editorSymbolHighlightBorder = o.registerColor("editor.symbolHighlightBorder", {
  43026. dark: null,
  43027. light: null,
  43028. hc: o.activeContrastBorder
  43029. }, n.localize(5, null), !0), t.editorCursorForeground = o.registerColor("editorCursor.foreground", {
  43030. dark: "#AEAFAD",
  43031. light: i.Color.black,
  43032. hc: i.Color.white
  43033. }, n.localize(6, null)), t.editorCursorBackground = o.registerColor("editorCursor.background", null, n.localize(7, null)),
  43034. t.editorWhitespaces = o.registerColor("editorWhitespace.foreground", {
  43035. dark: "#e3e4e229",
  43036. light: "#33333333",
  43037. hc: "#e3e4e229"
  43038. }, n.localize(8, null)), t.editorIndentGuides = o.registerColor("editorIndentGuide.background", {
  43039. dark: t.editorWhitespaces,
  43040. light: t.editorWhitespaces,
  43041. hc: t.editorWhitespaces
  43042. }, n.localize(9, null)), t.editorActiveIndentGuides = o.registerColor("editorIndentGuide.activeBackground", {
  43043. dark: t.editorWhitespaces,
  43044. light: t.editorWhitespaces,
  43045. hc: t.editorWhitespaces
  43046. }, n.localize(10, null)), t.editorLineNumbers = o.registerColor("editorLineNumber.foreground", {
  43047. dark: "#858585",
  43048. light: "#237893",
  43049. hc: i.Color.white
  43050. }, n.localize(11, null));
  43051. var s = o.registerColor("editorActiveLineNumber.foreground", {
  43052. dark: "#c6c6c6",
  43053. light: "#0B216F",
  43054. hc: o.activeContrastBorder
  43055. }, n.localize(12, null), !1, n.localize(13, null));
  43056. t.editorActiveLineNumber = o.registerColor("editorLineNumber.activeForeground", {
  43057. dark: s,
  43058. light: s,
  43059. hc: s
  43060. }, n.localize(14, null)), t.editorRuler = o.registerColor("editorRuler.foreground", {
  43061. dark: "#5A5A5A", light: i.Color.lightgrey, hc: i.Color.white
  43062. }, n.localize(15, null)), t.editorCodeLensForeground = o.registerColor("editorCodeLens.foreground", {
  43063. dark: "#999999",
  43064. light: "#999999",
  43065. hc: "#999999"
  43066. }, n.localize(16, null)), t.editorBracketMatchBackground = o.registerColor("editorBracketMatch.background", {
  43067. dark: "#0064001a",
  43068. light: "#0064001a",
  43069. hc: "#0064001a"
  43070. }, n.localize(17, null)), t.editorBracketMatchBorder = o.registerColor("editorBracketMatch.border", {
  43071. dark: "#888",
  43072. light: "#B9B9B9",
  43073. hc: o.contrastBorder
  43074. }, n.localize(18, null)), t.editorOverviewRulerBorder = o.registerColor("editorOverviewRuler.border", {
  43075. dark: "#7f7f7f4d",
  43076. light: "#7f7f7f4d",
  43077. hc: "#7f7f7f4d"
  43078. }, n.localize(19, null)), t.editorGutter = o.registerColor("editorGutter.background", {
  43079. dark: o.editorBackground,
  43080. light: o.editorBackground,
  43081. hc: o.editorBackground
  43082. }, n.localize(20, null)), t.editorUnnecessaryCodeBorder = o.registerColor("editorUnnecessaryCode.border", {
  43083. dark: null,
  43084. light: null,
  43085. hc: i.Color.fromHex("#fff").transparent(.8)
  43086. }, n.localize(21, null)), t.editorUnnecessaryCodeOpacity = o.registerColor("editorUnnecessaryCode.opacity", {
  43087. dark: i.Color.fromHex("#000a"), light: i.Color.fromHex("#0007"), hc: null
  43088. }, n.localize(22, null)), t.overviewRulerError = o.registerColor("editorOverviewRuler.errorForeground", {
  43089. dark: new i.Color(new i.RGBA(255, 18, 18, .7)),
  43090. light: new i.Color(new i.RGBA(255, 18, 18, .7)),
  43091. hc: new i.Color(new i.RGBA(255, 50, 50, 1))
  43092. }, n.localize(23, null)), t.overviewRulerWarning = o.registerColor("editorOverviewRuler.warningForeground", {
  43093. dark: o.editorWarningForeground,
  43094. light: o.editorWarningForeground,
  43095. hc: o.editorWarningBorder
  43096. }, n.localize(24, null)), t.overviewRulerInfo = o.registerColor("editorOverviewRuler.infoForeground", {
  43097. dark: o.editorInfoForeground,
  43098. light: o.editorInfoForeground,
  43099. hc: o.editorInfoBorder
  43100. }, n.localize(25, null)), r.registerThemingParticipant((function (e, n) {
  43101. var i = e.getColor(o.editorBackground);
  43102. i && n.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: " + i + "; }");
  43103. var r = e.getColor(o.editorForeground);
  43104. r && n.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: " + r + "; }")
  43105. ;var s = e.getColor(t.editorGutter);
  43106. s && n.addRule(".monaco-editor .margin { background-color: " + s + "; }");
  43107. var a = e.getColor(t.editorRangeHighlight);
  43108. a && n.addRule(".monaco-editor .rangeHighlight { background-color: " + a + "; }");
  43109. var l = e.getColor(t.editorRangeHighlightBorder);
  43110. l && n.addRule(".monaco-editor .rangeHighlight { border: 1px " + ("hc" === e.type ? "dotted" : "solid") + " " + l + "; }");
  43111. var u = e.getColor(t.editorSymbolHighlight);
  43112. u && n.addRule(".monaco-editor .symbolHighlight { background-color: " + u + "; }");
  43113. var d = e.getColor(t.editorSymbolHighlightBorder);
  43114. d && n.addRule(".monaco-editor .symbolHighlight { border: 1px " + ("hc" === e.type ? "dotted" : "solid") + " " + d + "; }");
  43115. var c = e.getColor(t.editorWhitespaces);
  43116. c && n.addRule(".vs-whitespace { color: " + c + " !important; }")
  43117. }))
  43118. })), define(n[557], i([0, 1, 82, 44, 19, 14, 285]), (function (e, t, n, i, o, s) {
  43119. "use strict";
  43120. Object.defineProperty(t, "__esModule", {value: !0});
  43121. var a = !0, l = function (e) {
  43122. function t(t) {
  43123. var n = e.call(this) || this;
  43124. n._context = t;
  43125. var i = n._context.configuration.options, o = i.get(107)
  43126. ;
  43127. return n._lineHeight = i.get(49), n._renderLineHighlight = i.get(72), n._contentLeft = o.contentLeft, n._contentWidth = o.contentWidth, n._selectionIsEmpty = !0, n._cursorLineNumbers = [], n._selections = [], n._renderData = null, n._context.addEventHandler(n), n
  43128. }
  43129. return r(t, e), t.prototype.dispose = function () {
  43130. this._context.removeEventHandler(this), e.prototype.dispose.call(this)
  43131. }, t.prototype._readFromSelections = function () {
  43132. var e = !1, t = a ? this._selections.slice(0, 1) : this._selections, n = t.map((function (e) {
  43133. return e.positionLineNumber
  43134. }));
  43135. n.sort((function (e, t) {
  43136. return e - t
  43137. })), o.equals(this._cursorLineNumbers, n) || (this._cursorLineNumbers = n, e = !0);
  43138. var i = t.every((function (e) {
  43139. return e.isEmpty()
  43140. }));
  43141. return this._selectionIsEmpty !== i && (this._selectionIsEmpty = i, e = !0), e
  43142. }, t.prototype.onThemeChanged = function (e) {
  43143. return this._readFromSelections()
  43144. }, t.prototype.onConfigurationChanged = function (e) {
  43145. var t = this._context.configuration.options, n = t.get(107);
  43146. return this._lineHeight = t.get(49), this._renderLineHighlight = t.get(72), this._contentLeft = n.contentLeft,
  43147. this._contentWidth = n.contentWidth, !0
  43148. }, t.prototype.onCursorStateChanged = function (e) {
  43149. return this._selections = e.selections, this._readFromSelections()
  43150. }, t.prototype.onFlushed = function (e) {
  43151. return !0
  43152. }, t.prototype.onLinesDeleted = function (e) {
  43153. return !0
  43154. }, t.prototype.onLinesInserted = function (e) {
  43155. return !0
  43156. }, t.prototype.onScrollChanged = function (e) {
  43157. return e.scrollWidthChanged || e.scrollTopChanged
  43158. }, t.prototype.onZonesChanged = function (e) {
  43159. return !0
  43160. }, t.prototype.prepareRender = function (e) {
  43161. if (this._shouldRenderThis()) {
  43162. for (var t = this._renderOne(e), n = e.visibleRange.startLineNumber, i = e.visibleRange.endLineNumber, o = this._cursorLineNumbers.length, r = 0, s = [], a = n; a <= i; a++) {
  43163. for (var l = a - n; r < o && this._cursorLineNumbers[r] < a;) r++;
  43164. r < o && this._cursorLineNumbers[r] === a ? s[l] = t : s[l] = ""
  43165. }
  43166. this._renderData = s
  43167. } else this._renderData = null
  43168. }, t.prototype.render = function (e, t) {
  43169. if (!this._renderData) return "";
  43170. var n = t - e;
  43171. return n >= this._renderData.length ? "" : this._renderData[n]
  43172. }, t
  43173. }(n.DynamicViewOverlay);
  43174. t.AbstractLineHighlightOverlay = l;
  43175. var u = function (e) {
  43176. function t() {
  43177. return null !== e && e.apply(this, arguments) || this
  43178. }
  43179. return r(t, e), t.prototype._renderOne = function (e) {
  43180. return '<div class="' + ("current-line" + (this._shouldRenderOther() ? " current-line-both" : "")) + '" style="width:' + Math.max(e.scrollWidth, this._contentWidth) + "px; height:" + this._lineHeight + 'px;"></div>'
  43181. }, t.prototype._shouldRenderThis = function () {
  43182. return ("line" === this._renderLineHighlight || "all" === this._renderLineHighlight) && this._selectionIsEmpty
  43183. }, t.prototype._shouldRenderOther = function () {
  43184. return "gutter" === this._renderLineHighlight || "all" === this._renderLineHighlight
  43185. }, t
  43186. }(l);
  43187. t.CurrentLineHighlightOverlay = u;
  43188. var d = function (e) {
  43189. function t() {
  43190. return null !== e && e.apply(this, arguments) || this
  43191. }
  43192. return r(t, e), t.prototype._renderOne = function (e) {
  43193. return '<div class="' + ("current-line current-line-margin" + (this._shouldRenderOther() ? " current-line-margin-both" : "")) + '" style="width:' + this._contentLeft + "px; height:" + this._lineHeight + 'px;"></div>'
  43194. }, t.prototype._shouldRenderThis = function () {
  43195. return "gutter" === this._renderLineHighlight || "all" === this._renderLineHighlight
  43196. }, t.prototype._shouldRenderOther = function () {
  43197. return ("line" === this._renderLineHighlight || "all" === this._renderLineHighlight) && this._selectionIsEmpty
  43198. }, t
  43199. }(l);
  43200. t.CurrentLineMarginHighlightOverlay = d, s.registerThemingParticipant((function (e, t) {
  43201. a = !1;
  43202. var n = e.getColor(i.editorLineHighlight);
  43203. if (n && (t.addRule(".monaco-editor .view-overlays .current-line { background-color: " + n + "; }"), t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: " + n + "; border: none; }")), !n || n.isTransparent() || e.defines(i.editorLineHighlightBorder)) {
  43204. var o = e.getColor(i.editorLineHighlightBorder);
  43205. o && (a = !0, t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid " + o + "; }"), t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid " + o + "; }"), "hc" === e.type && (t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),
  43206. t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))
  43207. }
  43208. }))
  43209. })), define(n[558], i([0, 1, 82, 13, 44, 14, 288]), (function (e, t, n, i, o, s) {
  43210. "use strict";
  43211. Object.defineProperty(t, "__esModule", {value: !0});
  43212. var a = function (e) {
  43213. function t(t) {
  43214. var n = e.call(this) || this;
  43215. n._context = t, n._primaryLineNumber = 0;
  43216. var i = n._context.configuration.options, o = i.get(108), r = i.get(34);
  43217. return n._lineHeight = i.get(49), n._spaceWidth = r.spaceWidth, n._enabled = i.get(70), n._activeIndentEnabled = i.get(43), n._maxIndentLeft = -1 === o.wrappingColumn ? -1 : o.wrappingColumn * r.typicalHalfwidthCharacterWidth, n._renderResult = null, n._context.addEventHandler(n), n
  43218. }
  43219. return r(t, e), t.prototype.dispose = function () {
  43220. this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
  43221. }, t.prototype.onConfigurationChanged = function (e) {
  43222. var t = this._context.configuration.options, n = t.get(108), i = t.get(34);
  43223. return this._lineHeight = t.get(49), this._spaceWidth = i.spaceWidth, this._enabled = t.get(70), this._activeIndentEnabled = t.get(43),
  43224. this._maxIndentLeft = -1 === n.wrappingColumn ? -1 : n.wrappingColumn * i.typicalHalfwidthCharacterWidth, !0
  43225. }, t.prototype.onCursorStateChanged = function (e) {
  43226. var t = e.selections[0], n = t.isEmpty() ? t.positionLineNumber : 0;
  43227. return this._primaryLineNumber !== n && (this._primaryLineNumber = n, !0)
  43228. }, t.prototype.onDecorationsChanged = function (e) {
  43229. return !0
  43230. }, t.prototype.onFlushed = function (e) {
  43231. return !0
  43232. }, t.prototype.onLinesChanged = function (e) {
  43233. return !0
  43234. }, t.prototype.onLinesDeleted = function (e) {
  43235. return !0
  43236. }, t.prototype.onLinesInserted = function (e) {
  43237. return !0
  43238. }, t.prototype.onScrollChanged = function (e) {
  43239. return e.scrollTopChanged
  43240. }, t.prototype.onZonesChanged = function (e) {
  43241. return !0
  43242. }, t.prototype.onLanguageConfigurationChanged = function (e) {
  43243. return !0
  43244. }, t.prototype.prepareRender = function (e) {
  43245. if (this._enabled) {
  43246. var t = e.visibleRange.startLineNumber, n = e.visibleRange.endLineNumber,
  43247. o = this._context.model.getOptions().indentSize * this._spaceWidth, r = e.scrollWidth,
  43248. s = this._lineHeight, a = this._context.model.getLinesIndentGuides(t, n), l = 0, u = 0, d = 0
  43249. ;
  43250. if (this._activeIndentEnabled && this._primaryLineNumber) {
  43251. var c = this._context.model.getActiveIndentGuide(this._primaryLineNumber, t, n);
  43252. l = c.startLineNumber, u = c.endLineNumber, d = c.indent
  43253. }
  43254. for (var h = [], p = t; p <= n; p++) {
  43255. var g = l <= p && p <= u, f = p - t, m = a[f], v = "";
  43256. if (m >= 1) for (var _ = e.visibleRangeForPosition(new i.Position(p, 1)), y = _ ? _.left : 0, C = 1; C <= m; C++) {
  43257. if (v += '<div class="' + (g && C === d ? "cigra" : "cigr") + '" style="left:' + y + "px;height:" + s + "px;width:" + o + 'px"></div>', (y += o) > r || this._maxIndentLeft > 0 && y > this._maxIndentLeft) break
  43258. }
  43259. h[f] = v
  43260. }
  43261. this._renderResult = h
  43262. } else this._renderResult = null
  43263. }, t.prototype.render = function (e, t) {
  43264. if (!this._renderResult) return "";
  43265. var n = t - e;
  43266. return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
  43267. }, t
  43268. }(n.DynamicViewOverlay);
  43269. t.IndentGuidesOverlay = a, s.registerThemingParticipant((function (e, t) {
  43270. var n = e.getColor(o.editorIndentGuides);
  43271. n && t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 " + n + " inset; }");
  43272. var i = e.getColor(o.editorActiveIndentGuides) || n
  43273. ;i && t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 " + i + " inset; }")
  43274. }))
  43275. })), define(n[229], i([0, 1, 16, 82, 13, 44, 14, 289]), (function (e, t, n, i, o, s, a) {
  43276. "use strict";
  43277. Object.defineProperty(t, "__esModule", {value: !0});
  43278. var l = function (e) {
  43279. function t(t) {
  43280. var n = e.call(this) || this;
  43281. return n._context = t, n._readConfig(), n._lastCursorModelPosition = new o.Position(1, 1), n._renderResult = null, n._context.addEventHandler(n), n
  43282. }
  43283. return r(t, e), t.prototype._readConfig = function () {
  43284. var e = this._context.configuration.options;
  43285. this._lineHeight = e.get(49);
  43286. var t = e.get(50);
  43287. this._renderLineNumbers = t.renderType, this._renderCustomLineNumbers = t.renderFn, this._renderFinalNewline = e.get(71);
  43288. var n = e.get(107);
  43289. this._lineNumbersLeft = n.lineNumbersLeft, this._lineNumbersWidth = n.lineNumbersWidth
  43290. }, t.prototype.dispose = function () {
  43291. this._context.removeEventHandler(this), this._renderResult = null, e.prototype.dispose.call(this)
  43292. }, t.prototype.onConfigurationChanged = function (e) {
  43293. return this._readConfig(), !0
  43294. }, t.prototype.onCursorStateChanged = function (e) {
  43295. var t = e.selections[0].getPosition();
  43296. return this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t), 2 === this._renderLineNumbers || 3 === this._renderLineNumbers
  43297. }, t.prototype.onFlushed = function (e) {
  43298. return !0
  43299. }, t.prototype.onLinesChanged = function (e) {
  43300. return !0
  43301. }, t.prototype.onLinesDeleted = function (e) {
  43302. return !0
  43303. }, t.prototype.onLinesInserted = function (e) {
  43304. return !0
  43305. }, t.prototype.onScrollChanged = function (e) {
  43306. return e.scrollTopChanged
  43307. }, t.prototype.onZonesChanged = function (e) {
  43308. return !0
  43309. }, t.prototype._getLineRenderLineNumber = function (e) {
  43310. var t = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(e, 1));
  43311. if (1 !== t.column) return "";
  43312. var n = t.lineNumber;
  43313. if (this._renderCustomLineNumbers) return this._renderCustomLineNumbers(n);
  43314. if (2 === this._renderLineNumbers) {
  43315. var i = Math.abs(this._lastCursorModelPosition.lineNumber - n);
  43316. return 0 === i ? '<span class="relative-current-line-number">' + n + "</span>" : String(i)
  43317. }
  43318. return 3 === this._renderLineNumbers ? this._lastCursorModelPosition.lineNumber === n ? String(n) : n % 10 == 0 ? String(n) : "" : String(n)
  43319. }, t.prototype.prepareRender = function (e) {
  43320. if (0 !== this._renderLineNumbers) {
  43321. for (var i = n.isLinux ? this._lineHeight % 2 == 0 ? " lh-even" : " lh-odd" : "", o = e.visibleRange.startLineNumber, r = e.visibleRange.endLineNumber, s = '<div class="' + t.CLASS_NAME + i + '" style="left:' + this._lineNumbersLeft.toString() + "px;width:" + this._lineNumbersWidth.toString() + 'px;">', a = this._context.model.getLineCount(), l = [], u = o; u <= r; u++) {
  43322. var d = u - o;
  43323. if (this._renderFinalNewline || u !== a || 0 !== this._context.model.getLineLength(u)) {
  43324. var c = this._getLineRenderLineNumber(u);
  43325. l[d] = c ? s + c + "</div>" : ""
  43326. } else l[d] = ""
  43327. }
  43328. this._renderResult = l
  43329. } else this._renderResult = null
  43330. }, t.prototype.render = function (e, t) {
  43331. if (!this._renderResult) return "";
  43332. var n = t - e;
  43333. return n < 0 || n >= this._renderResult.length ? "" : this._renderResult[n]
  43334. }, t.CLASS_NAME = "line-numbers", t
  43335. }(i.DynamicViewOverlay);
  43336. t.LineNumbersOverlay = l, a.registerThemingParticipant((function (e, t) {
  43337. var n = e.getColor(s.editorLineNumbers);
  43338. n && t.addRule(".monaco-editor .line-numbers { color: " + n + "; }");
  43339. var i = e.getColor(s.editorActiveLineNumber);
  43340. i && t.addRule(".monaco-editor .current-line ~ .line-numbers { color: " + i + "; }")
  43341. }))
  43342. })), define(n[559], i([0, 1, 416, 24, 28, 16, 5, 60, 189, 187, 37, 229, 195, 33, 89, 13, 3, 22, 81, 284]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y) {
  43343. "use strict";
  43344. Object.defineProperty(t, "__esModule", {value: !0});
  43345. var C = function () {
  43346. function e(e, t, n) {
  43347. this.top = e, this.left = t, this.width = n
  43348. }
  43349. return e.prototype.setWidth = function (t) {
  43350. return new e(this.top, this.left, t)
  43351. }, e
  43352. }(), b = i.isEdgeOrIE || i.isFirefox, S = function (e) {
  43353. function t(t, n, r) {
  43354. var a = e.call(this, t) || this;
  43355. a._primaryCursorPosition = new m.Position(1, 1), a._primaryCursorVisibleRange = null, a._viewController = n, a._viewHelper = r, a._scrollLeft = 0, a._scrollTop = 0;
  43356. var l = a._context.configuration.options, h = l.get(107);
  43357. a._setAccessibilityOptions(l), a._contentLeft = h.contentLeft, a._contentWidth = h.contentWidth, a._contentHeight = h.height, a._fontInfo = l.get(34), a._lineHeight = l.get(49),
  43358. a._emptySelectionClipboard = l.get(25), a._copyWithSyntaxHighlighting = l.get(15), a._visibleTextArea = null, a._selections = [new _.Selection(1, 1, 1, 1)], a._modelSelections = [new _.Selection(1, 1, 1, 1)], a._lastRenderPosition = null, a.textArea = o.createFastDomNode(document.createElement("textarea")), c.PartFingerprints.write(a.textArea, 6), a.textArea.setClassName("inputarea"), a.textArea.setAttribute("wrap", "off"), a.textArea.setAttribute("autocorrect", "off"), a.textArea.setAttribute("autocapitalize", "off"), a.textArea.setAttribute("autocomplete", "off"), a.textArea.setAttribute("spellcheck", "false"), a.textArea.setAttribute("aria-label", a._getAriaLabel(l)), a.textArea.setAttribute("role", "textbox"), a.textArea.setAttribute("aria-multiline", "true"), a.textArea.setAttribute("aria-haspopup", "false"), a.textArea.setAttribute("aria-autocomplete", "both"), s.isWeb && l.get(68) && a.textArea.setAttribute("readonly", "true"), a.textAreaCover = o.createFastDomNode(document.createElement("div")), a.textAreaCover.setPosition("absolute");
  43359. var p = {
  43360. getLineCount: function () {
  43361. return a._context.model.getLineCount()
  43362. }, getLineMaxColumn: function (e) {
  43363. return a._context.model.getLineMaxColumn(e)
  43364. }, getValueInRange: function (e, t) {
  43365. return a._context.model.getValueInRange(e, t)
  43366. }
  43367. }, g = {
  43368. getDataToCopy: function (e) {
  43369. var t = a._context.model.getPlainTextToCopy(a._modelSelections, a._emptySelectionClipboard, s.isWindows),
  43370. n = a._context.model.getEOL(),
  43371. i = a._emptySelectionClipboard && 1 === a._modelSelections.length && a._modelSelections[0].isEmpty(),
  43372. o = Array.isArray(t) ? t : null, r = Array.isArray(t) ? t.join(n) : t, l = void 0, d = null;
  43373. if (e && (u.CopyOptions.forceCopyWithSyntaxHighlighting || a._copyWithSyntaxHighlighting && r.length < 65536)) {
  43374. var c = a._context.model.getRichTextToCopy(a._modelSelections, a._emptySelectionClipboard);
  43375. c && (l = c.html, d = c.mode)
  43376. }
  43377. return {isFromEmptySelection: i, multicursorText: o, text: r, html: l, mode: d}
  43378. }, getScreenReaderContent: function (e) {
  43379. if (i.isIPad) return d.TextAreaState.EMPTY;
  43380. if (1 === a._accessibilitySupport) {
  43381. if (s.isMacintosh) {
  43382. var t = a._selections[0];
  43383. if (t.isEmpty()) {
  43384. var n = t.getStartPosition(), o = a._getWordBeforePosition(n);
  43385. if (0 === o.length && (o = a._getCharacterBeforePosition(n)), o.length > 0) return new d.TextAreaState(o, o.length, o.length, n, n)
  43386. }
  43387. }
  43388. return d.TextAreaState.EMPTY
  43389. }
  43390. return d.PagedScreenReaderStrategy.fromEditorSelection(e, p, a._selections[0], a._accessibilityPageSize, 0 === a._accessibilitySupport)
  43391. }, deduceModelPosition: function (e, t, n) {
  43392. return a._context.model.deduceModelPositionRelativeToViewPosition(e, t, n)
  43393. }
  43394. };
  43395. return a._textAreaInput = a._register(new u.TextAreaInput(g, a.textArea)), a._register(a._textAreaInput.onKeyDown((function (e) {
  43396. a._viewController.emitKeyDown(e)
  43397. }))), a._register(a._textAreaInput.onKeyUp((function (e) {
  43398. a._viewController.emitKeyUp(e)
  43399. }))), a._register(a._textAreaInput.onPaste((function (e) {
  43400. var t = !1, n = null, i = null;
  43401. e.metadata && (t = a._emptySelectionClipboard && !!e.metadata.isFromEmptySelection, n = void 0 !== e.metadata.multicursorText ? e.metadata.multicursorText : null, i = e.metadata.mode), a._viewController.paste("keyboard", e.text, t, n, i)
  43402. }))),
  43403. a._register(a._textAreaInput.onCut((function () {
  43404. a._viewController.cut("keyboard")
  43405. }))), a._register(a._textAreaInput.onType((function (e) {
  43406. e.replaceCharCnt ? a._viewController.replacePreviousChar("keyboard", e.text, e.replaceCharCnt) : a._viewController.type("keyboard", e.text)
  43407. }))), a._register(a._textAreaInput.onSelectionChangeRequest((function (e) {
  43408. a._viewController.setSelection("keyboard", e)
  43409. }))), a._register(a._textAreaInput.onCompositionStart((function () {
  43410. var e = a._selections[0].startLineNumber, t = a._selections[0].startColumn;
  43411. a._context.privateViewEventBus.emit(new y.ViewRevealRangeRequestEvent("keyboard", new v.Range(e, t, e, t), 0, !0, 1));
  43412. var n = a._viewHelper.visibleRangeForPositionRelativeToEditor(e, t);
  43413. n && (a._visibleTextArea = new C(a._context.viewLayout.getVerticalOffsetForLineNumber(e), n.left, b ? 0 : 1), a._render()), a.textArea.setClassName("inputarea ime-input"), a._viewController.compositionStart("keyboard")
  43414. }))), a._register(a._textAreaInput.onCompositionUpdate((function (e) {
  43415. i.isEdgeOrIE ? a._visibleTextArea = a._visibleTextArea.setWidth(0) : a._visibleTextArea = a._visibleTextArea.setWidth(function (e, t) {
  43416. var n = document.createElement("canvas").getContext("2d");
  43417. n.font = (o = t, r = "normal", s = o.fontWeight, a = o.fontSize, l = o.lineHeight, u = o.fontFamily, r + " normal " + s + " " + a + "px / " + l + "px " + u);
  43418. var o, r, s, a, l, u;
  43419. var d = n.measureText(e);
  43420. return i.isFirefox ? d.width + 2 : d.width
  43421. }(e.data, a._fontInfo)), a._render()
  43422. }))), a._register(a._textAreaInput.onCompositionEnd((function () {
  43423. a._visibleTextArea = null, a._render(), a.textArea.setClassName("inputarea"), a._viewController.compositionEnd("keyboard")
  43424. }))), a._register(a._textAreaInput.onFocus((function () {
  43425. a._context.privateViewEventBus.emit(new y.ViewFocusChangedEvent(!0))
  43426. }))), a._register(a._textAreaInput.onBlur((function () {
  43427. a._context.privateViewEventBus.emit(new y.ViewFocusChangedEvent(!1))
  43428. }))), a
  43429. }
  43430. return r(t, e), t.prototype.dispose = function () {
  43431. e.prototype.dispose.call(this)
  43432. }, t.prototype._getWordBeforePosition = function (e) {
  43433. for (var t = this._context.model.getLineContent(e.lineNumber), n = f.getMapForWordSeparators(this._context.configuration.options.get(96)), i = e.column, o = 0; i > 1;) {
  43434. var r = t.charCodeAt(i - 2);
  43435. if (0 !== n.get(r) || o > 50) return t.substring(i - 1, e.column - 1);
  43436. o++, i--
  43437. }
  43438. return t.substring(0, e.column - 1)
  43439. }, t.prototype._getCharacterBeforePosition = function (e) {
  43440. if (e.column > 1) {
  43441. var t = this._context.model.getLineContent(e.lineNumber).charAt(e.column - 2);
  43442. if (!a.isHighSurrogate(t.charCodeAt(0))) return t
  43443. }
  43444. return ""
  43445. }, t.prototype._getAriaLabel = function (e) {
  43446. return 1 === e.get(2) ? n.localize(0, null) : e.get(4)
  43447. }, t.prototype._setAccessibilityOptions = function (e) {
  43448. this._accessibilitySupport = e.get(2);
  43449. var t = e.get(3);
  43450. 2 === this._accessibilitySupport && t === g.EditorOptions.accessibilityPageSize.defaultValue ? this._accessibilityPageSize = 160 : this._accessibilityPageSize = t
  43451. }, t.prototype.onConfigurationChanged = function (e) {
  43452. var t = this._context.configuration.options, n = t.get(107);
  43453. return this._setAccessibilityOptions(t), this._contentLeft = n.contentLeft, this._contentWidth = n.contentWidth,
  43454. this._contentHeight = n.height, this._fontInfo = t.get(34), this._lineHeight = t.get(49), this._emptySelectionClipboard = t.get(25), this._copyWithSyntaxHighlighting = t.get(15), this.textArea.setAttribute("aria-label", this._getAriaLabel(t)), s.isWeb && e.hasChanged(68) && (t.get(68) ? this.textArea.setAttribute("readonly", "true") : this.textArea.removeAttribute("readonly")), e.hasChanged(2) && this._textAreaInput.writeScreenReaderContent("strategy changed"), !0
  43455. }, t.prototype.onCursorStateChanged = function (e) {
  43456. return this._selections = e.selections.slice(0), this._modelSelections = e.modelSelections.slice(0), this._textAreaInput.writeScreenReaderContent("selection changed"), !0
  43457. }, t.prototype.onDecorationsChanged = function (e) {
  43458. return !0
  43459. }, t.prototype.onFlushed = function (e) {
  43460. return !0
  43461. }, t.prototype.onLinesChanged = function (e) {
  43462. return !0
  43463. }, t.prototype.onLinesDeleted = function (e) {
  43464. return !0
  43465. }, t.prototype.onLinesInserted = function (e) {
  43466. return !0
  43467. }, t.prototype.onScrollChanged = function (e) {
  43468. return this._scrollLeft = e.scrollLeft, this._scrollTop = e.scrollTop, !0
  43469. },
  43470. t.prototype.onZonesChanged = function (e) {
  43471. return !0
  43472. }, t.prototype.isFocused = function () {
  43473. return this._textAreaInput.isFocused()
  43474. }, t.prototype.focusTextArea = function () {
  43475. this._textAreaInput.focusTextArea()
  43476. }, t.prototype.getLastRenderData = function () {
  43477. return this._lastRenderPosition
  43478. }, t.prototype.setAriaOptions = function (e) {
  43479. e.activeDescendant ? (this.textArea.setAttribute("aria-haspopup", "true"), this.textArea.setAttribute("aria-autocomplete", "list"), this.textArea.setAttribute("aria-activedescendant", e.activeDescendant)) : (this.textArea.setAttribute("aria-haspopup", "false"), this.textArea.setAttribute("aria-autocomplete", "both"), this.textArea.removeAttribute("aria-activedescendant"))
  43480. }, t.prototype.prepareRender = function (e) {
  43481. this._primaryCursorPosition = new m.Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn), this._primaryCursorVisibleRange = e.visibleRangeForPosition(this._primaryCursorPosition)
  43482. }, t.prototype.render = function (e) {
  43483. this._textAreaInput.writeScreenReaderContent("render"), this._render()
  43484. },
  43485. t.prototype._render = function () {
  43486. if (this._visibleTextArea) this._renderInsideEditor(null, this._visibleTextArea.top - this._scrollTop, this._contentLeft + this._visibleTextArea.left - this._scrollLeft, this._visibleTextArea.width, this._lineHeight); else if (this._primaryCursorVisibleRange) {
  43487. var e = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft;
  43488. if (e < this._contentLeft || e > this._contentLeft + this._contentWidth) this._renderAtTopLeft(); else {
  43489. var t = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop;
  43490. t < 0 || t > this._contentHeight ? this._renderAtTopLeft() : s.isMacintosh ? this._renderInsideEditor(this._primaryCursorPosition, t, e, b ? 0 : 1, this._lineHeight) : this._renderInsideEditor(this._primaryCursorPosition, t, e, b ? 0 : 1, b ? 0 : 1)
  43491. }
  43492. } else this._renderAtTopLeft()
  43493. }, t.prototype._renderInsideEditor = function (e, t, n, i, o) {
  43494. this._lastRenderPosition = e;
  43495. var r = this.textArea, s = this.textAreaCover;
  43496. l.Configuration.applyFontInfo(r, this._fontInfo), r.setTop(t), r.setLeft(n), r.setWidth(i),
  43497. r.setHeight(o), s.setTop(0), s.setLeft(0), s.setWidth(0), s.setHeight(0)
  43498. }, t.prototype._renderAtTopLeft = function () {
  43499. this._lastRenderPosition = null;
  43500. var e = this.textArea, t = this.textAreaCover;
  43501. if (l.Configuration.applyFontInfo(e, this._fontInfo), e.setTop(0), e.setLeft(0), t.setTop(0), t.setLeft(0), b) return e.setWidth(0), e.setHeight(0), t.setWidth(0), void t.setHeight(0);
  43502. e.setWidth(1), e.setHeight(1), t.setWidth(1), t.setHeight(1);
  43503. var n = this._context.configuration.options;
  43504. n.get(40) ? t.setClassName("monaco-editor-background textAreaCover " + p.Margin.OUTER_CLASS_NAME) : 0 !== n.get(50).renderType ? t.setClassName("monaco-editor-background textAreaCover " + h.LineNumbersOverlay.CLASS_NAME) : t.setClassName("monaco-editor-background textAreaCover")
  43505. }, t
  43506. }(c.ViewPart);
  43507. t.TextAreaHandler = S
  43508. })), define(n[560], i([0, 1, 28, 27, 37, 13, 17, 44]), (function (e, t, n, i, o, s, a, l) {
  43509. "use strict";
  43510. Object.defineProperty(t, "__esModule", {value: !0});
  43511. var u = function () {
  43512. function e(e, t) {
  43513. var n = e.options;
  43514. this.lineHeight = n.get(49), this.pixelRatio = n.get(105),
  43515. this.overviewRulerLanes = n.get(63), this.renderBorder = n.get(62);
  43516. var o = t.getColor(l.editorOverviewRulerBorder);
  43517. this.borderColor = o ? o.toString() : null, this.hideCursor = n.get(42);
  43518. var r = t.getColor(l.editorCursorForeground);
  43519. this.cursorColor = r ? r.transparent(.7).toString() : null, this.themeType = t.type;
  43520. var s = n.get(54), u = s.enabled, d = s.side,
  43521. c = u ? a.TokenizationRegistry.getDefaultBackground() : null;
  43522. this.backgroundColor = null === c || "left" === d ? null : i.Color.Format.CSS.formatHex(c);
  43523. var h = n.get(107).overviewRuler;
  43524. this.top = h.top, this.right = h.right, this.domWidth = h.width, this.domHeight = h.height, 0 === this.overviewRulerLanes ? (this.canvasWidth = 0, this.canvasHeight = 0) : (this.canvasWidth = this.domWidth * this.pixelRatio | 0, this.canvasHeight = this.domHeight * this.pixelRatio | 0);
  43525. var p = this._initLanes(1, this.canvasWidth, this.overviewRulerLanes), g = p[0], f = p[1];
  43526. this.x = g, this.w = f
  43527. }
  43528. return e.prototype._initLanes = function (e, t, n) {
  43529. var i = t - e;
  43530. if (n >= 3) {
  43531. var o, r, s, a = i - (o = Math.floor(i / 3)) - (r = Math.floor(i / 3)), l = (s = e) + o
  43532. ;
  43533. return [[0, s, l, s, s + o + a, s, l, s], [0, o, a, o + a, r, o + a + r, a + r, o + a + r]]
  43534. }
  43535. if (2 === n) return [[0, s = e, s, s, s + (o = Math.floor(i / 2)), s, s, s], [0, o, o, o, r = i - o, o + r, o + r, o + r]];
  43536. return [[0, e, e, e, e, e, e, e], [0, i, i, i, i, i, i, i]]
  43537. }, e.prototype.equals = function (e) {
  43538. return this.lineHeight === e.lineHeight && this.pixelRatio === e.pixelRatio && this.overviewRulerLanes === e.overviewRulerLanes && this.renderBorder === e.renderBorder && this.borderColor === e.borderColor && this.hideCursor === e.hideCursor && this.cursorColor === e.cursorColor && this.themeType === e.themeType && this.backgroundColor === e.backgroundColor && this.top === e.top && this.right === e.right && this.domWidth === e.domWidth && this.domHeight === e.domHeight && this.canvasWidth === e.canvasWidth && this.canvasHeight === e.canvasHeight
  43539. }, e
  43540. }(), d = function (e) {
  43541. function t(t) {
  43542. var i = e.call(this, t) || this;
  43543. return i._domNode = n.createFastDomNode(document.createElement("canvas")), i._domNode.setClassName("decorationsOverviewRuler"), i._domNode.setPosition("absolute"), i._domNode.setLayerHinting(!0), i._domNode.setContain("strict"),
  43544. i._domNode.setAttribute("aria-hidden", "true"), i._updateSettings(!1), i._tokensColorTrackerListener = a.TokenizationRegistry.onDidChange((function (e) {
  43545. e.changedColorMap && i._updateSettings(!0)
  43546. })), i._cursorPositions = [], i
  43547. }
  43548. return r(t, e), t.prototype.dispose = function () {
  43549. e.prototype.dispose.call(this), this._tokensColorTrackerListener.dispose()
  43550. }, t.prototype._updateSettings = function (e) {
  43551. var t = new u(this._context.configuration, this._context.theme);
  43552. return (!this._settings || !this._settings.equals(t)) && (this._settings = t, this._domNode.setTop(this._settings.top), this._domNode.setRight(this._settings.right), this._domNode.setWidth(this._settings.domWidth), this._domNode.setHeight(this._settings.domHeight), this._domNode.domNode.width = this._settings.canvasWidth, this._domNode.domNode.height = this._settings.canvasHeight, e && this._render(), !0)
  43553. }, t.prototype.onConfigurationChanged = function (e) {
  43554. return this._updateSettings(!1)
  43555. }, t.prototype.onCursorStateChanged = function (e) {
  43556. this._cursorPositions = []
  43557. ;
  43558. for (var t = 0, n = e.selections.length; t < n; t++) this._cursorPositions[t] = e.selections[t].getPosition();
  43559. return this._cursorPositions.sort(s.Position.compare), !0
  43560. }, t.prototype.onDecorationsChanged = function (e) {
  43561. return !0
  43562. }, t.prototype.onFlushed = function (e) {
  43563. return !0
  43564. }, t.prototype.onScrollChanged = function (e) {
  43565. return e.scrollHeightChanged
  43566. }, t.prototype.onZonesChanged = function (e) {
  43567. return !0
  43568. }, t.prototype.onThemeChanged = function (e) {
  43569. return this._context.model.invalidateOverviewRulerColorCache(), this._updateSettings(!1)
  43570. }, t.prototype.getDomNode = function () {
  43571. return this._domNode.domNode
  43572. }, t.prototype.prepareRender = function (e) {
  43573. }, t.prototype.render = function (e) {
  43574. this._render()
  43575. }, t.prototype._render = function () {
  43576. if (0 !== this._settings.overviewRulerLanes) {
  43577. var e = this._settings.canvasWidth, t = this._settings.canvasHeight, n = this._settings.lineHeight,
  43578. i = this._context.viewLayout, o = t / this._context.viewLayout.getScrollHeight(),
  43579. r = this._context.model.getAllOverviewRulerDecorations(this._context.theme),
  43580. s = 6 * this._settings.pixelRatio | 0, a = s / 2 | 0,
  43581. l = this._domNode.domNode.getContext("2d");
  43582. null === this._settings.backgroundColor ? l.clearRect(0, 0, e, t) : (l.fillStyle = this._settings.backgroundColor, l.fillRect(0, 0, e, t));
  43583. var u = this._settings.x, d = this._settings.w, c = Object.keys(r);
  43584. c.sort();
  43585. for (var h = 0, p = c.length; h < p; h++) {
  43586. var g = c[h], f = r[g];
  43587. l.fillStyle = g;
  43588. for (var m = 0, v = 0, _ = 0, y = 0, C = f.length; y < C; y++) {
  43589. var b = f[3 * y], S = f[3 * y + 1], w = f[3 * y + 2],
  43590. E = i.getVerticalOffsetForLineNumber(S) * o | 0;
  43591. if ((k = (i.getVerticalOffsetForLineNumber(w) + n) * o | 0) - E < s) (I = (E + k) / 2 | 0) < a ? I = a : I + a > t && (I = t - a), E = I - a, k = I + a;
  43592. E > _ + 1 || b !== m ? (0 !== y && l.fillRect(u[m], v, d[m], _ - v), m = b, v = E, _ = k) : k > _ && (_ = k)
  43593. }
  43594. l.fillRect(u[m], v, d[m], _ - v)
  43595. }
  43596. if (!this._settings.hideCursor && this._settings.cursorColor) {
  43597. var L = 2 * this._settings.pixelRatio | 0, D = L / 2 | 0, N = this._settings.x[7],
  43598. x = this._settings.w[7];
  43599. l.fillStyle = this._settings.cursorColor;
  43600. for (v = -100, _ = -100, y = 0, C = this._cursorPositions.length; y < C; y++) {
  43601. var I, M = this._cursorPositions[y];
  43602. (I = i.getVerticalOffsetForLineNumber(M.lineNumber) * o | 0) < D ? I = D : I + D > t && (I = t - D);
  43603. var k = (E = I - D) + L;
  43604. E > _ + 1 ? (0 !== y && l.fillRect(N, v, x, _ - v), v = E, _ = k) : k > _ && (_ = k)
  43605. }
  43606. l.fillRect(N, v, x, _ - v)
  43607. }
  43608. this._settings.renderBorder && this._settings.borderColor && this._settings.overviewRulerLanes > 0 && (l.beginPath(), l.lineWidth = 1, l.strokeStyle = this._settings.borderColor, l.moveTo(0, 0), l.lineTo(0, t), l.stroke(), l.moveTo(0, 0), l.lineTo(e, 0), l.stroke())
  43609. } else this._domNode.setBackgroundColor(this._settings.backgroundColor ? this._settings.backgroundColor : "")
  43610. }, t
  43611. }(o.ViewPart);
  43612. t.DecorationsOverviewRuler = d
  43613. })), define(n[561], i([0, 1, 28, 37, 44, 14, 295]), (function (e, t, n, i, o, s) {
  43614. "use strict";
  43615. Object.defineProperty(t, "__esModule", {value: !0});
  43616. var a = function (e) {
  43617. function t(t) {
  43618. var i = e.call(this, t) || this
  43619. ;i.domNode = n.createFastDomNode(document.createElement("div")), i.domNode.setAttribute("role", "presentation"), i.domNode.setAttribute("aria-hidden", "true"), i.domNode.setClassName("view-rulers"), i._renderedRulers = [];
  43620. var o = i._context.configuration.options;
  43621. return i._rulers = o.get(77), i._typicalHalfwidthCharacterWidth = o.get(34).typicalHalfwidthCharacterWidth, i
  43622. }
  43623. return r(t, e), t.prototype.dispose = function () {
  43624. e.prototype.dispose.call(this)
  43625. }, t.prototype.onConfigurationChanged = function (e) {
  43626. var t = this._context.configuration.options;
  43627. return this._rulers = t.get(77), this._typicalHalfwidthCharacterWidth = t.get(34).typicalHalfwidthCharacterWidth, !0
  43628. }, t.prototype.onScrollChanged = function (e) {
  43629. return e.scrollHeightChanged
  43630. }, t.prototype.prepareRender = function (e) {
  43631. }, t.prototype._ensureRulersCount = function () {
  43632. var e = this._renderedRulers.length, t = this._rulers.length;
  43633. if (e !== t) if (e < t) for (var i = this._context.model.getOptions().tabSize, o = t - e; o > 0;) {
  43634. (s = n.createFastDomNode(document.createElement("div"))).setClassName("view-ruler"), s.setWidth(i),
  43635. this.domNode.appendChild(s), this._renderedRulers.push(s), o--
  43636. } else for (var r = e - t; r > 0;) {
  43637. var s = this._renderedRulers.pop();
  43638. this.domNode.removeChild(s), r--
  43639. }
  43640. }, t.prototype.render = function (e) {
  43641. this._ensureRulersCount();
  43642. for (var t = 0, n = this._rulers.length; t < n; t++) {
  43643. var i = this._renderedRulers[t];
  43644. i.setHeight(Math.min(e.scrollHeight, 1e6)), i.setLeft(this._rulers[t] * this._typicalHalfwidthCharacterWidth)
  43645. }
  43646. }, t
  43647. }(i.ViewPart);
  43648. t.Rulers = a, s.registerThemingParticipant((function (e, t) {
  43649. var n = e.getColor(o.editorRuler);
  43650. n && t.addRule(".monaco-editor .view-ruler { box-shadow: 1px 0 0 0 " + n + " inset; }")
  43651. }))
  43652. })), define(n[562], i([0, 1, 28, 15, 37, 514, 33, 44, 14, 298]), (function (e, t, n, i, o, s, a, l, u) {
  43653. "use strict";
  43654. Object.defineProperty(t, "__esModule", {value: !0});
  43655. var d = function (e) {
  43656. function t(t) {
  43657. var o = e.call(this, t) || this, r = o._context.configuration.options;
  43658. return o._readOnly = r.get(68), o._cursorBlinking = r.get(16), o._cursorStyle = r.get(18), o._cursorSmoothCaretAnimation = r.get(17), o._selectionIsEmpty = !0, o._isVisible = !1, o._primaryCursor = new s.ViewCursor(o._context),
  43659. o._secondaryCursors = [], o._renderData = [], o._domNode = n.createFastDomNode(document.createElement("div")), o._domNode.setAttribute("role", "presentation"), o._domNode.setAttribute("aria-hidden", "true"), o._updateDomClassName(), o._domNode.appendChild(o._primaryCursor.getDomNode()), o._startCursorBlinkAnimation = new i.TimeoutTimer, o._cursorFlatBlinkInterval = new i.IntervalTimer, o._blinkingEnabled = !1, o._editorHasFocus = !1, o._updateBlinking(), o
  43660. }
  43661. return r(t, e), t.prototype.dispose = function () {
  43662. e.prototype.dispose.call(this), this._startCursorBlinkAnimation.dispose(), this._cursorFlatBlinkInterval.dispose()
  43663. }, t.prototype.getDomNode = function () {
  43664. return this._domNode
  43665. }, t.prototype.onConfigurationChanged = function (e) {
  43666. var t = this._context.configuration.options;
  43667. this._readOnly = t.get(68), this._cursorBlinking = t.get(16), this._cursorStyle = t.get(18), this._cursorSmoothCaretAnimation = t.get(17), this._updateBlinking(), this._updateDomClassName(), this._primaryCursor.onConfigurationChanged(e)
  43668. ;
  43669. for (var n = 0, i = this._secondaryCursors.length; n < i; n++) this._secondaryCursors[n].onConfigurationChanged(e);
  43670. return !0
  43671. }, t.prototype._onCursorPositionChanged = function (e, t) {
  43672. if (this._primaryCursor.onCursorPositionChanged(e), this._updateBlinking(), this._secondaryCursors.length < t.length) for (var n = t.length - this._secondaryCursors.length, i = 0; i < n; i++) {
  43673. var o = new s.ViewCursor(this._context);
  43674. this._domNode.domNode.insertBefore(o.getDomNode().domNode, this._primaryCursor.getDomNode().domNode.nextSibling), this._secondaryCursors.push(o)
  43675. } else if (this._secondaryCursors.length > t.length) {
  43676. var r = this._secondaryCursors.length - t.length;
  43677. for (i = 0; i < r; i++) this._domNode.removeChild(this._secondaryCursors[0].getDomNode()), this._secondaryCursors.splice(0, 1)
  43678. }
  43679. for (i = 0; i < t.length; i++) this._secondaryCursors[i].onCursorPositionChanged(t[i])
  43680. }, t.prototype.onCursorStateChanged = function (e) {
  43681. for (var t = [], n = 0, i = e.selections.length; n < i; n++) t[n] = e.selections[n].getPosition();
  43682. this._onCursorPositionChanged(t[0], t.slice(1));
  43683. var o = e.selections[0].isEmpty()
  43684. ;
  43685. return this._selectionIsEmpty !== o && (this._selectionIsEmpty = o, this._updateDomClassName()), !0
  43686. }, t.prototype.onDecorationsChanged = function (e) {
  43687. return !0
  43688. }, t.prototype.onFlushed = function (e) {
  43689. return !0
  43690. }, t.prototype.onFocusChanged = function (e) {
  43691. return this._editorHasFocus = e.isFocused, this._updateBlinking(), !1
  43692. }, t.prototype.onLinesChanged = function (e) {
  43693. return !0
  43694. }, t.prototype.onLinesDeleted = function (e) {
  43695. return !0
  43696. }, t.prototype.onLinesInserted = function (e) {
  43697. return !0
  43698. }, t.prototype.onScrollChanged = function (e) {
  43699. return !0
  43700. }, t.prototype.onTokensChanged = function (e) {
  43701. var t = function (t) {
  43702. for (var n = 0, i = e.ranges.length; n < i; n++) if (e.ranges[n].fromLineNumber <= t.lineNumber && t.lineNumber <= e.ranges[n].toLineNumber) return !0;
  43703. return !1
  43704. };
  43705. if (t(this._primaryCursor.getPosition())) return !0;
  43706. for (var n = 0, i = this._secondaryCursors; n < i.length; n++) {
  43707. if (t(i[n].getPosition())) return !0
  43708. }
  43709. return !1
  43710. }, t.prototype.onZonesChanged = function (e) {
  43711. return !0
  43712. }, t.prototype._getCursorBlinking = function () {
  43713. return this._editorHasFocus ? this._readOnly ? 5 : this._cursorBlinking : 0
  43714. },
  43715. t.prototype._updateBlinking = function () {
  43716. var e = this;
  43717. this._startCursorBlinkAnimation.cancel(), this._cursorFlatBlinkInterval.cancel();
  43718. var n = this._getCursorBlinking(), i = 0 === n, o = 5 === n;
  43719. i ? this._hide() : this._show(), this._blinkingEnabled = !1, this._updateDomClassName(), i || o || (1 === n ? this._cursorFlatBlinkInterval.cancelAndSet((function () {
  43720. e._isVisible ? e._hide() : e._show()
  43721. }), t.BLINK_INTERVAL) : this._startCursorBlinkAnimation.setIfNotSet((function () {
  43722. e._blinkingEnabled = !0, e._updateDomClassName()
  43723. }), t.BLINK_INTERVAL))
  43724. }, t.prototype._updateDomClassName = function () {
  43725. this._domNode.setClassName(this._getClassName())
  43726. }, t.prototype._getClassName = function () {
  43727. var e = "cursors-layer";
  43728. switch (this._selectionIsEmpty || (e += " has-selection"), this._cursorStyle) {
  43729. case a.TextEditorCursorStyle.Line:
  43730. e += " cursor-line-style";
  43731. break;
  43732. case a.TextEditorCursorStyle.Block:
  43733. e += " cursor-block-style";
  43734. break;
  43735. case a.TextEditorCursorStyle.Underline:
  43736. e += " cursor-underline-style";
  43737. break;
  43738. case a.TextEditorCursorStyle.LineThin:
  43739. e += " cursor-line-thin-style";
  43740. break
  43741. ;
  43742. case a.TextEditorCursorStyle.BlockOutline:
  43743. e += " cursor-block-outline-style";
  43744. break;
  43745. case a.TextEditorCursorStyle.UnderlineThin:
  43746. e += " cursor-underline-thin-style";
  43747. break;
  43748. default:
  43749. e += " cursor-line-style"
  43750. }
  43751. if (this._blinkingEnabled) switch (this._getCursorBlinking()) {
  43752. case 1:
  43753. e += " cursor-blink";
  43754. break;
  43755. case 2:
  43756. e += " cursor-smooth";
  43757. break;
  43758. case 3:
  43759. e += " cursor-phase";
  43760. break;
  43761. case 4:
  43762. e += " cursor-expand";
  43763. break;
  43764. case 5:
  43765. e += " cursor-solid";
  43766. break;
  43767. default:
  43768. e += " cursor-solid"
  43769. } else e += " cursor-solid";
  43770. return this._cursorSmoothCaretAnimation && (e += " cursor-smooth-caret-animation"), e
  43771. }, t.prototype._show = function () {
  43772. this._primaryCursor.show();
  43773. for (var e = 0, t = this._secondaryCursors.length; e < t; e++) this._secondaryCursors[e].show();
  43774. this._isVisible = !0
  43775. }, t.prototype._hide = function () {
  43776. this._primaryCursor.hide();
  43777. for (var e = 0, t = this._secondaryCursors.length; e < t; e++) this._secondaryCursors[e].hide();
  43778. this._isVisible = !1
  43779. }, t.prototype.prepareRender = function (e) {
  43780. this._primaryCursor.prepareRender(e)
  43781. ;
  43782. for (var t = 0, n = this._secondaryCursors.length; t < n; t++) this._secondaryCursors[t].prepareRender(e)
  43783. }, t.prototype.render = function (e) {
  43784. var t = [], n = 0, i = this._primaryCursor.render(e);
  43785. i && (t[n++] = i);
  43786. for (var o = 0, r = this._secondaryCursors.length; o < r; o++) {
  43787. var s = this._secondaryCursors[o].render(e);
  43788. s && (t[n++] = s)
  43789. }
  43790. this._renderData = t
  43791. }, t.prototype.getLastRenderData = function () {
  43792. return this._renderData
  43793. }, t.BLINK_INTERVAL = 500, t
  43794. }(o.ViewPart);
  43795. t.ViewCursors = d, u.registerThemingParticipant((function (e, t) {
  43796. var n = e.getColor(l.editorCursorForeground);
  43797. if (n) {
  43798. var i = e.getColor(l.editorCursorBackground);
  43799. i || (i = n.opposite()), t.addRule(".monaco-editor .cursor { background-color: " + n + "; border-color: " + n + "; color: " + i + "; }"), "hc" === e.type && t.addRule(".monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid " + i + "; border-right: 1px solid " + i + "; }")
  43800. }
  43801. }))
  43802. })),
  43803. define(n[563], i([0, 1, 6, 28, 10, 551, 559, 523, 228, 513, 37, 366, 557, 367, 549, 149, 558, 229, 552, 368, 195, 369, 553, 370, 560, 371, 561, 554, 555, 562, 372, 13, 3, 91, 360, 361, 81, 363, 92, 14, 166]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F, W, B, V, z) {
  43804. "use strict";
  43805. Object.defineProperty(t, "__esModule", {value: !0});
  43806. var H = function (e) {
  43807. function t(t, n, o, r, u, D) {
  43808. var T = e.call(this) || this;
  43809. T._cursor = u, T._renderAnimationFrame = null, T.outgoingEvents = D;
  43810. var R = new l.ViewController(n, r, T.outgoingEvents, t);
  43811. T.eventDispatcher = new A.ViewEventDispatcher((function (e) {
  43812. return T._renderOnce(e)
  43813. })), T.eventDispatcher.addEventHandler(T), T._context = new P.ViewContext(n, o.getTheme(), r, T.eventDispatcher), T._register(o.onThemeChange((function (e) {
  43814. T._context.theme = e, T.eventDispatcher.emit(new F.ViewThemeChangedEvent), T.render(!0, !1)
  43815. }))), T.viewParts = [], T._textAreaHandler = new a.TextAreaHandler(T._context, R, T.createTextAreaHandlerHelper()), T.viewParts.push(T._textAreaHandler), T.linesContent = i.createFastDomNode(document.createElement("div")),
  43816. T.linesContent.setClassName("lines-content monaco-editor-background"), T.linesContent.setPosition("absolute"), T.domNode = i.createFastDomNode(document.createElement("div")), T.domNode.setClassName(T.getEditorClassName()), T.overflowGuardContainer = i.createFastDomNode(document.createElement("div")), c.PartFingerprints.write(T.overflowGuardContainer, 3), T.overflowGuardContainer.setClassName("overflow-guard"), T._scrollbar = new f.EditorScrollbar(T._context, T.linesContent, T.domNode, T.overflowGuardContainer), T.viewParts.push(T._scrollbar), T.viewLines = new y.ViewLines(T._context, T.linesContent), T.viewZones = new k.ViewZones(T._context), T.viewParts.push(T.viewZones);
  43817. var O = new L.DecorationsOverviewRuler(T._context);
  43818. T.viewParts.push(O);
  43819. var W = new x.ScrollDecorationViewPart(T._context);
  43820. T.viewParts.push(W);
  43821. var B = new d.ContentViewOverlays(T._context);
  43822. T.viewParts.push(B), B.addDynamicOverlay(new p.CurrentLineHighlightOverlay(T._context)), B.addDynamicOverlay(new I.SelectionsOverlay(T._context)),
  43823. B.addDynamicOverlay(new v.IndentGuidesOverlay(T._context)), B.addDynamicOverlay(new g.DecorationsOverlay(T._context));
  43824. var V = new d.MarginViewOverlays(T._context);
  43825. T.viewParts.push(V), V.addDynamicOverlay(new p.CurrentLineMarginHighlightOverlay(T._context)), V.addDynamicOverlay(new m.GlyphMarginOverlay(T._context)), V.addDynamicOverlay(new S.MarginViewLineDecorationsOverlay(T._context)), V.addDynamicOverlay(new C.LinesDecorationsOverlay(T._context)), V.addDynamicOverlay(new _.LineNumbersOverlay(T._context));
  43826. var z = new b.Margin(T._context);
  43827. z.getDomNode().appendChild(T.viewZones.marginDomNode), z.getDomNode().appendChild(V.getDomNode()), T.viewParts.push(z), T.contentWidgets = new h.ViewContentWidgets(T._context, T.domNode), T.viewParts.push(T.contentWidgets), T.viewCursors = new M.ViewCursors(T._context), T.viewParts.push(T.viewCursors), T.overlayWidgets = new E.ViewOverlayWidgets(T._context), T.viewParts.push(T.overlayWidgets);
  43828. var H = new N.Rulers(T._context);
  43829. T.viewParts.push(H);
  43830. var K = new w.Minimap(T._context);
  43831. if (T.viewParts.push(K),
  43832. O) {
  43833. var U = T._scrollbar.getOverviewRulerLayoutInfo();
  43834. U.parent.insertBefore(O.getDomNode(), U.insertBefore)
  43835. }
  43836. return T.linesContent.appendChild(B.getDomNode()), T.linesContent.appendChild(H.domNode), T.linesContent.appendChild(T.viewZones.domNode), T.linesContent.appendChild(T.viewLines.getDomNode()), T.linesContent.appendChild(T.contentWidgets.domNode), T.linesContent.appendChild(T.viewCursors.getDomNode()), T.overflowGuardContainer.appendChild(z.getDomNode()), T.overflowGuardContainer.appendChild(T._scrollbar.getDomNode()), T.overflowGuardContainer.appendChild(W.getDomNode()), T.overflowGuardContainer.appendChild(T._textAreaHandler.textArea), T.overflowGuardContainer.appendChild(T._textAreaHandler.textAreaCover), T.overflowGuardContainer.appendChild(T.overlayWidgets.getDomNode()), T.overflowGuardContainer.appendChild(K.getDomNode()), T.domNode.appendChild(T.overflowGuardContainer), T.domNode.appendChild(T.contentWidgets.overflowingContentWidgetsDomNode), T._applyLayout(),
  43837. T.pointerHandler = T._register(new s.PointerHandler(T._context, R, T.createPointerHandlerHelper())), T._register(r.addEventListener((function (e) {
  43838. T.eventDispatcher.emitMany(e)
  43839. }))), T._register(T._cursor.addEventListener((function (e) {
  43840. T.eventDispatcher.emitMany(e)
  43841. }))), T
  43842. }
  43843. return r(t, e), t.prototype._flushAccumulatedAndRenderNow = function () {
  43844. this._renderNow()
  43845. }, t.prototype.createPointerHandlerHelper = function () {
  43846. var e = this;
  43847. return {
  43848. viewDomNode: this.domNode.domNode,
  43849. linesContentDomNode: this.linesContent.domNode,
  43850. focusTextArea: function () {
  43851. e.focus()
  43852. },
  43853. getLastRenderData: function () {
  43854. var t = e.viewCursors.getLastRenderData() || [], n = e._textAreaHandler.getLastRenderData();
  43855. return new z.PointerHandlerLastRenderData(t, n)
  43856. },
  43857. shouldSuppressMouseDownOnViewZone: function (t) {
  43858. return e.viewZones.shouldSuppressMouseDownOnViewZone(t)
  43859. },
  43860. shouldSuppressMouseDownOnWidget: function (t) {
  43861. return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)
  43862. },
  43863. getPositionFromDOMInfo: function (t, n) {
  43864. return e._flushAccumulatedAndRenderNow(), e.viewLines.getPositionFromDOMInfo(t, n)
  43865. },
  43866. visibleRangeForPosition: function (t, n) {
  43867. return e._flushAccumulatedAndRenderNow(), e.viewLines.visibleRangeForPosition(new T.Position(t, n))
  43868. },
  43869. getLineWidth: function (t) {
  43870. return e._flushAccumulatedAndRenderNow(), e.viewLines.getLineWidth(t)
  43871. }
  43872. }
  43873. }, t.prototype.createTextAreaHandlerHelper = function () {
  43874. var e = this;
  43875. return {
  43876. visibleRangeForPositionRelativeToEditor: function (t, n) {
  43877. return e._flushAccumulatedAndRenderNow(), e.viewLines.visibleRangeForPosition(new T.Position(t, n))
  43878. }
  43879. }
  43880. }, t.prototype._applyLayout = function () {
  43881. var e = this._context.configuration.options.get(107);
  43882. this.domNode.setWidth(e.width), this.domNode.setHeight(e.height), this.overflowGuardContainer.setWidth(e.width), this.overflowGuardContainer.setHeight(e.height), this.linesContent.setWidth(1e6), this.linesContent.setHeight(1e6)
  43883. }, t.prototype.getEditorClassName = function () {
  43884. var e = this._textAreaHandler.isFocused() ? " focused" : "";
  43885. return this._context.configuration.options.get(104) + " " + V.getThemeTypeSelector(this._context.theme.type) + e
  43886. }, t.prototype.onConfigurationChanged = function (e) {
  43887. return this.domNode.setClassName(this.getEditorClassName()), this._applyLayout(), !1
  43888. }, t.prototype.onContentSizeChanged = function (e) {
  43889. return this.outgoingEvents.emitContentSizeChange(e), !1
  43890. }, t.prototype.onFocusChanged = function (e) {
  43891. return this.domNode.setClassName(this.getEditorClassName()), this._context.model.setHasFocus(e.isFocused), e.isFocused ? this.outgoingEvents.emitViewFocusGained() : this.outgoingEvents.emitViewFocusLost(), !1
  43892. }, t.prototype.onScrollChanged = function (e) {
  43893. return this.outgoingEvents.emitScrollChanged(e), !1
  43894. }, t.prototype.onThemeChanged = function (e) {
  43895. return this.domNode.setClassName(this.getEditorClassName()), !1
  43896. }, t.prototype.dispose = function () {
  43897. null !== this._renderAnimationFrame && (this._renderAnimationFrame.dispose(), this._renderAnimationFrame = null), this.eventDispatcher.removeEventHandler(this), this.outgoingEvents.dispose(), this.viewLines.dispose();
  43898. for (var t = 0, n = this.viewParts.length; t < n; t++) this.viewParts[t].dispose();
  43899. this.viewParts = [], e.prototype.dispose.call(this)
  43900. }, t.prototype._renderOnce = function (e) {
  43901. var t = K(e);
  43902. return this._scheduleRender(), t
  43903. }, t.prototype._scheduleRender = function () {
  43904. null === this._renderAnimationFrame && (this._renderAnimationFrame = n.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this), 100))
  43905. }, t.prototype._onRenderScheduled = function () {
  43906. this._renderAnimationFrame = null, this._flushAccumulatedAndRenderNow()
  43907. }, t.prototype._renderNow = function () {
  43908. var e = this;
  43909. K((function () {
  43910. return e._actualRender()
  43911. }))
  43912. }, t.prototype._getViewPartsToRender = function () {
  43913. for (var e = [], t = 0, n = 0, i = this.viewParts.length; n < i; n++) {
  43914. var o = this.viewParts[n];
  43915. o.shouldRender() && (e[t++] = o)
  43916. }
  43917. return e
  43918. }, t.prototype._actualRender = function () {
  43919. if (n.isInDOM(this.domNode.domNode)) {
  43920. var e = this._getViewPartsToRender();
  43921. if (this.viewLines.shouldRender() || 0 !== e.length) {
  43922. var t = this._context.viewLayout.getLinesViewportData();
  43923. this._context.model.setViewport(t.startLineNumber, t.endLineNumber, t.centeredLineNumber);
  43924. var i = new W.ViewportData(this._cursor.getViewSelections(), t, this._context.viewLayout.getWhitespaceViewportData(), this._context.model)
  43925. ;this.contentWidgets.shouldRender() && this.contentWidgets.onBeforeRender(i), this.viewLines.shouldRender() && (this.viewLines.renderText(i), this.viewLines.onDidRender(), e = this._getViewPartsToRender());
  43926. for (var o = new O.RenderingContext(this._context.viewLayout, i, this.viewLines), r = 0, s = e.length; r < s; r++) {
  43927. (a = e[r]).prepareRender(o)
  43928. }
  43929. for (r = 0, s = e.length; r < s; r++) {
  43930. var a;
  43931. (a = e[r]).render(o), a.onDidRender()
  43932. }
  43933. }
  43934. }
  43935. }, t.prototype.delegateVerticalScrollbarMouseDown = function (e) {
  43936. this._scrollbar.delegateVerticalScrollbarMouseDown(e)
  43937. }, t.prototype.restoreState = function (e) {
  43938. this._context.viewLayout.setScrollPositionNow({scrollTop: e.scrollTop}), this._context.model.tokenizeViewport(), this._renderNow(), this.viewLines.updateLineWidths(), this._context.viewLayout.setScrollPositionNow({scrollLeft: e.scrollLeft})
  43939. }, t.prototype.getOffsetForColumn = function (e, t) {
  43940. var n = this._context.model.validateModelPosition({lineNumber: e, column: t}),
  43941. i = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n);
  43942. this._flushAccumulatedAndRenderNow()
  43943. ;var o = this.viewLines.visibleRangeForPosition(new T.Position(i.lineNumber, i.column));
  43944. return o ? o.left : -1
  43945. }, t.prototype.getTargetAtClientPoint = function (e, t) {
  43946. var n = this.pointerHandler.getTargetAtClientPoint(e, t);
  43947. return n ? u.ViewOutgoingEvents.convertViewToModelMouseTarget(n, this._context.model.coordinatesConverter) : null
  43948. }, t.prototype.createOverviewRuler = function (e) {
  43949. return new D.OverviewRuler(this._context, e)
  43950. }, t.prototype.change = function (e) {
  43951. var t = this;
  43952. return this._renderOnce((function () {
  43953. var n = t.viewZones.changeViewZones(e);
  43954. return n && (t._context.viewLayout.onHeightMaybeChanged(), t._context.privateViewEventBus.emit(new F.ViewZonesChangedEvent)), n
  43955. }))
  43956. }, t.prototype.render = function (e, t) {
  43957. if (t) {
  43958. this.viewLines.forceShouldRender();
  43959. for (var n = 0, i = this.viewParts.length; n < i; n++) {
  43960. this.viewParts[n].forceShouldRender()
  43961. }
  43962. }
  43963. e ? this._flushAccumulatedAndRenderNow() : this._scheduleRender()
  43964. }, t.prototype.focus = function () {
  43965. this._textAreaHandler.focusTextArea()
  43966. }, t.prototype.isFocused = function () {
  43967. return this._textAreaHandler.isFocused()
  43968. },
  43969. t.prototype.setAriaOptions = function (e) {
  43970. this._textAreaHandler.setAriaOptions(e)
  43971. }, t.prototype.addContentWidget = function (e) {
  43972. this.contentWidgets.addWidget(e.widget), this.layoutContentWidget(e), this._scheduleRender()
  43973. }, t.prototype.layoutContentWidget = function (e) {
  43974. var t = e.position && e.position.range || null;
  43975. if (null === t) {
  43976. var n = e.position ? e.position.position : null;
  43977. null !== n && (t = new R.Range(n.lineNumber, n.column, n.lineNumber, n.column))
  43978. }
  43979. var i = e.position ? e.position.preference : null;
  43980. this.contentWidgets.setWidgetPosition(e.widget, t, i), this._scheduleRender()
  43981. }, t.prototype.removeContentWidget = function (e) {
  43982. this.contentWidgets.removeWidget(e.widget), this._scheduleRender()
  43983. }, t.prototype.addOverlayWidget = function (e) {
  43984. this.overlayWidgets.addWidget(e.widget), this.layoutOverlayWidget(e), this._scheduleRender()
  43985. }, t.prototype.layoutOverlayWidget = function (e) {
  43986. var t = e.position ? e.position.preference : null;
  43987. this.overlayWidgets.setWidgetPosition(e.widget, t) && this._scheduleRender()
  43988. }, t.prototype.removeOverlayWidget = function (e) {
  43989. this.overlayWidgets.removeWidget(e.widget), this._scheduleRender()
  43990. }, t
  43991. }(B.ViewEventHandler);
  43992. function K(e) {
  43993. // try {
  43994. return e()
  43995. // } catch (e) {
  43996. // o.onUnexpectedError(e)
  43997. // }
  43998. }
  43999. t.View = H
  44000. })), define(n[121], i([0, 1, 417, 6, 10, 4, 2, 46, 60, 12, 32, 563, 228, 33, 486, 40, 13, 3, 22, 190, 68, 23, 17, 44, 20, 488, 29, 18, 11, 115, 35, 14, 64, 21, 487, 512, 301]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F, W) {
  44001. "use strict";
  44002. Object.defineProperty(t, "__esModule", {value: !0});
  44003. var B = 0, V = function () {
  44004. function e(e, t, n, i, o, r) {
  44005. this.model = e, this.viewModel = t, this.cursor = n, this.view = i, this.hasRealView = o, this.listenersToRemove = r
  44006. }
  44007. return e.prototype.dispose = function () {
  44008. a.dispose(this.listenersToRemove), this.model.onBeforeDetached(), this.hasRealView && this.view.dispose(), this.cursor.dispose(), this.viewModel.dispose()
  44009. }, e
  44010. }(), z = function (e) {
  44011. function t(t, n, i, r, a, l, u, c, h, p) {
  44012. var g = e.call(this) || this;
  44013. g._onDidDispose = g._register(new s.Emitter), g.onDidDispose = g._onDidDispose.event, g._onDidChangeModelContent = g._register(new s.Emitter),
  44014. g.onDidChangeModelContent = g._onDidChangeModelContent.event, g._onDidChangeModelLanguage = g._register(new s.Emitter), g.onDidChangeModelLanguage = g._onDidChangeModelLanguage.event, g._onDidChangeModelLanguageConfiguration = g._register(new s.Emitter), g.onDidChangeModelLanguageConfiguration = g._onDidChangeModelLanguageConfiguration.event, g._onDidChangeModelOptions = g._register(new s.Emitter), g.onDidChangeModelOptions = g._onDidChangeModelOptions.event, g._onDidChangeModelDecorations = g._register(new s.Emitter), g.onDidChangeModelDecorations = g._onDidChangeModelDecorations.event, g._onDidChangeConfiguration = g._register(new s.Emitter), g.onDidChangeConfiguration = g._onDidChangeConfiguration.event, g._onDidChangeModel = g._register(new s.Emitter), g.onDidChangeModel = g._onDidChangeModel.event, g._onDidChangeCursorPosition = g._register(new s.Emitter), g.onDidChangeCursorPosition = g._onDidChangeCursorPosition.event, g._onDidChangeCursorSelection = g._register(new s.Emitter), g.onDidChangeCursorSelection = g._onDidChangeCursorSelection.event,
  44015. g._onDidAttemptReadOnlyEdit = g._register(new s.Emitter), g.onDidAttemptReadOnlyEdit = g._onDidAttemptReadOnlyEdit.event, g._onDidLayoutChange = g._register(new s.Emitter), g.onDidLayoutChange = g._onDidLayoutChange.event, g._editorTextFocus = g._register(new H), g.onDidFocusEditorText = g._editorTextFocus.onDidChangeToTrue, g.onDidBlurEditorText = g._editorTextFocus.onDidChangeToFalse, g._editorWidgetFocus = g._register(new H), g.onDidFocusEditorWidget = g._editorWidgetFocus.onDidChangeToTrue, g.onDidBlurEditorWidget = g._editorWidgetFocus.onDidChangeToFalse, g._onWillType = g._register(new s.Emitter), g.onWillType = g._onWillType.event, g._onDidType = g._register(new s.Emitter), g.onDidType = g._onDidType.event, g._onDidCompositionStart = g._register(new s.Emitter), g.onDidCompositionStart = g._onDidCompositionStart.event, g._onDidCompositionEnd = g._register(new s.Emitter), g.onDidCompositionEnd = g._onDidCompositionEnd.event, g._onDidPaste = g._register(new s.Emitter), g.onDidPaste = g._onDidPaste.event, g._onMouseUp = g._register(new s.Emitter),
  44016. g.onMouseUp = g._onMouseUp.event, g._onMouseDown = g._register(new s.Emitter), g.onMouseDown = g._onMouseDown.event, g._onMouseDrag = g._register(new s.Emitter), g.onMouseDrag = g._onMouseDrag.event, g._onMouseDrop = g._register(new s.Emitter), g.onMouseDrop = g._onMouseDrop.event, g._onContextMenu = g._register(new s.Emitter), g.onContextMenu = g._onContextMenu.event, g._onMouseMove = g._register(new s.Emitter), g.onMouseMove = g._onMouseMove.event, g._onMouseLeave = g._register(new s.Emitter), g.onMouseLeave = g._onMouseLeave.event, g._onMouseWheel = g._register(new s.Emitter), g.onMouseWheel = g._onMouseWheel.event, g._onKeyUp = g._register(new s.Emitter), g.onKeyUp = g._onKeyUp.event, g._onKeyDown = g._register(new s.Emitter), g.onKeyDown = g._onKeyDown.event, g._onDidContentSizeChange = g._register(new s.Emitter), g.onDidContentSizeChange = g._onDidContentSizeChange.event, g._onDidScrollChange = g._register(new s.Emitter), g.onDidScrollChange = g._onDidScrollChange.event, g._onDidChangeViewZones = g._register(new s.Emitter),
  44017. g.onDidChangeViewZones = g._onDidChangeViewZones.event, g._domElement = t, g._id = ++B, g._decorationTypeKeysToIds = {}, g._decorationTypeSubtypes = {}, g.isSimpleWidget = i.isSimpleWidget || !1, g._telemetryData = i.telemetryData, n = n || {}, g._configuration = g._register(g._createConfiguration(n, p)), g._register(g._configuration.onDidChange((function (e) {
  44018. g._onDidChangeConfiguration.fire(e);
  44019. var t = g._configuration.options;
  44020. if (e.hasChanged(107)) {
  44021. var n = t.get(107);
  44022. g._onDidLayoutChange.fire(n)
  44023. }
  44024. }))), g._contextKeyService = g._register(u.createScoped(g._domElement)), g._notificationService = h, g._codeEditorService = a, g._commandService = l, g._themeService = c, g._register(new K(g, g._contextKeyService)), g._register(new U(g, g._contextKeyService)), g._instantiationService = r.createChild(new T.ServiceCollection([M.IContextKeyService, g._contextKeyService])), g._modelData = null, g._contributions = {}, g._actions = {}, g._focusTracker = new j(t), g._focusTracker.onChange((function () {
  44025. g._editorWidgetFocus.setValue(g._focusTracker.hasFocus())
  44026. })), g._contentWidgets = {},
  44027. g._overlayWidgets = {};
  44028. for (var f = 0, m = Array.isArray(i.contributions) ? i.contributions : d.EditorExtensionsRegistry.getEditorContributions(); f < m.length; f++) {
  44029. var v = m[f];
  44030. try {
  44031. var _ = g._instantiationService.createInstance(v.ctor, g);
  44032. g._contributions[v.id] = _
  44033. } catch (e) {
  44034. o.onUnexpectedError(e)
  44035. }
  44036. }
  44037. return d.EditorExtensionsRegistry.getEditorActions().forEach((function (e) {
  44038. var t = new S.InternalEditorAction(e.id, e.label, e.alias, A.withNullAsUndefined(e.precondition), (function () {
  44039. return g._instantiationService.invokeFunction((function (t) {
  44040. return Promise.resolve(e.runEditorCommand(t, g, null))
  44041. }))
  44042. }), g._contextKeyService);
  44043. g._actions[t.id] = t
  44044. })), g._codeEditorService.addCodeEditor(g), g
  44045. }
  44046. return r(t, e), t.prototype._createConfiguration = function (e, t) {
  44047. return new u.Configuration(this.isSimpleWidget, e, this._domElement, t)
  44048. }, t.prototype.getId = function () {
  44049. return this.getEditorType() + ":" + this._id
  44050. }, t.prototype.getEditorType = function () {
  44051. return w.EditorType.ICodeEditor
  44052. }, t.prototype.dispose = function () {
  44053. this._codeEditorService.removeCodeEditor(this),
  44054. this._focusTracker.dispose();
  44055. for (var t = Object.keys(this._contributions), n = 0, i = t.length; n < i; n++) {
  44056. var o = t[n];
  44057. this._contributions[o].dispose()
  44058. }
  44059. this._removeDecorationTypes(), this._postDetachModelCleanup(this._detachModel()), this._onDidDispose.fire(), e.prototype.dispose.call(this)
  44060. }, t.prototype.invokeWithinContext = function (e) {
  44061. return this._instantiationService.invokeFunction(e)
  44062. }, t.prototype.updateOptions = function (e) {
  44063. this._configuration.updateOptions(e)
  44064. }, t.prototype.getOptions = function () {
  44065. return this._configuration.options
  44066. }, t.prototype.getOption = function (e) {
  44067. return this._configuration.options.get(e)
  44068. }, t.prototype.getRawOptions = function () {
  44069. return this._configuration.getRawOptions()
  44070. }, t.prototype.getValue = function (e) {
  44071. if (void 0 === e && (e = null), !this._modelData) return "";
  44072. var t = !(!e || !e.preserveBOM), n = 0;
  44073. return e && e.lineEnding && "\n" === e.lineEnding ? n = 1 : e && e.lineEnding && "\r\n" === e.lineEnding && (n = 2), this._modelData.model.getValue(n, t)
  44074. }, t.prototype.setValue = function (e) {
  44075. this._modelData && this._modelData.model.setValue(e)
  44076. },
  44077. t.prototype.getModel = function () {
  44078. return this._modelData ? this._modelData.model : null
  44079. }, t.prototype.setModel = function (e) {
  44080. void 0 === e && (e = null);
  44081. var t = e;
  44082. if (!(null === this._modelData && null === t || this._modelData && this._modelData.model === t)) {
  44083. var n = this.hasTextFocus(), i = this._detachModel();
  44084. this._attachModel(t), n && this.hasModel() && this.focus();
  44085. var o = {oldModelUrl: i ? i.uri : null, newModelUrl: t ? t.uri : null};
  44086. this._removeDecorationTypes(), this._onDidChangeModel.fire(o), this._postDetachModelCleanup(i)
  44087. }
  44088. }, t.prototype._removeDecorationTypes = function () {
  44089. if (this._decorationTypeKeysToIds = {}, this._decorationTypeSubtypes) {
  44090. for (var e in this._decorationTypeSubtypes) {
  44091. var t = this._decorationTypeSubtypes[e];
  44092. for (var n in t) this._removeDecorationType(e + "-" + n)
  44093. }
  44094. this._decorationTypeSubtypes = {}
  44095. }
  44096. }, t.prototype.getVisibleRanges = function () {
  44097. return this._modelData ? this._modelData.viewModel.getVisibleRanges() : []
  44098. }, t.prototype.getWhitespaces = function () {
  44099. return this._modelData ? this._modelData.viewModel.viewLayout.getWhitespaces() : []
  44100. },
  44101. t._getVerticalOffsetForPosition = function (e, t, n) {
  44102. var i = e.model.validatePosition({lineNumber: t, column: n}),
  44103. o = e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);
  44104. return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber)
  44105. }, t.prototype.getTopForLineNumber = function (e) {
  44106. return this._modelData ? t._getVerticalOffsetForPosition(this._modelData, e, 1) : -1
  44107. }, t.prototype.getTopForPosition = function (e, n) {
  44108. return this._modelData ? t._getVerticalOffsetForPosition(this._modelData, e, n) : -1
  44109. }, t.prototype.setHiddenAreas = function (e) {
  44110. this._modelData && this._modelData.viewModel.setHiddenAreas(e.map((function (e) {
  44111. return C.Range.lift(e)
  44112. })))
  44113. }, t.prototype.getVisibleColumnFromPosition = function (e) {
  44114. if (!this._modelData) return e.column;
  44115. var t = this._modelData.model.validatePosition(e), n = this._modelData.model.getOptions().tabSize;
  44116. return _.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber), t.column, n) + 1
  44117. }, t.prototype.getPosition = function () {
  44118. return this._modelData ? this._modelData.cursor.getPosition() : null
  44119. }, t.prototype.setPosition = function (e) {
  44120. if (this._modelData) {
  44121. if (!y.Position.isIPosition(e)) throw new Error("Invalid arguments");
  44122. this._modelData.cursor.setSelections("api", [{
  44123. selectionStartLineNumber: e.lineNumber,
  44124. selectionStartColumn: e.column,
  44125. positionLineNumber: e.lineNumber,
  44126. positionColumn: e.column
  44127. }])
  44128. }
  44129. }, t.prototype._sendRevealRange = function (e, t, n, i) {
  44130. if (this._modelData) {
  44131. if (!C.Range.isIRange(e)) throw new Error("Invalid arguments");
  44132. var o = this._modelData.model.validateRange(e),
  44133. r = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);
  44134. this._modelData.cursor.emitCursorRevealRange("api", r, t, n, i)
  44135. }
  44136. }, t.prototype.revealLine = function (e, t) {
  44137. void 0 === t && (t = 0), this._revealLine(e, 0, t)
  44138. }, t.prototype.revealLineInCenter = function (e, t) {
  44139. void 0 === t && (t = 0), this._revealLine(e, 1, t)
  44140. }, t.prototype.revealLineInCenterIfOutsideViewport = function (e, t) {
  44141. void 0 === t && (t = 0), this._revealLine(e, 2, t)
  44142. }, t.prototype._revealLine = function (e, t, n) {
  44143. if ("number" != typeof e) throw new Error("Invalid arguments");
  44144. this._sendRevealRange(new C.Range(e, 1, e, 1), t, !1, n)
  44145. }, t.prototype.revealPosition = function (e, t) {
  44146. void 0 === t && (t = 0), this._revealPosition(e, 0, !0, t)
  44147. }, t.prototype.revealPositionInCenter = function (e, t) {
  44148. void 0 === t && (t = 0), this._revealPosition(e, 1, !0, t)
  44149. }, t.prototype.revealPositionInCenterIfOutsideViewport = function (e, t) {
  44150. void 0 === t && (t = 0), this._revealPosition(e, 2, !0, t)
  44151. }, t.prototype._revealPosition = function (e, t, n, i) {
  44152. if (!y.Position.isIPosition(e)) throw new Error("Invalid arguments");
  44153. this._sendRevealRange(new C.Range(e.lineNumber, e.column, e.lineNumber, e.column), t, n, i)
  44154. }, t.prototype.getSelection = function () {
  44155. return this._modelData ? this._modelData.cursor.getSelection() : null
  44156. }, t.prototype.getSelections = function () {
  44157. return this._modelData ? this._modelData.cursor.getSelections() : null
  44158. }, t.prototype.setSelection = function (e) {
  44159. var t = b.Selection.isISelection(e), n = C.Range.isIRange(e);
  44160. if (!t && !n) throw new Error("Invalid arguments");
  44161. if (t) this._setSelectionImpl(e); else if (n) {
  44162. var i = {
  44163. selectionStartLineNumber: e.startLineNumber,
  44164. selectionStartColumn: e.startColumn,
  44165. positionLineNumber: e.endLineNumber,
  44166. positionColumn: e.endColumn
  44167. };
  44168. this._setSelectionImpl(i)
  44169. }
  44170. }, t.prototype._setSelectionImpl = function (e) {
  44171. if (this._modelData) {
  44172. var t = new b.Selection(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn);
  44173. this._modelData.cursor.setSelections("api", [t])
  44174. }
  44175. }, t.prototype.revealLines = function (e, t, n) {
  44176. void 0 === n && (n = 0), this._revealLines(e, t, 0, n)
  44177. }, t.prototype.revealLinesInCenter = function (e, t, n) {
  44178. void 0 === n && (n = 0), this._revealLines(e, t, 1, n)
  44179. }, t.prototype.revealLinesInCenterIfOutsideViewport = function (e, t, n) {
  44180. void 0 === n && (n = 0), this._revealLines(e, t, 2, n)
  44181. }, t.prototype._revealLines = function (e, t, n, i) {
  44182. if ("number" != typeof e || "number" != typeof t) throw new Error("Invalid arguments");
  44183. this._sendRevealRange(new C.Range(e, 1, t, 1), n, !1, i)
  44184. }, t.prototype.revealRange = function (e, t, n, i) {
  44185. void 0 === t && (t = 0), void 0 === n && (n = !1), void 0 === i && (i = !0), this._revealRange(e, n ? 1 : 0, i, t)
  44186. },
  44187. t.prototype.revealRangeInCenter = function (e, t) {
  44188. void 0 === t && (t = 0), this._revealRange(e, 1, !0, t)
  44189. }, t.prototype.revealRangeInCenterIfOutsideViewport = function (e, t) {
  44190. void 0 === t && (t = 0), this._revealRange(e, 2, !0, t)
  44191. }, t.prototype.revealRangeAtTop = function (e, t) {
  44192. void 0 === t && (t = 0), this._revealRange(e, 3, !0, t)
  44193. }, t.prototype._revealRange = function (e, t, n, i) {
  44194. if (!C.Range.isIRange(e)) throw new Error("Invalid arguments");
  44195. this._sendRevealRange(C.Range.lift(e), t, n, i)
  44196. }, t.prototype.setSelections = function (e, t) {
  44197. if (void 0 === t && (t = "api"), this._modelData) {
  44198. if (!e || 0 === e.length) throw new Error("Invalid arguments");
  44199. for (var n = 0, i = e.length; n < i; n++) if (!b.Selection.isISelection(e[n])) throw new Error("Invalid arguments");
  44200. this._modelData.cursor.setSelections(t, e)
  44201. }
  44202. }, t.prototype.getContentWidth = function () {
  44203. return this._modelData ? this._modelData.viewModel.viewLayout.getContentWidth() : -1
  44204. }, t.prototype.getScrollWidth = function () {
  44205. return this._modelData ? this._modelData.viewModel.viewLayout.getScrollWidth() : -1
  44206. }, t.prototype.getScrollLeft = function () {
  44207. return this._modelData ? this._modelData.viewModel.viewLayout.getCurrentScrollLeft() : -1
  44208. }, t.prototype.getContentHeight = function () {
  44209. return this._modelData ? this._modelData.viewModel.viewLayout.getContentHeight() : -1
  44210. }, t.prototype.getScrollHeight = function () {
  44211. return this._modelData ? this._modelData.viewModel.viewLayout.getScrollHeight() : -1
  44212. }, t.prototype.getScrollTop = function () {
  44213. return this._modelData ? this._modelData.viewModel.viewLayout.getCurrentScrollTop() : -1
  44214. }, t.prototype.setScrollLeft = function (e) {
  44215. if (this._modelData) {
  44216. if ("number" != typeof e) throw new Error("Invalid arguments");
  44217. this._modelData.viewModel.viewLayout.setScrollPositionNow({scrollLeft: e})
  44218. }
  44219. }, t.prototype.setScrollTop = function (e) {
  44220. if (this._modelData) {
  44221. if ("number" != typeof e) throw new Error("Invalid arguments");
  44222. this._modelData.viewModel.viewLayout.setScrollPositionNow({scrollTop: e})
  44223. }
  44224. }, t.prototype.setScrollPosition = function (e) {
  44225. this._modelData && this._modelData.viewModel.viewLayout.setScrollPositionNow(e)
  44226. }, t.prototype.saveViewState = function () {
  44227. if (!this._modelData) return null;
  44228. for (var e = {}, t = 0, n = Object.keys(this._contributions); t < n.length; t++) {
  44229. var i = n[t], o = this._contributions[i];
  44230. "function" == typeof o.saveViewState && (e[i] = o.saveViewState())
  44231. }
  44232. return {
  44233. cursorState: this._modelData.cursor.saveState(),
  44234. viewState: this._modelData.viewModel.saveState(),
  44235. contributionsState: e
  44236. }
  44237. }, t.prototype.restoreViewState = function (e) {
  44238. if (this._modelData && this._modelData.hasRealView) {
  44239. var t = e;
  44240. if (t && t.cursorState && t.viewState) {
  44241. var n = t.cursorState;
  44242. Array.isArray(n) ? this._modelData.cursor.restoreState(n) : this._modelData.cursor.restoreState([n]);
  44243. for (var i = t.contributionsState || {}, o = Object.keys(this._contributions), r = 0, s = o.length; r < s; r++) {
  44244. var a = o[r], l = this._contributions[a];
  44245. "function" == typeof l.restoreViewState && l.restoreViewState(i[a])
  44246. }
  44247. var u = this._modelData.viewModel.reduceRestoreState(t.viewState);
  44248. this._modelData.view.restoreState(u)
  44249. }
  44250. }
  44251. }, t.prototype.getContribution = function (e) {
  44252. return this._contributions[e] || null
  44253. }, t.prototype.getActions = function () {
  44254. for (var e = [], t = Object.keys(this._actions), n = 0, i = t.length; n < i; n++) {
  44255. var o = t[n];
  44256. e.push(this._actions[o])
  44257. }
  44258. return e
  44259. }, t.prototype.getSupportedActions = function () {
  44260. var e = this.getActions();
  44261. return e = e.filter((function (e) {
  44262. return e.isSupported()
  44263. }))
  44264. }, t.prototype.getAction = function (e) {
  44265. return this._actions[e] || null
  44266. }, t.prototype.trigger = function (e, t, n) {
  44267. if (n = n || {}, t === w.Handler.Type) {
  44268. if (!this._modelData || "string" != typeof n.text || 0 === n.text.length) return;
  44269. return "keyboard" === e && this._onWillType.fire(n.text), this._modelData.cursor.trigger(e, t, n), void ("keyboard" === e && this._onDidType.fire(n.text))
  44270. }
  44271. if (t !== w.Handler.Paste) {
  44272. var i = this.getAction(t);
  44273. i ? Promise.resolve(i.run()).then(void 0, o.onUnexpectedError) : this._modelData && (this._triggerEditorCommand(e, t, n) || (this._modelData.cursor.trigger(e, t, n), t === w.Handler.CompositionStart && this._onDidCompositionStart.fire(), t === w.Handler.CompositionEnd && this._onDidCompositionEnd.fire()))
  44274. } else {
  44275. if (!this._modelData || "string" != typeof n.text || 0 === n.text.length) return
  44276. ;
  44277. var r = this._modelData.cursor.getSelection().getStartPosition();
  44278. this._modelData.cursor.trigger(e, t, n);
  44279. var s = this._modelData.cursor.getSelection().getStartPosition();
  44280. "keyboard" === e && this._onDidPaste.fire({
  44281. range: new C.Range(r.lineNumber, r.column, s.lineNumber, s.column),
  44282. mode: n.mode
  44283. })
  44284. }
  44285. }, t.prototype._triggerEditorCommand = function (e, t, n) {
  44286. var i = this, r = d.EditorExtensionsRegistry.getEditorCommand(t);
  44287. return !!r && ((n = n || {}).source = e, this._instantiationService.invokeFunction((function (e) {
  44288. Promise.resolve(r.runEditorCommand(e, i, n)).then(void 0, o.onUnexpectedError)
  44289. })), !0)
  44290. }, t.prototype._getCursors = function () {
  44291. return this._modelData ? this._modelData.cursor : null
  44292. }, t.prototype.pushUndoStop = function () {
  44293. return !!this._modelData && (!this._configuration.options.get(68) && (this._modelData.model.pushStackElement(), !0))
  44294. }, t.prototype.executeEdits = function (e, t, n) {
  44295. return !!this._modelData && (!this._configuration.options.get(68) && (i = n ? Array.isArray(n) ? function () {
  44296. return n
  44297. } : n : function () {
  44298. return null
  44299. }, this._modelData.cursor.executeEdits(e, t, i), !0))
  44300. ;
  44301. var i
  44302. }, t.prototype.executeCommand = function (e, t) {
  44303. this._modelData && this._modelData.cursor.trigger(e, w.Handler.ExecuteCommand, t)
  44304. }, t.prototype.executeCommands = function (e, t) {
  44305. this._modelData && this._modelData.cursor.trigger(e, w.Handler.ExecuteCommands, t)
  44306. }, t.prototype.changeDecorations = function (e) {
  44307. return this._modelData ? this._modelData.model.changeDecorations(e, this._id) : null
  44308. }, t.prototype.getLineDecorations = function (e) {
  44309. return this._modelData ? this._modelData.model.getLineDecorations(e, this._id, m.filterValidationDecorations(this._configuration.options)) : null
  44310. }, t.prototype.deltaDecorations = function (e, t) {
  44311. return this._modelData ? 0 === e.length && 0 === t.length ? e : this._modelData.model.deltaDecorations(e, t, this._id) : []
  44312. }, t.prototype.removeDecorations = function (e) {
  44313. var t = this._decorationTypeKeysToIds[e];
  44314. t && this.deltaDecorations(t, []), this._decorationTypeKeysToIds.hasOwnProperty(e) && delete this._decorationTypeKeysToIds[e], this._decorationTypeSubtypes.hasOwnProperty(e) && delete this._decorationTypeSubtypes[e]
  44315. },
  44316. t.prototype.getLayoutInfo = function () {
  44317. return this._configuration.options.get(107)
  44318. }, t.prototype.createOverviewRuler = function (e) {
  44319. return this._modelData && this._modelData.hasRealView ? this._modelData.view.createOverviewRuler(e) : null
  44320. }, t.prototype.getContainerDomNode = function () {
  44321. return this._domElement
  44322. }, t.prototype.getDomNode = function () {
  44323. return this._modelData && this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null
  44324. }, t.prototype.delegateVerticalScrollbarMouseDown = function (e) {
  44325. this._modelData && this._modelData.hasRealView && this._modelData.view.delegateVerticalScrollbarMouseDown(e)
  44326. }, t.prototype.layout = function (e) {
  44327. this._configuration.observeReferenceElement(e), this.render()
  44328. }, t.prototype.focus = function () {
  44329. this._modelData && this._modelData.hasRealView && this._modelData.view.focus()
  44330. }, t.prototype.hasTextFocus = function () {
  44331. return !(!this._modelData || !this._modelData.hasRealView) && this._modelData.view.isFocused()
  44332. }, t.prototype.hasWidgetFocus = function () {
  44333. return this._focusTracker && this._focusTracker.hasFocus()
  44334. },
  44335. t.prototype.addContentWidget = function (e) {
  44336. var t = {widget: e, position: e.getPosition()};
  44337. this._contentWidgets.hasOwnProperty(e.getId()) && console.warn("Overwriting a content widget with the same id."), this._contentWidgets[e.getId()] = t, this._modelData && this._modelData.hasRealView && this._modelData.view.addContentWidget(t)
  44338. }, t.prototype.layoutContentWidget = function (e) {
  44339. var t = e.getId();
  44340. if (this._contentWidgets.hasOwnProperty(t)) {
  44341. var n = this._contentWidgets[t];
  44342. n.position = e.getPosition(), this._modelData && this._modelData.hasRealView && this._modelData.view.layoutContentWidget(n)
  44343. }
  44344. }, t.prototype.removeContentWidget = function (e) {
  44345. var t = e.getId();
  44346. if (this._contentWidgets.hasOwnProperty(t)) {
  44347. var n = this._contentWidgets[t];
  44348. delete this._contentWidgets[t], this._modelData && this._modelData.hasRealView && this._modelData.view.removeContentWidget(n)
  44349. }
  44350. }, t.prototype.addOverlayWidget = function (e) {
  44351. var t = {widget: e, position: e.getPosition()};
  44352. this._overlayWidgets.hasOwnProperty(e.getId()) && console.warn("Overwriting an overlay widget with the same id."),
  44353. this._overlayWidgets[e.getId()] = t, this._modelData && this._modelData.hasRealView && this._modelData.view.addOverlayWidget(t)
  44354. }, t.prototype.layoutOverlayWidget = function (e) {
  44355. var t = e.getId();
  44356. if (this._overlayWidgets.hasOwnProperty(t)) {
  44357. var n = this._overlayWidgets[t];
  44358. n.position = e.getPosition(), this._modelData && this._modelData.hasRealView && this._modelData.view.layoutOverlayWidget(n)
  44359. }
  44360. }, t.prototype.removeOverlayWidget = function (e) {
  44361. var t = e.getId();
  44362. if (this._overlayWidgets.hasOwnProperty(t)) {
  44363. var n = this._overlayWidgets[t];
  44364. delete this._overlayWidgets[t], this._modelData && this._modelData.hasRealView && this._modelData.view.removeOverlayWidget(n)
  44365. }
  44366. }, t.prototype.changeViewZones = function (e) {
  44367. this._modelData && this._modelData.hasRealView && (this._modelData.view.change(e) && this._onDidChangeViewZones.fire())
  44368. }, t.prototype.getTargetAtClientPoint = function (e, t) {
  44369. return this._modelData && this._modelData.hasRealView ? this._modelData.view.getTargetAtClientPoint(e, t) : null
  44370. }, t.prototype.getScrolledVisiblePosition = function (e) {
  44371. if (!this._modelData || !this._modelData.hasRealView) return null;
  44372. var n = this._modelData.model.validatePosition(e), i = this._configuration.options, o = i.get(107);
  44373. return {
  44374. top: t._getVerticalOffsetForPosition(this._modelData, n.lineNumber, n.column) - this.getScrollTop(),
  44375. left: this._modelData.view.getOffsetForColumn(n.lineNumber, n.column) + o.glyphMarginWidth + o.lineNumbersWidth + o.decorationsWidth - this.getScrollLeft(),
  44376. height: i.get(49)
  44377. }
  44378. }, t.prototype.getOffsetForColumn = function (e, t) {
  44379. return this._modelData && this._modelData.hasRealView ? this._modelData.view.getOffsetForColumn(e, t) : -1
  44380. }, t.prototype.render = function (e) {
  44381. void 0 === e && (e = !1), this._modelData && this._modelData.hasRealView && this._modelData.view.render(!0, e)
  44382. }, t.prototype.setAriaOptions = function (e) {
  44383. this._modelData && this._modelData.hasRealView && this._modelData.view.setAriaOptions(e)
  44384. }, t.prototype.applyFontInfo = function (e) {
  44385. u.Configuration.applyFontInfoSlow(e, this._configuration.options.get(34))
  44386. }, t.prototype._attachModel = function (e) {
  44387. var t = this;
  44388. if (e) {
  44389. var o = []
  44390. ;this._domElement.setAttribute("data-mode-id", e.getLanguageIdentifier().language), this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()), this._configuration.setMaxLineNumber(e.getLineCount()), e.onBeforeAttached();
  44391. var r = new x.ViewModel(this._id, this._configuration, e, W.DOMLineBreaksComputerFactory.create(), F.MonospaceLineBreaksComputerFactory.create(this._configuration.options), (function (e) {
  44392. return i.scheduleAtNextAnimationFrame(e)
  44393. }));
  44394. o.push(e.onDidChangeDecorations((function (e) {
  44395. return t._onDidChangeModelDecorations.fire(e)
  44396. }))), o.push(e.onDidChangeLanguage((function (n) {
  44397. t._domElement.setAttribute("data-mode-id", e.getLanguageIdentifier().language), t._onDidChangeModelLanguage.fire(n)
  44398. }))), o.push(e.onDidChangeLanguageConfiguration((function (e) {
  44399. return t._onDidChangeModelLanguageConfiguration.fire(e)
  44400. }))), o.push(e.onDidChangeContent((function (e) {
  44401. return t._onDidChangeModelContent.fire(e)
  44402. }))), o.push(e.onDidChangeOptions((function (e) {
  44403. return t._onDidChangeModelOptions.fire(e)
  44404. }))),
  44405. o.push(e.onWillDispose((function () {
  44406. return t.setModel(null)
  44407. })));
  44408. var s = new v.Cursor(this._configuration, e, r);
  44409. o.push(s.onDidReachMaxCursorCount((function () {
  44410. t._notificationService.warn(n.localize(0, null, v.Cursor.MAX_CURSOR_COUNT))
  44411. }))), o.push(s.onDidAttemptReadOnlyEdit((function () {
  44412. t._onDidAttemptReadOnlyEdit.fire(void 0)
  44413. }))), o.push(s.onDidChange((function (e) {
  44414. for (var n = [], i = 0, o = e.selections.length; i < o; i++) n[i] = e.selections[i].getPosition();
  44415. var r = {position: n[0], secondaryPositions: n.slice(1), reason: e.reason, source: e.source};
  44416. t._onDidChangeCursorPosition.fire(r);
  44417. var s = {
  44418. selection: e.selections[0],
  44419. secondarySelections: e.selections.slice(1),
  44420. modelVersionId: e.modelVersionId,
  44421. oldSelections: e.oldSelections,
  44422. oldModelVersionId: e.oldModelVersionId,
  44423. source: e.source,
  44424. reason: e.reason
  44425. };
  44426. t._onDidChangeCursorSelection.fire(s)
  44427. })));
  44428. var a = this._createView(r, s), l = a[0], u = a[1];
  44429. if (u) {
  44430. this._domElement.appendChild(l.domNode.domNode);
  44431. for (var d = Object.keys(this._contentWidgets), c = 0, h = d.length; c < h; c++) {
  44432. var p = d[c]
  44433. ;l.addContentWidget(this._contentWidgets[p])
  44434. }
  44435. for (c = 0, h = (d = Object.keys(this._overlayWidgets)).length; c < h; c++) {
  44436. p = d[c];
  44437. l.addOverlayWidget(this._overlayWidgets[p])
  44438. }
  44439. l.render(!1, !0), l.domNode.domNode.setAttribute("data-uri", e.uri.toString())
  44440. }
  44441. this._modelData = new V(e, r, s, l, u, o)
  44442. } else this._modelData = null
  44443. }, t.prototype._createView = function (e, t) {
  44444. var n, i = this;
  44445. n = this.isSimpleWidget ? {
  44446. executeEditorCommand: function (e, n) {
  44447. e.runCoreEditorCommand(t, n)
  44448. }, paste: function (e, t, n, o, r) {
  44449. i.trigger(e, w.Handler.Paste, {text: t, pasteOnNewLine: n, multicursorText: o, mode: r})
  44450. }, type: function (e, t) {
  44451. i.trigger(e, w.Handler.Type, {text: t})
  44452. }, replacePreviousChar: function (e, t, n) {
  44453. i.trigger(e, w.Handler.ReplacePreviousChar, {text: t, replaceCharCnt: n})
  44454. }, compositionStart: function (e) {
  44455. i.trigger(e, w.Handler.CompositionStart, void 0)
  44456. }, compositionEnd: function (e) {
  44457. i.trigger(e, w.Handler.CompositionEnd, void 0)
  44458. }, cut: function (e) {
  44459. i.trigger(e, w.Handler.Cut, void 0)
  44460. }
  44461. } : {
  44462. executeEditorCommand: function (e, n) {
  44463. e.runCoreEditorCommand(t, n)
  44464. }, paste: function (e, t, n, o, r) {
  44465. i._commandService.executeCommand(w.Handler.Paste, {
  44466. text: t,
  44467. pasteOnNewLine: n,
  44468. multicursorText: o,
  44469. mode: r
  44470. })
  44471. }, type: function (e, t) {
  44472. i._commandService.executeCommand(w.Handler.Type, {text: t})
  44473. }, replacePreviousChar: function (e, t, n) {
  44474. i._commandService.executeCommand(w.Handler.ReplacePreviousChar, {text: t, replaceCharCnt: n})
  44475. }, compositionStart: function (e) {
  44476. i._commandService.executeCommand(w.Handler.CompositionStart, {})
  44477. }, compositionEnd: function (e) {
  44478. i._commandService.executeCommand(w.Handler.CompositionEnd, {})
  44479. }, cut: function (e) {
  44480. i._commandService.executeCommand(w.Handler.Cut, {})
  44481. }
  44482. };
  44483. var o = new f.ViewOutgoingEvents(e);
  44484. return o.onDidContentSizeChange = function (e) {
  44485. return i._onDidContentSizeChange.fire(e)
  44486. }, o.onDidScroll = function (e) {
  44487. return i._onDidScrollChange.fire(e)
  44488. }, o.onDidGainFocus = function () {
  44489. return i._editorTextFocus.setValue(!0)
  44490. }, o.onDidLoseFocus = function () {
  44491. return i._editorTextFocus.setValue(!1)
  44492. }, o.onContextMenu = function (e) {
  44493. return i._onContextMenu.fire(e)
  44494. }, o.onMouseDown = function (e) {
  44495. return i._onMouseDown.fire(e)
  44496. }, o.onMouseUp = function (e) {
  44497. return i._onMouseUp.fire(e)
  44498. }, o.onMouseDrag = function (e) {
  44499. return i._onMouseDrag.fire(e)
  44500. }, o.onMouseDrop = function (e) {
  44501. return i._onMouseDrop.fire(e)
  44502. }, o.onKeyUp = function (e) {
  44503. return i._onKeyUp.fire(e)
  44504. }, o.onMouseMove = function (e) {
  44505. return i._onMouseMove.fire(e)
  44506. }, o.onMouseLeave = function (e) {
  44507. return i._onMouseLeave.fire(e)
  44508. }, o.onMouseWheel = function (e) {
  44509. return i._onMouseWheel.fire(e)
  44510. }, o.onKeyDown = function (e) {
  44511. return i._onKeyDown.fire(e)
  44512. }, [new p.View(n, this._configuration, this._themeService, e, t, o), !0]
  44513. }, t.prototype._postDetachModelCleanup = function (e) {
  44514. e && e.removeAllDecorationsWithOwnerId(this._id)
  44515. }, t.prototype._detachModel = function () {
  44516. if (!this._modelData) return null;
  44517. var e = this._modelData.model,
  44518. t = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null;
  44519. return this._modelData.dispose(), this._modelData = null, this._domElement.removeAttribute("data-mode-id"), t && this._domElement.removeChild(t), e
  44520. }, t.prototype._removeDecorationType = function (e) {
  44521. this._codeEditorService.removeDecorationType(e)
  44522. }, t.prototype.hasModel = function () {
  44523. return null !== this._modelData
  44524. },t = h([g(3, k.IInstantiationService), g(4, c.ICodeEditorService), g(5, I.ICommandService), g(6, M.IContextKeyService), g(7, O.IThemeService), g(8, R.INotificationService), g(9, P.IAccessibilityService)], t)
  44525. }(a.Disposable);
  44526. t.CodeEditorWidget = z;
  44527. var H = function (e) {
  44528. function t() {
  44529. var t = e.call(this) || this;
  44530. return t._onDidChangeToTrue = t._register(new s.Emitter), t.onDidChangeToTrue = t._onDidChangeToTrue.event, t._onDidChangeToFalse = t._register(new s.Emitter), t.onDidChangeToFalse = t._onDidChangeToFalse.event, t._value = 0, t
  44531. }
  44532. return r(t, e), t.prototype.setValue = function (e) {
  44533. var t = e ? 2 : 1;
  44534. this._value !== t && (this._value = t, 2 === this._value ? this._onDidChangeToTrue.fire() : 1 === this._value && this._onDidChangeToFalse.fire())
  44535. }, t
  44536. }(a.Disposable);
  44537. t.BooleanEventEmitter = H;
  44538. var K = function (e) {
  44539. function t(t, n) {
  44540. var i = e.call(this) || this;
  44541. return i._editor = t, n.createKey("editorId", t.getId()), i._editorSimpleInput = E.EditorContextKeys.editorSimpleInput.bindTo(n), i._editorFocus = E.EditorContextKeys.focus.bindTo(n),
  44542. i._textInputFocus = E.EditorContextKeys.textInputFocus.bindTo(n), i._editorTextFocus = E.EditorContextKeys.editorTextFocus.bindTo(n), i._editorTabMovesFocus = E.EditorContextKeys.tabMovesFocus.bindTo(n), i._editorReadonly = E.EditorContextKeys.readOnly.bindTo(n), i._hasMultipleSelections = E.EditorContextKeys.hasMultipleSelections.bindTo(n), i._hasNonEmptySelection = E.EditorContextKeys.hasNonEmptySelection.bindTo(n), i._canUndo = E.EditorContextKeys.canUndo.bindTo(n), i._canRedo = E.EditorContextKeys.canRedo.bindTo(n), i._register(i._editor.onDidChangeConfiguration((function () {
  44543. return i._updateFromConfig()
  44544. }))), i._register(i._editor.onDidChangeCursorSelection((function () {
  44545. return i._updateFromSelection()
  44546. }))), i._register(i._editor.onDidFocusEditorWidget((function () {
  44547. return i._updateFromFocus()
  44548. }))), i._register(i._editor.onDidBlurEditorWidget((function () {
  44549. return i._updateFromFocus()
  44550. }))), i._register(i._editor.onDidFocusEditorText((function () {
  44551. return i._updateFromFocus()
  44552. }))), i._register(i._editor.onDidBlurEditorText((function () {
  44553. return i._updateFromFocus()
  44554. }))), i._register(i._editor.onDidChangeModel((function () {
  44555. return i._updateFromModel()
  44556. }))), i._register(i._editor.onDidChangeConfiguration((function () {
  44557. return i._updateFromModel()
  44558. }))), i._updateFromConfig(), i._updateFromSelection(), i._updateFromFocus(), i._updateFromModel(), i._editorSimpleInput.set(i._editor.isSimpleWidget), i
  44559. }
  44560. return r(t, e), t.prototype._updateFromConfig = function () {
  44561. var e = this._editor.getOptions();
  44562. this._editorTabMovesFocus.set(e.get(106)), this._editorReadonly.set(e.get(68))
  44563. }, t.prototype._updateFromSelection = function () {
  44564. var e = this._editor.getSelections();
  44565. e ? (this._hasMultipleSelections.set(e.length > 1), this._hasNonEmptySelection.set(e.some((function (e) {
  44566. return !e.isEmpty()
  44567. })))) : (this._hasMultipleSelections.reset(), this._hasNonEmptySelection.reset())
  44568. }, t.prototype._updateFromFocus = function () {
  44569. this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget), this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget),
  44570. this._textInputFocus.set(this._editor.hasTextFocus())
  44571. }, t.prototype._updateFromModel = function () {
  44572. var e = this._editor.getModel();
  44573. this._canUndo.set(Boolean(e && e.canUndo())), this._canRedo.set(Boolean(e && e.canRedo()))
  44574. }, t
  44575. }(a.Disposable), U = function (e) {
  44576. function t(t, n) {
  44577. var i = e.call(this) || this;
  44578. i._editor = t, i._contextKeyService = n, i._langId = E.EditorContextKeys.languageId.bindTo(n), i._hasCompletionItemProvider = E.EditorContextKeys.hasCompletionItemProvider.bindTo(n), i._hasCodeActionsProvider = E.EditorContextKeys.hasCodeActionsProvider.bindTo(n), i._hasCodeLensProvider = E.EditorContextKeys.hasCodeLensProvider.bindTo(n), i._hasDefinitionProvider = E.EditorContextKeys.hasDefinitionProvider.bindTo(n), i._hasDeclarationProvider = E.EditorContextKeys.hasDeclarationProvider.bindTo(n), i._hasImplementationProvider = E.EditorContextKeys.hasImplementationProvider.bindTo(n), i._hasTypeDefinitionProvider = E.EditorContextKeys.hasTypeDefinitionProvider.bindTo(n), i._hasHoverProvider = E.EditorContextKeys.hasHoverProvider.bindTo(n),
  44579. i._hasDocumentHighlightProvider = E.EditorContextKeys.hasDocumentHighlightProvider.bindTo(n), i._hasDocumentSymbolProvider = E.EditorContextKeys.hasDocumentSymbolProvider.bindTo(n), i._hasReferenceProvider = E.EditorContextKeys.hasReferenceProvider.bindTo(n), i._hasRenameProvider = E.EditorContextKeys.hasRenameProvider.bindTo(n), i._hasSignatureHelpProvider = E.EditorContextKeys.hasSignatureHelpProvider.bindTo(n), i._hasDocumentFormattingProvider = E.EditorContextKeys.hasDocumentFormattingProvider.bindTo(n), i._hasDocumentSelectionFormattingProvider = E.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(n), i._hasMultipleDocumentFormattingProvider = E.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(n), i._hasMultipleDocumentSelectionFormattingProvider = E.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(n), i._isInWalkThrough = E.EditorContextKeys.isInEmbeddedEditor.bindTo(n);
  44580. var o = function () {
  44581. return i._update()
  44582. };
  44583. return i._register(t.onDidChangeModel(o)),
  44584. i._register(t.onDidChangeModelLanguage(o)), i._register(L.CompletionProviderRegistry.onDidChange(o)), i._register(L.CodeActionProviderRegistry.onDidChange(o)), i._register(L.CodeLensProviderRegistry.onDidChange(o)), i._register(L.DefinitionProviderRegistry.onDidChange(o)), i._register(L.DeclarationProviderRegistry.onDidChange(o)), i._register(L.ImplementationProviderRegistry.onDidChange(o)), i._register(L.TypeDefinitionProviderRegistry.onDidChange(o)), i._register(L.HoverProviderRegistry.onDidChange(o)), i._register(L.DocumentHighlightProviderRegistry.onDidChange(o)), i._register(L.DocumentSymbolProviderRegistry.onDidChange(o)), i._register(L.ReferenceProviderRegistry.onDidChange(o)), i._register(L.RenameProviderRegistry.onDidChange(o)), i._register(L.DocumentFormattingEditProviderRegistry.onDidChange(o)), i._register(L.DocumentRangeFormattingEditProviderRegistry.onDidChange(o)), i._register(L.SignatureHelpProviderRegistry.onDidChange(o)), o(), i
  44585. }
  44586. return r(t, e), t.prototype.dispose = function () {
  44587. e.prototype.dispose.call(this)
  44588. },
  44589. t.prototype.reset = function () {
  44590. var e = this;
  44591. this._contextKeyService.bufferChangeEvents((function () {
  44592. e._langId.reset(), e._hasCompletionItemProvider.reset(), e._hasCodeActionsProvider.reset(), e._hasCodeLensProvider.reset(), e._hasDefinitionProvider.reset(), e._hasDeclarationProvider.reset(), e._hasImplementationProvider.reset(), e._hasTypeDefinitionProvider.reset(), e._hasHoverProvider.reset(), e._hasDocumentHighlightProvider.reset(), e._hasDocumentSymbolProvider.reset(), e._hasReferenceProvider.reset(), e._hasRenameProvider.reset(), e._hasDocumentFormattingProvider.reset(), e._hasDocumentSelectionFormattingProvider.reset(), e._hasSignatureHelpProvider.reset(), e._isInWalkThrough.reset()
  44593. }))
  44594. }, t.prototype._update = function () {
  44595. var e = this, t = this._editor.getModel();
  44596. t ? this._contextKeyService.bufferChangeEvents((function () {
  44597. e._langId.set(t.getLanguageIdentifier().language), e._hasCompletionItemProvider.set(L.CompletionProviderRegistry.has(t)), e._hasCodeActionsProvider.set(L.CodeActionProviderRegistry.has(t)),
  44598. e._hasCodeLensProvider.set(L.CodeLensProviderRegistry.has(t)), e._hasDefinitionProvider.set(L.DefinitionProviderRegistry.has(t)), e._hasDeclarationProvider.set(L.DeclarationProviderRegistry.has(t)), e._hasImplementationProvider.set(L.ImplementationProviderRegistry.has(t)), e._hasTypeDefinitionProvider.set(L.TypeDefinitionProviderRegistry.has(t)), e._hasHoverProvider.set(L.HoverProviderRegistry.has(t)), e._hasDocumentHighlightProvider.set(L.DocumentHighlightProviderRegistry.has(t)), e._hasDocumentSymbolProvider.set(L.DocumentSymbolProviderRegistry.has(t)), e._hasReferenceProvider.set(L.ReferenceProviderRegistry.has(t)), e._hasRenameProvider.set(L.RenameProviderRegistry.has(t)), e._hasSignatureHelpProvider.set(L.SignatureHelpProviderRegistry.has(t)), e._hasDocumentFormattingProvider.set(L.DocumentFormattingEditProviderRegistry.has(t) || L.DocumentRangeFormattingEditProviderRegistry.has(t)), e._hasDocumentSelectionFormattingProvider.set(L.DocumentRangeFormattingEditProviderRegistry.has(t)),
  44599. e._hasMultipleDocumentFormattingProvider.set(L.DocumentFormattingEditProviderRegistry.all(t).length + L.DocumentRangeFormattingEditProviderRegistry.all(t).length > 1), e._hasMultipleDocumentSelectionFormattingProvider.set(L.DocumentRangeFormattingEditProviderRegistry.all(t).length > 1), e._isInWalkThrough.set(t.uri.scheme === l.Schemas.walkThroughSnippet)
  44600. })) : this.reset()
  44601. }, t
  44602. }(a.Disposable);
  44603. t.EditorModeContext = U;
  44604. var j = function (e) {
  44605. function t(t) {
  44606. var n = e.call(this) || this;
  44607. return n._onChange = n._register(new s.Emitter), n.onChange = n._onChange.event, n._hasFocus = !1, n._domFocusTracker = n._register(i.trackFocus(t)), n._register(n._domFocusTracker.onDidFocus((function () {
  44608. n._hasFocus = !0, n._onChange.fire(void 0)
  44609. }))), n._register(n._domFocusTracker.onDidBlur((function () {
  44610. n._hasFocus = !1, n._onChange.fire(void 0)
  44611. }))), n
  44612. }
  44613. return r(t, e), t.prototype.hasFocus = function () {
  44614. return this._hasFocus
  44615. }, t
  44616. }(a.Disposable),
  44617. q = encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),
  44618. G = encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");
  44619. function Y(e) {
  44620. return q + encodeURIComponent(e.toString()) + G
  44621. }
  44622. var Z = encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),
  44623. $ = encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');
  44624. O.registerThemingParticipant((function (e, t) {
  44625. var n = e.getColor(N.editorErrorBorder);
  44626. n && t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double " + n + "; }");
  44627. var i = e.getColor(N.editorErrorForeground);
  44628. i && t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,' + Y(i) + '") repeat-x bottom left; }');
  44629. var o = e.getColor(N.editorWarningBorder)
  44630. ;o && t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double " + o + "; }");
  44631. var r = e.getColor(N.editorWarningForeground);
  44632. r && t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,' + Y(r) + '") repeat-x bottom left; }');
  44633. var s = e.getColor(N.editorInfoBorder);
  44634. s && t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double " + s + "; }");
  44635. var a = e.getColor(N.editorInfoForeground);
  44636. a && t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,' + Y(a) + '") repeat-x bottom left; }');
  44637. var l = e.getColor(N.editorHintBorder);
  44638. l && t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted " + l + "; }");
  44639. var u = e.getColor(N.editorHintForeground);
  44640. u && t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,' + (Z + encodeURIComponent(u.toString()) + $) + '") no-repeat bottom left; }');
  44641. var d = e.getColor(D.editorUnnecessaryCodeOpacity);
  44642. d && t.addRule(".monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: " + d.rgba.a + "; }")
  44643. ;var c = e.getColor(D.editorUnnecessaryCodeBorder);
  44644. c && t.addRule(".monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed " + c + "; }");
  44645. var h = e.getColor(N.editorForeground) || "inherit";
  44646. t.addRule(".monaco-editor .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: " + h + "}")
  44647. }))
  44648. })), define(n[564], i([0, 1, 419, 6, 28, 70, 53, 55, 2, 60, 12, 32, 33, 93, 13, 44, 110, 69, 18, 20, 14, 300]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b) {
  44649. "use strict";
  44650. Object.defineProperty(t, "__esModule", {value: !0});
  44651. var S = function () {
  44652. function e(e, t, n, i) {
  44653. this.originalLineStart = e, this.originalLineEnd = t, this.modifiedLineStart = n, this.modifiedLineEnd = i
  44654. }
  44655. return e.prototype.getType = function () {
  44656. return 0 === this.originalLineStart ? 1 : 0 === this.modifiedLineStart ? 2 : 0
  44657. }, e
  44658. }(), w = function (e) {
  44659. this.entries = e
  44660. }, E = function (e) {
  44661. function t(t) {
  44662. var r = e.call(this) || this;
  44663. return r._width = 0, r._diffEditor = t, r._isVisible = !1, r.shadow = o.createFastDomNode(document.createElement("div")), r.shadow.setClassName("diff-review-shadow"),
  44664. r.actionBarContainer = o.createFastDomNode(document.createElement("div")), r.actionBarContainer.setClassName("diff-review-actions"), r._actionBar = r._register(new s.ActionBar(r.actionBarContainer.domNode)), r._actionBar.push(new l.Action("diffreview.close", n.localize(0, null), "close-diff-review", !0, (function () {
  44665. return r.hide(), Promise.resolve(null)
  44666. })), {
  44667. label: !1,
  44668. icon: !0
  44669. }), r.domNode = o.createFastDomNode(document.createElement("div")), r.domNode.setClassName("diff-review monaco-editor-background"), r._content = o.createFastDomNode(document.createElement("div")), r._content.setClassName("diff-review-content"), r.scrollbar = r._register(new a.DomScrollableElement(r._content.domNode, {})), r.domNode.domNode.appendChild(r.scrollbar.getDomNode()), r._register(t.onDidUpdateDiff((function () {
  44670. r._isVisible && (r._diffs = r._compute(), r._render())
  44671. }))), r._register(t.getModifiedEditor().onDidChangeCursorPosition((function () {
  44672. r._isVisible && r._render()
  44673. }))), r._register(t.getOriginalEditor().onDidFocusEditorWidget((function () {
  44674. r._isVisible && r.hide()
  44675. }))),
  44676. r._register(t.getModifiedEditor().onDidFocusEditorWidget((function () {
  44677. r._isVisible && r.hide()
  44678. }))), r._register(i.addStandardDisposableListener(r.domNode.domNode, "click", (function (e) {
  44679. e.preventDefault();
  44680. var t = i.findParentWithClass(e.target, "diff-review-row");
  44681. t && r._goToRow(t)
  44682. }))), r._register(i.addStandardDisposableListener(r.domNode.domNode, "keydown", (function (e) {
  44683. (e.equals(18) || e.equals(2066) || e.equals(530)) && (e.preventDefault(), r._goToRow(r._getNextRow())), (e.equals(16) || e.equals(2064) || e.equals(528)) && (e.preventDefault(), r._goToRow(r._getPrevRow())), (e.equals(9) || e.equals(2057) || e.equals(521) || e.equals(1033)) && (e.preventDefault(), r.hide()), (e.equals(10) || e.equals(3)) && (e.preventDefault(), r.accept())
  44684. }))), r._diffs = [], r._currentDiff = null, r
  44685. }
  44686. return r(t, e), t.prototype.prev = function () {
  44687. var e = 0;
  44688. if (this._isVisible || (this._diffs = this._compute()), this._isVisible) {
  44689. for (var t = -1, n = 0, i = this._diffs.length; n < i; n++) if (this._diffs[n] === this._currentDiff) {
  44690. t = n;
  44691. break
  44692. }
  44693. e = this._diffs.length + t - 1
  44694. } else e = this._findDiffIndex(this._diffEditor.getPosition());
  44695. 0 !== this._diffs.length && (e %= this._diffs.length, this._diffEditor.setPosition(new f.Position(this._diffs[e].entries[0].modifiedLineStart, 1)), this._isVisible = !0, this._diffEditor.doLayout(), this._render(), this._goToRow(this._getNextRow()))
  44696. }, t.prototype.next = function () {
  44697. var e = 0;
  44698. if (this._isVisible || (this._diffs = this._compute()), this._isVisible) {
  44699. for (var t = -1, n = 0, i = this._diffs.length; n < i; n++) if (this._diffs[n] === this._currentDiff) {
  44700. t = n;
  44701. break
  44702. }
  44703. e = t + 1
  44704. } else e = this._findDiffIndex(this._diffEditor.getPosition());
  44705. 0 !== this._diffs.length && (e %= this._diffs.length, this._diffEditor.setPosition(new f.Position(this._diffs[e].entries[0].modifiedLineStart, 1)), this._isVisible = !0, this._diffEditor.doLayout(), this._render(), this._goToRow(this._getNextRow()))
  44706. }, t.prototype.accept = function () {
  44707. var e = -1, t = this._getCurrentFocusedRow();
  44708. if (t) {
  44709. var n = parseInt(t.getAttribute("data-line"), 10);
  44710. isNaN(n) || (e = n)
  44711. }
  44712. this.hide(), -1 !== e && (this._diffEditor.setPosition(new f.Position(e, 1)),
  44713. this._diffEditor.revealPosition(new f.Position(e, 1), 1))
  44714. }, t.prototype.hide = function () {
  44715. this._isVisible = !1, this._diffEditor.focus(), this._diffEditor.doLayout(), this._render()
  44716. }, t.prototype._getPrevRow = function () {
  44717. var e = this._getCurrentFocusedRow();
  44718. return e ? e.previousElementSibling ? e.previousElementSibling : e : this._getFirstRow()
  44719. }, t.prototype._getNextRow = function () {
  44720. var e = this._getCurrentFocusedRow();
  44721. return e ? e.nextElementSibling ? e.nextElementSibling : e : this._getFirstRow()
  44722. }, t.prototype._getFirstRow = function () {
  44723. return this.domNode.domNode.querySelector(".diff-review-row")
  44724. }, t.prototype._getCurrentFocusedRow = function () {
  44725. var e = document.activeElement;
  44726. return e && /diff-review-row/.test(e.className) ? e : null
  44727. }, t.prototype._goToRow = function (e) {
  44728. var t = this._getCurrentFocusedRow();
  44729. e.tabIndex = 0, e.focus(), t && t !== e && (t.tabIndex = -1), this.scrollbar.scanDomNode()
  44730. }, t.prototype.isVisible = function () {
  44731. return this._isVisible
  44732. }, t.prototype.layout = function (e, t, n) {
  44733. this._width = t, this.shadow.setTop(e - 6), this.shadow.setWidth(t),
  44734. this.shadow.setHeight(this._isVisible ? 6 : 0), this.domNode.setTop(e), this.domNode.setWidth(t), this.domNode.setHeight(n), this._content.setHeight(n), this._content.setWidth(t), this._isVisible ? (this.actionBarContainer.setAttribute("aria-hidden", "false"), this.actionBarContainer.setDisplay("block")) : (this.actionBarContainer.setAttribute("aria-hidden", "true"), this.actionBarContainer.setDisplay("none"))
  44735. }, t.prototype._compute = function () {
  44736. var e = this._diffEditor.getLineChanges();
  44737. if (!e || 0 === e.length) return [];
  44738. var n = this._diffEditor.getOriginalEditor().getModel(),
  44739. i = this._diffEditor.getModifiedEditor().getModel();
  44740. return n && i ? t._mergeAdjacent(e, n.getLineCount(), i.getLineCount()) : []
  44741. }, t._mergeAdjacent = function (e, t, n) {
  44742. if (!e || 0 === e.length) return [];
  44743. for (var i = [], o = 0, r = 0, s = e.length; r < s; r++) {
  44744. var a = e[r], l = a.originalStartLineNumber, u = a.originalEndLineNumber,
  44745. d = a.modifiedStartLineNumber, c = a.modifiedEndLineNumber, h = [], p = 0,
  44746. g = 0 === u ? l : l - 1, f = 0 === c ? d : d - 1, m = 1, v = 1;
  44747. if (r > 0) {
  44748. var _ = e[r - 1]
  44749. ;m = 0 === _.originalEndLineNumber ? _.originalStartLineNumber + 1 : _.originalEndLineNumber + 1, v = 0 === _.modifiedEndLineNumber ? _.modifiedStartLineNumber + 1 : _.modifiedEndLineNumber + 1
  44750. }
  44751. var y = g - 3 + 1, C = f - 3 + 1;
  44752. if (y < m) y += x = m - y, C += x;
  44753. if (C < v) y += x = v - C, C += x;
  44754. h[p++] = new S(y, g, C, f), 0 !== u && (h[p++] = new S(l, u, 0, 0)), 0 !== c && (h[p++] = new S(0, 0, d, c));
  44755. var b = 0 === u ? l + 1 : u + 1, E = 0 === c ? d + 1 : c + 1, L = t, D = n;
  44756. if (r + 1 < s) {
  44757. var N = e[r + 1];
  44758. L = 0 === N.originalEndLineNumber ? N.originalStartLineNumber : N.originalStartLineNumber - 1, D = 0 === N.modifiedEndLineNumber ? N.modifiedStartLineNumber : N.modifiedStartLineNumber - 1
  44759. }
  44760. var x, I = b + 3 - 1, M = E + 3 - 1;
  44761. if (I > L) I += x = L - I, M += x;
  44762. if (M > D) I += x = D - M, M += x;
  44763. h[p++] = new S(b, I, E, M), i[o++] = new w(h)
  44764. }
  44765. var k = i[0].entries, T = [], R = 0;
  44766. for (r = 1, s = i.length; r < s; r++) {
  44767. var O = i[r].entries, P = k[k.length - 1], A = O[0];
  44768. 0 === P.getType() && 0 === A.getType() && A.originalLineStart <= P.originalLineEnd ? (k[k.length - 1] = new S(P.originalLineStart, A.originalLineEnd, P.modifiedLineStart, A.modifiedLineEnd), k = k.concat(O.slice(1))) : (T[R++] = new w(k), k = O)
  44769. }
  44770. return T[R++] = new w(k), T
  44771. },
  44772. t.prototype._findDiffIndex = function (e) {
  44773. for (var t = e.lineNumber, n = 0, i = this._diffs.length; n < i; n++) {
  44774. var o = this._diffs[n].entries;
  44775. if (t <= o[o.length - 1].modifiedLineEnd) return n
  44776. }
  44777. return 0
  44778. }, t.prototype._render = function () {
  44779. var e = this._diffEditor.getOriginalEditor().getOptions(),
  44780. o = this._diffEditor.getModifiedEditor().getOptions(),
  44781. r = this._diffEditor.getOriginalEditor().getModel(),
  44782. s = this._diffEditor.getModifiedEditor().getModel(), a = r.getOptions(), l = s.getOptions();
  44783. if (!this._isVisible || !r || !s) return i.clearNode(this._content.domNode), this._currentDiff = null, void this.scrollbar.scanDomNode();
  44784. var u = this._findDiffIndex(this._diffEditor.getPosition());
  44785. if (this._diffs[u] !== this._currentDiff) {
  44786. this._currentDiff = this._diffs[u];
  44787. var c = this._diffs[u].entries, h = document.createElement("div");
  44788. h.className = "diff-review-table", h.setAttribute("role", "list"), d.Configuration.applyFontInfoSlow(h, o.get(34));
  44789. for (var p = 0, g = 0, f = 0, m = 0, v = 0, _ = c.length; v < _; v++) {
  44790. var y = (k = c[v]).originalLineStart, C = k.originalLineEnd, b = k.modifiedLineStart,
  44791. S = k.modifiedLineEnd
  44792. ;0 !== y && (0 === p || y < p) && (p = y), 0 !== C && (0 === g || C > g) && (g = C), 0 !== b && (0 === f || b < f) && (f = b), 0 !== S && (0 === m || S > m) && (m = S)
  44793. }
  44794. var w = document.createElement("div");
  44795. w.className = "diff-review-row";
  44796. var E = document.createElement("div");
  44797. E.className = "diff-review-cell diff-review-summary";
  44798. var L = g - p + 1, D = m - f + 1;
  44799. E.appendChild(document.createTextNode(u + 1 + "/" + this._diffs.length + ": @@ -" + p + "," + L + " +" + f + "," + D + " @@")), w.setAttribute("data-line", String(f));
  44800. var N = function (e) {
  44801. return 0 === e ? n.localize(1, null) : 1 === e ? n.localize(2, null) : n.localize(3, null, e)
  44802. }, x = N(L), I = N(D);
  44803. w.setAttribute("aria-label", n.localize(4, null, u + 1, this._diffs.length, p, x, f, I)), w.appendChild(E), w.setAttribute("role", "listitem"), h.appendChild(w);
  44804. var M = f;
  44805. for (v = 0, _ = c.length; v < _; v++) {
  44806. var k = c[v];
  44807. t._renderSection(h, k, M, this._width, e, r, a, o, s, l), 0 !== k.modifiedLineStart && (M = k.modifiedLineEnd)
  44808. }
  44809. i.clearNode(this._content.domNode), this._content.domNode.appendChild(h), this.scrollbar.scanDomNode()
  44810. }
  44811. }, t._renderSection = function (e, t, i, o, r, s, a, l, u, d) {
  44812. var c = t.getType(), h = "diff-review-row", p = "", g = "diff-review-spacer";
  44813. switch (c) {
  44814. case 1:
  44815. h = "diff-review-row line-insert", p = " char-insert", g = "diff-review-spacer insert-sign";
  44816. break;
  44817. case 2:
  44818. h = "diff-review-row line-delete", p = " char-delete", g = "diff-review-spacer delete-sign"
  44819. }
  44820. for (var f = t.originalLineStart, m = t.originalLineEnd, v = t.modifiedLineStart, _ = t.modifiedLineEnd, y = Math.max(_ - v, m - f), C = r.get(107), b = C.glyphMarginWidth + C.lineNumbersWidth, S = l.get(107), w = 10 + S.glyphMarginWidth + S.lineNumbersWidth, E = 0; E <= y; E++) {
  44821. var L = 0 === f ? 0 : f + E, D = 0 === v ? 0 : v + E, N = document.createElement("div");
  44822. N.style.minWidth = o + "px", N.className = h, N.setAttribute("role", "listitem"), 0 !== D && (i = D), N.setAttribute("data-line", String(i));
  44823. var x = document.createElement("div");
  44824. x.className = "diff-review-cell", N.appendChild(x);
  44825. var I = document.createElement("span");
  44826. I.style.width = b + "px", I.style.minWidth = b + "px", I.className = "diff-review-line-number" + p, 0 !== L ? I.appendChild(document.createTextNode(String(L))) : I.innerHTML = "&#160;", x.appendChild(I);
  44827. var M = document.createElement("span")
  44828. ;M.style.width = w + "px", M.style.minWidth = w + "px", M.style.paddingRight = "10px", M.className = "diff-review-line-number" + p, 0 !== D ? M.appendChild(document.createTextNode(String(D))) : M.innerHTML = "&#160;", x.appendChild(M);
  44829. var k = document.createElement("span");
  44830. k.className = g, k.innerHTML = "&#160;&#160;", x.appendChild(k);
  44831. var T = void 0;
  44832. 0 !== D ? (x.insertAdjacentHTML("beforeend", this._renderLine(u, l, d.tabSize, D)), T = u.getLineContent(D)) : (x.insertAdjacentHTML("beforeend", this._renderLine(s, r, a.tabSize, L)), T = s.getLineContent(L)), 0 === T.length && (T = n.localize(5, null));
  44833. var R = "";
  44834. switch (c) {
  44835. case 0:
  44836. R = n.localize(6, null, L, D, T);
  44837. break;
  44838. case 1:
  44839. R = n.localize(7, null, D, T);
  44840. break;
  44841. case 2:
  44842. R = n.localize(8, null, L, T)
  44843. }
  44844. N.setAttribute("aria-label", R), e.appendChild(N)
  44845. }
  44846. }, t._renderLine = function (e, t, n, i) {
  44847. var o = e.getLineContent(i), r = t.get(34), s = new Uint32Array(2);
  44848. s[0] = o.length, s[1] = 16793600;
  44849. var a = new g.LineTokens(s, o),
  44850. l = _.ViewLineRenderingData.isBasicASCII(o, e.mightContainNonBasicASCII()),
  44851. u = _.ViewLineRenderingData.containsRTL(o, l, e.mightContainRTL())
  44852. ;
  44853. return v.renderViewLine2(new v.RenderLineInput(r.isMonospace && !t.get(23), r.canUseHalfwidthRightwardsArrow, o, !1, l, u, 0, a, [], n, 0, r.spaceWidth, r.middotWidth, t.get(88), t.get(74), t.get(69), t.get(35) !== p.EditorFontLigatures.OFF, null)).html
  44854. }, t
  44855. }(u.Disposable);
  44856. t.DiffReview = E, b.registerThemingParticipant((function (e, t) {
  44857. var n = e.getColor(m.editorLineNumbers);
  44858. n && t.addRule(".monaco-diff-editor .diff-review-line-number { color: " + n + "; }");
  44859. var i = e.getColor(C.scrollbarShadow);
  44860. i && t.addRule(".monaco-diff-editor .diff-review-shadow { box-shadow: " + i + " 0 -6px 6px -6px inset; }")
  44861. }));
  44862. var L = function (e) {
  44863. function t() {
  44864. return e.call(this, {
  44865. id: "editor.action.diffReview.next",
  44866. label: n.localize(9, null),
  44867. alias: "Go to Next Difference",
  44868. precondition: y.ContextKeyExpr.has("isInDiffEditor"),
  44869. kbOpts: {kbExpr: null, primary: 65, weight: 100}
  44870. }) || this
  44871. }
  44872. return r(t, e), t.prototype.run = function (e, t) {
  44873. var n = N(e);
  44874. n && n.diffReviewNext()
  44875. }, t
  44876. }(c.EditorAction), D = function (e) {
  44877. function t() {
  44878. return e.call(this, {
  44879. id: "editor.action.diffReview.prev",
  44880. label: n.localize(10, null),
  44881. alias: "Go to Previous Difference",
  44882. precondition: y.ContextKeyExpr.has("isInDiffEditor"),
  44883. kbOpts: {kbExpr: null, primary: 1089, weight: 100}
  44884. }) || this
  44885. }
  44886. return r(t, e), t.prototype.run = function (e, t) {
  44887. var n = N(e);
  44888. n && n.diffReviewPrev()
  44889. }, t
  44890. }(c.EditorAction);
  44891. function N(e) {
  44892. for (var t = e.get(h.ICodeEditorService).listDiffEditors(), n = 0, i = t.length; n < i; n++) {
  44893. var o = t[n];
  44894. if (o.hasWidgetFocus()) return o
  44895. }
  44896. return null
  44897. }
  44898. c.registerEditorAction(L), c.registerEditorAction(D)
  44899. })), define(n[230], i([0, 1, 418, 6, 28, 104, 15, 4, 2, 31, 60, 67, 32, 121, 564, 33, 3, 106, 68, 30, 62, 193, 148, 110, 69, 18, 11, 115, 35, 20, 14, 66, 421, 12, 10, 73, 185, 299]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F, W, B) {
  44900. "use strict";
  44901. Object.defineProperty(t, "__esModule", {value: !0});
  44902. var V = function () {
  44903. function e(e, t) {
  44904. this._contextMenuService = e, this._clipboardService = t, this._zones = [], this.inlineDiffMargins = [], this._zonesMap = {}, this._decorations = []
  44905. }
  44906. return e.prototype.getForeignViewZones = function (e) {
  44907. var t = this;
  44908. return e.filter((function (e) {
  44909. return !t._zonesMap[String(e.id)]
  44910. }))
  44911. },
  44912. e.prototype.clean = function (e) {
  44913. var t = this;
  44914. this._zones.length > 0 && e.changeViewZones((function (e) {
  44915. for (var n = 0, i = t._zones.length; n < i; n++) e.removeZone(t._zones[n])
  44916. })), this._zones = [], this._zonesMap = {}, this._decorations = e.deltaDecorations(this._decorations, [])
  44917. }, e.prototype.apply = function (e, t, n, i) {
  44918. var o = this, r = i ? p.StableEditorScrollState.capture(e) : null;
  44919. e.changeViewZones((function (t) {
  44920. for (var i = 0, r = o._zones.length; i < r; i++) t.removeZone(o._zones[i]);
  44921. i = 0;
  44922. for (var s = o.inlineDiffMargins.length; i < s; i++) o.inlineDiffMargins[i].dispose();
  44923. o._zones = [], o._zonesMap = {}, o.inlineDiffMargins = [];
  44924. i = 0;
  44925. for (var a = n.zones.length; i < a; i++) {
  44926. var l = n.zones[i];
  44927. l.suppressMouseDown = !0;
  44928. var u = t.addZone(l);
  44929. o._zones.push(u), o._zonesMap[String(u)] = !0, n.zones[i].diff && l.marginDomNode && o._clipboardService && (l.suppressMouseDown = !1, o.inlineDiffMargins.push(new P.InlineDiffMargin(u, l.marginDomNode, e, n.zones[i].diff, o._contextMenuService, o._clipboardService)))
  44930. }
  44931. })), r && r.restore(e), this._decorations = e.deltaDecorations(this._decorations, n.decorations),
  44932. t && t.setZones(n.overviewZones)
  44933. }, e
  44934. }(), z = 0, H = function (e) {
  44935. function t(n, r, s, u, d, c, h, p, g, f, m) {
  44936. var _ = e.call(this) || this;
  44937. _._editorProgressService = m, _._onDidDispose = _._register(new l.Emitter), _.onDidDispose = _._onDidDispose.event, _._onDidUpdateDiff = _._register(new l.Emitter), _.onDidUpdateDiff = _._onDidUpdateDiff.event, _._lastOriginalWarning = null, _._lastModifiedWarning = null, _._editorWorkerService = u, _._codeEditorService = h, _._contextKeyService = _._register(d.createScoped(n)), _._contextKeyService.createKey("isInDiffEditor", !0), _._themeService = p, _._notificationService = g, _.id = ++z, _._state = 0, _._updatingDiffProgress = null, _._domElement = n, r = r || {}, _._renderSideBySide = !0, void 0 !== r.renderSideBySide && (_._renderSideBySide = r.renderSideBySide), _._maxComputationTime = 5e3, void 0 !== r.maxComputationTime && (_._maxComputationTime = r.maxComputationTime), _._ignoreTrimWhitespace = !0, void 0 !== r.ignoreTrimWhitespace && (_._ignoreTrimWhitespace = r.ignoreTrimWhitespace), _._renderIndicators = !0,
  44938. void 0 !== r.renderIndicators && (_._renderIndicators = r.renderIndicators), _._originalIsEditable = !1, void 0 !== r.originalEditable && (_._originalIsEditable = Boolean(r.originalEditable)), _._updateDecorationsRunner = _._register(new a.RunOnceScheduler((function () {
  44939. return _._updateDecorations()
  44940. }), 0)), _._containerDomElement = document.createElement("div"), _._containerDomElement.className = t._getClassName(_._themeService.getTheme(), _._renderSideBySide), _._containerDomElement.style.position = "relative", _._containerDomElement.style.height = "100%", _._domElement.appendChild(_._containerDomElement), _._overviewViewportDomElement = o.createFastDomNode(document.createElement("div")), _._overviewViewportDomElement.setClassName("diffViewport"), _._overviewViewportDomElement.setPosition("absolute"), _._overviewDomElement = document.createElement("div"), _._overviewDomElement.className = "diffOverview", _._overviewDomElement.style.position = "absolute", _._overviewDomElement.appendChild(_._overviewViewportDomElement.domNode),
  44941. _._register(i.addStandardDisposableListener(_._overviewDomElement, "mousedown", (function (e) {
  44942. _.modifiedEditor.delegateVerticalScrollbarMouseDown(e)
  44943. }))), _._containerDomElement.appendChild(_._overviewDomElement), _._originalDomNode = document.createElement("div"), _._originalDomNode.className = "editor original", _._originalDomNode.style.position = "absolute", _._originalDomNode.style.height = "100%", _._containerDomElement.appendChild(_._originalDomNode), _._modifiedDomNode = document.createElement("div"), _._modifiedDomNode.className = "editor modified", _._modifiedDomNode.style.position = "absolute", _._modifiedDomNode.style.height = "100%", _._containerDomElement.appendChild(_._modifiedDomNode), _._beginUpdateDecorationsTimeout = -1, _._currentlyChangingViewZones = !1, _._diffComputationToken = 0, _._originalEditorState = new V(f, s), _._modifiedEditorState = new V(f, s), _._isVisible = !0, _._isHandlingScrollEvent = !1, _._elementSizeObserver = _._register(new B.ElementSizeObserver(_._containerDomElement, void 0, (function () {
  44944. return _._onDidContainerSizeChanged()
  44945. }))), r.automaticLayout && _._elementSizeObserver.startObserving(), _._diffComputationResult = null;
  44946. var y = _._contextKeyService.createScoped();
  44947. y.createKey("isInDiffLeftEditor", !0);
  44948. var C = new M.ServiceCollection;
  44949. C.set(x.IContextKeyService, y);
  44950. var b = c.createChild(C), S = _._contextKeyService.createScoped();
  44951. S.createKey("isInDiffRightEditor", !0);
  44952. var w = new M.ServiceCollection;
  44953. w.set(x.IContextKeyService, S);
  44954. var E = c.createChild(w);
  44955. _.originalEditor = _._createLeftHandSideEditor(r, b), _.modifiedEditor = _._createRightHandSideEditor(r, E), _._originalOverviewRuler = null, _._modifiedOverviewRuler = null, _._reviewPane = new v.DiffReview(_), _._containerDomElement.appendChild(_._reviewPane.domNode.domNode), _._containerDomElement.appendChild(_._reviewPane.shadow.domNode), _._containerDomElement.appendChild(_._reviewPane.actionBarContainer.domNode), _._enableSplitViewResizing = !0, void 0 !== r.enableSplitViewResizing && (_._enableSplitViewResizing = r.enableSplitViewResizing),
  44956. _._renderSideBySide ? _._setStrategy(new Y(_._createDataSource(), _._enableSplitViewResizing)) : _._setStrategy(new $(_._createDataSource(), _._enableSplitViewResizing)), _._register(p.onThemeChange((function (e) {
  44957. _._strategy && _._strategy.applyColors(e) && _._updateDecorationsRunner.schedule(), _._containerDomElement.className = t._getClassName(_._themeService.getTheme(), _._renderSideBySide)
  44958. })));
  44959. for (var L = 0, D = A.EditorExtensionsRegistry.getDiffEditorContributions(); L < D.length; L++) {
  44960. var N = D[L];
  44961. try {
  44962. _._register(c.createInstance(N.ctor, _))
  44963. } catch (e) {
  44964. F.onUnexpectedError(e)
  44965. }
  44966. }
  44967. return _._codeEditorService.addDiffEditor(_), _
  44968. }
  44969. return r(t, e), t.prototype._setState = function (e) {
  44970. this._state !== e && (this._state = e, this._updatingDiffProgress && (this._updatingDiffProgress.done(), this._updatingDiffProgress = null), 1 === this._state && (this._updatingDiffProgress = this._editorProgressService.show(!0, 1e3)))
  44971. }, t.prototype.hasWidgetFocus = function () {
  44972. return i.isAncestor(document.activeElement, this._domElement)
  44973. }, t.prototype.diffReviewNext = function () {
  44974. this._reviewPane.next()
  44975. }, t.prototype.diffReviewPrev = function () {
  44976. this._reviewPane.prev()
  44977. }, t._getClassName = function (e, t) {
  44978. var n = "monaco-diff-editor monaco-editor-background ";
  44979. return t && (n += "side-by-side "), n += R.getThemeTypeSelector(e.type)
  44980. }, t.prototype._recreateOverviewRulers = function () {
  44981. this._originalOverviewRuler && (this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()), this._originalOverviewRuler.dispose()), this.originalEditor.hasModel() && (this._originalOverviewRuler = this.originalEditor.createOverviewRuler("original diffOverviewRuler"), this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())), this._modifiedOverviewRuler && (this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()), this._modifiedOverviewRuler.dispose()), this.modifiedEditor.hasModel() && (this._modifiedOverviewRuler = this.modifiedEditor.createOverviewRuler("modified diffOverviewRuler"), this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),
  44982. this._layoutOverviewRulers()
  44983. }, t.prototype._createLeftHandSideEditor = function (e, t) {
  44984. var n = this,
  44985. i = this._createInnerEditor(t, this._originalDomNode, this._adjustOptionsForLeftHandSide(e, this._originalIsEditable));
  44986. return this._register(i.onDidScrollChange((function (e) {
  44987. n._isHandlingScrollEvent || (e.scrollTopChanged || e.scrollLeftChanged || e.scrollHeightChanged) && (n._isHandlingScrollEvent = !0, n.modifiedEditor.setScrollPosition({
  44988. scrollLeft: e.scrollLeft,
  44989. scrollTop: e.scrollTop
  44990. }), n._isHandlingScrollEvent = !1, n._layoutOverviewViewport())
  44991. }))), this._register(i.onDidChangeViewZones((function () {
  44992. n._onViewZonesChanged()
  44993. }))), this._register(i.onDidChangeModelContent((function () {
  44994. n._isVisible && n._beginUpdateDecorationsSoon()
  44995. }))), i
  44996. }, t.prototype._createRightHandSideEditor = function (e, t) {
  44997. var n = this,
  44998. i = this._createInnerEditor(t, this._modifiedDomNode, this._adjustOptionsForRightHandSide(e));
  44999. return this._register(i.onDidScrollChange((function (e) {
  45000. n._isHandlingScrollEvent || (e.scrollTopChanged || e.scrollLeftChanged || e.scrollHeightChanged) && (n._isHandlingScrollEvent = !0, n.originalEditor.setScrollPosition({
  45001. scrollLeft: e.scrollLeft,
  45002. scrollTop: e.scrollTop
  45003. }), n._isHandlingScrollEvent = !1, n._layoutOverviewViewport())
  45004. }))), this._register(i.onDidChangeViewZones((function () {
  45005. n._onViewZonesChanged()
  45006. }))), this._register(i.onDidChangeConfiguration((function (e) {
  45007. e.hasChanged(34) && i.getModel() && n._onViewZonesChanged()
  45008. }))), this._register(i.onDidChangeModelContent((function () {
  45009. n._isVisible && n._beginUpdateDecorationsSoon()
  45010. }))), this._register(i.onDidChangeModelOptions((function (e) {
  45011. e.tabSize && n._updateDecorationsRunner.schedule()
  45012. }))), i
  45013. }, t.prototype._createInnerEditor = function (e, t, n) {
  45014. return e.createInstance(m.CodeEditorWidget, t, n, {})
  45015. }, t.prototype.dispose = function () {
  45016. this._codeEditorService.removeDiffEditor(this), -1 !== this._beginUpdateDecorationsTimeout && (window.clearTimeout(this._beginUpdateDecorationsTimeout), this._beginUpdateDecorationsTimeout = -1),
  45017. this._cleanViewZonesAndDecorations(), this._originalOverviewRuler && (this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()), this._originalOverviewRuler.dispose()), this._modifiedOverviewRuler && (this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()), this._modifiedOverviewRuler.dispose()), this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode), this._containerDomElement.removeChild(this._overviewDomElement), this._containerDomElement.removeChild(this._originalDomNode), this.originalEditor.dispose(), this._containerDomElement.removeChild(this._modifiedDomNode), this.modifiedEditor.dispose(), this._strategy.dispose(), this._containerDomElement.removeChild(this._reviewPane.domNode.domNode), this._containerDomElement.removeChild(this._reviewPane.shadow.domNode), this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode), this._reviewPane.dispose(), this._domElement.removeChild(this._containerDomElement), this._onDidDispose.fire(),
  45018. e.prototype.dispose.call(this)
  45019. }, t.prototype.getId = function () {
  45020. return this.getEditorType() + ":" + this.id
  45021. }, t.prototype.getEditorType = function () {
  45022. return b.EditorType.IDiffEditor
  45023. }, t.prototype.getLineChanges = function () {
  45024. return this._diffComputationResult ? this._diffComputationResult.changes : null
  45025. }, t.prototype.getOriginalEditor = function () {
  45026. return this.originalEditor
  45027. }, t.prototype.getModifiedEditor = function () {
  45028. return this.modifiedEditor
  45029. }, t.prototype.updateOptions = function (e) {
  45030. var n = !1;
  45031. void 0 !== e.renderSideBySide && this._renderSideBySide !== e.renderSideBySide && (this._renderSideBySide = e.renderSideBySide, n = !0), void 0 !== e.maxComputationTime && (this._maxComputationTime = e.maxComputationTime, this._isVisible && this._beginUpdateDecorationsSoon());
  45032. var i = !1;
  45033. void 0 !== e.ignoreTrimWhitespace && this._ignoreTrimWhitespace !== e.ignoreTrimWhitespace && (this._ignoreTrimWhitespace = e.ignoreTrimWhitespace, i = !0), void 0 !== e.renderIndicators && this._renderIndicators !== e.renderIndicators && (this._renderIndicators = e.renderIndicators, i = !0),
  45034. i && this._beginUpdateDecorations(), void 0 !== e.originalEditable && (this._originalIsEditable = Boolean(e.originalEditable)), this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)), this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e, this._originalIsEditable)), void 0 !== e.enableSplitViewResizing && (this._enableSplitViewResizing = e.enableSplitViewResizing), this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing), n && (this._renderSideBySide ? this._setStrategy(new Y(this._createDataSource(), this._enableSplitViewResizing)) : this._setStrategy(new $(this._createDataSource(), this._enableSplitViewResizing)), this._containerDomElement.className = t._getClassName(this._themeService.getTheme(), this._renderSideBySide))
  45035. }, t.prototype.getModel = function () {
  45036. return {original: this.originalEditor.getModel(), modified: this.modifiedEditor.getModel()}
  45037. }, t.prototype.setModel = function (e) {
  45038. if (e && (!e.original || !e.modified)) throw new Error(e.original ? "DiffEditorWidget.setModel: Modified model is null" : "DiffEditorWidget.setModel: Original model is null");
  45039. this._cleanViewZonesAndDecorations(), this.originalEditor.setModel(e ? e.original : null), this.modifiedEditor.setModel(e ? e.modified : null), this._updateDecorationsRunner.cancel(), e && (this.originalEditor.setScrollTop(0), this.modifiedEditor.setScrollTop(0)), this._diffComputationResult = null, this._diffComputationToken++, this._setState(0), e && (this._recreateOverviewRulers(), this._beginUpdateDecorations()), this._layoutOverviewViewport()
  45040. }, t.prototype.getDomNode = function () {
  45041. return this._domElement
  45042. }, t.prototype.getVisibleColumnFromPosition = function (e) {
  45043. return this.modifiedEditor.getVisibleColumnFromPosition(e)
  45044. }, t.prototype.getPosition = function () {
  45045. return this.modifiedEditor.getPosition()
  45046. }, t.prototype.setPosition = function (e) {
  45047. this.modifiedEditor.setPosition(e)
  45048. }, t.prototype.revealLine = function (e, t) {
  45049. void 0 === t && (t = 0), this.modifiedEditor.revealLine(e, t)
  45050. },
  45051. t.prototype.revealLineInCenter = function (e, t) {
  45052. void 0 === t && (t = 0), this.modifiedEditor.revealLineInCenter(e, t)
  45053. }, t.prototype.revealLineInCenterIfOutsideViewport = function (e, t) {
  45054. void 0 === t && (t = 0), this.modifiedEditor.revealLineInCenterIfOutsideViewport(e, t)
  45055. }, t.prototype.revealPosition = function (e, t) {
  45056. void 0 === t && (t = 0), this.modifiedEditor.revealPosition(e, t)
  45057. }, t.prototype.revealPositionInCenter = function (e, t) {
  45058. void 0 === t && (t = 0), this.modifiedEditor.revealPositionInCenter(e, t)
  45059. }, t.prototype.revealPositionInCenterIfOutsideViewport = function (e, t) {
  45060. void 0 === t && (t = 0), this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e, t)
  45061. }, t.prototype.getSelection = function () {
  45062. return this.modifiedEditor.getSelection()
  45063. }, t.prototype.getSelections = function () {
  45064. return this.modifiedEditor.getSelections()
  45065. }, t.prototype.setSelection = function (e) {
  45066. this.modifiedEditor.setSelection(e)
  45067. }, t.prototype.setSelections = function (e) {
  45068. this.modifiedEditor.setSelections(e)
  45069. }, t.prototype.revealLines = function (e, t, n) {
  45070. void 0 === n && (n = 0), this.modifiedEditor.revealLines(e, t, n)
  45071. },
  45072. t.prototype.revealLinesInCenter = function (e, t, n) {
  45073. void 0 === n && (n = 0), this.modifiedEditor.revealLinesInCenter(e, t, n)
  45074. }, t.prototype.revealLinesInCenterIfOutsideViewport = function (e, t, n) {
  45075. void 0 === n && (n = 0), this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e, t, n)
  45076. }, t.prototype.revealRange = function (e, t, n, i) {
  45077. void 0 === t && (t = 0), void 0 === n && (n = !1), void 0 === i && (i = !0), this.modifiedEditor.revealRange(e, t, n, i)
  45078. }, t.prototype.revealRangeInCenter = function (e, t) {
  45079. void 0 === t && (t = 0), this.modifiedEditor.revealRangeInCenter(e, t)
  45080. }, t.prototype.revealRangeInCenterIfOutsideViewport = function (e, t) {
  45081. void 0 === t && (t = 0), this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e, t)
  45082. }, t.prototype.revealRangeAtTop = function (e, t) {
  45083. void 0 === t && (t = 0), this.modifiedEditor.revealRangeAtTop(e, t)
  45084. }, t.prototype.getSupportedActions = function () {
  45085. return this.modifiedEditor.getSupportedActions()
  45086. }, t.prototype.saveViewState = function () {
  45087. return {original: this.originalEditor.saveViewState(), modified: this.modifiedEditor.saveViewState()}
  45088. },
  45089. t.prototype.restoreViewState = function (e) {
  45090. if (e.original && e.modified) {
  45091. var t = e;
  45092. this.originalEditor.restoreViewState(t.original), this.modifiedEditor.restoreViewState(t.modified)
  45093. }
  45094. }, t.prototype.layout = function (e) {
  45095. this._elementSizeObserver.observe(e)
  45096. }, t.prototype.focus = function () {
  45097. this.modifiedEditor.focus()
  45098. }, t.prototype.hasTextFocus = function () {
  45099. return this.originalEditor.hasTextFocus() || this.modifiedEditor.hasTextFocus()
  45100. }, t.prototype.trigger = function (e, t, n) {
  45101. this.modifiedEditor.trigger(e, t, n)
  45102. }, t.prototype.changeDecorations = function (e) {
  45103. return this.modifiedEditor.changeDecorations(e)
  45104. }, t.prototype._onDidContainerSizeChanged = function () {
  45105. this._doLayout()
  45106. }, t.prototype._getReviewHeight = function () {
  45107. return this._reviewPane.isVisible() ? this._elementSizeObserver.getHeight() : 0
  45108. }, t.prototype._layoutOverviewRulers = function () {
  45109. if (this._originalOverviewRuler && this._modifiedOverviewRuler) {
  45110. var e = this._elementSizeObserver.getHeight(), n = this._getReviewHeight(),
  45111. i = t.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * t.ONE_OVERVIEW_WIDTH
  45112. ;this.modifiedEditor.getLayoutInfo() && (this._originalOverviewRuler.setLayout({
  45113. top: 0,
  45114. width: t.ONE_OVERVIEW_WIDTH,
  45115. right: i + t.ONE_OVERVIEW_WIDTH,
  45116. height: e - n
  45117. }), this._modifiedOverviewRuler.setLayout({
  45118. top: 0,
  45119. right: 0,
  45120. width: t.ONE_OVERVIEW_WIDTH,
  45121. height: e - n
  45122. }))
  45123. }
  45124. }, t.prototype._onViewZonesChanged = function () {
  45125. this._currentlyChangingViewZones || this._updateDecorationsRunner.schedule()
  45126. }, t.prototype._beginUpdateDecorationsSoon = function () {
  45127. var e = this;
  45128. -1 !== this._beginUpdateDecorationsTimeout && (window.clearTimeout(this._beginUpdateDecorationsTimeout), this._beginUpdateDecorationsTimeout = -1), this._beginUpdateDecorationsTimeout = window.setTimeout((function () {
  45129. return e._beginUpdateDecorations()
  45130. }), t.UPDATE_DIFF_DECORATIONS_DELAY)
  45131. }, t._equals = function (e, t) {
  45132. return !e && !t || !(!e || !t) && e.toString() === t.toString()
  45133. }, t.prototype._beginUpdateDecorations = function () {
  45134. var e = this;
  45135. this._beginUpdateDecorationsTimeout = -1;
  45136. var i = this.originalEditor.getModel(), o = this.modifiedEditor.getModel();
  45137. if (i && o) {
  45138. this._diffComputationToken++;
  45139. var r = this._diffComputationToken
  45140. ;this._setState(1), this._editorWorkerService.canComputeDiff(i.uri, o.uri) ? this._editorWorkerService.computeDiff(i.uri, o.uri, this._ignoreTrimWhitespace, this._maxComputationTime).then((function (t) {
  45141. r === e._diffComputationToken && i === e.originalEditor.getModel() && o === e.modifiedEditor.getModel() && (e._setState(2), e._diffComputationResult = t, e._updateDecorationsRunner.schedule(), e._onDidUpdateDiff.fire())
  45142. }), (function (t) {
  45143. r === e._diffComputationToken && i === e.originalEditor.getModel() && o === e.modifiedEditor.getModel() && (e._setState(2), e._diffComputationResult = null, e._updateDecorationsRunner.schedule())
  45144. })) : t._equals(i.uri, this._lastOriginalWarning) && t._equals(o.uri, this._lastModifiedWarning) || (this._lastOriginalWarning = i.uri, this._lastModifiedWarning = o.uri, this._notificationService.warn(n.localize(0, null)))
  45145. }
  45146. }, t.prototype._cleanViewZonesAndDecorations = function () {
  45147. this._originalEditorState.clean(this.originalEditor), this._modifiedEditorState.clean(this.modifiedEditor)
  45148. }, t.prototype._updateDecorations = function () {
  45149. if (this.originalEditor.getModel() && this.modifiedEditor.getModel() && this._originalOverviewRuler && this._modifiedOverviewRuler) {
  45150. var e = this._diffComputationResult ? this._diffComputationResult.changes : [],
  45151. t = this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),
  45152. n = this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),
  45153. i = this._strategy.getEditorsDiffDecorations(e, this._ignoreTrimWhitespace, this._renderIndicators, t, n, this.originalEditor, this.modifiedEditor);
  45154. try {
  45155. this._currentlyChangingViewZones = !0, this._originalEditorState.apply(this.originalEditor, this._originalOverviewRuler, i.original, !1), this._modifiedEditorState.apply(this.modifiedEditor, this._modifiedOverviewRuler, i.modified, !0)
  45156. } finally {
  45157. this._currentlyChangingViewZones = !1
  45158. }
  45159. }
  45160. }, t.prototype._adjustOptionsForSubEditor = function (e) {
  45161. var t = d.deepClone(e || {});
  45162. return t.inDiffEditor = !0, t.wordWrap = "off", t.wordWrapMinified = !1, t.automaticLayout = !1, t.scrollbar = t.scrollbar || {}, t.scrollbar.vertical = "visible", t.folding = !1,
  45163. t.codeLens = !1, t.fixedOverflowWidgets = !0, t.minimap || (t.minimap = {}), t.minimap.enabled = !1, t
  45164. }, t.prototype._adjustOptionsForLeftHandSide = function (e, t) {
  45165. var n = this._adjustOptionsForSubEditor(e);
  45166. return n.readOnly = !t, n.extraEditorClassName = "original-in-monaco-diff-editor", n
  45167. }, t.prototype._adjustOptionsForRightHandSide = function (e) {
  45168. var n = this._adjustOptionsForSubEditor(e);
  45169. return n.revealHorizontalRightPadding = _.EditorOptions.revealHorizontalRightPadding.defaultValue + t.ENTIRE_DIFF_OVERVIEW_WIDTH, n.scrollbar.verticalHasArrows = !1, n.extraEditorClassName = "modified-in-monaco-diff-editor", n
  45170. }, t.prototype.doLayout = function () {
  45171. this._elementSizeObserver.observe(), this._doLayout()
  45172. }, t.prototype._doLayout = function () {
  45173. var e = this._elementSizeObserver.getWidth(), n = this._elementSizeObserver.getHeight(),
  45174. i = this._getReviewHeight(), o = this._strategy.layout();
  45175. this._originalDomNode.style.width = o + "px", this._originalDomNode.style.left = "0px", this._modifiedDomNode.style.width = e - o + "px", this._modifiedDomNode.style.left = o + "px",
  45176. this._overviewDomElement.style.top = "0px", this._overviewDomElement.style.height = n - i + "px", this._overviewDomElement.style.width = t.ENTIRE_DIFF_OVERVIEW_WIDTH + "px", this._overviewDomElement.style.left = e - t.ENTIRE_DIFF_OVERVIEW_WIDTH + "px", this._overviewViewportDomElement.setWidth(t.ENTIRE_DIFF_OVERVIEW_WIDTH), this._overviewViewportDomElement.setHeight(30), this.originalEditor.layout({
  45177. width: o,
  45178. height: n - i
  45179. }), this.modifiedEditor.layout({
  45180. width: e - o - t.ENTIRE_DIFF_OVERVIEW_WIDTH,
  45181. height: n - i
  45182. }), (this._originalOverviewRuler || this._modifiedOverviewRuler) && this._layoutOverviewRulers(), this._reviewPane.layout(n - i, e, i), this._layoutOverviewViewport()
  45183. }, t.prototype._layoutOverviewViewport = function () {
  45184. var e = this._computeOverviewViewport();
  45185. e ? (this._overviewViewportDomElement.setTop(e.top), this._overviewViewportDomElement.setHeight(e.height)) : (this._overviewViewportDomElement.setTop(0), this._overviewViewportDomElement.setHeight(0))
  45186. }, t.prototype._computeOverviewViewport = function () {
  45187. var e = this.modifiedEditor.getLayoutInfo();
  45188. if (!e) return null
  45189. ;
  45190. var t = this.modifiedEditor.getScrollTop(), n = this.modifiedEditor.getScrollHeight(),
  45191. i = Math.max(0, e.height), o = Math.max(0, i - 0), r = n > 0 ? o / n : 0;
  45192. return {height: Math.max(0, Math.floor(e.height * r)), top: Math.floor(t * r)}
  45193. }, t.prototype._createDataSource = function () {
  45194. var e = this;
  45195. return {
  45196. getWidth: function () {
  45197. return e._elementSizeObserver.getWidth()
  45198. }, getHeight: function () {
  45199. return e._elementSizeObserver.getHeight() - e._getReviewHeight()
  45200. }, getContainerDomNode: function () {
  45201. return e._containerDomElement
  45202. }, relayoutEditors: function () {
  45203. e._doLayout()
  45204. }, getOriginalEditor: function () {
  45205. return e.originalEditor
  45206. }, getModifiedEditor: function () {
  45207. return e.modifiedEditor
  45208. }
  45209. }
  45210. }, t.prototype._setStrategy = function (e) {
  45211. this._strategy && this._strategy.dispose(), this._strategy = e, e.applyColors(this._themeService.getTheme()), this._diffComputationResult && this._updateDecorations(), this._doLayout()
  45212. }, t.prototype._getLineChangeAtOrBeforeLineNumber = function (e, t) {
  45213. var n = this._diffComputationResult ? this._diffComputationResult.changes : [];
  45214. if (0 === n.length || e < t(n[0])) return null
  45215. ;
  45216. for (var i = 0, o = n.length - 1; i < o;) {
  45217. var r = Math.floor((i + o) / 2), s = t(n[r]), a = r + 1 <= o ? t(n[r + 1]) : 1073741824;
  45218. e < s ? o = r - 1 : e >= a ? i = r + 1 : (i = r, o = r)
  45219. }
  45220. return n[i]
  45221. }, t.prototype._getEquivalentLineForOriginalLineNumber = function (e) {
  45222. var t = this._getLineChangeAtOrBeforeLineNumber(e, (function (e) {
  45223. return e.originalStartLineNumber
  45224. }));
  45225. if (!t) return e;
  45226. var n = t.originalStartLineNumber + (t.originalEndLineNumber > 0 ? -1 : 0),
  45227. i = t.modifiedStartLineNumber + (t.modifiedEndLineNumber > 0 ? -1 : 0),
  45228. o = t.originalEndLineNumber > 0 ? t.originalEndLineNumber - t.originalStartLineNumber + 1 : 0,
  45229. r = t.modifiedEndLineNumber > 0 ? t.modifiedEndLineNumber - t.modifiedStartLineNumber + 1 : 0,
  45230. s = e - n;
  45231. return s <= o ? i + Math.min(s, r) : i + r - o + s
  45232. }, t.prototype._getEquivalentLineForModifiedLineNumber = function (e) {
  45233. var t = this._getLineChangeAtOrBeforeLineNumber(e, (function (e) {
  45234. return e.modifiedStartLineNumber
  45235. }));
  45236. if (!t) return e
  45237. ;
  45238. var n = t.originalStartLineNumber + (t.originalEndLineNumber > 0 ? -1 : 0),
  45239. i = t.modifiedStartLineNumber + (t.modifiedEndLineNumber > 0 ? -1 : 0),
  45240. o = t.originalEndLineNumber > 0 ? t.originalEndLineNumber - t.originalStartLineNumber + 1 : 0,
  45241. r = t.modifiedEndLineNumber > 0 ? t.modifiedEndLineNumber - t.modifiedStartLineNumber + 1 : 0,
  45242. s = e - i;
  45243. return s <= r ? n + Math.min(s, o) : n + o - r + s
  45244. }, t.prototype.getDiffLineInformationForOriginal = function (e) {
  45245. return this._diffComputationResult ? {equivalentLineNumber: this._getEquivalentLineForOriginalLineNumber(e)} : null
  45246. }, t.prototype.getDiffLineInformationForModified = function (e) {
  45247. return this._diffComputationResult ? {equivalentLineNumber: this._getEquivalentLineForModifiedLineNumber(e)} : null
  45248. }, t.ONE_OVERVIEW_WIDTH = 15, t.ENTIRE_DIFF_OVERVIEW_WIDTH = 30, t.UPDATE_DIFF_DECORATIONS_DELAY = 200, t = h([g(3, w.IEditorWorkerService), g(4, x.IContextKeyService), g(5, I.IInstantiationService), g(6, f.ICodeEditorService), g(7, R.IThemeService), g(8, k.INotificationService), g(9, O.IContextMenuService), g(10, W.IEditorProgressService)], t)
  45249. }(u.Disposable)
  45250. ;t.DiffEditorWidget = H;
  45251. var K = function (e) {
  45252. function t(t) {
  45253. var n = e.call(this) || this;
  45254. return n._dataSource = t, n._insertColor = null, n._removeColor = null, n
  45255. }
  45256. return r(t, e), t.prototype.applyColors = function (e) {
  45257. var t = (e.getColor(T.diffInserted) || T.defaultInsertColor).transparent(2),
  45258. n = (e.getColor(T.diffRemoved) || T.defaultRemoveColor).transparent(2),
  45259. i = !t.equals(this._insertColor) || !n.equals(this._removeColor);
  45260. return this._insertColor = t, this._removeColor = n, i
  45261. }, t.prototype.getEditorsDiffDecorations = function (e, t, n, i, o, r, s) {
  45262. o = o.sort((function (e, t) {
  45263. return e.afterLineNumber - t.afterLineNumber
  45264. })), i = i.sort((function (e, t) {
  45265. return e.afterLineNumber - t.afterLineNumber
  45266. }));
  45267. var a = this._getViewZones(e, i, o, r, s, n), l = this._getOriginalEditorDecorations(e, t, n, r, s),
  45268. u = this._getModifiedEditorDecorations(e, t, n, r, s);
  45269. return {
  45270. original: {decorations: l.decorations, overviewZones: l.overviewZones, zones: a.original},
  45271. modified: {decorations: u.decorations, overviewZones: u.overviewZones, zones: a.modified}
  45272. }
  45273. }, t
  45274. }(u.Disposable), U = function () {
  45275. function e(e) {
  45276. this._source = e,
  45277. this._index = -1, this.current = null, this.advance()
  45278. }
  45279. return e.prototype.advance = function () {
  45280. this._index++, this._index < this._source.length ? this.current = this._source[this._index] : this.current = null
  45281. }, e
  45282. }(), j = function () {
  45283. function e(e, t, n, i, o) {
  45284. this.lineChanges = e, this.originalForeignVZ = t, this.originalLineHeight = n, this.modifiedForeignVZ = i, this.modifiedLineHeight = o
  45285. }
  45286. return e.prototype.getViewZones = function () {
  45287. for (var t = [], n = [], i = 0, o = 0, r = 0, s = 0, a = 0, l = 0, u = function (e, t) {
  45288. return e.afterLineNumber - t.afterLineNumber
  45289. }, d = function (e, t) {
  45290. if (null === t.domNode && e.length > 0) {
  45291. var n = e[e.length - 1];
  45292. if (n.afterLineNumber === t.afterLineNumber && null === n.domNode) return void (n.heightInLines += t.heightInLines)
  45293. }
  45294. e.push(t)
  45295. }, c = new U(this.modifiedForeignVZ), h = new U(this.originalForeignVZ), p = 0, g = this.lineChanges.length; p <= g; p++) {
  45296. var f = p < g ? this.lineChanges[p] : null;
  45297. null !== f ? (r = f.originalStartLineNumber + (f.originalEndLineNumber > 0 ? -1 : 0), s = f.modifiedStartLineNumber + (f.modifiedEndLineNumber > 0 ? -1 : 0),
  45298. o = f.originalEndLineNumber > 0 ? f.originalEndLineNumber - f.originalStartLineNumber + 1 : 0, i = f.modifiedEndLineNumber > 0 ? f.modifiedEndLineNumber - f.modifiedStartLineNumber + 1 : 0, a = Math.max(f.originalStartLineNumber, f.originalEndLineNumber), l = Math.max(f.modifiedStartLineNumber, f.modifiedEndLineNumber)) : (a = r += 1e7 + o, l = s += 1e7 + i);
  45299. for (var m, v = [], _ = []; c.current && c.current.afterLineNumber <= l;) {
  45300. var y = void 0;
  45301. y = c.current.afterLineNumber <= s ? r - s + c.current.afterLineNumber : a;
  45302. var C = null;
  45303. f && f.modifiedStartLineNumber <= c.current.afterLineNumber && c.current.afterLineNumber <= f.modifiedEndLineNumber && (C = this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()), v.push({
  45304. afterLineNumber: y,
  45305. heightInLines: c.current.height / this.modifiedLineHeight,
  45306. domNode: null,
  45307. marginDomNode: C
  45308. }), c.advance()
  45309. }
  45310. for (; h.current && h.current.afterLineNumber <= a;) {
  45311. y = void 0;
  45312. y = h.current.afterLineNumber <= r ? s - r + h.current.afterLineNumber : l, _.push({
  45313. afterLineNumber: y,
  45314. heightInLines: h.current.height / this.originalLineHeight,
  45315. domNode: null
  45316. }), h.advance()
  45317. }
  45318. if (null !== f && Q(f)) (m = this._produceOriginalFromDiff(f, o, i)) && v.push(m);
  45319. if (null !== f && J(f)) (m = this._produceModifiedFromDiff(f, o, i)) && _.push(m);
  45320. var b = 0, S = 0;
  45321. for (v = v.sort(u), _ = _.sort(u); b < v.length && S < _.length;) {
  45322. var w = v[b], E = _[S], L = w.afterLineNumber - r, D = E.afterLineNumber - s;
  45323. L < D ? (d(t, w), b++) : D < L ? (d(n, E), S++) : w.shouldNotShrink ? (d(t, w), b++) : E.shouldNotShrink ? (d(n, E), S++) : w.heightInLines >= E.heightInLines ? (w.heightInLines -= E.heightInLines, S++) : (E.heightInLines -= w.heightInLines, b++)
  45324. }
  45325. for (; b < v.length;) d(t, v[b]), b++;
  45326. for (; S < _.length;) d(n, _[S]), S++
  45327. }
  45328. return {original: e._ensureDomNodes(t), modified: e._ensureDomNodes(n)}
  45329. }, e._ensureDomNodes = function (e) {
  45330. return e.map((function (e) {
  45331. var t;
  45332. return e.domNode || (e.domNode = ((t = document.createElement("div")).className = "diagonal-fill", t)), e
  45333. }))
  45334. }, e
  45335. }();
  45336. function q(e, t, n, i, o) {
  45337. return {range: new y.Range(e, t, n, i), options: o}
  45338. }
  45339. var G = {
  45340. charDelete: S.ModelDecorationOptions.register({className: "char-delete"}),
  45341. charDeleteWholeLine: S.ModelDecorationOptions.register({className: "char-delete", isWholeLine: !0}),
  45342. charInsert: S.ModelDecorationOptions.register({className: "char-insert"}),
  45343. charInsertWholeLine: S.ModelDecorationOptions.register({className: "char-insert", isWholeLine: !0}),
  45344. lineInsert: S.ModelDecorationOptions.register({
  45345. className: "line-insert",
  45346. marginClassName: "line-insert",
  45347. isWholeLine: !0
  45348. }),
  45349. lineInsertWithSign: S.ModelDecorationOptions.register({
  45350. className: "line-insert",
  45351. linesDecorationsClassName: "insert-sign codicon codicon-add",
  45352. marginClassName: "line-insert",
  45353. isWholeLine: !0
  45354. }),
  45355. lineDelete: S.ModelDecorationOptions.register({
  45356. className: "line-delete",
  45357. marginClassName: "line-delete",
  45358. isWholeLine: !0
  45359. }),
  45360. lineDeleteWithSign: S.ModelDecorationOptions.register({
  45361. className: "line-delete",
  45362. linesDecorationsClassName: "delete-sign codicon codicon-remove",
  45363. marginClassName: "line-delete",
  45364. isWholeLine: !0
  45365. }),
  45366. lineDeleteMargin: S.ModelDecorationOptions.register({marginClassName: "line-delete"})
  45367. }, Y = function (e) {
  45368. function t(t, n) {
  45369. var i = e.call(this, t) || this;
  45370. return i._disableSash = !1 === n, i._sashRatio = null, i._sashPosition = null, i._startSashPosition = null,
  45371. i._sash = i._register(new s.Sash(i._dataSource.getContainerDomNode(), i)), i._disableSash && (i._sash.state = 0), i._sash.onDidStart((function () {
  45372. return i.onSashDragStart()
  45373. })), i._sash.onDidChange((function (e) {
  45374. return i.onSashDrag(e)
  45375. })), i._sash.onDidEnd((function () {
  45376. return i.onSashDragEnd()
  45377. })), i._sash.onDidReset((function () {
  45378. return i.onSashReset()
  45379. })), i
  45380. }
  45381. return r(t, e), t.prototype.setEnableSplitViewResizing = function (e) {
  45382. var t = !1 === e;
  45383. this._disableSash !== t && (this._disableSash = t, this._sash.state = this._disableSash ? 0 : 3)
  45384. }, t.prototype.layout = function (e) {
  45385. void 0 === e && (e = this._sashRatio);
  45386. var n = this._dataSource.getWidth() - H.ENTIRE_DIFF_OVERVIEW_WIDTH, i = Math.floor((e || .5) * n),
  45387. o = Math.floor(.5 * n);
  45388. return i = this._disableSash ? o : i || o, n > 2 * t.MINIMUM_EDITOR_WIDTH ? (i < t.MINIMUM_EDITOR_WIDTH && (i = t.MINIMUM_EDITOR_WIDTH), i > n - t.MINIMUM_EDITOR_WIDTH && (i = n - t.MINIMUM_EDITOR_WIDTH)) : i = o, this._sashPosition !== i && (this._sashPosition = i, this._sash.layout()), this._sashPosition
  45389. }, t.prototype.onSashDragStart = function () {
  45390. this._startSashPosition = this._sashPosition
  45391. },
  45392. t.prototype.onSashDrag = function (e) {
  45393. var t = this._dataSource.getWidth() - H.ENTIRE_DIFF_OVERVIEW_WIDTH,
  45394. n = this.layout((this._startSashPosition + (e.currentX - e.startX)) / t);
  45395. this._sashRatio = n / t, this._dataSource.relayoutEditors()
  45396. }, t.prototype.onSashDragEnd = function () {
  45397. this._sash.layout()
  45398. }, t.prototype.onSashReset = function () {
  45399. this._sashRatio = .5, this._dataSource.relayoutEditors(), this._sash.layout()
  45400. }, t.prototype.getVerticalSashTop = function (e) {
  45401. return 0
  45402. }, t.prototype.getVerticalSashLeft = function (e) {
  45403. return this._sashPosition
  45404. }, t.prototype.getVerticalSashHeight = function (e) {
  45405. return this._dataSource.getHeight()
  45406. }, t.prototype._getViewZones = function (e, t, n, i, o) {
  45407. return new Z(e, t, i.getOption(49), n, o.getOption(49)).getViewZones()
  45408. }, t.prototype._getOriginalEditorDecorations = function (e, t, n, i, o) {
  45409. for (var r = String(this._removeColor), s = {
  45410. decorations: [],
  45411. overviewZones: []
  45412. }, a = i.getModel(), l = 0, u = e.length; l < u; l++) {
  45413. var d = e[l];
  45414. if (J(d) && (s.decorations.push({
  45415. range: new y.Range(d.originalStartLineNumber, 1, d.originalEndLineNumber, 1073741824),
  45416. options: n ? G.lineDeleteWithSign : G.lineDelete
  45417. }), Q(d) && d.charChanges || s.decorations.push(q(d.originalStartLineNumber, 1, d.originalEndLineNumber, 1073741824, G.charDeleteWholeLine)), s.overviewZones.push(new E.OverviewRulerZone(d.originalStartLineNumber, d.originalEndLineNumber, r)), d.charChanges)) for (var c = 0, h = d.charChanges.length; c < h; c++) {
  45418. var p = d.charChanges[c];
  45419. if (J(p)) if (t) for (var g = p.originalStartLineNumber; g <= p.originalEndLineNumber; g++) {
  45420. var f = void 0, m = void 0;
  45421. f = g === p.originalStartLineNumber ? p.originalStartColumn : a.getLineFirstNonWhitespaceColumn(g), m = g === p.originalEndLineNumber ? p.originalEndColumn : a.getLineLastNonWhitespaceColumn(g), s.decorations.push(q(g, f, g, m, G.charDelete))
  45422. } else s.decorations.push(q(p.originalStartLineNumber, p.originalStartColumn, p.originalEndLineNumber, p.originalEndColumn, G.charDelete))
  45423. }
  45424. }
  45425. return s
  45426. }, t.prototype._getModifiedEditorDecorations = function (e, t, n, i, o) {
  45427. for (var r = String(this._insertColor), s = {
  45428. decorations: [],
  45429. overviewZones: []
  45430. }, a = o.getModel(), l = 0, u = e.length; l < u; l++) {
  45431. var d = e[l]
  45432. ;
  45433. if (Q(d) && (s.decorations.push({
  45434. range: new y.Range(d.modifiedStartLineNumber, 1, d.modifiedEndLineNumber, 1073741824),
  45435. options: n ? G.lineInsertWithSign : G.lineInsert
  45436. }), J(d) && d.charChanges || s.decorations.push(q(d.modifiedStartLineNumber, 1, d.modifiedEndLineNumber, 1073741824, G.charInsertWholeLine)), s.overviewZones.push(new E.OverviewRulerZone(d.modifiedStartLineNumber, d.modifiedEndLineNumber, r)), d.charChanges)) for (var c = 0, h = d.charChanges.length; c < h; c++) {
  45437. var p = d.charChanges[c];
  45438. if (Q(p)) if (t) for (var g = p.modifiedStartLineNumber; g <= p.modifiedEndLineNumber; g++) {
  45439. var f = void 0, m = void 0;
  45440. f = g === p.modifiedStartLineNumber ? p.modifiedStartColumn : a.getLineFirstNonWhitespaceColumn(g), m = g === p.modifiedEndLineNumber ? p.modifiedEndColumn : a.getLineLastNonWhitespaceColumn(g), s.decorations.push(q(g, f, g, m, G.charInsert))
  45441. } else s.decorations.push(q(p.modifiedStartLineNumber, p.modifiedStartColumn, p.modifiedEndLineNumber, p.modifiedEndColumn, G.charInsert))
  45442. }
  45443. }
  45444. return s
  45445. }, t.MINIMUM_EDITOR_WIDTH = 100, t
  45446. }(K), Z = function (e) {
  45447. function t(t, n, i, o, r) {
  45448. return e.call(this, t, n, i, o, r) || this
  45449. }
  45450. return r(t, e), t.prototype._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion = function () {
  45451. return null
  45452. }, t.prototype._produceOriginalFromDiff = function (e, t, n) {
  45453. return n > t ? {
  45454. afterLineNumber: Math.max(e.originalStartLineNumber, e.originalEndLineNumber),
  45455. heightInLines: n - t,
  45456. domNode: null
  45457. } : null
  45458. }, t.prototype._produceModifiedFromDiff = function (e, t, n) {
  45459. return t > n ? {
  45460. afterLineNumber: Math.max(e.modifiedStartLineNumber, e.modifiedEndLineNumber),
  45461. heightInLines: t - n,
  45462. domNode: null
  45463. } : null
  45464. }, t
  45465. }(j), $ = function (e) {
  45466. function t(t, n) {
  45467. var i = e.call(this, t) || this;
  45468. return i.decorationsLeft = t.getOriginalEditor().getLayoutInfo().decorationsLeft, i._register(t.getOriginalEditor().onDidLayoutChange((function (e) {
  45469. i.decorationsLeft !== e.decorationsLeft && (i.decorationsLeft = e.decorationsLeft, t.relayoutEditors())
  45470. }))), i
  45471. }
  45472. return r(t, e), t.prototype.setEnableSplitViewResizing = function (e) {
  45473. }, t.prototype._getViewZones = function (e, t, n, i, o, r) {
  45474. return new X(e, t, n, i, o, r).getViewZones()
  45475. },
  45476. t.prototype._getOriginalEditorDecorations = function (e, t, n, i, o) {
  45477. for (var r = String(this._removeColor), s = {
  45478. decorations: [],
  45479. overviewZones: []
  45480. }, a = 0, l = e.length; a < l; a++) {
  45481. var u = e[a];
  45482. J(u) && (s.decorations.push({
  45483. range: new y.Range(u.originalStartLineNumber, 1, u.originalEndLineNumber, 1073741824),
  45484. options: G.lineDeleteMargin
  45485. }), s.overviewZones.push(new E.OverviewRulerZone(u.originalStartLineNumber, u.originalEndLineNumber, r)))
  45486. }
  45487. return s
  45488. }, t.prototype._getModifiedEditorDecorations = function (e, t, n, i, o) {
  45489. for (var r = String(this._insertColor), s = {
  45490. decorations: [],
  45491. overviewZones: []
  45492. }, a = o.getModel(), l = 0, u = e.length; l < u; l++) {
  45493. var d = e[l];
  45494. if (Q(d)) if (s.decorations.push({
  45495. range: new y.Range(d.modifiedStartLineNumber, 1, d.modifiedEndLineNumber, 1073741824),
  45496. options: n ? G.lineInsertWithSign : G.lineInsert
  45497. }), s.overviewZones.push(new E.OverviewRulerZone(d.modifiedStartLineNumber, d.modifiedEndLineNumber, r)), d.charChanges) for (var c = 0, h = d.charChanges.length; c < h; c++) {
  45498. var p = d.charChanges[c];
  45499. if (Q(p)) if (t) for (var g = p.modifiedStartLineNumber; g <= p.modifiedEndLineNumber; g++) {
  45500. var f = void 0, m = void 0;
  45501. f = g === p.modifiedStartLineNumber ? p.modifiedStartColumn : a.getLineFirstNonWhitespaceColumn(g), m = g === p.modifiedEndLineNumber ? p.modifiedEndColumn : a.getLineLastNonWhitespaceColumn(g), s.decorations.push(q(g, f, g, m, G.charInsert))
  45502. } else s.decorations.push(q(p.modifiedStartLineNumber, p.modifiedStartColumn, p.modifiedEndLineNumber, p.modifiedEndColumn, G.charInsert))
  45503. } else s.decorations.push(q(d.modifiedStartLineNumber, 1, d.modifiedEndLineNumber, 1073741824, G.charInsertWholeLine))
  45504. }
  45505. return s
  45506. }, t.prototype.layout = function () {
  45507. return Math.max(5, this.decorationsLeft)
  45508. }, t
  45509. }(K), X = function (e) {
  45510. function t(t, n, i, o, r, s) {
  45511. var a = e.call(this, t, n, o.getOption(49), i, r.getOption(49)) || this;
  45512. return a.originalModel = o.getModel(), a.modifiedEditorOptions = r.getOptions(), a.modifiedEditorTabSize = r.getModel().getOptions().tabSize, a.renderIndicators = s, a
  45513. }
  45514. return r(t, e), t.prototype._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion = function () {
  45515. var e = document.createElement("div")
  45516. ;
  45517. return e.className = "inline-added-margin-view-zone", e
  45518. }, t.prototype._produceOriginalFromDiff = function (e, t, n) {
  45519. var i = document.createElement("div");
  45520. return i.className = "inline-added-margin-view-zone", {
  45521. afterLineNumber: Math.max(e.originalStartLineNumber, e.originalEndLineNumber),
  45522. heightInLines: n,
  45523. domNode: document.createElement("div"),
  45524. marginDomNode: i
  45525. }
  45526. }, t.prototype._produceModifiedFromDiff = function (e, t, n) {
  45527. var i = [];
  45528. if (e.charChanges) for (var o = 0, r = e.charChanges.length; o < r; o++) {
  45529. var s = e.charChanges[o];
  45530. J(s) && i.push(new N.InlineDecoration(new y.Range(s.originalStartLineNumber, s.originalStartColumn, s.originalEndLineNumber, s.originalEndColumn), "char-delete", 0))
  45531. }
  45532. for (var a = C.createStringBuilder(1e4), l = [], u = this.modifiedEditorOptions.get(107), d = this.modifiedEditorOptions.get(34), h = u.decorationsWidth, p = this.modifiedEditorOptions.get(49), g = d.typicalHalfwidthCharacterWidth, f = 0, m = [], v = e.originalStartLineNumber; v <= e.originalEndLineNumber; v++) if (f = Math.max(f, this._renderOriginalLine(v - e.originalStartLineNumber, this.originalModel, this.modifiedEditorOptions, this.modifiedEditorTabSize, v, i, a)), m.push(this.originalModel.getLineContent(v)), this.renderIndicators) {
  45533. var _ = v - e.originalStartLineNumber;
  45534. l = l.concat(['<div class="delete-sign codicon codicon-remove" style="position:absolute;top:' + _ * p + "px;width:" + h + "px;height:" + p + 'px;right:0;"></div>'])
  45535. }
  45536. f += this.modifiedEditorOptions.get(79);
  45537. var b = document.createElement("div");
  45538. b.className = "view-lines line-delete", b.innerHTML = a.build(), c.Configuration.applyFontInfoSlow(b, d);
  45539. var S = document.createElement("div");
  45540. return S.className = "inline-deleted-margin-view-zone", S.innerHTML = l.join(""), c.Configuration.applyFontInfoSlow(S, d), {
  45541. shouldNotShrink: !0,
  45542. afterLineNumber: 0 === e.modifiedEndLineNumber ? e.modifiedStartLineNumber : e.modifiedStartLineNumber - 1,
  45543. heightInLines: t,
  45544. minWidthInPx: f * g,
  45545. domNode: b,
  45546. marginDomNode: S,
  45547. diff: {
  45548. originalStartLineNumber: e.originalStartLineNumber,
  45549. originalEndLineNumber: e.originalEndLineNumber,
  45550. modifiedStartLineNumber: e.modifiedStartLineNumber,
  45551. modifiedEndLineNumber: e.modifiedEndLineNumber,
  45552. originalContent: m
  45553. }
  45554. }
  45555. }, t.prototype._renderOriginalLine = function (e, t, n, i, o, r, s) {
  45556. var a = t.getLineTokens(o), l = a.getLineContent(), u = n.get(34),
  45557. d = L.LineDecoration.filter(r, o, 1, l.length + 1);
  45558. s.appendASCIIString('<div class="view-line'), 0 === r.length && s.appendASCIIString(" char-delete"), s.appendASCIIString('" style="top:'), s.appendASCIIString(String(e * n.get(49))), s.appendASCIIString('px;width:1000000px;">')
  45559. ;var c = N.ViewLineRenderingData.isBasicASCII(l, t.mightContainNonBasicASCII()),
  45560. h = N.ViewLineRenderingData.containsRTL(l, c, t.mightContainRTL()),
  45561. p = D.renderViewLine(new D.RenderLineInput(u.isMonospace && !n.get(23), u.canUseHalfwidthRightwardsArrow, l, !1, c, h, 0, a, d, i, 0, u.spaceWidth, u.middotWidth, n.get(88), n.get(74), n.get(69), n.get(35) !== _.EditorFontLigatures.OFF, null), s);
  45562. s.appendASCIIString("</div>");
  45563. var g = p.characterMapping.getAbsoluteOffsets();
  45564. return g.length > 0 ? g[g.length - 1] : 0
  45565. }, t
  45566. }(j);
  45567. function Q(e) {
  45568. return e.modifiedEndLineNumber > 0
  45569. }
  45570. function J(e) {
  45571. return e.originalEndLineNumber > 0
  45572. }
  45573. R.registerThemingParticipant((function (e, t) {
  45574. var n = e.getColor(T.diffInserted);
  45575. n && (t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: " + n + "; }"), t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: " + n + "; }"), t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: " + n + "; }"));
  45576. var i = e.getColor(T.diffRemoved)
  45577. ;i && (t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: " + i + "; }"), t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: " + i + "; }"), t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: " + i + "; }"));
  45578. var o = e.getColor(T.diffInsertedOutline);
  45579. o && t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + o + "; }");
  45580. var r = e.getColor(T.diffRemovedOutline);
  45581. r && t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + r + "; }");
  45582. var s = e.getColor(T.scrollbarShadow);
  45583. s && t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px " + s + "; }");
  45584. var a = e.getColor(T.diffBorder);
  45585. a && t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid " + a + "; }")
  45586. }))
  45587. })), define(n[167], i([0, 1, 31, 32, 121, 29, 18, 11, 35, 14, 64]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  45588. "use strict"
  45589. ;Object.defineProperty(t, "__esModule", {value: !0});
  45590. var p = function (e) {
  45591. function t(t, n, i, o, r, s, a, l, u, d) {
  45592. var c = e.call(this, t, i.getRawOptions(), {}, o, r, s, a, l, u, d) || this;
  45593. return c._parentEditor = i, c._overwriteOptions = n, e.prototype.updateOptions.call(c, c._overwriteOptions), c._register(i.onDidChangeConfiguration((function (e) {
  45594. return c._onParentConfigurationChanged(e)
  45595. }))), c
  45596. }
  45597. return r(t, e), t.prototype.getParentEditor = function () {
  45598. return this._parentEditor
  45599. }, t.prototype._onParentConfigurationChanged = function (t) {
  45600. e.prototype.updateOptions.call(this, this._parentEditor.getRawOptions()), e.prototype.updateOptions.call(this, this._overwriteOptions)
  45601. }, t.prototype.updateOptions = function (t) {
  45602. n.mixin(this._overwriteOptions, t, !0), e.prototype.updateOptions.call(this, this._overwriteOptions)
  45603. }, t = h([g(3, l.IInstantiationService), g(4, i.ICodeEditorService), g(5, s.ICommandService), g(6, a.IContextKeyService), g(7, d.IThemeService), g(8, u.INotificationService), g(9, c.IAccessibilityService)], t)
  45604. }(o.CodeEditorWidget);
  45605. t.EmbeddedCodeEditorWidget = p
  45606. })),
  45607. define(n[565], i([0, 1, 72, 2, 48, 14, 44, 49, 3, 38, 46, 4, 21, 20]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m) {
  45608. "use strict";
  45609. function v(e) {
  45610. return e.toString()
  45611. }
  45612. Object.defineProperty(t, "__esModule", {value: !0});
  45613. var _ = function (e) {
  45614. function t(t) {
  45615. var n = e.call(this) || this;
  45616. return n.model = t, n._markersData = new Map, n._register(i.toDisposable((function () {
  45617. n.model.deltaDecorations(d.keys(n._markersData), []), n._markersData.clear()
  45618. }))), n
  45619. }
  45620. return r(t, e), t.prototype.update = function (e, t) {
  45621. var n = d.keys(this._markersData);
  45622. this._markersData.clear();
  45623. for (var i = this.model.deltaDecorations(n, t), o = 0; o < i.length; o++) this._markersData.set(i[o], e[o])
  45624. }, t.prototype.getMarker = function (e) {
  45625. return this._markersData.get(e.id)
  45626. }, t
  45627. }(i.Disposable), y = function (e) {
  45628. function t(t, n) {
  45629. var i = e.call(this) || this;
  45630. return i._markerService = n, i._onDidChangeMarker = i._register(new p.Emitter), i._markerDecorations = new Map, t.getModels().forEach((function (e) {
  45631. return i._onModelAdded(e)
  45632. })), i._register(t.onModelAdded(i._onModelAdded, i)), i._register(t.onModelRemoved(i._onModelRemoved, i)),
  45633. i._register(i._markerService.onMarkerChanged(i._handleMarkerChange, i)), i
  45634. }
  45635. return r(t, e), t.prototype.dispose = function () {
  45636. e.prototype.dispose.call(this), this._markerDecorations.forEach((function (e) {
  45637. return e.dispose()
  45638. })), this._markerDecorations.clear()
  45639. }, t.prototype.getMarker = function (e, t) {
  45640. var n = this._markerDecorations.get(v(e.uri));
  45641. return n ? f.withUndefinedAsNull(n.getMarker(t)) : null
  45642. }, t.prototype._handleMarkerChange = function (e) {
  45643. var t = this;
  45644. e.forEach((function (e) {
  45645. var n = t._markerDecorations.get(v(e));
  45646. n && t._updateDecorations(n)
  45647. }))
  45648. }, t.prototype._onModelAdded = function (e) {
  45649. var t = new _(e);
  45650. this._markerDecorations.set(v(e.uri), t), this._updateDecorations(t)
  45651. }, t.prototype._onModelRemoved = function (e) {
  45652. var t = this, n = this._markerDecorations.get(v(e.uri));
  45653. n && (n.dispose(), this._markerDecorations.delete(v(e.uri))), e.uri.scheme !== c.Schemas.inMemory && e.uri.scheme !== c.Schemas.internal && e.uri.scheme !== c.Schemas.vscode || this._markerService && this._markerService.read({resource: e.uri}).map((function (e) {
  45654. return e.owner
  45655. })).forEach((function (n) {
  45656. return t._markerService.remove(n, [e.uri])
  45657. }))
  45658. }, t.prototype._updateDecorations = function (e) {
  45659. var t = this, n = this._markerService.read({resource: e.model.uri, take: 500}),
  45660. i = n.map((function (n) {
  45661. return {range: t._createDecorationRange(e.model, n), options: t._createDecorationOption(n)}
  45662. }));
  45663. e.update(n, i), this._onDidChangeMarker.fire(e.model)
  45664. }, t.prototype._createDecorationRange = function (e, t) {
  45665. var i = u.Range.lift(t);
  45666. if (t.severity !== n.MarkerSeverity.Hint || this._hasMarkerTag(t, 1) || this._hasMarkerTag(t, 2) || (i = i.setEndPosition(i.startLineNumber, i.startColumn + 2)), (i = e.validateRange(i)).isEmpty()) {
  45667. var o = e.getWordAtPosition(i.getStartPosition());
  45668. if (o) i = new u.Range(i.startLineNumber, o.startColumn, i.endLineNumber, o.endColumn); else {
  45669. var r = e.getLineLastNonWhitespaceColumn(i.startLineNumber) || e.getLineMaxColumn(i.startLineNumber);
  45670. 1 === r || (i = i.endColumn >= r ? new u.Range(i.startLineNumber, r - 1, i.endLineNumber, r) : new u.Range(i.startLineNumber, i.startColumn, i.endLineNumber, i.endColumn + 1))
  45671. }
  45672. } else if (t.endColumn === Number.MAX_VALUE && 1 === t.startColumn && i.startLineNumber === i.endLineNumber) {
  45673. var s = e.getLineFirstNonWhitespaceColumn(t.startLineNumber);
  45674. s < i.endColumn && (i = new u.Range(i.startLineNumber, s, i.endLineNumber, i.endColumn), t.startColumn = s)
  45675. }
  45676. return i
  45677. }, t.prototype._createDecorationOption = function (e) {
  45678. var t, i, r, l = void 0, u = void 0;
  45679. switch (e.severity) {
  45680. case n.MarkerSeverity.Hint:
  45681. t = this._hasMarkerTag(e, 2) ? void 0 : this._hasMarkerTag(e, 1) ? "squiggly-unnecessary" : "squiggly-hint", i = 0;
  45682. break;
  45683. case n.MarkerSeverity.Warning:
  45684. t = "squiggly-warning", l = s.themeColorFromId(a.overviewRulerWarning), i = 20, r = {
  45685. color: s.themeColorFromId(m.minimapWarning),
  45686. position: o.MinimapPosition.Inline
  45687. };
  45688. break;
  45689. case n.MarkerSeverity.Info:
  45690. t = "squiggly-info", l = s.themeColorFromId(a.overviewRulerInfo), i = 10;
  45691. break;
  45692. case n.MarkerSeverity.Error:
  45693. default:
  45694. t = "squiggly-error", l = s.themeColorFromId(a.overviewRulerError), i = 30, r = {
  45695. color: s.themeColorFromId(m.minimapError),
  45696. position: o.MinimapPosition.Inline
  45697. }
  45698. }
  45699. return e.tags && (-1 !== e.tags.indexOf(1) && (u = "squiggly-inline-unnecessary"), -1 !== e.tags.indexOf(2) && (u = "squiggly-inline-deprecated")), {
  45700. stickiness: 1,
  45701. className: t,
  45702. showIfCollapsed: !0,
  45703. overviewRuler: {color: l, position: o.OverviewRulerLane.Right},
  45704. minimap: r,
  45705. zIndex: i,
  45706. inlineClassName: u
  45707. }
  45708. }, t.prototype._hasMarkerTag = function (e, t) {
  45709. return !!e.tags && e.tags.indexOf(t) >= 0
  45710. }, t = h([g(0, l.IModelService), g(1, n.IMarkerService)], t)
  45711. }(i.Disposable);
  45712. t.MarkerDecorationsService = y
  45713. })), define(n[566], i([0, 1, 428, 15, 2, 12, 13, 3, 22, 23, 48, 30, 44, 20, 14, 65, 302]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m) {
  45714. "use strict";
  45715. Object.defineProperty(t, "__esModule", {value: !0});
  45716. var v = g.registerColor("editorOverviewRuler.bracketMatchForeground", {
  45717. dark: "#A0A0A0",
  45718. light: "#A0A0A0",
  45719. hc: "#A0A0A0"
  45720. }, n.localize(0, null)), _ = function (e) {
  45721. function t() {
  45722. return e.call(this, {
  45723. id: "editor.action.jumpToBracket",
  45724. label: n.localize(1, null),
  45725. alias: "Go to Bracket",
  45726. precondition: void 0,
  45727. kbOpts: {kbExpr: d.EditorContextKeys.editorTextFocus, primary: 3160, weight: 100}
  45728. }) || this
  45729. }
  45730. return r(t, e),
  45731. t.prototype.run = function (e, t) {
  45732. var n = b.get(t);
  45733. n && n.jumpToBracket()
  45734. }, t
  45735. }(s.EditorAction), y = function (e) {
  45736. function t() {
  45737. return e.call(this, {
  45738. id: "editor.action.selectToBracket",
  45739. label: n.localize(2, null),
  45740. alias: "Select to Bracket",
  45741. precondition: void 0,
  45742. description: {
  45743. description: "Select to Bracket",
  45744. args: [{
  45745. name: "args",
  45746. schema: {type: "object", properties: {selectBrackets: {type: "boolean", default: !0}}}
  45747. }]
  45748. }
  45749. }) || this
  45750. }
  45751. return r(t, e), t.prototype.run = function (e, t, n) {
  45752. var i = b.get(t);
  45753. if (i) {
  45754. var o = !0;
  45755. n && !1 === n.selectBrackets && (o = !1), i.selectToBracket(o)
  45756. }
  45757. }, t
  45758. }(s.EditorAction), C = function (e, t, n) {
  45759. this.position = e, this.brackets = t, this.options = n
  45760. }, b = function (e) {
  45761. function t(t) {
  45762. var n = e.call(this) || this;
  45763. return n._editor = t, n._lastBracketsData = [], n._lastVersionId = 0, n._decorations = [], n._updateBracketsSoon = n._register(new i.RunOnceScheduler((function () {
  45764. return n._updateBrackets()
  45765. }), 50)), n._matchBrackets = n._editor.getOption(53), n._updateBracketsSoon.schedule(), n._register(t.onDidChangeCursorPosition((function (e) {
  45766. "never" !== n._matchBrackets && n._updateBracketsSoon.schedule()
  45767. }))), n._register(t.onDidChangeModelContent((function (e) {
  45768. n._updateBracketsSoon.schedule()
  45769. }))), n._register(t.onDidChangeModel((function (e) {
  45770. n._lastBracketsData = [], n._decorations = [], n._updateBracketsSoon.schedule()
  45771. }))), n._register(t.onDidChangeModelLanguageConfiguration((function (e) {
  45772. n._lastBracketsData = [], n._updateBracketsSoon.schedule()
  45773. }))), n._register(t.onDidChangeConfiguration((function (e) {
  45774. e.hasChanged(53) && (n._matchBrackets = n._editor.getOption(53), n._decorations = n._editor.deltaDecorations(n._decorations, []), n._lastBracketsData = [], n._lastVersionId = 0, n._updateBracketsSoon.schedule())
  45775. }))), n
  45776. }
  45777. return r(t, e), t.get = function (e) {
  45778. return e.getContribution(t.ID)
  45779. }, t.prototype.jumpToBracket = function () {
  45780. if (this._editor.hasModel()) {
  45781. var e = this._editor.getModel(), t = this._editor.getSelections().map((function (t) {
  45782. var n = t.getStartPosition(), i = e.matchBracket(n), o = null
  45783. ;
  45784. if (i) i[0].containsPosition(n) ? o = i[1].getStartPosition() : i[1].containsPosition(n) && (o = i[0].getStartPosition()); else {
  45785. var r = e.findEnclosingBrackets(n);
  45786. if (r) o = r[0].getStartPosition(); else {
  45787. var s = e.findNextBracket(n);
  45788. s && s.range && (o = s.range.getStartPosition())
  45789. }
  45790. }
  45791. return o ? new u.Selection(o.lineNumber, o.column, o.lineNumber, o.column) : new u.Selection(n.lineNumber, n.column, n.lineNumber, n.column)
  45792. }));
  45793. this._editor.setSelections(t), this._editor.revealRange(t[0])
  45794. }
  45795. }, t.prototype.selectToBracket = function (e) {
  45796. if (this._editor.hasModel()) {
  45797. var t = this._editor.getModel(), n = [];
  45798. this._editor.getSelections().forEach((function (i) {
  45799. var o = i.getStartPosition(), r = t.matchBracket(o);
  45800. if (!r && !(r = t.findEnclosingBrackets(o))) {
  45801. var s = t.findNextBracket(o);
  45802. s && s.range && (r = t.matchBracket(s.range.getStartPosition()))
  45803. }
  45804. var a = null, d = null;
  45805. if (r) {
  45806. r.sort(l.Range.compareRangesUsingStarts);
  45807. var c = r[0], h = r[1];
  45808. a = e ? c.getStartPosition() : c.getEndPosition(), d = e ? h.getEndPosition() : h.getStartPosition()
  45809. }
  45810. a && d && n.push(new u.Selection(a.lineNumber, a.column, d.lineNumber, d.column))
  45811. })), n.length > 0 && (this._editor.setSelections(n), this._editor.revealRange(n[0]))
  45812. }
  45813. }, t.prototype._updateBrackets = function () {
  45814. if ("never" !== this._matchBrackets) {
  45815. this._recomputeBrackets();
  45816. for (var e = [], t = 0, n = 0, i = this._lastBracketsData; n < i.length; n++) {
  45817. var o = i[n], r = o.brackets;
  45818. r && (e[t++] = {range: r[0], options: o.options}, e[t++] = {range: r[1], options: o.options})
  45819. }
  45820. this._decorations = this._editor.deltaDecorations(this._decorations, e)
  45821. }
  45822. }, t.prototype._recomputeBrackets = function () {
  45823. if (!this._editor.hasModel()) return this._lastBracketsData = [], void (this._lastVersionId = 0);
  45824. var e = this._editor.getSelections();
  45825. if (e.length > 100) return this._lastBracketsData = [], void (this._lastVersionId = 0);
  45826. var n = this._editor.getModel(), i = n.getVersionId(), o = [];
  45827. this._lastVersionId === i && (o = this._lastBracketsData);
  45828. for (var r = [], s = 0, l = 0, u = e.length; l < u; l++) {
  45829. var d = e[l];
  45830. d.isEmpty() && (r[s++] = d.getStartPosition())
  45831. }
  45832. r.length > 1 && r.sort(a.Position.compare);
  45833. var c = [], h = 0, p = 0, g = o.length;
  45834. for (l = 0, u = r.length; l < u; l++) {
  45835. for (var f = r[l]; p < g && o[p].position.isBefore(f);) p++
  45836. ;
  45837. if (p < g && o[p].position.equals(f)) c[h++] = o[p]; else {
  45838. var m = n.matchBracket(f), v = t._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;
  45839. m || "always" !== this._matchBrackets || (m = n.findEnclosingBrackets(f, 20), v = t._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER), c[h++] = new C(f, m, v)
  45840. }
  45841. }
  45842. this._lastBracketsData = c, this._lastVersionId = i
  45843. }, t.ID = "editor.contrib.bracketMatchingController", t._DECORATION_OPTIONS_WITH_OVERVIEW_RULER = h.ModelDecorationOptions.register({
  45844. stickiness: 1,
  45845. className: "bracket-match",
  45846. overviewRuler: {color: f.themeColorFromId(v), position: c.OverviewRulerLane.Center}
  45847. }), t._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER = h.ModelDecorationOptions.register({
  45848. stickiness: 1,
  45849. className: "bracket-match"
  45850. }), t
  45851. }(o.Disposable);
  45852. t.BracketMatchingController = b, s.registerEditorContribution(b.ID, b), s.registerEditorAction(y), s.registerEditorAction(_), f.registerThemingParticipant((function (e, t) {
  45853. var n = e.getColor(p.editorBracketMatchBackground);
  45854. n && t.addRule(".monaco-editor .bracket-match { background-color: " + n + "; }");
  45855. var i = e.getColor(p.editorBracketMatchBorder)
  45856. ;i && t.addRule(".monaco-editor .bracket-match { border: 1px solid " + i + "; }")
  45857. })), m.MenuRegistry.appendMenuItem(19, {
  45858. group: "5_infile_nav",
  45859. command: {id: "editor.action.jumpToBracket", title: n.localize(3, null)},
  45860. order: 2
  45861. })
  45862. })), define(n[567], i([0, 1, 6, 78, 4, 2, 30, 433, 34, 14, 20, 57, 304]), (function (e, t, n, i, o, s, a, l, u, d, c, p) {
  45863. "use strict";
  45864. var f;
  45865. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  45866. e.Hidden = {type: 0};
  45867. var t = function (e, t, n, i) {
  45868. this.actions = e, this.trigger = t, this.editorPosition = n, this.widgetPosition = i, this.type = 1
  45869. };
  45870. e.Showing = t
  45871. }(f || (f = {}));
  45872. var m = function (e) {
  45873. function t(t, r, s, a) {
  45874. var l = e.call(this) || this;
  45875. return l._editor = t, l._quickFixActionId = r, l._preferredFixActionId = s, l._keybindingService = a, l._onClick = l._register(new o.Emitter), l.onClick = l._onClick.event, l._state = f.Hidden, l._domNode = document.createElement("div"), l._domNode.className = "codicon codicon-lightbulb", l._editor.addContentWidget(l), l._register(l._editor.onDidChangeModelContent((function (e) {
  45876. var t = l._editor.getModel()
  45877. ;(1 !== l.state.type || !t || l.state.editorPosition.lineNumber >= t.getLineCount()) && l.hide()
  45878. }))), p.Gesture.ignoreTarget(l._domNode), l._register(n.addStandardDisposableGenericMouseDownListner(l._domNode, (function (e) {
  45879. if (1 === l.state.type) {
  45880. l._editor.focus(), e.preventDefault();
  45881. var t = n.getDomNodePagePosition(l._domNode), i = t.top, o = t.height,
  45882. r = l._editor.getOption(49), s = Math.floor(r / 3);
  45883. null !== l.state.widgetPosition.position && l.state.widgetPosition.position.lineNumber < l.state.editorPosition.lineNumber && (s += r), l._onClick.fire({
  45884. x: e.posx,
  45885. y: i + o + s,
  45886. actions: l.state.actions,
  45887. trigger: l.state.trigger
  45888. })
  45889. }
  45890. }))), l._register(n.addDisposableListener(l._domNode, "mouseenter", (function (e) {
  45891. if (1 == (1 & e.buttons)) {
  45892. l.hide();
  45893. var t = new i.GlobalMouseMoveMonitor;
  45894. t.startMonitoring(e.target, e.buttons, i.standardMouseMoveMerger, (function () {
  45895. }), (function () {
  45896. t.dispose()
  45897. }))
  45898. }
  45899. }))), l._register(l._editor.onDidChangeConfiguration((function (e) {
  45900. e.hasChanged(47) && !l._editor.getOption(47).enabled && l.hide()
  45901. }))), l._updateLightBulbTitle(),
  45902. l._register(l._keybindingService.onDidUpdateKeybindings(l._updateLightBulbTitle, l)), l
  45903. }
  45904. return r(t, e), t.prototype.dispose = function () {
  45905. e.prototype.dispose.call(this), this._editor.removeContentWidget(this)
  45906. }, t.prototype.getId = function () {
  45907. return "LightBulbWidget"
  45908. }, t.prototype.getDomNode = function () {
  45909. return this._domNode
  45910. }, t.prototype.getPosition = function () {
  45911. return 1 === this._state.type ? this._state.widgetPosition : null
  45912. }, t.prototype.update = function (e, i, o) {
  45913. var r = this;
  45914. if (e.validActions.length <= 0) return this.hide();
  45915. var s = this._editor.getOptions();
  45916. if (!s.get(47).enabled) return this.hide();
  45917. var l = o.lineNumber, u = o.column, d = this._editor.getModel();
  45918. if (!d) return this.hide();
  45919. var c = d.getOptions().tabSize, h = s.get(34), p = d.getLineContent(l),
  45920. g = a.TextModel.computeIndentLevel(p, c), m = function (e) {
  45921. return e > 2 && r._editor.getTopForLineNumber(e) === r._editor.getTopForLineNumber(e - 1)
  45922. }, v = l;
  45923. if (!(h.spaceWidth * g > 22)) if (l > 1 && !m(l - 1)) v -= 1; else if (m(l + 1)) {
  45924. if (u * h.spaceWidth < 22) return this.hide()
  45925. } else v += 1;
  45926. this.state = new f.Showing(e, i, o, {
  45927. position: {
  45928. lineNumber: v,
  45929. column: 1
  45930. }, preference: t._posPref
  45931. }), n.toggleClass(this._domNode, "codicon-lightbulb-autofix", e.hasAutoFix), this._editor.layoutContentWidget(this)
  45932. }, t.prototype.hide = function () {
  45933. this.state = f.Hidden, this._editor.layoutContentWidget(this)
  45934. }, Object.defineProperty(t.prototype, "state", {
  45935. get: function () {
  45936. return this._state
  45937. }, set: function (e) {
  45938. this._state = e, this._updateLightBulbTitle()
  45939. }, enumerable: !0, configurable: !0
  45940. }), t.prototype._updateLightBulbTitle = function () {
  45941. if (1 === this.state.type && this.state.actions.hasAutoFix) {
  45942. var e = this._keybindingService.lookupKeybinding(this._preferredFixActionId);
  45943. if (e) return void (this.title = l.localize(0, null, e.getLabel()))
  45944. }
  45945. var t = this._keybindingService.lookupKeybinding(this._quickFixActionId);
  45946. this.title = t ? l.localize(1, null, t.getLabel()) : l.localize(2, null)
  45947. }, Object.defineProperty(t.prototype, "title", {
  45948. set: function (e) {
  45949. this._domNode.title = e
  45950. }, enumerable: !0, configurable: !0
  45951. }), t._posPref = [0], t = h([g(3, u.IKeybindingService)], t)
  45952. }(s.Disposable);
  45953. t.LightBulbWidget = m, d.registerThemingParticipant((function (e, t) {
  45954. var n = e.getColor(c.editorLightBulbForeground);
  45955. n && t.addRule("\n\t\t.monaco-editor .contentWidgets .codicon-lightbulb {\n\t\t\tcolor: " + n + ";\n\t\t}");
  45956. var i = e.getColor(c.editorLightBulbAutoFixForeground);
  45957. i && t.addRule("\n\t\t.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\n\t\t\tcolor: " + i + ";\n\t\t}")
  45958. }))
  45959. })), define(n[568], i([0, 1, 6, 100, 5, 3, 30, 44, 20, 14, 305]), (function (e, t, n, i, o, r, s, a, l, u) {
  45960. "use strict";
  45961. Object.defineProperty(t, "__esModule", {value: !0});
  45962. var d = function () {
  45963. function e(e, t) {
  45964. this.afterLineNumber = e, this._onHeight = t, this.heightInLines = 1, this.suppressMouseDown = !0, this.domNode = document.createElement("div")
  45965. }
  45966. return e.prototype.onComputedHeight = function (e) {
  45967. void 0 === this._lastHeight ? this._lastHeight = e : this._lastHeight !== e && (this._lastHeight = e, this._onHeight())
  45968. }, e
  45969. }(), c = function () {
  45970. function e(t, n, i) {
  45971. this.allowEditorOverflow = !1, this.suppressMouseDown = !0, this._commands = new Map, this._isEmpty = !0, this._editor = t, this._id = "codelens.widget-" + e._idPool++, this.updatePosition(i),
  45972. this._domNode = document.createElement("span"), this._domNode.className = "codelens-decoration " + n
  45973. }
  45974. return e.prototype.withCommands = function (e, t) {
  45975. this._commands.clear();
  45976. for (var r = "", s = !1, a = 0; a < e.length; a++) {
  45977. var l = e[a];
  45978. if (l && (s = !0, l.command)) {
  45979. var u = i.renderCodicons(o.escape(l.command.title));
  45980. l.command.id ? (r += "<a id=" + a + ">" + u + "</a>", this._commands.set(String(a), l.command)) : r += "<span>" + u + "</span>", a + 1 < e.length && (r += "<span>&#160;|&#160;</span>")
  45981. }
  45982. }
  45983. s ? (r || (r = "&#160;"), this._domNode.innerHTML = r, this._isEmpty && t && n.addClass(this._domNode, "fadein"), this._isEmpty = !1) : this._domNode.innerHTML = "<span>no commands</span>"
  45984. }, e.prototype.getCommand = function (e) {
  45985. return e.parentElement === this._domNode ? this._commands.get(e.id) : void 0
  45986. }, e.prototype.getId = function () {
  45987. return this._id
  45988. }, e.prototype.getDomNode = function () {
  45989. return this._domNode
  45990. }, e.prototype.updatePosition = function (e) {
  45991. var t = this._editor.getModel().getLineFirstNonWhitespaceColumn(e);
  45992. this._widgetPosition = {position: {lineNumber: e, column: t}, preference: [1]}
  45993. },
  45994. e.prototype.getPosition = function () {
  45995. return this._widgetPosition || null
  45996. }, e._idPool = 0, e
  45997. }(), h = function () {
  45998. function e() {
  45999. this._removeDecorations = [], this._addDecorations = [], this._addDecorationsCallbacks = []
  46000. }
  46001. return e.prototype.addDecoration = function (e, t) {
  46002. this._addDecorations.push(e), this._addDecorationsCallbacks.push(t)
  46003. }, e.prototype.removeDecoration = function (e) {
  46004. this._removeDecorations.push(e)
  46005. }, e.prototype.commit = function (e) {
  46006. for (var t = e.deltaDecorations(this._removeDecorations, this._addDecorations), n = 0, i = t.length; n < i; n++) this._addDecorationsCallbacks[n](t[n])
  46007. }, e
  46008. }();
  46009. t.CodeLensHelper = h;
  46010. var p = function () {
  46011. function e(e, t, n, i, o, a) {
  46012. var l, u = this;
  46013. this._isDisposed = !1, this._editor = t, this._className = n, this._data = e, this._decorationIds = [];
  46014. var c = [];
  46015. this._data.forEach((function (e, t) {
  46016. e.symbol.command && c.push(e.symbol), i.addDecoration({
  46017. range: e.symbol.range,
  46018. options: s.ModelDecorationOptions.EMPTY
  46019. }, (function (e) {
  46020. return u._decorationIds[t] = e
  46021. })), l = l ? r.Range.plusRange(l, e.symbol.range) : r.Range.lift(e.symbol.range)
  46022. })),
  46023. this._viewZone = new d(l.startLineNumber - 1, a), this._viewZoneId = o.addZone(this._viewZone), c.length > 0 && (this._createContentWidgetIfNecessary(), this._contentWidget.withCommands(c, !1))
  46024. }
  46025. return e.prototype._createContentWidgetIfNecessary = function () {
  46026. this._contentWidget || (this._contentWidget = new c(this._editor, this._className, this._viewZone.afterLineNumber + 1), this._editor.addContentWidget(this._contentWidget))
  46027. }, e.prototype.dispose = function (e, t) {
  46028. this._decorationIds.forEach(e.removeDecoration, e), this._decorationIds = [], t && t.removeZone(this._viewZoneId), this._contentWidget && (this._editor.removeContentWidget(this._contentWidget), this._contentWidget = void 0), this._isDisposed = !0
  46029. }, e.prototype.isDisposed = function () {
  46030. return this._isDisposed
  46031. }, e.prototype.isValid = function () {
  46032. var e = this;
  46033. return this._decorationIds.some((function (t, n) {
  46034. var i = e._editor.getModel().getDecorationRange(t), o = e._data[n].symbol;
  46035. return !(!i || r.Range.isEmpty(o.range) !== i.isEmpty())
  46036. }))
  46037. }, e.prototype.updateCodeLensSymbols = function (e, t) {
  46038. var n = this
  46039. ;this._decorationIds.forEach(t.removeDecoration, t), this._decorationIds = [], this._data = e, this._data.forEach((function (e, i) {
  46040. t.addDecoration({range: e.symbol.range, options: s.ModelDecorationOptions.EMPTY}, (function (e) {
  46041. return n._decorationIds[i] = e
  46042. }))
  46043. }))
  46044. }, e.prototype.computeIfNecessary = function (e) {
  46045. if (!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone")) return null;
  46046. for (var t = 0; t < this._decorationIds.length; t++) {
  46047. var n = e.getDecorationRange(this._decorationIds[t]);
  46048. n && (this._data[t].symbol.range = n)
  46049. }
  46050. return this._data
  46051. }, e.prototype.updateCommands = function (e) {
  46052. this._createContentWidgetIfNecessary(), this._contentWidget.withCommands(e, !0);
  46053. for (var t = 0; t < this._data.length; t++) {
  46054. var n = e[t];
  46055. if (n) {
  46056. var i = this._data[t].symbol;
  46057. i.command = n.command || i.command
  46058. }
  46059. }
  46060. }, e.prototype.getCommand = function (e) {
  46061. var t;
  46062. return null === (t = this._contentWidget) || void 0 === t ? void 0 : t.getCommand(e)
  46063. }, e.prototype.getLineNumber = function () {
  46064. var e = this._editor.getModel().getDecorationRange(this._decorationIds[0]);
  46065. return e ? e.startLineNumber : -1
  46066. },
  46067. e.prototype.update = function (e) {
  46068. if (this.isValid()) {
  46069. var t = this._editor.getModel().getDecorationRange(this._decorationIds[0]);
  46070. t && (this._viewZone.afterLineNumber = t.startLineNumber - 1, e.layoutZone(this._viewZoneId), this._contentWidget && (this._contentWidget.updatePosition(t.startLineNumber), this._editor.layoutContentWidget(this._contentWidget)))
  46071. }
  46072. }, e
  46073. }();
  46074. t.CodeLensWidget = p, u.registerThemingParticipant((function (e, t) {
  46075. var n = e.getColor(a.editorCodeLensForeground);
  46076. n && (t.addRule(".monaco-editor .codelens-decoration { color: " + n + "; }"), t.addRule(".monaco-editor .codelens-decoration .codicon { color: " + n + "; }"));
  46077. var i = e.getColor(l.editorActiveLinkForeground);
  46078. i && (t.addRule(".monaco-editor .codelens-decoration > a:hover { color: " + i + " !important; }"), t.addRule(".monaco-editor .codelens-decoration > a:hover .codicon { color: " + i + " !important; }"))
  46079. }))
  46080. }));
  46081. a = this && this.__spreadArrays || function () {
  46082. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  46083. var i = Array(e), o = 0
  46084. ;
  46085. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  46086. return i
  46087. };
  46088. define(n[569], i([0, 1, 15, 10, 2, 67, 12, 17, 221, 568, 29, 35, 529, 6, 125]), (function (e, t, n, i, o, r, s, l, u, d, c, p, f, m, v) {
  46089. "use strict";
  46090. Object.defineProperty(t, "__esModule", {value: !0});
  46091. var _ = function () {
  46092. function e(e, t, n, i) {
  46093. var r = this;
  46094. this._editor = e, this._commandService = t, this._notificationService = n, this._codeLensCache = i, this._globalToDispose = new o.DisposableStore, this._localToDispose = new o.DisposableStore, this._lenses = [], this._oldCodeLensModels = new o.DisposableStore, this._modelChangeCounter = 0, this._isEnabled = this._editor.getOption(11), this._globalToDispose.add(this._editor.onDidChangeModel((function () {
  46095. return r._onModelChange()
  46096. }))), this._globalToDispose.add(this._editor.onDidChangeModelLanguage((function () {
  46097. return r._onModelChange()
  46098. }))), this._globalToDispose.add(this._editor.onDidChangeConfiguration((function () {
  46099. var e = r._isEnabled;
  46100. r._isEnabled = r._editor.getOption(11), e !== r._isEnabled && r._onModelChange()
  46101. }))),
  46102. this._globalToDispose.add(l.CodeLensProviderRegistry.onDidChange(this._onModelChange, this)), this._globalToDispose.add(this._editor.onDidChangeConfiguration((function (e) {
  46103. e.hasChanged(34) && r._updateLensStyle()
  46104. }))), this._onModelChange(), this._styleClassName = v.hash(this._editor.getId()).toString(16), this._styleElement = m.createStyleSheet(m.isInShadowDOM(this._editor.getContainerDomNode()) ? this._editor.getContainerDomNode() : void 0), this._updateLensStyle()
  46105. }
  46106. return e.prototype.dispose = function () {
  46107. this._localDispose(), this._globalToDispose.dispose(), this._oldCodeLensModels.dispose(), o.dispose(this._currentCodeLensModel)
  46108. }, e.prototype._updateLensStyle = function () {
  46109. var e = this._editor.getOptions(), t = e.get(34), n = e.get(49), i = Math.round(1.1 * n),
  46110. o = Math.round(.9 * t.fontSize),
  46111. r = "\n\t\t.monaco-editor .codelens-decoration." + this._styleClassName + " { height: " + i + "px; line-height: " + n + "px; font-size: " + o + "px; padding-right: " + Math.round(.45 * t.fontSize) + "px;}\n\t\t.monaco-editor .codelens-decoration." + this._styleClassName + " > a > .codicon { line-height: " + n + "px; font-size: " + o + "px; }\n\t\t";
  46112. this._styleElement.innerHTML = r
  46113. }, e.prototype._localDispose = function () {
  46114. this._currentFindCodeLensSymbolsPromise && (this._currentFindCodeLensSymbolsPromise.cancel(), this._currentFindCodeLensSymbolsPromise = void 0, this._modelChangeCounter++), this._currentResolveCodeLensSymbolsPromise && (this._currentResolveCodeLensSymbolsPromise.cancel(), this._currentResolveCodeLensSymbolsPromise = void 0), this._localToDispose.clear(), this._oldCodeLensModels.clear(), o.dispose(this._currentCodeLensModel)
  46115. }, e.prototype._onModelChange = function () {
  46116. var e = this;
  46117. this._localDispose();
  46118. var t = this._editor.getModel()
  46119. ;
  46120. if (t && this._isEnabled) {
  46121. var s = this._codeLensCache.get(t);
  46122. if (s && this._renderCodeLensSymbols(s), l.CodeLensProviderRegistry.has(t)) {
  46123. for (var c = 0, h = l.CodeLensProviderRegistry.all(t); c < h.length; c++) {
  46124. var p = h[c];
  46125. if ("function" == typeof p.onDidChange) {
  46126. var g = p.onDidChange((function () {
  46127. return m.schedule()
  46128. }));
  46129. this._localToDispose.add(g)
  46130. }
  46131. }
  46132. var f = this._detectVisibleLenses = new n.RunOnceScheduler((function () {
  46133. return e._onViewportChanged()
  46134. }), 250), m = new n.RunOnceScheduler((function () {
  46135. var o = ++e._modelChangeCounter;
  46136. e._currentFindCodeLensSymbolsPromise && e._currentFindCodeLensSymbolsPromise.cancel(), e._currentFindCodeLensSymbolsPromise = n.createCancelablePromise((function (e) {
  46137. return u.getCodeLensData(t, e)
  46138. })), e._currentFindCodeLensSymbolsPromise.then((function (n) {
  46139. o === e._modelChangeCounter && (e._currentCodeLensModel && e._oldCodeLensModels.add(e._currentCodeLensModel), e._currentCodeLensModel = n, e._codeLensCache.put(t, n), e._renderCodeLensSymbols(n), f.schedule())
  46140. }), i.onUnexpectedError)
  46141. }), 250);
  46142. this._localToDispose.add(m),
  46143. this._localToDispose.add(f), this._localToDispose.add(this._editor.onDidChangeModelContent((function () {
  46144. e._editor.changeDecorations((function (t) {
  46145. e._editor.changeViewZones((function (n) {
  46146. var i = [], o = -1;
  46147. e._lenses.forEach((function (e) {
  46148. e.isValid() && o !== e.getLineNumber() ? (e.update(n), o = e.getLineNumber()) : i.push(e)
  46149. }));
  46150. var r = new d.CodeLensHelper;
  46151. i.forEach((function (t) {
  46152. t.dispose(r, n), e._lenses.splice(e._lenses.indexOf(t), 1)
  46153. })), r.commit(t)
  46154. }))
  46155. })), f.schedule(), m.schedule()
  46156. }))), this._localToDispose.add(this._editor.onDidScrollChange((function (t) {
  46157. t.scrollTopChanged && e._lenses.length > 0 && f.schedule()
  46158. }))), this._localToDispose.add(this._editor.onDidLayoutChange((function () {
  46159. f.schedule()
  46160. }))), this._localToDispose.add(o.toDisposable((function () {
  46161. if (e._editor.getModel()) {
  46162. var t = r.StableEditorScrollState.capture(e._editor);
  46163. e._editor.changeDecorations((function (t) {
  46164. e._editor.changeViewZones((function (n) {
  46165. e._disposeAllLenses(t, n)
  46166. }))
  46167. })), t.restore(e._editor)
  46168. } else e._disposeAllLenses(void 0, void 0)
  46169. }))),
  46170. this._localToDispose.add(this._editor.onMouseUp((function (t) {
  46171. var n;
  46172. if (9 === t.target.type) {
  46173. var i = t.target.element;
  46174. if ("SPAN" === (null == i ? void 0 : i.tagName) && (i = i.parentElement), "A" === (null == i ? void 0 : i.tagName)) for (var o = 0, r = e._lenses; o < r.length; o++) {
  46175. var s = r[o].getCommand(i);
  46176. if (s) {
  46177. (n = e._commandService).executeCommand.apply(n, a([s.id], s.arguments || [])).catch((function (t) {
  46178. return e._notificationService.error(t)
  46179. }));
  46180. break
  46181. }
  46182. }
  46183. }
  46184. }))), m.schedule()
  46185. } else s && this._localToDispose.add(n.disposableTimeout((function () {
  46186. var n = e._codeLensCache.get(t);
  46187. s === n && (e._codeLensCache.delete(t), e._onModelChange())
  46188. }), 3e4))
  46189. }
  46190. }, e.prototype._disposeAllLenses = function (e, t) {
  46191. for (var n = new d.CodeLensHelper, i = 0, o = this._lenses; i < o.length; i++) {
  46192. o[i].dispose(n, t)
  46193. }
  46194. e && n.commit(e), this._lenses = []
  46195. }, e.prototype._renderCodeLensSymbols = function (e) {
  46196. var t = this;
  46197. if (this._editor.hasModel()) {
  46198. for (var n, i = this._editor.getModel().getLineCount(), o = [], s = 0, a = e.lenses; s < a.length; s++) {
  46199. var l = a[s], u = l.symbol.range.startLineNumber
  46200. ;u < 1 || u > i || (n && n[n.length - 1].symbol.range.startLineNumber === u ? n.push(l) : (n = [l], o.push(n)))
  46201. }
  46202. var c = r.StableEditorScrollState.capture(this._editor);
  46203. this._editor.changeDecorations((function (e) {
  46204. t._editor.changeViewZones((function (n) {
  46205. for (var i = new d.CodeLensHelper, r = 0, s = 0; s < o.length && r < t._lenses.length;) {
  46206. var a = o[s][0].symbol.range.startLineNumber, l = t._lenses[r].getLineNumber();
  46207. l < a ? (t._lenses[r].dispose(i, n), t._lenses.splice(r, 1)) : l === a ? (t._lenses[r].updateCodeLensSymbols(o[s], i), s++, r++) : (t._lenses.splice(r, 0, new d.CodeLensWidget(o[s], t._editor, t._styleClassName, i, n, (function () {
  46208. return t._detectVisibleLenses && t._detectVisibleLenses.schedule()
  46209. }))), r++, s++)
  46210. }
  46211. for (; r < t._lenses.length;) t._lenses[r].dispose(i, n), t._lenses.splice(r, 1);
  46212. for (; s < o.length;) t._lenses.push(new d.CodeLensWidget(o[s], t._editor, t._styleClassName, i, n, (function () {
  46213. return t._detectVisibleLenses && t._detectVisibleLenses.schedule()
  46214. }))), s++;
  46215. i.commit(e)
  46216. }))
  46217. })), c.restore(this._editor)
  46218. }
  46219. }, e.prototype._onViewportChanged = function () {
  46220. var e = this
  46221. ;this._currentResolveCodeLensSymbolsPromise && (this._currentResolveCodeLensSymbolsPromise.cancel(), this._currentResolveCodeLensSymbolsPromise = void 0);
  46222. var t = this._editor.getModel();
  46223. if (t) {
  46224. var o = [], r = [];
  46225. if (this._lenses.forEach((function (e) {
  46226. var n = e.computeIfNecessary(t);
  46227. n && (o.push(n), r.push(e))
  46228. })), 0 !== o.length) {
  46229. var s = n.createCancelablePromise((function (e) {
  46230. var n = o.map((function (n, o) {
  46231. var s = new Array(n.length), a = n.map((function (n, o) {
  46232. return n.symbol.command || "function" != typeof n.provider.resolveCodeLens ? (s[o] = n.symbol, Promise.resolve(void 0)) : Promise.resolve(n.provider.resolveCodeLens(t, n.symbol, e)).then((function (e) {
  46233. s[o] = e
  46234. }), i.onUnexpectedExternalError)
  46235. }));
  46236. return Promise.all(a).then((function () {
  46237. e.isCancellationRequested || r[o].isDisposed() || r[o].updateCommands(s)
  46238. }))
  46239. }));
  46240. return Promise.all(n)
  46241. }));
  46242. this._currentResolveCodeLensSymbolsPromise = s, this._currentResolveCodeLensSymbolsPromise.then((function () {
  46243. e._currentCodeLensModel && e._codeLensCache.put(t, e._currentCodeLensModel), e._oldCodeLensModels.clear(),
  46244. s === e._currentResolveCodeLensSymbolsPromise && (e._currentResolveCodeLensSymbolsPromise = void 0)
  46245. }), (function (t) {
  46246. i.onUnexpectedError(t), s === e._currentResolveCodeLensSymbolsPromise && (e._currentResolveCodeLensSymbolsPromise = void 0)
  46247. }))
  46248. }
  46249. }
  46250. }, e.ID = "css.editor.codeLens", e = h([g(1, c.ICommandService), g(2, p.INotificationService), g(3, f.ICodeLensCache)], e)
  46251. }();
  46252. t.CodeLensContribution = _, s.registerEditorContribution(_.ID, _)
  46253. })), define(n[570], i([0, 1, 24, 6, 78, 47, 27, 4, 2, 20, 14, 306]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  46254. "use strict";
  46255. Object.defineProperty(t, "__esModule", {value: !0});
  46256. var h = i.$, p = function (e) {
  46257. function t(t, n, o) {
  46258. var r = e.call(this) || this;
  46259. r.model = n, r.domNode = h(".colorpicker-header"), i.append(t, r.domNode), r.pickedColorNode = i.append(r.domNode, h(".picked-color"));
  46260. var s = i.append(r.domNode, h(".original-color"));
  46261. return s.style.backgroundColor = a.Color.Format.CSS.format(r.model.originalColor) || "", r.backgroundColor = o.getTheme().getColor(d.editorHoverBackground) || a.Color.white, r._register(c.registerThemingParticipant((function (e, t) {
  46262. r.backgroundColor = e.getColor(d.editorHoverBackground) || a.Color.white
  46263. }))), r._register(i.addDisposableListener(r.pickedColorNode, i.EventType.CLICK, (function () {
  46264. return r.model.selectNextColorPresentation()
  46265. }))), r._register(i.addDisposableListener(s, i.EventType.CLICK, (function () {
  46266. r.model.color = r.model.originalColor, r.model.flushColor()
  46267. }))), r._register(n.onDidChangeColor(r.onDidChangeColor, r)), r._register(n.onDidChangePresentation(r.onDidChangePresentation, r)), r.pickedColorNode.style.backgroundColor = a.Color.Format.CSS.format(n.color) || "", i.toggleClass(r.pickedColorNode, "light", n.color.rgba.a < .5 ? r.backgroundColor.isLighter() : n.color.isLighter()), r
  46268. }
  46269. return r(t, e), t.prototype.onDidChangeColor = function (e) {
  46270. this.pickedColorNode.style.backgroundColor = a.Color.Format.CSS.format(e) || "", i.toggleClass(this.pickedColorNode, "light", e.rgba.a < .5 ? this.backgroundColor.isLighter() : e.isLighter()), this.onDidChangePresentation()
  46271. }, t.prototype.onDidChangePresentation = function () {
  46272. this.pickedColorNode.textContent = this.model.presentation ? this.model.presentation.label : ""
  46273. }, t
  46274. }(u.Disposable);
  46275. t.ColorPickerHeader = p;
  46276. var g = function (e) {
  46277. function t(t, n, o) {
  46278. var r = e.call(this) || this;
  46279. return r.model = n, r.pixelRatio = o, r.domNode = h(".colorpicker-body"), i.append(t, r.domNode), r.saturationBox = new f(r.domNode, r.model, r.pixelRatio), r._register(r.saturationBox), r._register(r.saturationBox.onDidChange(r.onDidSaturationValueChange, r)), r._register(r.saturationBox.onColorFlushed(r.flushColor, r)), r.opacityStrip = new v(r.domNode, r.model), r._register(r.opacityStrip), r._register(r.opacityStrip.onDidChange(r.onDidOpacityChange, r)), r._register(r.opacityStrip.onColorFlushed(r.flushColor, r)), r.hueStrip = new _(r.domNode, r.model), r._register(r.hueStrip), r._register(r.hueStrip.onDidChange(r.onDidHueChange, r)), r._register(r.hueStrip.onColorFlushed(r.flushColor, r)), r
  46280. }
  46281. return r(t, e), t.prototype.flushColor = function () {
  46282. this.model.flushColor()
  46283. }, t.prototype.onDidSaturationValueChange = function (e) {
  46284. var t = e.s, n = e.v, i = this.model.color.hsva
  46285. ;this.model.color = new a.Color(new a.HSVA(i.h, t, n, i.a))
  46286. }, t.prototype.onDidOpacityChange = function (e) {
  46287. var t = this.model.color.hsva;
  46288. this.model.color = new a.Color(new a.HSVA(t.h, t.s, t.v, e))
  46289. }, t.prototype.onDidHueChange = function (e) {
  46290. var t = this.model.color.hsva, n = 360 * (1 - e);
  46291. this.model.color = new a.Color(new a.HSVA(360 === n ? 0 : n, t.s, t.v, t.a))
  46292. }, t.prototype.layout = function () {
  46293. this.saturationBox.layout(), this.opacityStrip.layout(), this.hueStrip.layout()
  46294. }, t
  46295. }(u.Disposable);
  46296. t.ColorPickerBody = g;
  46297. var f = function (e) {
  46298. function t(t, n, o) {
  46299. var r = e.call(this) || this;
  46300. return r.model = n, r.pixelRatio = o, r._onDidChange = new l.Emitter, r.onDidChange = r._onDidChange.event, r._onColorFlushed = new l.Emitter, r.onColorFlushed = r._onColorFlushed.event, r.domNode = h(".saturation-wrap"), i.append(t, r.domNode), r.canvas = document.createElement("canvas"), r.canvas.className = "saturation-box", i.append(r.domNode, r.canvas), r.selection = h(".saturation-selection"), i.append(r.domNode, r.selection), r.layout(), r._register(i.addDisposableGenericMouseDownListner(r.domNode, (function (e) {
  46301. return r.onMouseDown(e)
  46302. }))), r._register(r.model.onDidChangeColor(r.onDidChangeColor, r)), r.monitor = null, r
  46303. }
  46304. return r(t, e), t.prototype.onMouseDown = function (e) {
  46305. var t = this;
  46306. this.monitor = this._register(new o.GlobalMouseMoveMonitor);
  46307. var n = i.getDomNodePagePosition(this.domNode);
  46308. e.target !== this.selection && this.onDidChangePosition(e.offsetX, e.offsetY), this.monitor.startMonitoring(e.target, e.buttons, o.standardMouseMoveMerger, (function (e) {
  46309. return t.onDidChangePosition(e.posx - n.left, e.posy - n.top)
  46310. }), (function () {
  46311. return null
  46312. }));
  46313. var r = i.addDisposableGenericMouseUpListner(document, (function () {
  46314. t._onColorFlushed.fire(), r.dispose(), t.monitor && (t.monitor.stopMonitoring(!0), t.monitor = null)
  46315. }), !0)
  46316. }, t.prototype.onDidChangePosition = function (e, t) {
  46317. var n = Math.max(0, Math.min(1, e / this.width)), i = Math.max(0, Math.min(1, 1 - t / this.height));
  46318. this.paintSelection(n, i), this._onDidChange.fire({s: n, v: i})
  46319. }, t.prototype.layout = function () {
  46320. this.width = this.domNode.offsetWidth, this.height = this.domNode.offsetHeight, this.canvas.width = this.width * this.pixelRatio,
  46321. this.canvas.height = this.height * this.pixelRatio, this.paint();
  46322. var e = this.model.color.hsva;
  46323. this.paintSelection(e.s, e.v)
  46324. }, t.prototype.paint = function () {
  46325. var e = this.model.color.hsva, t = new a.Color(new a.HSVA(e.h, 1, 1, 1)),
  46326. n = this.canvas.getContext("2d"), i = n.createLinearGradient(0, 0, this.canvas.width, 0);
  46327. i.addColorStop(0, "rgba(255, 255, 255, 1)"), i.addColorStop(.5, "rgba(255, 255, 255, 0.5)"), i.addColorStop(1, "rgba(255, 255, 255, 0)");
  46328. var o = n.createLinearGradient(0, 0, 0, this.canvas.height);
  46329. o.addColorStop(0, "rgba(0, 0, 0, 0)"), o.addColorStop(1, "rgba(0, 0, 0, 1)"), n.rect(0, 0, this.canvas.width, this.canvas.height), n.fillStyle = a.Color.Format.CSS.format(t), n.fill(), n.fillStyle = i, n.fill(), n.fillStyle = o, n.fill()
  46330. }, t.prototype.paintSelection = function (e, t) {
  46331. this.selection.style.left = e * this.width + "px", this.selection.style.top = this.height - t * this.height + "px"
  46332. }, t.prototype.onDidChangeColor = function () {
  46333. this.monitor && this.monitor.isMonitoring() || this.paint()
  46334. }, t
  46335. }(u.Disposable), m = function (e) {
  46336. function t(t, n) {
  46337. var o = e.call(this) || this
  46338. ;
  46339. return o.model = n, o._onDidChange = new l.Emitter, o.onDidChange = o._onDidChange.event, o._onColorFlushed = new l.Emitter, o.onColorFlushed = o._onColorFlushed.event, o.domNode = i.append(t, h(".strip")), o.overlay = i.append(o.domNode, h(".overlay")), o.slider = i.append(o.domNode, h(".slider")), o.slider.style.top = "0px", o._register(i.addDisposableGenericMouseDownListner(o.domNode, (function (e) {
  46340. return o.onMouseDown(e)
  46341. }))), o.layout(), o
  46342. }
  46343. return r(t, e), t.prototype.layout = function () {
  46344. this.height = this.domNode.offsetHeight - this.slider.offsetHeight;
  46345. var e = this.getValue(this.model.color);
  46346. this.updateSliderPosition(e)
  46347. }, t.prototype.onMouseDown = function (e) {
  46348. var t = this, n = this._register(new o.GlobalMouseMoveMonitor),
  46349. r = i.getDomNodePagePosition(this.domNode);
  46350. i.addClass(this.domNode, "grabbing"), e.target !== this.slider && this.onDidChangeTop(e.offsetY), n.startMonitoring(e.target, e.buttons, o.standardMouseMoveMerger, (function (e) {
  46351. return t.onDidChangeTop(e.posy - r.top)
  46352. }), (function () {
  46353. return null
  46354. }));
  46355. var s = i.addDisposableGenericMouseUpListner(document, (function () {
  46356. t._onColorFlushed.fire(), s.dispose(), n.stopMonitoring(!0), i.removeClass(t.domNode, "grabbing")
  46357. }), !0)
  46358. }, t.prototype.onDidChangeTop = function (e) {
  46359. var t = Math.max(0, Math.min(1, 1 - e / this.height));
  46360. this.updateSliderPosition(t), this._onDidChange.fire(t)
  46361. }, t.prototype.updateSliderPosition = function (e) {
  46362. this.slider.style.top = (1 - e) * this.height + "px"
  46363. }, t
  46364. }(u.Disposable), v = function (e) {
  46365. function t(t, n) {
  46366. var o = e.call(this, t, n) || this;
  46367. return i.addClass(o.domNode, "opacity-strip"), o._register(n.onDidChangeColor(o.onDidChangeColor, o)), o.onDidChangeColor(o.model.color), o
  46368. }
  46369. return r(t, e), t.prototype.onDidChangeColor = function (e) {
  46370. var t = e.rgba, n = t.r, i = t.g, o = t.b, r = new a.Color(new a.RGBA(n, i, o, 1)),
  46371. s = new a.Color(new a.RGBA(n, i, o, 0));
  46372. this.overlay.style.background = "linear-gradient(to bottom, " + r + " 0%, " + s + " 100%)"
  46373. }, t.prototype.getValue = function (e) {
  46374. return e.hsva.a
  46375. }, t
  46376. }(m), _ = function (e) {
  46377. function t(t, n) {
  46378. var o = e.call(this, t, n) || this;
  46379. return i.addClass(o.domNode, "hue-strip"), o
  46380. }
  46381. return r(t, e), t.prototype.getValue = function (e) {
  46382. return 1 - e.hsva.h / 360
  46383. }, t
  46384. }(m), y = function (e) {
  46385. function t(t, i, o, r) {
  46386. var s = e.call(this) || this;
  46387. s.model = i, s.pixelRatio = o, s._register(n.onDidChangeZoomLevel((function () {
  46388. return s.layout()
  46389. })));
  46390. var a = h(".colorpicker-widget");
  46391. t.appendChild(a);
  46392. var l = new p(a, s.model, r);
  46393. return s.body = new g(a, s.model, s.pixelRatio), s._register(l), s._register(s.body), s
  46394. }
  46395. return r(t, e), t.prototype.layout = function () {
  46396. this.body.layout()
  46397. }, t
  46398. }(s.Widget);
  46399. t.ColorPickerWidget = y
  46400. })), define(n[231], i([0, 1, 437, 14, 20, 308, 309]), (function (e, t, n, i, o) {
  46401. "use strict";
  46402. Object.defineProperty(t, "__esModule", {value: !0}), t.SYMBOL_ICON_ARRAY_FOREGROUND = o.registerColor("symbolIcon.arrayForeground", {
  46403. dark: o.foreground,
  46404. light: o.foreground,
  46405. hc: o.foreground
  46406. }, n.localize(0, null)), t.SYMBOL_ICON_BOOLEAN_FOREGROUND = o.registerColor("symbolIcon.booleanForeground", {
  46407. dark: o.foreground,
  46408. light: o.foreground,
  46409. hc: o.foreground
  46410. }, n.localize(1, null)), t.SYMBOL_ICON_CLASS_FOREGROUND = o.registerColor("symbolIcon.classForeground", {
  46411. dark: "#EE9D28",
  46412. light: "#D67E00",
  46413. hc: "#EE9D28"
  46414. }, n.localize(2, null)),
  46415. t.SYMBOL_ICON_COLOR_FOREGROUND = o.registerColor("symbolIcon.colorForeground", {
  46416. dark: o.foreground,
  46417. light: o.foreground,
  46418. hc: o.foreground
  46419. }, n.localize(3, null)), t.SYMBOL_ICON_CONSTANT_FOREGROUND = o.registerColor("symbolIcon.constantForeground", {
  46420. dark: o.foreground,
  46421. light: o.foreground,
  46422. hc: o.foreground
  46423. }, n.localize(4, null)), t.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND = o.registerColor("symbolIcon.constructorForeground", {
  46424. dark: "#B180D7",
  46425. light: "#652D90",
  46426. hc: "#B180D7"
  46427. }, n.localize(5, null)), t.SYMBOL_ICON_ENUMERATOR_FOREGROUND = o.registerColor("symbolIcon.enumeratorForeground", {
  46428. dark: "#EE9D28",
  46429. light: "#D67E00",
  46430. hc: "#EE9D28"
  46431. }, n.localize(6, null)), t.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND = o.registerColor("symbolIcon.enumeratorMemberForeground", {
  46432. dark: "#75BEFF",
  46433. light: "#007ACC",
  46434. hc: "#75BEFF"
  46435. }, n.localize(7, null)), t.SYMBOL_ICON_EVENT_FOREGROUND = o.registerColor("symbolIcon.eventForeground", {
  46436. dark: "#EE9D28",
  46437. light: "#D67E00",
  46438. hc: "#EE9D28"
  46439. }, n.localize(8, null)), t.SYMBOL_ICON_FIELD_FOREGROUND = o.registerColor("symbolIcon.fieldForeground", {
  46440. dark: "#75BEFF",
  46441. light: "#007ACC", hc: "#75BEFF"
  46442. }, n.localize(9, null)), t.SYMBOL_ICON_FILE_FOREGROUND = o.registerColor("symbolIcon.fileForeground", {
  46443. dark: o.foreground,
  46444. light: o.foreground,
  46445. hc: o.foreground
  46446. }, n.localize(10, null)), t.SYMBOL_ICON_FOLDER_FOREGROUND = o.registerColor("symbolIcon.folderForeground", {
  46447. dark: o.foreground,
  46448. light: o.foreground,
  46449. hc: o.foreground
  46450. }, n.localize(11, null)), t.SYMBOL_ICON_FUNCTION_FOREGROUND = o.registerColor("symbolIcon.functionForeground", {
  46451. dark: "#B180D7",
  46452. light: "#652D90",
  46453. hc: "#B180D7"
  46454. }, n.localize(12, null)), t.SYMBOL_ICON_INTERFACE_FOREGROUND = o.registerColor("symbolIcon.interfaceForeground", {
  46455. dark: "#75BEFF",
  46456. light: "#007ACC",
  46457. hc: "#75BEFF"
  46458. }, n.localize(13, null)), t.SYMBOL_ICON_KEY_FOREGROUND = o.registerColor("symbolIcon.keyForeground", {
  46459. dark: o.foreground,
  46460. light: o.foreground,
  46461. hc: o.foreground
  46462. }, n.localize(14, null)), t.SYMBOL_ICON_KEYWORD_FOREGROUND = o.registerColor("symbolIcon.keywordForeground", {
  46463. dark: o.foreground,
  46464. light: o.foreground,
  46465. hc: o.foreground
  46466. }, n.localize(15, null)),
  46467. t.SYMBOL_ICON_METHOD_FOREGROUND = o.registerColor("symbolIcon.methodForeground", {
  46468. dark: "#B180D7",
  46469. light: "#652D90",
  46470. hc: "#B180D7"
  46471. }, n.localize(16, null)), t.SYMBOL_ICON_MODULE_FOREGROUND = o.registerColor("symbolIcon.moduleForeground", {
  46472. dark: o.foreground,
  46473. light: o.foreground,
  46474. hc: o.foreground
  46475. }, n.localize(17, null)), t.SYMBOL_ICON_NAMESPACE_FOREGROUND = o.registerColor("symbolIcon.namespaceForeground", {
  46476. dark: o.foreground,
  46477. light: o.foreground,
  46478. hc: o.foreground
  46479. }, n.localize(18, null)), t.SYMBOL_ICON_NULL_FOREGROUND = o.registerColor("symbolIcon.nullForeground", {
  46480. dark: o.foreground,
  46481. light: o.foreground,
  46482. hc: o.foreground
  46483. }, n.localize(19, null)), t.SYMBOL_ICON_NUMBER_FOREGROUND = o.registerColor("symbolIcon.numberForeground", {
  46484. dark: o.foreground,
  46485. light: o.foreground,
  46486. hc: o.foreground
  46487. }, n.localize(20, null)), t.SYMBOL_ICON_OBJECT_FOREGROUND = o.registerColor("symbolIcon.objectForeground", {
  46488. dark: o.foreground,
  46489. light: o.foreground,
  46490. hc: o.foreground
  46491. }, n.localize(21, null)), t.SYMBOL_ICON_OPERATOR_FOREGROUND = o.registerColor("symbolIcon.operatorForeground", {
  46492. dark: o.foreground,
  46493. light: o.foreground, hc: o.foreground
  46494. }, n.localize(22, null)), t.SYMBOL_ICON_PACKAGE_FOREGROUND = o.registerColor("symbolIcon.packageForeground", {
  46495. dark: o.foreground,
  46496. light: o.foreground,
  46497. hc: o.foreground
  46498. }, n.localize(23, null)), t.SYMBOL_ICON_PROPERTY_FOREGROUND = o.registerColor("symbolIcon.propertyForeground", {
  46499. dark: o.foreground,
  46500. light: o.foreground,
  46501. hc: o.foreground
  46502. }, n.localize(24, null)), t.SYMBOL_ICON_REFERENCE_FOREGROUND = o.registerColor("symbolIcon.referenceForeground", {
  46503. dark: o.foreground,
  46504. light: o.foreground,
  46505. hc: o.foreground
  46506. }, n.localize(25, null)), t.SYMBOL_ICON_SNIPPET_FOREGROUND = o.registerColor("symbolIcon.snippetForeground", {
  46507. dark: o.foreground,
  46508. light: o.foreground,
  46509. hc: o.foreground
  46510. }, n.localize(26, null)), t.SYMBOL_ICON_STRING_FOREGROUND = o.registerColor("symbolIcon.stringForeground", {
  46511. dark: o.foreground,
  46512. light: o.foreground,
  46513. hc: o.foreground
  46514. }, n.localize(27, null)), t.SYMBOL_ICON_STRUCT_FOREGROUND = o.registerColor("symbolIcon.structForeground", {
  46515. dark: o.foreground,
  46516. light: o.foreground,
  46517. hc: o.foreground
  46518. }, n.localize(28, null)),
  46519. t.SYMBOL_ICON_TEXT_FOREGROUND = o.registerColor("symbolIcon.textForeground", {
  46520. dark: o.foreground,
  46521. light: o.foreground,
  46522. hc: o.foreground
  46523. }, n.localize(29, null)), t.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND = o.registerColor("symbolIcon.typeParameterForeground", {
  46524. dark: o.foreground,
  46525. light: o.foreground,
  46526. hc: o.foreground
  46527. }, n.localize(30, null)), t.SYMBOL_ICON_UNIT_FOREGROUND = o.registerColor("symbolIcon.unitForeground", {
  46528. dark: o.foreground,
  46529. light: o.foreground,
  46530. hc: o.foreground
  46531. }, n.localize(31, null)), t.SYMBOL_ICON_VARIABLE_FOREGROUND = o.registerColor("symbolIcon.variableForeground", {
  46532. dark: "#75BEFF",
  46533. light: "#007ACC",
  46534. hc: "#75BEFF"
  46535. }, n.localize(32, null)), i.registerThemingParticipant((function (e, n) {
  46536. var i = e.getColor(t.SYMBOL_ICON_ARRAY_FOREGROUND);
  46537. i && n.addRule(".codicon-symbol-array { color: " + i + " !important; }");
  46538. var o = e.getColor(t.SYMBOL_ICON_BOOLEAN_FOREGROUND);
  46539. o && n.addRule(".codicon-symbol-boolean { color: " + o + " !important; }");
  46540. var r = e.getColor(t.SYMBOL_ICON_CLASS_FOREGROUND);
  46541. r && n.addRule(".codicon-symbol-class { color: " + r + " !important; }")
  46542. ;var s = e.getColor(t.SYMBOL_ICON_METHOD_FOREGROUND);
  46543. s && n.addRule(".codicon-symbol-method { color: " + s + " !important; }");
  46544. var a = e.getColor(t.SYMBOL_ICON_COLOR_FOREGROUND);
  46545. a && n.addRule(".codicon-symbol-color { color: " + a + " !important; }");
  46546. var l = e.getColor(t.SYMBOL_ICON_CONSTANT_FOREGROUND);
  46547. l && n.addRule(".codicon-symbol-constant { color: " + l + " !important; }");
  46548. var u = e.getColor(t.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);
  46549. u && n.addRule(".codicon-symbol-constructor { color: " + u + " !important; }");
  46550. var d = e.getColor(t.SYMBOL_ICON_ENUMERATOR_FOREGROUND);
  46551. d && n.addRule("\n\t\t\t.codicon-symbol-value,.codicon-symbol-enum { color: " + d + " !important; }");
  46552. var c = e.getColor(t.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);
  46553. c && n.addRule(".codicon-symbol-enum-member { color: " + c + " !important; }");
  46554. var h = e.getColor(t.SYMBOL_ICON_EVENT_FOREGROUND);
  46555. h && n.addRule(".codicon-symbol-event { color: " + h + " !important; }");
  46556. var p = e.getColor(t.SYMBOL_ICON_FIELD_FOREGROUND);
  46557. p && n.addRule(".codicon-symbol-field { color: " + p + " !important; }")
  46558. ;var g = e.getColor(t.SYMBOL_ICON_FILE_FOREGROUND);
  46559. g && n.addRule(".codicon-symbol-file { color: " + g + " !important; }");
  46560. var f = e.getColor(t.SYMBOL_ICON_FOLDER_FOREGROUND);
  46561. f && n.addRule(".codicon-symbol-folder { color: " + f + " !important; }");
  46562. var m = e.getColor(t.SYMBOL_ICON_FUNCTION_FOREGROUND);
  46563. m && n.addRule(".codicon-symbol-function { color: " + m + " !important; }");
  46564. var v = e.getColor(t.SYMBOL_ICON_INTERFACE_FOREGROUND);
  46565. v && n.addRule(".codicon-symbol-interface { color: " + v + " !important; }");
  46566. var _ = e.getColor(t.SYMBOL_ICON_KEY_FOREGROUND);
  46567. _ && n.addRule(".codicon-symbol-key { color: " + _ + " !important; }");
  46568. var y = e.getColor(t.SYMBOL_ICON_KEYWORD_FOREGROUND);
  46569. y && n.addRule(".codicon-symbol-keyword { color: " + y + " !important; }");
  46570. var C = e.getColor(t.SYMBOL_ICON_MODULE_FOREGROUND);
  46571. C && n.addRule(".codicon-symbol-module { color: " + C + " !important; }");
  46572. var b = e.getColor(t.SYMBOL_ICON_NAMESPACE_FOREGROUND);
  46573. b && n.addRule(".codicon-symbol-namespace { color: " + b + " !important; }");
  46574. var S = e.getColor(t.SYMBOL_ICON_NULL_FOREGROUND)
  46575. ;S && n.addRule(".codicon-symbol-null { color: " + S + " !important; }");
  46576. var w = e.getColor(t.SYMBOL_ICON_NUMBER_FOREGROUND);
  46577. w && n.addRule(".codicon-symbol-number { color: " + w + " !important; }");
  46578. var E = e.getColor(t.SYMBOL_ICON_OBJECT_FOREGROUND);
  46579. E && n.addRule(".codicon-symbol-object { color: " + E + " !important; }");
  46580. var L = e.getColor(t.SYMBOL_ICON_OPERATOR_FOREGROUND);
  46581. L && n.addRule(".codicon-symbol-operator { color: " + L + " !important; }");
  46582. var D = e.getColor(t.SYMBOL_ICON_PACKAGE_FOREGROUND);
  46583. D && n.addRule(".codicon-symbol-package { color: " + D + " !important; }");
  46584. var N = e.getColor(t.SYMBOL_ICON_PROPERTY_FOREGROUND);
  46585. N && n.addRule(".codicon-symbol-property { color: " + N + " !important; }");
  46586. var x = e.getColor(t.SYMBOL_ICON_REFERENCE_FOREGROUND);
  46587. x && n.addRule(".codicon-symbol-reference { color: " + x + " !important; }");
  46588. var I = e.getColor(t.SYMBOL_ICON_SNIPPET_FOREGROUND);
  46589. I && n.addRule(".codicon-symbol-snippet { color: " + I + " !important; }");
  46590. var M = e.getColor(t.SYMBOL_ICON_STRING_FOREGROUND)
  46591. ;M && n.addRule(".codicon-symbol-string { color: " + M + " !important; }");
  46592. var k = e.getColor(t.SYMBOL_ICON_STRUCT_FOREGROUND);
  46593. k && n.addRule(".codicon-symbol-struct { color: " + k + " !important; }");
  46594. var T = e.getColor(t.SYMBOL_ICON_TEXT_FOREGROUND);
  46595. T && n.addRule(".codicon-symbol-text { color: " + T + " !important; }");
  46596. var R = e.getColor(t.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);
  46597. R && n.addRule(".codicon-symbol-type-parameter { color: " + R + " !important; }");
  46598. var O = e.getColor(t.SYMBOL_ICON_UNIT_FOREGROUND);
  46599. O && n.addRule(".codicon-symbol-unit { color: " + O + " !important; }");
  46600. var P = e.getColor(t.SYMBOL_ICON_VARIABLE_FOREGROUND);
  46601. P && n.addRule(".codicon-symbol-variable { color: " + P + " !important; }")
  46602. }))
  46603. })), define(n[571], i([0, 1, 3, 48, 30, 20, 14]), (function (e, t, n, i, o, r, s) {
  46604. "use strict";
  46605. Object.defineProperty(t, "__esModule", {value: !0});
  46606. var a = function () {
  46607. function e(e) {
  46608. this._editor = e, this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationId = null, this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null,
  46609. this._startPosition = this._editor.getPosition()
  46610. }
  46611. return e.prototype.dispose = function () {
  46612. this._editor.deltaDecorations(this._allDecorations(), []), this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationId = null, this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null
  46613. }, e.prototype.reset = function () {
  46614. this._decorations = [], this._overviewRulerApproximateDecorations = [], this._findScopeDecorationId = null, this._rangeHighlightDecorationId = null, this._highlightedDecorationId = null
  46615. }, e.prototype.getCount = function () {
  46616. return this._decorations.length
  46617. }, e.prototype.getFindScope = function () {
  46618. return this._findScopeDecorationId ? this._editor.getModel().getDecorationRange(this._findScopeDecorationId) : null
  46619. }, e.prototype.getStartPosition = function () {
  46620. return this._startPosition
  46621. }, e.prototype.setStartPosition = function (e) {
  46622. this._startPosition = e, this.setCurrentFindMatch(null)
  46623. }, e.prototype._getDecorationIndex = function (e) {
  46624. var t = this._decorations.indexOf(e);
  46625. return t >= 0 ? t + 1 : 1
  46626. },
  46627. e.prototype.getCurrentMatchesPosition = function (t) {
  46628. for (var n = 0, i = this._editor.getModel().getDecorationsInRange(t); n < i.length; n++) {
  46629. var o = i[n], r = o.options;
  46630. if (r === e._FIND_MATCH_DECORATION || r === e._CURRENT_FIND_MATCH_DECORATION) return this._getDecorationIndex(o.id)
  46631. }
  46632. return 1
  46633. }, e.prototype.setCurrentFindMatch = function (t) {
  46634. var i = this, o = null, r = 0;
  46635. if (t) for (var s = 0, a = this._decorations.length; s < a; s++) {
  46636. var l = this._editor.getModel().getDecorationRange(this._decorations[s]);
  46637. if (t.equalsRange(l)) {
  46638. o = this._decorations[s], r = s + 1;
  46639. break
  46640. }
  46641. }
  46642. return null === this._highlightedDecorationId && null === o || this._editor.changeDecorations((function (t) {
  46643. if (null !== i._highlightedDecorationId && (t.changeDecorationOptions(i._highlightedDecorationId, e._FIND_MATCH_DECORATION), i._highlightedDecorationId = null), null !== o && (i._highlightedDecorationId = o, t.changeDecorationOptions(i._highlightedDecorationId, e._CURRENT_FIND_MATCH_DECORATION)), null !== i._rangeHighlightDecorationId && (t.removeDecoration(i._rangeHighlightDecorationId), i._rangeHighlightDecorationId = null),
  46644. null !== o) {
  46645. var r = i._editor.getModel().getDecorationRange(o);
  46646. if (r.startLineNumber !== r.endLineNumber && 1 === r.endColumn) {
  46647. var s = r.endLineNumber - 1, a = i._editor.getModel().getLineMaxColumn(s);
  46648. r = new n.Range(r.startLineNumber, r.startColumn, s, a)
  46649. }
  46650. i._rangeHighlightDecorationId = t.addDecoration(r, e._RANGE_HIGHLIGHT_DECORATION)
  46651. }
  46652. })), r
  46653. }, e.prototype.set = function (t, i) {
  46654. var o = this;
  46655. this._editor.changeDecorations((function (r) {
  46656. var s = e._FIND_MATCH_DECORATION, a = [];
  46657. if (t.length > 1e3) {
  46658. s = e._FIND_MATCH_NO_OVERVIEW_DECORATION;
  46659. for (var l = o._editor.getModel().getLineCount(), u = o._editor.getLayoutInfo().height / l, d = Math.max(2, Math.ceil(3 / u)), c = t[0].range.startLineNumber, h = t[0].range.endLineNumber, p = 1, g = t.length; p < g; p++) {
  46660. var f = t[p].range;
  46661. h + d >= f.startLineNumber ? f.endLineNumber > h && (h = f.endLineNumber) : (a.push({
  46662. range: new n.Range(c, 1, h, 1),
  46663. options: e._FIND_MATCH_ONLY_OVERVIEW_DECORATION
  46664. }), c = f.startLineNumber, h = f.endLineNumber)
  46665. }
  46666. a.push({range: new n.Range(c, 1, h, 1), options: e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})
  46667. }
  46668. var m = new Array(t.length);
  46669. for (p = 0,
  46670. g = t.length; p < g; p++) m[p] = {range: t[p].range, options: s};
  46671. o._decorations = r.deltaDecorations(o._decorations, m), o._overviewRulerApproximateDecorations = r.deltaDecorations(o._overviewRulerApproximateDecorations, a), o._rangeHighlightDecorationId && (r.removeDecoration(o._rangeHighlightDecorationId), o._rangeHighlightDecorationId = null), o._findScopeDecorationId && (r.removeDecoration(o._findScopeDecorationId), o._findScopeDecorationId = null), i && (o._findScopeDecorationId = r.addDecoration(i, e._FIND_SCOPE_DECORATION))
  46672. }))
  46673. }, e.prototype.matchBeforePosition = function (e) {
  46674. if (0 === this._decorations.length) return null;
  46675. for (var t = this._decorations.length - 1; t >= 0; t--) {
  46676. var n = this._decorations[t], i = this._editor.getModel().getDecorationRange(n);
  46677. if (i && !(i.endLineNumber > e.lineNumber)) {
  46678. if (i.endLineNumber < e.lineNumber) return i;
  46679. if (!(i.endColumn > e.column)) return i
  46680. }
  46681. }
  46682. return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length - 1])
  46683. }, e.prototype.matchAfterPosition = function (e) {
  46684. if (0 === this._decorations.length) return null
  46685. ;
  46686. for (var t = 0, n = this._decorations.length; t < n; t++) {
  46687. var i = this._decorations[t], o = this._editor.getModel().getDecorationRange(i);
  46688. if (o && !(o.startLineNumber < e.lineNumber)) {
  46689. if (o.startLineNumber > e.lineNumber) return o;
  46690. if (!(o.startColumn < e.column)) return o
  46691. }
  46692. }
  46693. return this._editor.getModel().getDecorationRange(this._decorations[0])
  46694. }, e.prototype._allDecorations = function () {
  46695. var e = [];
  46696. return e = (e = e.concat(this._decorations)).concat(this._overviewRulerApproximateDecorations), this._findScopeDecorationId && e.push(this._findScopeDecorationId), this._rangeHighlightDecorationId && e.push(this._rangeHighlightDecorationId), e
  46697. }, e._CURRENT_FIND_MATCH_DECORATION = o.ModelDecorationOptions.register({
  46698. stickiness: 1,
  46699. zIndex: 13,
  46700. className: "currentFindMatch",
  46701. showIfCollapsed: !0,
  46702. overviewRuler: {
  46703. color: s.themeColorFromId(r.overviewRulerFindMatchForeground),
  46704. position: i.OverviewRulerLane.Center
  46705. },
  46706. minimap: {color: s.themeColorFromId(r.minimapFindMatch), position: i.MinimapPosition.Inline}
  46707. }), e._FIND_MATCH_DECORATION = o.ModelDecorationOptions.register({
  46708. stickiness: 1,
  46709. className: "findMatch",
  46710. showIfCollapsed: !0,
  46711. overviewRuler: {
  46712. color: s.themeColorFromId(r.overviewRulerFindMatchForeground),
  46713. position: i.OverviewRulerLane.Center
  46714. },
  46715. minimap: {color: s.themeColorFromId(r.minimapFindMatch), position: i.MinimapPosition.Inline}
  46716. }), e._FIND_MATCH_NO_OVERVIEW_DECORATION = o.ModelDecorationOptions.register({
  46717. stickiness: 1,
  46718. className: "findMatch",
  46719. showIfCollapsed: !0
  46720. }), e._FIND_MATCH_ONLY_OVERVIEW_DECORATION = o.ModelDecorationOptions.register({
  46721. stickiness: 1,
  46722. overviewRuler: {
  46723. color: s.themeColorFromId(r.overviewRulerFindMatchForeground),
  46724. position: i.OverviewRulerLane.Center
  46725. }
  46726. }), e._RANGE_HIGHLIGHT_DECORATION = o.ModelDecorationOptions.register({
  46727. stickiness: 1,
  46728. className: "rangeHighlight",
  46729. isWholeLine: !0
  46730. }), e._FIND_SCOPE_DECORATION = o.ModelDecorationOptions.register({
  46731. className: "findScope",
  46732. isWholeLine: !0
  46733. }), e
  46734. }();
  46735. t.FindDecorations = a
  46736. })), define(n[168], i([0, 1, 15, 2, 80, 13, 3, 22, 144, 571, 379, 380, 18]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h) {
  46737. "use strict";
  46738. Object.defineProperty(t, "__esModule", {value: !0}),
  46739. t.CONTEXT_FIND_WIDGET_VISIBLE = new h.RawContextKey("findWidgetVisible", !1), t.CONTEXT_FIND_INPUT_FOCUSED = new h.RawContextKey("findInputFocussed", !1), t.CONTEXT_REPLACE_INPUT_FOCUSED = new h.RawContextKey("replaceInputFocussed", !1), t.ToggleCaseSensitiveKeybinding = {
  46740. primary: 545,
  46741. mac: {primary: 2593}
  46742. }, t.ToggleWholeWordKeybinding = {primary: 565, mac: {primary: 2613}}, t.ToggleRegexKeybinding = {
  46743. primary: 560,
  46744. mac: {primary: 2608}
  46745. }, t.ToggleSearchScopeKeybinding = {primary: 554, mac: {primary: 2602}}, t.FIND_IDS = {
  46746. StartFindAction: "actions.find",
  46747. StartFindWithSelection: "actions.findWithSelection",
  46748. NextMatchFindAction: "editor.action.nextMatchFindAction",
  46749. PreviousMatchFindAction: "editor.action.previousMatchFindAction",
  46750. NextSelectionMatchFindAction: "editor.action.nextSelectionMatchFindAction",
  46751. PreviousSelectionMatchFindAction: "editor.action.previousSelectionMatchFindAction",
  46752. StartFindReplaceAction: "editor.action.startFindReplaceAction",
  46753. CloseFindWidgetCommand: "closeFindWidget",
  46754. ToggleCaseSensitiveCommand: "toggleFindCaseSensitive",
  46755. ToggleWholeWordCommand: "toggleFindWholeWord",
  46756. ToggleRegexCommand: "toggleFindRegex",
  46757. ToggleSearchScopeCommand: "toggleFindInSelection",
  46758. TogglePreserveCaseCommand: "togglePreserveCase",
  46759. ReplaceOneAction: "editor.action.replaceOne",
  46760. ReplaceAllAction: "editor.action.replaceAll",
  46761. SelectAllMatchesAction: "editor.action.selectAllMatches"
  46762. }, t.MATCHES_LIMIT = 19999;
  46763. var p = function () {
  46764. function e(e, t) {
  46765. var o = this;
  46766. this._toDispose = new i.DisposableStore, this._editor = e, this._state = t, this._isDisposed = !1, this._startSearchingTimer = new n.TimeoutTimer, this._decorations = new u.FindDecorations(e), this._toDispose.add(this._decorations), this._updateDecorationsScheduler = new n.RunOnceScheduler((function () {
  46767. return o.research(!1)
  46768. }), 100), this._toDispose.add(this._updateDecorationsScheduler), this._toDispose.add(this._editor.onDidChangeCursorPosition((function (e) {
  46769. 3 !== e.reason && 5 !== e.reason && 6 !== e.reason || o._decorations.setStartPosition(o._editor.getPosition())
  46770. }))), this._ignoreModelContentChanged = !1,
  46771. this._toDispose.add(this._editor.onDidChangeModelContent((function (e) {
  46772. o._ignoreModelContentChanged || (e.isFlush && o._decorations.reset(), o._decorations.setStartPosition(o._editor.getPosition()), o._updateDecorationsScheduler.schedule())
  46773. }))), this._toDispose.add(this._state.onFindReplaceStateChange((function (e) {
  46774. return o._onStateChanged(e)
  46775. }))), this.research(!1, this._state.searchScope)
  46776. }
  46777. return e.prototype.dispose = function () {
  46778. this._isDisposed = !0, i.dispose(this._startSearchingTimer), this._toDispose.dispose()
  46779. }, e.prototype._onStateChanged = function (e) {
  46780. var t = this;
  46781. this._isDisposed || this._editor.hasModel() && (e.searchString || e.isReplaceRevealed || e.isRegex || e.wholeWord || e.matchCase || e.searchScope) && (this._editor.getModel().isTooLargeForSyncing() ? (this._startSearchingTimer.cancel(), this._startSearchingTimer.setIfNotSet((function () {
  46782. e.searchScope ? t.research(e.moveCursor, t._state.searchScope) : t.research(e.moveCursor)
  46783. }), 240)) : e.searchScope ? this.research(e.moveCursor, this._state.searchScope) : this.research(e.moveCursor))
  46784. },
  46785. e._getSearchRange = function (e, t) {
  46786. return t || e.getFullModelRange()
  46787. }, e.prototype.research = function (e, n) {
  46788. var i = null;
  46789. null !== (i = void 0 !== n ? n : this._decorations.getFindScope()) && i.startLineNumber !== i.endLineNumber && (i = 1 === i.endColumn ? new s.Range(i.startLineNumber, 1, i.endLineNumber - 1, this._editor.getModel().getLineMaxColumn(i.endLineNumber - 1)) : new s.Range(i.startLineNumber, 1, i.endLineNumber, this._editor.getModel().getLineMaxColumn(i.endLineNumber)));
  46790. var o = this._findMatches(i, !1, t.MATCHES_LIMIT);
  46791. this._decorations.set(o, i), this._state.changeMatchInfo(this._decorations.getCurrentMatchesPosition(this._editor.getSelection()), this._decorations.getCount(), void 0), e && this._moveToNextMatch(this._decorations.getStartPosition())
  46792. }, e.prototype._hasMatches = function () {
  46793. return this._state.matchesCount > 0
  46794. }, e.prototype._cannotFind = function () {
  46795. if (!this._hasMatches()) {
  46796. var e = this._decorations.getFindScope();
  46797. return e && this._editor.revealRangeInCenterIfOutsideViewport(e, 0), !0
  46798. }
  46799. return !1
  46800. }, e.prototype._setCurrentFindMatch = function (e) {
  46801. var t = this._decorations.setCurrentFindMatch(e);
  46802. this._state.changeMatchInfo(t, this._decorations.getCount(), e), this._editor.setSelection(e), this._editor.revealRangeInCenterIfOutsideViewport(e, 0)
  46803. }, e.prototype._prevSearchPosition = function (e) {
  46804. var t = this._state.isRegex && (this._state.searchString.indexOf("^") >= 0 || this._state.searchString.indexOf("$") >= 0),
  46805. n = e.lineNumber, i = e.column, o = this._editor.getModel();
  46806. return t || 1 === i ? (1 === n ? n = o.getLineCount() : n--, i = o.getLineMaxColumn(n)) : i--, new r.Position(n, i)
  46807. }, e.prototype._moveToPrevMatch = function (n, i) {
  46808. if (void 0 === i && (i = !1), this._decorations.getCount() < t.MATCHES_LIMIT) {
  46809. var o = this._decorations.matchBeforePosition(n);
  46810. return o && o.isEmpty() && o.getStartPosition().equals(n) && (n = this._prevSearchPosition(n), o = this._decorations.matchBeforePosition(n)), void (o && this._setCurrentFindMatch(o))
  46811. }
  46812. if (!this._cannotFind()) {
  46813. var s = this._decorations.getFindScope(), a = e._getSearchRange(this._editor.getModel(), s);
  46814. a.getEndPosition().isBefore(n) && (n = a.getEndPosition()),
  46815. n.isBefore(a.getStartPosition()) && (n = a.getEndPosition());
  46816. var l = n.lineNumber, u = n.column, d = this._editor.getModel(), c = new r.Position(l, u),
  46817. h = d.findPreviousMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, !1);
  46818. if (h && h.range.isEmpty() && h.range.getStartPosition().equals(c) && (c = this._prevSearchPosition(c), h = d.findPreviousMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, !1)), h) return i || a.containsRange(h.range) ? void this._setCurrentFindMatch(h.range) : this._moveToPrevMatch(h.range.getStartPosition(), !0)
  46819. }
  46820. }, e.prototype.moveToPrevMatch = function () {
  46821. this._moveToPrevMatch(this._editor.getSelection().getStartPosition())
  46822. }, e.prototype._nextSearchPosition = function (e) {
  46823. var t = this._state.isRegex && (this._state.searchString.indexOf("^") >= 0 || this._state.searchString.indexOf("$") >= 0),
  46824. n = e.lineNumber, i = e.column, o = this._editor.getModel()
  46825. ;
  46826. return t || i === o.getLineMaxColumn(n) ? (n === o.getLineCount() ? n = 1 : n++, i = 1) : i++, new r.Position(n, i)
  46827. }, e.prototype._moveToNextMatch = function (e) {
  46828. if (this._decorations.getCount() < t.MATCHES_LIMIT) {
  46829. var n = this._decorations.matchAfterPosition(e);
  46830. return n && n.isEmpty() && n.getStartPosition().equals(e) && (e = this._nextSearchPosition(e), n = this._decorations.matchAfterPosition(e)), void (n && this._setCurrentFindMatch(n))
  46831. }
  46832. var i = this._getNextMatch(e, !1, !0);
  46833. i && this._setCurrentFindMatch(i.range)
  46834. }, e.prototype._getNextMatch = function (t, n, i, o) {
  46835. if (void 0 === o && (o = !1), this._cannotFind()) return null;
  46836. var s = this._decorations.getFindScope(), a = e._getSearchRange(this._editor.getModel(), s);
  46837. a.getEndPosition().isBefore(t) && (t = a.getStartPosition()), t.isBefore(a.getStartPosition()) && (t = a.getStartPosition());
  46838. var l = t.lineNumber, u = t.column, d = this._editor.getModel(), c = new r.Position(l, u),
  46839. h = d.findNextMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, n)
  46840. ;
  46841. return i && h && h.range.isEmpty() && h.range.getStartPosition().equals(c) && (c = this._nextSearchPosition(c), h = d.findNextMatch(this._state.searchString, c, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, n)), h ? o || a.containsRange(h.range) ? h : this._getNextMatch(h.range.getEndPosition(), n, i, !0) : null
  46842. }, e.prototype.moveToNextMatch = function () {
  46843. this._moveToNextMatch(this._editor.getSelection().getEndPosition())
  46844. }, e.prototype._getReplacePattern = function () {
  46845. return this._state.isRegex ? c.parseReplaceString(this._state.replaceString) : c.ReplacePattern.fromStaticValue(this._state.replaceString)
  46846. }, e.prototype.replace = function () {
  46847. if (this._hasMatches()) {
  46848. var e = this._getReplacePattern(), t = this._editor.getSelection(),
  46849. n = this._getNextMatch(t.getStartPosition(), !0, !1);
  46850. if (n) if (t.equalsRange(n.range)) {
  46851. var i = e.buildReplaceString(n.matches, this._state.preserveCase),
  46852. s = new o.ReplaceCommand(t, i);
  46853. this._executeEditorCommand("replace", s),
  46854. this._decorations.setStartPosition(new r.Position(t.startLineNumber, t.startColumn + i.length)), this.research(!0)
  46855. } else this._decorations.setStartPosition(this._editor.getPosition()), this._setCurrentFindMatch(n.range)
  46856. }
  46857. }, e.prototype._findMatches = function (t, n, i) {
  46858. var o = e._getSearchRange(this._editor.getModel(), t);
  46859. return this._editor.getModel().findMatches(this._state.searchString, o, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null, n, i)
  46860. }, e.prototype.replaceAll = function () {
  46861. if (this._hasMatches()) {
  46862. var e = this._decorations.getFindScope();
  46863. null === e && this._state.matchesCount >= t.MATCHES_LIMIT ? this._largeReplaceAll() : this._regularReplaceAll(e), this.research(!1)
  46864. }
  46865. }, e.prototype._largeReplaceAll = function () {
  46866. var e = new l.SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(96) : null).parseSearchRequest();
  46867. if (e) {
  46868. var t = e.regex;
  46869. if (!t.multiline) {
  46870. var n = "mu";
  46871. t.ignoreCase && (n += "i"), t.global && (n += "g"), t = new RegExp(t.source, n)
  46872. }
  46873. var i, r = this._editor.getModel(), s = r.getValue(1), a = r.getFullModelRange(),
  46874. u = this._getReplacePattern(), d = this._state.preserveCase;
  46875. i = u.hasReplacementPatterns || d ? s.replace(t, (function () {
  46876. return u.buildReplaceString(arguments, d)
  46877. })) : s.replace(t, u.buildReplaceString(null, d));
  46878. var c = new o.ReplaceCommandThatPreservesSelection(a, i, this._editor.getSelection());
  46879. this._executeEditorCommand("replaceAll", c)
  46880. }
  46881. }, e.prototype._regularReplaceAll = function (e) {
  46882. for (var t = this._getReplacePattern(), n = this._findMatches(e, t.hasReplacementPatterns || this._state.preserveCase, 1073741824), i = [], o = 0, r = n.length; o < r; o++) i[o] = t.buildReplaceString(n[o].matches, this._state.preserveCase);
  46883. var s = new d.ReplaceAllCommand(this._editor.getSelection(), n.map((function (e) {
  46884. return e.range
  46885. })), i);
  46886. this._executeEditorCommand("replaceAll", s)
  46887. }, e.prototype.selectAllMatches = function () {
  46888. if (this._hasMatches()) {
  46889. for (var e = this._decorations.getFindScope(), t = this._findMatches(e, !1, 1073741824).map((function (e) {
  46890. return new a.Selection(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn)
  46891. })), n = this._editor.getSelection(), i = 0, o = t.length; i < o; i++) {
  46892. if (t[i].equalsRange(n)) {
  46893. t = [n].concat(t.slice(0, i)).concat(t.slice(i + 1));
  46894. break
  46895. }
  46896. }
  46897. this._editor.setSelections(t)
  46898. }
  46899. }, e.prototype._executeEditorCommand = function (e, t) {
  46900. try {
  46901. this._ignoreModelContentChanged = !0, this._editor.pushUndoStop(), this._editor.executeCommand(e, t), this._editor.pushUndoStop()
  46902. } finally {
  46903. this._ignoreModelContentChanged = !1
  46904. }
  46905. }, e
  46906. }();
  46907. t.FindModelBoundToEditorModel = p
  46908. })), define(n[572], i([0, 1, 6, 204, 47, 15, 168, 20, 14]), (function (e, t, n, i, o, s, a, l, u) {
  46909. "use strict";
  46910. Object.defineProperty(t, "__esModule", {value: !0});
  46911. var d = function (e) {
  46912. function t(t, o, r, u) {
  46913. var d = e.call(this) || this;
  46914. d._hideSoon = d._register(new s.RunOnceScheduler((function () {
  46915. return d._hide()
  46916. }), 2e3)), d._isVisible = !1, d._editor = t, d._state = o, d._keybindingService = r, d._domNode = document.createElement("div"), d._domNode.className = "findOptionsWidget", d._domNode.style.display = "none", d._domNode.style.top = "10px",
  46917. d._domNode.setAttribute("role", "presentation"), d._domNode.setAttribute("aria-hidden", "true");
  46918. var c = u.getTheme().getColor(l.inputActiveOptionBorder),
  46919. h = u.getTheme().getColor(l.inputActiveOptionBackground);
  46920. return d.caseSensitive = d._register(new i.CaseSensitiveCheckbox({
  46921. appendTitle: d._keybindingLabelFor(a.FIND_IDS.ToggleCaseSensitiveCommand),
  46922. isChecked: d._state.matchCase,
  46923. inputActiveOptionBorder: c,
  46924. inputActiveOptionBackground: h
  46925. })), d._domNode.appendChild(d.caseSensitive.domNode), d._register(d.caseSensitive.onChange((function () {
  46926. d._state.change({matchCase: d.caseSensitive.checked}, !1)
  46927. }))), d.wholeWords = d._register(new i.WholeWordsCheckbox({
  46928. appendTitle: d._keybindingLabelFor(a.FIND_IDS.ToggleWholeWordCommand),
  46929. isChecked: d._state.wholeWord,
  46930. inputActiveOptionBorder: c,
  46931. inputActiveOptionBackground: h
  46932. })), d._domNode.appendChild(d.wholeWords.domNode), d._register(d.wholeWords.onChange((function () {
  46933. d._state.change({wholeWord: d.wholeWords.checked}, !1)
  46934. }))), d.regex = d._register(new i.RegexCheckbox({
  46935. appendTitle: d._keybindingLabelFor(a.FIND_IDS.ToggleRegexCommand),
  46936. isChecked: d._state.isRegex,
  46937. inputActiveOptionBorder: c,
  46938. inputActiveOptionBackground: h
  46939. })), d._domNode.appendChild(d.regex.domNode), d._register(d.regex.onChange((function () {
  46940. d._state.change({isRegex: d.regex.checked}, !1)
  46941. }))), d._editor.addOverlayWidget(d), d._register(d._state.onFindReplaceStateChange((function (e) {
  46942. var t = !1;
  46943. e.isRegex && (d.regex.checked = d._state.isRegex, t = !0), e.wholeWord && (d.wholeWords.checked = d._state.wholeWord, t = !0), e.matchCase && (d.caseSensitive.checked = d._state.matchCase, t = !0), !d._state.isRevealed && t && d._revealTemporarily()
  46944. }))), d._register(n.addDisposableNonBubblingMouseOutListener(d._domNode, (function (e) {
  46945. return d._onMouseOut()
  46946. }))), d._register(n.addDisposableListener(d._domNode, "mouseover", (function (e) {
  46947. return d._onMouseOver()
  46948. }))), d._applyTheme(u.getTheme()), d._register(u.onThemeChange(d._applyTheme.bind(d))), d
  46949. }
  46950. return r(t, e), t.prototype._keybindingLabelFor = function (e) {
  46951. var t = this._keybindingService.lookupKeybinding(e)
  46952. ;
  46953. return t ? " (" + t.getLabel() + ")" : ""
  46954. }, t.prototype.dispose = function () {
  46955. this._editor.removeOverlayWidget(this), e.prototype.dispose.call(this)
  46956. }, t.prototype.getId = function () {
  46957. return t.ID
  46958. }, t.prototype.getDomNode = function () {
  46959. return this._domNode
  46960. }, t.prototype.getPosition = function () {
  46961. return {preference: 0}
  46962. }, t.prototype.highlightFindOptions = function () {
  46963. this._revealTemporarily()
  46964. }, t.prototype._revealTemporarily = function () {
  46965. this._show(), this._hideSoon.schedule()
  46966. }, t.prototype._onMouseOut = function () {
  46967. this._hideSoon.schedule()
  46968. }, t.prototype._onMouseOver = function () {
  46969. this._hideSoon.cancel()
  46970. }, t.prototype._show = function () {
  46971. this._isVisible || (this._isVisible = !0, this._domNode.style.display = "block")
  46972. }, t.prototype._hide = function () {
  46973. this._isVisible && (this._isVisible = !1, this._domNode.style.display = "none")
  46974. }, t.prototype._applyTheme = function (e) {
  46975. var t = {
  46976. inputActiveOptionBorder: e.getColor(l.inputActiveOptionBorder),
  46977. inputActiveOptionBackground: e.getColor(l.inputActiveOptionBackground)
  46978. };
  46979. this.caseSensitive.style(t), this.wholeWords.style(t), this.regex.style(t)
  46980. }, t.ID = "editor.contrib.findOptionsWidget", t
  46981. }(o.Widget);
  46982. t.FindOptionsWidget = d, u.registerThemingParticipant((function (e, t) {
  46983. var n = e.getColor(l.editorWidgetBackground);
  46984. n && t.addRule(".monaco-editor .findOptionsWidget { background-color: " + n + "; }");
  46985. var i = e.getColor(l.editorWidgetForeground);
  46986. i && t.addRule(".monaco-editor .findOptionsWidget { color: " + i + "; }");
  46987. var o = e.getColor(l.widgetShadow);
  46988. o && t.addRule(".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px " + o + "; }");
  46989. var r = e.getColor(l.contrastBorder);
  46990. r && t.addRule(".monaco-editor .findOptionsWidget { border: 2px solid " + r + "; }")
  46991. }))
  46992. })), define(n[573], i([0, 1, 439, 6, 50, 138, 104, 47, 15, 10, 2, 16, 5, 3, 168, 20, 14, 520, 310]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _) {
  46993. "use strict";
  46994. Object.defineProperty(t, "__esModule", {value: !0})
  46995. ;var y = n.localize(0, null), C = n.localize(1, null), b = n.localize(2, null), S = n.localize(3, null),
  46996. w = n.localize(4, null), E = n.localize(5, null), L = n.localize(6, null), D = n.localize(7, null),
  46997. N = n.localize(8, null), x = n.localize(9, null), I = n.localize(10, null),
  46998. M = n.localize(11, null, f.MATCHES_LIMIT), k = n.localize(12, null), T = n.localize(13, null), R = 69,
  46999. O = 33, P = "ctrlEnterReplaceAll.windows.donotask", A = h.isMacintosh ? 256 : 2048, F = function (e) {
  47000. this.afterLineNumber = e, this.heightInPx = O, this.suppressMouseDown = !1, this.domNode = document.createElement("div"), this.domNode.className = "dock-find-viewzone"
  47001. };
  47002. function W(e, t, n) {
  47003. var i = !!t.match(/\n/);
  47004. n && i && n.selectionStart > 0 && e.stopPropagation()
  47005. }
  47006. function B(e, t, n) {
  47007. var i = !!t.match(/\n/);
  47008. n && i && n.selectionEnd < n.value.length && e.stopPropagation()
  47009. }
  47010. t.FindWidgetViewZone = F;
  47011. var V = function (e) {
  47012. function t(t, n, o, r, s, a, l, d, h) {
  47013. var p = e.call(this) || this;
  47014. return p._cachedHeight = null, p._codeEditor = t, p._controller = n, p._state = o, p._contextViewProvider = r, p._keybindingService = s, p._contextKeyService = a, p._storageService = d,
  47015. p._notificationService = h, p._ctrlEnterReplaceAllWarningPrompted = !!d.getBoolean(P, 0), p._isVisible = !1, p._isReplaceVisible = !1, p._ignoreChangeEvent = !1, p._updateHistoryDelayer = new u.Delayer(500), p._register(c.toDisposable((function () {
  47016. return p._updateHistoryDelayer.cancel()
  47017. }))), p._register(p._state.onFindReplaceStateChange((function (e) {
  47018. return p._onStateChanged(e)
  47019. }))), p._buildDomNode(), p._updateButtons(), p._tryUpdateWidgetWidth(), p._findInput.inputBox.layout(), p._register(p._codeEditor.onDidChangeConfiguration((function (e) {
  47020. if (e.hasChanged(68) && (p._codeEditor.getOption(68) && p._state.change({isReplaceRevealed: !1}, !1), p._updateButtons()), e.hasChanged(107) && p._tryUpdateWidgetWidth(), e.hasChanged(2) && p.updateAccessibilitySupport(), e.hasChanged(28)) {
  47021. var t = p._codeEditor.getOption(28).addExtraSpaceOnTop;
  47022. t && !p._viewZone && (p._viewZone = new F(0), p._showViewZone()), !t && p._viewZone && p._removeViewZone()
  47023. }
  47024. }))), p.updateAccessibilitySupport(), p._register(p._codeEditor.onDidChangeCursorSelection((function () {
  47025. p._isVisible && p._updateToggleSelectionFindButton()
  47026. }))), p._register(p._codeEditor.onDidFocusEditorWidget((function () {
  47027. if (p._isVisible) {
  47028. var e = p._controller.getGlobalBufferTerm();
  47029. e && e !== p._state.searchString && (p._state.change({searchString: e}, !0), p._findInput.select())
  47030. }
  47031. }))), p._findInputFocused = f.CONTEXT_FIND_INPUT_FOCUSED.bindTo(a), p._findFocusTracker = p._register(i.trackFocus(p._findInput.inputBox.inputElement)), p._register(p._findFocusTracker.onDidFocus((function () {
  47032. p._findInputFocused.set(!0), p._updateSearchScope()
  47033. }))), p._register(p._findFocusTracker.onDidBlur((function () {
  47034. p._findInputFocused.set(!1)
  47035. }))), p._replaceInputFocused = f.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(a), p._replaceFocusTracker = p._register(i.trackFocus(p._replaceInput.inputBox.inputElement)), p._register(p._replaceFocusTracker.onDidFocus((function () {
  47036. p._replaceInputFocused.set(!0), p._updateSearchScope()
  47037. }))), p._register(p._replaceFocusTracker.onDidBlur((function () {
  47038. p._replaceInputFocused.set(!1)
  47039. }))), p._codeEditor.addOverlayWidget(p),
  47040. p._codeEditor.getOption(28).addExtraSpaceOnTop && (p._viewZone = new F(0)), p._applyTheme(l.getTheme()), p._register(l.onThemeChange(p._applyTheme.bind(p))), p._register(p._codeEditor.onDidChangeModel((function () {
  47041. p._isVisible && (p._viewZoneId = void 0)
  47042. }))), p._register(p._codeEditor.onDidScrollChange((function (e) {
  47043. e.scrollTopChanged ? p._layoutViewZone() : setTimeout((function () {
  47044. p._layoutViewZone()
  47045. }), 0)
  47046. }))), p
  47047. }
  47048. return r(t, e), t.prototype.getId = function () {
  47049. return t.ID
  47050. }, t.prototype.getDomNode = function () {
  47051. return this._domNode
  47052. }, t.prototype.getPosition = function () {
  47053. return this._isVisible ? {preference: 0} : null
  47054. }, t.prototype._onStateChanged = function (e) {
  47055. if (e.searchString) {
  47056. try {
  47057. this._ignoreChangeEvent = !0, this._findInput.setValue(this._state.searchString)
  47058. } finally {
  47059. this._ignoreChangeEvent = !1
  47060. }
  47061. this._updateButtons()
  47062. }
  47063. if (e.replaceString && (this._replaceInput.inputBox.value = this._state.replaceString), e.isRevealed && (this._state.isRevealed ? this._reveal() : this._hide(!0)),
  47064. e.isReplaceRevealed && (this._state.isReplaceRevealed ? this._codeEditor.getOption(68) || this._isReplaceVisible || (this._isReplaceVisible = !0, this._replaceInput.width = i.getTotalWidth(this._findInput.domNode), this._updateButtons(), this._replaceInput.inputBox.layout()) : this._isReplaceVisible && (this._isReplaceVisible = !1, this._updateButtons())), (e.isRevealed || e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed) && this._tryUpdateHeight() && this._showViewZone(), e.isRegex && this._findInput.setRegex(this._state.isRegex), e.wholeWord && this._findInput.setWholeWords(this._state.wholeWord), e.matchCase && this._findInput.setCaseSensitive(this._state.matchCase), e.searchScope && (this._state.searchScope ? this._toggleSelectionFind.checked = !0 : this._toggleSelectionFind.checked = !1, this._updateToggleSelectionFindButton()), e.searchString || e.matchesCount || e.matchesPosition) {
  47065. var t = this._state.searchString.length > 0 && 0 === this._state.matchesCount;
  47066. i.toggleClass(this._domNode, "no-results", t), this._updateMatchesCount(),
  47067. this._updateButtons()
  47068. }
  47069. (e.searchString || e.currentMatch) && this._layoutViewZone(), e.updateHistory && this._delayedUpdateHistory()
  47070. }, t.prototype._delayedUpdateHistory = function () {
  47071. this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))
  47072. }, t.prototype._updateHistory = function () {
  47073. this._state.searchString && this._findInput.inputBox.addToHistory(), this._state.replaceString && this._replaceInput.inputBox.addToHistory()
  47074. }, t.prototype._updateMatchesCount = function () {
  47075. var e;
  47076. if (this._matchesCount.style.minWidth = R + "px", this._state.matchesCount >= f.MATCHES_LIMIT ? this._matchesCount.title = M : this._matchesCount.title = "", this._matchesCount.firstChild && this._matchesCount.removeChild(this._matchesCount.firstChild), this._state.matchesCount > 0) {
  47077. var t = String(this._state.matchesCount);
  47078. this._state.matchesCount >= f.MATCHES_LIMIT && (t += "+");
  47079. var n = String(this._state.matchesPosition);
  47080. "0" === n && (n = "?"), e = p.format(k, n, t)
  47081. } else e = T;
  47082. this._matchesCount.appendChild(document.createTextNode(e)),
  47083. o.alert(this._getAriaLabel(e, this._state.currentMatch, this._state.searchString), !0), R = Math.max(R, this._matchesCount.clientWidth)
  47084. }, t.prototype._getAriaLabel = function (e, t, i) {
  47085. return e === T ? "" === i ? n.localize(14, null, e) : n.localize(15, null, e, i) : t ? n.localize(16, null, e, i, t.startLineNumber + ":" + t.startColumn) : n.localize(17, null, e, i)
  47086. }, t.prototype._updateToggleSelectionFindButton = function () {
  47087. var e = this._codeEditor.getSelection(),
  47088. t = !!e && (e.startLineNumber !== e.endLineNumber || e.startColumn !== e.endColumn),
  47089. n = this._toggleSelectionFind.checked;
  47090. this._isVisible && (n || t) ? this._toggleSelectionFind.enable() : this._toggleSelectionFind.disable()
  47091. }, t.prototype._updateButtons = function () {
  47092. this._findInput.setEnabled(this._isVisible), this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible), this._updateToggleSelectionFindButton(), this._closeBtn.setEnabled(this._isVisible);
  47093. var e = this._state.searchString.length > 0, t = !!this._state.matchesCount;
  47094. this._prevBtn.setEnabled(this._isVisible && e && t),
  47095. this._nextBtn.setEnabled(this._isVisible && e && t), this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && e), this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && e), i.toggleClass(this._domNode, "replaceToggled", this._isReplaceVisible), this._toggleReplaceBtn.toggleClass("codicon-chevron-right", !this._isReplaceVisible), this._toggleReplaceBtn.toggleClass("codicon-chevron-down", this._isReplaceVisible), this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
  47096. var n = !this._codeEditor.getOption(68);
  47097. this._toggleReplaceBtn.setEnabled(this._isVisible && n)
  47098. }, t.prototype._reveal = function () {
  47099. var e = this;
  47100. if (!this._isVisible) {
  47101. this._isVisible = !0;
  47102. var t = this._codeEditor.getSelection();
  47103. switch (this._codeEditor.getOption(28).autoFindInSelection) {
  47104. case"always":
  47105. this._toggleSelectionFind.checked = !0;
  47106. break;
  47107. case"never":
  47108. this._toggleSelectionFind.checked = !1;
  47109. break;
  47110. case"multiline":
  47111. var n = !!t && t.startLineNumber !== t.endLineNumber;
  47112. this._toggleSelectionFind.checked = n
  47113. }
  47114. this._tryUpdateWidgetWidth(), this._updateButtons(),
  47115. setTimeout((function () {
  47116. i.addClass(e._domNode, "visible"), e._domNode.setAttribute("aria-hidden", "false")
  47117. }), 0), setTimeout((function () {
  47118. e._findInput.validate()
  47119. }), 200), this._codeEditor.layoutOverlayWidget(this);
  47120. var o = !0;
  47121. if (this._codeEditor.getOption(28).seedSearchStringFromSelection && t) {
  47122. var r = this._codeEditor.getDomNode();
  47123. if (r) {
  47124. var s = i.getDomNodePagePosition(r),
  47125. a = this._codeEditor.getScrolledVisiblePosition(t.getStartPosition()),
  47126. l = s.left + (a ? a.left : 0), u = a ? a.top : 0;
  47127. if (this._viewZone && u < this._viewZone.heightInPx) {
  47128. t.endLineNumber > t.startLineNumber && (o = !1);
  47129. var d = i.getTopLeftOffset(this._domNode).left;
  47130. l > d && (o = !1);
  47131. var c = this._codeEditor.getScrolledVisiblePosition(t.getEndPosition());
  47132. s.left + (c ? c.left : 0) > d && (o = !1)
  47133. }
  47134. }
  47135. }
  47136. this._showViewZone(o)
  47137. }
  47138. }, t.prototype._hide = function (e) {
  47139. this._isVisible && (this._isVisible = !1, this._updateButtons(), i.removeClass(this._domNode, "visible"), this._domNode.setAttribute("aria-hidden", "true"), this._findInput.clearMessage(), e && this._codeEditor.focus(), this._codeEditor.layoutOverlayWidget(this),
  47140. this._removeViewZone())
  47141. }, t.prototype._layoutViewZone = function () {
  47142. var e = this;
  47143. if (this._codeEditor.getOption(28).addExtraSpaceOnTop) {
  47144. if (this._isVisible) {
  47145. var t = this._viewZone;
  47146. void 0 === this._viewZoneId && t && this._codeEditor.changeViewZones((function (n) {
  47147. t.heightInPx = e._getHeight(), e._viewZoneId = n.addZone(t), e._codeEditor.setScrollTop(e._codeEditor.getScrollTop() + t.heightInPx)
  47148. }))
  47149. }
  47150. } else this._removeViewZone()
  47151. }, t.prototype._showViewZone = function (e) {
  47152. var t = this;
  47153. if ((void 0 === e && (e = !0), this._isVisible) && this._codeEditor.getOption(28).addExtraSpaceOnTop) {
  47154. void 0 === this._viewZone && (this._viewZone = new F(0));
  47155. var n = this._viewZone;
  47156. this._codeEditor.changeViewZones((function (i) {
  47157. if (void 0 !== t._viewZoneId) {
  47158. var o = t._getHeight();
  47159. if (o === n.heightInPx) return;
  47160. var r = o - n.heightInPx;
  47161. return n.heightInPx = o, i.layoutZone(t._viewZoneId), void (e && t._codeEditor.setScrollTop(t._codeEditor.getScrollTop() + r))
  47162. }
  47163. r = t._getHeight();
  47164. n.heightInPx = r, t._viewZoneId = i.addZone(n), e && t._codeEditor.setScrollTop(t._codeEditor.getScrollTop() + r)
  47165. }))
  47166. }
  47167. },
  47168. t.prototype._removeViewZone = function () {
  47169. var e = this;
  47170. this._codeEditor.changeViewZones((function (t) {
  47171. void 0 !== e._viewZoneId && (t.removeZone(e._viewZoneId), e._viewZoneId = void 0, e._viewZone && (e._codeEditor.setScrollTop(e._codeEditor.getScrollTop() - e._viewZone.heightInPx), e._viewZone = void 0))
  47172. }))
  47173. }, t.prototype._applyTheme = function (e) {
  47174. var t = {
  47175. inputActiveOptionBorder: e.getColor(m.inputActiveOptionBorder),
  47176. inputActiveOptionBackground: e.getColor(m.inputActiveOptionBackground),
  47177. inputBackground: e.getColor(m.inputBackground),
  47178. inputForeground: e.getColor(m.inputForeground),
  47179. inputBorder: e.getColor(m.inputBorder),
  47180. inputValidationInfoBackground: e.getColor(m.inputValidationInfoBackground),
  47181. inputValidationInfoForeground: e.getColor(m.inputValidationInfoForeground),
  47182. inputValidationInfoBorder: e.getColor(m.inputValidationInfoBorder),
  47183. inputValidationWarningBackground: e.getColor(m.inputValidationWarningBackground),
  47184. inputValidationWarningForeground: e.getColor(m.inputValidationWarningForeground),
  47185. inputValidationWarningBorder: e.getColor(m.inputValidationWarningBorder),
  47186. inputValidationErrorBackground: e.getColor(m.inputValidationErrorBackground),
  47187. inputValidationErrorForeground: e.getColor(m.inputValidationErrorForeground),
  47188. inputValidationErrorBorder: e.getColor(m.inputValidationErrorBorder)
  47189. };
  47190. this._findInput.style(t), this._replaceInput.style(t), this._toggleSelectionFind.style(t)
  47191. }, t.prototype._tryUpdateWidgetWidth = function () {
  47192. if (this._isVisible && i.isInDOM(this._domNode)) {
  47193. var e = this._codeEditor.getLayoutInfo();
  47194. if (e.contentWidth <= 0) i.addClass(this._domNode, "hiddenEditor"); else {
  47195. i.hasClass(this._domNode, "hiddenEditor") && i.removeClass(this._domNode, "hiddenEditor");
  47196. var t = e.width, n = e.minimapWidth, o = !1, r = !1, s = !1;
  47197. if (this._resized) if (i.getTotalWidth(this._domNode) > 419) return this._domNode.style.maxWidth = t - 28 - n - 15 + "px", void (this._replaceInput.width = i.getTotalWidth(this._findInput.domNode));
  47198. if (447 + n >= t && (r = !0), 447 + n - R >= t && (s = !0), 447 + n - R >= t + 50 && (o = !0), i.toggleClass(this._domNode, "collapsed-find-widget", o),
  47199. i.toggleClass(this._domNode, "narrow-find-widget", s), i.toggleClass(this._domNode, "reduced-find-widget", r), s || o || (this._domNode.style.maxWidth = t - 28 - n - 15 + "px"), this._resized) {
  47200. this._findInput.inputBox.layout();
  47201. var a = this._findInput.inputBox.element.clientWidth;
  47202. a > 0 && (this._replaceInput.width = a)
  47203. } else this._isReplaceVisible && (this._replaceInput.width = i.getTotalWidth(this._findInput.domNode))
  47204. }
  47205. }
  47206. }, t.prototype._getHeight = function () {
  47207. var e = 0;
  47208. return e += 4, e += this._findInput.inputBox.height + 2, this._isReplaceVisible && (e += 4, e += this._replaceInput.inputBox.height + 2), e += 4
  47209. }, t.prototype._tryUpdateHeight = function () {
  47210. var e = this._getHeight();
  47211. return (null === this._cachedHeight || this._cachedHeight !== e) && (this._cachedHeight = e, this._domNode.style.height = e + "px", !0)
  47212. }, t.prototype.focusFindInput = function () {
  47213. this._findInput.select(), this._findInput.focus()
  47214. }, t.prototype.focusReplaceInput = function () {
  47215. this._replaceInput.select(), this._replaceInput.focus()
  47216. }, t.prototype.highlightFindOptions = function () {
  47217. this._findInput.highlightFindOptions()
  47218. },
  47219. t.prototype._updateSearchScope = function () {
  47220. if (this._codeEditor.hasModel() && this._toggleSelectionFind.checked) {
  47221. var e = this._codeEditor.getSelection();
  47222. 1 === e.endColumn && e.endLineNumber > e.startLineNumber && (e = e.setEndPosition(e.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber - 1)));
  47223. var t = this._state.currentMatch;
  47224. e.startLineNumber !== e.endLineNumber && (g.Range.equalsRange(e, t) || this._state.change({searchScope: e}, !0))
  47225. }
  47226. }, t.prototype._onFindInputMouseDown = function (e) {
  47227. e.middleButton && e.stopPropagation()
  47228. }, t.prototype._onFindInputKeyDown = function (e) {
  47229. return e.equals(3 | A) ? (this._findInput.inputBox.insertAtCursor("\n"), void e.preventDefault()) : e.equals(2) ? (this._isReplaceVisible ? this._replaceInput.focus() : this._findInput.focusOnCaseSensitive(), void e.preventDefault()) : e.equals(2066) ? (this._codeEditor.focus(),
  47230. void e.preventDefault()) : e.equals(16) ? W(e, this._findInput.getValue(), this._findInput.domNode.querySelector("textarea")) : e.equals(18) ? B(e, this._findInput.getValue(), this._findInput.domNode.querySelector("textarea")) : void 0
  47231. }, t.prototype._onReplaceInputKeyDown = function (e) {
  47232. return e.equals(3 | A) ? (h.isWindows && h.isNative && !this._ctrlEnterReplaceAllWarningPrompted && (this._notificationService.info(n.localize(18, null)), this._ctrlEnterReplaceAllWarningPrompted = !0, this._storageService.store(P, !0, 0)), this._replaceInput.inputBox.insertAtCursor("\n"), void e.preventDefault()) : e.equals(2) ? (this._findInput.focusOnCaseSensitive(), void e.preventDefault()) : e.equals(1026) ? (this._findInput.focus(), void e.preventDefault()) : e.equals(2066) ? (this._codeEditor.focus(), void e.preventDefault()) : e.equals(16) ? W(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector("textarea")) : e.equals(18) ? B(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector("textarea")) : void 0
  47233. },
  47234. t.prototype.getHorizontalSashTop = function (e) {
  47235. return 0
  47236. }, t.prototype.getHorizontalSashLeft = function (e) {
  47237. return 0
  47238. }, t.prototype.getHorizontalSashWidth = function (e) {
  47239. return 500
  47240. }, t.prototype._keybindingLabelFor = function (e) {
  47241. var t = this._keybindingService.lookupKeybinding(e);
  47242. return t ? " (" + t.getLabel() + ")" : ""
  47243. }, t.prototype._buildDomNode = function () {
  47244. var e = this;
  47245. this._findInput = this._register(new _.ContextScopedFindInput(null, this._contextViewProvider, {
  47246. width: 221,
  47247. label: y,
  47248. placeholder: C,
  47249. appendCaseSensitiveLabel: this._keybindingLabelFor(f.FIND_IDS.ToggleCaseSensitiveCommand),
  47250. appendWholeWordsLabel: this._keybindingLabelFor(f.FIND_IDS.ToggleWholeWordCommand),
  47251. appendRegexLabel: this._keybindingLabelFor(f.FIND_IDS.ToggleRegexCommand),
  47252. validation: function (t) {
  47253. if (0 === t.length || !e._findInput.getRegex()) return null;
  47254. try {
  47255. return new RegExp(t), null
  47256. } catch (e) {
  47257. return {content: e.message}
  47258. }
  47259. },
  47260. flexibleHeight: !0,
  47261. flexibleWidth: !0,
  47262. flexibleMaxHeight: 118
  47263. }, this._contextKeyService, !0)), this._findInput.setRegex(!!this._state.isRegex),
  47264. this._findInput.setCaseSensitive(!!this._state.matchCase), this._findInput.setWholeWords(!!this._state.wholeWord), this._register(this._findInput.onKeyDown((function (t) {
  47265. return e._onFindInputKeyDown(t)
  47266. }))), this._register(this._findInput.inputBox.onDidChange((function () {
  47267. e._ignoreChangeEvent || e._state.change({searchString: e._findInput.getValue()}, !0)
  47268. }))), this._register(this._findInput.onDidOptionChange((function () {
  47269. e._state.change({
  47270. isRegex: e._findInput.getRegex(),
  47271. wholeWord: e._findInput.getWholeWords(),
  47272. matchCase: e._findInput.getCaseSensitive()
  47273. }, !0)
  47274. }))), this._register(this._findInput.onCaseSensitiveKeyDown((function (t) {
  47275. t.equals(1026) && e._isReplaceVisible && (e._replaceInput.focus(), t.preventDefault())
  47276. }))), this._register(this._findInput.onRegexKeyDown((function (t) {
  47277. t.equals(2) && e._isReplaceVisible && (e._replaceInput.focusOnPreserve(), t.preventDefault())
  47278. }))), this._register(this._findInput.inputBox.onDidHeightChange((function (t) {
  47279. e._tryUpdateHeight() && e._showViewZone()
  47280. }))),
  47281. h.isLinux && this._register(this._findInput.onMouseDown((function (t) {
  47282. return e._onFindInputMouseDown(t)
  47283. }))), this._matchesCount = document.createElement("div"), this._matchesCount.className = "matchesCount", this._updateMatchesCount(), this._prevBtn = this._register(new z({
  47284. label: b + this._keybindingLabelFor(f.FIND_IDS.PreviousMatchFindAction),
  47285. className: "codicon codicon-arrow-up",
  47286. onTrigger: function () {
  47287. e._codeEditor.getAction(f.FIND_IDS.PreviousMatchFindAction).run().then(void 0, d.onUnexpectedError)
  47288. }
  47289. })), this._nextBtn = this._register(new z({
  47290. label: S + this._keybindingLabelFor(f.FIND_IDS.NextMatchFindAction),
  47291. className: "codicon codicon-arrow-down",
  47292. onTrigger: function () {
  47293. e._codeEditor.getAction(f.FIND_IDS.NextMatchFindAction).run().then(void 0, d.onUnexpectedError)
  47294. }
  47295. }));
  47296. var t = document.createElement("div");
  47297. t.className = "find-part", t.appendChild(this._findInput.domNode);
  47298. var n = document.createElement("div");
  47299. n.className = "find-actions", t.appendChild(n), n.appendChild(this._matchesCount), n.appendChild(this._prevBtn.domNode),
  47300. n.appendChild(this._nextBtn.domNode), this._toggleSelectionFind = this._register(new s.Checkbox({
  47301. actionClassName: "codicon codicon-selection",
  47302. title: w + this._keybindingLabelFor(f.FIND_IDS.ToggleSearchScopeCommand),
  47303. isChecked: !1
  47304. })), this._register(this._toggleSelectionFind.onChange((function () {
  47305. if (e._toggleSelectionFind.checked) {
  47306. if (e._codeEditor.hasModel()) {
  47307. var t = e._codeEditor.getSelection();
  47308. 1 === t.endColumn && t.endLineNumber > t.startLineNumber && (t = t.setEndPosition(t.endLineNumber - 1, e._codeEditor.getModel().getLineMaxColumn(t.endLineNumber - 1))), t.isEmpty() || e._state.change({searchScope: t}, !0)
  47309. }
  47310. } else e._state.change({searchScope: null}, !0)
  47311. }))), n.appendChild(this._toggleSelectionFind.domNode), this._closeBtn = this._register(new z({
  47312. label: E + this._keybindingLabelFor(f.FIND_IDS.CloseFindWidgetCommand),
  47313. className: "codicon codicon-close",
  47314. onTrigger: function () {
  47315. e._state.change({isRevealed: !1, searchScope: null}, !1)
  47316. },
  47317. onKeyDown: function (t) {
  47318. t.equals(2) && e._isReplaceVisible && (e._replaceBtn.isEnabled() ? e._replaceBtn.focus() : e._codeEditor.focus(), t.preventDefault())
  47319. }
  47320. })), n.appendChild(this._closeBtn.domNode), this._replaceInput = this._register(new _.ContextScopedReplaceInput(null, void 0, {
  47321. label: L,
  47322. placeholder: D,
  47323. history: [],
  47324. flexibleHeight: !0,
  47325. flexibleWidth: !0,
  47326. flexibleMaxHeight: 118
  47327. }, this._contextKeyService, !0)), this._replaceInput.setPreserveCase(!!this._state.preserveCase), this._register(this._replaceInput.onKeyDown((function (t) {
  47328. return e._onReplaceInputKeyDown(t)
  47329. }))), this._register(this._replaceInput.inputBox.onDidChange((function () {
  47330. e._state.change({replaceString: e._replaceInput.inputBox.value}, !1)
  47331. }))), this._register(this._replaceInput.inputBox.onDidHeightChange((function (t) {
  47332. e._isReplaceVisible && e._tryUpdateHeight() && e._showViewZone()
  47333. }))), this._register(this._replaceInput.onDidOptionChange((function () {
  47334. e._state.change({preserveCase: e._replaceInput.getPreserveCase()}, !0)
  47335. }))), this._register(this._replaceInput.onPreserveCaseKeyDown((function (t) {
  47336. t.equals(2) && (e._prevBtn.isEnabled() ? e._prevBtn.focus() : e._nextBtn.isEnabled() ? e._nextBtn.focus() : e._toggleSelectionFind.enabled ? e._toggleSelectionFind.focus() : e._closeBtn.isEnabled() && e._closeBtn.focus(), t.preventDefault())
  47337. }))), this._replaceBtn = this._register(new z({
  47338. label: N + this._keybindingLabelFor(f.FIND_IDS.ReplaceOneAction),
  47339. className: "codicon codicon-replace",
  47340. onTrigger: function () {
  47341. e._controller.replace()
  47342. },
  47343. onKeyDown: function (t) {
  47344. t.equals(1026) && (e._closeBtn.focus(), t.preventDefault())
  47345. }
  47346. })), this._replaceAllBtn = this._register(new z({
  47347. label: x + this._keybindingLabelFor(f.FIND_IDS.ReplaceAllAction),
  47348. className: "codicon codicon-replace-all",
  47349. onTrigger: function () {
  47350. e._controller.replaceAll()
  47351. }
  47352. }));
  47353. var o = document.createElement("div");
  47354. o.className = "replace-part", o.appendChild(this._replaceInput.domNode);
  47355. var r = document.createElement("div");
  47356. r.className = "replace-actions", o.appendChild(r), r.appendChild(this._replaceBtn.domNode), r.appendChild(this._replaceAllBtn.domNode), this._toggleReplaceBtn = this._register(new z({
  47357. label: I,
  47358. className: "codicon toggle left", onTrigger: function () {
  47359. e._state.change({isReplaceRevealed: !e._isReplaceVisible}, !1), e._isReplaceVisible && (e._replaceInput.width = i.getTotalWidth(e._findInput.domNode), e._replaceInput.inputBox.layout()), e._showViewZone()
  47360. }
  47361. })), this._toggleReplaceBtn.toggleClass("codicon-chevron-down", this._isReplaceVisible), this._toggleReplaceBtn.toggleClass("codicon-chevron-right", !this._isReplaceVisible), this._toggleReplaceBtn.setExpanded(this._isReplaceVisible), this._domNode = document.createElement("div"), this._domNode.className = "editor-widget find-widget", this._domNode.setAttribute("aria-hidden", "true"), this._domNode.style.width = "419px", this._domNode.appendChild(this._toggleReplaceBtn.domNode), this._domNode.appendChild(t), this._domNode.appendChild(o), this._resizeSash = new a.Sash(this._domNode, this, {orientation: 0}), this._resized = !1;
  47362. var l = 419;
  47363. this._register(this._resizeSash.onDidStart((function () {
  47364. l = i.getTotalWidth(e._domNode)
  47365. }))), this._register(this._resizeSash.onDidChange((function (t) {
  47366. e._resized = !0
  47367. ;var n = l + t.startX - t.currentX;
  47368. n < 419 || (n > (parseFloat(i.getComputedStyle(e._domNode).maxWidth) || 0) || (e._domNode.style.width = n + "px", e._isReplaceVisible && (e._replaceInput.width = i.getTotalWidth(e._findInput.domNode)), e._findInput.inputBox.layout(), e._tryUpdateHeight()))
  47369. }))), this._register(this._resizeSash.onDidReset((function () {
  47370. var t = i.getTotalWidth(e._domNode);
  47371. if (!(t < 419)) {
  47372. var n = 419;
  47373. if (!e._resized || 419 === t) {
  47374. var o = e._codeEditor.getLayoutInfo();
  47375. n = o.width - 28 - o.minimapWidth - 15, e._resized = !0
  47376. }
  47377. e._domNode.style.width = n + "px", e._isReplaceVisible && (e._replaceInput.width = i.getTotalWidth(e._findInput.domNode)), e._findInput.inputBox.layout()
  47378. }
  47379. })))
  47380. }, t.prototype.updateAccessibilitySupport = function () {
  47381. var e = this._codeEditor.getOption(2);
  47382. this._findInput.setFocusInputOnOptionClick(2 !== e)
  47383. }, t.ID = "editor.contrib.findWidget", t
  47384. }(l.Widget);
  47385. t.FindWidget = V;
  47386. var z = function (e) {
  47387. function t(t) {
  47388. var n = e.call(this) || this;
  47389. return n._opts = t, n._domNode = document.createElement("div"), n._domNode.title = n._opts.label, n._domNode.tabIndex = 0,
  47390. n._domNode.className = "button " + n._opts.className, n._domNode.setAttribute("role", "button"), n._domNode.setAttribute("aria-label", n._opts.label), n.onclick(n._domNode, (function (e) {
  47391. n._opts.onTrigger(), e.preventDefault()
  47392. })), n.onkeydown(n._domNode, (function (e) {
  47393. if (e.equals(10) || e.equals(3)) return n._opts.onTrigger(), void e.preventDefault();
  47394. n._opts.onKeyDown && n._opts.onKeyDown(e)
  47395. })), n
  47396. }
  47397. return r(t, e), Object.defineProperty(t.prototype, "domNode", {
  47398. get: function () {
  47399. return this._domNode
  47400. }, enumerable: !0, configurable: !0
  47401. }), t.prototype.isEnabled = function () {
  47402. return this._domNode.tabIndex >= 0
  47403. }, t.prototype.focus = function () {
  47404. this._domNode.focus()
  47405. }, t.prototype.setEnabled = function (e) {
  47406. i.toggleClass(this._domNode, "disabled", !e), this._domNode.setAttribute("aria-disabled", String(!e)), this._domNode.tabIndex = e ? 0 : -1
  47407. }, t.prototype.setExpanded = function (e) {
  47408. this._domNode.setAttribute("aria-expanded", String(!!e))
  47409. }, t.prototype.toggleClass = function (e, t) {
  47410. i.toggleClass(this._domNode, e, t)
  47411. }, t
  47412. }(l.Widget);
  47413. t.SimpleButton = z,
  47414. v.registerThemingParticipant((function (e, t) {
  47415. var n = function (e, n) {
  47416. n && t.addRule(".monaco-editor " + e + " { background-color: " + n + "; }")
  47417. };
  47418. n(".findMatch", e.getColor(m.editorFindMatchHighlight)), n(".currentFindMatch", e.getColor(m.editorFindMatch)), n(".findScope", e.getColor(m.editorFindRangeHighlight)), n(".find-widget", e.getColor(m.editorWidgetBackground));
  47419. var i = e.getColor(m.widgetShadow);
  47420. i && t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px " + i + "; }");
  47421. var o = e.getColor(m.editorFindMatchHighlightBorder);
  47422. o && t.addRule(".monaco-editor .findMatch { border: 1px " + ("hc" === e.type ? "dotted" : "solid") + " " + o + "; box-sizing: border-box; }");
  47423. var r = e.getColor(m.editorFindMatchBorder);
  47424. r && t.addRule(".monaco-editor .currentFindMatch { border: 2px solid " + r + "; padding: 1px; box-sizing: border-box; }");
  47425. var s = e.getColor(m.editorFindRangeHighlightBorder);
  47426. s && t.addRule(".monaco-editor .findScope { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + s + "; }");
  47427. var a = e.getColor(m.contrastBorder)
  47428. ;a && t.addRule(".monaco-editor .find-widget { border: 1px solid " + a + "; }");
  47429. var l = e.getColor(m.editorWidgetForeground);
  47430. l && t.addRule(".monaco-editor .find-widget { color: " + l + "; }");
  47431. var u = e.getColor(m.errorForeground);
  47432. u && t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: " + u + "; }");
  47433. var d = e.getColor(m.editorWidgetResizeBorder);
  47434. if (d) t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: " + d + "; width: 3px !important; margin-left: -4px;}"); else {
  47435. var c = e.getColor(m.editorWidgetBorder);
  47436. c && t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: " + c + "; width: 3px !important; margin-left: -4px;}")
  47437. }
  47438. var h = e.getColor(m.focusBorder);
  47439. h && t.addRule(".monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: " + h + "; }")
  47440. }))
  47441. })), define(n[232], i([0, 1, 438, 15, 2, 5, 12, 23, 168, 572, 378, 573, 162, 18, 66, 11, 34, 74, 14, 35]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S) {
  47442. "use strict";
  47443. Object.defineProperty(t, "__esModule", {value: !0});
  47444. var w = 524288;
  47445. function E(e) {
  47446. if (!e.hasModel()) return null;
  47447. var t = e.getSelection();
  47448. if (t.startLineNumber === t.endLineNumber) if (t.isEmpty()) {
  47449. var n = e.getModel().getWordAtPosition(t.getStartPosition());
  47450. if (n) return n.word
  47451. } else if (e.getModel().getValueLengthInRange(t) < w) return e.getModel().getValueInRange(t);
  47452. return null
  47453. }
  47454. t.getSelectionSearchString = E;
  47455. var L = function (e) {
  47456. function t(t, n, o, r) {
  47457. var s = e.call(this) || this;
  47458. return s._editor = t, s._findWidgetVisible = u.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(n), s._contextKeyService = n, s._storageService = o, s._clipboardService = r, s._updateHistoryDelayer = new i.Delayer(500), s._state = s._register(new c.FindReplaceState), s.loadQueryState(), s._register(s._state.onFindReplaceStateChange((function (e) {
  47459. return s._onStateChanged(e)
  47460. }))), s._model = null, s._register(s._editor.onDidChangeModel((function () {
  47461. var e = s._editor.getModel() && s._state.isRevealed;
  47462. s.disposeModel(), s._state.change({
  47463. searchScope: null,
  47464. matchCase: s._storageService.getBoolean("editor.matchCase", 1, !1),
  47465. wholeWord: s._storageService.getBoolean("editor.wholeWord", 1, !1),
  47466. isRegex: s._storageService.getBoolean("editor.isRegex", 1, !1),
  47467. preserveCase: s._storageService.getBoolean("editor.preserveCase", 1, !1)
  47468. }, !1), e && s._start({
  47469. forceRevealReplace: !1,
  47470. seedSearchStringFromSelection: !1,
  47471. seedSearchStringFromGlobalClipboard: !1,
  47472. shouldFocus: 0,
  47473. shouldAnimate: !1,
  47474. updateSearchScope: !1
  47475. })
  47476. }))), s
  47477. }
  47478. return r(t, e), t.get = function (e) {
  47479. return e.getContribution(t.ID)
  47480. }, t.prototype.dispose = function () {
  47481. this.disposeModel(), e.prototype.dispose.call(this)
  47482. }, t.prototype.disposeModel = function () {
  47483. this._model && (this._model.dispose(), this._model = null)
  47484. }, t.prototype._onStateChanged = function (e) {
  47485. this.saveQueryState(e), e.isRevealed && (this._state.isRevealed ? this._findWidgetVisible.set(!0) : (this._findWidgetVisible.reset(), this.disposeModel())), e.searchString && this.setGlobalBufferTerm(this._state.searchString)
  47486. }, t.prototype.saveQueryState = function (e) {
  47487. e.isRegex && this._storageService.store("editor.isRegex", this._state.actualIsRegex, 1), e.wholeWord && this._storageService.store("editor.wholeWord", this._state.actualWholeWord, 1),
  47488. e.matchCase && this._storageService.store("editor.matchCase", this._state.actualMatchCase, 1), e.preserveCase && this._storageService.store("editor.preserveCase", this._state.actualPreserveCase, 1)
  47489. }, t.prototype.loadQueryState = function () {
  47490. this._state.change({
  47491. matchCase: this._storageService.getBoolean("editor.matchCase", 1, this._state.matchCase),
  47492. wholeWord: this._storageService.getBoolean("editor.wholeWord", 1, this._state.wholeWord),
  47493. isRegex: this._storageService.getBoolean("editor.isRegex", 1, this._state.isRegex),
  47494. preserveCase: this._storageService.getBoolean("editor.preserveCase", 1, this._state.preserveCase)
  47495. }, !1)
  47496. }, t.prototype.isFindInputFocused = function () {
  47497. return !!u.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)
  47498. }, t.prototype.getState = function () {
  47499. return this._state
  47500. }, t.prototype.closeFindWidget = function () {
  47501. this._state.change({isRevealed: !1, searchScope: null}, !1), this._editor.focus()
  47502. }, t.prototype.toggleCaseSensitive = function () {
  47503. this._state.change({matchCase: !this._state.matchCase}, !1),
  47504. this._state.isRevealed || this.highlightFindOptions()
  47505. }, t.prototype.toggleWholeWords = function () {
  47506. this._state.change({wholeWord: !this._state.wholeWord}, !1), this._state.isRevealed || this.highlightFindOptions()
  47507. }, t.prototype.toggleRegex = function () {
  47508. this._state.change({isRegex: !this._state.isRegex}, !1), this._state.isRevealed || this.highlightFindOptions()
  47509. }, t.prototype.toggleSearchScope = function () {
  47510. if (this._state.searchScope) this._state.change({searchScope: null}, !0); else if (this._editor.hasModel()) {
  47511. var e = this._editor.getSelection();
  47512. 1 === e.endColumn && e.endLineNumber > e.startLineNumber && (e = e.setEndPosition(e.endLineNumber - 1, this._editor.getModel().getLineMaxColumn(e.endLineNumber - 1))), e.isEmpty() || this._state.change({searchScope: e}, !0)
  47513. }
  47514. }, t.prototype.setSearchString = function (e) {
  47515. this._state.isRegex && (e = s.escapeRegExpCharacters(e)), this._state.change({searchString: e}, !1)
  47516. }, t.prototype.highlightFindOptions = function () {
  47517. }, t.prototype._start = function (e) {
  47518. if (this.disposeModel(), this._editor.hasModel()) {
  47519. var t, n = {isRevealed: !0}
  47520. ;
  47521. if (e.seedSearchStringFromSelection) (t = E(this._editor)) && (this._state.isRegex ? n.searchString = s.escapeRegExpCharacters(t) : n.searchString = t);
  47522. if (!n.searchString && e.seedSearchStringFromGlobalClipboard) (t = this.getGlobalBufferTerm()) && (n.searchString = t);
  47523. if (e.forceRevealReplace ? n.isReplaceRevealed = !0 : this._findWidgetVisible.get() || (n.isReplaceRevealed = !1), e.updateSearchScope) {
  47524. var i = this._editor.getSelection();
  47525. i.isEmpty() || (n.searchScope = i)
  47526. }
  47527. this._state.change(n, !1), this._model || (this._model = new u.FindModelBoundToEditorModel(this._editor, this._state))
  47528. }
  47529. }, t.prototype.start = function (e) {
  47530. this._start(e)
  47531. }, t.prototype.moveToNextMatch = function () {
  47532. return !!this._model && (this._model.moveToNextMatch(), !0)
  47533. }, t.prototype.moveToPrevMatch = function () {
  47534. return !!this._model && (this._model.moveToPrevMatch(), !0)
  47535. }, t.prototype.replace = function () {
  47536. return !!this._model && (this._model.replace(), !0)
  47537. }, t.prototype.replaceAll = function () {
  47538. return !!this._model && (this._model.replaceAll(), !0)
  47539. }, t.prototype.selectAllMatches = function () {
  47540. return !!this._model && (this._model.selectAllMatches(), this._editor.focus(), !0)
  47541. }, t.prototype.getGlobalBufferTerm = function () {
  47542. return this._editor.getOption(28).globalFindClipboard && this._clipboardService && this._editor.hasModel() && !this._editor.getModel().isTooLargeForSyncing() ? this._clipboardService.readFindText() : ""
  47543. }, t.prototype.setGlobalBufferTerm = function (e) {
  47544. this._editor.getOption(28).globalFindClipboard && this._clipboardService && this._editor.hasModel() && !this._editor.getModel().isTooLargeForSyncing() && this._clipboardService.writeFindText(e)
  47545. }, t.ID = "editor.contrib.findController", t = h([g(1, m.IContextKeyService), g(2, C.IStorageService), g(3, f.IClipboardService)], t)
  47546. }(o.Disposable);
  47547. t.CommonFindController = L;
  47548. var D = function (e) {
  47549. function t(t, n, i, o, r, s, a, l) {
  47550. var u = e.call(this, t, i, a, l) || this;
  47551. return u._contextViewService = n, u._keybindingService = o, u._themeService = r, u._notificationService = s, u._widget = null, u._findOptionsWidget = null, u
  47552. }
  47553. return r(t, e), t.prototype._start = function (t) {
  47554. this._widget || this._createFindWidget()
  47555. ;var n = this._editor.getSelection(), i = !1;
  47556. switch (this._editor.getOption(28).autoFindInSelection) {
  47557. case"always":
  47558. i = !0;
  47559. break;
  47560. case"never":
  47561. i = !1;
  47562. break;
  47563. case"multiline":
  47564. i = !!n && n.startLineNumber !== n.endLineNumber
  47565. }
  47566. t.updateSearchScope = i, e.prototype._start.call(this, t), 2 === t.shouldFocus ? this._widget.focusReplaceInput() : 1 === t.shouldFocus && this._widget.focusFindInput()
  47567. }, t.prototype.highlightFindOptions = function () {
  47568. this._widget || this._createFindWidget(), this._state.isRevealed ? this._widget.highlightFindOptions() : this._findOptionsWidget.highlightFindOptions()
  47569. }, t.prototype._createFindWidget = function () {
  47570. this._widget = this._register(new p.FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService)), this._findOptionsWidget = this._register(new d.FindOptionsWidget(this._editor, this._state, this._keybindingService, this._themeService))
  47571. },
  47572. t = h([g(1, v.IContextViewService), g(2, m.IContextKeyService), g(3, y.IKeybindingService), g(4, b.IThemeService), g(5, S.INotificationService), g(6, C.IStorageService), g(7, _.optional(f.IClipboardService))], t)
  47573. }(L);
  47574. t.FindController = D;
  47575. var N = function (e) {
  47576. function t() {
  47577. return e.call(this, {
  47578. id: u.FIND_IDS.StartFindAction,
  47579. label: n.localize(0, null),
  47580. alias: "Find",
  47581. precondition: void 0,
  47582. kbOpts: {kbExpr: null, primary: 2084, weight: 100},
  47583. menuOpts: {menuId: 17, group: "3_find", title: n.localize(1, null), order: 1}
  47584. }) || this
  47585. }
  47586. return r(t, e), t.prototype.run = function (e, t) {
  47587. var n = L.get(t);
  47588. n && n.start({
  47589. forceRevealReplace: !1,
  47590. seedSearchStringFromSelection: t.getOption(28).seedSearchStringFromSelection,
  47591. seedSearchStringFromGlobalClipboard: t.getOption(28).globalFindClipboard,
  47592. shouldFocus: 1,
  47593. shouldAnimate: !0,
  47594. updateSearchScope: !1
  47595. })
  47596. }, t
  47597. }(a.EditorAction);
  47598. t.StartFindAction = N;
  47599. var x = function (e) {
  47600. function t() {
  47601. return e.call(this, {
  47602. id: u.FIND_IDS.StartFindWithSelection,
  47603. label: n.localize(2, null),
  47604. alias: "Find With Selection",
  47605. precondition: void 0,
  47606. kbOpts: {
  47607. kbExpr: null, primary: 0, mac: {
  47608. primary: 2083
  47609. }, weight: 100
  47610. }
  47611. }) || this
  47612. }
  47613. return r(t, e), t.prototype.run = function (e, t) {
  47614. var n = L.get(t);
  47615. n && (n.start({
  47616. forceRevealReplace: !1,
  47617. seedSearchStringFromSelection: !0,
  47618. seedSearchStringFromGlobalClipboard: !1,
  47619. shouldFocus: 0,
  47620. shouldAnimate: !0,
  47621. updateSearchScope: !1
  47622. }), n.setGlobalBufferTerm(n.getState().searchString))
  47623. }, t
  47624. }(a.EditorAction);
  47625. t.StartFindWithSelectionAction = x;
  47626. var I = function (e) {
  47627. function t() {
  47628. return null !== e && e.apply(this, arguments) || this
  47629. }
  47630. return r(t, e), t.prototype.run = function (e, t) {
  47631. var n = L.get(t);
  47632. n && !this._run(n) && (n.start({
  47633. forceRevealReplace: !1,
  47634. seedSearchStringFromSelection: 0 === n.getState().searchString.length && t.getOption(28).seedSearchStringFromSelection,
  47635. seedSearchStringFromGlobalClipboard: !0,
  47636. shouldFocus: 0,
  47637. shouldAnimate: !0,
  47638. updateSearchScope: !1
  47639. }), this._run(n))
  47640. }, t
  47641. }(a.EditorAction);
  47642. t.MatchFindAction = I;
  47643. var M = function (e) {
  47644. function t() {
  47645. return e.call(this, {
  47646. id: u.FIND_IDS.NextMatchFindAction,
  47647. label: n.localize(3, null),
  47648. alias: "Find Next",
  47649. precondition: void 0,
  47650. kbOpts: {
  47651. kbExpr: l.EditorContextKeys.focus, primary: 61, mac: {
  47652. primary: 2085,
  47653. secondary: [61]
  47654. }, weight: 100
  47655. }
  47656. }) || this
  47657. }
  47658. return r(t, e), t.prototype._run = function (e) {
  47659. return e.moveToNextMatch()
  47660. }, t
  47661. }(I);
  47662. t.NextMatchFindAction = M;
  47663. var k = function (e) {
  47664. function t() {
  47665. return e.call(this, {
  47666. id: u.FIND_IDS.NextMatchFindAction,
  47667. label: n.localize(4, null),
  47668. alias: "Find Next",
  47669. precondition: void 0,
  47670. kbOpts: {
  47671. kbExpr: m.ContextKeyExpr.and(l.EditorContextKeys.focus, u.CONTEXT_FIND_INPUT_FOCUSED),
  47672. primary: 3,
  47673. weight: 100
  47674. }
  47675. }) || this
  47676. }
  47677. return r(t, e), t.prototype._run = function (e) {
  47678. return e.moveToNextMatch()
  47679. }, t
  47680. }(I);
  47681. t.NextMatchFindAction2 = k;
  47682. var T = function (e) {
  47683. function t() {
  47684. return e.call(this, {
  47685. id: u.FIND_IDS.PreviousMatchFindAction,
  47686. label: n.localize(5, null),
  47687. alias: "Find Previous",
  47688. precondition: void 0,
  47689. kbOpts: {
  47690. kbExpr: l.EditorContextKeys.focus,
  47691. primary: 1085,
  47692. mac: {primary: 3109, secondary: [1085]},
  47693. weight: 100
  47694. }
  47695. }) || this
  47696. }
  47697. return r(t, e), t.prototype._run = function (e) {
  47698. return e.moveToPrevMatch()
  47699. }, t
  47700. }(I);
  47701. t.PreviousMatchFindAction = T;
  47702. var R = function (e) {
  47703. function t() {
  47704. return e.call(this, {
  47705. id: u.FIND_IDS.PreviousMatchFindAction,
  47706. label: n.localize(6, null),
  47707. alias: "Find Previous",
  47708. precondition: void 0,
  47709. kbOpts: {
  47710. kbExpr: m.ContextKeyExpr.and(l.EditorContextKeys.focus, u.CONTEXT_FIND_INPUT_FOCUSED),
  47711. primary: 1027,
  47712. weight: 100
  47713. }
  47714. }) || this
  47715. }
  47716. return r(t, e), t.prototype._run = function (e) {
  47717. return e.moveToPrevMatch()
  47718. }, t
  47719. }(I);
  47720. t.PreviousMatchFindAction2 = R;
  47721. var O = function (e) {
  47722. function t() {
  47723. return null !== e && e.apply(this, arguments) || this
  47724. }
  47725. return r(t, e), t.prototype.run = function (e, t) {
  47726. var n = L.get(t);
  47727. if (n) {
  47728. var i = E(t);
  47729. i && n.setSearchString(i), this._run(n) || (n.start({
  47730. forceRevealReplace: !1,
  47731. seedSearchStringFromSelection: t.getOption(28).seedSearchStringFromSelection,
  47732. seedSearchStringFromGlobalClipboard: !1,
  47733. shouldFocus: 0,
  47734. shouldAnimate: !0,
  47735. updateSearchScope: !1
  47736. }), this._run(n))
  47737. }
  47738. }, t
  47739. }(a.EditorAction);
  47740. t.SelectionMatchFindAction = O;
  47741. var P = function (e) {
  47742. function t() {
  47743. return e.call(this, {
  47744. id: u.FIND_IDS.NextSelectionMatchFindAction,
  47745. label: n.localize(7, null),
  47746. alias: "Find Next Selection",
  47747. precondition: void 0,
  47748. kbOpts: {kbExpr: l.EditorContextKeys.focus, primary: 2109, weight: 100}
  47749. }) || this
  47750. }
  47751. return r(t, e), t.prototype._run = function (e) {
  47752. return e.moveToNextMatch()
  47753. }, t
  47754. }(O);
  47755. t.NextSelectionMatchFindAction = P;
  47756. var A = function (e) {
  47757. function t() {
  47758. return e.call(this, {
  47759. id: u.FIND_IDS.PreviousSelectionMatchFindAction,
  47760. label: n.localize(8, null),
  47761. alias: "Find Previous Selection",
  47762. precondition: void 0,
  47763. kbOpts: {kbExpr: l.EditorContextKeys.focus, primary: 3133, weight: 100}
  47764. }) || this
  47765. }
  47766. return r(t, e), t.prototype._run = function (e) {
  47767. return e.moveToPrevMatch()
  47768. }, t
  47769. }(O);
  47770. t.PreviousSelectionMatchFindAction = A;
  47771. var F = function (e) {
  47772. function t() {
  47773. return e.call(this, {
  47774. id: u.FIND_IDS.StartFindReplaceAction,
  47775. label: n.localize(9, null),
  47776. alias: "Replace",
  47777. precondition: void 0,
  47778. kbOpts: {kbExpr: null, primary: 2086, mac: {primary: 2596}, weight: 100},
  47779. menuOpts: {menuId: 17, group: "3_find", title: n.localize(10, null), order: 2}
  47780. }) || this
  47781. }
  47782. return r(t, e), t.prototype.run = function (e, t) {
  47783. if (t.hasModel() && !t.getOption(68)) {
  47784. var n = L.get(t), i = t.getSelection(), o = n.isFindInputFocused(),
  47785. r = !i.isEmpty() && i.startLineNumber === i.endLineNumber && t.getOption(28).seedSearchStringFromSelection && !o,
  47786. s = o || r ? 2 : 1;
  47787. n && n.start({
  47788. forceRevealReplace: !0,
  47789. seedSearchStringFromSelection: r,
  47790. seedSearchStringFromGlobalClipboard: t.getOption(28).seedSearchStringFromSelection,
  47791. shouldFocus: s,
  47792. shouldAnimate: !0,
  47793. updateSearchScope: !1
  47794. })
  47795. }
  47796. }, t
  47797. }(a.EditorAction);
  47798. t.StartFindReplaceAction = F, a.registerEditorContribution(L.ID, D), a.registerEditorAction(N), a.registerEditorAction(x), a.registerEditorAction(M), a.registerEditorAction(k), a.registerEditorAction(T), a.registerEditorAction(R), a.registerEditorAction(P), a.registerEditorAction(A), a.registerEditorAction(F);
  47799. var W = a.EditorCommand.bindToContribution(L.get);
  47800. a.registerEditorCommand(new W({
  47801. id: u.FIND_IDS.CloseFindWidgetCommand,
  47802. precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
  47803. handler: function (e) {
  47804. return e.closeFindWidget()
  47805. },
  47806. kbOpts: {weight: 105, kbExpr: l.EditorContextKeys.focus, primary: 9, secondary: [1033]}
  47807. })), a.registerEditorCommand(new W({
  47808. id: u.FIND_IDS.ToggleCaseSensitiveCommand, precondition: void 0, handler: function (e) {
  47809. return e.toggleCaseSensitive()
  47810. }, kbOpts: {
  47811. weight: 105,
  47812. kbExpr: l.EditorContextKeys.focus,
  47813. primary: u.ToggleCaseSensitiveKeybinding.primary,
  47814. mac: u.ToggleCaseSensitiveKeybinding.mac,
  47815. win: u.ToggleCaseSensitiveKeybinding.win,
  47816. linux: u.ToggleCaseSensitiveKeybinding.linux
  47817. }
  47818. })), a.registerEditorCommand(new W({
  47819. id: u.FIND_IDS.ToggleWholeWordCommand,
  47820. precondition: void 0,
  47821. handler: function (e) {
  47822. return e.toggleWholeWords()
  47823. },
  47824. kbOpts: {
  47825. weight: 105,
  47826. kbExpr: l.EditorContextKeys.focus,
  47827. primary: u.ToggleWholeWordKeybinding.primary,
  47828. mac: u.ToggleWholeWordKeybinding.mac,
  47829. win: u.ToggleWholeWordKeybinding.win,
  47830. linux: u.ToggleWholeWordKeybinding.linux
  47831. }
  47832. })), a.registerEditorCommand(new W({
  47833. id: u.FIND_IDS.ToggleRegexCommand,
  47834. precondition: void 0,
  47835. handler: function (e) {
  47836. return e.toggleRegex()
  47837. },
  47838. kbOpts: {
  47839. weight: 105,
  47840. kbExpr: l.EditorContextKeys.focus,
  47841. primary: u.ToggleRegexKeybinding.primary,
  47842. mac: u.ToggleRegexKeybinding.mac,
  47843. win: u.ToggleRegexKeybinding.win,
  47844. linux: u.ToggleRegexKeybinding.linux
  47845. }
  47846. })), a.registerEditorCommand(new W({
  47847. id: u.FIND_IDS.ToggleSearchScopeCommand, precondition: void 0, handler: function (e) {
  47848. return e.toggleSearchScope()
  47849. }, kbOpts: {
  47850. weight: 105,
  47851. kbExpr: l.EditorContextKeys.focus,
  47852. primary: u.ToggleSearchScopeKeybinding.primary,
  47853. mac: u.ToggleSearchScopeKeybinding.mac,
  47854. win: u.ToggleSearchScopeKeybinding.win,
  47855. linux: u.ToggleSearchScopeKeybinding.linux
  47856. }
  47857. })), a.registerEditorCommand(new W({
  47858. id: u.FIND_IDS.ReplaceOneAction,
  47859. precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
  47860. handler: function (e) {
  47861. return e.replace()
  47862. },
  47863. kbOpts: {weight: 105, kbExpr: l.EditorContextKeys.focus, primary: 3094}
  47864. })), a.registerEditorCommand(new W({
  47865. id: u.FIND_IDS.ReplaceOneAction,
  47866. precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
  47867. handler: function (e) {
  47868. return e.replace()
  47869. },
  47870. kbOpts: {
  47871. weight: 105,
  47872. kbExpr: m.ContextKeyExpr.and(l.EditorContextKeys.focus, u.CONTEXT_REPLACE_INPUT_FOCUSED),
  47873. primary: 3
  47874. }
  47875. })), a.registerEditorCommand(new W({
  47876. id: u.FIND_IDS.ReplaceAllAction,
  47877. precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
  47878. handler: function (e) {
  47879. return e.replaceAll()
  47880. },
  47881. kbOpts: {weight: 105, kbExpr: l.EditorContextKeys.focus, primary: 2563}
  47882. })), a.registerEditorCommand(new W({
  47883. id: u.FIND_IDS.ReplaceAllAction, precondition: u.CONTEXT_FIND_WIDGET_VISIBLE, handler: function (e) {
  47884. return e.replaceAll()
  47885. }, kbOpts: {
  47886. weight: 105,
  47887. kbExpr: m.ContextKeyExpr.and(l.EditorContextKeys.focus, u.CONTEXT_REPLACE_INPUT_FOCUSED),
  47888. primary: void 0,
  47889. mac: {primary: 2051}
  47890. }
  47891. })), a.registerEditorCommand(new W({
  47892. id: u.FIND_IDS.SelectAllMatchesAction,
  47893. precondition: u.CONTEXT_FIND_WIDGET_VISIBLE,
  47894. handler: function (e) {
  47895. return e.selectAllMatches()
  47896. },
  47897. kbOpts: {weight: 105, kbExpr: l.EditorContextKeys.focus, primary: 515}
  47898. }))
  47899. })), define(n[574], i([0, 1, 440, 21, 5, 15, 36, 2, 12, 381, 490, 23, 382, 41, 491, 17, 197, 383, 10, 18, 14, 20, 311]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E) {
  47900. "use strict";
  47901. Object.defineProperty(t, "__esModule", {value: !0});
  47902. var L = new S.RawContextKey("foldingEnabled", !1), D = function (e) {
  47903. function t(t, n) {
  47904. var i = e.call(this) || this;
  47905. i.contextKeyService = n, i.localToDispose = i._register(new l.DisposableStore), i.editor = t;
  47906. var o = i.editor.getOptions();
  47907. return i._isEnabled = o.get(30), i._useFoldingProviders = "indentation" !== o.get(31), i.foldingModel = null, i.hiddenRangeModel = null, i.rangeProvider = null, i.foldingRegionPromise = null, i.foldingStateMemento = null, i.foldingModelPromise = null,
  47908. i.updateScheduler = null, i.cursorChangedScheduler = null, i.mouseDownInfo = null, i.foldingDecorationProvider = new c.FoldingDecorationProvider(t), i.foldingDecorationProvider.autoHideFoldingControls = "mouseover" === o.get(84), i.foldingDecorationProvider.showFoldingHighlights = o.get(32), i.foldingEnabled = L.bindTo(i.contextKeyService), i.foldingEnabled.set(i._isEnabled), i._register(i.editor.onDidChangeModel((function () {
  47909. return i.onModelChanged()
  47910. }))), i._register(i.editor.onDidChangeConfiguration((function (e) {
  47911. if (e.hasChanged(30)) {
  47912. var t = i.editor.getOptions();
  47913. i._isEnabled = t.get(30), i.foldingEnabled.set(i._isEnabled), i.onModelChanged()
  47914. }
  47915. if (e.hasChanged(84) || e.hasChanged(32)) {
  47916. var n = i.editor.getOptions();
  47917. i.foldingDecorationProvider.autoHideFoldingControls = "mouseover" === n.get(84), i.foldingDecorationProvider.showFoldingHighlights = n.get(32), i.onModelContentChanged()
  47918. }
  47919. if (e.hasChanged(31)) {
  47920. var o = i.editor.getOptions();
  47921. i._useFoldingProviders = "indentation" !== o.get(31), i.onFoldingStrategyChanged()
  47922. }
  47923. }))), i.onModelChanged(), i
  47924. }
  47925. return r(t, e),
  47926. t.get = function (e) {
  47927. return e.getContribution(t.ID)
  47928. }, t.prototype.saveViewState = function () {
  47929. var e = this.editor.getModel();
  47930. if (!e || !this._isEnabled || e.isTooLargeForTokenization()) return {};
  47931. if (this.foldingModel) {
  47932. var t = this.foldingModel.isInitialized ? this.foldingModel.getMemento() : this.hiddenRangeModel.getMemento(),
  47933. n = this.rangeProvider ? this.rangeProvider.id : void 0;
  47934. return {collapsedRegions: t, lineCount: e.getLineCount(), provider: n}
  47935. }
  47936. }, t.prototype.restoreViewState = function (e) {
  47937. var t = this.editor.getModel();
  47938. if (t && this._isEnabled && !t.isTooLargeForTokenization() && this.hiddenRangeModel && e && e.collapsedRegions && e.lineCount === t.getLineCount()) {
  47939. e.provider !== y.ID_SYNTAX_PROVIDER && e.provider !== C.ID_INIT_PROVIDER || (this.foldingStateMemento = e);
  47940. var n = e.collapsedRegions;
  47941. if (this.hiddenRangeModel.applyMemento(n)) {
  47942. var i = this.getFoldingModel();
  47943. i && i.then((function (e) {
  47944. e && e.applyMemento(n)
  47945. })).then(void 0, b.onUnexpectedError)
  47946. }
  47947. }
  47948. }, t.prototype.onModelChanged = function () {
  47949. var e = this;
  47950. this.localToDispose.clear();
  47951. var t = this.editor.getModel()
  47952. ;this._isEnabled && t && !t.isTooLargeForTokenization() && (this.foldingModel = new d.FoldingModel(t, this.foldingDecorationProvider), this.localToDispose.add(this.foldingModel), this.hiddenRangeModel = new f.HiddenRangeModel(this.foldingModel), this.localToDispose.add(this.hiddenRangeModel), this.localToDispose.add(this.hiddenRangeModel.onDidChange((function (t) {
  47953. return e.onHiddenRangesChanges(t)
  47954. }))), this.updateScheduler = new s.Delayer(200), this.cursorChangedScheduler = new s.RunOnceScheduler((function () {
  47955. return e.revealCursor()
  47956. }), 200), this.localToDispose.add(this.cursorChangedScheduler), this.localToDispose.add(_.FoldingRangeProviderRegistry.onDidChange((function () {
  47957. return e.onFoldingStrategyChanged()
  47958. }))), this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((function () {
  47959. return e.onFoldingStrategyChanged()
  47960. }))), this.localToDispose.add(this.editor.onDidChangeModelContent((function () {
  47961. return e.onModelContentChanged()
  47962. }))), this.localToDispose.add(this.editor.onDidChangeCursorPosition((function () {
  47963. return e.onCursorPositionChanged()
  47964. }))), this.localToDispose.add(this.editor.onMouseDown((function (t) {
  47965. return e.onEditorMouseDown(t)
  47966. }))), this.localToDispose.add(this.editor.onMouseUp((function (t) {
  47967. return e.onEditorMouseUp(t)
  47968. }))), this.localToDispose.add({
  47969. dispose: function () {
  47970. e.foldingRegionPromise && (e.foldingRegionPromise.cancel(), e.foldingRegionPromise = null), e.updateScheduler && e.updateScheduler.cancel(), e.updateScheduler = null, e.foldingModel = null, e.foldingModelPromise = null, e.hiddenRangeModel = null, e.cursorChangedScheduler = null, e.foldingStateMemento = null, e.rangeProvider && e.rangeProvider.dispose(), e.rangeProvider = null
  47971. }
  47972. }), this.onModelContentChanged())
  47973. }, t.prototype.onFoldingStrategyChanged = function () {
  47974. this.rangeProvider && this.rangeProvider.dispose(), this.rangeProvider = null, this.onModelContentChanged()
  47975. }, t.prototype.getRangeProvider = function (e) {
  47976. var t = this;
  47977. if (this.rangeProvider) return this.rangeProvider;
  47978. if (this.rangeProvider = new v.IndentRangeProvider(e), this._useFoldingProviders && this.foldingModel) {
  47979. var n = _.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);
  47980. if (0 === n.length && this.foldingStateMemento && this.foldingStateMemento.collapsedRegions) return this.rangeProvider = new C.InitializingRangeProvider(e, this.foldingStateMemento.collapsedRegions, (function () {
  47981. t.foldingStateMemento = null, t.onFoldingStrategyChanged()
  47982. }), 3e4);
  47983. n.length > 0 && (this.rangeProvider = new y.SyntaxRangeProvider(e, n))
  47984. }
  47985. return this.foldingStateMemento = null, this.rangeProvider
  47986. }, t.prototype.getFoldingModel = function () {
  47987. return this.foldingModelPromise
  47988. }, t.prototype.onModelContentChanged = function () {
  47989. var e = this;
  47990. this.updateScheduler && (this.foldingRegionPromise && (this.foldingRegionPromise.cancel(), this.foldingRegionPromise = null), this.foldingModelPromise = this.updateScheduler.trigger((function () {
  47991. var t = e.foldingModel;
  47992. if (!t) return null;
  47993. var n = e.foldingRegionPromise = s.createCancelablePromise((function (n) {
  47994. return e.getRangeProvider(t.textModel).compute(n)
  47995. }));
  47996. return n.then((function (i) {
  47997. if (i && n === e.foldingRegionPromise) {
  47998. var o = e.editor.getSelections(), r = o ? o.map((function (e) {
  47999. return e.startLineNumber
  48000. })) : [];
  48001. t.update(i, r)
  48002. }
  48003. return t
  48004. }))
  48005. })).then(void 0, (function (e) {
  48006. return b.onUnexpectedError(e), null
  48007. })))
  48008. }, t.prototype.onHiddenRangesChanges = function (e) {
  48009. if (this.hiddenRangeModel && e.length) {
  48010. var t = this.editor.getSelections();
  48011. t && this.hiddenRangeModel.adjustSelections(t) && this.editor.setSelections(t)
  48012. }
  48013. this.editor.setHiddenAreas(e)
  48014. }, t.prototype.onCursorPositionChanged = function () {
  48015. this.hiddenRangeModel && this.hiddenRangeModel.hasRanges() && this.cursorChangedScheduler.schedule()
  48016. }, t.prototype.revealCursor = function () {
  48017. var e = this, t = this.getFoldingModel();
  48018. t && t.then((function (t) {
  48019. if (t) {
  48020. var n = e.editor.getSelections();
  48021. if (n && n.length > 0) {
  48022. for (var i = [], o = function (n) {
  48023. var o = n.selectionStartLineNumber;
  48024. e.hiddenRangeModel && e.hiddenRangeModel.isHidden(o) && i.push.apply(i, t.getAllRegionsAtLine(o, (function (e) {
  48025. return e.isCollapsed && o > e.startLineNumber
  48026. })))
  48027. }, r = 0, s = n; r < s.length; r++) {
  48028. o(s[r])
  48029. }
  48030. i.length && (t.toggleCollapseState(i), e.reveal(n[0].getPosition()))
  48031. }
  48032. }
  48033. })).then(void 0, b.onUnexpectedError)
  48034. }, t.prototype.onEditorMouseDown = function (e) {
  48035. if (this.mouseDownInfo = null, this.hiddenRangeModel && e.target && e.target.range && (e.event.leftButton || e.event.middleButton)) {
  48036. var t = e.target.range, n = !1;
  48037. switch (e.target.type) {
  48038. case 4:
  48039. var i = e.target.detail, o = e.target.element.offsetLeft;
  48040. if (i.offsetX - o < 5) return;
  48041. n = !0;
  48042. break;
  48043. case 6:
  48044. if (this.hiddenRangeModel.hasRanges()) {
  48045. var r = this.editor.getModel();
  48046. if (r && t.startColumn === r.getLineMaxColumn(t.startLineNumber)) break
  48047. }
  48048. return;
  48049. default:
  48050. return
  48051. }
  48052. this.mouseDownInfo = {lineNumber: t.startLineNumber, iconClicked: n}
  48053. }
  48054. }, t.prototype.onEditorMouseUp = function (e) {
  48055. var t = this, n = this.getFoldingModel();
  48056. if (n && this.mouseDownInfo && e.target) {
  48057. var i = this.mouseDownInfo.lineNumber, o = this.mouseDownInfo.iconClicked, r = e.target.range;
  48058. if (r && r.startLineNumber === i) {
  48059. if (o) {
  48060. if (4 !== e.target.type) return
  48061. } else {
  48062. var s = this.editor.getModel();
  48063. if (!s || r.startColumn !== s.getLineMaxColumn(i)) return
  48064. }
  48065. n.then((function (n) {
  48066. if (n) {
  48067. var r = n.getRegionAtLine(i);
  48068. if (r && r.startLineNumber === i) {
  48069. var s = r.isCollapsed
  48070. ;
  48071. if (o || s) {
  48072. var a = [], l = e.event.middleButton || e.event.shiftKey;
  48073. if (l) for (var u = 0, d = n.getRegionsInside(r); u < d.length; u++) {
  48074. var c = d[u];
  48075. c.isCollapsed === s && a.push(c)
  48076. }
  48077. !s && l && 0 !== a.length || a.push(r), n.toggleCollapseState(a), t.reveal({
  48078. lineNumber: i,
  48079. column: 1
  48080. })
  48081. }
  48082. }
  48083. }
  48084. })).then(void 0, b.onUnexpectedError)
  48085. }
  48086. }
  48087. }, t.prototype.reveal = function (e) {
  48088. this.editor.revealPositionInCenterIfOutsideViewport(e, 0)
  48089. }, t.ID = "editor.contrib.folding", t = h([g(1, S.IContextKeyService)], t)
  48090. }(l.Disposable);
  48091. t.FoldingController = D;
  48092. var N = function (e) {
  48093. function t() {
  48094. return null !== e && e.apply(this, arguments) || this
  48095. }
  48096. return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
  48097. var i = this, o = D.get(t);
  48098. if (o) {
  48099. var r = o.getFoldingModel();
  48100. return r ? (this.reportTelemetry(e, t), r.then((function (e) {
  48101. if (e) {
  48102. i.invoke(o, e, t, n);
  48103. var r = t.getSelection();
  48104. r && o.reveal(r.getStartPosition())
  48105. }
  48106. }))) : void 0
  48107. }
  48108. }, t.prototype.getSelectedLines = function (e) {
  48109. var t = e.getSelections();
  48110. return t ? t.map((function (e) {
  48111. return e.startLineNumber
  48112. })) : []
  48113. }, t.prototype.getLineNumbers = function (e, t) {
  48114. return e && e.selectionLines ? e.selectionLines.map((function (e) {
  48115. return e + 1
  48116. })) : this.getSelectedLines(t)
  48117. }, t.prototype.run = function (e, t) {
  48118. }, t
  48119. }(u.EditorAction);
  48120. function x(e) {
  48121. if (!i.isUndefined(e)) {
  48122. if (!i.isObject(e)) return !1;
  48123. var t = e;
  48124. if (!i.isUndefined(t.levels) && !i.isNumber(t.levels)) return !1;
  48125. if (!i.isUndefined(t.direction) && !i.isString(t.direction)) return !1;
  48126. if (!(i.isUndefined(t.selectionLines) || i.isArray(t.selectionLines) && t.selectionLines.every(i.isNumber))) return !1
  48127. }
  48128. return !0
  48129. }
  48130. var I = function (e) {
  48131. function t() {
  48132. return e.call(this, {
  48133. id: "editor.unfold",
  48134. label: n.localize(0, null),
  48135. alias: "Unfold",
  48136. precondition: L,
  48137. kbOpts: {
  48138. kbExpr: p.EditorContextKeys.editorTextFocus,
  48139. primary: 3161,
  48140. mac: {primary: 2649},
  48141. weight: 100
  48142. },
  48143. description: {
  48144. description: "Unfold the content in the editor", args: [{
  48145. name: "Unfold editor argument",
  48146. description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",
  48147. constraint: x,
  48148. schema: {
  48149. type: "object",
  48150. properties: {
  48151. levels: {type: "number", default: 1},
  48152. direction: {type: "string", enum: ["up", "down"], default: "down"},
  48153. selectionLines: {type: "array", items: {type: "number"}}
  48154. }
  48155. }
  48156. }]
  48157. }
  48158. }) || this
  48159. }
  48160. return r(t, e), t.prototype.invoke = function (e, t, n, i) {
  48161. var o = i && i.levels || 1, r = this.getLineNumbers(i, n);
  48162. i && "up" === i.direction ? d.setCollapseStateLevelsUp(t, !1, o, r) : d.setCollapseStateLevelsDown(t, !1, o, r)
  48163. }, t
  48164. }(N), M = function (e) {
  48165. function t() {
  48166. return e.call(this, {
  48167. id: "editor.unfoldRecursively",
  48168. label: n.localize(1, null),
  48169. alias: "Unfold Recursively",
  48170. precondition: L,
  48171. kbOpts: {
  48172. kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2137), weight: 100
  48173. }
  48174. }) || this
  48175. }
  48176. return r(t, e), t.prototype.invoke = function (e, t, n, i) {
  48177. d.setCollapseStateLevelsDown(t, !1, Number.MAX_VALUE, this.getSelectedLines(n))
  48178. }, t
  48179. }(N), k = function (e) {
  48180. function t() {
  48181. return e.call(this, {
  48182. id: "editor.fold",
  48183. label: n.localize(2, null),
  48184. alias: "Fold",
  48185. precondition: L,
  48186. kbOpts: {
  48187. kbExpr: p.EditorContextKeys.editorTextFocus,
  48188. primary: 3159,
  48189. mac: {primary: 2647},
  48190. weight: 100
  48191. },
  48192. description: {
  48193. description: "Fold the content in the editor", args: [{
  48194. name: "Fold editor argument",
  48195. description: "Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",
  48196. constraint: x,
  48197. schema: {
  48198. type: "object",
  48199. properties: {
  48200. levels: {type: "number"},
  48201. direction: {type: "string", enum: ["up", "down"]},
  48202. selectionLines: {type: "array", items: {type: "number"}}
  48203. }
  48204. }
  48205. }]
  48206. }
  48207. }) || this
  48208. }
  48209. return r(t, e), t.prototype.invoke = function (e, t, n, i) {
  48210. var o = this.getLineNumbers(i, n), r = i && i.levels, s = i && i.direction;
  48211. "number" != typeof r && "string" != typeof s ? d.setCollapseStateUp(t, !0, o) : "up" === s ? d.setCollapseStateLevelsUp(t, !0, r || 1, o) : d.setCollapseStateLevelsDown(t, !0, r || 1, o)
  48212. }, t
  48213. }(N), T = function (e) {
  48214. function t() {
  48215. return e.call(this, {
  48216. id: "editor.toggleFold",
  48217. label: n.localize(3, null),
  48218. alias: "Toggle Fold",
  48219. precondition: L,
  48220. kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2090), weight: 100}
  48221. }) || this
  48222. }
  48223. return r(t, e), t.prototype.invoke = function (e, t, n) {
  48224. var i = this.getSelectedLines(n);
  48225. d.toggleCollapseState(t, 1, i)
  48226. }, t
  48227. }(N), R = function (e) {
  48228. function t() {
  48229. return e.call(this, {
  48230. id: "editor.foldRecursively",
  48231. label: n.localize(4, null),
  48232. alias: "Fold Recursively",
  48233. precondition: L,
  48234. kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2135), weight: 100}
  48235. }) || this
  48236. }
  48237. return r(t, e), t.prototype.invoke = function (e, t, n) {
  48238. var i = this.getSelectedLines(n);
  48239. d.setCollapseStateLevelsDown(t, !0, Number.MAX_VALUE, i)
  48240. }, t
  48241. }(N), O = function (e) {
  48242. function t() {
  48243. return e.call(this, {
  48244. id: "editor.foldAllBlockComments",
  48245. label: n.localize(5, null),
  48246. alias: "Fold All Block Comments",
  48247. precondition: L,
  48248. kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2133), weight: 100}
  48249. }) || this
  48250. }
  48251. return r(t, e), t.prototype.invoke = function (e, t, n) {
  48252. if (t.regions.hasTypes()) d.setCollapseStateForType(t, _.FoldingRangeKind.Comment.value, !0); else {
  48253. var i = n.getModel();
  48254. if (!i) return;
  48255. var r = m.LanguageConfigurationRegistry.getComments(i.getLanguageIdentifier().id);
  48256. if (r && r.blockCommentStartToken) {
  48257. var s = new RegExp("^\\s*" + o.escapeRegExpCharacters(r.blockCommentStartToken));
  48258. d.setCollapseStateForMatchingLines(t, s, !0)
  48259. }
  48260. }
  48261. }, t
  48262. }(N), P = function (e) {
  48263. function t() {
  48264. return e.call(this, {
  48265. id: "editor.foldAllMarkerRegions",
  48266. label: n.localize(6, null),
  48267. alias: "Fold All Regions",
  48268. precondition: L,
  48269. kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2077), weight: 100}
  48270. }) || this
  48271. }
  48272. return r(t, e), t.prototype.invoke = function (e, t, n) {
  48273. if (t.regions.hasTypes()) d.setCollapseStateForType(t, _.FoldingRangeKind.Region.value, !0); else {
  48274. var i = n.getModel();
  48275. if (!i) return;
  48276. var o = m.LanguageConfigurationRegistry.getFoldingRules(i.getLanguageIdentifier().id);
  48277. if (o && o.markers && o.markers.start) {
  48278. var r = new RegExp(o.markers.start);
  48279. d.setCollapseStateForMatchingLines(t, r, !0)
  48280. }
  48281. }
  48282. }, t
  48283. }(N), A = function (e) {
  48284. function t() {
  48285. return e.call(this, {
  48286. id: "editor.unfoldAllMarkerRegions",
  48287. label: n.localize(7, null),
  48288. alias: "Unfold All Regions",
  48289. precondition: L,
  48290. kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2078), weight: 100}
  48291. }) || this
  48292. }
  48293. return r(t, e), t.prototype.invoke = function (e, t, n) {
  48294. if (t.regions.hasTypes()) d.setCollapseStateForType(t, _.FoldingRangeKind.Region.value, !1); else {
  48295. var i = n.getModel();
  48296. if (!i) return;
  48297. var o = m.LanguageConfigurationRegistry.getFoldingRules(i.getLanguageIdentifier().id);
  48298. if (o && o.markers && o.markers.start) {
  48299. var r = new RegExp(o.markers.start);
  48300. d.setCollapseStateForMatchingLines(t, r, !1)
  48301. }
  48302. }
  48303. }, t
  48304. }(N), F = function (e) {
  48305. function t() {
  48306. return e.call(this, {
  48307. id: "editor.foldAll",
  48308. label: n.localize(8, null),
  48309. alias: "Fold All",
  48310. precondition: L,
  48311. kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2069), weight: 100}
  48312. }) || this
  48313. }
  48314. return r(t, e), t.prototype.invoke = function (e, t, n) {
  48315. d.setCollapseStateLevelsDown(t, !0)
  48316. }, t
  48317. }(N), W = function (e) {
  48318. function t() {
  48319. return e.call(this, {
  48320. id: "editor.unfoldAll",
  48321. label: n.localize(9, null),
  48322. alias: "Unfold All",
  48323. precondition: L,
  48324. kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2088), weight: 100}
  48325. }) || this
  48326. }
  48327. return r(t, e), t.prototype.invoke = function (e, t, n) {
  48328. d.setCollapseStateLevelsDown(t, !1)
  48329. }, t
  48330. }(N), B = function (e) {
  48331. function t() {
  48332. return null !== e && e.apply(this, arguments) || this
  48333. }
  48334. return r(t, e), t.prototype.getFoldingLevel = function () {
  48335. return parseInt(this.id.substr(t.ID_PREFIX.length))
  48336. }, t.prototype.invoke = function (e, t, n) {
  48337. d.setCollapseStateAtLevel(t, this.getFoldingLevel(), !0, this.getSelectedLines(n))
  48338. }, t.ID_PREFIX = "editor.foldLevel", t.ID = function (e) {
  48339. return t.ID_PREFIX + e
  48340. }, t
  48341. }(N);
  48342. u.registerEditorContribution(D.ID, D), u.registerEditorAction(I), u.registerEditorAction(M), u.registerEditorAction(k), u.registerEditorAction(R), u.registerEditorAction(F), u.registerEditorAction(W), u.registerEditorAction(O), u.registerEditorAction(P), u.registerEditorAction(A), u.registerEditorAction(T);
  48343. for (var V = 1; V <= 7; V++) u.registerInstantiatedEditorAction(new B({
  48344. id: B.ID(V),
  48345. label: n.localize(10, null, V),
  48346. alias: "Fold Level " + V,
  48347. precondition: L,
  48348. kbOpts: {kbExpr: p.EditorContextKeys.editorTextFocus, primary: a.KeyChord(2089, 2048 | 21 + V), weight: 100}
  48349. }));
  48350. t.foldBackgroundBackground = E.registerColor("editor.foldBackground", {
  48351. light: E.transparent(E.editorSelectionBackground, .3),
  48352. dark: E.transparent(E.editorSelectionBackground, .3),
  48353. hc: null
  48354. }, n.localize(11, null)), w.registerThemingParticipant((function (e, n) {
  48355. var i = e.getColor(t.foldBackgroundBackground);
  48356. i && n.addRule(".monaco-editor .folded-background { background-color: " + i + "; }")
  48357. }))
  48358. })), define(n[575], i([0, 1, 113, 84, 139, 267, 116, 14, 97, 6, 449, 136, 39, 2, 11, 34, 61, 133]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C) {
  48359. "use strict";
  48360. Object.defineProperty(t, "__esModule", {value: !0});
  48361. var b = function () {
  48362. function e(e) {
  48363. this._resolverService = e
  48364. }
  48365. return e.prototype.hasChildren = function (e) {
  48366. return e instanceof n.ReferencesModel || e instanceof n.FileReferences && !e.failure
  48367. }, e.prototype.getChildren = function (e) {
  48368. if (e instanceof n.ReferencesModel) return e.groups
  48369. ;
  48370. if (e instanceof n.FileReferences) return e.resolve(this._resolverService).then((function (e) {
  48371. return e.children
  48372. }));
  48373. throw new Error("bad tree")
  48374. }, e = h([g(0, i.ITextModelService)], e)
  48375. }();
  48376. t.DataSource = b;
  48377. var S = function () {
  48378. function e() {
  48379. }
  48380. return e.prototype.getHeight = function () {
  48381. return 23
  48382. }, e.prototype.getTemplateId = function (e) {
  48383. return e instanceof n.FileReferences ? D.id : x.id
  48384. }, e
  48385. }();
  48386. t.Delegate = S;
  48387. var w = function () {
  48388. function e(e) {
  48389. this._keybindingService = e
  48390. }
  48391. return e.prototype.getKeyboardNavigationLabel = function (e) {
  48392. if (e instanceof n.OneReference) {
  48393. var t = e.parent.preview, i = t && t.preview(e.range);
  48394. if (i) return i.value
  48395. }
  48396. return f.basename(e.uri)
  48397. }, e = h([g(0, _.IKeybindingService)], e)
  48398. }();
  48399. t.StringRepresentationProvider = w;
  48400. var E = function () {
  48401. function e() {
  48402. }
  48403. return e.prototype.getId = function (e) {
  48404. return e instanceof n.OneReference ? e.id : e.uri
  48405. }, e
  48406. }();
  48407. t.IdentityProvider = E;
  48408. var L = function (e) {
  48409. function t(t, n, i) {
  48410. var r = e.call(this) || this;
  48411. r._uriLabel = n;
  48412. var a = document.createElement("div");
  48413. return d.addClass(a, "reference-file"), r.file = r._register(new o.IconLabel(a, {
  48414. supportHighlights: !0
  48415. })), r.badge = new s.CountBadge(d.append(a, d.$(".count"))), r._register(u.attachBadgeStyler(r.badge, i)), t.appendChild(a), r
  48416. }
  48417. return r(t, e), t.prototype.set = function (e, t) {
  48418. var n = f.dirname(e.uri);
  48419. this.file.setLabel(p.getBaseLabel(e.uri), this._uriLabel.getUriLabel(n, {relative: !0}), {
  48420. title: this._uriLabel.getUriLabel(e.uri),
  48421. matches: t
  48422. });
  48423. var i = e.children.length;
  48424. this.badge.setCount(i), e.failure ? this.badge.setTitleFormat(c.localize(0, null)) : i > 1 ? this.badge.setTitleFormat(c.localize(1, null, i)) : this.badge.setTitleFormat(c.localize(2, null, i))
  48425. }, t = h([g(1, a.ILabelService), g(2, l.IThemeService)], t)
  48426. }(m.Disposable), D = function () {
  48427. function e(t) {
  48428. this._instantiationService = t, this.templateId = e.id
  48429. }
  48430. return e.prototype.renderTemplate = function (e) {
  48431. return this._instantiationService.createInstance(L, e)
  48432. }, e.prototype.renderElement = function (e, t, n) {
  48433. n.set(e.element, y.createMatches(e.filterData))
  48434. }, e.prototype.disposeTemplate = function (e) {
  48435. e.dispose()
  48436. }, e.id = "FileReferencesRenderer", e = h([g(0, v.IInstantiationService)], e)
  48437. }()
  48438. ;t.FileReferencesRenderer = D;
  48439. var N = function () {
  48440. function e(e) {
  48441. this.label = new C.HighlightedLabel(e, !1)
  48442. }
  48443. return e.prototype.set = function (e, t) {
  48444. var n = e.parent.preview, i = n && n.preview(e.range);
  48445. if (i) {
  48446. var o = i.value, r = i.highlight;
  48447. t && !y.FuzzyScore.isDefault(t) ? (d.toggleClass(this.label.element, "referenceMatch", !1), this.label.set(o, y.createMatches(t))) : (d.toggleClass(this.label.element, "referenceMatch", !0), this.label.set(o, [r]))
  48448. } else this.label.set(f.basename(e.uri) + ":" + (e.range.startLineNumber + 1) + ":" + (e.range.startColumn + 1))
  48449. }, e
  48450. }(), x = function () {
  48451. function e() {
  48452. this.templateId = e.id
  48453. }
  48454. return e.prototype.renderTemplate = function (e) {
  48455. return new N(e)
  48456. }, e.prototype.renderElement = function (e, t, n) {
  48457. n.set(e.element, e.filterData)
  48458. }, e.prototype.disposeTemplate = function () {
  48459. }, e.id = "OneReferenceRenderer", e
  48460. }();
  48461. t.OneReferenceRenderer = x;
  48462. var I = function () {
  48463. function e() {
  48464. }
  48465. return e.prototype.getAriaLabel = function (e) {
  48466. return e.ariaMessage
  48467. }, e
  48468. }();
  48469. t.AriaProvider = I
  48470. })),
  48471. define(n[576], i([0, 1, 455, 3, 22, 23, 12, 62, 384, 67, 14, 44, 30, 15, 10]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v) {
  48472. "use strict";
  48473. Object.defineProperty(t, "__esModule", {value: !0});
  48474. var _ = function () {
  48475. function e(e, t) {
  48476. this.decorationIds = [], this.editor = e, this.editorWorkerService = t
  48477. }
  48478. return e.get = function (t) {
  48479. return t.getContribution(e.ID)
  48480. }, e.prototype.dispose = function () {
  48481. }, e.prototype.run = function (t, n) {
  48482. var r = this;
  48483. this.currentRequest && this.currentRequest.cancel();
  48484. var s = this.editor.getSelection(), a = this.editor.getModel();
  48485. if (a && s) {
  48486. var l = s;
  48487. if (l.startLineNumber === l.endLineNumber) {
  48488. var c = new d.EditorState(this.editor, 5), h = a.uri;
  48489. return this.editorWorkerService.canNavigateValueSet(h) ? (this.currentRequest = m.createCancelablePromise((function (e) {
  48490. return r.editorWorkerService.navigateValueSet(h, l, n)
  48491. })), this.currentRequest.then((function (n) {
  48492. if (n && n.range && n.value && c.validate(r.editor)) {
  48493. var s = i.Range.lift(n.range), a = n.range,
  48494. d = n.value.length - (l.endColumn - l.startColumn);
  48495. a = {
  48496. startLineNumber: a.startLineNumber, startColumn: a.startColumn,
  48497. endLineNumber: a.endLineNumber, endColumn: a.startColumn + n.value.length
  48498. }, d > 1 && (l = new o.Selection(l.startLineNumber, l.startColumn, l.endLineNumber, l.endColumn + d - 1));
  48499. var h = new u.InPlaceReplaceCommand(s, l, n.value);
  48500. r.editor.pushUndoStop(), r.editor.executeCommand(t, h), r.editor.pushUndoStop(), r.decorationIds = r.editor.deltaDecorations(r.decorationIds, [{
  48501. range: a,
  48502. options: e.DECORATION
  48503. }]), r.decorationRemover && r.decorationRemover.cancel(), r.decorationRemover = m.timeout(350), r.decorationRemover.then((function () {
  48504. return r.decorationIds = r.editor.deltaDecorations(r.decorationIds, [])
  48505. })).catch(v.onUnexpectedError)
  48506. }
  48507. })).catch(v.onUnexpectedError)) : Promise.resolve(void 0)
  48508. }
  48509. }
  48510. }, e.ID = "editor.contrib.inPlaceReplaceController", e.DECORATION = f.ModelDecorationOptions.register({className: "valueSetReplacement"}), e = h([g(1, l.IEditorWorkerService)], e)
  48511. }(), y = function (e) {
  48512. function t() {
  48513. return e.call(this, {
  48514. id: "editor.action.inPlaceReplace.up",
  48515. label: n.localize(0, null),
  48516. alias: "Replace with Previous Value",
  48517. precondition: s.EditorContextKeys.writable,
  48518. kbOpts: {
  48519. kbExpr: s.EditorContextKeys.editorTextFocus, primary: 3154, weight: 100
  48520. }
  48521. }) || this
  48522. }
  48523. return r(t, e), t.prototype.run = function (e, t) {
  48524. var n = _.get(t);
  48525. return n ? n.run(this.id, !0) : Promise.resolve(void 0)
  48526. }, t
  48527. }(a.EditorAction), C = function (e) {
  48528. function t() {
  48529. return e.call(this, {
  48530. id: "editor.action.inPlaceReplace.down",
  48531. label: n.localize(1, null),
  48532. alias: "Replace with Next Value",
  48533. precondition: s.EditorContextKeys.writable,
  48534. kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: 3156, weight: 100}
  48535. }) || this
  48536. }
  48537. return r(t, e), t.prototype.run = function (e, t) {
  48538. var n = _.get(t);
  48539. return n ? n.run(this.id, !1) : Promise.resolve(void 0)
  48540. }, t
  48541. }(a.EditorAction);
  48542. a.registerEditorContribution(_.ID, _), a.registerEditorAction(y), a.registerEditorAction(C), c.registerThemingParticipant((function (e, t) {
  48543. var n = e.getColor(p.editorBracketMatchBorder);
  48544. n && t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px " + n + "; }")
  48545. }))
  48546. })), define(n[577], i([0, 1, 457, 15, 26, 10, 75, 2, 16, 12, 30, 17, 199, 495, 35, 51, 20, 14, 316]), (function (e, t, n, i, o, s, a, u, p, f, m, v, _, y, C, b, S, w) {
  48547. "use strict"
  48548. ;Object.defineProperty(t, "__esModule", {value: !0});
  48549. var E = {
  48550. general: m.ModelDecorationOptions.register({
  48551. stickiness: 1,
  48552. collapseOnReplaceEdit: !0,
  48553. inlineClassName: "detected-link"
  48554. }),
  48555. active: m.ModelDecorationOptions.register({
  48556. stickiness: 1,
  48557. collapseOnReplaceEdit: !0,
  48558. inlineClassName: "detected-link-active"
  48559. })
  48560. }, L = function () {
  48561. function e(e, t) {
  48562. this.link = e, this.decorationId = t
  48563. }
  48564. return e.decoration = function (t, n) {
  48565. return {range: t.range, options: e._getOptions(t, n, !1)}
  48566. }, e._getOptions = function (e, t, i) {
  48567. var o = l({}, i ? E.active : E.general);
  48568. return o.hoverMessage = function (e, t) {
  48569. var i = e.url && /^command:/i.test(e.url.toString()),
  48570. o = e.tooltip ? e.tooltip : i ? n.localize(0, null) : n.localize(1, null),
  48571. r = t ? p.isMacintosh ? n.localize(2, null) : n.localize(3, null) : p.isMacintosh ? n.localize(4, null) : n.localize(5, null);
  48572. return e.url ? new a.MarkdownString("", !0).appendMarkdown("[" + o + "](" + e.url.toString() + ") (" + r + ")") : (new a.MarkdownString).appendText(o + " (" + r + ")")
  48573. }(e, t), o
  48574. }, e.prototype.activate = function (t, n) {
  48575. t.changeDecorationOptions(this.decorationId, e._getOptions(this.link, n, !0))
  48576. }, e.prototype.deactivate = function (t, n) {
  48577. t.changeDecorationOptions(this.decorationId, e._getOptions(this.link, n, !1))
  48578. }, e
  48579. }(), D = function () {
  48580. function e(e, t, n) {
  48581. var o = this;
  48582. this.listenersToRemove = new u.DisposableStore, this.editor = e, this.openerService = t, this.notificationService = n;
  48583. var r = new _.ClickLinkGesture(e);
  48584. this.listenersToRemove.add(r), this.listenersToRemove.add(r.onMouseMoveOrRelevantKeyDown((function (e) {
  48585. var t = e[0], n = e[1];
  48586. o._onEditorMouseMove(t, n)
  48587. }))), this.listenersToRemove.add(r.onExecute((function (e) {
  48588. o.onEditorMouseUp(e)
  48589. }))), this.listenersToRemove.add(r.onCancel((function (e) {
  48590. o.cleanUpActiveLinkDecoration()
  48591. }))), this.enabled = e.getOption(52), this.listenersToRemove.add(e.onDidChangeConfiguration((function (t) {
  48592. var n = e.getOption(52);
  48593. o.enabled !== n && (o.enabled = n, o.updateDecorations([]), o.stop(), o.beginCompute())
  48594. }))), this.listenersToRemove.add(e.onDidChangeModelContent((function (e) {
  48595. return o.onChange()
  48596. }))), this.listenersToRemove.add(e.onDidChangeModel((function (e) {
  48597. return o.onModelChanged()
  48598. }))),
  48599. this.listenersToRemove.add(e.onDidChangeModelLanguage((function (e) {
  48600. return o.onModelModeChanged()
  48601. }))), this.listenersToRemove.add(v.LinkProviderRegistry.onDidChange((function (e) {
  48602. return o.onModelModeChanged()
  48603. }))), this.timeout = new i.TimeoutTimer, this.computePromise = null, this.activeLinksList = null, this.currentOccurrences = {}, this.activeLinkDecorationId = null, this.beginCompute()
  48604. }
  48605. return e.get = function (t) {
  48606. return t.getContribution(e.ID)
  48607. }, e.prototype.onModelChanged = function () {
  48608. this.currentOccurrences = {}, this.activeLinkDecorationId = null, this.stop(), this.beginCompute()
  48609. }, e.prototype.onModelModeChanged = function () {
  48610. this.stop(), this.beginCompute()
  48611. }, e.prototype.onChange = function () {
  48612. var t = this;
  48613. this.timeout.setIfNotSet((function () {
  48614. return t.beginCompute()
  48615. }), e.RECOMPUTE_TIME)
  48616. }, e.prototype.beginCompute = function () {
  48617. return d(this, void 0, void 0, (function () {
  48618. var e, t, n;
  48619. return c(this, (function (o) {
  48620. switch (o.label) {
  48621. case 0:
  48622. if (!this.editor.hasModel() || !this.enabled) return [2];
  48623. if (e = this.editor.getModel(), !v.LinkProviderRegistry.has(e)) return [2]
  48624. ;
  48625. this.activeLinksList && (this.activeLinksList.dispose(), this.activeLinksList = null), this.computePromise = i.createCancelablePromise((function (t) {
  48626. return y.getLinks(e, t)
  48627. })), o.label = 1;
  48628. case 1:
  48629. return o.trys.push([1, 3, 4, 5]), t = this, [4, this.computePromise];
  48630. case 2:
  48631. return t.activeLinksList = o.sent(), this.updateDecorations(this.activeLinksList.links), [3, 5];
  48632. case 3:
  48633. return n = o.sent(), s.onUnexpectedError(n), [3, 5];
  48634. case 4:
  48635. return this.computePromise = null, [7];
  48636. case 5:
  48637. return [2]
  48638. }
  48639. }))
  48640. }))
  48641. }, e.prototype.updateDecorations = function (e) {
  48642. for (var t = "altKey" === this.editor.getOption(59), n = [], i = Object.keys(this.currentOccurrences), o = 0, r = i.length; o < r; o++) {
  48643. var s = i[o], a = this.currentOccurrences[s];
  48644. n.push(a.decorationId)
  48645. }
  48646. var l = [];
  48647. if (e) for (var u = 0, d = e; u < d.length; u++) {
  48648. var c = d[u];
  48649. l.push(L.decoration(c, t))
  48650. }
  48651. var h = this.editor.deltaDecorations(n, l);
  48652. this.currentOccurrences = {}, this.activeLinkDecorationId = null;
  48653. for (o = 0, r = h.length; o < r; o++) {
  48654. a = new L(e[o], h[o]);
  48655. this.currentOccurrences[a.decorationId] = a
  48656. }
  48657. }, e.prototype._onEditorMouseMove = function (e, t) {
  48658. var n = this, i = "altKey" === this.editor.getOption(59);
  48659. if (this.isEnabled(e, t)) {
  48660. this.cleanUpActiveLinkDecoration();
  48661. var o = this.getLinkOccurrence(e.target.position);
  48662. o && this.editor.changeDecorations((function (e) {
  48663. o.activate(e, i), n.activeLinkDecorationId = o.decorationId
  48664. }))
  48665. } else this.cleanUpActiveLinkDecoration()
  48666. }, e.prototype.cleanUpActiveLinkDecoration = function () {
  48667. var e = "altKey" === this.editor.getOption(59);
  48668. if (this.activeLinkDecorationId) {
  48669. var t = this.currentOccurrences[this.activeLinkDecorationId];
  48670. t && this.editor.changeDecorations((function (n) {
  48671. t.deactivate(n, e)
  48672. })), this.activeLinkDecorationId = null
  48673. }
  48674. }, e.prototype.onEditorMouseUp = function (e) {
  48675. if (this.isEnabled(e)) {
  48676. var t = this.getLinkOccurrence(e.target.position);
  48677. t && this.openLinkOccurrence(t, e.hasSideBySideModifier, !0)
  48678. }
  48679. }, e.prototype.openLinkOccurrence = function (e, t, i) {
  48680. var r = this;
  48681. if (void 0 === i && (i = !1), this.openerService) {
  48682. var a = e.link;
  48683. a.resolve(o.CancellationToken.None).then((function (e) {
  48684. return r.openerService.open(e, {openToSide: t, fromUserGesture: i})
  48685. }), (function (e) {
  48686. var t = e instanceof Error ? e.message : e;
  48687. "invalid" === t ? r.notificationService.warn(n.localize(6, null, a.url.toString())) : "missing" === t ? r.notificationService.warn(n.localize(7, null)) : s.onUnexpectedError(e)
  48688. }))
  48689. }
  48690. }, e.prototype.getLinkOccurrence = function (e) {
  48691. if (!this.editor.hasModel() || !e) return null;
  48692. for (var t = 0, n = this.editor.getModel().getDecorationsInRange({
  48693. startLineNumber: e.lineNumber,
  48694. startColumn: e.column,
  48695. endLineNumber: e.lineNumber,
  48696. endColumn: e.column
  48697. }, 0, !0); t < n.length; t++) {
  48698. var i = n[t], o = this.currentOccurrences[i.id];
  48699. if (o) return o
  48700. }
  48701. return null
  48702. }, e.prototype.isEnabled = function (e, t) {
  48703. return Boolean(6 === e.target.type && (e.hasTriggerModifier || t && t.keyCodeIsTriggerKey))
  48704. }, e.prototype.stop = function () {
  48705. this.timeout.cancel(), this.activeLinksList && this.activeLinksList.dispose(), this.computePromise && (this.computePromise.cancel(), this.computePromise = null)
  48706. }, e.prototype.dispose = function () {
  48707. this.listenersToRemove.dispose(), this.stop(), this.timeout.dispose()
  48708. }, e.ID = "editor.linkDetector", e.RECOMPUTE_TIME = 1e3,
  48709. e = h([g(1, b.IOpenerService), g(2, C.INotificationService)], e)
  48710. }(), N = function (e) {
  48711. function t() {
  48712. return e.call(this, {
  48713. id: "editor.action.openLink",
  48714. label: n.localize(8, null),
  48715. alias: "Open Link",
  48716. precondition: void 0
  48717. }) || this
  48718. }
  48719. return r(t, e), t.prototype.run = function (e, t) {
  48720. var n = D.get(t);
  48721. if (n && t.hasModel()) for (var i = 0, o = t.getSelections(); i < o.length; i++) {
  48722. var r = o[i], s = n.getLinkOccurrence(r.getEndPosition());
  48723. s && n.openLinkOccurrence(s, !1)
  48724. }
  48725. }, t
  48726. }(f.EditorAction);
  48727. f.registerEditorContribution(D.ID, D), f.registerEditorAction(N), w.registerThemingParticipant((function (e, t) {
  48728. var n = e.getColor(S.editorActiveLinkForeground);
  48729. n && t.addRule(".monaco-editor .detected-link-active { color: " + n + " !important; }")
  48730. }))
  48731. })), define(n[122], i([0, 1, 458, 15, 2, 50, 3, 12, 18, 14, 20, 317]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  48732. "use strict";
  48733. Object.defineProperty(t, "__esModule", {value: !0});
  48734. var p = function (e) {
  48735. function t(n, i) {
  48736. var r = e.call(this) || this;
  48737. return r.closeTimeout = 3e3, r._messageWidget = r._register(new o.MutableDisposable), r._messageListeners = r._register(new o.DisposableStore),
  48738. r._editor = n, r._visible = t.MESSAGE_VISIBLE.bindTo(i), r._register(r._editor.onDidAttemptReadOnlyEdit((function () {
  48739. return r._onDidAttemptReadOnlyEdit()
  48740. }))), r
  48741. }
  48742. return r(t, e), t.get = function (e) {
  48743. return e.getContribution(t.ID)
  48744. }, t.prototype.dispose = function () {
  48745. e.prototype.dispose.call(this), this._visible.reset()
  48746. }, t.prototype.showMessage = function (e, t) {
  48747. var n, o = this;
  48748. s.alert(e), this._visible.set(!0), this._messageWidget.clear(), this._messageListeners.clear(), this._messageWidget.value = new m(this._editor, t, e), this._messageListeners.add(this._editor.onDidBlurEditorText((function () {
  48749. return o.closeMessage()
  48750. }))), this._messageListeners.add(this._editor.onDidChangeCursorPosition((function () {
  48751. return o.closeMessage()
  48752. }))), this._messageListeners.add(this._editor.onDidDispose((function () {
  48753. return o.closeMessage()
  48754. }))), this._messageListeners.add(this._editor.onDidChangeModel((function () {
  48755. return o.closeMessage()
  48756. }))), this._messageListeners.add(new i.TimeoutTimer((function () {
  48757. return o.closeMessage()
  48758. }), this.closeTimeout)),
  48759. this._messageListeners.add(this._editor.onMouseMove((function (e) {
  48760. e.target.position && (n ? n.containsPosition(e.target.position) || o.closeMessage() : n = new a.Range(t.lineNumber - 3, 1, e.target.position.lineNumber + 3, 1))
  48761. })))
  48762. }, t.prototype.closeMessage = function () {
  48763. this._visible.reset(), this._messageListeners.clear(), this._messageWidget.value && this._messageListeners.add(m.fadeOut(this._messageWidget.value))
  48764. }, t.prototype._onDidAttemptReadOnlyEdit = function () {
  48765. this._editor.hasModel() && this.showMessage(n.localize(0, null), this._editor.getPosition())
  48766. }, t.ID = "editor.contrib.messageController", t.MESSAGE_VISIBLE = new u.RawContextKey("messageVisible", !1), t = h([g(1, u.IContextKeyService)], t)
  48767. }(o.Disposable);
  48768. t.MessageController = p;
  48769. var f = l.EditorCommand.bindToContribution(p.get);
  48770. l.registerEditorCommand(new f({
  48771. id: "leaveEditorMessage",
  48772. precondition: p.MESSAGE_VISIBLE,
  48773. handler: function (e) {
  48774. return e.closeMessage()
  48775. },
  48776. kbOpts: {weight: 130, primary: 9}
  48777. }));
  48778. var m = function () {
  48779. function e(e, t, n) {
  48780. var i = t.lineNumber, o = t.column;
  48781. this.allowEditorOverflow = !0,
  48782. this.suppressMouseDown = !1, this._editor = e, this._editor.revealLinesInCenterIfOutsideViewport(i, i, 0), this._position = {
  48783. lineNumber: i,
  48784. column: o - 1
  48785. }, this._domNode = document.createElement("div"), this._domNode.classList.add("monaco-editor-overlaymessage");
  48786. var r = document.createElement("div");
  48787. r.classList.add("message"), r.textContent = n, this._domNode.appendChild(r);
  48788. var s = document.createElement("div");
  48789. s.classList.add("anchor"), this._domNode.appendChild(s), this._editor.addContentWidget(this), this._domNode.classList.add("fadeIn")
  48790. }
  48791. return e.fadeOut = function (e) {
  48792. var t, n = function () {
  48793. e.dispose(), clearTimeout(t), e.getDomNode().removeEventListener("animationend", n)
  48794. };
  48795. return t = setTimeout(n, 110), e.getDomNode().addEventListener("animationend", n), e.getDomNode().classList.add("fadeOut"), {dispose: n}
  48796. }, e.prototype.dispose = function () {
  48797. this._editor.removeContentWidget(this)
  48798. }, e.prototype.getId = function () {
  48799. return "messageoverlay"
  48800. }, e.prototype.getDomNode = function () {
  48801. return this._domNode
  48802. }, e.prototype.getPosition = function () {
  48803. return {
  48804. position: this._position,
  48805. preference: [1, 2]
  48806. }
  48807. }, e
  48808. }();
  48809. l.registerEditorContribution(p.ID, p), d.registerThemingParticipant((function (e, t) {
  48810. var n = e.getColor(c.inputValidationInfoBorder);
  48811. if (n) {
  48812. var i = e.type === d.HIGH_CONTRAST ? 2 : 1;
  48813. t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: " + n + "; }"), t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: " + i + "px solid " + n + "; }")
  48814. }
  48815. var o = e.getColor(c.inputValidationInfoBackground);
  48816. o && t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: " + o + "; }");
  48817. var r = e.getColor(c.inputValidationInfoForeground);
  48818. r && t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { color: " + r + "; }")
  48819. }))
  48820. })), define(n[578], i([0, 1, 19, 10, 128, 2, 122, 11, 527, 567]), (function (e, t, n, i, o, s, a, l, u, p) {
  48821. "use strict";
  48822. Object.defineProperty(t, "__esModule", {value: !0});
  48823. var f = function (e) {
  48824. function t(t, n, i, r, a) {
  48825. var l = e.call(this) || this;
  48826. return l._editor = t, l.delegate = r, l._activeCodeActions = l._register(new s.MutableDisposable), l._codeActionWidget = new o.Lazy((function () {
  48827. return l._register(a.createInstance(u.CodeActionMenu, l._editor, {
  48828. onSelectCodeAction: function (e) {
  48829. return d(l, void 0, void 0, (function () {
  48830. return c(this, (function (t) {
  48831. return this.delegate.applyCodeAction(e, !0), [2]
  48832. }))
  48833. }))
  48834. }
  48835. }))
  48836. })), l._lightBulbWidget = new o.Lazy((function () {
  48837. var e = l._register(a.createInstance(p.LightBulbWidget, l._editor, n, i));
  48838. return l._register(e.onClick((function (e) {
  48839. return l.showCodeActionList(e.trigger, e.actions, e, {includeDisabledActions: !1})
  48840. }))), e
  48841. })), l
  48842. }
  48843. return r(t, e), t.prototype.update = function (e) {
  48844. var t, n, o;
  48845. return d(this, void 0, void 0, (function () {
  48846. var r, s, l, u, d;
  48847. return c(this, (function (c) {
  48848. switch (c.label) {
  48849. case 0:
  48850. if (1 !== e.type) return null === (t = this._lightBulbWidget.rawValue) || void 0 === t || t.hide(), [2];
  48851. c.label = 1;
  48852. case 1:
  48853. return c.trys.push([1, 3, , 4]), [4, e.actions];
  48854. case 2:
  48855. return r = c.sent(), [3, 4];
  48856. case 3:
  48857. return s = c.sent(), i.onUnexpectedError(s), [2];
  48858. case 4:
  48859. if (this._lightBulbWidget.getValue().update(r, e.trigger, e.position), 2 !== e.trigger.type) return [3, 11]
  48860. ;
  48861. if (!(null === (n = e.trigger.filter) || void 0 === n ? void 0 : n.include)) return [3, 10];
  48862. if (!(l = this.tryGetValidActionToApply(e.trigger, r))) return [3, 9];
  48863. c.label = 5;
  48864. case 5:
  48865. return c.trys.push([5, , 7, 8]), [4, this.delegate.applyCodeAction(l, !1)];
  48866. case 6:
  48867. return c.sent(), [3, 8];
  48868. case 7:
  48869. return r.dispose(), [7];
  48870. case 8:
  48871. return [2];
  48872. case 9:
  48873. if (e.trigger.context && (u = this.getInvalidActionThatWouldHaveBeenApplied(e.trigger, r)) && u.disabled) return a.MessageController.get(this._editor).showMessage(u.disabled, e.trigger.context.position), r.dispose(), [2];
  48874. c.label = 10;
  48875. case 10:
  48876. return d = !!(null === (o = e.trigger.filter) || void 0 === o ? void 0 : o.include), !e.trigger.context || r.allActions.length && (d || r.validActions.length) ? (this._activeCodeActions.value = r, this._codeActionWidget.getValue().show(e.trigger, r, e.position, {includeDisabledActions: d}), [3, 12]) : (a.MessageController.get(this._editor).showMessage(e.trigger.context.notAvailableMessage, e.trigger.context.position), this._activeCodeActions.value = r, r.dispose(), [2]);
  48877. case 11:
  48878. this._codeActionWidget.getValue().isVisible ? r.dispose() : this._activeCodeActions.value = r, c.label = 12;
  48879. case 12:
  48880. return [2]
  48881. }
  48882. }))
  48883. }))
  48884. }, t.prototype.getInvalidActionThatWouldHaveBeenApplied = function (e, t) {
  48885. if (t.allActions.length) return "first" === e.autoApply && 0 === t.validActions.length || "ifSingle" === e.autoApply && 1 === t.allActions.length ? n.find(t.allActions, (function (e) {
  48886. return e.disabled
  48887. })) : void 0
  48888. }, t.prototype.tryGetValidActionToApply = function (e, t) {
  48889. if (t.validActions.length) return "first" === e.autoApply && t.validActions.length > 0 || "ifSingle" === e.autoApply && 1 === t.validActions.length ? t.validActions[0] : void 0
  48890. }, t.prototype.showCodeActionList = function (e, t, n, i) {
  48891. return d(this, void 0, void 0, (function () {
  48892. return c(this, (function (o) {
  48893. return this._codeActionWidget.getValue().show(e, t, n, i), [2]
  48894. }))
  48895. }))
  48896. }, t = h([g(4, l.IInstantiationService)], t)
  48897. }(s.Disposable);
  48898. t.CodeActionUi = f
  48899. }));
  48900. a = this && this.__spreadArrays || function () {
  48901. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  48902. var i = Array(e), o = 0
  48903. ;
  48904. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  48905. return i
  48906. };
  48907. define(n[233], i([0, 1, 128, 2, 5, 12, 156, 23, 119, 578, 122, 432, 29, 18, 11, 72, 35, 73, 96, 528, 111]), (function (e, t, n, i, o, s, l, u, p, f, m, v, _, y, C, b, S, w, E, L, D) {
  48908. "use strict";
  48909. function N(e) {
  48910. return y.ContextKeyExpr.regex(L.SUPPORTED_CODE_ACTIONS.keys()[0], new RegExp("(\\s|^)" + o.escapeRegExpCharacters(e.value) + "\\b"))
  48911. }
  48912. Object.defineProperty(t, "__esModule", {value: !0});
  48913. var x = {
  48914. type: "object",
  48915. required: ["kind"],
  48916. defaultSnippets: [{body: {kind: ""}}],
  48917. properties: {
  48918. kind: {type: "string", description: v.localize(0, null)},
  48919. apply: {
  48920. type: "string",
  48921. description: v.localize(1, null),
  48922. default: "ifSingle",
  48923. enum: ["first", "ifSingle", "never"],
  48924. enumDescriptions: [v.localize(2, null), v.localize(3, null), v.localize(4, null)]
  48925. },
  48926. preferred: {type: "boolean", default: !1, description: v.localize(5, null)}
  48927. }
  48928. }, I = function (e) {
  48929. function t(t, i, o, r, s) {
  48930. var a = e.call(this) || this;
  48931. return a._instantiationService = s, a._editor = t, a._model = a._register(new L.CodeActionModel(a._editor, i, o, r)),
  48932. a._register(a._model.onDidChangeState((function (e) {
  48933. return a.update(e)
  48934. }))), a._ui = new n.Lazy((function () {
  48935. return a._register(new f.CodeActionUi(t, T.Id, W.Id, {
  48936. applyCodeAction: function (e, t) {
  48937. return d(a, void 0, void 0, (function () {
  48938. return c(this, (function (n) {
  48939. switch (n.label) {
  48940. case 0:
  48941. return n.trys.push([0, , 2, 3]), [4, this._applyCodeAction(e)];
  48942. case 1:
  48943. return n.sent(), [3, 3];
  48944. case 2:
  48945. return t && this._trigger({type: 1, filter: {}}), [7];
  48946. case 3:
  48947. return [2]
  48948. }
  48949. }))
  48950. }))
  48951. }
  48952. }, a._instantiationService))
  48953. })), a
  48954. }
  48955. return r(t, e), t.get = function (e) {
  48956. return e.getContribution(t.ID)
  48957. }, t.prototype.update = function (e) {
  48958. this._ui.getValue().update(e)
  48959. }, t.prototype.showCodeActions = function (e, t, n) {
  48960. return this._ui.getValue().showCodeActionList(e, t, n, {includeDisabledActions: !1})
  48961. }, t.prototype.manualTriggerAtCurrentPosition = function (e, t, n) {
  48962. if (this._editor.hasModel()) {
  48963. m.MessageController.get(this._editor).closeMessage();
  48964. var i = this._editor.getPosition();
  48965. this._trigger({type: 2, filter: t, autoApply: n, context: {notAvailableMessage: e, position: i}})
  48966. }
  48967. }, t.prototype._trigger = function (e) {
  48968. return this._model.trigger(e)
  48969. }, t.prototype._applyCodeAction = function (e) {
  48970. return this._instantiationService.invokeFunction(M, e, this._editor)
  48971. }, t.ID = "editor.contrib.quickFixController", t = h([g(1, b.IMarkerService), g(2, y.IContextKeyService), g(3, w.IEditorProgressService), g(4, C.IInstantiationService)], t)
  48972. }(i.Disposable);
  48973. function M(e, t, n) {
  48974. return d(this, void 0, void 0, (function () {
  48975. var i, o, r, s, u, d;
  48976. return c(this, (function (c) {
  48977. switch (c.label) {
  48978. case 0:
  48979. return i = e.get(l.IBulkEditService), o = e.get(_.ICommandService), r = e.get(E.ITelemetryService), s = e.get(S.INotificationService), r.publicLog2("codeAction.applyCodeAction", {
  48980. codeActionTitle: t.title,
  48981. codeActionKind: t.kind,
  48982. codeActionIsPreferred: !!t.isPreferred
  48983. }), t.edit ? [4, i.apply(t.edit, {editor: n})] : [3, 2];
  48984. case 1:
  48985. c.sent(), c.label = 2;
  48986. case 2:
  48987. if (!t.command) return [3, 6];
  48988. c.label = 3;
  48989. case 3:
  48990. return c.trys.push([3, 5, , 6]), [4, o.executeCommand.apply(o, a([t.command.id], t.command.arguments || []))];
  48991. case 4:
  48992. return c.sent(), [3, 6];
  48993. case 5:
  48994. return u = c.sent(),
  48995. d = "string" == typeof (h = u) ? h : h instanceof Error && "string" == typeof h.message ? h.message : void 0, s.error("string" == typeof d ? d : v.localize(6, null)), [3, 6];
  48996. case 6:
  48997. return [2]
  48998. }
  48999. var h
  49000. }))
  49001. }))
  49002. }
  49003. function k(e, t, n, i) {
  49004. if (e.hasModel()) {
  49005. var o = I.get(e);
  49006. o && o.manualTriggerAtCurrentPosition(t, n, i)
  49007. }
  49008. }
  49009. t.QuickFixController = I, t.applyCodeAction = M;
  49010. var T = function (e) {
  49011. function t() {
  49012. return e.call(this, {
  49013. id: t.Id,
  49014. label: v.localize(7, null),
  49015. alias: "Quick Fix...",
  49016. precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, u.EditorContextKeys.hasCodeActionsProvider),
  49017. kbOpts: {kbExpr: u.EditorContextKeys.editorTextFocus, primary: 2132, weight: 100}
  49018. }) || this
  49019. }
  49020. return r(t, e), t.prototype.run = function (e, t) {
  49021. return k(t, v.localize(8, null), void 0, void 0)
  49022. }, t.Id = "editor.action.quickFix", t
  49023. }(s.EditorAction);
  49024. t.QuickFixAction = T;
  49025. var R = function (e) {
  49026. function t() {
  49027. return e.call(this, {
  49028. id: p.codeActionCommandId,
  49029. precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, u.EditorContextKeys.hasCodeActionsProvider),
  49030. description: {
  49031. description: "Trigger a code action", args: [{
  49032. name: "args",
  49033. schema: x
  49034. }]
  49035. }
  49036. }) || this
  49037. }
  49038. return r(t, e), t.prototype.runEditorCommand = function (e, t, n) {
  49039. var i = D.CodeActionCommandArgs.fromUser(n, {kind: D.CodeActionKind.Empty, apply: "ifSingle"});
  49040. return k(t, "string" == typeof (null == n ? void 0 : n.kind) ? i.preferred ? v.localize(9, null, n.kind) : v.localize(10, null, n.kind) : i.preferred ? v.localize(11, null) : v.localize(12, null), {
  49041. include: i.kind,
  49042. includeSourceActions: !0,
  49043. onlyIncludePreferredActions: i.preferred
  49044. }, i.apply)
  49045. }, t
  49046. }(s.EditorCommand);
  49047. t.CodeActionCommand = R;
  49048. var O = function (e) {
  49049. function t() {
  49050. return e.call(this, {
  49051. id: p.refactorCommandId,
  49052. label: v.localize(13, null),
  49053. alias: "Refactor...",
  49054. precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, u.EditorContextKeys.hasCodeActionsProvider),
  49055. kbOpts: {
  49056. kbExpr: u.EditorContextKeys.editorTextFocus,
  49057. primary: 3120,
  49058. mac: {primary: 1328},
  49059. weight: 100
  49060. },
  49061. contextMenuOpts: {
  49062. group: "1_modification",
  49063. order: 2,
  49064. when: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.Refactor))
  49065. },
  49066. description: {description: "Refactor...", args: [{name: "args", schema: x}]}
  49067. }) || this
  49068. }
  49069. return r(t, e),
  49070. t.prototype.run = function (e, t, n) {
  49071. var i = D.CodeActionCommandArgs.fromUser(n, {kind: D.CodeActionKind.Refactor, apply: "never"});
  49072. return k(t, "string" == typeof (null == n ? void 0 : n.kind) ? i.preferred ? v.localize(14, null, n.kind) : v.localize(15, null, n.kind) : i.preferred ? v.localize(16, null) : v.localize(17, null), {
  49073. include: D.CodeActionKind.Refactor.contains(i.kind) ? i.kind : D.CodeActionKind.None,
  49074. onlyIncludePreferredActions: i.preferred
  49075. }, i.apply)
  49076. }, t
  49077. }(s.EditorAction);
  49078. t.RefactorAction = O;
  49079. var P = function (e) {
  49080. function t() {
  49081. return e.call(this, {
  49082. id: p.sourceActionCommandId,
  49083. label: v.localize(18, null),
  49084. alias: "Source Action...",
  49085. precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, u.EditorContextKeys.hasCodeActionsProvider),
  49086. contextMenuOpts: {
  49087. group: "1_modification",
  49088. order: 2.1,
  49089. when: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.Source))
  49090. },
  49091. description: {description: "Source Action...", args: [{name: "args", schema: x}]}
  49092. }) || this
  49093. }
  49094. return r(t, e), t.prototype.run = function (e, t, n) {
  49095. var i = D.CodeActionCommandArgs.fromUser(n, {
  49096. kind: D.CodeActionKind.Source, apply: "never"
  49097. });
  49098. return k(t, "string" == typeof (null == n ? void 0 : n.kind) ? i.preferred ? v.localize(19, null, n.kind) : v.localize(20, null, n.kind) : i.preferred ? v.localize(21, null) : v.localize(22, null), {
  49099. include: D.CodeActionKind.Source.contains(i.kind) ? i.kind : D.CodeActionKind.None,
  49100. includeSourceActions: !0,
  49101. onlyIncludePreferredActions: i.preferred
  49102. }, i.apply)
  49103. }, t
  49104. }(s.EditorAction);
  49105. t.SourceAction = P;
  49106. var A = function (e) {
  49107. function t() {
  49108. return e.call(this, {
  49109. id: p.organizeImportsCommandId,
  49110. label: v.localize(23, null),
  49111. alias: "Organize Imports",
  49112. precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.SourceOrganizeImports)),
  49113. kbOpts: {kbExpr: u.EditorContextKeys.editorTextFocus, primary: 1581, weight: 100}
  49114. }) || this
  49115. }
  49116. return r(t, e), t.prototype.run = function (e, t) {
  49117. return k(t, v.localize(24, null), {
  49118. include: D.CodeActionKind.SourceOrganizeImports,
  49119. includeSourceActions: !0
  49120. }, "ifSingle")
  49121. }, t
  49122. }(s.EditorAction);
  49123. t.OrganizeImportsAction = A;
  49124. var F = function (e) {
  49125. function t() {
  49126. return e.call(this, {
  49127. id: p.fixAllCommandId,
  49128. label: v.localize(25, null),
  49129. alias: "Fix All",
  49130. precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.SourceFixAll))
  49131. }) || this
  49132. }
  49133. return r(t, e), t.prototype.run = function (e, t) {
  49134. return k(t, v.localize(26, null), {
  49135. include: D.CodeActionKind.SourceFixAll,
  49136. includeSourceActions: !0
  49137. }, "ifSingle")
  49138. }, t
  49139. }(s.EditorAction);
  49140. t.FixAllAction = F;
  49141. var W = function (e) {
  49142. function t() {
  49143. return e.call(this, {
  49144. id: t.Id,
  49145. label: v.localize(27, null),
  49146. alias: "Auto Fix...",
  49147. precondition: y.ContextKeyExpr.and(u.EditorContextKeys.writable, N(D.CodeActionKind.QuickFix)),
  49148. kbOpts: {
  49149. kbExpr: u.EditorContextKeys.editorTextFocus,
  49150. primary: 1620,
  49151. mac: {primary: 2644},
  49152. weight: 100
  49153. }
  49154. }) || this
  49155. }
  49156. return r(t, e), t.prototype.run = function (e, t) {
  49157. return k(t, v.localize(28, null), {
  49158. include: D.CodeActionKind.QuickFix,
  49159. onlyIncludePreferredActions: !0
  49160. }, "ifSingle")
  49161. }, t.Id = "editor.action.autoFix", t
  49162. }(s.EditorAction);
  49163. t.AutoFixAction = W
  49164. })), define(n[579], i([0, 1, 12, 233]), (function (e, t, n, i) {
  49165. "use strict";
  49166. Object.defineProperty(t, "__esModule", {value: !0}),
  49167. n.registerEditorContribution(i.QuickFixController.ID, i.QuickFixController), n.registerEditorAction(i.QuickFixAction), n.registerEditorAction(i.RefactorAction), n.registerEditorAction(i.SourceAction), n.registerEditorAction(i.OrganizeImportsAction), n.registerEditorAction(i.AutoFixAction), n.registerEditorAction(i.FixAllAction), n.registerEditorCommand(new i.CodeActionCommand)
  49168. })), define(n[580], i([0, 1, 459, 15, 36, 2, 12, 213, 3, 22, 23, 48, 30, 17, 232, 20, 14, 18]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _) {
  49169. "use strict";
  49170. Object.defineProperty(t, "__esModule", {value: !0});
  49171. var y = function (e) {
  49172. function t() {
  49173. return e.call(this, {
  49174. id: "editor.action.insertCursorAbove",
  49175. label: n.localize(0, null),
  49176. alias: "Add Cursor Above",
  49177. precondition: void 0,
  49178. kbOpts: {
  49179. kbExpr: c.EditorContextKeys.editorTextFocus,
  49180. primary: 2576,
  49181. linux: {primary: 1552, secondary: [3088]},
  49182. weight: 100
  49183. },
  49184. menuOpts: {menuId: 25, group: "3_multi", title: n.localize(1, null), order: 2}
  49185. }) || this
  49186. }
  49187. return r(t, e), t.prototype.run = function (e, t, n) {
  49188. if (t.hasModel()) {
  49189. var i = n && !0 === n.logicalLine, o = t._getCursors(), r = o.context;
  49190. r.config.readOnly || (r.model.pushStackElement(), o.setStates(n.source, 3, l.CursorMoveCommands.addCursorUp(r, o.getAll(), i)), o.reveal(n.source, !0, 1, 0))
  49191. }
  49192. }, t
  49193. }(a.EditorAction);
  49194. t.InsertCursorAbove = y;
  49195. var C = function (e) {
  49196. function t() {
  49197. return e.call(this, {
  49198. id: "editor.action.insertCursorBelow",
  49199. label: n.localize(2, null),
  49200. alias: "Add Cursor Below",
  49201. precondition: void 0,
  49202. kbOpts: {
  49203. kbExpr: c.EditorContextKeys.editorTextFocus,
  49204. primary: 2578,
  49205. linux: {primary: 1554, secondary: [3090]},
  49206. weight: 100
  49207. },
  49208. menuOpts: {menuId: 25, group: "3_multi", title: n.localize(3, null), order: 3}
  49209. }) || this
  49210. }
  49211. return r(t, e), t.prototype.run = function (e, t, n) {
  49212. if (t.hasModel()) {
  49213. var i = n && !0 === n.logicalLine, o = t._getCursors(), r = o.context;
  49214. r.config.readOnly || (r.model.pushStackElement(), o.setStates(n.source, 3, l.CursorMoveCommands.addCursorDown(r, o.getAll(), i)), o.reveal(n.source, !0, 2, 0))
  49215. }
  49216. }, t
  49217. }(a.EditorAction);
  49218. t.InsertCursorBelow = C;
  49219. var b = function (e) {
  49220. function t() {
  49221. return e.call(this, {
  49222. id: "editor.action.insertCursorAtEndOfEachLineSelected",
  49223. label: n.localize(4, null),
  49224. alias: "Add Cursors to Line Ends",
  49225. precondition: void 0,
  49226. kbOpts: {kbExpr: c.EditorContextKeys.editorTextFocus, primary: 1575, weight: 100},
  49227. menuOpts: {menuId: 25, group: "3_multi", title: n.localize(5, null), order: 4}
  49228. }) || this
  49229. }
  49230. return r(t, e), t.prototype.getCursorsForSelection = function (e, t, n) {
  49231. if (!e.isEmpty()) {
  49232. for (var i = e.startLineNumber; i < e.endLineNumber; i++) {
  49233. var o = t.getLineMaxColumn(i);
  49234. n.push(new d.Selection(i, o, i, o))
  49235. }
  49236. e.endColumn > 1 && n.push(new d.Selection(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn))
  49237. }
  49238. }, t.prototype.run = function (e, t) {
  49239. var n = this;
  49240. if (t.hasModel()) {
  49241. var i = t.getModel(), o = t.getSelections(), r = [];
  49242. o.forEach((function (e) {
  49243. return n.getCursorsForSelection(e, i, r)
  49244. })), r.length > 0 && t.setSelections(r)
  49245. }
  49246. }, t
  49247. }(a.EditorAction), S = function (e) {
  49248. function t() {
  49249. return e.call(this, {
  49250. id: "editor.action.addCursorsToBottom",
  49251. label: n.localize(6, null),
  49252. alias: "Add Cursors To Bottom",
  49253. precondition: void 0
  49254. }) || this
  49255. }
  49256. return r(t, e), t.prototype.run = function (e, t) {
  49257. if (t.hasModel()) {
  49258. for (var n = t.getSelections(), i = t.getModel().getLineCount(), o = [], r = n[0].startLineNumber; r <= i; r++) o.push(new d.Selection(r, n[0].startColumn, r, n[0].endColumn));
  49259. o.length > 0 && t.setSelections(o)
  49260. }
  49261. }, t
  49262. }(a.EditorAction), w = function (e) {
  49263. function t() {
  49264. return e.call(this, {
  49265. id: "editor.action.addCursorsToTop",
  49266. label: n.localize(7, null),
  49267. alias: "Add Cursors To Top",
  49268. precondition: void 0
  49269. }) || this
  49270. }
  49271. return r(t, e), t.prototype.run = function (e, t) {
  49272. if (t.hasModel()) {
  49273. for (var n = t.getSelections(), i = [], o = n[0].startLineNumber; o >= 1; o--) i.push(new d.Selection(o, n[0].startColumn, o, n[0].endColumn));
  49274. i.length > 0 && t.setSelections(i)
  49275. }
  49276. }, t
  49277. }(a.EditorAction), E = function (e, t, n) {
  49278. this.selections = e, this.revealRange = t, this.revealScrollType = n
  49279. };
  49280. t.MultiCursorSessionResult = E;
  49281. var L = function () {
  49282. function e(e, t, n, i, o, r, s) {
  49283. this._editor = e, this.findController = t, this.isDisconnectedFromFindController = n, this.searchText = i, this.wholeWord = o, this.matchCase = r, this.currentMatch = s
  49284. }
  49285. return e.create = function (t, n) {
  49286. if (!t.hasModel()) return null;
  49287. var i = n.getState()
  49288. ;
  49289. if (!t.hasTextFocus() && i.isRevealed && i.searchString.length > 0) return new e(t, n, !1, i.searchString, i.wholeWord, i.matchCase, null);
  49290. var o, r, s = !1, a = t.getSelections();
  49291. 1 === a.length && a[0].isEmpty() ? (s = !0, o = !0, r = !0) : (o = i.wholeWord, r = i.matchCase);
  49292. var l, u = t.getSelection(), c = null;
  49293. if (u.isEmpty()) {
  49294. var h = t.getModel().getWordAtPosition(u.getStartPosition());
  49295. if (!h) return null;
  49296. l = h.word, c = new d.Selection(u.startLineNumber, h.startColumn, u.startLineNumber, h.endColumn)
  49297. } else l = t.getModel().getValueInRange(u).replace(/\r\n/g, "\n");
  49298. return new e(t, n, s, l, o, r, c)
  49299. }, e.prototype.addSelectionToNextFindMatch = function () {
  49300. if (!this._editor.hasModel()) return null;
  49301. var e = this._getNextMatch();
  49302. if (!e) return null;
  49303. var t = this._editor.getSelections();
  49304. return new E(t.concat(e), e, 0)
  49305. }, e.prototype.moveSelectionToNextFindMatch = function () {
  49306. if (!this._editor.hasModel()) return null;
  49307. var e = this._getNextMatch();
  49308. if (!e) return null;
  49309. var t = this._editor.getSelections();
  49310. return new E(t.slice(0, t.length - 1).concat(e), e, 0)
  49311. }, e.prototype._getNextMatch = function () {
  49312. if (!this._editor.hasModel()) return null;
  49313. if (this.currentMatch) {
  49314. var e = this.currentMatch;
  49315. return this.currentMatch = null, e
  49316. }
  49317. this.findController.highlightFindOptions();
  49318. var t = this._editor.getSelections(), n = t[t.length - 1],
  49319. i = this._editor.getModel().findNextMatch(this.searchText, n.getEndPosition(), !1, this.matchCase, this.wholeWord ? this._editor.getOption(96) : null, !1);
  49320. return i ? new d.Selection(i.range.startLineNumber, i.range.startColumn, i.range.endLineNumber, i.range.endColumn) : null
  49321. }, e.prototype.addSelectionToPreviousFindMatch = function () {
  49322. if (!this._editor.hasModel()) return null;
  49323. var e = this._getPreviousMatch();
  49324. if (!e) return null;
  49325. var t = this._editor.getSelections();
  49326. return new E(t.concat(e), e, 0)
  49327. }, e.prototype.moveSelectionToPreviousFindMatch = function () {
  49328. if (!this._editor.hasModel()) return null;
  49329. var e = this._getPreviousMatch();
  49330. if (!e) return null;
  49331. var t = this._editor.getSelections();
  49332. return new E(t.slice(0, t.length - 1).concat(e), e, 0)
  49333. }, e.prototype._getPreviousMatch = function () {
  49334. if (!this._editor.hasModel()) return null;
  49335. if (this.currentMatch) {
  49336. var e = this.currentMatch;
  49337. return this.currentMatch = null, e
  49338. }
  49339. this.findController.highlightFindOptions();
  49340. var t = this._editor.getSelections(), n = t[t.length - 1],
  49341. i = this._editor.getModel().findPreviousMatch(this.searchText, n.getStartPosition(), !1, this.matchCase, this.wholeWord ? this._editor.getOption(96) : null, !1);
  49342. return i ? new d.Selection(i.range.startLineNumber, i.range.startColumn, i.range.endLineNumber, i.range.endColumn) : null
  49343. }, e.prototype.selectAll = function () {
  49344. return this._editor.hasModel() ? (this.findController.highlightFindOptions(), this._editor.getModel().findMatches(this.searchText, !0, !1, this.matchCase, this.wholeWord ? this._editor.getOption(96) : null, !1, 1073741824)) : []
  49345. }, e
  49346. }();
  49347. t.MultiCursorSession = L;
  49348. var D = function (e) {
  49349. function t(t) {
  49350. var n = e.call(this) || this;
  49351. return n._sessionDispose = n._register(new s.DisposableStore), n._editor = t, n._ignoreSelectionChange = !1, n._session = null, n
  49352. }
  49353. return r(t, e), t.get = function (e) {
  49354. return e.getContribution(t.ID)
  49355. }, t.prototype.dispose = function () {
  49356. this._endSession(), e.prototype.dispose.call(this)
  49357. },
  49358. t.prototype._beginSessionIfNeeded = function (e) {
  49359. var t = this;
  49360. if (!this._session) {
  49361. var n = L.create(this._editor, e);
  49362. if (!n) return;
  49363. this._session = n;
  49364. var i = {searchString: this._session.searchText};
  49365. this._session.isDisconnectedFromFindController && (i.wholeWordOverride = 1, i.matchCaseOverride = 1, i.isRegexOverride = 2), e.getState().change(i, !1), this._sessionDispose.add(this._editor.onDidChangeCursorSelection((function (e) {
  49366. t._ignoreSelectionChange || t._endSession()
  49367. }))), this._sessionDispose.add(this._editor.onDidBlurEditorText((function () {
  49368. t._endSession()
  49369. }))), this._sessionDispose.add(e.getState().onFindReplaceStateChange((function (e) {
  49370. (e.matchCase || e.wholeWord) && t._endSession()
  49371. })))
  49372. }
  49373. }, t.prototype._endSession = function () {
  49374. if (this._sessionDispose.clear(), this._session && this._session.isDisconnectedFromFindController) {
  49375. this._session.findController.getState().change({
  49376. wholeWordOverride: 0,
  49377. matchCaseOverride: 0,
  49378. isRegexOverride: 0
  49379. }, !1)
  49380. }
  49381. this._session = null
  49382. }, t.prototype._setSelections = function (e) {
  49383. this._ignoreSelectionChange = !0, this._editor.setSelections(e),
  49384. this._ignoreSelectionChange = !1
  49385. }, t.prototype._expandEmptyToWord = function (e, t) {
  49386. if (!t.isEmpty()) return t;
  49387. var n = e.getWordAtPosition(t.getStartPosition());
  49388. return n ? new d.Selection(t.startLineNumber, n.startColumn, t.startLineNumber, n.endColumn) : t
  49389. }, t.prototype._applySessionResult = function (e) {
  49390. e && (this._setSelections(e.selections), e.revealRange && this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange, e.revealScrollType))
  49391. }, t.prototype.getSession = function (e) {
  49392. return this._session
  49393. }, t.prototype.addSelectionToNextFindMatch = function (e) {
  49394. if (this._editor.hasModel()) {
  49395. if (!this._session) {
  49396. var t = this._editor.getSelections();
  49397. if (t.length > 1) {
  49398. var n = e.getState().matchCase;
  49399. if (!A(this._editor.getModel(), t, n)) {
  49400. for (var i = this._editor.getModel(), o = [], r = 0, s = t.length; r < s; r++) o[r] = this._expandEmptyToWord(i, t[r]);
  49401. return void this._editor.setSelections(o)
  49402. }
  49403. }
  49404. }
  49405. this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.addSelectionToNextFindMatch())
  49406. }
  49407. }, t.prototype.addSelectionToPreviousFindMatch = function (e) {
  49408. this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.addSelectionToPreviousFindMatch())
  49409. }, t.prototype.moveSelectionToNextFindMatch = function (e) {
  49410. this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.moveSelectionToNextFindMatch())
  49411. }, t.prototype.moveSelectionToPreviousFindMatch = function (e) {
  49412. this._beginSessionIfNeeded(e), this._session && this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())
  49413. }, t.prototype.selectAll = function (e) {
  49414. if (this._editor.hasModel()) {
  49415. var t = null, n = e.getState();
  49416. if (n.isRevealed && n.searchString.length > 0 && n.isRegex) t = this._editor.getModel().findMatches(n.searchString, !0, n.isRegex, n.matchCase, n.wholeWord ? this._editor.getOption(96) : null, !1, 1073741824); else {
  49417. if (this._beginSessionIfNeeded(e), !this._session) return;
  49418. t = this._session.selectAll()
  49419. }
  49420. if (n.searchScope) {
  49421. for (var i = n.searchScope, o = [], r = 0; r < t.length; r++) t[r].range.endLineNumber <= i.endLineNumber && t[r].range.startLineNumber >= i.startLineNumber && o.push(t[r]);
  49422. t = o
  49423. }
  49424. if (t.length > 0) {
  49425. for (var s = this._editor.getSelection(), a = (r = 0, t.length); r < a; r++) {
  49426. var l = t[r];
  49427. if (l.range.intersectRanges(s)) {
  49428. t[r] = t[0], t[0] = l;
  49429. break
  49430. }
  49431. }
  49432. this._setSelections(t.map((function (e) {
  49433. return new d.Selection(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn)
  49434. })))
  49435. }
  49436. }
  49437. }, t.ID = "editor.contrib.multiCursorController", t
  49438. }(s.Disposable);
  49439. t.MultiCursorSelectionController = D;
  49440. var N = function (e) {
  49441. function t() {
  49442. return null !== e && e.apply(this, arguments) || this
  49443. }
  49444. return r(t, e), t.prototype.run = function (e, t) {
  49445. var n = D.get(t);
  49446. if (n) {
  49447. var i = f.CommonFindController.get(t);
  49448. i && this._run(n, i)
  49449. }
  49450. }, t
  49451. }(a.EditorAction);
  49452. t.MultiCursorSelectionControllerAction = N;
  49453. var x = function (e) {
  49454. function t() {
  49455. return e.call(this, {
  49456. id: "editor.action.addSelectionToNextFindMatch",
  49457. label: n.localize(8, null),
  49458. alias: "Add Selection To Next Find Match",
  49459. precondition: void 0,
  49460. kbOpts: {kbExpr: c.EditorContextKeys.focus, primary: 2082, weight: 100},
  49461. menuOpts: {menuId: 25, group: "3_multi", title: n.localize(9, null), order: 5}
  49462. }) || this
  49463. }
  49464. return r(t, e), t.prototype._run = function (e, t) {
  49465. e.addSelectionToNextFindMatch(t)
  49466. }, t
  49467. }(N);
  49468. t.AddSelectionToNextFindMatchAction = x;
  49469. var I = function (e) {
  49470. function t() {
  49471. return e.call(this, {
  49472. id: "editor.action.addSelectionToPreviousFindMatch",
  49473. label: n.localize(10, null),
  49474. alias: "Add Selection To Previous Find Match",
  49475. precondition: void 0,
  49476. menuOpts: {menuId: 25, group: "3_multi", title: n.localize(11, null), order: 6}
  49477. }) || this
  49478. }
  49479. return r(t, e), t.prototype._run = function (e, t) {
  49480. e.addSelectionToPreviousFindMatch(t)
  49481. }, t
  49482. }(N);
  49483. t.AddSelectionToPreviousFindMatchAction = I;
  49484. var M = function (e) {
  49485. function t() {
  49486. return e.call(this, {
  49487. id: "editor.action.moveSelectionToNextFindMatch",
  49488. label: n.localize(12, null),
  49489. alias: "Move Last Selection To Next Find Match",
  49490. precondition: void 0,
  49491. kbOpts: {kbExpr: c.EditorContextKeys.focus, primary: o.KeyChord(2089, 2082), weight: 100}
  49492. }) || this
  49493. }
  49494. return r(t, e), t.prototype._run = function (e, t) {
  49495. e.moveSelectionToNextFindMatch(t)
  49496. }, t
  49497. }(N);
  49498. t.MoveSelectionToNextFindMatchAction = M;
  49499. var k = function (e) {
  49500. function t() {
  49501. return e.call(this, {
  49502. id: "editor.action.moveSelectionToPreviousFindMatch", label: n.localize(13, null),
  49503. alias: "Move Last Selection To Previous Find Match", precondition: void 0
  49504. }) || this
  49505. }
  49506. return r(t, e), t.prototype._run = function (e, t) {
  49507. e.moveSelectionToPreviousFindMatch(t)
  49508. }, t
  49509. }(N);
  49510. t.MoveSelectionToPreviousFindMatchAction = k;
  49511. var T = function (e) {
  49512. function t() {
  49513. return e.call(this, {
  49514. id: "editor.action.selectHighlights",
  49515. label: n.localize(14, null),
  49516. alias: "Select All Occurrences of Find Match",
  49517. precondition: void 0,
  49518. kbOpts: {kbExpr: c.EditorContextKeys.focus, primary: 3114, weight: 100},
  49519. menuOpts: {menuId: 25, group: "3_multi", title: n.localize(15, null), order: 7}
  49520. }) || this
  49521. }
  49522. return r(t, e), t.prototype._run = function (e, t) {
  49523. e.selectAll(t)
  49524. }, t
  49525. }(N);
  49526. t.SelectHighlightsAction = T;
  49527. var R = function (e) {
  49528. function t() {
  49529. return e.call(this, {
  49530. id: "editor.action.changeAll",
  49531. label: n.localize(16, null),
  49532. alias: "Change All Occurrences",
  49533. precondition: _.ContextKeyExpr.and(c.EditorContextKeys.writable, c.EditorContextKeys.editorTextFocus),
  49534. kbOpts: {kbExpr: c.EditorContextKeys.editorTextFocus, primary: 2108, weight: 100},
  49535. contextMenuOpts: {group: "1_modification", order: 1.2}
  49536. }) || this
  49537. }
  49538. return r(t, e),
  49539. t.prototype._run = function (e, t) {
  49540. e.selectAll(t)
  49541. }, t
  49542. }(N);
  49543. t.CompatChangeAll = R;
  49544. var O = function () {
  49545. function e(e, t, n) {
  49546. this.searchText = e, this.matchCase = t, this.wordSeparators = n
  49547. }
  49548. return e.softEquals = function (e, t) {
  49549. return !e && !t || !(!e || !t) && (e.searchText === t.searchText && e.matchCase === t.matchCase && e.wordSeparators === t.wordSeparators)
  49550. }, e
  49551. }(), P = function (e) {
  49552. function t(t) {
  49553. var n = e.call(this) || this;
  49554. return n.editor = t, n._isEnabled = t.getOption(82), n.decorations = [], n.updateSoon = n._register(new i.RunOnceScheduler((function () {
  49555. return n._update()
  49556. }), 300)), n.state = null, n._register(t.onDidChangeConfiguration((function (e) {
  49557. n._isEnabled = t.getOption(82)
  49558. }))), n._register(t.onDidChangeCursorSelection((function (e) {
  49559. n._isEnabled && (e.selection.isEmpty() ? 3 === e.reason ? (n.state && n._setState(null), n.updateSoon.schedule()) : n._setState(null) : n._update())
  49560. }))), n._register(t.onDidChangeModel((function (e) {
  49561. n._setState(null)
  49562. }))), n._register(f.CommonFindController.get(t).getState().onFindReplaceStateChange((function (e) {
  49563. n._update()
  49564. }))), n
  49565. }
  49566. return r(t, e),
  49567. t.prototype._update = function () {
  49568. this._setState(t._createState(this._isEnabled, this.editor))
  49569. }, t._createState = function (e, t) {
  49570. if (!e) return null;
  49571. if (!t.hasModel()) return null;
  49572. var n = t.getSelection();
  49573. if (n.startLineNumber !== n.endLineNumber) return null;
  49574. var i = D.get(t);
  49575. if (!i) return null;
  49576. var o = f.CommonFindController.get(t);
  49577. if (!o) return null;
  49578. var r = i.getSession(o);
  49579. if (!r) {
  49580. var s = t.getSelections();
  49581. if (s.length > 1) {
  49582. var a = o.getState().matchCase;
  49583. if (!A(t.getModel(), s, a)) return null
  49584. }
  49585. r = L.create(t, o)
  49586. }
  49587. if (!r) return null;
  49588. if (r.currentMatch) return null;
  49589. if (/^[ \t]+$/.test(r.searchText)) return null;
  49590. if (r.searchText.length > 200) return null;
  49591. var l = o.getState(), u = l.matchCase;
  49592. if (l.isRevealed) {
  49593. var d = l.searchString;
  49594. u || (d = d.toLowerCase());
  49595. var c = r.searchText;
  49596. if (u || (c = c.toLowerCase()), d === c && r.matchCase === l.matchCase && r.wholeWord === l.wholeWord && !l.isRegex) return null
  49597. }
  49598. return new O(r.searchText, r.matchCase, r.wholeWord ? t.getOption(96) : null)
  49599. }, t.prototype._setState = function (e) {
  49600. if (O.softEquals(this.state, e)) this.state = e; else if (this.state = e, this.state) {
  49601. if (this.editor.hasModel()) {
  49602. var n = this.editor.getModel();
  49603. if (!n.isTooLargeForTokenization()) {
  49604. var i = g.DocumentHighlightProviderRegistry.has(n),
  49605. o = n.findMatches(this.state.searchText, !0, !1, this.state.matchCase, this.state.wordSeparators, !1).map((function (e) {
  49606. return e.range
  49607. }));
  49608. o.sort(u.Range.compareRangesUsingStarts);
  49609. var r = this.editor.getSelections();
  49610. r.sort(u.Range.compareRangesUsingStarts);
  49611. for (var s = [], a = 0, l = 0, d = o.length, c = r.length; a < d;) {
  49612. var h = o[a];
  49613. if (l >= c) s.push(h), a++; else {
  49614. var p = u.Range.compareRangesUsingStarts(h, r[l]);
  49615. p < 0 ? (!r[l].isEmpty() && u.Range.areIntersecting(h, r[l]) || s.push(h), a++) : p > 0 ? l++ : (a++, l++)
  49616. }
  49617. }
  49618. var f = s.map((function (e) {
  49619. return {range: e, options: i ? t._SELECTION_HIGHLIGHT : t._SELECTION_HIGHLIGHT_OVERVIEW}
  49620. }));
  49621. this.decorations = this.editor.deltaDecorations(this.decorations, f)
  49622. }
  49623. }
  49624. } else this.decorations = this.editor.deltaDecorations(this.decorations, [])
  49625. }, t.prototype.dispose = function () {
  49626. this._setState(null), e.prototype.dispose.call(this)
  49627. }, t.ID = "editor.contrib.selectionHighlighter",
  49628. t._SELECTION_HIGHLIGHT_OVERVIEW = p.ModelDecorationOptions.register({
  49629. stickiness: 1,
  49630. className: "selectionHighlight",
  49631. overviewRuler: {
  49632. color: v.themeColorFromId(m.overviewRulerSelectionHighlightForeground),
  49633. position: h.OverviewRulerLane.Center
  49634. }
  49635. }), t._SELECTION_HIGHLIGHT = p.ModelDecorationOptions.register({
  49636. stickiness: 1,
  49637. className: "selectionHighlight"
  49638. }), t
  49639. }(s.Disposable);
  49640. function A(e, t, n) {
  49641. for (var i = F(e, t[0], !n), o = 1, r = t.length; o < r; o++) {
  49642. var s = t[o];
  49643. if (s.isEmpty()) return !1;
  49644. if (i !== F(e, s, !n)) return !1
  49645. }
  49646. return !0
  49647. }
  49648. function F(e, t, n) {
  49649. var i = e.getValueInRange(t);
  49650. return n ? i.toLowerCase() : i
  49651. }
  49652. t.SelectionHighlighter = P, a.registerEditorContribution(D.ID, D), a.registerEditorContribution(P.ID, P), a.registerEditorAction(y), a.registerEditorAction(C), a.registerEditorAction(b), a.registerEditorAction(x), a.registerEditorAction(I), a.registerEditorAction(M), a.registerEditorAction(k), a.registerEditorAction(T), a.registerEditorAction(R), a.registerEditorAction(S), a.registerEditorAction(w)
  49653. })),
  49654. define(n[581], i([0, 1, 6, 52, 50, 53, 4, 2, 71, 117, 165, 461, 18, 51, 20, 14, 540, 5, 318]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C) {
  49655. "use strict";
  49656. Object.defineProperty(t, "__esModule", {value: !0});
  49657. var b = n.$, S = function (e) {
  49658. function t(t, n, i, o) {
  49659. var r = e.call(this) || this;
  49660. return r.editor = t, r.renderDisposeables = r._register(new l.DisposableStore), r.visible = !1, r.announcedLabel = null, r.allowEditorOverflow = !0, r.markdownRenderer = r._register(new d.MarkdownRenderer(t, o, i)), r.model = r._register(new y.ParameterHintsModel(t)), r.keyVisible = c.Context.Visible.bindTo(n), r.keyMultipleSignatures = c.Context.MultipleSignatures.bindTo(n), r._register(r.model.onChangedHints((function (e) {
  49661. e ? (r.show(), r.render(e)) : r.hide()
  49662. }))), r
  49663. }
  49664. return r(t, e), t.prototype.createParamaterHintDOMNodes = function () {
  49665. var e = this, t = b(".editor-widget.parameter-hints-widget"), o = n.append(t, b(".wrapper"));
  49666. o.tabIndex = -1
  49667. ;var r = n.append(o, b(".controls")), l = n.append(r, b(".button.codicon.codicon-chevron-up")),
  49668. u = n.append(r, b(".overloads")), d = n.append(r, b(".button.codicon.codicon-chevron-down")),
  49669. c = i.stop(i.domEvent(l, "click"));
  49670. this._register(c(this.previous, this));
  49671. var h = i.stop(i.domEvent(d, "click"));
  49672. this._register(h(this.next, this));
  49673. var p = b(".body"), g = new s.DomScrollableElement(p, {});
  49674. this._register(g), o.appendChild(g.getDomNode());
  49675. var f = n.append(p, b(".signature")), m = n.append(p, b(".docs"));
  49676. t.style.userSelect = "text", this.domNodes = {
  49677. element: t,
  49678. signature: f,
  49679. overloads: u,
  49680. docs: m,
  49681. scrollbar: g
  49682. }, this.editor.addContentWidget(this), this.hide(), this._register(this.editor.onDidChangeCursorSelection((function (t) {
  49683. e.visible && e.editor.layoutContentWidget(e)
  49684. })));
  49685. var v = function () {
  49686. if (e.domNodes) {
  49687. var t = e.editor.getOption(34);
  49688. e.domNodes.element.style.fontSize = t.fontSize + "px"
  49689. }
  49690. };
  49691. v(), this._register(a.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function (e) {
  49692. return e.hasChanged(34)
  49693. })).on(v, null)),
  49694. this._register(this.editor.onDidLayoutChange((function (t) {
  49695. return e.updateMaxHeight()
  49696. }))), this.updateMaxHeight()
  49697. }, t.prototype.show = function () {
  49698. var e = this;
  49699. this.visible || (this.domNodes || this.createParamaterHintDOMNodes(), this.keyVisible.set(!0), this.visible = !0, setTimeout((function () {
  49700. e.domNodes && n.addClass(e.domNodes.element, "visible")
  49701. }), 100), this.editor.layoutContentWidget(this))
  49702. }, t.prototype.hide = function () {
  49703. this.visible && (this.keyVisible.reset(), this.visible = !1, this.announcedLabel = null, this.domNodes && n.removeClass(this.domNodes.element, "visible"), this.editor.layoutContentWidget(this))
  49704. }, t.prototype.getPosition = function () {
  49705. return this.visible ? {position: this.editor.getPosition(), preference: [1, 2]} : null
  49706. }, t.prototype.render = function (e) {
  49707. if (this.domNodes) {
  49708. var t = e.signatures.length > 1;
  49709. n.toggleClass(this.domNodes.element, "multiple", t), this.keyMultipleSignatures.set(t), this.domNodes.signature.innerHTML = "", this.domNodes.docs.innerHTML = "";
  49710. var i = e.signatures[e.activeSignature];
  49711. if (i) {
  49712. var r = n.append(this.domNodes.signature, b(".code")), s = i.parameters.length > 0,
  49713. a = this.editor.getOption(34);
  49714. if (r.style.fontSize = a.fontSize + "px", r.style.fontFamily = a.fontFamily, s) this.renderParameters(r, i, e.activeParameter); else n.append(r, b("span")).textContent = i.label;
  49715. this.renderDisposeables.clear();
  49716. var l = i.parameters[e.activeParameter];
  49717. if (l && l.documentation) {
  49718. var u = b("span.documentation");
  49719. if ("string" == typeof l.documentation) u.textContent = l.documentation; else {
  49720. var d = this.markdownRenderer.render(l.documentation);
  49721. n.addClass(d.element, "markdown-docs"), this.renderDisposeables.add(d), u.appendChild(d.element)
  49722. }
  49723. n.append(this.domNodes.docs, b("p", {}, u))
  49724. }
  49725. if (void 0 === i.documentation) ; else if ("string" == typeof i.documentation) n.append(this.domNodes.docs, b("p", {}, i.documentation)); else {
  49726. d = this.markdownRenderer.render(i.documentation);
  49727. n.addClass(d.element, "markdown-docs"), this.renderDisposeables.add(d), n.append(this.domNodes.docs, d.element)
  49728. }
  49729. var c = this.hasDocs(i, l);
  49730. if (n.toggleClass(this.domNodes.signature, "has-docs", c),
  49731. n.toggleClass(this.domNodes.docs, "empty", !c), this.domNodes.overloads.textContent = C.pad(e.activeSignature + 1, e.signatures.length.toString().length) + "/" + e.signatures.length, l) {
  49732. var h = this.getParameterLabel(i, e.activeParameter);
  49733. this.announcedLabel !== h && (o.alert(p.localize(0, null, h)), this.announcedLabel = h)
  49734. }
  49735. this.editor.layoutContentWidget(this), this.domNodes.scrollbar.scanDomNode()
  49736. }
  49737. }
  49738. }, t.prototype.hasDocs = function (e, t) {
  49739. return !!(t && "string" == typeof t.documentation && t.documentation.length > 0) || (!!(t && "object" == typeof t.documentation && t.documentation.value.length > 0) || ("string" == typeof e.documentation && e.documentation.length > 0 || "object" == typeof e.documentation && e.documentation.value.length > 0))
  49740. }, t.prototype.renderParameters = function (e, t, i) {
  49741. var o = this.getParameterLabelOffsets(t, i), r = o[0], s = o[1], a = document.createElement("span");
  49742. a.textContent = t.label.substring(0, r);
  49743. var l = document.createElement("span");
  49744. l.textContent = t.label.substring(r, s), l.className = "parameter active";
  49745. var u = document.createElement("span")
  49746. ;u.textContent = t.label.substring(s), n.append(e, a, l, u)
  49747. }, t.prototype.getParameterLabel = function (e, t) {
  49748. var n = e.parameters[t];
  49749. return "string" == typeof n.label ? n.label : e.label.substring(n.label[0], n.label[1])
  49750. }, t.prototype.getParameterLabelOffsets = function (e, t) {
  49751. var n = e.parameters[t];
  49752. if (n) {
  49753. if (Array.isArray(n.label)) return n.label;
  49754. var i = e.label.lastIndexOf(n.label);
  49755. return i >= 0 ? [i, i + n.label.length] : [0, 0]
  49756. }
  49757. return [0, 0]
  49758. }, t.prototype.next = function () {
  49759. this.editor.focus(), this.model.next()
  49760. }, t.prototype.previous = function () {
  49761. this.editor.focus(), this.model.previous()
  49762. }, t.prototype.cancel = function () {
  49763. this.model.cancel()
  49764. }, t.prototype.getDomNode = function () {
  49765. return this.domNodes || this.createParamaterHintDOMNodes(), this.domNodes.element
  49766. }, t.prototype.getId = function () {
  49767. return t.ID
  49768. }, t.prototype.trigger = function (e) {
  49769. this.model.trigger(e, 0)
  49770. }, t.prototype.updateMaxHeight = function () {
  49771. if (this.domNodes) {
  49772. var e = Math.max(this.editor.getLayoutInfo().height / 4, 250) + "px";
  49773. this.domNodes.element.style.maxHeight = e
  49774. ;var t = this.domNodes.element.getElementsByClassName("wrapper");
  49775. t.length && (t[0].style.maxHeight = e)
  49776. }
  49777. }, t.ID = "editor.widget.parameterHintsWidget", t = h([g(1, f.IContextKeyService), g(2, m.IOpenerService), g(3, u.IModeService)], t)
  49778. }(l.Disposable);
  49779. t.ParameterHintsWidget = S, _.registerThemingParticipant((function (e, t) {
  49780. var n = e.getColor(v.editorHoverBorder);
  49781. if (n) {
  49782. var i = e.type === _.HIGH_CONTRAST ? 2 : 1;
  49783. t.addRule(".monaco-editor .parameter-hints-widget { border: " + i + "px solid " + n + "; }"), t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid " + n.transparent(.5) + "; }"), t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid " + n.transparent(.5) + "; }")
  49784. }
  49785. var o = e.getColor(v.editorHoverBackground);
  49786. o && t.addRule(".monaco-editor .parameter-hints-widget { background-color: " + o + "; }");
  49787. var r = e.getColor(v.textLinkForeground);
  49788. r && t.addRule(".monaco-editor .parameter-hints-widget a { color: " + r + "; }");
  49789. var s = e.getColor(v.editorHoverForeground)
  49790. ;s && t.addRule(".monaco-editor .parameter-hints-widget { color: " + s + "; }");
  49791. var a = e.getColor(v.textCodeBlockBackground);
  49792. a && t.addRule(".monaco-editor .parameter-hints-widget code { background-color: " + a + "; }")
  49793. }))
  49794. })), define(n[582], i([0, 1, 460, 2, 11, 23, 18, 12, 581, 165, 17]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  49795. "use strict";
  49796. Object.defineProperty(t, "__esModule", {value: !0});
  49797. var p = function (e) {
  49798. function t(t, n) {
  49799. var i = e.call(this) || this;
  49800. return i.editor = t, i.widget = i._register(n.createInstance(u.ParameterHintsWidget, i.editor)), i
  49801. }
  49802. return r(t, e), t.get = function (e) {
  49803. return e.getContribution(t.ID)
  49804. }, t.prototype.cancel = function () {
  49805. this.widget.cancel()
  49806. }, t.prototype.previous = function () {
  49807. this.widget.previous()
  49808. }, t.prototype.next = function () {
  49809. this.widget.next()
  49810. }, t.prototype.trigger = function (e) {
  49811. this.widget.trigger(e)
  49812. }, t.ID = "editor.controller.parameterHints", t = h([g(1, o.IInstantiationService)], t)
  49813. }(i.Disposable), f = function (e) {
  49814. function t() {
  49815. return e.call(this, {
  49816. id: "editor.action.triggerParameterHints",
  49817. label: n.localize(0, null),
  49818. alias: "Trigger Parameter Hints",
  49819. precondition: s.EditorContextKeys.hasSignatureHelpProvider,
  49820. kbOpts: {kbExpr: s.EditorContextKeys.editorTextFocus, primary: 3082, weight: 100}
  49821. }) || this
  49822. }
  49823. return r(t, e), t.prototype.run = function (e, t) {
  49824. var n = p.get(t);
  49825. n && n.trigger({triggerKind: c.SignatureHelpTriggerKind.Invoke})
  49826. }, t
  49827. }(l.EditorAction);
  49828. t.TriggerParameterHintsAction = f, l.registerEditorContribution(p.ID, p), l.registerEditorAction(f);
  49829. var m = l.EditorCommand.bindToContribution(p.get);
  49830. l.registerEditorCommand(new m({
  49831. id: "closeParameterHints",
  49832. precondition: d.Context.Visible,
  49833. handler: function (e) {
  49834. return e.cancel()
  49835. },
  49836. kbOpts: {weight: 175, kbExpr: s.EditorContextKeys.focus, primary: 9, secondary: [1033]}
  49837. })), l.registerEditorCommand(new m({
  49838. id: "showPrevParameterHint",
  49839. precondition: a.ContextKeyExpr.and(d.Context.Visible, d.Context.MultipleSignatures),
  49840. handler: function (e) {
  49841. return e.previous()
  49842. },
  49843. kbOpts: {
  49844. weight: 175,
  49845. kbExpr: s.EditorContextKeys.focus,
  49846. primary: 16,
  49847. secondary: [528],
  49848. mac: {primary: 16, secondary: [528, 302]}
  49849. }
  49850. })), l.registerEditorCommand(new m({
  49851. id: "showNextParameterHint",
  49852. precondition: a.ContextKeyExpr.and(d.Context.Visible, d.Context.MultipleSignatures),
  49853. handler: function (e) {
  49854. return e.next()
  49855. },
  49856. kbOpts: {
  49857. weight: 175,
  49858. kbExpr: s.EditorContextKeys.focus,
  49859. primary: 18,
  49860. secondary: [530],
  49861. mac: {primary: 18, secondary: [530, 300]}
  49862. }
  49863. }))
  49864. })), define(n[123], i([0, 1, 6, 70, 55, 27, 4, 31, 5, 32, 167, 493, 462, 18, 11, 83, 12, 20, 319]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C) {
  49865. "use strict";
  49866. var b;
  49867. Object.defineProperty(t, "__esModule", {value: !0}), t.IPeekViewService = v.createDecorator("IPeekViewService"), _.registerSingleton(t.IPeekViewService, function () {
  49868. function e() {
  49869. this._widgets = new Map
  49870. }
  49871. return e.prototype.addExclusiveWidget = function (e, t) {
  49872. var n = this, i = this._widgets.get(e);
  49873. i && (i.listener.dispose(), i.widget.dispose());
  49874. this._widgets.set(e, {
  49875. widget: t, listener: t.onDidClose((function () {
  49876. var i = n._widgets.get(e);
  49877. i && i.widget === t && (i.listener.dispose(), n._widgets.delete(e))
  49878. }))
  49879. })
  49880. }, e
  49881. }()), function (e) {
  49882. e.inPeekEditor = new m.RawContextKey("inReferenceSearchEditor", !0), e.notInPeekEditor = e.inPeekEditor.toNegated()
  49883. }(b = t.PeekContext || (t.PeekContext = {}));
  49884. var S = function () {
  49885. function e(e, t) {
  49886. e instanceof c.EmbeddedCodeEditorWidget && b.inPeekEditor.bindTo(t)
  49887. }
  49888. return e.prototype.dispose = function () {
  49889. }, e.ID = "editor.contrib.referenceController", e = h([g(1, m.IContextKeyService)], e)
  49890. }();
  49891. y.registerEditorContribution(S.ID, S), t.getOuterEditor = function (e) {
  49892. var t = e.get(d.ICodeEditorService).getFocusedCodeEditor();
  49893. return t instanceof c.EmbeddedCodeEditorWidget ? t.getParentEditor() : t
  49894. };
  49895. var w = {
  49896. headerBackgroundColor: s.Color.white,
  49897. primaryHeadingColor: s.Color.fromHex("#333333"),
  49898. secondaryHeadingColor: s.Color.fromHex("#6c6c6cb3")
  49899. }, E = function (e) {
  49900. function t(t, n) {
  49901. void 0 === n && (n = {});
  49902. var i = e.call(this, t, n) || this;
  49903. return i._onDidClose = new a.Emitter, i.onDidClose = i._onDidClose.event, l.mixin(i.options, w, !1), i
  49904. }
  49905. return r(t, e), t.prototype.dispose = function () {
  49906. e.prototype.dispose.call(this), this._onDidClose.fire(this)
  49907. }, t.prototype.style = function (t) {
  49908. var n = this.options;
  49909. t.headerBackgroundColor && (n.headerBackgroundColor = t.headerBackgroundColor),
  49910. t.primaryHeadingColor && (n.primaryHeadingColor = t.primaryHeadingColor), t.secondaryHeadingColor && (n.secondaryHeadingColor = t.secondaryHeadingColor), e.prototype.style.call(this, t)
  49911. }, t.prototype._applyStyles = function () {
  49912. e.prototype._applyStyles.call(this);
  49913. var t = this.options;
  49914. this._headElement && t.headerBackgroundColor && (this._headElement.style.backgroundColor = t.headerBackgroundColor.toString()), this._primaryHeading && t.primaryHeadingColor && (this._primaryHeading.style.color = t.primaryHeadingColor.toString()), this._secondaryHeading && t.secondaryHeadingColor && (this._secondaryHeading.style.color = t.secondaryHeadingColor.toString()), this._bodyElement && t.frameColor && (this._bodyElement.style.borderColor = t.frameColor.toString())
  49915. }, t.prototype._fillContainer = function (e) {
  49916. this.setCssClass("peekview-widget"), this._headElement = n.$(".head"), this._bodyElement = n.$(".body"), this._fillHead(this._headElement), this._fillBody(this._bodyElement), e.appendChild(this._headElement), e.appendChild(this._bodyElement)
  49917. }, t.prototype._fillHead = function (e) {
  49918. var t = this, r = n.$(".peekview-title");
  49919. n.append(this._headElement, r), n.addStandardDisposableListener(r, "click", (function (e) {
  49920. return t._onTitleClick(e)
  49921. })), this._fillTitleIcon(r), this._primaryHeading = n.$("span.filename"), this._secondaryHeading = n.$("span.dirname"), this._metaHeading = n.$("span.meta"), n.append(r, this._primaryHeading, this._secondaryHeading, this._metaHeading);
  49922. var s = n.$(".peekview-actions");
  49923. n.append(this._headElement, s);
  49924. var a = this._getActionBarOptions();
  49925. this._actionbarWidget = new i.ActionBar(s, a), this._disposables.add(this._actionbarWidget), this._actionbarWidget.push(new o.Action("peekview.close", f.localize(0, null), "codicon-close", !0, (function () {
  49926. return t.dispose(), Promise.resolve()
  49927. })), {label: !1, icon: !0})
  49928. }, t.prototype._fillTitleIcon = function (e) {
  49929. }, t.prototype._getActionBarOptions = function () {
  49930. return {}
  49931. }, t.prototype._onTitleClick = function (e) {
  49932. }, t.prototype.setTitle = function (e, t) {
  49933. this._primaryHeading && this._secondaryHeading && (this._primaryHeading.innerHTML = u.escape(e),
  49934. this._primaryHeading.setAttribute("aria-label", e), t ? this._secondaryHeading.innerHTML = u.escape(t) : n.clearNode(this._secondaryHeading))
  49935. }, t.prototype.setMetaTitle = function (e) {
  49936. this._metaHeading && (e ? (this._metaHeading.innerHTML = u.escape(e), n.show(this._metaHeading)) : n.hide(this._metaHeading))
  49937. }, t.prototype._doLayout = function (e, t) {
  49938. if (!this._isShowing && e < 0) this.dispose(); else {
  49939. var n = Math.ceil(1.2 * this.editor.getOption(49)), i = Math.round(e - (n + 2));
  49940. this._doLayoutHead(n, t), this._doLayoutBody(i, t)
  49941. }
  49942. }, t.prototype._doLayoutHead = function (e, t) {
  49943. this._headElement && (this._headElement.style.height = e + "px", this._headElement.style.lineHeight = this._headElement.style.height)
  49944. }, t.prototype._doLayoutBody = function (e, t) {
  49945. this._bodyElement && (this._bodyElement.style.height = e + "px")
  49946. }, t
  49947. }(p.ZoneWidget);
  49948. t.PeekViewWidget = E, t.peekViewTitleBackground = C.registerColor("peekViewTitle.background", {
  49949. dark: "#1E1E1E",
  49950. light: "#FFFFFF",
  49951. hc: "#0C141F"
  49952. }, f.localize(1, null)), t.peekViewTitleForeground = C.registerColor("peekViewTitleLabel.foreground", {
  49953. dark: "#FFFFFF",
  49954. light: "#333333", hc: "#FFFFFF"
  49955. }, f.localize(2, null)), t.peekViewTitleInfoForeground = C.registerColor("peekViewTitleDescription.foreground", {
  49956. dark: "#ccccccb3",
  49957. light: "#616161e6",
  49958. hc: "#FFFFFF99"
  49959. }, f.localize(3, null)), t.peekViewBorder = C.registerColor("peekView.border", {
  49960. dark: "#007acc",
  49961. light: "#007acc",
  49962. hc: C.contrastBorder
  49963. }, f.localize(4, null)), t.peekViewResultsBackground = C.registerColor("peekViewResult.background", {
  49964. dark: "#252526",
  49965. light: "#F3F3F3",
  49966. hc: s.Color.black
  49967. }, f.localize(5, null)), t.peekViewResultsMatchForeground = C.registerColor("peekViewResult.lineForeground", {
  49968. dark: "#bbbbbb",
  49969. light: "#646465",
  49970. hc: s.Color.white
  49971. }, f.localize(6, null)), t.peekViewResultsFileForeground = C.registerColor("peekViewResult.fileForeground", {
  49972. dark: s.Color.white,
  49973. light: "#1E1E1E",
  49974. hc: s.Color.white
  49975. }, f.localize(7, null)), t.peekViewResultsSelectionBackground = C.registerColor("peekViewResult.selectionBackground", {
  49976. dark: "#3399ff33",
  49977. light: "#3399ff33",
  49978. hc: null
  49979. }, f.localize(8, null)), t.peekViewResultsSelectionForeground = C.registerColor("peekViewResult.selectionForeground", {
  49980. dark: s.Color.white, light: "#6C6C6C", hc: s.Color.white
  49981. }, f.localize(9, null)), t.peekViewEditorBackground = C.registerColor("peekViewEditor.background", {
  49982. dark: "#001F33",
  49983. light: "#F2F8FC",
  49984. hc: s.Color.black
  49985. }, f.localize(10, null)), t.peekViewEditorGutterBackground = C.registerColor("peekViewEditorGutter.background", {
  49986. dark: t.peekViewEditorBackground,
  49987. light: t.peekViewEditorBackground,
  49988. hc: t.peekViewEditorBackground
  49989. }, f.localize(11, null)), t.peekViewResultsMatchHighlight = C.registerColor("peekViewResult.matchHighlightBackground", {
  49990. dark: "#ea5c004d",
  49991. light: "#ea5c004d",
  49992. hc: null
  49993. }, f.localize(12, null)), t.peekViewEditorMatchHighlight = C.registerColor("peekViewEditor.matchHighlightBackground", {
  49994. dark: "#ff8f0099",
  49995. light: "#f5d802de",
  49996. hc: null
  49997. }, f.localize(13, null)), t.peekViewEditorMatchHighlightBorder = C.registerColor("peekViewEditor.matchHighlightBorder", {
  49998. dark: null,
  49999. light: null,
  50000. hc: C.activeContrastBorder
  50001. }, f.localize(14, null))
  50002. })), define(n[583], i([0, 1, 2, 13, 3, 464, 18, 20, 14, 34, 6, 320]), (function (e, t, n, i, o, r, s, a, l, u, d) {
  50003. "use strict"
  50004. ;Object.defineProperty(t, "__esModule", {value: !0}), t.CONTEXT_RENAME_INPUT_VISIBLE = new s.RawContextKey("renameInputVisible", !1);
  50005. var c = function () {
  50006. function e(e, i, o, r, s) {
  50007. var a = this;
  50008. this._editor = e, this._acceptKeybindings = i, this._themeService = o, this._keybindingService = r, this._disposables = new n.DisposableStore, this.allowEditorOverflow = !0, this._visibleContextKey = t.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(s), this._editor.addContentWidget(this), this._disposables.add(this._editor.onDidChangeConfiguration((function (e) {
  50009. e.hasChanged(34) && a._updateFont()
  50010. }))), this._disposables.add(o.onThemeChange(this._updateStyles, this))
  50011. }
  50012. return e.prototype.dispose = function () {
  50013. this._disposables.dispose(), this._editor.removeContentWidget(this)
  50014. }, e.prototype.getId = function () {
  50015. return "__renameInputWidget"
  50016. }, e.prototype.getDomNode = function () {
  50017. var e = this;
  50018. if (!this._domNode) {
  50019. this._domNode = document.createElement("div"), this._domNode.className = "monaco-editor rename-box", this._input = document.createElement("input"), this._input.className = "rename-input",
  50020. this._input.type = "text", this._input.setAttribute("aria-label", r.localize(0, null)), this._domNode.appendChild(this._input), this._label = document.createElement("div"), this._label.className = "rename-label", this._domNode.appendChild(this._label);
  50021. var t = function () {
  50022. var t, n, i = e._acceptKeybindings, o = i[0], s = i[1];
  50023. e._keybindingService.lookupKeybinding(o), e._label.innerText = r.localize(1, null, null === (t = e._keybindingService.lookupKeybinding(o)) || void 0 === t ? void 0 : t.getLabel(), null === (n = e._keybindingService.lookupKeybinding(s)) || void 0 === n ? void 0 : n.getLabel())
  50024. };
  50025. t(), this._disposables.add(this._keybindingService.onDidUpdateKeybindings(t)), this._updateFont(), this._updateStyles(this._themeService.getTheme())
  50026. }
  50027. return this._domNode
  50028. }, e.prototype._updateStyles = function (e) {
  50029. var t, n, i, o;
  50030. if (this._input && this._domNode) {
  50031. var r = e.getColor(a.widgetShadow);
  50032. this._domNode.style.backgroundColor = String(null !== (t = e.getColor(a.editorWidgetBackground)) && void 0 !== t ? t : ""), this._domNode.style.boxShadow = r ? " 0 2px 8px " + r : "",
  50033. this._domNode.style.color = String(null !== (n = e.getColor(a.inputForeground)) && void 0 !== n ? n : ""), this._input.style.backgroundColor = String(null !== (i = e.getColor(a.inputBackground)) && void 0 !== i ? i : "");
  50034. var s = e.getColor(a.inputBorder);
  50035. this._input.style.borderWidth = s ? "1px" : "0px", this._input.style.borderStyle = s ? "solid" : "none", this._input.style.borderColor = null !== (o = null == s ? void 0 : s.toString()) && void 0 !== o ? o : "none"
  50036. }
  50037. }, e.prototype._updateFont = function () {
  50038. if (this._input && this._label) {
  50039. var e = this._editor.getOption(34);
  50040. this._input.style.fontFamily = e.fontFamily, this._input.style.fontWeight = e.fontWeight, this._input.style.fontSize = e.fontSize + "px", this._label.style.fontSize = .8 * e.fontSize + "px"
  50041. }
  50042. }, e.prototype.getPosition = function () {
  50043. return this._visible ? {position: this._position, preference: [2, 1]} : null
  50044. }, e.prototype.acceptInput = function (e) {
  50045. this._currentAcceptInput && this._currentAcceptInput(e)
  50046. }, e.prototype.cancelInput = function (e) {
  50047. this._currentCancelInput && this._currentCancelInput(e)
  50048. }, e.prototype.getInput = function (e, t, r, s, a) {
  50049. var l = this
  50050. ;d.toggleClass(this._domNode, "preview", a), this._position = new i.Position(e.startLineNumber, e.startColumn), this._input.value = t, this._input.setAttribute("selectionStart", r.toString()), this._input.setAttribute("selectionEnd", s.toString()), this._input.size = Math.max(1.1 * (e.endColumn - e.startColumn), 20);
  50051. var u = new n.DisposableStore;
  50052. return new Promise((function (n) {
  50053. l._currentCancelInput = function (e) {
  50054. return l._currentAcceptInput = void 0, l._currentCancelInput = void 0, n(e), !0
  50055. }, l._currentAcceptInput = function (e) {
  50056. 0 !== l._input.value.trim().length && l._input.value !== t ? (l._currentAcceptInput = void 0, l._currentCancelInput = void 0, n({
  50057. newName: l._input.value,
  50058. wantsPreview: a && e
  50059. })) : l.cancelInput(!0)
  50060. };
  50061. u.add(l._editor.onDidChangeCursorSelection((function () {
  50062. var t = l._editor.getPosition();
  50063. t && o.Range.containsPosition(e, t) || l.cancelInput(!0)
  50064. }))), u.add(l._editor.onDidBlurEditorWidget((function () {
  50065. return l.cancelInput(!1)
  50066. }))), l._show()
  50067. })).finally((function () {
  50068. u.dispose(), l._hide()
  50069. }))
  50070. }, e.prototype._show = function () {
  50071. var e = this
  50072. ;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber, 0), this._visible = !0, this._visibleContextKey.set(!0), this._editor.layoutContentWidget(this), setTimeout((function () {
  50073. e._input.focus(), e._input.setSelectionRange(parseInt(e._input.getAttribute("selectionStart")), parseInt(e._input.getAttribute("selectionEnd")))
  50074. }), 100)
  50075. }, e.prototype._hide = function () {
  50076. this._visible = !1, this._visibleContextKey.reset(), this._editor.layoutContentWidget(this)
  50077. }, e = h([g(2, l.IThemeService), g(3, u.IKeybindingService), g(4, s.IContextKeyService)], e)
  50078. }();
  50079. t.RenameInputField = c
  50080. })), define(n[584], i([0, 1, 463, 10, 18, 73, 12, 23, 583, 17, 13, 50, 3, 122, 67, 35, 156, 25, 32, 26, 2, 15, 21, 95, 11, 42, 85, 114]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T) {
  50081. "use strict";
  50082. Object.defineProperty(t, "__esModule", {value: !0});
  50083. var R = function () {
  50084. function e(e, t) {
  50085. this.model = e, this.position = t, this._providers = p.RenameProviderRegistry.ordered(e)
  50086. }
  50087. return e.prototype.hasProvider = function () {
  50088. return this._providers.length > 0
  50089. },
  50090. e.prototype.resolveRenameLocation = function (e) {
  50091. return d(this, void 0, void 0, (function () {
  50092. var t, n, i, o;
  50093. return c(this, (function (r) {
  50094. switch (r.label) {
  50095. case 0:
  50096. return (t = this._providers[0]) ? t.resolveRenameLocation ? (i = N.withNullAsUndefined, [4, t.resolveRenameLocation(this.model, this.position, e)]) : [3, 2] : [2, void 0];
  50097. case 1:
  50098. n = i.apply(void 0, [r.sent()]), r.label = 2;
  50099. case 2:
  50100. return !n && (o = this.model.getWordAtPosition(this.position)) ? [2, {
  50101. range: new v.Range(this.position.lineNumber, o.startColumn, this.position.lineNumber, o.endColumn),
  50102. text: o.word
  50103. }] : [2, n]
  50104. }
  50105. }))
  50106. }))
  50107. }, e.prototype.provideRenameEdits = function (e, t, i, o) {
  50108. return d(this, void 0, void 0, (function () {
  50109. var r, s;
  50110. return c(this, (function (a) {
  50111. switch (a.label) {
  50112. case 0:
  50113. return (r = this._providers[t]) ? [4, r.provideRenameEdits(this.model, this.position, e, o)] : [2, {
  50114. edits: [],
  50115. rejectReason: i.join("\n")
  50116. }];
  50117. case 1:
  50118. return (s = a.sent()) ? s.rejectReason ? [2, this.provideRenameEdits(e, t + 1, i.concat(s.rejectReason), o)] : [2, s] : [2, this.provideRenameEdits(e, t + 1, i.concat(n.localize(0, null)), o)]
  50119. }
  50120. }))
  50121. }))
  50122. }, e
  50123. }();
  50124. function O(e, t, n) {
  50125. return d(this, void 0, void 0, (function () {
  50126. return c(this, (function (i) {
  50127. return [2, new R(e, t).provideRenameEdits(n, 0, [], E.CancellationToken.None)]
  50128. }))
  50129. }))
  50130. }
  50131. t.rename = O;
  50132. var P = function () {
  50133. function e(e, t, n, i, o, r, s) {
  50134. var a = this;
  50135. this.editor = e, this._instaService = t, this._notificationService = n, this._bulkEditService = i, this._progressService = o, this._logService = r, this._configService = s, this._dispoableStore = new L.DisposableStore, this._cts = new E.CancellationTokenSource, this._renameInputField = this._dispoableStore.add(new D.IdleValue((function () {
  50136. return a._dispoableStore.add(a._instaService.createInstance(u.RenameInputField, a.editor, ["acceptRenameInput", "acceptRenameInputWithPreview"]))
  50137. })))
  50138. }
  50139. return e.get = function (t) {
  50140. return t.getContribution(e.ID)
  50141. }, e.prototype.dispose = function () {
  50142. this._dispoableStore.dispose(), this._cts.dispose(!0)
  50143. }, e.prototype.run = function () {
  50144. return d(this, void 0, void 0, (function () {
  50145. var e, t, i, o, r, s, a, l, u, h, p, g = this;
  50146. return c(this, (function (f) {
  50147. switch (f.label) {
  50148. case 0:
  50149. if (this._cts.dispose(!0),
  50150. !this.editor.hasModel()) return [2, void 0];
  50151. if (e = this.editor.getPosition(), !(t = new R(this.editor.getModel(), e)).hasProvider()) return [2, void 0];
  50152. this._cts = new y.EditorStateCancellationTokenSource(this.editor, 5), f.label = 1;
  50153. case 1:
  50154. return f.trys.push([1, 3, , 4]), o = t.resolveRenameLocation(this._cts.token), this._progressService.showWhile(o, 250), [4, o];
  50155. case 2:
  50156. return i = f.sent(), [3, 4];
  50157. case 3:
  50158. return r = f.sent(), _.MessageController.get(this.editor).showMessage(r || n.localize(1, null), e), [2, void 0];
  50159. case 4:
  50160. return i ? i.rejectReason ? (_.MessageController.get(this.editor).showMessage(i.rejectReason, e), [2, void 0]) : this._cts.token.isCancellationRequested ? [2, void 0] : (s = this.editor.getSelection(), a = 0, l = i.text.length, v.Range.isEmpty(s) || v.Range.spansMultipleLines(s) || !v.Range.containsRange(i.range, s) || (a = Math.max(0, s.startColumn - i.range.startColumn), l = Math.min(i.range.endColumn, s.endColumn) - i.range.startColumn), u = this._bulkEditService.hasPreviewHandler() && this._configService.getValue(this.editor.getModel().uri, "editor.rename.enablePreview"),
  50161. [4, this._renameInputField.getValue().getInput(i.range, i.text, a, l, u)]) : [2, void 0];
  50162. case 5:
  50163. return "boolean" == typeof (h = f.sent()) ? (h && this.editor.focus(), [2, void 0]) : (this.editor.focus(), p = D.raceCancellation(t.provideRenameEdits(h.newName, 0, [], this._cts.token), this._cts.token).then((function (e) {
  50164. return d(g, void 0, void 0, (function () {
  50165. var t = this;
  50166. return c(this, (function (o) {
  50167. return e && this.editor.hasModel() ? e.rejectReason ? (this._notificationService.info(e.rejectReason), [2]) : (this._bulkEditService.apply(e, {
  50168. editor: this.editor,
  50169. showPreview: h.wantsPreview,
  50170. label: n.localize(2, null, null == i ? void 0 : i.text)
  50171. }).then((function (e) {
  50172. e.ariaSummary && m.alert(n.localize(3, null, i.text, h.newName, e.ariaSummary))
  50173. })).catch((function (e) {
  50174. t._notificationService.error(n.localize(4, null)), t._logService.error(e)
  50175. })), [2]) : [2]
  50176. }))
  50177. }))
  50178. }), (function (e) {
  50179. g._notificationService.error(n.localize(5, null)), g._logService.error(e)
  50180. })), this._progressService.showWhile(p, 250), [2, p])
  50181. }
  50182. }))
  50183. }))
  50184. }, e.prototype.acceptRenameInput = function (e) {
  50185. this._renameInputField.getValue().acceptInput(e)
  50186. }, e.prototype.cancelRenameInput = function () {
  50187. this._renameInputField.getValue().cancelInput(!0)
  50188. }, e.ID = "editor.contrib.renameController", e = h([g(1, I.IInstantiationService), g(2, C.INotificationService), g(3, b.IBulkEditService), g(4, s.IEditorProgressService), g(5, x.ILogService), g(6, T.ITextResourceConfigurationService)], e)
  50189. }(), A = function (e) {
  50190. function t() {
  50191. return e.call(this, {
  50192. id: "editor.action.rename",
  50193. label: n.localize(6, null),
  50194. alias: "Rename Symbol",
  50195. precondition: o.ContextKeyExpr.and(l.EditorContextKeys.writable, l.EditorContextKeys.hasRenameProvider),
  50196. kbOpts: {kbExpr: l.EditorContextKeys.editorTextFocus, primary: 60, weight: 100},
  50197. contextMenuOpts: {group: "1_modification", order: 1.1}
  50198. }) || this
  50199. }
  50200. return r(t, e), t.prototype.runCommand = function (t, n) {
  50201. var o = this, r = t.get(w.ICodeEditorService), s = Array.isArray(n) && n || [void 0, void 0], a = s[0],
  50202. l = s[1];
  50203. return S.URI.isUri(a) && f.Position.isIPosition(l) ? r.openCodeEditor({resource: a}, r.getActiveCodeEditor()).then((function (e) {
  50204. e && (e.setPosition(l),
  50205. e.invokeWithinContext((function (t) {
  50206. return o.reportTelemetry(t, e), o.run(t, e)
  50207. })))
  50208. }), i.onUnexpectedError) : e.prototype.runCommand.call(this, t, n)
  50209. }, t.prototype.run = function (e, t) {
  50210. var n = P.get(t);
  50211. return n ? n.run() : Promise.resolve()
  50212. }, t
  50213. }(a.EditorAction);
  50214. t.RenameAction = A, a.registerEditorContribution(P.ID, P), a.registerEditorAction(A);
  50215. var F = a.EditorCommand.bindToContribution(P.get);
  50216. a.registerEditorCommand(new F({
  50217. id: "acceptRenameInput",
  50218. precondition: u.CONTEXT_RENAME_INPUT_VISIBLE,
  50219. handler: function (e) {
  50220. return e.acceptRenameInput(!1)
  50221. },
  50222. kbOpts: {weight: 199, kbExpr: l.EditorContextKeys.focus, primary: 3}
  50223. })), a.registerEditorCommand(new F({
  50224. id: "acceptRenameInputWithPreview",
  50225. precondition: o.ContextKeyExpr.and(u.CONTEXT_RENAME_INPUT_VISIBLE, o.ContextKeyExpr.has("config.editor.rename.enablePreview")),
  50226. handler: function (e) {
  50227. return e.acceptRenameInput(!0)
  50228. },
  50229. kbOpts: {weight: 199, kbExpr: l.EditorContextKeys.focus, primary: 1027}
  50230. })), a.registerEditorCommand(new F({
  50231. id: "cancelRenameInput", precondition: u.CONTEXT_RENAME_INPUT_VISIBLE, handler: function (e) {
  50232. return e.cancelRenameInput()
  50233. }, kbOpts: {weight: 199, kbExpr: l.EditorContextKeys.focus, primary: 9, secondary: [1033]}
  50234. })), a.registerDefaultLanguageCommand("_executeDocumentRenameProvider", (function (e, t, n) {
  50235. var o = n.newName;
  50236. if ("string" != typeof o) throw i.illegalArgument("newName");
  50237. return O(e, t, o)
  50238. })), M.Registry.as(k.Extensions.Configuration).registerConfiguration({
  50239. id: "editor",
  50240. properties: {
  50241. "editor.rename.enablePreview": {
  50242. scope: 5,
  50243. description: n.localize(7, null),
  50244. default: !0,
  50245. type: "boolean"
  50246. }
  50247. }
  50248. })
  50249. })), define(n[585], i([0, 1, 468, 61, 5, 4, 10, 2, 6, 153, 53, 34, 18, 120, 96, 97, 14, 20, 74, 117, 71, 51, 15, 17, 139, 511, 49, 25, 11, 208, 75, 19, 13, 322, 323, 183, 231]), (function (e, t, n, i, o, r, s, a, u, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F) {
  50250. "use strict";
  50251. Object.defineProperty(t, "__esModule", {value: !0});
  50252. t.editorSuggestWidgetBackground = S.registerColor("editorSuggestWidget.background", {
  50253. dark: S.editorWidgetBackground,
  50254. light: S.editorWidgetBackground,
  50255. hc: S.editorWidgetBackground
  50256. }, n.localize(0, null)), t.editorSuggestWidgetBorder = S.registerColor("editorSuggestWidget.border", {
  50257. dark: S.editorWidgetBorder, light: S.editorWidgetBorder, hc: S.editorWidgetBorder
  50258. }, n.localize(1, null)), t.editorSuggestWidgetForeground = S.registerColor("editorSuggestWidget.foreground", {
  50259. dark: S.editorForeground,
  50260. light: S.editorForeground,
  50261. hc: S.editorForeground
  50262. }, n.localize(2, null)), t.editorSuggestWidgetSelectedBackground = S.registerColor("editorSuggestWidget.selectedBackground", {
  50263. dark: S.listFocusBackground,
  50264. light: S.listFocusBackground,
  50265. hc: S.listFocusBackground
  50266. }, n.localize(3, null)), t.editorSuggestWidgetHighlightForeground = S.registerColor("editorSuggestWidget.highlightForeground", {
  50267. dark: S.listHighlightForeground,
  50268. light: S.listHighlightForeground,
  50269. hc: S.listHighlightForeground
  50270. }, n.localize(4, null));
  50271. var W = /^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;
  50272. function B(e) {
  50273. if (!e) return !1;
  50274. var t = e.completion;
  50275. return !!t.documentation || t.detail && t.detail !== t.label
  50276. }
  50277. function V(e) {
  50278. return "suggest-aria-id:" + e
  50279. }
  50280. var z = function () {
  50281. function e(e, t, n, i, o, r) {
  50282. this.widget = e,
  50283. this.editor = t, this.triggerKeybindingLabel = n, this._modelService = i, this._modeService = o, this._themeService = r
  50284. }
  50285. return Object.defineProperty(e.prototype, "templateId", {
  50286. get: function () {
  50287. return "suggestion"
  50288. }, enumerable: !0, configurable: !0
  50289. }), e.prototype.renderTemplate = function (e) {
  50290. var t = this, i = Object.create(null);
  50291. i.disposables = new a.DisposableStore, i.root = e, u.addClass(i.root, "show-file-icons"), i.icon = u.append(e, u.$(".icon")), i.colorspan = u.append(i.icon, u.$("span.colorspan"));
  50292. var o = u.append(e, u.$(".contents")), s = u.append(o, u.$(".main"));
  50293. i.left = u.append(s, u.$("span.left")), i.right = u.append(s, u.$("span.right")), i.iconContainer = u.append(i.left, u.$(".icon-label.codicon")), i.iconLabel = new I.IconLabel(i.left, {
  50294. supportHighlights: !0,
  50295. supportCodicons: !0
  50296. }), i.disposables.add(i.iconLabel), i.signatureLabel = u.append(i.left, u.$("span.signature-label")), i.qualifierLabel = u.append(i.left, u.$("span.qualifier-label")), i.detailsLabel = u.append(i.right, u.$("span.details-label")), i.readMore = u.append(i.right, u.$("span.readMore.codicon.codicon-info")),
  50297. i.readMore.title = n.localize(5, null, this.triggerKeybindingLabel);
  50298. var l = function () {
  50299. var e = t.editor.getOptions(), n = e.get(34), o = n.fontFamily, r = n.fontFeatureSettings,
  50300. a = e.get(90) || n.fontSize, l = e.get(91) || n.lineHeight, u = n.fontWeight, d = a + "px",
  50301. c = l + "px";
  50302. i.root.style.fontSize = d, i.root.style.fontWeight = u, s.style.fontFamily = o, s.style.fontFeatureSettings = r, s.style.lineHeight = c, i.icon.style.height = c, i.icon.style.width = c, i.readMore.style.height = c, i.readMore.style.width = c
  50303. };
  50304. return l(), i.disposables.add(r.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function (e) {
  50305. return e.hasChanged(34) || e.hasChanged(90) || e.hasChanged(91)
  50306. })).on(l, null)), i
  50307. }, e.prototype.renderElement = function (e, t, n) {
  50308. var o = this, r = n, s = e.completion, a = "string" == typeof s.label ? s.label : s.label.name;
  50309. r.root.id = V(t), r.icon.className = "icon " + x.completionKindToCssClass(s.kind), r.colorspan.style.backgroundColor = "";
  50310. var l, d, c, h = {labelEscapeNewLines: !0, matches: i.createMatches(e.score)}, p = [];
  50311. if (19 === s.kind && (d = p,
  50312. (c = "string" == typeof (l = e).completion.label ? l.completion.label : l.completion.label.name).match(W) ? (d[0] = c, 1) : "string" == typeof l.completion.documentation && l.completion.documentation.match(W) && (d[0] = l.completion.documentation, 1))) r.icon.className = "icon customcolor", r.iconContainer.className = "icon hide", r.colorspan.style.backgroundColor = p[0]; else if (20 === s.kind && this._themeService.getIconTheme().hasFileIcons) {
  50313. r.icon.className = "icon hide", r.iconContainer.className = "icon hide";
  50314. var g = M.getIconClasses(this._modelService, this._modeService, T.URI.from({
  50315. scheme: "fake",
  50316. path: a
  50317. }), O.FileKind.FILE), f = M.getIconClasses(this._modelService, this._modeService, T.URI.from({
  50318. scheme: "fake",
  50319. path: s.detail
  50320. }), O.FileKind.FILE);
  50321. h.extraClasses = g.length > f.length ? g : f
  50322. } else 23 === s.kind && this._themeService.getIconTheme().hasFolderIcons ? (r.icon.className = "icon hide", r.iconContainer.className = "icon hide", h.extraClasses = A.flatten([M.getIconClasses(this._modelService, this._modeService, T.URI.from({
  50323. scheme: "fake", path: a
  50324. }), O.FileKind.FOLDER), M.getIconClasses(this._modelService, this._modeService, T.URI.from({
  50325. scheme: "fake",
  50326. path: s.detail
  50327. }), O.FileKind.FOLDER)])) : (r.icon.className = "icon hide", r.iconContainer.className = "", u.addClasses(r.iconContainer, "suggest-icon codicon codicon-symbol-" + x.completionKindToCssClass(s.kind)));
  50328. s.tags && s.tags.indexOf(1) >= 0 && (h.extraClasses = (h.extraClasses || []).concat(["deprecated"]), h.matches = []), r.iconLabel.setLabel(a, void 0, h), "string" == typeof s.label ? (r.signatureLabel.textContent = "", r.qualifierLabel.textContent = "", r.detailsLabel.textContent = (s.detail || "").replace(/\n.*$/m, ""), u.removeClass(r.right, "always-show-details")) : (r.signatureLabel.textContent = (s.label.signature || "").replace(/\n.*$/m, ""), r.qualifierLabel.textContent = (s.label.qualifier || "").replace(/\n.*$/m, ""), r.detailsLabel.textContent = (s.label.type || "").replace(/\n.*$/m, ""), u.addClass(r.right, "always-show-details")), B(e) ? (u.addClass(r.right, "can-expand-details"), u.show(r.readMore), r.readMore.onmousedown = function (e) {
  50329. e.stopPropagation(),
  50330. e.preventDefault()
  50331. }, r.readMore.onclick = function (e) {
  50332. e.stopPropagation(), e.preventDefault(), o.widget.toggleDetails()
  50333. }) : (u.removeClass(r.right, "can-expand-details"), u.hide(r.readMore), r.readMore.onmousedown = null, r.readMore.onclick = null)
  50334. }, e.prototype.disposeTemplate = function (e) {
  50335. e.disposables.dispose()
  50336. }, e = h([g(3, k.IModelService), g(4, L.IModeService), g(5, b.IThemeService)], e)
  50337. }(), H = function () {
  50338. function e(e, t, i, o, s) {
  50339. var l = this;
  50340. this.widget = t, this.editor = i, this.markdownRenderer = o, this.kbToggleDetails = s, this.borderWidth = 1, this.disposables = new a.DisposableStore, this.el = u.append(e, u.$(".details")), this.disposables.add(a.toDisposable((function () {
  50341. return e.removeChild(l.el)
  50342. }))), this.body = u.$(".body"), this.scrollbar = new f.DomScrollableElement(this.body, {}), u.append(this.el, this.scrollbar.getDomNode()), this.disposables.add(this.scrollbar), this.header = u.append(this.body, u.$(".header")), this.close = u.append(this.header, u.$("span.codicon.codicon-close")), this.close.title = n.localize(6, null, this.kbToggleDetails),
  50343. this.type = u.append(this.header, u.$("p.type")), this.docs = u.append(this.body, u.$("p.docs")), this.configureFont(), r.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function (e) {
  50344. return e.hasChanged(34)
  50345. })).on(this.configureFont, this, this.disposables), o.onDidRenderCodeBlock((function () {
  50346. return l.scrollbar.scanDomNode()
  50347. }), this, this.disposables)
  50348. }
  50349. return Object.defineProperty(e.prototype, "element", {
  50350. get: function () {
  50351. return this.el
  50352. }, enumerable: !0, configurable: !0
  50353. }), e.prototype.renderLoading = function () {
  50354. this.type.textContent = n.localize(7, null), this.docs.textContent = ""
  50355. }, e.prototype.renderItem = function (e, t) {
  50356. var n = this;
  50357. this.renderDisposeable = a.dispose(this.renderDisposeable);
  50358. var i = e.completion, o = i.documentation, r = i.detail;
  50359. if (t) {
  50360. var s = "";
  50361. s += "score: " + e.score[0] + (e.word ? ", compared '" + (e.completion.filterText && e.completion.filterText + " (filterText)" || e.completion.label) + "' with '" + e.word + "'" : " (no prefix)") + "\n", s += "distance: " + e.distance + ", see localityBonus-setting\n",
  50362. s += "index: " + e.idx + ", based on " + (e.completion.sortText && 'sortText: "' + e.completion.sortText + '"' || "label") + "\n", o = (new P.MarkdownString).appendCodeblock("empty", s), r = "Provider: " + e.provider._debugDisplayName
  50363. }
  50364. if (!t && !B(e)) return this.type.textContent = "", this.docs.textContent = "", void u.addClass(this.el, "no-docs");
  50365. if (u.removeClass(this.el, "no-docs"), "string" == typeof o) u.removeClass(this.docs, "markdown-docs"), this.docs.textContent = o; else {
  50366. u.addClass(this.docs, "markdown-docs"), this.docs.innerHTML = "";
  50367. var l = this.markdownRenderer.render(o);
  50368. this.renderDisposeable = l, this.docs.appendChild(l.element)
  50369. }
  50370. r ? (this.type.innerText = r, u.show(this.type)) : (this.type.innerText = "", u.hide(this.type)), this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 2 * this.borderWidth + "px", this.el.style.userSelect = "text", this.el.tabIndex = -1, this.close.onmousedown = function (e) {
  50371. e.preventDefault(), e.stopPropagation()
  50372. }, this.close.onclick = function (e) {
  50373. e.preventDefault(), e.stopPropagation(), n.widget.toggleDetails()
  50374. }, this.body.scrollTop = 0,
  50375. this.scrollbar.scanDomNode()
  50376. }, e.prototype.scrollDown = function (e) {
  50377. void 0 === e && (e = 8), this.body.scrollTop += e
  50378. }, e.prototype.scrollUp = function (e) {
  50379. void 0 === e && (e = 8), this.body.scrollTop -= e
  50380. }, e.prototype.scrollTop = function () {
  50381. this.body.scrollTop = 0
  50382. }, e.prototype.scrollBottom = function () {
  50383. this.body.scrollTop = this.body.scrollHeight
  50384. }, e.prototype.pageDown = function () {
  50385. this.scrollDown(80)
  50386. }, e.prototype.pageUp = function () {
  50387. this.scrollUp(80)
  50388. }, e.prototype.setBorderWidth = function (e) {
  50389. this.borderWidth = e
  50390. }, e.prototype.configureFont = function () {
  50391. var e = this.editor.getOptions(), t = e.get(34), n = t.fontFamily, i = e.get(90) || t.fontSize,
  50392. o = e.get(91) || t.lineHeight, r = t.fontWeight, s = i + "px", a = o + "px";
  50393. this.el.style.fontSize = s, this.el.style.fontWeight = r, this.el.style.fontFeatureSettings = t.fontFeatureSettings, this.type.style.fontFamily = n, this.close.style.height = a, this.close.style.width = a
  50394. }, e.prototype.dispose = function () {
  50395. this.disposables.dispose(), this.renderDisposeable = a.dispose(this.renderDisposeable)
  50396. }, e
  50397. }(), K = function () {
  50398. function e(e, i, s, l, d, c, h, g, f) {
  50399. var m, v, y = this
  50400. ;this.editor = e, this.telemetryService = i, this.keybindingService = s, this.allowEditorOverflow = !0, this.suppressMouseDown = !1, this.state = null, this.isAuto = !1, this.loadingTimeout = a.Disposable.None, this.currentSuggestionDetails = null, this.ignoreFocusEvents = !1, this.completionModel = null, this.showTimeout = new N.TimeoutTimer, this.toDispose = new a.DisposableStore, this.onDidSelectEmitter = new r.Emitter, this.onDidFocusEmitter = new r.Emitter, this.onDidHideEmitter = new r.Emitter, this.onDidShowEmitter = new r.Emitter, this.onDidSelect = this.onDidSelectEmitter.event, this.onDidFocus = this.onDidFocusEmitter.event, this.onDidHide = this.onDidHideEmitter.event, this.onDidShow = this.onDidShowEmitter.event, this.maxWidgetWidth = 660, this.listWidth = 330, this.firstFocusInCurrentList = !1, this.preferDocPositionTop = !1, this.docsPositionPreviousWidgetY = null, this.explainMode = !1, this._onDetailsKeydown = new r.Emitter, this.onDetailsKeyDown = this._onDetailsKeydown.event
  50401. ;var b = this.toDispose.add(new E.MarkdownRenderer(e, h, g)),
  50402. w = null !== (v = null === (m = s.lookupKeybinding("toggleSuggestionDetails")) || void 0 === m ? void 0 : m.getLabel()) && void 0 !== v ? v : "";
  50403. this.msgDetailsLess = n.localize(10, null, w), this.msgDetailMore = n.localize(11, null, w), this.isAuto = !1, this.focusedItem = null, this.storageService = c, this.element = u.$(".editor-widget.suggest-widget"), this.toDispose.add(u.addDisposableListener(this.element, "click", (function (e) {
  50404. e.target === y.element && y.hideWidget()
  50405. }))), this.messageElement = u.append(this.element, u.$(".message")), this.listElement = u.append(this.element, u.$(".tree"));
  50406. var L = function () {
  50407. return u.toggleClass(y.element, "with-status-bar", !y.editor.getOption(89).hideStatusBar)
  50408. };
  50409. L(), this.statusBarElement = u.append(this.element, u.$(".suggest-status-bar")), this.statusBarLeftSpan = u.append(this.statusBarElement, u.$("span")), this.statusBarRightSpan = u.append(this.statusBarElement, u.$("span")), this.setStatusBarLeftText(""), this.setStatusBarRightText(""),
  50410. this.details = f.createInstance(H, this.element, this, this.editor, b, w);
  50411. var D = function () {
  50412. return u.toggleClass(y.element, "no-icons", !y.editor.getOption(89).showIcons)
  50413. };
  50414. D();
  50415. var x = f.createInstance(z, this, this.editor, w);
  50416. this.list = new p.List("SuggestWidget", this.listElement, this, [x], {
  50417. useShadows: !1,
  50418. openController: {
  50419. shouldOpen: function () {
  50420. return !1
  50421. }
  50422. },
  50423. mouseSupport: !1,
  50424. accessibilityProvider: {
  50425. getAriaLabel: function (e) {
  50426. var t = "string" == typeof e.completion.label ? e.completion.label : e.completion.label.name;
  50427. if (e.isResolved && y.expandDocsSettingFromStorage()) {
  50428. var i = e.completion, r = i.documentation, s = i.detail,
  50429. a = o.format("{0}{1}", s || "", r ? "string" == typeof r ? r : r.value : "");
  50430. return n.localize(12, null, t, a)
  50431. }
  50432. return t
  50433. }
  50434. }
  50435. }), this.toDispose.add(C.attachListStyler(this.list, d, {
  50436. listInactiveFocusBackground: t.editorSuggestWidgetSelectedBackground,
  50437. listInactiveFocusOutline: S.activeContrastBorder
  50438. })), this.toDispose.add(d.onThemeChange((function (e) {
  50439. return y.onThemeChange(e)
  50440. }))), this.toDispose.add(e.onDidLayoutChange((function () {
  50441. return y.onEditorLayoutChange()
  50442. }))), this.toDispose.add(this.list.onMouseDown((function (e) {
  50443. return y.onListMouseDownOrTap(e)
  50444. }))), this.toDispose.add(this.list.onTap((function (e) {
  50445. return y.onListMouseDownOrTap(e)
  50446. }))), this.toDispose.add(this.list.onSelectionChange((function (e) {
  50447. return y.onListSelection(e)
  50448. }))), this.toDispose.add(this.list.onFocusChange((function (e) {
  50449. return y.onListFocus(e)
  50450. }))), this.toDispose.add(this.editor.onDidChangeCursorSelection((function () {
  50451. return y.onCursorSelectionChanged()
  50452. }))), this.toDispose.add(this.editor.onDidChangeConfiguration((function (e) {
  50453. e.hasChanged(89) && (L(), D())
  50454. }))), this.suggestWidgetVisible = _.Context.Visible.bindTo(l), this.suggestWidgetMultipleSuggestions = _.Context.MultipleSuggestions.bindTo(l), this.editor.addContentWidget(this), this.setState(0), this.onThemeChange(d.getTheme()), this.toDispose.add(u.addStandardDisposableListener(this.details.element, "keydown", (function (e) {
  50455. y._onDetailsKeydown.fire(e)
  50456. }))), this.toDispose.add(this.editor.onMouseDown((function (e) {
  50457. return y.onEditorMouseDown(e)
  50458. })))
  50459. }
  50460. return e.prototype.onEditorMouseDown = function (e) {
  50461. this.details.element.contains(e.target.element) ? this.details.element.focus() : this.element.contains(e.target.element) && this.editor.focus()
  50462. }, e.prototype.onCursorSelectionChanged = function () {
  50463. 0 !== this.state && this.editor.layoutContentWidget(this)
  50464. }, e.prototype.onEditorLayoutChange = function () {
  50465. 3 !== this.state && 5 !== this.state || !this.expandDocsSettingFromStorage() || this.expandSideOrBelow()
  50466. }, e.prototype.onListMouseDownOrTap = function (e) {
  50467. void 0 !== e.element && void 0 !== e.index && (e.browserEvent.preventDefault(), e.browserEvent.stopPropagation(), this.select(e.element, e.index))
  50468. }, e.prototype.onListSelection = function (e) {
  50469. e.elements.length && this.select(e.elements[0], e.indexes[0])
  50470. }, e.prototype.select = function (e, t) {
  50471. var n = this.completionModel;
  50472. n && (this.onDidSelectEmitter.fire({item: e, index: t, model: n}), this.editor.focus())
  50473. }, e.prototype.onThemeChange = function (e) {
  50474. var n = e.getColor(t.editorSuggestWidgetBackground);
  50475. n && (this.listElement.style.backgroundColor = n.toString(),
  50476. this.statusBarElement.style.backgroundColor = n.toString(), this.details.element.style.backgroundColor = n.toString(), this.messageElement.style.backgroundColor = n.toString());
  50477. var i = e.getColor(t.editorSuggestWidgetBorder);
  50478. i && (this.listElement.style.borderColor = i.toString(), this.statusBarElement.style.borderColor = i.toString(), this.details.element.style.borderColor = i.toString(), this.messageElement.style.borderColor = i.toString(), this.detailsBorderColor = i.toString());
  50479. var o = e.getColor(S.focusBorder);
  50480. o && (this.detailsFocusBorderColor = o.toString()), this.details.setBorderWidth("hc" === e.type ? 2 : 1)
  50481. }, e.prototype.onListFocus = function (e) {
  50482. var t, i, o = this;
  50483. if (!this.ignoreFocusEvents) {
  50484. if (!e.elements.length) return this.currentSuggestionDetails && (this.currentSuggestionDetails.cancel(), this.currentSuggestionDetails = null, this.focusedItem = null), void this.editor.setAriaOptions({activeDescendant: void 0});
  50485. if (this.completionModel) {
  50486. var r = e.elements[0], a = e.indexes[0];
  50487. if (this.firstFocusInCurrentList = !this.focusedItem, r !== this.focusedItem) {
  50488. var l = "insert" === this.editor.getOption(89).insertMode,
  50489. h = null === (t = this.keybindingService.lookupKeybinding("acceptSelectedSuggestion")) || void 0 === t ? void 0 : t.getLabel(),
  50490. p = null === (i = this.keybindingService.lookupKeybinding("acceptAlternativeSelectedSuggestion")) || void 0 === i ? void 0 : i.getLabel();
  50491. F.Position.equals(r.editInsertEnd, r.editReplaceEnd) ? this.setStatusBarLeftText(n.localize(15, null, h)) : l ? this.setStatusBarLeftText(n.localize(13, null, h, p)) : this.setStatusBarLeftText(n.localize(14, null, h, p)), this.currentSuggestionDetails && (this.currentSuggestionDetails.cancel(), this.currentSuggestionDetails = null), this.focusedItem = r, this.list.reveal(a), this.currentSuggestionDetails = N.createCancelablePromise((function (e) {
  50492. return d(o, void 0, void 0, (function () {
  50493. var t, n, i = this;
  50494. return c(this, (function (o) {
  50495. switch (o.label) {
  50496. case 0:
  50497. return t = N.disposableTimeout((function () {
  50498. return i.showDetails(!0)
  50499. }), 250), e.onCancellationRequested((function () {
  50500. return t.dispose()
  50501. })), [4, r.resolve(e)];
  50502. case 1:
  50503. return n = o.sent(), t.dispose(), [2, n]
  50504. }
  50505. }))
  50506. }))
  50507. })),
  50508. this.currentSuggestionDetails.then((function () {
  50509. a >= o.list.length || r !== o.list.element(a) || (o.ignoreFocusEvents = !0, o.list.splice(a, 1, [r]), o.list.setFocus([a]), o.ignoreFocusEvents = !1, o.expandDocsSettingFromStorage() ? o.showDetails(!1) : u.removeClass(o.element, "docs-side"), B(o.focusedItem) ? o.expandDocsSettingFromStorage() ? o.setStatusBarRightText(o.msgDetailsLess) : o.setStatusBarRightText(o.msgDetailMore) : o.statusBarRightSpan.innerText = "", o.editor.setAriaOptions({activeDescendant: V(a)}))
  50510. })).catch(s.onUnexpectedError)
  50511. }
  50512. this.onDidFocusEmitter.fire({item: r, index: a, model: this.completionModel})
  50513. }
  50514. }
  50515. }, e.prototype.setState = function (t) {
  50516. if (this.element) {
  50517. var n = this.state !== t;
  50518. switch (this.state = t, u.toggleClass(this.element, "frozen", 4 === t), t) {
  50519. case 0:
  50520. u.hide(this.messageElement, this.details.element, this.listElement, this.statusBarElement), this.hide(), this.listHeight = 0, n && this.list.splice(0, this.list.length), this.focusedItem = null;
  50521. break;
  50522. case 1:
  50523. this.messageElement.textContent = e.LOADING_MESSAGE,
  50524. u.hide(this.listElement, this.details.element, this.statusBarElement), u.show(this.messageElement), u.removeClass(this.element, "docs-side"), this.show(), this.focusedItem = null;
  50525. break;
  50526. case 2:
  50527. this.messageElement.textContent = e.NO_SUGGESTIONS_MESSAGE, u.hide(this.listElement, this.details.element, this.statusBarElement), u.show(this.messageElement), u.removeClass(this.element, "docs-side"), this.show(), this.focusedItem = null;
  50528. break;
  50529. case 3:
  50530. u.hide(this.messageElement), u.show(this.listElement, this.statusBarElement), this.show();
  50531. break;
  50532. case 4:
  50533. u.hide(this.messageElement), u.show(this.listElement), this.show();
  50534. break;
  50535. case 5:
  50536. u.hide(this.messageElement), u.show(this.details.element, this.listElement, this.statusBarElement), this.show()
  50537. }
  50538. }
  50539. }, e.prototype.showTriggered = function (e, t) {
  50540. var n = this;
  50541. 0 === this.state && (this.isAuto = !!e, this.isAuto || (this.loadingTimeout = N.disposableTimeout((function () {
  50542. return n.setState(1)
  50543. }), t)))
  50544. }, e.prototype.showSuggestions = function (e, t, n, i) {
  50545. if (this.preferDocPositionTop = !1, this.docsPositionPreviousWidgetY = null,
  50546. this.loadingTimeout.dispose(), this.currentSuggestionDetails && (this.currentSuggestionDetails.cancel(), this.currentSuggestionDetails = null), this.completionModel !== e && (this.completionModel = e), n && 2 !== this.state && 0 !== this.state) this.setState(4); else {
  50547. var o = this.completionModel.items.length, r = 0 === o;
  50548. if (this.suggestWidgetMultipleSuggestions.set(o > 1), r) i ? this.setState(0) : this.setState(2), this.completionModel = null; else {
  50549. if (3 !== this.state) {
  50550. var s = this.completionModel.stats;
  50551. s.wasAutomaticallyTriggered = !!i, this.telemetryService.publicLog("suggestWidget", l({}, s))
  50552. }
  50553. this.focusedItem = null, this.list.splice(0, this.list.length, this.completionModel.items), n ? this.setState(4) : this.setState(3), this.list.reveal(t, 0), this.list.setFocus([t]), this.detailsBorderColor && (this.details.element.style.borderColor = this.detailsBorderColor)
  50554. }
  50555. }
  50556. }, e.prototype.selectNextPage = function () {
  50557. switch (this.state) {
  50558. case 0:
  50559. return !1;
  50560. case 5:
  50561. return this.details.pageDown(), !0;
  50562. case 1:
  50563. return !this.isAuto;
  50564. default:
  50565. return this.list.focusNextPage(), !0
  50566. }
  50567. },
  50568. e.prototype.selectNext = function () {
  50569. switch (this.state) {
  50570. case 0:
  50571. return !1;
  50572. case 1:
  50573. return !this.isAuto;
  50574. default:
  50575. return this.list.focusNext(1, !0), !0
  50576. }
  50577. }, e.prototype.selectLast = function () {
  50578. switch (this.state) {
  50579. case 0:
  50580. return !1;
  50581. case 5:
  50582. return this.details.scrollBottom(), !0;
  50583. case 1:
  50584. return !this.isAuto;
  50585. default:
  50586. return this.list.focusLast(), !0
  50587. }
  50588. }, e.prototype.selectPreviousPage = function () {
  50589. switch (this.state) {
  50590. case 0:
  50591. return !1;
  50592. case 5:
  50593. return this.details.pageUp(), !0;
  50594. case 1:
  50595. return !this.isAuto;
  50596. default:
  50597. return this.list.focusPreviousPage(), !0
  50598. }
  50599. }, e.prototype.selectPrevious = function () {
  50600. switch (this.state) {
  50601. case 0:
  50602. return !1;
  50603. case 1:
  50604. return !this.isAuto;
  50605. default:
  50606. return this.list.focusPrevious(1, !0), !1
  50607. }
  50608. }, e.prototype.selectFirst = function () {
  50609. switch (this.state) {
  50610. case 0:
  50611. return !1;
  50612. case 5:
  50613. return this.details.scrollTop(), !0;
  50614. case 1:
  50615. return !this.isAuto;
  50616. default:
  50617. return this.list.focusFirst(), !0
  50618. }
  50619. }, e.prototype.getFocusedItem = function () {
  50620. if (0 !== this.state && 2 !== this.state && 1 !== this.state && this.completionModel) return {
  50621. item: this.list.getFocusedElements()[0],
  50622. index: this.list.getFocus()[0], model: this.completionModel
  50623. }
  50624. }, e.prototype.toggleDetailsFocus = function () {
  50625. 5 === this.state ? (this.setState(3), this.detailsBorderColor && (this.details.element.style.borderColor = this.detailsBorderColor)) : 3 === this.state && this.expandDocsSettingFromStorage() && (this.setState(5), this.detailsFocusBorderColor && (this.details.element.style.borderColor = this.detailsFocusBorderColor)), this.telemetryService.publicLog2("suggestWidget:toggleDetailsFocus")
  50626. }, e.prototype.toggleDetails = function () {
  50627. if (B(this.list.getFocusedElements()[0])) if (this.expandDocsSettingFromStorage()) this.updateExpandDocsSetting(!1), u.hide(this.details.element), u.removeClass(this.element, "docs-side"), u.removeClass(this.element, "docs-below"), this.editor.layoutContentWidget(this), this.setStatusBarRightText(this.msgDetailMore), this.telemetryService.publicLog2("suggestWidget:collapseDetails"); else {
  50628. if (3 !== this.state && 5 !== this.state && 4 !== this.state) return;
  50629. this.updateExpandDocsSetting(!0), this.showDetails(!1),
  50630. this.setStatusBarRightText(this.msgDetailsLess), this.telemetryService.publicLog2("suggestWidget:expandDetails")
  50631. }
  50632. }, e.prototype.showDetails = function (e) {
  50633. e || this.expandSideOrBelow(), u.show(this.details.element), this.details.element.style.maxHeight = this.maxWidgetHeight + "px", e ? this.details.renderLoading() : this.details.renderItem(this.list.getFocusedElements()[0], this.explainMode), this.listElement.style.marginTop = "0px", this.editor.layoutContentWidget(this), this.adjustDocsPosition(), this.editor.focus()
  50634. }, e.prototype.toggleExplainMode = function () {
  50635. this.list.getFocusedElements()[0] && this.expandDocsSettingFromStorage() && (this.explainMode = !this.explainMode, this.showDetails(!1))
  50636. }, e.prototype.show = function () {
  50637. var e = this, t = this.updateListHeight();
  50638. t !== this.listHeight && (this.editor.layoutContentWidget(this), this.listHeight = t), this.suggestWidgetVisible.set(!0), this.showTimeout.cancelAndSet((function () {
  50639. u.addClass(e.element, "visible"), e.onDidShowEmitter.fire(e)
  50640. }), 100)
  50641. }, e.prototype.hide = function () {
  50642. this.suggestWidgetVisible.reset(),
  50643. this.suggestWidgetMultipleSuggestions.reset(), u.removeClass(this.element, "visible")
  50644. }, e.prototype.hideWidget = function () {
  50645. this.loadingTimeout.dispose(), this.setState(0), this.onDidHideEmitter.fire(this)
  50646. }, e.prototype.getPosition = function () {
  50647. if (0 === this.state) return null;
  50648. var e = [2, 1];
  50649. return this.preferDocPositionTop && (e = [1]), {position: this.editor.getPosition(), preference: e}
  50650. }, e.prototype.getDomNode = function () {
  50651. return this.element
  50652. }, e.prototype.getId = function () {
  50653. return e.ID
  50654. }, e.prototype.isFrozen = function () {
  50655. return 4 === this.state
  50656. }, e.prototype.updateListHeight = function () {
  50657. var e = 0;
  50658. if (2 === this.state || 1 === this.state) e = this.unfocusedHeight; else {
  50659. var t = this.list.contentHeight / this.unfocusedHeight,
  50660. n = this.editor.getOption(89).maxVisibleSuggestions;
  50661. e = Math.min(t, n) * this.unfocusedHeight
  50662. }
  50663. return this.element.style.lineHeight = this.unfocusedHeight + "px", this.listElement.style.height = e + "px", this.statusBarElement.style.top = e + "px", this.list.layout(e), e
  50664. }, e.prototype.adjustDocsPosition = function () {
  50665. if (this.editor.hasModel()) {
  50666. var e = this.editor.getOption(49),
  50667. t = this.editor.getScrolledVisiblePosition(this.editor.getPosition()),
  50668. n = u.getDomNodePagePosition(this.editor.getDomNode()), i = n.left + t.left,
  50669. o = n.top + t.top + t.height, r = u.getDomNodePagePosition(this.element), s = r.left, a = r.top;
  50670. if (this.docsPositionPreviousWidgetY && this.docsPositionPreviousWidgetY < a && !this.preferDocPositionTop) return this.preferDocPositionTop = !0, void this.adjustDocsPosition();
  50671. this.docsPositionPreviousWidgetY = a, s < i - this.listWidth ? u.addClass(this.element, "list-right") : u.removeClass(this.element, "list-right"), u.hasClass(this.element, "docs-side") && o - e > a && this.details.element.offsetHeight > this.listElement.offsetHeight && (this.listElement.style.marginTop = this.details.element.offsetHeight - this.listElement.offsetHeight + "px")
  50672. }
  50673. }, e.prototype.expandSideOrBelow = function () {
  50674. if (!B(this.focusedItem) && this.firstFocusInCurrentList) return u.removeClass(this.element, "docs-side"), void u.removeClass(this.element, "docs-below");
  50675. var e = this.element.style.maxWidth.match(/(\d+)px/)
  50676. ;!e || Number(e[1]) < this.maxWidgetWidth ? (u.addClass(this.element, "docs-below"), u.removeClass(this.element, "docs-side")) : B(this.focusedItem) && (u.addClass(this.element, "docs-side"), u.removeClass(this.element, "docs-below"))
  50677. }, Object.defineProperty(e.prototype, "maxWidgetHeight", {
  50678. get: function () {
  50679. return this.unfocusedHeight * this.editor.getOption(89).maxVisibleSuggestions
  50680. }, enumerable: !0, configurable: !0
  50681. }), Object.defineProperty(e.prototype, "unfocusedHeight", {
  50682. get: function () {
  50683. var e = this.editor.getOptions();
  50684. return e.get(91) || e.get(34).lineHeight
  50685. }, enumerable: !0, configurable: !0
  50686. }), e.prototype.getHeight = function (e) {
  50687. return this.unfocusedHeight
  50688. }, e.prototype.getTemplateId = function (e) {
  50689. return "suggestion"
  50690. }, e.prototype.expandDocsSettingFromStorage = function () {
  50691. return this.storageService.getBoolean("expandSuggestionDocs", 0, !1)
  50692. }, e.prototype.updateExpandDocsSetting = function (e) {
  50693. this.storageService.store("expandSuggestionDocs", e, 0)
  50694. }, e.prototype.setStatusBarLeftText = function (e) {
  50695. this.statusBarLeftSpan.innerText = e
  50696. },
  50697. e.prototype.setStatusBarRightText = function (e) {
  50698. this.statusBarRightSpan.innerText = e
  50699. }, e.prototype.dispose = function () {
  50700. this.details.dispose(), this.list.dispose(), this.toDispose.dispose(), this.loadingTimeout.dispose(), this.showTimeout.dispose()
  50701. }, e.ID = "editor.widget.suggestWidget", e.LOADING_MESSAGE = n.localize(8, null), e.NO_SUGGESTIONS_MESSAGE = n.localize(9, null), e = h([g(1, y.ITelemetryService), g(2, m.IKeybindingService), g(3, v.IContextKeyService), g(4, b.IThemeService), g(5, w.IStorageService), g(6, L.IModeService), g(7, D.IOpenerService), g(8, R.IInstantiationService)], e)
  50702. }();
  50703. t.SuggestWidget = K, b.registerThemingParticipant((function (e, n) {
  50704. var i = e.getColor(t.editorSuggestWidgetHighlightForeground);
  50705. i && n.addRule(".monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: " + i + "; }");
  50706. var o = e.getColor(t.editorSuggestWidgetForeground);
  50707. o && n.addRule(".monaco-editor .suggest-widget { color: " + o + "; }");
  50708. var r = e.getColor(S.textLinkForeground)
  50709. ;r && n.addRule(".monaco-editor .suggest-widget a { color: " + r + "; }");
  50710. var s = e.getColor(S.textCodeBlockBackground);
  50711. s && n.addRule(".monaco-editor .suggest-widget code { background-color: " + s + "; }")
  50712. }))
  50713. })), define(n[586], i([0, 1, 471, 19, 15, 26, 10, 2, 12, 3, 23, 48, 30, 17, 18, 20, 14]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y) {
  50714. "use strict";
  50715. Object.defineProperty(t, "__esModule", {value: !0});
  50716. var C = _.registerColor("editor.wordHighlightBackground", {
  50717. dark: "#575757B8",
  50718. light: "#57575740",
  50719. hc: null
  50720. }, n.localize(0, null), !0), b = _.registerColor("editor.wordHighlightStrongBackground", {
  50721. dark: "#004972B8",
  50722. light: "#0e639c40",
  50723. hc: null
  50724. }, n.localize(1, null), !0), S = _.registerColor("editor.wordHighlightBorder", {
  50725. light: null,
  50726. dark: null,
  50727. hc: _.activeContrastBorder
  50728. }, n.localize(2, null)), w = _.registerColor("editor.wordHighlightStrongBorder", {
  50729. light: null,
  50730. dark: null,
  50731. hc: _.activeContrastBorder
  50732. }, n.localize(3, null)), E = _.registerColor("editorOverviewRuler.wordHighlightForeground", {
  50733. dark: "#A0A0A0CC", light: "#A0A0A0CC", hc: "#A0A0A0CC"
  50734. }, n.localize(4, null), !0), L = _.registerColor("editorOverviewRuler.wordHighlightStrongForeground", {
  50735. dark: "#C0A0C0CC",
  50736. light: "#C0A0C0CC",
  50737. hc: "#C0A0C0CC"
  50738. }, n.localize(5, null), !0), D = new v.RawContextKey("hasWordHighlights", !1);
  50739. function N(e, t, n) {
  50740. var r = m.DocumentHighlightProviderRegistry.ordered(e);
  50741. return o.first(r.map((function (i) {
  50742. return function () {
  50743. return Promise.resolve(i.provideDocumentHighlights(e, t, n)).then(void 0, a.onUnexpectedExternalError)
  50744. }
  50745. })), i.isNonEmptyArray)
  50746. }
  50747. t.getOccurrencesAtPosition = N;
  50748. var x = function () {
  50749. function e(e, t, n) {
  50750. var i = this;
  50751. this._wordRange = this._getCurrentWordRange(e, t), this.result = o.createCancelablePromise((function (o) {
  50752. return i._compute(e, t, n, o)
  50753. }))
  50754. }
  50755. return e.prototype._getCurrentWordRange = function (e, t) {
  50756. var n = e.getWordAtPosition(t.getPosition());
  50757. return n ? new d.Range(t.startLineNumber, n.startColumn, t.startLineNumber, n.endColumn) : null
  50758. }, e.prototype.isValid = function (e, t, n) {
  50759. for (var i = t.startLineNumber, o = t.startColumn, r = t.endColumn, s = this._getCurrentWordRange(e, t), a = Boolean(this._wordRange && this._wordRange.equalsRange(s)), l = 0, u = n.length; !a && l < u; l++) {
  50760. var d = e.getDecorationRange(n[l]);
  50761. d && d.startLineNumber === i && d.startColumn <= o && d.endColumn >= r && (a = !0)
  50762. }
  50763. return a
  50764. }, e.prototype.cancel = function () {
  50765. this.result.cancel()
  50766. }, e
  50767. }(), I = function (e) {
  50768. function t() {
  50769. return null !== e && e.apply(this, arguments) || this
  50770. }
  50771. return r(t, e), t.prototype._compute = function (e, t, n, i) {
  50772. return N(e, t.getPosition(), i).then((function (e) {
  50773. return e || []
  50774. }))
  50775. }, t
  50776. }(x), M = function (e) {
  50777. function t(t, n, i) {
  50778. var o = e.call(this, t, n, i) || this;
  50779. return o._selectionIsEmpty = n.isEmpty(), o
  50780. }
  50781. return r(t, e), t.prototype._compute = function (e, t, n, i) {
  50782. return o.timeout(250, i).then((function () {
  50783. if (!t.isEmpty()) return [];
  50784. var i = e.getWordAtPosition(t.getPosition());
  50785. return i ? e.findMatches(i.word, !0, !1, !0, n, !1).map((function (e) {
  50786. return {range: e.range, kind: m.DocumentHighlightKind.Text}
  50787. })) : []
  50788. }))
  50789. }, t.prototype.isValid = function (t, n, i) {
  50790. var o = n.isEmpty()
  50791. ;
  50792. return this._selectionIsEmpty === o && e.prototype.isValid.call(this, t, n, i)
  50793. }, t
  50794. }(x);
  50795. u.registerModelAndPositionCommand("_executeDocumentHighlights", (function (e, t) {
  50796. return N(e, t, s.CancellationToken.None)
  50797. }));
  50798. var k = function () {
  50799. function e(e, t) {
  50800. var n = this;
  50801. this.toUnhook = new l.DisposableStore, this.workerRequestTokenId = 0, this.workerRequestCompleted = !1, this.workerRequestValue = [], this.lastCursorPositionChangeTime = 0, this.renderDecorationsTimer = -1, this.editor = e, this._hasWordHighlights = D.bindTo(t), this._ignorePositionChangeEvent = !1, this.occurrencesHighlight = this.editor.getOption(61), this.model = this.editor.getModel(), this.toUnhook.add(e.onDidChangeCursorPosition((function (e) {
  50802. n._ignorePositionChangeEvent || n.occurrencesHighlight && n._onPositionChanged(e)
  50803. }))), this.toUnhook.add(e.onDidChangeModelContent((function (e) {
  50804. n._stopAll()
  50805. }))), this.toUnhook.add(e.onDidChangeConfiguration((function (e) {
  50806. var t = n.editor.getOption(61);
  50807. n.occurrencesHighlight !== t && (n.occurrencesHighlight = t, n._stopAll())
  50808. }))), this._decorationIds = [],
  50809. this.workerRequestTokenId = 0, this.workerRequest = null, this.workerRequestCompleted = !1, this.lastCursorPositionChangeTime = 0, this.renderDecorationsTimer = -1
  50810. }
  50811. return e.prototype.hasDecorations = function () {
  50812. return this._decorationIds.length > 0
  50813. }, e.prototype.restore = function () {
  50814. this.occurrencesHighlight && this._run()
  50815. }, e.prototype._getSortedHighlights = function () {
  50816. var e = this;
  50817. return i.coalesce(this._decorationIds.map((function (t) {
  50818. return e.model.getDecorationRange(t)
  50819. })).sort(d.Range.compareRangesUsingStarts))
  50820. }, e.prototype.moveNext = function () {
  50821. var e = this, t = this._getSortedHighlights(), n = t[(i.firstIndex(t, (function (t) {
  50822. return t.containsPosition(e.editor.getPosition())
  50823. })) + 1) % t.length];
  50824. try {
  50825. this._ignorePositionChangeEvent = !0, this.editor.setPosition(n.getStartPosition()), this.editor.revealRangeInCenterIfOutsideViewport(n)
  50826. } finally {
  50827. this._ignorePositionChangeEvent = !1
  50828. }
  50829. }, e.prototype.moveBack = function () {
  50830. var e = this, t = this._getSortedHighlights(), n = t[(i.firstIndex(t, (function (t) {
  50831. return t.containsPosition(e.editor.getPosition())
  50832. })) - 1 + t.length) % t.length];
  50833. try {
  50834. this._ignorePositionChangeEvent = !0, this.editor.setPosition(n.getStartPosition()), this.editor.revealRangeInCenterIfOutsideViewport(n)
  50835. } finally {
  50836. this._ignorePositionChangeEvent = !1
  50837. }
  50838. }, e.prototype._removeDecorations = function () {
  50839. this._decorationIds.length > 0 && (this._decorationIds = this.editor.deltaDecorations(this._decorationIds, []), this._hasWordHighlights.set(!1))
  50840. }, e.prototype._stopAll = function () {
  50841. this._removeDecorations(), -1 !== this.renderDecorationsTimer && (clearTimeout(this.renderDecorationsTimer), this.renderDecorationsTimer = -1), null !== this.workerRequest && (this.workerRequest.cancel(), this.workerRequest = null), this.workerRequestCompleted || (this.workerRequestTokenId++, this.workerRequestCompleted = !0)
  50842. }, e.prototype._onPositionChanged = function (e) {
  50843. this.occurrencesHighlight && 3 === e.reason ? this._run() : this._stopAll()
  50844. }, e.prototype._run = function () {
  50845. var e = this, t = this.editor.getSelection();
  50846. if (t.startLineNumber === t.endLineNumber) {
  50847. var n = t.startLineNumber, i = t.startColumn, o = t.endColumn,
  50848. r = this.model.getWordAtPosition({lineNumber: n, column: i});
  50849. if (!r || r.startColumn > i || r.endColumn < o) this._stopAll(); else {
  50850. var s, l, u,
  50851. d = this.workerRequest && this.workerRequest.isValid(this.model, t, this._decorationIds);
  50852. if (this.lastCursorPositionChangeTime = (new Date).getTime(), d) this.workerRequestCompleted && -1 !== this.renderDecorationsTimer && (clearTimeout(this.renderDecorationsTimer), this.renderDecorationsTimer = -1, this._beginRenderDecorations()); else {
  50853. this._stopAll();
  50854. var c = ++this.workerRequestTokenId;
  50855. this.workerRequestCompleted = !1, this.workerRequest = (s = this.model, l = this.editor.getSelection(), u = this.editor.getOption(96), m.DocumentHighlightProviderRegistry.has(s) ? new I(s, l, u) : new M(s, l, u)), this.workerRequest.result.then((function (t) {
  50856. c === e.workerRequestTokenId && (e.workerRequestCompleted = !0, e.workerRequestValue = t || [], e._beginRenderDecorations())
  50857. }), a.onUnexpectedError)
  50858. }
  50859. }
  50860. } else this._stopAll()
  50861. }, e.prototype._beginRenderDecorations = function () {
  50862. var e = this, t = (new Date).getTime(), n = this.lastCursorPositionChangeTime + 250;
  50863. t >= n ? (this.renderDecorationsTimer = -1, this.renderDecorations()) : this.renderDecorationsTimer = setTimeout((function () {
  50864. e.renderDecorations()
  50865. }), n - t)
  50866. }, e.prototype.renderDecorations = function () {
  50867. this.renderDecorationsTimer = -1;
  50868. for (var t = [], n = 0, i = this.workerRequestValue.length; n < i; n++) {
  50869. var o = this.workerRequestValue[n];
  50870. t.push({range: o.range, options: e._getDecorationOptions(o.kind)})
  50871. }
  50872. this._decorationIds = this.editor.deltaDecorations(this._decorationIds, t), this._hasWordHighlights.set(this.hasDecorations())
  50873. }, e._getDecorationOptions = function (e) {
  50874. return e === m.DocumentHighlightKind.Write ? this._WRITE_OPTIONS : e === m.DocumentHighlightKind.Text ? this._TEXT_OPTIONS : this._REGULAR_OPTIONS
  50875. }, e.prototype.dispose = function () {
  50876. this._stopAll(), this.toUnhook.dispose()
  50877. }, e._WRITE_OPTIONS = f.ModelDecorationOptions.register({
  50878. stickiness: 1,
  50879. className: "wordHighlightStrong",
  50880. overviewRuler: {color: y.themeColorFromId(L), position: p.OverviewRulerLane.Center}
  50881. }),
  50882. e._TEXT_OPTIONS = f.ModelDecorationOptions.register({
  50883. stickiness: 1,
  50884. className: "selectionHighlight",
  50885. overviewRuler: {
  50886. color: y.themeColorFromId(_.overviewRulerSelectionHighlightForeground),
  50887. position: p.OverviewRulerLane.Center
  50888. }
  50889. }), e._REGULAR_OPTIONS = f.ModelDecorationOptions.register({
  50890. stickiness: 1,
  50891. className: "wordHighlight",
  50892. overviewRuler: {color: y.themeColorFromId(E), position: p.OverviewRulerLane.Center}
  50893. }), e
  50894. }(), T = function (e) {
  50895. function t(t, n) {
  50896. var i = e.call(this) || this;
  50897. i.wordHighligher = null;
  50898. var o = function () {
  50899. t.hasModel() && (i.wordHighligher = new k(t, n))
  50900. };
  50901. return i._register(t.onDidChangeModel((function (e) {
  50902. i.wordHighligher && (i.wordHighligher.dispose(), i.wordHighligher = null), o()
  50903. }))), o(), i
  50904. }
  50905. return r(t, e), t.get = function (e) {
  50906. return e.getContribution(t.ID)
  50907. }, t.prototype.saveViewState = function () {
  50908. return !(!this.wordHighligher || !this.wordHighligher.hasDecorations())
  50909. }, t.prototype.moveNext = function () {
  50910. this.wordHighligher && this.wordHighligher.moveNext()
  50911. }, t.prototype.moveBack = function () {
  50912. this.wordHighligher && this.wordHighligher.moveBack()
  50913. },
  50914. t.prototype.restoreViewState = function (e) {
  50915. this.wordHighligher && e && this.wordHighligher.restore()
  50916. }, t.prototype.dispose = function () {
  50917. this.wordHighligher && (this.wordHighligher.dispose(), this.wordHighligher = null), e.prototype.dispose.call(this)
  50918. }, t.ID = "editor.contrib.wordHighlighter", t = h([g(1, v.IContextKeyService)], t)
  50919. }(l.Disposable), R = function (e) {
  50920. function t(t, n) {
  50921. var i = e.call(this, n) || this;
  50922. return i._isNext = t, i
  50923. }
  50924. return r(t, e), t.prototype.run = function (e, t) {
  50925. var n = T.get(t);
  50926. n && (this._isNext ? n.moveNext() : n.moveBack())
  50927. }, t
  50928. }(u.EditorAction), O = function (e) {
  50929. function t() {
  50930. return e.call(this, !0, {
  50931. id: "editor.action.wordHighlight.next",
  50932. label: n.localize(6, null),
  50933. alias: "Go to Next Symbol Highlight",
  50934. precondition: D,
  50935. kbOpts: {kbExpr: c.EditorContextKeys.editorTextFocus, primary: 65, weight: 100}
  50936. }) || this
  50937. }
  50938. return r(t, e), t
  50939. }(R), P = function (e) {
  50940. function t() {
  50941. return e.call(this, !1, {
  50942. id: "editor.action.wordHighlight.prev",
  50943. label: n.localize(7, null),
  50944. alias: "Go to Previous Symbol Highlight",
  50945. precondition: D,
  50946. kbOpts: {
  50947. kbExpr: c.EditorContextKeys.editorTextFocus, primary: 1089,
  50948. weight: 100
  50949. }
  50950. }) || this
  50951. }
  50952. return r(t, e), t
  50953. }(R), A = function (e) {
  50954. function t() {
  50955. return e.call(this, {
  50956. id: "editor.action.wordHighlight.trigger",
  50957. label: n.localize(8, null),
  50958. alias: "Trigger Symbol Highlight",
  50959. precondition: D.toNegated(),
  50960. kbOpts: {kbExpr: c.EditorContextKeys.editorTextFocus, primary: 0, weight: 100}
  50961. }) || this
  50962. }
  50963. return r(t, e), t.prototype.run = function (e, t, n) {
  50964. var i = T.get(t);
  50965. i && i.restoreViewState(!0)
  50966. }, t
  50967. }(u.EditorAction);
  50968. u.registerEditorContribution(T.ID, T), u.registerEditorAction(O), u.registerEditorAction(P), u.registerEditorAction(A), y.registerThemingParticipant((function (e, t) {
  50969. var n = e.getColor(_.editorSelectionHighlight);
  50970. n && (t.addRule(".monaco-editor .focused .selectionHighlight { background-color: " + n + "; }"), t.addRule(".monaco-editor .selectionHighlight { background-color: " + n.transparent(.5) + "; }"));
  50971. var i = e.getColor(C);
  50972. i && t.addRule(".monaco-editor .wordHighlight { background-color: " + i + "; }");
  50973. var o = e.getColor(b);
  50974. o && t.addRule(".monaco-editor .wordHighlightStrong { background-color: " + o + "; }")
  50975. ;var r = e.getColor(_.editorSelectionHighlightBorder);
  50976. r && t.addRule(".monaco-editor .selectionHighlight { border: 1px " + ("hc" === e.type ? "dotted" : "solid") + " " + r + "; box-sizing: border-box; }");
  50977. var s = e.getColor(S);
  50978. s && t.addRule(".monaco-editor .wordHighlight { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + s + "; box-sizing: border-box; }");
  50979. var a = e.getColor(w);
  50980. a && t.addRule(".monaco-editor .wordHighlightStrong { border: 1px " + ("hc" === e.type ? "dashed" : "solid") + " " + a + "; box-sizing: border-box; }")
  50981. }))
  50982. })), define(n[587], i([0, 1, 24, 6, 28, 134, 50, 47, 2, 16, 5, 25, 12, 23, 225, 18, 11, 34, 51, 20, 14, 59, 325]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E) {
  50983. "use strict";
  50984. Object.defineProperty(t, "__esModule", {value: !0});
  50985. var L = new _.RawContextKey("accessibilityHelpWidgetVisible", !1), D = function (e) {
  50986. function t(t, n) {
  50987. var i = e.call(this) || this;
  50988. return i._editor = t, i._widget = i._register(n.createInstance(N, i._editor)), i
  50989. }
  50990. return r(t, e), t.get = function (e) {
  50991. return e.getContribution(t.ID)
  50992. }, t.prototype.show = function () {
  50993. this._widget.show()
  50994. },
  50995. t.prototype.hide = function () {
  50996. this._widget.hide()
  50997. }, t.ID = "editor.contrib.accessibilityHelpController", t = h([g(1, y.IInstantiationService)], t)
  50998. }(u.Disposable);
  50999. var N = function (e) {
  51000. function t(t, n, r, s) {
  51001. var l = e.call(this) || this;
  51002. return l._contextKeyService = n, l._keybindingService = r, l._openerService = s, l._editor = t, l._isVisibleKey = L.bindTo(l._contextKeyService), l._domNode = o.createFastDomNode(document.createElement("div")), l._domNode.setClassName("accessibilityHelpWidget"), l._domNode.setDisplay("none"), l._domNode.setAttribute("role", "dialog"), l._domNode.setAttribute("aria-hidden", "true"), l._contentDomNode = o.createFastDomNode(document.createElement("div")), l._contentDomNode.setAttribute("role", "document"), l._domNode.appendChild(l._contentDomNode), l._isVisible = !1, l._register(l._editor.onDidLayoutChange((function () {
  51003. l._isVisible && l._layout()
  51004. }))), l._register(i.addStandardDisposableListener(l._contentDomNode.domNode, "keydown", (function (e) {
  51005. if (l._isVisible && (e.equals(2083) && (a.alert(E.AccessibilityHelpNLS.emergencyConfOn),
  51006. l._editor.updateOptions({accessibilitySupport: "on"}), i.clearNode(l._contentDomNode.domNode), l._buildContent(), l._contentDomNode.domNode.focus(), e.preventDefault(), e.stopPropagation()), e.equals(2086))) {
  51007. a.alert(E.AccessibilityHelpNLS.openingDocs);
  51008. var t = l._editor.getRawOptions().accessibilityHelpUrl;
  51009. void 0 === t && (t = "https://go.microsoft.com/fwlink/?linkid=852450"), l._openerService.open(p.URI.parse(t)), e.preventDefault(), e.stopPropagation()
  51010. }
  51011. }))), l.onblur(l._contentDomNode.domNode, (function () {
  51012. l.hide()
  51013. })), l._editor.addOverlayWidget(l), l
  51014. }
  51015. return r(t, e), t.prototype.dispose = function () {
  51016. this._editor.removeOverlayWidget(this), e.prototype.dispose.call(this)
  51017. }, t.prototype.getId = function () {
  51018. return t.ID
  51019. }, t.prototype.getDomNode = function () {
  51020. return this._domNode.domNode
  51021. }, t.prototype.getPosition = function () {
  51022. return {preference: null}
  51023. }, t.prototype.show = function () {
  51024. this._isVisible || (this._isVisible = !0, this._isVisibleKey.set(!0), this._layout(), this._domNode.setDisplay("block"), this._domNode.setAttribute("aria-hidden", "false"),
  51025. this._contentDomNode.domNode.tabIndex = 0, this._buildContent(), this._contentDomNode.domNode.focus())
  51026. }, t.prototype._descriptionForCommand = function (e, t, n) {
  51027. var i = this._keybindingService.lookupKeybinding(e);
  51028. return i ? c.format(t, i.getAriaLabel()) : c.format(n, e)
  51029. }, t.prototype._buildContent = function () {
  51030. var e = this._editor.getOptions(), t = this._editor.getSelections(), n = 0;
  51031. if (t) {
  51032. var i = this._editor.getModel();
  51033. i && t.forEach((function (e) {
  51034. n += i.getValueLengthInRange(e)
  51035. }))
  51036. }
  51037. var o = function (e, t) {
  51038. return e && 0 !== e.length ? 1 === e.length ? t ? c.format(E.AccessibilityHelpNLS.singleSelectionRange, e[0].positionLineNumber, e[0].positionColumn, t) : c.format(E.AccessibilityHelpNLS.singleSelection, e[0].positionLineNumber, e[0].positionColumn) : t ? c.format(E.AccessibilityHelpNLS.multiSelectionRange, e.length, t) : e.length > 0 ? c.format(E.AccessibilityHelpNLS.multiSelection, e.length) : "" : E.AccessibilityHelpNLS.noSelection
  51039. }(t, n)
  51040. ;e.get(45) ? e.get(68) ? o += E.AccessibilityHelpNLS.readonlyDiffEditor : o += E.AccessibilityHelpNLS.editableDiffEditor : e.get(68) ? o += E.AccessibilityHelpNLS.readonlyEditor : o += E.AccessibilityHelpNLS.editableEditor;
  51041. var r = d.isMacintosh ? E.AccessibilityHelpNLS.changeConfigToOnMac : E.AccessibilityHelpNLS.changeConfigToOnWinLinux;
  51042. switch (e.get(2)) {
  51043. case 0:
  51044. o += "\n\n - " + r;
  51045. break;
  51046. case 2:
  51047. o += "\n\n - " + E.AccessibilityHelpNLS.auto_on;
  51048. break;
  51049. case 1:
  51050. o += "\n\n - " + E.AccessibilityHelpNLS.auto_off, o += " " + r
  51051. }
  51052. e.get(106) ? o += "\n\n - " + this._descriptionForCommand(v.ToggleTabFocusModeAction.ID, E.AccessibilityHelpNLS.tabFocusModeOnMsg, E.AccessibilityHelpNLS.tabFocusModeOnMsgNoKb) : o += "\n\n - " + this._descriptionForCommand(v.ToggleTabFocusModeAction.ID, E.AccessibilityHelpNLS.tabFocusModeOffMsg, E.AccessibilityHelpNLS.tabFocusModeOffMsgNoKb), o += "\n\n - " + (d.isMacintosh ? E.AccessibilityHelpNLS.openDocMac : E.AccessibilityHelpNLS.openDocWinLinux), o += "\n\n" + E.AccessibilityHelpNLS.outroMsg, this._contentDomNode.domNode.appendChild(s.renderFormattedText(o)),
  51053. this._contentDomNode.domNode.setAttribute("aria-label", o)
  51054. }, t.prototype.hide = function () {
  51055. this._isVisible && (this._isVisible = !1, this._isVisibleKey.reset(), this._domNode.setDisplay("none"), this._domNode.setAttribute("aria-hidden", "true"), this._contentDomNode.domNode.tabIndex = -1, i.clearNode(this._contentDomNode.domNode), this._editor.focus())
  51056. }, t.prototype._layout = function () {
  51057. var e = this._editor.getLayoutInfo(), n = Math.max(5, Math.min(t.WIDTH, e.width - 40)),
  51058. i = Math.max(5, Math.min(t.HEIGHT, e.height - 40));
  51059. this._domNode.setWidth(n), this._domNode.setHeight(i);
  51060. var o = Math.round((e.height - i) / 2);
  51061. this._domNode.setTop(o);
  51062. var r = Math.round((e.width - n) / 2);
  51063. this._domNode.setLeft(r)
  51064. }, t.ID = "editor.contrib.accessibilityHelpWidget", t.WIDTH = 500, t.HEIGHT = 300, t = h([g(1, _.IContextKeyService), g(2, C.IKeybindingService), g(3, b.IOpenerService)], t)
  51065. }(l.Widget), x = function (e) {
  51066. function t() {
  51067. return e.call(this, {
  51068. id: "editor.action.showAccessibilityHelp",
  51069. label: E.AccessibilityHelpNLS.showAccessibilityHelpAction,
  51070. alias: "Show Accessibility Help",
  51071. precondition: void 0,
  51072. kbOpts: {kbExpr: m.EditorContextKeys.focus, primary: n.isIE ? 2107 : 571, weight: 100}
  51073. }) || this
  51074. }
  51075. return r(t, e), t.prototype.run = function (e, t) {
  51076. var n = D.get(t);
  51077. n && n.show()
  51078. }, t
  51079. }(f.EditorAction);
  51080. f.registerEditorContribution(D.ID, D), f.registerEditorAction(x);
  51081. var I = f.EditorCommand.bindToContribution(D.get);
  51082. f.registerEditorCommand(new I({
  51083. id: "closeAccessibilityHelp", precondition: L, handler: function (e) {
  51084. return e.hide()
  51085. }, kbOpts: {weight: 200, kbExpr: m.EditorContextKeys.focus, primary: 9, secondary: [1033]}
  51086. })), w.registerThemingParticipant((function (e, t) {
  51087. var n = e.getColor(S.editorWidgetBackground);
  51088. n && t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: " + n + "; }");
  51089. var i = e.getColor(S.editorWidgetForeground);
  51090. i && t.addRule(".monaco-editor .accessibilityHelpWidget { color: " + i + "; }");
  51091. var o = e.getColor(S.widgetShadow);
  51092. o && t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px " + o + "; }");
  51093. var r = e.getColor(S.contrastBorder);
  51094. r && t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid " + r + "; }")
  51095. }))
  51096. })),
  51097. define(n[588], i([0, 1, 27, 2, 5, 12, 17, 63, 71, 94, 20, 14, 59, 327]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f) {
  51098. "use strict";
  51099. Object.defineProperty(t, "__esModule", {value: !0});
  51100. var m = function (e) {
  51101. function t(t, n, i) {
  51102. var o = e.call(this) || this;
  51103. return o._editor = t, o._modeService = i, o._widget = null, o._register(o._editor.onDidChangeModel((function (e) {
  51104. return o.stop()
  51105. }))), o._register(o._editor.onDidChangeModelLanguage((function (e) {
  51106. return o.stop()
  51107. }))), o._register(a.TokenizationRegistry.onDidChange((function (e) {
  51108. return o.stop()
  51109. }))), o
  51110. }
  51111. return r(t, e), t.get = function (e) {
  51112. return e.getContribution(t.ID)
  51113. }, t.prototype.dispose = function () {
  51114. this.stop(), e.prototype.dispose.call(this)
  51115. }, t.prototype.launch = function () {
  51116. this._widget || this._editor.hasModel() && (this._widget = new _(this._editor, this._modeService))
  51117. }, t.prototype.stop = function () {
  51118. this._widget && (this._widget.dispose(), this._widget = null)
  51119. }, t.ID = "editor.contrib.inspectTokens", t = h([g(1, d.IStandaloneThemeService), g(2, u.IModeService)], t)
  51120. }(i.Disposable), v = function (e) {
  51121. function t() {
  51122. return e.call(this, {
  51123. id: "editor.action.inspectTokens",
  51124. label: f.InspectTokensNLS.inspectTokensAction,
  51125. alias: "Developer: Inspect Tokens",
  51126. precondition: void 0
  51127. }) || this
  51128. }
  51129. return r(t, e), t.prototype.run = function (e, t) {
  51130. var n = m.get(t);
  51131. n && n.launch()
  51132. }, t
  51133. }(s.EditorAction);
  51134. var _ = function (e) {
  51135. function t(t, n) {
  51136. var i, o = e.call(this) || this;
  51137. return o.allowEditorOverflow = !0, o._editor = t, o._modeService = n, o._model = o._editor.getModel(), o._domNode = document.createElement("div"), o._domNode.className = "tokens-inspect-widget", o._tokenizationSupport = (i = o._model.getLanguageIdentifier(), a.TokenizationRegistry.get(i.language) || {
  51138. getInitialState: function () {
  51139. return l.NULL_STATE
  51140. }, tokenize: function (e, t, n) {
  51141. return l.nullTokenize(i.language, e, t, n)
  51142. }, tokenize2: function (e, t, n) {
  51143. return l.nullTokenize2(i.id, e, t, n)
  51144. }
  51145. }), o._compute(o._editor.getPosition()), o._register(o._editor.onDidChangeCursorPosition((function (e) {
  51146. return o._compute(o._editor.getPosition())
  51147. }))), o._editor.addContentWidget(o), o
  51148. }
  51149. return r(t, e), t.prototype.dispose = function () {
  51150. this._editor.removeContentWidget(this),
  51151. e.prototype.dispose.call(this)
  51152. }, t.prototype.getId = function () {
  51153. return t._ID
  51154. }, t.prototype._compute = function (e) {
  51155. for (var t = this._getTokensAtLine(e.lineNumber), i = 0, r = t.tokens1.length - 1; r >= 0; r--) {
  51156. var s = t.tokens1[r];
  51157. if (e.column - 1 >= s.offset) {
  51158. i = r;
  51159. break
  51160. }
  51161. }
  51162. var a = 0;
  51163. for (r = t.tokens2.length >>> 1; r >= 0; r--) if (e.column - 1 >= t.tokens2[r << 1]) {
  51164. a = r;
  51165. break
  51166. }
  51167. var l = "", u = this._model.getLineContent(e.lineNumber), d = "";
  51168. if (i < t.tokens1.length) {
  51169. var c = t.tokens1[i].offset, h = i + 1 < t.tokens1.length ? t.tokens1[i + 1].offset : u.length;
  51170. d = u.substring(c, h)
  51171. }
  51172. l += '<h2 class="tm-token">' + function (e) {
  51173. for (var t = "", n = 0, i = e.length; n < i; n++) {
  51174. var o = e.charCodeAt(n);
  51175. switch (o) {
  51176. case 9:
  51177. t += "&rarr;";
  51178. break;
  51179. case 32:
  51180. t += "&middot;";
  51181. break;
  51182. case 60:
  51183. t += "&lt;";
  51184. break;
  51185. case 62:
  51186. t += "&gt;";
  51187. break;
  51188. case 38:
  51189. t += "&amp;";
  51190. break;
  51191. default:
  51192. t += String.fromCharCode(o)
  51193. }
  51194. }
  51195. return t
  51196. }(d) + '<span class="tm-token-length">(' + d.length + " " + (1 === d.length ? "char" : "chars") + ")</span></h2>", l += '<hr class="tokens-inspect-separator" style="clear:both"/>';
  51197. var p = this._decodeMetadata(t.tokens2[1 + (a << 1)])
  51198. ;l += '<table class="tm-metadata-table"><tbody>', l += '<tr><td class="tm-metadata-key">language</td><td class="tm-metadata-value">' + o.escape(p.languageIdentifier.language) + "</td>", l += '<tr><td class="tm-metadata-key">token type</td><td class="tm-metadata-value">' + this._tokenTypeToString(p.tokenType) + "</td>", l += '<tr><td class="tm-metadata-key">font style</td><td class="tm-metadata-value">' + this._fontStyleToString(p.fontStyle) + "</td>", l += '<tr><td class="tm-metadata-key">foreground</td><td class="tm-metadata-value">' + n.Color.Format.CSS.formatHex(p.foreground) + "</td>", l += '<tr><td class="tm-metadata-key">background</td><td class="tm-metadata-value">' + n.Color.Format.CSS.formatHex(p.background) + "</td>", l += "</tbody></table>", l += '<hr class="tokens-inspect-separator"/>', i < t.tokens1.length && (l += '<span class="tm-token-type">' + o.escape(t.tokens1[i].type) + "</span>"), this._domNode.innerHTML = l, this._editor.layoutContentWidget(this)
  51199. }, t.prototype._decodeMetadata = function (e) {
  51200. var t = a.TokenizationRegistry.getColorMap(), n = a.TokenMetadata.getLanguageId(e),
  51201. i = a.TokenMetadata.getTokenType(e), o = a.TokenMetadata.getFontStyle(e),
  51202. r = a.TokenMetadata.getForeground(e), s = a.TokenMetadata.getBackground(e);
  51203. return {
  51204. languageIdentifier: this._modeService.getLanguageIdentifier(n),
  51205. tokenType: i,
  51206. fontStyle: o,
  51207. foreground: t[r],
  51208. background: t[s]
  51209. }
  51210. }, t.prototype._tokenTypeToString = function (e) {
  51211. switch (e) {
  51212. case 0:
  51213. return "Other";
  51214. case 1:
  51215. return "Comment";
  51216. case 2:
  51217. return "String";
  51218. case 4:
  51219. return "RegEx"
  51220. }
  51221. return "??"
  51222. }, t.prototype._fontStyleToString = function (e) {
  51223. var t = "";
  51224. return 1 & e && (t += "italic "), 2 & e && (t += "bold "), 4 & e && (t += "underline "), 0 === t.length && (t = "---"), t
  51225. }, t.prototype._getTokensAtLine = function (e) {
  51226. var t = this._getStateBeforeLine(e),
  51227. n = this._tokenizationSupport.tokenize(this._model.getLineContent(e), t, 0),
  51228. i = this._tokenizationSupport.tokenize2(this._model.getLineContent(e), t, 0);
  51229. return {startState: t, tokens1: n.tokens, tokens2: i.tokens, endState: n.endState}
  51230. }, t.prototype._getStateBeforeLine = function (e) {
  51231. for (var t = this._tokenizationSupport.getInitialState(), n = 1; n < e; n++) {
  51232. t = this._tokenizationSupport.tokenize(this._model.getLineContent(n), t, 0).endState
  51233. }
  51234. return t
  51235. }, t.prototype.getDomNode = function () {
  51236. return this._domNode
  51237. }, t.prototype.getPosition = function () {
  51238. return {position: this._editor.getPosition(), preference: [2, 1]}
  51239. }, t._ID = "editor.contrib.inspectTokensWidget", t
  51240. }(i.Disposable);
  51241. s.registerEditorContribution(m.ID, m), s.registerEditorAction(v), p.registerThemingParticipant((function (e, t) {
  51242. var n = e.getColor(c.editorHoverBorder);
  51243. if (n) {
  51244. var i = e.type === p.HIGH_CONTRAST ? 2 : 1;
  51245. t.addRule(".monaco-editor .tokens-inspect-widget { border: " + i + "px solid " + n + "; }"), t.addRule(".monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: " + n + "; }")
  51246. }
  51247. var o = e.getColor(c.editorHoverBackground);
  51248. o && t.addRule(".monaco-editor .tokens-inspect-widget { background-color: " + o + "; }");
  51249. var r = e.getColor(c.editorHoverForeground);
  51250. r && t.addRule(".monaco-editor .tokens-inspect-widget { color: " + r + "; }")
  51251. }))
  51252. })),
  51253. define(n[169], i([0, 1, 12, 30, 546, 14, 328]), (function (e, t, n, i, o, s) {
  51254. "use strict";
  51255. Object.defineProperty(t, "__esModule", {value: !0});
  51256. var a = function () {
  51257. function e(e, t) {
  51258. this.themeService = t, this.widget = null, this.rangeHighlightDecorationId = null, this.lastKnownEditorSelection = null, this.editor = e
  51259. }
  51260. return e.get = function (t) {
  51261. return t.getContribution(e.ID)
  51262. }, e.prototype.dispose = function () {
  51263. this.widget && (this.widget.destroy(), this.widget = null)
  51264. }, e.prototype.run = function (e) {
  51265. var t = this;
  51266. this.widget && (this.widget.destroy(), this.widget = null);
  51267. var n = function (e) {
  51268. t.clearDecorations(), e && t.lastKnownEditorSelection && (t.editor.setSelection(t.lastKnownEditorSelection), t.editor.revealRangeInCenterIfOutsideViewport(t.lastKnownEditorSelection, 0)), t.lastKnownEditorSelection = null, document.activeElement !== document.body && e || t.editor.focus()
  51269. };
  51270. this.widget = new o.QuickOpenEditorWidget(this.editor, (function () {
  51271. return n(!1)
  51272. }), (function () {
  51273. return n(!0)
  51274. }), (function (n) {
  51275. t.widget.setInput(e.getModel(n), e.getAutoFocus(n))
  51276. }), {
  51277. inputAriaLabel: e.inputAriaLabel
  51278. }, this.themeService), this.lastKnownEditorSelection || (this.lastKnownEditorSelection = this.editor.getSelection()), this.widget.show("")
  51279. }, e.prototype.decorateLine = function (t, n) {
  51280. var i = [];
  51281. this.rangeHighlightDecorationId && (i.push(this.rangeHighlightDecorationId), this.rangeHighlightDecorationId = null);
  51282. var o = [{range: t, options: e._RANGE_HIGHLIGHT_DECORATION}], r = n.deltaDecorations(i, o);
  51283. this.rangeHighlightDecorationId = r[0]
  51284. }, e.prototype.clearDecorations = function () {
  51285. this.rangeHighlightDecorationId && (this.editor.deltaDecorations([this.rangeHighlightDecorationId], []), this.rangeHighlightDecorationId = null)
  51286. }, e.ID = "editor.controller.quickOpenController", e._RANGE_HIGHLIGHT_DECORATION = i.ModelDecorationOptions.register({
  51287. className: "rangeHighlight",
  51288. isWholeLine: !0
  51289. }), e = h([g(1, s.IThemeService)], e)
  51290. }();
  51291. t.QuickOpenController = a;
  51292. var l = function (e) {
  51293. function t(t, n) {
  51294. var i = e.call(this, n) || this;
  51295. return i._inputAriaLabel = t, i
  51296. }
  51297. return r(t, e), t.prototype.getController = function (e) {
  51298. return a.get(e)
  51299. }, t.prototype._show = function (e, t) {
  51300. e.run({
  51301. inputAriaLabel: this._inputAriaLabel, getModel: function (e) {
  51302. return t.getModel(e)
  51303. }, getAutoFocus: function (e) {
  51304. return t.getAutoFocus(e)
  51305. }
  51306. })
  51307. }, t
  51308. }(n.EditorAction);
  51309. t.BaseEditorQuickOpenAction = l, n.registerEditorContribution(a.ID, a)
  51310. })), define(n[589], i([0, 1, 5, 155, 108, 12, 13, 3, 23, 169, 59, 329]), (function (e, t, n, i, o, s, a, l, u, d, c) {
  51311. "use strict";
  51312. Object.defineProperty(t, "__esModule", {value: !0});
  51313. var h = function (e) {
  51314. function t(t, n, i) {
  51315. var o = e.call(this) || this;
  51316. return o.editor = n, o.decorator = i, o.parseResult = o.parseInput(t), o
  51317. }
  51318. return r(t, e), t.prototype.parseInput = function (e) {
  51319. var t, i, r = e.split(",").map((function (e) {
  51320. return parseInt(e, 10)
  51321. })).filter((function (e) {
  51322. return !isNaN(e)
  51323. }));
  51324. if (t = 0 === r.length ? new a.Position(-1, -1) : 1 === r.length ? new a.Position(r[0], 1) : new a.Position(r[0], r[1]), o.isCodeEditor(this.editor)) i = this.editor.getModel(); else {
  51325. var s = this.editor.getModel();
  51326. i = s ? s.modified : null
  51327. }
  51328. var l = !!i && i.validatePosition(t).equals(t);
  51329. return {
  51330. position: t, isValid: l,
  51331. label: l ? t.column && t.column > 1 ? n.format(c.GoToLineNLS.gotoLineLabelValidLineAndColumn, t.lineNumber, t.column) : n.format(c.GoToLineNLS.gotoLineLabelValidLine, t.lineNumber) : t.lineNumber < 1 || t.lineNumber > (i ? i.getLineCount() : 0) ? n.format(c.GoToLineNLS.gotoLineLabelEmptyWithLineLimit, i ? i.getLineCount() : 0) : n.format(c.GoToLineNLS.gotoLineLabelEmptyWithLineAndColumnLimit, i ? i.getLineMaxColumn(t.lineNumber) : 0)
  51332. }
  51333. }, t.prototype.getLabel = function () {
  51334. return this.parseResult.label
  51335. }, t.prototype.getAriaLabel = function () {
  51336. var e = this.editor.getPosition(), t = e ? e.lineNumber : 0;
  51337. return n.format(c.GoToLineNLS.gotoLineAriaLabel, t, this.parseResult.label)
  51338. }, t.prototype.run = function (e, t) {
  51339. return 1 === e ? this.runOpen() : this.runPreview()
  51340. }, t.prototype.runOpen = function () {
  51341. if (!this.parseResult.isValid) return !1;
  51342. var e = this.toSelection();
  51343. return this.editor.setSelection(e), this.editor.revealRangeInCenter(e, 0), this.editor.focus(), !0
  51344. }, t.prototype.runPreview = function () {
  51345. if (!this.parseResult.isValid) return this.decorator.clearDecorations(), !1;
  51346. var e = this.toSelection()
  51347. ;
  51348. return this.editor.revealRangeInCenter(e, 0), this.decorator.decorateLine(e, this.editor), !1
  51349. }, t.prototype.toSelection = function () {
  51350. return new l.Range(this.parseResult.position.lineNumber, this.parseResult.position.column, this.parseResult.position.lineNumber, this.parseResult.position.column)
  51351. }, t
  51352. }(i.QuickOpenEntry);
  51353. t.GotoLineEntry = h;
  51354. var p = function (e) {
  51355. function t() {
  51356. return e.call(this, c.GoToLineNLS.gotoLineActionInput, {
  51357. id: "editor.action.gotoLine",
  51358. label: c.GoToLineNLS.gotoLineActionLabel,
  51359. alias: "Go to Line...",
  51360. precondition: void 0,
  51361. kbOpts: {kbExpr: u.EditorContextKeys.focus, primary: 2085, mac: {primary: 293}, weight: 100}
  51362. }) || this
  51363. }
  51364. return r(t, e), t.prototype.run = function (e, t) {
  51365. var n = this;
  51366. this._show(this.getController(t), {
  51367. getModel: function (e) {
  51368. return new i.QuickOpenModel([new h(e, t, n.getController(t))])
  51369. }, getAutoFocus: function (e) {
  51370. return {autoFocusFirstEntry: e.length > 0}
  51371. }
  51372. })
  51373. }, t
  51374. }(d.BaseEditorQuickOpenAction);
  51375. t.GotoLineAction = p, s.registerEditorAction(p)
  51376. })), define(n[590], i([0, 1, 5, 24, 10, 61, 155, 12, 23, 169, 34, 59]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
  51377. "use strict";
  51378. Object.defineProperty(t, "__esModule", {value: !0});
  51379. var p = function (e) {
  51380. function t(t, n, i, o, r) {
  51381. var s = e.call(this) || this;
  51382. return s.key = t, s.keyAriaLabel = n, s.setHighlights(i), s.action = o, s.editor = r, s
  51383. }
  51384. return r(t, e), t.prototype.getLabel = function () {
  51385. return this.action.label
  51386. }, t.prototype.getAriaLabel = function () {
  51387. return this.keyAriaLabel ? n.format(h.QuickCommandNLS.ariaLabelEntryWithKey, this.getLabel(), this.keyAriaLabel) : n.format(h.QuickCommandNLS.ariaLabelEntry, this.getLabel())
  51388. }, t.prototype.getGroupLabel = function () {
  51389. return this.key
  51390. }, t.prototype.run = function (e, t) {
  51391. var n = this;
  51392. return 1 === e && (setTimeout((function () {
  51393. n.editor.focus();
  51394. try {
  51395. (n.action.run() || Promise.resolve()).then(void 0, o.onUnexpectedError)
  51396. } catch (e) {
  51397. o.onUnexpectedError(e)
  51398. }
  51399. }), 50), !0)
  51400. }, t
  51401. }(a.QuickOpenEntryGroup);
  51402. t.EditorActionCommandEntry = p;
  51403. var g = function (e) {
  51404. function t() {
  51405. return e.call(this, h.QuickCommandNLS.quickCommandActionInput, {
  51406. id: "editor.action.quickCommand",
  51407. label: h.QuickCommandNLS.quickCommandActionLabel,
  51408. alias: "Command Palette",
  51409. precondition: void 0,
  51410. kbOpts: {kbExpr: u.EditorContextKeys.focus, primary: i.isIE ? 571 : 59, weight: 100},
  51411. contextMenuOpts: {group: "z_commands", order: 1}
  51412. }) || this
  51413. }
  51414. return r(t, e), t.prototype.run = function (e, t) {
  51415. var n = this, i = e.get(c.IKeybindingService);
  51416. this._show(this.getController(t), {
  51417. getModel: function (e) {
  51418. return new a.QuickOpenModel(n._editorActionsToEntries(i, t, e))
  51419. }, getAutoFocus: function (e) {
  51420. return {autoFocusFirstEntry: !0, autoFocusPrefixMatch: e}
  51421. }
  51422. })
  51423. }, t.prototype._sort = function (e, t) {
  51424. var n = (e.getLabel() || "").toLowerCase(), i = (t.getLabel() || "").toLowerCase();
  51425. return n.localeCompare(i)
  51426. }, t.prototype._editorActionsToEntries = function (e, t, n) {
  51427. for (var i = [], o = 0, r = t.getSupportedActions(); o < r.length; o++) {
  51428. var a = r[o], l = e.lookupKeybinding(a.id);
  51429. if (a.label) {
  51430. var u = s.matchesFuzzy(n, a.label);
  51431. u && i.push(new p(l && l.getLabel() || "", l && l.getAriaLabel() || "", u, a, t))
  51432. }
  51433. }
  51434. return i = i.sort(this._sort)
  51435. }, t
  51436. }(d.BaseEditorQuickOpenAction);
  51437. t.QuickCommandAction = g, l.registerEditorAction(g)
  51438. })),
  51439. define(n[591], i([0, 1, 26, 61, 5, 155, 12, 3, 23, 17, 496, 169, 59, 330, 183, 231]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p) {
  51440. "use strict";
  51441. Object.defineProperty(t, "__esModule", {value: !0});
  51442. var g = function (e) {
  51443. function t(t, n, i, o, r, s, a) {
  51444. var l = e.call(this) || this;
  51445. return l.name = t, l.type = n, l.description = i, l.range = o, l.setHighlights(r), l.editor = s, l.decorator = a, l
  51446. }
  51447. return r(t, e), t.prototype.getLabel = function () {
  51448. return this.name
  51449. }, t.prototype.getAriaLabel = function () {
  51450. return o.format(p.QuickOutlineNLS.entryAriaLabel, this.name)
  51451. }, t.prototype.getIcon = function () {
  51452. return this.type
  51453. }, t.prototype.getDescription = function () {
  51454. return this.description
  51455. }, t.prototype.getType = function () {
  51456. return this.type
  51457. }, t.prototype.getRange = function () {
  51458. return this.range
  51459. }, t.prototype.run = function (e, t) {
  51460. return 1 === e ? this.runOpen(t) : this.runPreview()
  51461. }, t.prototype.runOpen = function (e) {
  51462. var t = this.toSelection();
  51463. return this.editor.setSelection(t), this.editor.revealRangeInCenter(t, 0), this.editor.focus(), !0
  51464. }, t.prototype.runPreview = function () {
  51465. var e = this.toSelection()
  51466. ;
  51467. return this.editor.revealRangeInCenter(e, 0), this.decorator.decorateLine(this.range, this.editor), !1
  51468. }, t.prototype.toSelection = function () {
  51469. return new l.Range(this.range.startLineNumber, this.range.startColumn || 1, this.range.startLineNumber, this.range.startColumn || 1)
  51470. }, t
  51471. }(s.QuickOpenEntryGroup);
  51472. t.SymbolEntry = g;
  51473. var f = function (e) {
  51474. function t() {
  51475. return e.call(this, p.QuickOutlineNLS.quickOutlineActionInput, {
  51476. id: "editor.action.quickOutline",
  51477. label: p.QuickOutlineNLS.quickOutlineActionLabel,
  51478. alias: "Go to Symbol...",
  51479. precondition: u.EditorContextKeys.hasDocumentSymbolProvider,
  51480. kbOpts: {kbExpr: u.EditorContextKeys.focus, primary: 3117, weight: 100},
  51481. contextMenuOpts: {group: "navigation", order: 3}
  51482. }) || this
  51483. }
  51484. return r(t, e), t.prototype.run = function (e, t) {
  51485. var i = this;
  51486. if (t.hasModel()) {
  51487. var o = t.getModel();
  51488. if (d.DocumentSymbolProviderRegistry.has(o)) return c.getDocumentSymbols(o, !0, n.CancellationToken.None).then((function (e) {
  51489. 0 !== e.length && i._run(t, e)
  51490. }))
  51491. }
  51492. }, t.prototype._run = function (e, t) {
  51493. var n = this;
  51494. this._show(this.getController(e), {
  51495. getModel: function (i) {
  51496. return new s.QuickOpenModel(n.toQuickOpenEntries(e, t, i))
  51497. }, getAutoFocus: function (e) {
  51498. return 0 === e.indexOf(":") && (e = e.substr(":".length)), {
  51499. autoFocusPrefixMatch: e,
  51500. autoFocusFirstEntry: !!e
  51501. }
  51502. }
  51503. })
  51504. }, t.prototype.symbolEntry = function (e, t, n, i, o, r, s) {
  51505. return new g(e, t, n, l.Range.lift(i), o, r, s)
  51506. }, t.prototype.toQuickOpenEntries = function (e, t, n) {
  51507. var r = this.getController(e), s = [], a = n;
  51508. 0 === n.indexOf(":") && (a = a.substr(":".length));
  51509. for (var l = 0, u = t; l < u.length; l++) {
  51510. var c = u[l], h = o.trim(c.name), g = i.matchesFuzzy(a, h);
  51511. if (g) {
  51512. var f = void 0;
  51513. c.containerName && (f = c.containerName), s.push(this.symbolEntry(h, d.SymbolKinds.toCssClassName(c.kind), f, c.range, g, e, r))
  51514. }
  51515. }
  51516. if (n && (s = 0 === n.indexOf(":") ? s.sort(this.sortScoped.bind(this, n.toLowerCase())) : s.sort(this.sortNormal.bind(this, n.toLowerCase()))), s.length > 0 && 0 === n.indexOf(":")) {
  51517. for (var m = null, v = null, _ = 0, y = 0; y < s.length; y++) {
  51518. var C = s[y];
  51519. m !== C.getType() ? (v && v.setGroupLabel(this.typeToLabel(m || "", _)), m = C.getType(), v = C, _ = 1, C.setShowBorder(y > 0)) : _++
  51520. }
  51521. v && v.setGroupLabel(this.typeToLabel(m || "", _))
  51522. } else s.length > 0 && s[0].setGroupLabel(o.format(p.QuickOutlineNLS._symbols_, s.length));
  51523. return s
  51524. }, t.prototype.typeToLabel = function (e, t) {
  51525. switch (e) {
  51526. case"module":
  51527. return o.format(p.QuickOutlineNLS._modules_, t);
  51528. case"class":
  51529. return o.format(p.QuickOutlineNLS._class_, t);
  51530. case"interface":
  51531. return o.format(p.QuickOutlineNLS._interface_, t);
  51532. case"method":
  51533. return o.format(p.QuickOutlineNLS._method_, t);
  51534. case"function":
  51535. return o.format(p.QuickOutlineNLS._function_, t);
  51536. case"property":
  51537. return o.format(p.QuickOutlineNLS._property_, t);
  51538. case"variable":
  51539. return o.format(p.QuickOutlineNLS._variable_, t);
  51540. case"var":
  51541. return o.format(p.QuickOutlineNLS._variable2_, t);
  51542. case"constructor":
  51543. return o.format(p.QuickOutlineNLS._constructor_, t);
  51544. case"call":
  51545. return o.format(p.QuickOutlineNLS._call_, t)
  51546. }
  51547. return e
  51548. }, t.prototype.sortNormal = function (e, t, n) {
  51549. var i = t.getLabel().toLowerCase(), o = n.getLabel().toLowerCase(), r = i.localeCompare(o);
  51550. if (0 !== r) return r;
  51551. var s = t.getRange(), a = n.getRange();
  51552. return s.startLineNumber - a.startLineNumber
  51553. }, t.prototype.sortScoped = function (e, t, n) {
  51554. e = e.substr(":".length);
  51555. var i = t.getType(), o = n.getType(), r = i.localeCompare(o);
  51556. if (0 !== r) return r;
  51557. if (e) {
  51558. var s = t.getLabel().toLowerCase(), a = n.getLabel().toLowerCase(), l = s.localeCompare(a);
  51559. if (0 !== l) return l
  51560. }
  51561. var u = t.getRange(), d = n.getRange();
  51562. return u.startLineNumber - d.startLineNumber
  51563. }, t
  51564. }(h.BaseEditorQuickOpenAction);
  51565. t.QuickOutlineAction = f, a.registerEditorAction(f)
  51566. })), define(n[592], i([0, 1, 6, 46, 548]), (function (e, t, n, i, o) {
  51567. "use strict";
  51568. Object.defineProperty(t, "__esModule", {value: !0});
  51569. var s = function (e) {
  51570. function t() {
  51571. return null !== e && e.apply(this, arguments) || this
  51572. }
  51573. return r(t, e), t.prototype.getActiveCodeEditor = function () {
  51574. return null
  51575. }, t.prototype.openCodeEditor = function (e, t, n) {
  51576. return t ? Promise.resolve(this.doOpenEditor(t, e)) : Promise.resolve(null)
  51577. }, t.prototype.doOpenEditor = function (e, t) {
  51578. if (!this.findModel(e, t.resource)) {
  51579. if (t.resource) {
  51580. var o = t.resource.scheme;
  51581. if (o === i.Schemas.http || o === i.Schemas.https) return n.windowOpenNoOpener(t.resource.toString()), e
  51582. }
  51583. return null
  51584. }
  51585. var r = t.options ? t.options.selection : null
  51586. ;
  51587. if (r) if ("number" == typeof r.endLineNumber && "number" == typeof r.endColumn) e.setSelection(r), e.revealRangeInCenter(r, 1); else {
  51588. var s = {lineNumber: r.startLineNumber, column: r.startColumn};
  51589. e.setPosition(s), e.revealPositionInCenter(s, 1)
  51590. }
  51591. return e
  51592. }, t.prototype.findModel = function (e, t) {
  51593. var n = e.getModel();
  51594. return n && n.uri.toString() !== t.toString() ? null : n
  51595. }, t
  51596. }(o.CodeEditorServiceImpl);
  51597. t.StandaloneCodeEditorServiceImpl = s
  51598. })), define(n[593], i([0, 1, 44, 20]), (function (e, t, n, i) {
  51599. "use strict";
  51600. var o, r, s;
  51601. Object.defineProperty(t, "__esModule", {value: !0}), t.vs = {
  51602. base: "vs",
  51603. inherit: !1,
  51604. rules: [{token: "", foreground: "000000", background: "fffffe"}, {
  51605. token: "invalid",
  51606. foreground: "cd3131"
  51607. }, {token: "emphasis", fontStyle: "italic"}, {token: "strong", fontStyle: "bold"}, {
  51608. token: "variable",
  51609. foreground: "001188"
  51610. }, {token: "variable.predefined", foreground: "4864AA"}, {
  51611. token: "constant",
  51612. foreground: "dd0000"
  51613. }, {token: "comment", foreground: "008000"}, {token: "number", foreground: "098658"}, {
  51614. token: "number.hex",
  51615. foreground: "3030c0"
  51616. }, {token: "regexp", foreground: "800000"}, {
  51617. token: "annotation", foreground: "808080"
  51618. }, {token: "type", foreground: "008080"}, {
  51619. token: "delimiter",
  51620. foreground: "000000"
  51621. }, {token: "delimiter.html", foreground: "383838"}, {
  51622. token: "delimiter.xml",
  51623. foreground: "0000FF"
  51624. }, {token: "tag", foreground: "800000"}, {
  51625. token: "tag.id.pug",
  51626. foreground: "4F76AC"
  51627. }, {token: "tag.class.pug", foreground: "4F76AC"}, {
  51628. token: "meta.scss",
  51629. foreground: "800000"
  51630. }, {token: "metatag", foreground: "e00000"}, {
  51631. token: "metatag.content.html",
  51632. foreground: "FF0000"
  51633. }, {token: "metatag.html", foreground: "808080"}, {
  51634. token: "metatag.xml",
  51635. foreground: "808080"
  51636. }, {token: "metatag.php", fontStyle: "bold"}, {
  51637. token: "key",
  51638. foreground: "863B00"
  51639. }, {token: "string.key.json", foreground: "A31515"}, {
  51640. token: "string.value.json",
  51641. foreground: "0451A5"
  51642. }, {token: "attribute.name", foreground: "FF0000"}, {
  51643. token: "attribute.value",
  51644. foreground: "0451A5"
  51645. }, {token: "attribute.value.number", foreground: "098658"}, {
  51646. token: "attribute.value.unit",
  51647. foreground: "098658"
  51648. }, {token: "attribute.value.html", foreground: "0000FF"}, {
  51649. token: "attribute.value.xml",
  51650. foreground: "0000FF"
  51651. }, {
  51652. token: "string",
  51653. foreground: "A31515"
  51654. }, {token: "string.html", foreground: "0000FF"}, {
  51655. token: "string.sql",
  51656. foreground: "FF0000"
  51657. }, {token: "string.yaml", foreground: "0451A5"}, {
  51658. token: "keyword",
  51659. foreground: "0000FF"
  51660. }, {token: "keyword.json", foreground: "0451A5"}, {
  51661. token: "keyword.flow",
  51662. foreground: "AF00DB"
  51663. }, {token: "keyword.flow.scss", foreground: "0000FF"}, {
  51664. token: "operator.scss",
  51665. foreground: "666666"
  51666. }, {token: "operator.sql", foreground: "778899"}, {
  51667. token: "operator.swift",
  51668. foreground: "666666"
  51669. }, {token: "predefined.sql", foreground: "FF00FF"}],
  51670. colors: (o = {}, o[i.editorBackground] = "#FFFFFE", o[i.editorForeground] = "#000000", o[i.editorInactiveSelection] = "#E5EBF1", o[n.editorIndentGuides] = "#D3D3D3", o[n.editorActiveIndentGuides] = "#939393", o[i.editorSelectionHighlight] = "#ADD6FF4D", o)
  51671. }, t.vs_dark = {
  51672. base: "vs-dark",
  51673. inherit: !1,
  51674. rules: [{token: "", foreground: "D4D4D4", background: "1E1E1E"}, {
  51675. token: "invalid",
  51676. foreground: "f44747"
  51677. }, {token: "emphasis", fontStyle: "italic"}, {token: "strong", fontStyle: "bold"}, {
  51678. token: "variable",
  51679. foreground: "74B0DF"
  51680. }, {
  51681. token: "variable.predefined", foreground: "4864AA"
  51682. }, {token: "variable.parameter", foreground: "9CDCFE"}, {
  51683. token: "constant",
  51684. foreground: "569CD6"
  51685. }, {token: "comment", foreground: "608B4E"}, {token: "number", foreground: "B5CEA8"}, {
  51686. token: "number.hex",
  51687. foreground: "5BB498"
  51688. }, {token: "regexp", foreground: "B46695"}, {token: "annotation", foreground: "cc6666"}, {
  51689. token: "type",
  51690. foreground: "3DC9B0"
  51691. }, {token: "delimiter", foreground: "DCDCDC"}, {
  51692. token: "delimiter.html",
  51693. foreground: "808080"
  51694. }, {token: "delimiter.xml", foreground: "808080"}, {
  51695. token: "tag",
  51696. foreground: "569CD6"
  51697. }, {token: "tag.id.pug", foreground: "4F76AC"}, {
  51698. token: "tag.class.pug",
  51699. foreground: "4F76AC"
  51700. }, {token: "meta.scss", foreground: "A79873"}, {token: "meta.tag", foreground: "CE9178"}, {
  51701. token: "metatag",
  51702. foreground: "DD6A6F"
  51703. }, {token: "metatag.content.html", foreground: "9CDCFE"}, {
  51704. token: "metatag.html",
  51705. foreground: "569CD6"
  51706. }, {token: "metatag.xml", foreground: "569CD6"}, {token: "metatag.php", fontStyle: "bold"}, {
  51707. token: "key",
  51708. foreground: "9CDCFE"
  51709. }, {token: "string.key.json", foreground: "9CDCFE"}, {token: "string.value.json", foreground: "CE9178"}, {
  51710. token: "attribute.name",
  51711. foreground: "9CDCFE"
  51712. }, {token: "attribute.value", foreground: "CE9178"}, {
  51713. token: "attribute.value.number.css",
  51714. foreground: "B5CEA8"
  51715. }, {token: "attribute.value.unit.css", foreground: "B5CEA8"}, {
  51716. token: "attribute.value.hex.css",
  51717. foreground: "D4D4D4"
  51718. }, {token: "string", foreground: "CE9178"}, {token: "string.sql", foreground: "FF0000"}, {
  51719. token: "keyword",
  51720. foreground: "569CD6"
  51721. }, {token: "keyword.flow", foreground: "C586C0"}, {
  51722. token: "keyword.json",
  51723. foreground: "CE9178"
  51724. }, {token: "keyword.flow.scss", foreground: "569CD6"}, {
  51725. token: "operator.scss",
  51726. foreground: "909090"
  51727. }, {token: "operator.sql", foreground: "778899"}, {
  51728. token: "operator.swift",
  51729. foreground: "909090"
  51730. }, {token: "predefined.sql", foreground: "FF00FF"}],
  51731. colors: (r = {}, r[i.editorBackground] = "#1E1E1E", r[i.editorForeground] = "#D4D4D4", r[i.editorInactiveSelection] = "#3A3D41", r[n.editorIndentGuides] = "#404040", r[n.editorActiveIndentGuides] = "#707070", r[i.editorSelectionHighlight] = "#ADD6FF26", r)
  51732. }, t.hc_black = {
  51733. base: "hc-black",
  51734. inherit: !1,
  51735. rules: [{token: "", foreground: "FFFFFF", background: "000000"}, {
  51736. token: "invalid",
  51737. foreground: "f44747"
  51738. }, {token: "emphasis", fontStyle: "italic"}, {token: "strong", fontStyle: "bold"}, {
  51739. token: "variable",
  51740. foreground: "1AEBFF"
  51741. }, {token: "variable.parameter", foreground: "9CDCFE"}, {
  51742. token: "constant",
  51743. foreground: "569CD6"
  51744. }, {token: "comment", foreground: "608B4E"}, {token: "number", foreground: "FFFFFF"}, {
  51745. token: "regexp",
  51746. foreground: "C0C0C0"
  51747. }, {token: "annotation", foreground: "569CD6"}, {token: "type", foreground: "3DC9B0"}, {
  51748. token: "delimiter",
  51749. foreground: "FFFF00"
  51750. }, {token: "delimiter.html", foreground: "FFFF00"}, {
  51751. token: "tag",
  51752. foreground: "569CD6"
  51753. }, {token: "tag.id.pug", foreground: "4F76AC"}, {
  51754. token: "tag.class.pug",
  51755. foreground: "4F76AC"
  51756. }, {token: "meta", foreground: "D4D4D4"}, {token: "meta.tag", foreground: "CE9178"}, {
  51757. token: "metatag",
  51758. foreground: "569CD6"
  51759. }, {token: "metatag.content.html", foreground: "1AEBFF"}, {
  51760. token: "metatag.html",
  51761. foreground: "569CD6"
  51762. }, {token: "metatag.xml", foreground: "569CD6"}, {token: "metatag.php", fontStyle: "bold"}, {
  51763. token: "key",
  51764. foreground: "9CDCFE"
  51765. }, {token: "string.key", foreground: "9CDCFE"}, {token: "string.value", foreground: "CE9178"}, {
  51766. token: "attribute.name", foreground: "569CD6"
  51767. }, {token: "attribute.value", foreground: "3FF23F"}, {
  51768. token: "string",
  51769. foreground: "CE9178"
  51770. }, {token: "string.sql", foreground: "FF0000"}, {
  51771. token: "keyword",
  51772. foreground: "569CD6"
  51773. }, {token: "keyword.flow", foreground: "C586C0"}, {
  51774. token: "operator.sql",
  51775. foreground: "778899"
  51776. }, {token: "operator.swift", foreground: "909090"}, {token: "predefined.sql", foreground: "FF00FF"}],
  51777. colors: (s = {}, s[i.editorBackground] = "#000000", s[i.editorForeground] = "#FFFFFF", s[n.editorIndentGuides] = "#FFFFFF", s[n.editorActiveIndentGuides] = "#FFFFFF", s)
  51778. }
  51779. })), define(n[594], i([0, 1, 6, 27, 4, 17, 357, 593, 42, 20, 14, 2]), (function (e, t, n, i, o, s, a, l, u, d, c, h) {
  51780. "use strict";
  51781. Object.defineProperty(t, "__esModule", {value: !0});
  51782. var p = "vs", g = "vs-dark", f = "hc-black", m = u.Registry.as(d.Extensions.ColorContribution),
  51783. v = u.Registry.as(c.Extensions.ThemingContribution), _ = function () {
  51784. function e(e, t) {
  51785. this.themeData = t;
  51786. var n = t.base;
  51787. e.length > 0 ? (this.id = n + " " + e, this.themeName = e) : (this.id = n, this.themeName = n), this.colors = null, this.defaultColors = Object.create(null),
  51788. this._tokenTheme = null
  51789. }
  51790. return Object.defineProperty(e.prototype, "base", {
  51791. get: function () {
  51792. return this.themeData.base
  51793. }, enumerable: !0, configurable: !0
  51794. }), e.prototype.notifyBaseUpdated = function () {
  51795. this.themeData.inherit && (this.colors = null, this._tokenTheme = null)
  51796. }, e.prototype.getColors = function () {
  51797. if (!this.colors) {
  51798. var e = new Map;
  51799. for (var t in this.themeData.colors) e.set(t, i.Color.fromHex(this.themeData.colors[t]));
  51800. if (this.themeData.inherit) {
  51801. var n = C(this.themeData.base);
  51802. for (var t in n.colors) e.has(t) || e.set(t, i.Color.fromHex(n.colors[t]))
  51803. }
  51804. this.colors = e
  51805. }
  51806. return this.colors
  51807. }, e.prototype.getColor = function (e, t) {
  51808. var n = this.getColors().get(e);
  51809. return n || (!1 !== t ? this.getDefault(e) : void 0)
  51810. }, e.prototype.getDefault = function (e) {
  51811. var t = this.defaultColors[e];
  51812. return t || (t = m.resolveDefaultColor(e, this), this.defaultColors[e] = t, t)
  51813. }, e.prototype.defines = function (e) {
  51814. return Object.prototype.hasOwnProperty.call(this.getColors(), e)
  51815. }, Object.defineProperty(e.prototype, "type", {
  51816. get: function () {
  51817. switch (this.base) {
  51818. case p:
  51819. return "light";
  51820. case f:
  51821. return "hc"
  51822. ;
  51823. default:
  51824. return "dark"
  51825. }
  51826. }, enumerable: !0, configurable: !0
  51827. }), Object.defineProperty(e.prototype, "tokenTheme", {
  51828. get: function () {
  51829. if (!this._tokenTheme) {
  51830. var e = [], t = [];
  51831. if (this.themeData.inherit) {
  51832. var n = C(this.themeData.base);
  51833. e = n.rules, n.encodedTokensColors && (t = n.encodedTokensColors)
  51834. }
  51835. e = e.concat(this.themeData.rules), this.themeData.encodedTokensColors && (t = this.themeData.encodedTokensColors), this._tokenTheme = a.TokenTheme.createFromRawTokenTheme(e, t)
  51836. }
  51837. return this._tokenTheme
  51838. }, enumerable: !0, configurable: !0
  51839. }), e.prototype.getTokenStyleMetadata = function (e, t) {
  51840. }, e
  51841. }();
  51842. function y(e) {
  51843. return e === p || e === g || e === f
  51844. }
  51845. function C(e) {
  51846. switch (e) {
  51847. case p:
  51848. return l.vs;
  51849. case g:
  51850. return l.vs_dark;
  51851. case f:
  51852. return l.hc_black
  51853. }
  51854. }
  51855. function b(e) {
  51856. var t = C(e);
  51857. return new _(e, t)
  51858. }
  51859. var S = function (e) {
  51860. function t() {
  51861. var t = e.call(this) || this;
  51862. return t._onThemeChange = t._register(new o.Emitter), t.onThemeChange = t._onThemeChange.event, t._environment = Object.create(null), t._knownThemes = new Map, t._knownThemes.set(p, b(p)), t._knownThemes.set(g, b(g)), t._knownThemes.set(f, b(f)), t._css = "",
  51863. t._globalStyleElement = null, t._styleElements = [], t.setTheme(p), t
  51864. }
  51865. return r(t, e), t.prototype.registerEditorContainer = function (e) {
  51866. return n.isInShadowDOM(e) ? this._registerShadowDomContainer(e) : this._registerRegularEditorContainer()
  51867. }, t.prototype._registerRegularEditorContainer = function () {
  51868. return this._globalStyleElement || (this._globalStyleElement = n.createStyleSheet(), this._globalStyleElement.className = "monaco-colors", this._globalStyleElement.innerHTML = this._css, this._styleElements.push(this._globalStyleElement)), h.Disposable.None
  51869. }, t.prototype._registerShadowDomContainer = function (e) {
  51870. var t = this, i = n.createStyleSheet(e);
  51871. return i.className = "monaco-colors", i.innerHTML = this._css, this._styleElements.push(i), {
  51872. dispose: function () {
  51873. for (var e = 0; e < t._styleElements.length; e++) if (t._styleElements[e] === i) return void t._styleElements.splice(e, 1)
  51874. }
  51875. }
  51876. }, t.prototype.defineTheme = function (e, t) {
  51877. if (!/^[a-z0-9\-]+$/i.test(e)) throw new Error("Illegal theme name!");
  51878. if (!y(t.base) && !y(e)) throw new Error("Illegal theme base!")
  51879. ;
  51880. this._knownThemes.set(e, new _(e, t)), y(e) && this._knownThemes.forEach((function (t) {
  51881. t.base === e && t.notifyBaseUpdated()
  51882. })), this._theme && this._theme.themeName === e && this.setTheme(e)
  51883. }, t.prototype.getTheme = function () {
  51884. return this._theme
  51885. }, t.prototype.setTheme = function (e) {
  51886. var t, n = this;
  51887. if (t = this._knownThemes.has(e) ? this._knownThemes.get(e) : this._knownThemes.get(p), this._theme === t) return t.id;
  51888. this._theme = t;
  51889. var i = [], o = {}, r = {
  51890. addRule: function (e) {
  51891. o[e] || (i.push(e), o[e] = !0)
  51892. }
  51893. };
  51894. v.getThemingParticipants().forEach((function (e) {
  51895. return e(t, r, n._environment)
  51896. }));
  51897. var l = t.tokenTheme.getColorMap();
  51898. return r.addRule(a.generateTokensCSSForColorMap(l)), this._css = i.join("\n"), this._styleElements.forEach((function (e) {
  51899. return e.innerHTML = n._css
  51900. })), s.TokenizationRegistry.setColorMap(l), this._onThemeChange.fire(t), t.id
  51901. }, t.prototype.getIconTheme = function () {
  51902. return {hasFileIcons: !1, hasFolderIcons: !1, hidesExplorerArrows: !1}
  51903. }, t
  51904. }(h.Disposable);
  51905. t.StandaloneThemeServiceImpl = S
  51906. })), define(n[595], i([0, 1, 547, 66, 96, 4, 35, 14, 34, 2]), (function (e, t, n, i, o, s, a, l, u, d) {
  51907. "use strict";
  51908. Object.defineProperty(t, "__esModule", {value: !0});
  51909. var c = function (e) {
  51910. function t(t, i, o, r, a) {
  51911. var l = e.call(this) || this;
  51912. return l._onDidContextMenu = l._register(new s.Emitter), l.contextMenuHandler = new n.ContextMenuHandler(o, t, i, r, a), l
  51913. }
  51914. return r(t, e), t.prototype.configure = function (e) {
  51915. this.contextMenuHandler.configure(e)
  51916. }, t.prototype.showContextMenu = function (e) {
  51917. this.contextMenuHandler.showContextMenu(e), this._onDidContextMenu.fire()
  51918. }, t = h([g(0, o.ITelemetryService), g(1, a.INotificationService), g(2, i.IContextViewService), g(3, u.IKeybindingService), g(4, l.IThemeService)], t)
  51919. }(d.Disposable);
  51920. t.ContextMenuService = c
  51921. })), define(n[170], i([0, 1, 6, 153, 2, 474, 43, 85, 18, 11, 34, 42, 97, 14, 477, 206, 408, 407, 64]), (function (e, t, n, i, o, s, a, u, d, c, p, f, m, v, _, y, C, b, S) {
  51922. "use strict";
  51923. var w;
  51924. Object.defineProperty(t, "__esModule", {value: !0}), t.IListService = c.createDecorator("listService");
  51925. var E = function () {
  51926. function e(e) {
  51927. this._themeService = e, this.disposables = new o.DisposableStore, this.lists = [], this._lastFocusedWidget = void 0,
  51928. this._hasCreatedStyleController = !1
  51929. }
  51930. return Object.defineProperty(e.prototype, "lastFocusedList", {
  51931. get: function () {
  51932. return this._lastFocusedWidget
  51933. }, enumerable: !0, configurable: !0
  51934. }), e.prototype.register = function (e, t) {
  51935. var r = this;
  51936. if (!this._hasCreatedStyleController) {
  51937. this._hasCreatedStyleController = !0;
  51938. var s = new i.DefaultStyleController(n.createStyleSheet(), "");
  51939. this.disposables.add(m.attachListStyler(s, this._themeService))
  51940. }
  51941. if (this.lists.some((function (t) {
  51942. return t.widget === e
  51943. }))) throw new Error("Cannot register the same widget multiple times");
  51944. var a = {widget: e, extraContextKeys: t};
  51945. return this.lists.push(a), e.getHTMLElement() === document.activeElement && (this._lastFocusedWidget = e), o.combinedDisposable(e.onDidFocus((function () {
  51946. return r._lastFocusedWidget = e
  51947. })), o.toDisposable((function () {
  51948. return r.lists.splice(r.lists.indexOf(a), 1)
  51949. })), e.onDidDispose((function () {
  51950. r.lists = r.lists.filter((function (e) {
  51951. return e !== a
  51952. })), r._lastFocusedWidget === e && (r._lastFocusedWidget = void 0)
  51953. })))
  51954. }, e.prototype.dispose = function () {
  51955. this.disposables.dispose()
  51956. },
  51957. e = h([g(0, v.IThemeService)], e)
  51958. }();
  51959. t.ListService = E;
  51960. var L = new d.RawContextKey("listFocus", !0);
  51961. t.WorkbenchListSupportsMultiSelectContextKey = new d.RawContextKey("listSupportsMultiselect", !0), t.WorkbenchListFocusContextKey = d.ContextKeyExpr.and(L, d.ContextKeyExpr.not(_.InputFocusedContextKey)), t.WorkbenchListHasSelectionOrFocus = new d.RawContextKey("listHasSelectionOrFocus", !1), t.WorkbenchListDoubleSelection = new d.RawContextKey("listDoubleSelection", !1), t.WorkbenchListMultiSelection = new d.RawContextKey("listMultiSelection", !1), t.WorkbenchListSupportsKeyboardNavigation = new d.RawContextKey("listSupportsKeyboardNavigation", !0), t.WorkbenchListAutomaticKeyboardNavigationKey = "listAutomaticKeyboardNavigation", t.WorkbenchListAutomaticKeyboardNavigation = new d.RawContextKey(t.WorkbenchListAutomaticKeyboardNavigationKey, !0), t.didBindWorkbenchListAutomaticKeyboardNavigation = !1, t.multiSelectModifierSettingKey = "workbench.list.multiSelectModifier", t.openModeSettingKey = "workbench.list.openMode",
  51962. t.horizontalScrollingKey = "workbench.list.horizontalScrolling", t.keyboardNavigationSettingKey = "workbench.list.keyboardNavigation", t.automaticKeyboardNavigationSettingKey = "workbench.list.automaticKeyboardNavigation";
  51963. var D = "workbench.tree.indent", N = "workbench.tree.renderIndentGuides";
  51964. function x(e) {
  51965. return "alt" === e.getValue(t.multiSelectModifierSettingKey)
  51966. }
  51967. function I(e) {
  51968. return "doubleClick" !== e.getValue(t.openModeSettingKey)
  51969. }
  51970. var M = function (e) {
  51971. function n(t) {
  51972. var n = e.call(this) || this;
  51973. return n.configurationService = t, n.useAltAsMultipleSelectionModifier = x(t), n.registerListeners(), n
  51974. }
  51975. return r(n, e), n.prototype.registerListeners = function () {
  51976. var e = this;
  51977. this._register(this.configurationService.onDidChangeConfiguration((function (n) {
  51978. n.affectsConfiguration(t.multiSelectModifierSettingKey) && (e.useAltAsMultipleSelectionModifier = x(e.configurationService))
  51979. })))
  51980. }, n.prototype.isSelectionSingleChangeEvent = function (e) {
  51981. return this.useAltAsMultipleSelectionModifier ? e.browserEvent.altKey : i.isSelectionSingleChangeEvent(e)
  51982. },
  51983. n.prototype.isSelectionRangeChangeEvent = function (e) {
  51984. return i.isSelectionRangeChangeEvent(e)
  51985. }, n
  51986. }(o.Disposable), k = function (e) {
  51987. function n(t, n) {
  51988. var i = e.call(this) || this;
  51989. return i.configurationService = t, i.existingOpenController = n, i.openOnSingleClick = I(t), i.registerListeners(), i
  51990. }
  51991. return r(n, e), n.prototype.registerListeners = function () {
  51992. var e = this;
  51993. this._register(this.configurationService.onDidChangeConfiguration((function (n) {
  51994. n.affectsConfiguration(t.openModeSettingKey) && (e.openOnSingleClick = I(e.configurationService))
  51995. })))
  51996. }, n.prototype.shouldOpen = function (e) {
  51997. if (e instanceof MouseEvent) {
  51998. var t = 0 === e.button, n = 2 === e.detail;
  51999. return !(t && !this.openOnSingleClick && !n) && (!(!t && 1 !== e.button) && (!this.existingOpenController || this.existingOpenController.shouldOpen(e)))
  52000. }
  52001. return !this.existingOpenController || this.existingOpenController.shouldOpen(e)
  52002. }, n
  52003. }(o.Disposable);
  52004. function T(e, t) {
  52005. var n = !1;
  52006. return function (i) {
  52007. if (n) return n = !1, !1;
  52008. var o = t.softDispatch(i, e);
  52009. return o && o.enterChord ? (n = !0, !1) : (n = !1, !0)
  52010. }
  52011. }
  52012. var R = function (e) {
  52013. function n(t, n, i, o, r, s, a, l, u, d, c) {
  52014. var h = this, p = F(n, r, s, u, d, c), g = p.options, f = p.getAutomaticKeyboardNavigation,
  52015. m = p.disposable;
  52016. return (h = e.call(this, t, n, i, o, g) || this).disposables.add(m), h.internals = new W(h, g, f, r.overrideStyles, s, a, l, u, c), h.disposables.add(h.internals), h
  52017. }
  52018. return r(n, e), n = h([g(5, d.IContextKeyService), g(6, t.IListService), g(7, v.IThemeService), g(8, a.IConfigurationService), g(9, p.IKeybindingService), g(10, S.IAccessibilityService)], n)
  52019. }(y.ObjectTree);
  52020. t.WorkbenchObjectTree = R;
  52021. var O = function (e) {
  52022. function n(t, n, i, o, r, s, a, l, u, d, c, h) {
  52023. var p = this, g = F(n, s, a, d, c, h), f = g.options, m = g.getAutomaticKeyboardNavigation,
  52024. v = g.disposable;
  52025. return (p = e.call(this, t, n, i, o, r, f) || this).disposables.add(v), p.internals = new W(p, f, m, s.overrideStyles, a, l, u, d, h), p.disposables.add(p.internals), p
  52026. }
  52027. return r(n, e), n.prototype.updateOptions = function (t) {
  52028. void 0 === t && (t = {}), e.prototype.updateOptions.call(this, t), t.overrideStyles && this.internals.updateStyleOverrides(t.overrideStyles)
  52029. },
  52030. n = h([g(6, d.IContextKeyService), g(7, t.IListService), g(8, v.IThemeService), g(9, a.IConfigurationService), g(10, p.IKeybindingService), g(11, S.IAccessibilityService)], n)
  52031. }(b.DataTree);
  52032. t.WorkbenchDataTree = O;
  52033. var P = function (e) {
  52034. function n(t, n, i, o, r, s, a, l, u, d, c, h) {
  52035. var p = this, g = F(n, s, a, d, c, h), f = g.options, m = g.getAutomaticKeyboardNavigation,
  52036. v = g.disposable;
  52037. return (p = e.call(this, t, n, i, o, r, f) || this).disposables.add(v), p.internals = new W(p, f, m, s.overrideStyles, a, l, u, d, h), p.disposables.add(p.internals), p
  52038. }
  52039. return r(n, e), n.prototype.updateOptions = function (t) {
  52040. void 0 === t && (t = {}), e.prototype.updateOptions.call(this, t), t.overrideStyles && this.internals.updateStyleOverrides(t.overrideStyles)
  52041. }, n = h([g(6, d.IContextKeyService), g(7, t.IListService), g(8, v.IThemeService), g(9, a.IConfigurationService), g(10, p.IKeybindingService), g(11, S.IAccessibilityService)], n)
  52042. }(C.AsyncDataTree);
  52043. t.WorkbenchAsyncDataTree = P;
  52044. var A = function (e) {
  52045. function n(t, n, i, o, r, s, a, l, u, d, c, h, p) {
  52046. var g = this, f = F(n, a, l, c, h, p), m = f.options, v = f.getAutomaticKeyboardNavigation,
  52047. _ = f.disposable
  52048. ;
  52049. return (g = e.call(this, t, n, i, o, r, s, m) || this).disposables.add(_), g.internals = new W(g, m, v, a.overrideStyles, l, u, d, c, p), g.disposables.add(g.internals), g
  52050. }
  52051. return r(n, e), n = h([g(7, d.IContextKeyService), g(8, t.IListService), g(9, v.IThemeService), g(10, a.IConfigurationService), g(11, p.IKeybindingService), g(12, S.IAccessibilityService)], n)
  52052. }(C.CompressibleAsyncDataTree);
  52053. function F(e, n, i, r, s, u) {
  52054. t.WorkbenchListSupportsKeyboardNavigation.bindTo(i), t.didBindWorkbenchListAutomaticKeyboardNavigation || (t.WorkbenchListAutomaticKeyboardNavigation.bindTo(i), t.didBindWorkbenchListAutomaticKeyboardNavigation = !0);
  52055. var d = function () {
  52056. var e = i.getContextKeyValue(t.WorkbenchListAutomaticKeyboardNavigationKey);
  52057. return e && (e = r.getValue(t.automaticKeyboardNavigationSettingKey)), e
  52058. }, c = u.isScreenReaderOptimized() ? "simple" : r.getValue(t.keyboardNavigationSettingKey),
  52059. h = void 0 !== n.horizontalScrolling ? n.horizontalScrolling : function (e) {
  52060. return a.getMigratedSettingValue(e, t.horizontalScrollingKey, "workbench.tree.horizontalScrolling")
  52061. }(r), p = I(r), g = function (e, t, n) {
  52062. var i = new o.DisposableStore, r = l({}, e);
  52063. if (!1 !== e.multipleSelectionSupport && !e.multipleSelectionController) {
  52064. var s = new M(t);
  52065. r.multipleSelectionController = s, i.add(s)
  52066. }
  52067. var a = new k(t, e.openController);
  52068. return r.openController = a, i.add(a), r.keyboardNavigationDelegate = {
  52069. mightProducePrintableCharacter: function (e) {
  52070. return n.mightProducePrintableCharacter(e)
  52071. }
  52072. }, [r, i]
  52073. }(n, r, s), f = g[0], m = g[1], v = n.additionalScrollHeight;
  52074. return {
  52075. getAutomaticKeyboardNavigation: d,
  52076. disposable: m,
  52077. options: l(l({keyboardSupport: !1}, f), {
  52078. indent: r.getValue(D),
  52079. renderIndentGuides: r.getValue(N),
  52080. automaticKeyboardNavigation: d(),
  52081. simpleKeyboardNavigation: "simple" === c,
  52082. filterOnType: "filter" === c,
  52083. horizontalScrolling: h,
  52084. openOnSingleClick: p,
  52085. keyboardNavigationEventFilter: T(e, s),
  52086. additionalScrollHeight: v,
  52087. hideTwistiesOfChildlessElements: n.hideTwistiesOfChildlessElements
  52088. })
  52089. }
  52090. }
  52091. t.WorkbenchCompressibleAsyncDataTree = A;
  52092. var W = function () {
  52093. function e(e, n, i, o, r, s, a, l, u) {
  52094. var d = this;
  52095. this.tree = e, this.themeService = a, this.disposables = [],
  52096. this.contextKeyService = function (e, t) {
  52097. var n = e.createScoped(t.getHTMLElement());
  52098. return L.bindTo(n), n
  52099. }(r, e), t.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService).set(!(!1 === n.multipleSelectionSupport)), this.hasSelectionOrFocus = t.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService), this.hasDoubleSelection = t.WorkbenchListDoubleSelection.bindTo(this.contextKeyService), this.hasMultiSelection = t.WorkbenchListMultiSelection.bindTo(this.contextKeyService), this._useAltAsMultipleSelectionModifier = x(l);
  52100. var c = new Set;
  52101. c.add(t.WorkbenchListAutomaticKeyboardNavigationKey);
  52102. var h = function () {
  52103. var n = u.isScreenReaderOptimized() ? "simple" : l.getValue(t.keyboardNavigationSettingKey);
  52104. e.updateOptions({simpleKeyboardNavigation: "simple" === n, filterOnType: "filter" === n})
  52105. };
  52106. this.updateStyleOverrides(o), this.disposables.push(this.contextKeyService, s.register(e), e.onDidChangeSelection((function () {
  52107. var t = e.getSelection(), n = e.getFocus();
  52108. d.hasSelectionOrFocus.set(t.length > 0 || n.length > 0),
  52109. d.hasMultiSelection.set(t.length > 1), d.hasDoubleSelection.set(2 === t.length)
  52110. })), e.onDidChangeFocus((function () {
  52111. var t = e.getSelection(), n = e.getFocus();
  52112. d.hasSelectionOrFocus.set(t.length > 0 || n.length > 0)
  52113. })), l.onDidChangeConfiguration((function (n) {
  52114. if (n.affectsConfiguration(t.openModeSettingKey) && e.updateOptions({openOnSingleClick: I(l)}), n.affectsConfiguration(t.multiSelectModifierSettingKey) && (d._useAltAsMultipleSelectionModifier = x(l)), n.affectsConfiguration(D)) {
  52115. var o = l.getValue(D);
  52116. e.updateOptions({indent: o})
  52117. }
  52118. if (n.affectsConfiguration(N)) {
  52119. var r = l.getValue(N);
  52120. e.updateOptions({renderIndentGuides: r})
  52121. }
  52122. n.affectsConfiguration(t.keyboardNavigationSettingKey) && h(), n.affectsConfiguration(t.automaticKeyboardNavigationSettingKey) && e.updateOptions({automaticKeyboardNavigation: i()})
  52123. })), this.contextKeyService.onDidChangeContext((function (t) {
  52124. t.affectsSome(c) && e.updateOptions({automaticKeyboardNavigation: i()})
  52125. })), u.onDidChangeScreenReaderOptimized((function () {
  52126. return h()
  52127. })))
  52128. }
  52129. return e.prototype.updateStyleOverrides = function (e) {
  52130. o.dispose(this.styler), this.styler = e ? m.attachListStyler(this.tree, this.themeService, e) : o.Disposable.None
  52131. }, e.prototype.dispose = function () {
  52132. this.disposables = o.dispose(this.disposables), this.styler = o.dispose(this.styler)
  52133. }, e = h([g(4, d.IContextKeyService), g(5, t.IListService), g(6, v.IThemeService), g(7, a.IConfigurationService), g(8, S.IAccessibilityService)], e)
  52134. }();
  52135. f.Registry.as(u.Extensions.Configuration).registerConfiguration({
  52136. id: "workbench",
  52137. order: 7,
  52138. title: s.localize(0, null),
  52139. type: "object",
  52140. properties: (w = {}, w[t.multiSelectModifierSettingKey] = {
  52141. type: "string",
  52142. enum: ["ctrlCmd", "alt"],
  52143. enumDescriptions: [s.localize(1, null), s.localize(2, null)],
  52144. default: "ctrlCmd",
  52145. description: s.localize(3, null)
  52146. }, w[t.openModeSettingKey] = {
  52147. type: "string",
  52148. enum: ["singleClick", "doubleClick"],
  52149. default: "singleClick",
  52150. description: s.localize(4, null)
  52151. }, w[t.horizontalScrollingKey] = {
  52152. type: "boolean",
  52153. default: !1,
  52154. description: s.localize(5, null)
  52155. }, w["workbench.tree.horizontalScrolling"] = {
  52156. type: "boolean", default: !1, description: s.localize(6, null),
  52157. deprecationMessage: s.localize(7, null, t.horizontalScrollingKey)
  52158. }, w[D] = {
  52159. type: "number",
  52160. default: 8,
  52161. minimum: 0,
  52162. maximum: 40,
  52163. description: s.localize(8, null)
  52164. }, w[N] = {
  52165. type: "string",
  52166. enum: ["none", "onHover", "always"],
  52167. default: "onHover",
  52168. description: s.localize(9, null)
  52169. }, w[t.keyboardNavigationSettingKey] = {
  52170. type: "string",
  52171. enum: ["simple", "highlight", "filter"],
  52172. enumDescriptions: [s.localize(10, null), s.localize(11, null), s.localize(12, null)],
  52173. default: "highlight",
  52174. description: s.localize(13, null)
  52175. }, w[t.automaticKeyboardNavigationSettingKey] = {
  52176. type: "boolean",
  52177. default: !0,
  52178. markdownDescription: s.localize(14, null)
  52179. }, w)
  52180. })
  52181. })), define(n[596], i([0, 1, 6, 27, 4, 2, 46, 39, 167, 3, 30, 84, 575, 450, 11, 116, 170, 20, 14, 123, 113, 279, 314]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E, L, D) {
  52182. "use strict";
  52183. Object.defineProperty(t, "__esModule", {value: !0});
  52184. var N = function () {
  52185. function e(e, t) {
  52186. var n = this;
  52187. this._editor = e, this._model = t, this._decorations = new Map, this._decorationIgnoreSet = new Set, this._callOnDispose = new s.DisposableStore, this._callOnModelChange = new s.DisposableStore,
  52188. this._callOnDispose.add(this._editor.onDidChangeModel((function () {
  52189. return n._onModelChanged()
  52190. }))), this._onModelChanged()
  52191. }
  52192. return e.prototype.dispose = function () {
  52193. this._callOnModelChange.dispose(), this._callOnDispose.dispose(), this.removeDecorations()
  52194. }, e.prototype._onModelChanged = function () {
  52195. this._callOnModelChange.clear();
  52196. var e = this._editor.getModel();
  52197. if (e) for (var t = 0, n = this._model.groups; t < n.length; t++) {
  52198. var i = n[t];
  52199. if (l.isEqual(i.uri, e.uri)) return void this._addDecorations(i)
  52200. }
  52201. }, e.prototype._addDecorations = function (t) {
  52202. var n = this;
  52203. if (this._editor.hasModel()) {
  52204. this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((function (e) {
  52205. return n._onDecorationChanged()
  52206. })));
  52207. for (var i = [], o = [], r = 0, s = t.children.length; r < s; r++) {
  52208. var a = t.children[r];
  52209. this._decorationIgnoreSet.has(a.id) || (i.push({
  52210. range: a.range,
  52211. options: e.DecorationOptions
  52212. }), o.push(r))
  52213. }
  52214. var l = this._editor.deltaDecorations([], i);
  52215. for (r = 0; r < l.length; r++) this._decorations.set(l[r], t.children[o[r]])
  52216. }
  52217. }, e.prototype._onDecorationChanged = function () {
  52218. var e = this, t = [], n = this._editor.getModel();
  52219. if (n) {
  52220. this._decorations.forEach((function (i, o) {
  52221. var r = n.getDecorationRange(o);
  52222. if (r) {
  52223. var s = !1;
  52224. if (!p.Range.equalsRange(r, i.range)) p.Range.spansMultipleLines(r) ? s = !0 : i.range.endColumn - i.range.startColumn !== r.endColumn - r.startColumn && (s = !0), s ? (e._decorationIgnoreSet.add(i.id), t.push(o)) : i.range = r
  52225. }
  52226. }));
  52227. for (var i = 0, o = t.length; i < o; i++) this._decorations.delete(t[i]);
  52228. this._editor.deltaDecorations(t, [])
  52229. }
  52230. }, e.prototype.removeDecorations = function () {
  52231. var e = [];
  52232. this._decorations.forEach((function (t, n) {
  52233. e.push(n)
  52234. })), this._editor.deltaDecorations(e, []), this._decorations.clear()
  52235. }, e.DecorationOptions = f.ModelDecorationOptions.register({
  52236. stickiness: 1,
  52237. className: "reference-decoration"
  52238. }), e
  52239. }(), x = function () {
  52240. function e() {
  52241. this.ratio = .7, this.heightInLines = 18
  52242. }
  52243. return e.fromJSON = function (e) {
  52244. var t, n;
  52245. try {
  52246. var i = JSON.parse(e);
  52247. t = i.ratio, n = i.heightInLines
  52248. } catch (e) {
  52249. }
  52250. return {ratio: t || .7, heightInLines: n || 18}
  52251. }, e
  52252. }();
  52253. t.LayoutData = x;
  52254. var I = function (e) {
  52255. function t(t, n, i, r, a, l, u, d) {
  52256. var c = e.call(this, t, {
  52257. showFrame: !1,
  52258. showArrow: !0, isResizeable: !0, isAccessible: !0
  52259. }) || this;
  52260. return c._defaultTreeKeyboardSupport = n, c.layoutData = i, c._textModelResolverService = a, c._instantiationService = l, c._peekViewService = u, c._uriLabel = d, c._disposeOnNewModel = new s.DisposableStore, c._callOnDispose = new s.DisposableStore, c._onDidSelectReference = new o.Emitter, c.onDidSelectReference = c._onDidSelectReference.event, c._dim = {
  52261. height: 0,
  52262. width: 0
  52263. }, c._applyTheme(r.getTheme()), c._callOnDispose.add(r.onThemeChange(c._applyTheme.bind(c))), c._peekViewService.addExclusiveWidget(t, c), c.create(), c
  52264. }
  52265. return r(t, e), t.prototype.dispose = function () {
  52266. this.setModel(void 0), this._callOnDispose.dispose(), this._disposeOnNewModel.dispose(), s.dispose(this._preview), s.dispose(this._previewNotAvailableMessage), s.dispose(this._tree), s.dispose(this._previewModelReference), this._splitView.dispose(), e.prototype.dispose.call(this)
  52267. }, t.prototype._applyTheme = function (e) {
  52268. var t = e.getColor(E.peekViewBorder) || i.Color.transparent;
  52269. this.style({
  52270. arrowColor: t,
  52271. frameColor: t,
  52272. headerBackgroundColor: e.getColor(E.peekViewTitleBackground) || i.Color.transparent,
  52273. primaryHeadingColor: e.getColor(E.peekViewTitleForeground),
  52274. secondaryHeadingColor: e.getColor(E.peekViewTitleInfoForeground)
  52275. })
  52276. }, t.prototype.show = function (t) {
  52277. this.editor.revealRangeInCenterIfOutsideViewport(t, 0), e.prototype.show.call(this, t, this.layoutData.heightInLines || 18)
  52278. }, t.prototype.focusOnReferenceTree = function () {
  52279. this._tree.domFocus()
  52280. }, t.prototype.focusOnPreviewEditor = function () {
  52281. this._preview.focus()
  52282. }, t.prototype.isPreviewEditorFocused = function () {
  52283. return this._preview.hasTextFocus()
  52284. }, t.prototype._onTitleClick = function (e) {
  52285. this._preview && this._preview.getModel() && this._onDidSelectReference.fire({
  52286. element: this._getFocusedReference(),
  52287. kind: e.ctrlKey || e.metaKey || e.altKey ? "side" : "open",
  52288. source: "title"
  52289. })
  52290. }, t.prototype._fillBody = function (e) {
  52291. var t = this;
  52292. this.setCssClass("reference-zone-widget"), this._messageContainer = n.append(e, n.$("div.messages")), n.hide(this._messageContainer), this._splitView = new D.SplitView(e, {orientation: 1}),
  52293. this._previewContainer = n.append(e, n.$("div.preview.inline"));
  52294. this._preview = this._instantiationService.createInstance(u.EmbeddedCodeEditorWidget, this._previewContainer, {
  52295. scrollBeyondLastLine: !1,
  52296. scrollbar: {
  52297. verticalScrollbarSize: 14,
  52298. horizontal: "auto",
  52299. useShadows: !0,
  52300. verticalHasArrows: !1,
  52301. horizontalHasArrows: !1,
  52302. alwaysConsumeMouseWheel: !1
  52303. },
  52304. overviewRulerLanes: 2,
  52305. fixedOverflowWidgets: !0,
  52306. minimap: {enabled: !1}
  52307. }, this.editor), n.hide(this._previewContainer), this._previewNotAvailableMessage = f.TextModel.createFromString(_.localize(0, null)), this._treeContainer = n.append(e, n.$("div.ref-tree.inline"));
  52308. var i = {
  52309. ariaLabel: _.localize(1, null),
  52310. keyboardSupport: this._defaultTreeKeyboardSupport,
  52311. accessibilityProvider: new v.AriaProvider,
  52312. keyboardNavigationLabelProvider: this._instantiationService.createInstance(v.StringRepresentationProvider),
  52313. identityProvider: new v.IdentityProvider,
  52314. overrideStyles: {listBackground: E.peekViewResultsBackground}
  52315. }
  52316. ;this._tree = this._instantiationService.createInstance(b.WorkbenchAsyncDataTree, "ReferencesWidget", this._treeContainer, new v.Delegate, [this._instantiationService.createInstance(v.FileReferencesRenderer), this._instantiationService.createInstance(v.OneReferenceRenderer)], this._instantiationService.createInstance(v.DataSource), i), this._splitView.addView({
  52317. onDidChange: o.Event.None,
  52318. element: this._previewContainer,
  52319. minimumSize: 200,
  52320. maximumSize: Number.MAX_VALUE,
  52321. layout: function (e) {
  52322. t._preview.layout({height: t._dim.height, width: e})
  52323. }
  52324. }, D.Sizing.Distribute), this._splitView.addView({
  52325. onDidChange: o.Event.None,
  52326. element: this._treeContainer,
  52327. minimumSize: 100,
  52328. maximumSize: Number.MAX_VALUE,
  52329. layout: function (e) {
  52330. t._treeContainer.style.height = t._dim.height + "px", t._treeContainer.style.width = e + "px", t._tree.layout(t._dim.height, e)
  52331. }
  52332. }, D.Sizing.Distribute), this._disposables.add(this._splitView.onDidSashChange((function () {
  52333. t._dim.width && (t.layoutData.ratio = t._splitView.getViewSize(0) / t._dim.width)
  52334. }), void 0));
  52335. var r = function (e, n) {
  52336. e instanceof L.OneReference && ("show" === n && t._revealReference(e, !1), t._onDidSelectReference.fire({
  52337. element: e,
  52338. kind: n,
  52339. source: "tree"
  52340. }))
  52341. };
  52342. this._tree.onDidChangeFocus((function (e) {
  52343. r(e.elements[0], "show")
  52344. })), this._tree.onDidOpen((function (e) {
  52345. e.browserEvent instanceof MouseEvent && (e.browserEvent.ctrlKey || e.browserEvent.metaKey || e.browserEvent.altKey) ? r(e.elements[0], "side") : e.browserEvent instanceof KeyboardEvent || e.browserEvent instanceof MouseEvent && 2 === e.browserEvent.detail || 2 === e.browserEvent.tapCount ? r(e.elements[0], "goto") : r(e.elements[0], "show")
  52346. })), n.hide(this._treeContainer)
  52347. }, t.prototype._onWidth = function (e) {
  52348. this._dim && this._doLayoutBody(this._dim.height, e)
  52349. }, t.prototype._doLayoutBody = function (t, n) {
  52350. e.prototype._doLayoutBody.call(this, t, n), this._dim = {
  52351. height: t,
  52352. width: n
  52353. }, this.layoutData.heightInLines = this._viewZone ? this._viewZone.heightInLines : this.layoutData.heightInLines, this._splitView.layout(n), this._splitView.resizeView(0, n * this.layoutData.ratio)
  52354. }, t.prototype.setSelection = function (e) {
  52355. var t = this
  52356. ;
  52357. return this._revealReference(e, !0).then((function () {
  52358. t._model && (t._tree.setSelection([e]), t._tree.setFocus([e]))
  52359. }))
  52360. }, t.prototype.setModel = function (e) {
  52361. return this._disposeOnNewModel.clear(), this._model = e, this._model ? this._onNewModel() : Promise.resolve()
  52362. }, t.prototype._onNewModel = function () {
  52363. var e = this;
  52364. return this._model ? this._model.isEmpty ? (this.setTitle(""), this._messageContainer.innerHTML = _.localize(2, null), n.show(this._messageContainer), Promise.resolve(void 0)) : (n.hide(this._messageContainer), this._decorationsManager = new N(this._preview, this._model), this._disposeOnNewModel.add(this._decorationsManager), this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((function (t) {
  52365. return e._tree.rerender(t)
  52366. }))), this._disposeOnNewModel.add(this._preview.onMouseDown((function (t) {
  52367. var n = t.event, i = t.target;
  52368. if (2 === n.detail) {
  52369. var o = e._getFocusedReference();
  52370. o && e._onDidSelectReference.fire({
  52371. element: {uri: o.uri, range: i.range},
  52372. kind: n.ctrlKey || n.metaKey || n.altKey ? "side" : "open",
  52373. source: "editor"
  52374. })
  52375. }
  52376. }))),
  52377. n.addClass(this.container, "results-loaded"), n.show(this._treeContainer), n.show(this._previewContainer), this._splitView.layout(this._dim.width), this.focusOnReferenceTree(), this._tree.setInput(1 === this._model.groups.length ? this._model.groups[0] : this._model)) : Promise.resolve(void 0)
  52378. }, t.prototype._getFocusedReference = function () {
  52379. var e = this._tree.getFocus()[0];
  52380. return e instanceof L.OneReference ? e : e instanceof L.FileReferences && e.children.length > 0 ? e.children[0] : void 0
  52381. }, t.prototype._revealReference = function (e, t) {
  52382. return d(this, void 0, void 0, (function () {
  52383. var n, i, o, r, u;
  52384. return c(this, (function (d) {
  52385. switch (d.label) {
  52386. case 0:
  52387. return this._revealedReference === e ? [2] : (this._revealedReference = e, e.uri.scheme !== a.Schemas.inMemory ? this.setTitle(l.basenameOrAuthority(e.uri), this._uriLabel.getUriLabel(l.dirname(e.uri))) : this.setTitle(_.localize(3, null)), n = this._textModelResolverService.createModelReference(e.uri), this._tree.getInput() !== e.parent ? [3, 1] : (this._tree.reveal(e), [3, 3]));
  52388. case 1:
  52389. return t && this._tree.reveal(e.parent),
  52390. [4, this._tree.expand(e.parent)];
  52391. case 2:
  52392. d.sent(), this._tree.reveal(e), d.label = 3;
  52393. case 3:
  52394. return [4, n];
  52395. case 4:
  52396. return i = d.sent(), this._model ? (s.dispose(this._previewModelReference), (o = i.object) ? (r = this._preview.getModel() === o.textEditorModel ? 0 : 1, u = p.Range.lift(e.range).collapseToStart(), this._previewModelReference = i, this._preview.setModel(o.textEditorModel), this._preview.setSelection(u), this._preview.revealRangeInCenter(u, r)) : (this._preview.setModel(this._previewNotAvailableMessage), i.dispose()), [2]) : (i.dispose(), [2])
  52397. }
  52398. }))
  52399. }))
  52400. }, t = h([g(3, w.IThemeService), g(4, m.ITextModelService), g(5, y.IInstantiationService), g(6, E.IPeekViewService), g(7, C.ILabelService)], t)
  52401. }(E.PeekViewWidget);
  52402. t.ReferenceWidget = I, w.registerThemingParticipant((function (e, t) {
  52403. var n = e.getColor(E.peekViewResultsMatchHighlight);
  52404. n && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: " + n + "; }");
  52405. var i = e.getColor(E.peekViewEditorMatchHighlight)
  52406. ;i && t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: " + i + "; }");
  52407. var o = e.getColor(E.peekViewEditorMatchHighlightBorder);
  52408. o && t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid " + o + "; box-sizing: border-box; }");
  52409. var r = e.getColor(S.activeContrastBorder);
  52410. r && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted " + r + "; box-sizing: border-box; }");
  52411. var s = e.getColor(E.peekViewResultsBackground);
  52412. s && t.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: " + s + "; }");
  52413. var a = e.getColor(E.peekViewResultsMatchForeground);
  52414. a && t.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: " + a + "; }");
  52415. var l = e.getColor(E.peekViewResultsFileForeground);
  52416. l && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: " + l + "; }");
  52417. var u = e.getColor(E.peekViewResultsSelectionBackground)
  52418. ;u && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: " + u + "; }");
  52419. var d = e.getColor(E.peekViewResultsSelectionForeground);
  52420. d && t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: " + d + " !important; }");
  52421. var c = e.getColor(E.peekViewEditorBackground);
  52422. c && t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: " + c + ";}");
  52423. var h = e.getColor(E.peekViewEditorGutterBackground);
  52424. h && t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: " + h + ";}")
  52425. }))
  52426. })), define(n[234], i([0, 1, 448, 10, 2, 32, 11, 18, 43, 74, 113, 596, 3, 13, 35, 15, 123, 170, 86, 36, 29]), (function (e, t, n, i, o, r, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E) {
  52427. "use strict"
  52428. ;Object.defineProperty(t, "__esModule", {value: !0}), t.ctxReferenceSearchVisible = new a.RawContextKey("referenceSearchVisible", !1);
  52429. var L = function () {
  52430. function e(e, n, i, r, s, a, l, u) {
  52431. this._defaultTreeKeyboardSupport = e, this._editor = n, this._editorService = r, this._notificationService = s, this._instantiationService = a, this._storageService = l, this._configurationService = u, this._disposables = new o.DisposableStore, this._requestIdPool = 0, this._ignoreModelChangeEvent = !1, this._referenceSearchVisible = t.ctxReferenceSearchVisible.bindTo(i)
  52432. }
  52433. return e.get = function (t) {
  52434. return t.getContribution(e.ID)
  52435. }, e.prototype.dispose = function () {
  52436. this._referenceSearchVisible.reset(), this._disposables.dispose(), o.dispose(this._widget), o.dispose(this._model), this._widget = void 0, this._model = void 0
  52437. }, e.prototype.toggleWidget = function (e, t, i) {
  52438. var o, r = this;
  52439. if (this._widget && (o = this._widget.position), this.closeWidget(), !o || !e.containsPosition(o)) {
  52440. this._peekMode = i, this._referenceSearchVisible.set(!0), this._disposables.add(this._editor.onDidChangeModelLanguage((function () {
  52441. r.closeWidget()
  52442. }))), this._disposables.add(this._editor.onDidChangeModel((function () {
  52443. r._ignoreModelChangeEvent || r.closeWidget()
  52444. })));
  52445. var s = f.LayoutData.fromJSON(this._storageService.get("peekViewLayout", 0, "{}"));
  52446. this._widget = this._instantiationService.createInstance(f.ReferenceWidget, this._editor, this._defaultTreeKeyboardSupport, s), this._widget.setTitle(n.localize(0, null)), this._widget.show(e), this._disposables.add(this._widget.onDidClose((function () {
  52447. t.cancel(), r._widget && (r._storageService.store("peekViewLayout", JSON.stringify(r._widget.layoutData), 0), r._widget = void 0), r.closeWidget()
  52448. }))), this._disposables.add(this._widget.onDidSelectReference((function (e) {
  52449. var t = e.element, n = e.kind;
  52450. if (t) switch (n) {
  52451. case"open":
  52452. "editor" === e.source && r._configurationService.getValue("editor.stablePeek") || r.openReference(t, !1);
  52453. break;
  52454. case"side":
  52455. r.openReference(t, !0);
  52456. break;
  52457. case"goto":
  52458. i ? r._gotoReference(t) : r.openReference(t, !1)
  52459. }
  52460. })));
  52461. var a = ++this._requestIdPool;
  52462. t.then((function (t) {
  52463. if (a === r._requestIdPool && r._widget) return r._model && r._model.dispose(), r._model = t, r._widget.setModel(r._model).then((function () {
  52464. if (r._widget && r._model && r._editor.hasModel()) {
  52465. r._model.isEmpty ? r._widget.setMetaTitle("") : r._widget.setMetaTitle(n.localize(1, null, r._model.title, r._model.references.length));
  52466. var t = r._editor.getModel().uri, i = new v.Position(e.startLineNumber, e.startColumn),
  52467. o = r._model.nearestReference(t, i);
  52468. if (o) return r._widget.setSelection(o).then((function () {
  52469. r._widget && "editor" === r._editor.getOption(65) && r._widget.focusOnPreviewEditor()
  52470. }))
  52471. }
  52472. }))
  52473. }), (function (e) {
  52474. r._notificationService.error(e)
  52475. }))
  52476. }
  52477. }, e.prototype.changeFocusBetweenPreviewAndReferences = function () {
  52478. this._widget && (this._widget.isPreviewEditorFocused() ? this._widget.focusOnReferenceTree() : this._widget.focusOnPreviewEditor())
  52479. }, e.prototype.goToNextOrPreviousReference = function (e) {
  52480. return d(this, void 0, void 0, (function () {
  52481. var t, n, i, o, r;
  52482. return c(this, (function (s) {
  52483. switch (s.label) {
  52484. case 0:
  52485. return this._editor.hasModel() && this._model && this._widget && ((t = this._widget.position) && (n = this._model.nearestReference(this._editor.getModel().uri, t))) ? (i = this._model.nextOrPreviousReference(n, e), o = this._editor.hasTextFocus(), r = this._widget.isPreviewEditorFocused(), [4, this._widget.setSelection(i)]) : [2];
  52486. case 1:
  52487. return s.sent(), [4, this._gotoReference(i)];
  52488. case 2:
  52489. return s.sent(), o ? this._editor.focus() : this._widget && r && this._widget.focusOnPreviewEditor(), [2]
  52490. }
  52491. }))
  52492. }))
  52493. }, e.prototype.closeWidget = function (e) {
  52494. void 0 === e && (e = !0), this._referenceSearchVisible.reset(), this._disposables.clear(), o.dispose(this._widget), o.dispose(this._model), this._widget = void 0, this._model = void 0, e && this._editor.focus(), this._requestIdPool += 1
  52495. }, e.prototype._gotoReference = function (t) {
  52496. var n = this;
  52497. this._widget && this._widget.hide(), this._ignoreModelChangeEvent = !0;
  52498. var o = m.Range.lift(t.range).collapseToStart();
  52499. return this._editorService.openCodeEditor({
  52500. resource: t.uri,
  52501. options: {selection: o}
  52502. }, this._editor).then((function (t) {
  52503. var i
  52504. ;
  52505. if (n._ignoreModelChangeEvent = !1, t && n._widget) if (n._editor === t) n._widget.show(o), n._widget.focusOnReferenceTree(); else {
  52506. var r = e.get(t), s = n._model.clone();
  52507. n.closeWidget(), t.focus(), r.toggleWidget(o, y.createCancelablePromise((function (e) {
  52508. return Promise.resolve(s)
  52509. })), null !== (i = n._peekMode) && void 0 !== i && i)
  52510. } else n.closeWidget()
  52511. }), (function (e) {
  52512. n._ignoreModelChangeEvent = !1, i.onUnexpectedError(e)
  52513. }))
  52514. }, e.prototype.openReference = function (e, t) {
  52515. t || this.closeWidget();
  52516. var n = e.uri, i = e.range;
  52517. this._editorService.openCodeEditor({resource: n, options: {selection: i}}, this._editor, t)
  52518. }, e.ID = "editor.contrib.referencesController", e = h([g(2, a.IContextKeyService), g(3, r.ICodeEditorService), g(4, _.INotificationService), g(5, s.IInstantiationService), g(6, u.IStorageService), g(7, l.IConfigurationService)], e)
  52519. }();
  52520. function D(e, t) {
  52521. var n = C.getOuterEditor(e);
  52522. if (n) {
  52523. var i = L.get(n);
  52524. i && t(i)
  52525. }
  52526. }
  52527. t.ReferencesController = L, S.KeybindingsRegistry.registerCommandAndKeybindingRule({
  52528. id: "togglePeekWidgetFocus", weight: 100, primary: w.KeyChord(2089, 60),
  52529. when: a.ContextKeyExpr.or(t.ctxReferenceSearchVisible, C.PeekContext.inPeekEditor), handler: function (e) {
  52530. D(e, (function (e) {
  52531. e.changeFocusBetweenPreviewAndReferences()
  52532. }))
  52533. }
  52534. }), S.KeybindingsRegistry.registerCommandAndKeybindingRule({
  52535. id: "goToNextReference",
  52536. weight: 90,
  52537. primary: 62,
  52538. secondary: [70],
  52539. when: a.ContextKeyExpr.or(t.ctxReferenceSearchVisible, C.PeekContext.inPeekEditor),
  52540. handler: function (e) {
  52541. D(e, (function (e) {
  52542. e.goToNextOrPreviousReference(!0)
  52543. }))
  52544. }
  52545. }), S.KeybindingsRegistry.registerCommandAndKeybindingRule({
  52546. id: "goToPreviousReference",
  52547. weight: 90,
  52548. primary: 1086,
  52549. secondary: [1094],
  52550. when: a.ContextKeyExpr.or(t.ctxReferenceSearchVisible, C.PeekContext.inPeekEditor),
  52551. handler: function (e) {
  52552. D(e, (function (e) {
  52553. e.goToNextOrPreviousReference(!1)
  52554. }))
  52555. }
  52556. }), E.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor", "goToNextReference"), E.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor", "goToPreviousReference"), E.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor", "closeReferenceSearch"),
  52557. E.CommandsRegistry.registerCommand("closeReferenceSearch", (function (e) {
  52558. return D(e, (function (e) {
  52559. return e.closeWidget()
  52560. }))
  52561. })), S.KeybindingsRegistry.registerKeybindingRule({
  52562. id: "closeReferenceSearch",
  52563. weight: -1,
  52564. primary: 9,
  52565. secondary: [1033],
  52566. when: a.ContextKeyExpr.and(C.PeekContext.inPeekEditor, a.ContextKeyExpr.not("config.editor.stablePeek"))
  52567. }), S.KeybindingsRegistry.registerKeybindingRule({
  52568. id: "closeReferenceSearch",
  52569. weight: 250,
  52570. primary: 9,
  52571. secondary: [1033],
  52572. when: a.ContextKeyExpr.and(t.ctxReferenceSearchVisible, a.ContextKeyExpr.not("config.editor.stablePeek"))
  52573. }), S.KeybindingsRegistry.registerCommandAndKeybindingRule({
  52574. id: "openReferenceToSide",
  52575. weight: 100,
  52576. primary: 2051,
  52577. mac: {primary: 259},
  52578. when: a.ContextKeyExpr.and(t.ctxReferenceSearchVisible, b.WorkbenchListFocusContextKey),
  52579. handler: function (e) {
  52580. var t, n = null === (t = e.get(b.IListService).lastFocusedList) || void 0 === t ? void 0 : t.getFocus();
  52581. Array.isArray(n) && n[0] instanceof p.OneReference && D(e, (function (e) {
  52582. return e.openReference(n[0], !0)
  52583. }))
  52584. }
  52585. }),
  52586. E.CommandsRegistry.registerCommand("openReference", (function (e) {
  52587. var t, n = null === (t = e.get(b.IListService).lastFocusedList) || void 0 === t ? void 0 : t.getFocus();
  52588. Array.isArray(n) && n[0] instanceof p.OneReference && D(e, (function (e) {
  52589. return e.openReference(n[0], !1)
  52590. }))
  52591. }))
  52592. })), define(n[235], i([0, 1, 50, 15, 36, 16, 108, 12, 32, 13, 3, 23, 17, 122, 123, 234, 113, 446, 65, 18, 35, 73, 224, 29, 67, 537, 24, 25, 11, 21, 167]), (function (e, t, n, i, o, s, a, l, u, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R) {
  52593. "use strict";
  52594. var O, P, A, F, W, B, V, z;
  52595. Object.defineProperty(t, "__esModule", {value: !0}), b.MenuRegistry.appendMenuItem(7, {
  52596. submenu: 8,
  52597. title: C.localize(0, null),
  52598. group: "navigation",
  52599. order: 100
  52600. });
  52601. var H = function (e) {
  52602. function t(t, n) {
  52603. var i = e.call(this, n) || this;
  52604. return i._configuration = t, i
  52605. }
  52606. return r(t, e), t.prototype.run = function (e, t) {
  52607. var o = this;
  52608. if (!t.hasModel()) return Promise.resolve(void 0)
  52609. ;
  52610. var r = e.get(w.INotificationService), s = e.get(u.ICodeEditorService),
  52611. a = e.get(E.IEditorProgressService), l = e.get(x.ISymbolNavigationService), h = t.getModel(),
  52612. p = t.getPosition(), g = new N.EditorStateCancellationTokenSource(t, 5),
  52613. f = i.raceCancellation(this._getLocationModel(h, p, g.token), g.token).then((function (e) {
  52614. return d(o, void 0, void 0, (function () {
  52615. var i, o, r, a;
  52616. return c(this, (function (u) {
  52617. if (!e || g.token.isCancellationRequested) return [2];
  52618. if (n.alert(e.ariaMessage), e.referenceAt(h.uri, p) && (o = this._getAlternativeCommand(t)) !== this.id && (i = t.getAction(o)), 0 === (r = e.references.length)) this._configuration.muteMessage || (a = h.getWordAtPosition(p), m.MessageController.get(t).showMessage(this._getNoResultFoundMessage(a), p)); else {
  52619. if (1 !== r || !i) return [2, this._onResult(s, l, t, e)];
  52620. i.run()
  52621. }
  52622. return [2]
  52623. }))
  52624. }))
  52625. }), (function (e) {
  52626. r.error(e)
  52627. })).finally((function () {
  52628. g.dispose()
  52629. }));
  52630. return a.showWhile(f, 250), f
  52631. }, t.prototype._onResult = function (e, t, n, i) {
  52632. return d(this, void 0, void 0, (function () {
  52633. var o, r, s, a;
  52634. return c(this, (function (l) {
  52635. switch (l.label) {
  52636. case 0:
  52637. return o = this._getGoToPreference(n), n instanceof R.EmbeddedCodeEditorWidget || !(this._configuration.openInPeek || "peek" === o && i.references.length > 1) ? [3, 1] : (this._openInPeek(n, i), [3, 3]);
  52638. case 1:
  52639. return r = i.firstReference(), s = i.references.length > 1 && "gotoAndPeek" === o, [4, this._openReference(n, e, r, this._configuration.openToSide, !s)];
  52640. case 2:
  52641. a = l.sent(), s && a ? this._openInPeek(a, i) : i.dispose(), "goto" === o && t.put(r), l.label = 3;
  52642. case 3:
  52643. return [2]
  52644. }
  52645. }))
  52646. }))
  52647. }, t.prototype._openReference = function (e, t, n, i, o) {
  52648. return d(this, void 0, void 0, (function () {
  52649. var r, s, a, l;
  52650. return c(this, (function (u) {
  52651. switch (u.label) {
  52652. case 0:
  52653. return r = void 0, f.isLocationLink(n) && (r = n.targetSelectionRange), r || (r = n.range), [4, t.openCodeEditor({
  52654. resource: n.uri,
  52655. options: {
  52656. selection: p.Range.collapseToStart(r),
  52657. revealInCenterIfOutsideViewport: !0
  52658. }
  52659. }, e, i)];
  52660. case 1:
  52661. return (s = u.sent()) ? (o && (a = s.getModel(), l = s.deltaDecorations([], [{
  52662. range: r,
  52663. options: {className: "symbolHighlight"}
  52664. }]), setTimeout((function () {
  52665. s.getModel() === a && s.deltaDecorations(l, [])
  52666. }), 350)), [2, s]) : [2, void 0]
  52667. }
  52668. }))
  52669. }))
  52670. },
  52671. t.prototype._openInPeek = function (e, t) {
  52672. var n = _.ReferencesController.get(e);
  52673. n && e.hasModel() ? n.toggleWidget(e.getSelection(), i.createCancelablePromise((function (e) {
  52674. return Promise.resolve(t)
  52675. })), this._configuration.openInPeek) : t.dispose()
  52676. }, t
  52677. }(l.EditorAction), K = function (e) {
  52678. function t() {
  52679. return null !== e && e.apply(this, arguments) || this
  52680. }
  52681. return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
  52682. return d(this, void 0, void 0, (function () {
  52683. var i;
  52684. return c(this, (function (o) {
  52685. switch (o.label) {
  52686. case 0:
  52687. return i = y.ReferencesModel.bind, [4, L.getDefinitionsAtPosition(e, t, n)];
  52688. case 1:
  52689. return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(1, null)]))]
  52690. }
  52691. }))
  52692. }))
  52693. }, t.prototype._getNoResultFoundMessage = function (e) {
  52694. return e && e.word ? C.localize(2, null, e.word) : C.localize(3, null)
  52695. }, t.prototype._getAlternativeCommand = function (e) {
  52696. return e.getOption(41).alternativeDefinitionCommand
  52697. }, t.prototype._getGoToPreference = function (e) {
  52698. return e.getOption(41).multipleDefinitions
  52699. }, t
  52700. }(H);
  52701. t.DefinitionAction = K;
  52702. var U = s.isWeb && !I.isStandalone ? 2118 : 70
  52703. ;l.registerEditorAction(((O = function (e) {
  52704. function t() {
  52705. var n = e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
  52706. id: t.id,
  52707. label: C.localize(4, null),
  52708. alias: "Go to Definition",
  52709. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDefinitionProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52710. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: U, weight: 100},
  52711. contextMenuOpts: {group: "navigation", order: 1.1},
  52712. menuOpts: {menuId: 19, group: "4_symbol_nav", order: 2, title: C.localize(5, null)}
  52713. }) || this;
  52714. return D.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration", t.id), n
  52715. }
  52716. return r(t, e), t
  52717. }(K)).id = "editor.action.revealDefinition", O)), l.registerEditorAction(((P = function (e) {
  52718. function t() {
  52719. var n = e.call(this, {openToSide: !0, openInPeek: !1, muteMessage: !1}, {
  52720. id: t.id,
  52721. label: C.localize(6, null),
  52722. alias: "Open Definition to the Side",
  52723. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDefinitionProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52724. kbOpts: {
  52725. kbExpr: g.EditorContextKeys.editorTextFocus,
  52726. primary: o.KeyChord(2089, U), weight: 100
  52727. }
  52728. }) || this;
  52729. return D.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide", t.id), n
  52730. }
  52731. return r(t, e), t
  52732. }(K)).id = "editor.action.revealDefinitionAside", P)), l.registerEditorAction(((A = function (e) {
  52733. function t() {
  52734. var n = e.call(this, {openToSide: !1, openInPeek: !0, muteMessage: !1}, {
  52735. id: t.id,
  52736. label: C.localize(7, null),
  52737. alias: "Peek Definition",
  52738. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDefinitionProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52739. kbOpts: {
  52740. kbExpr: g.EditorContextKeys.editorTextFocus,
  52741. primary: 582,
  52742. linux: {primary: 3140},
  52743. weight: 100
  52744. },
  52745. contextMenuOpts: {menuId: 8, group: "peek", order: 2}
  52746. }) || this;
  52747. return D.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration", t.id), n
  52748. }
  52749. return r(t, e), t
  52750. }(K)).id = "editor.action.peekDefinition", A));
  52751. var j = function (e) {
  52752. function t() {
  52753. return null !== e && e.apply(this, arguments) || this
  52754. }
  52755. return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
  52756. return d(this, void 0, void 0, (function () {
  52757. var i
  52758. ;
  52759. return c(this, (function (o) {
  52760. switch (o.label) {
  52761. case 0:
  52762. return i = y.ReferencesModel.bind, [4, L.getDeclarationsAtPosition(e, t, n)];
  52763. case 1:
  52764. return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(8, null)]))]
  52765. }
  52766. }))
  52767. }))
  52768. }, t.prototype._getNoResultFoundMessage = function (e) {
  52769. return e && e.word ? C.localize(9, null, e.word) : C.localize(10, null)
  52770. }, t.prototype._getAlternativeCommand = function (e) {
  52771. return e.getOption(41).alternativeDeclarationCommand
  52772. }, t.prototype._getGoToPreference = function (e) {
  52773. return e.getOption(41).multipleDeclarations
  52774. }, t
  52775. }(H);
  52776. l.registerEditorAction(((F = function (e) {
  52777. function t() {
  52778. return e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
  52779. id: t.id,
  52780. label: C.localize(11, null),
  52781. alias: "Go to Declaration",
  52782. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDeclarationProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52783. contextMenuOpts: {group: "navigation", order: 1.3},
  52784. menuOpts: {menuId: 19, group: "4_symbol_nav", order: 3, title: C.localize(12, null)}
  52785. }) || this
  52786. }
  52787. return r(t, e), t.prototype._getNoResultFoundMessage = function (e) {
  52788. return e && e.word ? C.localize(13, null, e.word) : C.localize(14, null)
  52789. }, t
  52790. }(j)).id = "editor.action.revealDeclaration", F)), l.registerEditorAction(function (e) {
  52791. function t() {
  52792. return e.call(this, {
  52793. openToSide: !1,
  52794. openInPeek: !0,
  52795. muteMessage: !1
  52796. }, {
  52797. id: "editor.action.peekDeclaration",
  52798. label: C.localize(15, null),
  52799. alias: "Peek Declaration",
  52800. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasDeclarationProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52801. contextMenuOpts: {menuId: 8, group: "peek", order: 3}
  52802. }) || this
  52803. }
  52804. return r(t, e), t
  52805. }(j));
  52806. var q = function (e) {
  52807. function t() {
  52808. return null !== e && e.apply(this, arguments) || this
  52809. }
  52810. return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
  52811. return d(this, void 0, void 0, (function () {
  52812. var i;
  52813. return c(this, (function (o) {
  52814. switch (o.label) {
  52815. case 0:
  52816. return i = y.ReferencesModel.bind, [4, L.getTypeDefinitionsAtPosition(e, t, n)];
  52817. case 1:
  52818. return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(16, null)]))]
  52819. }
  52820. }))
  52821. }))
  52822. }, t.prototype._getNoResultFoundMessage = function (e) {
  52823. return e && e.word ? C.localize(17, null, e.word) : C.localize(18, null)
  52824. }, t.prototype._getAlternativeCommand = function (e) {
  52825. return e.getOption(41).alternativeTypeDefinitionCommand
  52826. }, t.prototype._getGoToPreference = function (e) {
  52827. return e.getOption(41).multipleTypeDefinitions
  52828. }, t
  52829. }(H);
  52830. l.registerEditorAction(((W = function (e) {
  52831. function t() {
  52832. return e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
  52833. id: t.ID,
  52834. label: C.localize(19, null),
  52835. alias: "Go to Type Definition",
  52836. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasTypeDefinitionProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52837. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 0, weight: 100},
  52838. contextMenuOpts: {group: "navigation", order: 1.4},
  52839. menuOpts: {menuId: 19, group: "4_symbol_nav", order: 3, title: C.localize(20, null)}
  52840. }) || this
  52841. }
  52842. return r(t, e), t
  52843. }(q)).ID = "editor.action.goToTypeDefinition", W)), l.registerEditorAction(((B = function (e) {
  52844. function t() {
  52845. return e.call(this, {openToSide: !1, openInPeek: !0, muteMessage: !1}, {
  52846. id: t.ID,
  52847. label: C.localize(21, null),
  52848. alias: "Peek Type Definition",
  52849. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasTypeDefinitionProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52850. contextMenuOpts: {menuId: 8, group: "peek", order: 4}
  52851. }) || this
  52852. }
  52853. return r(t, e), t
  52854. }(q)).ID = "editor.action.peekTypeDefinition", B));
  52855. var G = function (e) {
  52856. function t() {
  52857. return null !== e && e.apply(this, arguments) || this
  52858. }
  52859. return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
  52860. return d(this, void 0, void 0, (function () {
  52861. var i;
  52862. return c(this, (function (o) {
  52863. switch (o.label) {
  52864. case 0:
  52865. return i = y.ReferencesModel.bind, [4, L.getImplementationsAtPosition(e, t, n)];
  52866. case 1:
  52867. return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(22, null)]))]
  52868. }
  52869. }))
  52870. }))
  52871. }, t.prototype._getNoResultFoundMessage = function (e) {
  52872. return e && e.word ? C.localize(23, null, e.word) : C.localize(24, null)
  52873. }, t.prototype._getAlternativeCommand = function (e) {
  52874. return e.getOption(41).alternativeImplementationCommand
  52875. }, t.prototype._getGoToPreference = function (e) {
  52876. return e.getOption(41).multipleImplementations
  52877. }, t
  52878. }(H);
  52879. l.registerEditorAction(((V = function (e) {
  52880. function t() {
  52881. return e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
  52882. id: t.ID,
  52883. label: C.localize(25, null),
  52884. alias: "Go to Implementations",
  52885. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasImplementationProvider, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52886. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 2118, weight: 100},
  52887. menuOpts: {menuId: 19, group: "4_symbol_nav", order: 4, title: C.localize(26, null)},
  52888. contextMenuOpts: {group: "navigation", order: 1.45}
  52889. }) || this
  52890. }
  52891. return r(t, e), t
  52892. }(G)).ID = "editor.action.goToImplementation", V)), l.registerEditorAction(((z = function (e) {
  52893. function t() {
  52894. return e.call(this, {openToSide: !1, openInPeek: !0, muteMessage: !1}, {
  52895. id: t.ID,
  52896. label: C.localize(27, null),
  52897. alias: "Peek Implementations",
  52898. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasImplementationProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52899. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 3142, weight: 100},
  52900. contextMenuOpts: {
  52901. menuId: 8, group: "peek", order: 5
  52902. }
  52903. }) || this
  52904. }
  52905. return r(t, e), t
  52906. }(G)).ID = "editor.action.peekImplementation", z));
  52907. var Y = function (e) {
  52908. function t() {
  52909. return null !== e && e.apply(this, arguments) || this
  52910. }
  52911. return r(t, e), t.prototype._getNoResultFoundMessage = function (e) {
  52912. return e ? C.localize(28, null, e.word) : C.localize(29, null)
  52913. }, t.prototype._getAlternativeCommand = function (e) {
  52914. return e.getOption(41).alternativeReferenceCommand
  52915. }, t.prototype._getGoToPreference = function (e) {
  52916. return e.getOption(41).multipleReferences
  52917. }, t
  52918. }(H);
  52919. l.registerEditorAction(function (e) {
  52920. function t() {
  52921. return e.call(this, {openToSide: !1, openInPeek: !1, muteMessage: !1}, {
  52922. id: "editor.action.goToReferences",
  52923. label: C.localize(30, null),
  52924. alias: "Go to References",
  52925. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasReferenceProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52926. kbOpts: {kbExpr: g.EditorContextKeys.editorTextFocus, primary: 1094, weight: 100},
  52927. contextMenuOpts: {group: "navigation", order: 1.45},
  52928. menuOpts: {
  52929. menuId: 19, group: "4_symbol_nav", order: 5,
  52930. title: C.localize(31, null)
  52931. }
  52932. }) || this
  52933. }
  52934. return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
  52935. return d(this, void 0, void 0, (function () {
  52936. var i;
  52937. return c(this, (function (o) {
  52938. switch (o.label) {
  52939. case 0:
  52940. return i = y.ReferencesModel.bind, [4, L.getReferencesAtPosition(e, t, !0, n)];
  52941. case 1:
  52942. return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(32, null)]))]
  52943. }
  52944. }))
  52945. }))
  52946. }, t
  52947. }(Y)), l.registerEditorAction(function (e) {
  52948. function t() {
  52949. return e.call(this, {
  52950. openToSide: !1,
  52951. openInPeek: !0,
  52952. muteMessage: !1
  52953. }, {
  52954. id: "editor.action.referenceSearch.trigger",
  52955. label: C.localize(33, null),
  52956. alias: "Peek References",
  52957. precondition: S.ContextKeyExpr.and(g.EditorContextKeys.hasReferenceProvider, v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated()),
  52958. contextMenuOpts: {menuId: 8, group: "peek", order: 6}
  52959. }) || this
  52960. }
  52961. return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
  52962. return d(this, void 0, void 0, (function () {
  52963. var i;
  52964. return c(this, (function (o) {
  52965. switch (o.label) {
  52966. case 0:
  52967. return i = y.ReferencesModel.bind, [4, L.getReferencesAtPosition(e, t, !1, n)];
  52968. case 1:
  52969. return [2, new (i.apply(y.ReferencesModel, [void 0, o.sent(), C.localize(34, null)]))]
  52970. }
  52971. }))
  52972. }))
  52973. }, t
  52974. }(Y));
  52975. var Z = function (e) {
  52976. function t(t, n, i) {
  52977. var o = e.call(this, t, {
  52978. id: "editor.action.goToLocation",
  52979. label: C.localize(35, null),
  52980. alias: "Go To Any Symbol",
  52981. precondition: S.ContextKeyExpr.and(v.PeekContext.notInPeekEditor, g.EditorContextKeys.isInEmbeddedEditor.toNegated())
  52982. }) || this;
  52983. return o._references = n, o._gotoMultipleBehaviour = i, o
  52984. }
  52985. return r(t, e), t.prototype._getLocationModel = function (e, t, n) {
  52986. return d(this, void 0, void 0, (function () {
  52987. return c(this, (function (e) {
  52988. return [2, new y.ReferencesModel(this._references, C.localize(36, null))]
  52989. }))
  52990. }))
  52991. }, t.prototype._getNoResultFoundMessage = function (e) {
  52992. return e && C.localize(37, null, e.word) || ""
  52993. }, t.prototype._getGoToPreference = function (e) {
  52994. var t;
  52995. return null !== (t = this._gotoMultipleBehaviour) && void 0 !== t ? t : e.getOption(41).multipleReferences
  52996. }, t.prototype._getAlternativeCommand = function () {
  52997. return ""
  52998. }, t
  52999. }(H);
  53000. D.CommandsRegistry.registerCommand({
  53001. id: "editor.action.goToLocations", description: {
  53002. description: "Go to locations from a position in a file",
  53003. args: [{
  53004. name: "uri",
  53005. description: "The text document in which to start",
  53006. constraint: M.URI
  53007. }, {
  53008. name: "position",
  53009. description: "The position at which to start",
  53010. constraint: h.Position.isIPosition
  53011. }, {name: "locations", description: "An array of locations.", constraint: Array}, {
  53012. name: "multiple",
  53013. description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"
  53014. }]
  53015. }, handler: function (e, t, n, i, o, r) {
  53016. return d(void 0, void 0, void 0, (function () {
  53017. var s, l;
  53018. return c(this, (function (d) {
  53019. switch (d.label) {
  53020. case 0:
  53021. return T.assertType(M.URI.isUri(t)), T.assertType(h.Position.isIPosition(n)), T.assertType(Array.isArray(i)), T.assertType(void 0 === o || "string" == typeof o), T.assertType(void 0 === r || "boolean" == typeof r), [4, (s = e.get(u.ICodeEditorService)).openCodeEditor({resource: t}, s.getFocusedCodeEditor())];
  53022. case 1:
  53023. return l = d.sent(), a.isCodeEditor(l) ? (l.setPosition(n), l.revealPositionInCenterIfOutsideViewport(n, 0), [2, l.invokeWithinContext((function (e) {
  53024. var t = new Z({
  53025. muteMessage: !0, openInPeek: Boolean(r), openToSide: !1
  53026. }, i, o);
  53027. e.get(k.IInstantiationService).invokeFunction(t.run.bind(t), l)
  53028. }))]) : [2]
  53029. }
  53030. }))
  53031. }))
  53032. }
  53033. }), D.CommandsRegistry.registerCommand({
  53034. id: "editor.action.peekLocations",
  53035. description: {
  53036. description: "Peek locations from a position in a file",
  53037. args: [{
  53038. name: "uri",
  53039. description: "The text document in which to start",
  53040. constraint: M.URI
  53041. }, {
  53042. name: "position",
  53043. description: "The position at which to start",
  53044. constraint: h.Position.isIPosition
  53045. }, {name: "locations", description: "An array of locations.", constraint: Array}, {
  53046. name: "multiple",
  53047. description: "Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"
  53048. }]
  53049. },
  53050. handler: function (e, t, n, i, o) {
  53051. return d(void 0, void 0, void 0, (function () {
  53052. return c(this, (function (r) {
  53053. return e.get(D.ICommandService).executeCommand("editor.action.goToLocations", t, n, i, o, !0), [2]
  53054. }))
  53055. }))
  53056. }
  53057. }), D.CommandsRegistry.registerCommand({
  53058. id: "editor.action.findReferences", handler: function (e, t, n) {
  53059. T.assertType(M.URI.isUri(t)), T.assertType(h.Position.isIPosition(n))
  53060. ;var o = e.get(u.ICodeEditorService);
  53061. return o.openCodeEditor({resource: t}, o.getFocusedCodeEditor()).then((function (e) {
  53062. if (a.isCodeEditor(e) && e.hasModel()) {
  53063. var t = _.ReferencesController.get(e);
  53064. if (t) {
  53065. var o = i.createCancelablePromise((function (t) {
  53066. return L.getReferencesAtPosition(e.getModel(), h.Position.lift(n), !1, t).then((function (e) {
  53067. return new y.ReferencesModel(e, C.localize(38, null))
  53068. }))
  53069. })), r = new p.Range(n.lineNumber, n.column, n.lineNumber, n.column);
  53070. return Promise.resolve(t.toggleWidget(r, o, !1))
  53071. }
  53072. }
  53073. }))
  53074. }
  53075. }), D.CommandsRegistry.registerCommandAlias("editor.action.showReferences", "editor.action.peekLocations")
  53076. })), define(n[236], i([0, 1, 447, 15, 10, 75, 71, 3, 17, 12, 224, 2, 84, 14, 20, 67, 235, 199, 13, 21, 313]), (function (e, t, n, i, o, r, s, a, l, u, d, c, p, f, m, v, _, y, C, b) {
  53077. "use strict";
  53078. Object.defineProperty(t, "__esModule", {value: !0});
  53079. var S = function () {
  53080. function e(e, t, n) {
  53081. var i = this;
  53082. this.textModelResolverService = t, this.modeService = n, this.toUnhook = new c.DisposableStore, this.toUnhookForKeyboard = new c.DisposableStore, this.linkDecorations = [],
  53083. this.currentWordAtPosition = null, this.previousPromise = null, this.editor = e;
  53084. var r = new y.ClickLinkGesture(e);
  53085. this.toUnhook.add(r), this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown((function (e) {
  53086. var t = e[0], n = e[1];
  53087. i.startFindDefinitionFromMouse(t, b.withNullAsUndefined(n))
  53088. }))), this.toUnhook.add(r.onExecute((function (e) {
  53089. i.isEnabled(e) && i.gotoDefinition(e.target.position, e.hasSideBySideModifier).then((function () {
  53090. i.removeLinkDecorations()
  53091. }), (function (e) {
  53092. i.removeLinkDecorations(), o.onUnexpectedError(e)
  53093. }))
  53094. }))), this.toUnhook.add(r.onCancel((function () {
  53095. i.removeLinkDecorations(), i.currentWordAtPosition = null
  53096. })))
  53097. }
  53098. return e.get = function (t) {
  53099. return t.getContribution(e.ID)
  53100. }, e.prototype.startFindDefinitionFromCursor = function (e) {
  53101. var t = this;
  53102. return this.startFindDefinition(e).then((function () {
  53103. t.toUnhookForKeyboard.add(t.editor.onDidChangeCursorPosition((function () {
  53104. t.currentWordAtPosition = null, t.removeLinkDecorations(), t.toUnhookForKeyboard.clear()
  53105. }))), t.toUnhookForKeyboard.add(t.editor.onKeyDown((function (e) {
  53106. e && (t.currentWordAtPosition = null, t.removeLinkDecorations(), t.toUnhookForKeyboard.clear())
  53107. })))
  53108. }))
  53109. }, e.prototype.startFindDefinitionFromMouse = function (e, t) {
  53110. if (!(9 === e.target.type && this.linkDecorations.length > 0)) {
  53111. if (!this.editor.hasModel() || !this.isEnabled(e, t)) return this.currentWordAtPosition = null, void this.removeLinkDecorations();
  53112. var n = e.target.position;
  53113. this.startFindDefinition(n)
  53114. }
  53115. }, e.prototype.startFindDefinition = function (e) {
  53116. var t, s = this;
  53117. this.toUnhookForKeyboard.clear();
  53118. var l = e ? null === (t = this.editor.getModel()) || void 0 === t ? void 0 : t.getWordAtPosition(e) : null;
  53119. if (!l) return this.currentWordAtPosition = null, this.removeLinkDecorations(), Promise.resolve(0);
  53120. if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === l.startColumn && this.currentWordAtPosition.endColumn === l.endColumn && this.currentWordAtPosition.word === l.word) return Promise.resolve(0);
  53121. this.currentWordAtPosition = l;
  53122. var u = new v.EditorState(this.editor, 15);
  53123. return this.previousPromise && (this.previousPromise.cancel(), this.previousPromise = null),
  53124. this.previousPromise = i.createCancelablePromise((function (t) {
  53125. return s.findDefinition(e, t)
  53126. })), this.previousPromise.then((function (t) {
  53127. if (t && t.length && u.validate(s.editor)) if (t.length > 1) s.addDecoration(new a.Range(e.lineNumber, l.startColumn, e.lineNumber, l.endColumn), (new r.MarkdownString).appendText(n.localize(0, null, t.length))); else {
  53128. var i = t[0];
  53129. if (!i.uri) return;
  53130. s.textModelResolverService.createModelReference(i.uri).then((function (t) {
  53131. if (t.object && t.object.textEditorModel) {
  53132. var n = t.object.textEditorModel, o = i.range.startLineNumber;
  53133. if (o < 1 || o > n.getLineCount()) t.dispose(); else {
  53134. var u, d = s.getPreviewValue(n, o, i);
  53135. u = i.originSelectionRange ? a.Range.lift(i.originSelectionRange) : new a.Range(e.lineNumber, l.startColumn, e.lineNumber, l.endColumn);
  53136. var c = s.modeService.getModeIdByFilepathOrFirstLine(n.uri);
  53137. s.addDecoration(u, (new r.MarkdownString).appendCodeblock(c || "", d)), t.dispose()
  53138. }
  53139. } else t.dispose()
  53140. }))
  53141. } else s.removeLinkDecorations()
  53142. })).then(void 0, o.onUnexpectedError)
  53143. }, e.prototype.getPreviewValue = function (t, n, i) {
  53144. var o = i.targetSelectionRange ? i.range : this.getPreviewRangeBasedOnBrackets(t, n);
  53145. return o.endLineNumber - o.startLineNumber >= e.MAX_SOURCE_PREVIEW_LINES && (o = this.getPreviewRangeBasedOnIndentation(t, n)), this.stripIndentationFromPreviewRange(t, n, o)
  53146. }, e.prototype.stripIndentationFromPreviewRange = function (e, t, n) {
  53147. for (var i = e.getLineFirstNonWhitespaceColumn(t), o = t + 1; o < n.endLineNumber; o++) {
  53148. var r = e.getLineFirstNonWhitespaceColumn(o);
  53149. i = Math.min(i, r)
  53150. }
  53151. return e.getValueInRange(n).replace(new RegExp("^\\s{" + (i - 1) + "}", "gm"), "").trim()
  53152. }, e.prototype.getPreviewRangeBasedOnIndentation = function (t, n) {
  53153. for (var i = t.getLineFirstNonWhitespaceColumn(n), o = Math.min(t.getLineCount(), n + e.MAX_SOURCE_PREVIEW_LINES), r = n + 1; r < o; r++) {
  53154. if (i === t.getLineFirstNonWhitespaceColumn(r)) break
  53155. }
  53156. return new a.Range(n, 1, r + 1, 1)
  53157. }, e.prototype.getPreviewRangeBasedOnBrackets = function (t, n) {
  53158. for (var i = Math.min(t.getLineCount(), n + e.MAX_SOURCE_PREVIEW_LINES), o = [], r = !0, s = t.findNextBracket(new C.Position(n, 1)); null !== s;) {
  53159. if (0 === o.length) o.push(s); else {
  53160. var l = o[o.length - 1]
  53161. ;
  53162. if (l.open[0] === s.open[0] && l.isOpen && !s.isOpen ? o.pop() : o.push(s), 0 === o.length) {
  53163. if (!r) return new a.Range(n, 1, s.range.endLineNumber + 1, 1);
  53164. r = !1
  53165. }
  53166. }
  53167. var u = t.getLineMaxColumn(n), d = s.range.endLineNumber, c = s.range.endColumn;
  53168. if (u === s.range.endColumn && (d++, c = 1), d > i) return new a.Range(n, 1, i + 1, 1);
  53169. s = t.findNextBracket(new C.Position(d, c))
  53170. }
  53171. return new a.Range(n, 1, i + 1, 1)
  53172. }, e.prototype.addDecoration = function (e, t) {
  53173. var n = {range: e, options: {inlineClassName: "goto-definition-link", hoverMessage: t}};
  53174. this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, [n])
  53175. }, e.prototype.removeLinkDecorations = function () {
  53176. this.linkDecorations.length > 0 && (this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, []))
  53177. }, e.prototype.isEnabled = function (e, t) {
  53178. return this.editor.hasModel() && e.isNoneOrSingleMouseDown && 6 === e.target.type && (e.hasTriggerModifier || !!t && t.keyCodeIsTriggerKey) && l.DefinitionProviderRegistry.has(this.editor.getModel())
  53179. }, e.prototype.findDefinition = function (e, t) {
  53180. var n = this.editor.getModel()
  53181. ;
  53182. return n ? d.getDefinitionsAtPosition(n, e, t) : Promise.resolve(null)
  53183. }, e.prototype.gotoDefinition = function (e, t) {
  53184. var n = this;
  53185. this.editor.setPosition(e);
  53186. var i = new _.DefinitionAction({openToSide: t, openInPeek: !1, muteMessage: !0}, {
  53187. alias: "",
  53188. label: "",
  53189. id: "",
  53190. precondition: void 0
  53191. });
  53192. return this.editor.invokeWithinContext((function (e) {
  53193. return i.run(e, n.editor)
  53194. }))
  53195. }, e.prototype.dispose = function () {
  53196. this.toUnhook.dispose()
  53197. }, e.ID = "editor.contrib.gotodefinitionatposition", e.MAX_SOURCE_PREVIEW_LINES = 8, e = h([g(1, p.ITextModelService), g(2, s.IModeService)], e)
  53198. }();
  53199. t.GotoDefinitionAtPositionEditorContribution = S, u.registerEditorContribution(S.ID, S), f.registerThemingParticipant((function (e, t) {
  53200. var n = e.getColor(m.editorActiveLinkForeground);
  53201. n && t.addRule(".monaco-editor .goto-definition-link { color: " + n + " !important; }")
  53202. }))
  53203. })), define(n[597], i([0, 1, 12, 32, 234, 43, 18, 11, 35, 74]), (function (e, t, n, i, o, s, a, l, u, d) {
  53204. "use strict";
  53205. Object.defineProperty(t, "__esModule", {value: !0});
  53206. var c = function (e) {
  53207. function t(t, n, i, o, r, s, a) {
  53208. return e.call(this, !0, t, n, i, o, r, s, a) || this
  53209. }
  53210. return r(t, e), t = h([g(1, a.IContextKeyService), g(2, i.ICodeEditorService), g(3, u.INotificationService), g(4, l.IInstantiationService), g(5, d.IStorageService), g(6, s.IConfigurationService)], t)
  53211. }(o.ReferencesController);
  53212. t.StandaloneReferencesController = c, n.registerEditorContribution(o.ReferencesController.ID, c)
  53213. })), define(n[598], i([0, 1, 112, 14, 20]), (function (e, t, n, i, o) {
  53214. "use strict";
  53215. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  53216. e.className = function (e) {
  53217. switch (e) {
  53218. case n.default.Ignore:
  53219. return "severity-ignore codicon-info";
  53220. case n.default.Info:
  53221. return "codicon-info";
  53222. case n.default.Warning:
  53223. return "codicon-warning";
  53224. case n.default.Error:
  53225. return "codicon-error"
  53226. }
  53227. return ""
  53228. }
  53229. }(t.SeverityIcon || (t.SeverityIcon = {})), i.registerThemingParticipant((function (e, t) {
  53230. var n = e.getColor(o.problemsErrorIconForeground)
  53231. ;n && t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-error,\n\t\t\t.markers-panel .marker-icon.codicon-error,\n\t\t\t.extensions-viewlet > .extensions .codicon-error,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-error {\n\t\t\t\tcolor: " + n + ";\n\t\t\t}\n\t\t");
  53232. var i = e.getColor(o.problemsWarningIconForeground);
  53233. n && t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-warning,\n\t\t\t.markers-panel .marker-icon.codicon-warning,\n\t\t\t.extensions-viewlet > .extensions .codicon-warning,\n\t\t\t.extension-editor .codicon-warning,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-warning {\n\t\t\t\tcolor: " + i + ";\n\t\t\t}\n\t\t");
  53234. var r = e.getColor(o.problemsInfoIconForeground);
  53235. n && t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-info,\n\t\t\t.markers-panel .marker-icon.codicon-info,\n\t\t\t.extensions-viewlet > .extensions .codicon-info,\n\t\t\t.extension-editor .codicon-info,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-info {\n\t\t\t\tcolor: " + r + ";\n\t\t\t}\n\t\t")
  53236. }))
  53237. })),
  53238. define(n[599], i([0, 1, 445, 6, 2, 72, 3, 20, 14, 27, 53, 136, 19, 4, 123, 39, 598, 312]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v) {
  53239. "use strict";
  53240. Object.defineProperty(t, "__esModule", {value: !0});
  53241. var _ = function () {
  53242. function e(e, t, n, r) {
  53243. var s = this;
  53244. this._openerService = r, this._lines = 0, this._longestLineLength = 0, this._relatedDiagnostics = new WeakMap, this._disposables = new o.DisposableStore, this._editor = t;
  53245. var a = document.createElement("div");
  53246. a.className = "descriptioncontainer", a.setAttribute("aria-live", "assertive"), a.setAttribute("role", "alert"), this._messageBlock = document.createElement("div"), i.addClass(this._messageBlock, "message"), a.appendChild(this._messageBlock), this._relatedBlock = document.createElement("div"), a.appendChild(this._relatedBlock), this._disposables.add(i.addStandardDisposableListener(this._relatedBlock, "click", (function (e) {
  53247. e.preventDefault();
  53248. var t = s._relatedDiagnostics.get(e.target);
  53249. t && n(t)
  53250. }))), this._scrollable = new c.ScrollableElement(a, {
  53251. horizontal: 1, vertical: 1, useShadows: !1, horizontalScrollbarSize: 3,
  53252. verticalScrollbarSize: 3
  53253. }), e.appendChild(this._scrollable.getDomNode()), this._disposables.add(this._scrollable.onScroll((function (e) {
  53254. a.style.left = "-" + e.scrollLeft + "px", a.style.top = "-" + e.scrollTop + "px"
  53255. }))), this._disposables.add(this._scrollable)
  53256. }
  53257. return e.prototype.dispose = function () {
  53258. o.dispose(this._disposables)
  53259. }, e.prototype.update = function (e) {
  53260. var t = this, n = e.source, o = e.message, r = e.relatedInformation, s = e.code,
  53261. a = ((null == n ? void 0 : n.length) || 0) + "()".length;
  53262. s && (a += "string" == typeof s ? s.length : s.value.length);
  53263. var l = o.split(/\r\n|\r|\n/g);
  53264. this._lines = l.length, this._longestLineLength = 0;
  53265. for (var u = 0, d = l; u < d.length; u++) {
  53266. var c = d[u];
  53267. this._longestLineLength = Math.max(c.length + a, this._longestLineLength)
  53268. }
  53269. i.clearNode(this._messageBlock), this._editor.applyFontInfo(this._messageBlock);
  53270. for (var g = this._messageBlock, f = 0, m = l; f < m.length; f++) {
  53271. c = m[f];
  53272. (g = document.createElement("div")).innerText = c, "" === c && (g.style.height = this._messageBlock.style.lineHeight), this._messageBlock.appendChild(g)
  53273. }
  53274. if (n || s) {
  53275. var v, _ = document.createElement("span")
  53276. ;
  53277. if (i.addClass(_, "details"), g.appendChild(_), n) {
  53278. var y = document.createElement("span");
  53279. y.innerText = n, i.addClass(y, "source"), _.appendChild(y)
  53280. }
  53281. if (s) if ("string" == typeof s) (v = document.createElement("span")).innerText = "(" + s + ")", i.addClass(v, "code"), _.appendChild(v); else this._codeLink = i.$("a.code-link"), this._codeLink.setAttribute("href", "" + s.link.toString()), this._codeLink.onclick = function (e) {
  53282. t._openerService.open(s.link), e.preventDefault(), e.stopPropagation()
  53283. }, (v = i.append(this._codeLink, i.$("span"))).innerText = s.value, _.appendChild(this._codeLink)
  53284. }
  53285. if (i.clearNode(this._relatedBlock), this._editor.applyFontInfo(this._relatedBlock), p.isNonEmptyArray(r)) {
  53286. var C = this._relatedBlock.appendChild(document.createElement("div"));
  53287. C.style.paddingTop = Math.floor(.66 * this._editor.getOption(49)) + "px", this._lines += 1;
  53288. for (var b = 0, S = r; b < S.length; b++) {
  53289. var w = S[b], E = document.createElement("div"), L = document.createElement("a");
  53290. i.addClass(L, "filename"), L.innerHTML = h.getBaseLabel(w.resource) + "(" + w.startLineNumber + ", " + w.startColumn + "): ",
  53291. L.title = h.getPathLabel(w.resource, void 0), this._relatedDiagnostics.set(L, w);
  53292. var D = document.createElement("span");
  53293. D.innerText = w.message, E.appendChild(L), E.appendChild(D), this._lines += 1, C.appendChild(E)
  53294. }
  53295. }
  53296. var N = this._editor.getOption(34),
  53297. x = Math.ceil(N.typicalFullwidthCharacterWidth * this._longestLineLength * .75),
  53298. I = N.lineHeight * this._lines;
  53299. this._scrollable.setScrollDimensions({scrollWidth: x, scrollHeight: I})
  53300. }, e.prototype.layout = function (e, t) {
  53301. this._scrollable.getDomNode().style.height = e + "px", this._scrollable.getDomNode().style.width = t + "px", this._scrollable.setScrollDimensions({
  53302. width: t,
  53303. height: e
  53304. })
  53305. }, e.prototype.getHeightInLines = function () {
  53306. return Math.min(17, this._lines)
  53307. }, e
  53308. }(), y = function (e) {
  53309. function l(t, n, i, r) {
  53310. var a = e.call(this, t, {showArrow: !0, showFrame: !0, isAccessible: !0}) || this;
  53311. return a.actions = n, a._themeService = i, a._openerService = r, a._callOnDispose = new o.DisposableStore, a._onDidSelectRelatedInformation = new g.Emitter, a.onDidSelectRelatedInformation = a._onDidSelectRelatedInformation.event,
  53312. a._severity = s.MarkerSeverity.Warning, a._backgroundColor = d.Color.white, a._applyTheme(i.getTheme()), a._callOnDispose.add(i.onThemeChange(a._applyTheme.bind(a))), a.create(), a
  53313. }
  53314. return r(l, e), l.prototype._applyTheme = function (e) {
  53315. this._backgroundColor = e.getColor(t.editorMarkerNavigationBackground);
  53316. var n = t.editorMarkerNavigationError;
  53317. this._severity === s.MarkerSeverity.Warning ? n = t.editorMarkerNavigationWarning : this._severity === s.MarkerSeverity.Info && (n = t.editorMarkerNavigationInfo);
  53318. var i = e.getColor(n);
  53319. this.style({
  53320. arrowColor: i,
  53321. frameColor: i,
  53322. headerBackgroundColor: this._backgroundColor,
  53323. primaryHeadingColor: e.getColor(f.peekViewTitleForeground),
  53324. secondaryHeadingColor: e.getColor(f.peekViewTitleInfoForeground)
  53325. })
  53326. }, l.prototype._applyStyles = function () {
  53327. this._parentContainer && (this._parentContainer.style.backgroundColor = this._backgroundColor ? this._backgroundColor.toString() : ""), e.prototype._applyStyles.call(this)
  53328. }, l.prototype.dispose = function () {
  53329. this._callOnDispose.dispose(), e.prototype.dispose.call(this)
  53330. },
  53331. l.prototype._fillHead = function (t) {
  53332. e.prototype._fillHead.call(this, t), this._actionbarWidget.push(this.actions, {
  53333. label: !1,
  53334. icon: !0,
  53335. index: 0
  53336. })
  53337. }, l.prototype._fillTitleIcon = function (e) {
  53338. this._icon = i.append(e, i.$(""))
  53339. }, l.prototype._getActionBarOptions = function () {
  53340. return {orientation: 0}
  53341. }, l.prototype._fillBody = function (e) {
  53342. var t = this;
  53343. this._parentContainer = e, i.addClass(e, "marker-widget"), this._parentContainer.tabIndex = 0, this._parentContainer.setAttribute("role", "tooltip"), this._container = document.createElement("div"), e.appendChild(this._container), this._message = new _(this._container, this.editor, (function (e) {
  53344. return t._onDidSelectRelatedInformation.fire(e)
  53345. }), this._openerService), this._disposables.add(this._message)
  53346. }, l.prototype.show = function (e, t) {
  53347. throw new Error("call showAtMarker")
  53348. }, l.prototype.showAtMarker = function (t, i, o) {
  53349. this._container.classList.remove("stale"), this._message.update(t), this._severity = t.severity, this._applyTheme(this._themeService.getTheme())
  53350. ;var r = a.Range.lift(t), l = this.editor.getPosition(),
  53351. u = l && r.containsPosition(l) ? l : r.getStartPosition();
  53352. e.prototype.show.call(this, u, this.computeRequiredHeight());
  53353. var d = this.editor.getModel();
  53354. if (d) {
  53355. var c = o > 1 ? n.localize(0, null, i, o) : n.localize(1, null, i, o);
  53356. this.setTitle(m.basename(d.uri), c)
  53357. }
  53358. this._icon.className = "codicon " + v.SeverityIcon.className(s.MarkerSeverity.toSeverity(this._severity)), this.editor.revealPositionInCenter(u, 0), this.editor.focus()
  53359. }, l.prototype.updateMarker = function (e) {
  53360. this._container.classList.remove("stale"), this._message.update(e)
  53361. }, l.prototype.showStale = function () {
  53362. this._container.classList.add("stale"), this._relayout()
  53363. }, l.prototype._doLayoutBody = function (t, n) {
  53364. e.prototype._doLayoutBody.call(this, t, n), this._heightInPixel = t, this._message.layout(t, n), this._container.style.height = t + "px"
  53365. }, l.prototype._onWidth = function (e) {
  53366. this._message.layout(this._heightInPixel, e)
  53367. }, l.prototype._relayout = function () {
  53368. e.prototype._relayout.call(this, this.computeRequiredHeight())
  53369. },
  53370. l.prototype.computeRequiredHeight = function () {
  53371. return 3 + this._message.getHeightInLines()
  53372. }, l
  53373. }(f.PeekViewWidget);
  53374. t.MarkerNavigationWidget = y;
  53375. var C = l.oneOf(l.editorErrorForeground, l.editorErrorBorder),
  53376. b = l.oneOf(l.editorWarningForeground, l.editorWarningBorder),
  53377. S = l.oneOf(l.editorInfoForeground, l.editorInfoBorder);
  53378. t.editorMarkerNavigationError = l.registerColor("editorMarkerNavigationError.background", {
  53379. dark: C,
  53380. light: C,
  53381. hc: C
  53382. }, n.localize(2, null)), t.editorMarkerNavigationWarning = l.registerColor("editorMarkerNavigationWarning.background", {
  53383. dark: b,
  53384. light: b,
  53385. hc: b
  53386. }, n.localize(3, null)), t.editorMarkerNavigationInfo = l.registerColor("editorMarkerNavigationInfo.background", {
  53387. dark: S,
  53388. light: S,
  53389. hc: S
  53390. }, n.localize(4, null)), t.editorMarkerNavigationBackground = l.registerColor("editorMarkerNavigation.background", {
  53391. dark: "#2D2D30",
  53392. light: d.Color.white,
  53393. hc: "#0C141F"
  53394. }, n.localize(5, null)), u.registerThemingParticipant((function (e, t) {
  53395. var n = e.getColor(l.textLinkForeground);
  53396. n && (t.addRule(".monaco-editor .marker-widget a { color: " + n + "; }"),
  53397. t.addRule(".monaco-editor .marker-widget a.code-link span:hover { color: " + n + "; }"))
  53398. }))
  53399. })), define(n[237], i([0, 1, 444, 4, 2, 18, 72, 3, 12, 14, 23, 599, 5, 19, 32, 10, 65, 55, 34, 39, 51]), (function (e, t, n, i, o, s, a, l, u, p, f, m, v, _, y, C, b, S, w, E, L) {
  53400. "use strict";
  53401. Object.defineProperty(t, "__esModule", {value: !0});
  53402. var D = function () {
  53403. function e(e, t) {
  53404. var n = this;
  53405. this._toUnbind = new o.DisposableStore, this._editor = e, this._markers = [], this._nextIdx = -1, this._ignoreSelectionChange = !1, this._onCurrentMarkerChanged = new i.Emitter, this._onMarkerSetChanged = new i.Emitter, this.setMarkers(t), this._toUnbind.add(this._editor.onDidDispose((function () {
  53406. return n.dispose()
  53407. }))), this._toUnbind.add(this._editor.onDidChangeCursorPosition((function () {
  53408. n._ignoreSelectionChange || n.currentMarker && n._editor.getPosition() && l.Range.containsPosition(n.currentMarker, n._editor.getPosition()) || (n._nextIdx = -1)
  53409. })))
  53410. }
  53411. return Object.defineProperty(e.prototype, "onCurrentMarkerChanged", {
  53412. get: function () {
  53413. return this._onCurrentMarkerChanged.event
  53414. }, enumerable: !0, configurable: !0
  53415. }),
  53416. Object.defineProperty(e.prototype, "onMarkerSetChanged", {
  53417. get: function () {
  53418. return this._onMarkerSetChanged.event
  53419. }, enumerable: !0, configurable: !0
  53420. }), e.prototype.setMarkers = function (e) {
  53421. var t = this._nextIdx >= 0 ? this._markers[this._nextIdx] : void 0;
  53422. this._markers = e || [], this._markers.sort(x.compareMarker), this._nextIdx = t ? Math.max(-1, _.binarySearch(this._markers, t, x.compareMarker)) : -1, this._onMarkerSetChanged.fire(this)
  53423. }, e.prototype.withoutWatchingEditorPosition = function (e) {
  53424. this._ignoreSelectionChange = !0;
  53425. try {
  53426. e()
  53427. } finally {
  53428. this._ignoreSelectionChange = !1
  53429. }
  53430. }, e.prototype._initIdx = function (e) {
  53431. for (var t = !1, n = this._editor.getPosition(), i = 0; i < this._markers.length; i++) {
  53432. var o = l.Range.lift(this._markers[i]);
  53433. if (o.isEmpty() && this._editor.getModel()) {
  53434. var r = this._editor.getModel().getWordAtPosition(o.getStartPosition());
  53435. r && (o = new l.Range(o.startLineNumber, r.startColumn, o.startLineNumber, r.endColumn))
  53436. }
  53437. if (n && (o.containsPosition(n) || n.isBeforeOrEqual(o.getStartPosition()))) {
  53438. this._nextIdx = i, t = !0;
  53439. break
  53440. }
  53441. }
  53442. t || (this._nextIdx = e ? 0 : this._markers.length - 1), this._nextIdx < 0 && (this._nextIdx = this._markers.length - 1)
  53443. }, Object.defineProperty(e.prototype, "currentMarker", {
  53444. get: function () {
  53445. return this.canNavigate() ? this._markers[this._nextIdx] : void 0
  53446. }, set: function (e) {
  53447. var t = this._nextIdx;
  53448. this._nextIdx = -1, e && (this._nextIdx = this.indexOf(e)), this._nextIdx !== t && this._onCurrentMarkerChanged.fire(e)
  53449. }, enumerable: !0, configurable: !0
  53450. }), e.prototype.move = function (e, t) {
  53451. if (!this.canNavigate()) return this._onCurrentMarkerChanged.fire(void 0), !t;
  53452. var n = this._nextIdx, i = !1;
  53453. if (-1 === this._nextIdx ? this._initIdx(e) : e ? t || this._nextIdx + 1 < this._markers.length ? this._nextIdx = (this._nextIdx + 1) % this._markers.length : i = !0 : e || (t || this._nextIdx > 0 ? this._nextIdx = (this._nextIdx - 1 + this._markers.length) % this._markers.length : i = !0), n !== this._nextIdx) {
  53454. var o = this._markers[this._nextIdx];
  53455. this._onCurrentMarkerChanged.fire(o)
  53456. }
  53457. return i
  53458. }, e.prototype.canNavigate = function () {
  53459. return this._markers.length > 0
  53460. }, e.prototype.findMarkerAtPosition = function (e) {
  53461. return _.find(this._markers, (function (t) {
  53462. return l.Range.containsPosition(t, e)
  53463. }))
  53464. }, Object.defineProperty(e.prototype, "total", {
  53465. get: function () {
  53466. return this._markers.length
  53467. }, enumerable: !0, configurable: !0
  53468. }), e.prototype.indexOf = function (e) {
  53469. return 1 + this._markers.indexOf(e)
  53470. }, e.prototype.dispose = function () {
  53471. this._toUnbind.dispose()
  53472. }, e
  53473. }(), N = function () {
  53474. function e(e, t, n, i, r, s, a) {
  53475. this._markerService = t, this._contextKeyService = n, this._themeService = i, this._editorService = r, this._keybindingService = s, this._openerService = a, this._model = null, this._widget = null, this._disposeOnClose = new o.DisposableStore, this._editor = e, this._widgetVisible = R.bindTo(this._contextKeyService)
  53476. }
  53477. return e.get = function (t) {
  53478. return t.getContribution(e.ID)
  53479. }, e.prototype.dispose = function () {
  53480. this._cleanUp(), this._disposeOnClose.dispose()
  53481. }, e.prototype._cleanUp = function () {
  53482. this._widgetVisible.reset(), this._disposeOnClose.clear(), this._widget = null, this._model = null
  53483. }, e.prototype.getOrCreateModel = function () {
  53484. var e = this;
  53485. if (this._model) return this._model
  53486. ;
  53487. var t = this._getMarkers();
  53488. this._model = new D(this._editor, t), this._markerService.onMarkerChanged(this._onMarkerChanged, this, this._disposeOnClose);
  53489. var n = this._keybindingService.lookupKeybinding(M.ID),
  53490. i = this._keybindingService.lookupKeybinding(I.ID),
  53491. o = [new S.Action(I.ID, I.LABEL + (i ? " (" + i.getLabel() + ")" : ""), "show-next-problem codicon-chevron-down", this._model.canNavigate(), (function () {
  53492. return d(e, void 0, void 0, (function () {
  53493. return c(this, (function (e) {
  53494. return this._model && this._model.move(!0, !0), [2]
  53495. }))
  53496. }))
  53497. })), new S.Action(M.ID, M.LABEL + (n ? " (" + n.getLabel() + ")" : ""), "show-previous-problem codicon-chevron-up", this._model.canNavigate(), (function () {
  53498. return d(e, void 0, void 0, (function () {
  53499. return c(this, (function (e) {
  53500. return this._model && this._model.move(!1, !0), [2]
  53501. }))
  53502. }))
  53503. }))];
  53504. this._widget = new m.MarkerNavigationWidget(this._editor, o, this._themeService, this._openerService), this._widgetVisible.set(!0), this._widget.onDidClose((function () {
  53505. return e.closeMarkersNavigation()
  53506. }), this, this._disposeOnClose),
  53507. this._disposeOnClose.add(this._model), this._disposeOnClose.add(this._widget);
  53508. for (var r = 0, s = o; r < s.length; r++) {
  53509. var a = s[r];
  53510. this._disposeOnClose.add(a)
  53511. }
  53512. return this._disposeOnClose.add(this._widget.onDidSelectRelatedInformation((function (t) {
  53513. e._editorService.openCodeEditor({
  53514. resource: t.resource,
  53515. options: {pinned: !0, revealIfOpened: !0, selection: l.Range.lift(t).collapseToStart()}
  53516. }, e._editor).then(void 0, C.onUnexpectedError), e.closeMarkersNavigation(!1)
  53517. }))), this._disposeOnClose.add(this._editor.onDidChangeModel((function () {
  53518. return e._cleanUp()
  53519. }))), this._disposeOnClose.add(this._model.onCurrentMarkerChanged((function (t) {
  53520. t && e._model ? e._model.withoutWatchingEditorPosition((function () {
  53521. e._widget && e._model && e._widget.showAtMarker(t, e._model.indexOf(t), e._model.total)
  53522. })) : e._cleanUp()
  53523. }))), this._disposeOnClose.add(this._model.onMarkerSetChanged((function () {
  53524. if (e._widget && e._widget.position && e._model) {
  53525. var t = e._model.findMarkerAtPosition(e._widget.position);
  53526. t ? e._widget.updateMarker(t) : e._widget.showStale()
  53527. }
  53528. }))), this._model
  53529. },
  53530. e.prototype.closeMarkersNavigation = function (e) {
  53531. void 0 === e && (e = !0), this._cleanUp(), e && this._editor.focus()
  53532. }, e.prototype.show = function (e) {
  53533. this.getOrCreateModel().currentMarker = e
  53534. }, e.prototype._onMarkerChanged = function (e) {
  53535. var t = this._editor.getModel();
  53536. t && this._model && e.some((function (e) {
  53537. return E.isEqual(t.uri, e)
  53538. })) && this._model.setMarkers(this._getMarkers())
  53539. }, e.prototype._getMarkers = function () {
  53540. var e = this._editor.getModel();
  53541. return e ? this._markerService.read({
  53542. resource: e.uri,
  53543. severities: a.MarkerSeverity.Error | a.MarkerSeverity.Warning | a.MarkerSeverity.Info
  53544. }) : []
  53545. }, e.ID = "editor.contrib.markerController", e = h([g(1, a.IMarkerService), g(2, s.IContextKeyService), g(3, p.IThemeService), g(4, y.ICodeEditorService), g(5, w.IKeybindingService), g(6, L.IOpenerService)], e)
  53546. }();
  53547. t.MarkerController = N;
  53548. var x = function (e) {
  53549. function t(t, n, i) {
  53550. var o = e.call(this, i) || this;
  53551. return o._isNext = t, o._multiFile = n, o
  53552. }
  53553. return r(t, e), t.prototype.run = function (e, n) {
  53554. var i = this, o = e.get(a.IMarkerService), r = e.get(y.ICodeEditorService), s = N.get(n)
  53555. ;
  53556. if (!s) return Promise.resolve(void 0);
  53557. var l = s.getOrCreateModel();
  53558. if (!l.move(this._isNext, !this._multiFile) || !this._multiFile) return Promise.resolve(void 0);
  53559. var u = o.read({severities: a.MarkerSeverity.Error | a.MarkerSeverity.Warning | a.MarkerSeverity.Info}).sort(t.compareMarker);
  53560. if (0 === u.length) return Promise.resolve(void 0);
  53561. var d = n.getModel();
  53562. if (!d) return Promise.resolve(void 0);
  53563. var c = l.currentMarker || {
  53564. resource: d.uri,
  53565. severity: a.MarkerSeverity.Error,
  53566. startLineNumber: 1,
  53567. startColumn: 1,
  53568. endLineNumber: 1,
  53569. endColumn: 1
  53570. }, h = _.binarySearch(u, c, t.compareMarker);
  53571. h < 0 ? (h = ~h, h %= u.length) : h = this._isNext ? (h + 1) % u.length : (h + u.length - 1) % u.length;
  53572. var p = u[h];
  53573. return E.isEqual(p.resource, d.uri) ? (l.move(this._isNext, !0), Promise.resolve(void 0)) : (s.closeMarkersNavigation(), r.openCodeEditor({
  53574. resource: p.resource,
  53575. options: {pinned: !1, revealIfOpened: !0, revealInCenterIfOutsideViewport: !0, selection: p}
  53576. }, n).then((function (e) {
  53577. if (e) return e.getAction(i.id).run()
  53578. })))
  53579. }, t.compareMarker = function (e, t) {
  53580. var n = v.compare(e.resource.toString(), t.resource.toString());
  53581. return 0 === n && (n = a.MarkerSeverity.compare(e.severity, t.severity)), 0 === n && (n = l.Range.compareRangesUsingStarts(e, t)), n
  53582. }, t
  53583. }(u.EditorAction), I = function (e) {
  53584. function t() {
  53585. return e.call(this, !0, !1, {
  53586. id: t.ID,
  53587. label: t.LABEL,
  53588. alias: "Go to Next Problem (Error, Warning, Info)",
  53589. precondition: f.EditorContextKeys.writable,
  53590. kbOpts: {kbExpr: f.EditorContextKeys.focus, primary: 578, weight: 100}
  53591. }) || this
  53592. }
  53593. return r(t, e), t.ID = "editor.action.marker.next", t.LABEL = n.localize(0, null), t
  53594. }(x);
  53595. t.NextMarkerAction = I;
  53596. var M = function (e) {
  53597. function t() {
  53598. return e.call(this, !1, !1, {
  53599. id: t.ID,
  53600. label: t.LABEL,
  53601. alias: "Go to Previous Problem (Error, Warning, Info)",
  53602. precondition: f.EditorContextKeys.writable,
  53603. kbOpts: {kbExpr: f.EditorContextKeys.focus, primary: 1602, weight: 100}
  53604. }) || this
  53605. }
  53606. return r(t, e), t.ID = "editor.action.marker.prev", t.LABEL = n.localize(1, null), t
  53607. }(x), k = function (e) {
  53608. function t() {
  53609. return e.call(this, !0, !0, {
  53610. id: "editor.action.marker.nextInFiles",
  53611. label: n.localize(2, null),
  53612. alias: "Go to Next Problem in Files (Error, Warning, Info)",
  53613. precondition: f.EditorContextKeys.writable,
  53614. kbOpts: {kbExpr: f.EditorContextKeys.focus, primary: 66, weight: 100}
  53615. }) || this
  53616. }
  53617. return r(t, e), t
  53618. }(x), T = function (e) {
  53619. function t() {
  53620. return e.call(this, !1, !0, {
  53621. id: "editor.action.marker.prevInFiles",
  53622. label: n.localize(3, null),
  53623. alias: "Go to Previous Problem in Files (Error, Warning, Info)",
  53624. precondition: f.EditorContextKeys.writable,
  53625. kbOpts: {kbExpr: f.EditorContextKeys.focus, primary: 1090, weight: 100}
  53626. }) || this
  53627. }
  53628. return r(t, e), t
  53629. }(x);
  53630. u.registerEditorContribution(N.ID, N), u.registerEditorAction(I), u.registerEditorAction(M), u.registerEditorAction(k), u.registerEditorAction(T);
  53631. var R = new s.RawContextKey("markersNavigationVisible", !1), O = u.EditorCommand.bindToContribution(N.get);
  53632. u.registerEditorCommand(new O({
  53633. id: "closeMarkersNavigation", precondition: R, handler: function (e) {
  53634. return e.closeMarkersNavigation()
  53635. }, kbOpts: {weight: 150, kbExpr: f.EditorContextKeys.focus, primary: 9, secondary: [1033]}
  53636. })), b.MenuRegistry.appendMenuItem(19, {
  53637. group: "6_problem_nav",
  53638. command: {id: "editor.action.marker.nextInFiles", title: n.localize(4, null)}, order: 1
  53639. }), b.MenuRegistry.appendMenuItem(19, {
  53640. group: "6_problem_nav",
  53641. command: {id: "editor.action.marker.prevInFiles", title: n.localize(5, null)},
  53642. order: 2
  53643. })
  53644. }));
  53645. a = this && this.__spreadArrays || function () {
  53646. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  53647. var i = Array(e), o = 0;
  53648. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  53649. return i
  53650. };
  53651. define(n[600], i([0, 1, 454, 6, 26, 27, 75, 2, 13, 3, 30, 17, 222, 223, 375, 570, 538, 200, 201, 117, 14, 19, 72, 39, 10, 51, 237, 15, 119, 233, 111, 20]), (function (e, t, n, i, o, s, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R) {
  53652. "use strict";
  53653. Object.defineProperty(t, "__esModule", {value: !0});
  53654. var O = i.$, P = function (e, t, n) {
  53655. this.range = e, this.color = t, this.provider = n
  53656. }, A = function (e, t) {
  53657. this.range = e, this.marker = t
  53658. }, F = function () {
  53659. function e(e, t) {
  53660. this._markerDecorationsService = t, this._editor = e, this._result = []
  53661. }
  53662. return e.prototype.setRange = function (e) {
  53663. this._range = e, this._result = []
  53664. }, e.prototype.clearResult = function () {
  53665. this._result = []
  53666. }, e.prototype.computeAsync = function (e) {
  53667. if (!this._editor.hasModel() || !this._range) return Promise.resolve([]);
  53668. var t = this._editor.getModel();
  53669. return p.HoverProviderRegistry.has(t) ? _.getHover(t, new d.Position(this._range.startLineNumber, this._range.startColumn), e) : Promise.resolve([])
  53670. }, e.prototype.computeSync = function () {
  53671. var e = this;
  53672. if (!this._editor.hasModel() || !this._range) return [];
  53673. var t = this._editor.getModel(), n = this._range.startLineNumber;
  53674. if (n > this._editor.getModel().getLineCount()) return [];
  53675. var i = f.ColorDetector.get(this._editor), o = t.getLineMaxColumn(n),
  53676. r = this._editor.getLineDecorations(n), s = !1, a = this._range, u = r.map((function (r) {
  53677. var u = r.range.startLineNumber === n ? r.range.startColumn : 1,
  53678. d = r.range.endLineNumber === n ? r.range.endColumn : o;
  53679. if (u > a.startColumn || a.endColumn > d) return null;
  53680. var h = new c.Range(a.startLineNumber, u, a.startLineNumber, d),
  53681. p = e._markerDecorationsService.getMarker(t, r);
  53682. if (p) return new A(h, p);
  53683. var g = i.getColorData(r.range.getStartPosition());
  53684. if (!s && g) {
  53685. s = !0
  53686. ;var f = g.colorInfo, m = f.color, v = f.range;
  53687. return new P(v, m, g.provider)
  53688. }
  53689. return l.isEmptyMarkdownString(r.options.hoverMessage) ? null : {
  53690. contents: r.options.hoverMessage ? w.asArray(r.options.hoverMessage) : [],
  53691. range: h
  53692. }
  53693. }));
  53694. return w.coalesce(u)
  53695. }, e.prototype.onResult = function (e, t) {
  53696. this._result = t ? e.concat(this._result.sort((function (e, t) {
  53697. return e instanceof P ? -1 : t instanceof P ? 1 : 0
  53698. }))) : this._result.concat(e)
  53699. }, e.prototype.getResult = function () {
  53700. return this._result.slice(0)
  53701. }, e.prototype.getResultWithLoadingMessage = function () {
  53702. return this._result.slice(0).concat([this._getLoadingMessage()])
  53703. }, e.prototype._getLoadingMessage = function () {
  53704. return {range: this._range, contents: [(new l.MarkdownString).appendText(n.localize(0, null))]}
  53705. }, e
  53706. }(), W = {type: 2, filter: {include: T.CodeActionKind.QuickFix}}, B = function (e) {
  53707. function t(n, o, r, s, a, l) {
  53708. void 0 === l && (l = N.NullOpenerService);
  53709. var d = e.call(this, t.ID, n) || this;
  53710. return d._themeService = r, d._keybindingService = s, d._modeService = a, d._openerService = l, d.renderDisposable = d._register(new u.MutableDisposable),
  53711. d._messages = [], d._lastRange = null, d._computer = new F(d._editor, o), d._highlightDecorations = [], d._isChangingDecorations = !1, d._shouldFocus = !1, d._colorPicker = null, d._hoverOperation = new y.HoverOperation(d._computer, (function (e) {
  53712. return d._withResult(e, !0)
  53713. }), null, (function (e) {
  53714. return d._withResult(e, !1)
  53715. }), d._editor.getOption(44).delay), d._register(i.addStandardDisposableListener(d.getDomNode(), i.EventType.FOCUS, (function () {
  53716. d._colorPicker && i.addClass(d.getDomNode(), "colorpicker-hover")
  53717. }))), d._register(i.addStandardDisposableListener(d.getDomNode(), i.EventType.BLUR, (function () {
  53718. i.removeClass(d.getDomNode(), "colorpicker-hover")
  53719. }))), d._register(n.onDidChangeConfiguration((function (e) {
  53720. d._hoverOperation.setHoverTime(d._editor.getOption(44).delay)
  53721. }))), d._register(p.TokenizationRegistry.onDidChange((function (e) {
  53722. d.isVisible && d._lastRange && d._messages.length > 0 && (d._domNode.textContent = "", d._renderMessages(d._lastRange, d._messages))
  53723. }))), d
  53724. }
  53725. return r(t, e), t.prototype.dispose = function () {
  53726. this._hoverOperation.cancel(),
  53727. e.prototype.dispose.call(this)
  53728. }, t.prototype.onModelDecorationsChanged = function () {
  53729. this._isChangingDecorations || this.isVisible && (this._hoverOperation.cancel(), this._computer.clearResult(), this._colorPicker || this._hoverOperation.start(0))
  53730. }, t.prototype.startShowingAt = function (e, t, n) {
  53731. if (!this._lastRange || !this._lastRange.equalsRange(e)) {
  53732. if (this._hoverOperation.cancel(), this.isVisible) if (this._showAtPosition && this._showAtPosition.lineNumber === e.startLineNumber) {
  53733. for (var i = [], o = 0, r = this._messages.length; o < r; o++) {
  53734. var s = this._messages[o], a = s.range;
  53735. a && a.startColumn <= e.startColumn && a.endColumn >= e.endColumn && i.push(s)
  53736. }
  53737. if (i.length > 0) {
  53738. if (function (e, t) {
  53739. if (!e && t || e && !t || e.length !== t.length) return !1;
  53740. for (var n = 0; n < e.length; n++) {
  53741. var i = e[n], o = t[n];
  53742. if (i instanceof A && o instanceof A) return E.IMarkerData.makeKey(i.marker) === E.IMarkerData.makeKey(o.marker);
  53743. if (i instanceof P || o instanceof P) return !1;
  53744. if (i instanceof A || o instanceof A) return !1;
  53745. if (!l.markedStringsEquals(i.contents, o.contents)) return !1
  53746. }
  53747. return !0
  53748. }(i, this._messages)) return
  53749. ;
  53750. this._renderMessages(e, i)
  53751. } else this.hide()
  53752. } else this.hide();
  53753. this._lastRange = e, this._computer.setRange(e), this._shouldFocus = n, this._hoverOperation.start(t)
  53754. }
  53755. }, t.prototype.hide = function () {
  53756. this._lastRange = null, this._hoverOperation.cancel(), e.prototype.hide.call(this), this._isChangingDecorations = !0, this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, []), this._isChangingDecorations = !1, this.renderDisposable.clear(), this._colorPicker = null
  53757. }, t.prototype.isColorPickerVisible = function () {
  53758. return !!this._colorPicker
  53759. }, t.prototype._withResult = function (e, t) {
  53760. this._messages = e, this._lastRange && this._messages.length > 0 ? this._renderMessages(this._lastRange, this._messages) : t && this.hide()
  53761. }, t.prototype._renderMessages = function (e, n) {
  53762. var r = this;
  53763. this.renderDisposable.dispose(), this._colorPicker = null;
  53764. var h = 1073741824, p = n[0].range ? c.Range.lift(n[0].range) : null,
  53765. f = document.createDocumentFragment(), _ = !0, y = !1, C = new u.DisposableStore, S = [];
  53766. if (n.forEach((function (e) {
  53767. if (e.range) if (h = Math.min(h, e.range.startColumn),
  53768. p = p ? c.Range.plusRange(p, e.range) : c.Range.lift(e.range), e instanceof P) {
  53769. y = !0;
  53770. var t = e.color, n = t.red, d = t.green, w = t.blue, E = t.alpha,
  53771. L = new s.RGBA(Math.round(255 * n), Math.round(255 * d), Math.round(255 * w), E),
  53772. D = new s.Color(L);
  53773. if (!r._editor.hasModel()) return;
  53774. var N = r._editor.getModel(),
  53775. x = new c.Range(e.range.startLineNumber, e.range.startColumn, e.range.endLineNumber, e.range.endColumn),
  53776. I = {range: e.range, color: e.color}, M = new m.ColorPickerModel(D, [], 0),
  53777. k = new v.ColorPickerWidget(f, M, r._editor.getOption(105), r._themeService);
  53778. g.getColorPresentations(N, I, e.provider, o.CancellationToken.None).then((function (t) {
  53779. if (M.colorPresentations = t || [], r._editor.hasModel()) {
  53780. var n = r._editor.getModel().getValueInRange(e.range);
  53781. M.guessColorPresentation(D, n);
  53782. var i = function () {
  53783. var e, t;
  53784. M.presentation.textEdit ? (e = [M.presentation.textEdit],
  53785. t = (t = new c.Range(M.presentation.textEdit.range.startLineNumber, M.presentation.textEdit.range.startColumn, M.presentation.textEdit.range.endLineNumber, M.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber, t.startColumn + M.presentation.textEdit.text.length)) : (e = [{
  53786. identifier: null,
  53787. range: x,
  53788. text: M.presentation.label,
  53789. forceMoveMarkers: !1
  53790. }], t = x.setEndPosition(x.endLineNumber, x.startColumn + M.presentation.label.length)), r._editor.pushUndoStop(), r._editor.executeEdits("colorpicker", e), M.presentation.additionalTextEdits && (e = a(M.presentation.additionalTextEdits), r._editor.executeEdits("colorpicker", e), r.hide()), r._editor.pushUndoStop(), x = t
  53791. }, s = function (t) {
  53792. return g.getColorPresentations(N, {
  53793. range: x,
  53794. color: {
  53795. red: t.rgba.r / 255,
  53796. green: t.rgba.g / 255,
  53797. blue: t.rgba.b / 255,
  53798. alpha: t.rgba.a
  53799. }
  53800. }, e.provider, o.CancellationToken.None).then((function (e) {
  53801. M.colorPresentations = e || []
  53802. }))
  53803. }, l = M.onColorFlushed((function (e) {
  53804. s(e).then(i)
  53805. })), d = M.onDidChangeColor(s);
  53806. r._colorPicker = k, r.showAt(x.getStartPosition(), x, r._shouldFocus),
  53807. r.updateContents(f), r._colorPicker.layout(), r.renderDisposable.value = u.combinedDisposable(l, d, k, C)
  53808. }
  53809. }))
  53810. } else e instanceof A ? (S.push(e), _ = !1) : e.contents.filter((function (e) {
  53811. return !l.isEmptyMarkdownString(e)
  53812. })).forEach((function (e) {
  53813. var t = O("div.hover-row.markdown-hover"), n = i.append(t, O("div.hover-contents")),
  53814. o = C.add(new b.MarkdownRenderer(r._editor, r._modeService, r._openerService));
  53815. C.add(o.onDidRenderCodeBlock((function () {
  53816. n.className = "hover-contents code-hover-contents", r.onContentsChange()
  53817. })));
  53818. var s = C.add(o.render(e));
  53819. n.appendChild(s.element), f.appendChild(t), _ = !1
  53820. }))
  53821. })), S.length) {
  53822. S.forEach((function (e) {
  53823. return f.appendChild(r.renderMarkerHover(e))
  53824. }));
  53825. var w = 1 === S.length ? S[0] : S.sort((function (e, t) {
  53826. return E.MarkerSeverity.compare(e.marker.severity, t.marker.severity)
  53827. }))[0];
  53828. f.appendChild(this.renderMarkerStatusbar(w))
  53829. }
  53830. y || _ || (this.showAt(new d.Position(e.startLineNumber, h), p, this._shouldFocus), this.updateContents(f)), this._isChangingDecorations = !0,
  53831. this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, p ? [{
  53832. range: p,
  53833. options: t._DECORATION_OPTIONS
  53834. }] : []), this._isChangingDecorations = !1
  53835. }, t.prototype.renderMarkerHover = function (e) {
  53836. var t = this, n = O("div.hover-row"), o = i.append(n, O("div.marker.hover-contents")), r = e.marker,
  53837. s = r.source, a = r.message, l = r.code, u = r.relatedInformation;
  53838. this._editor.applyFontInfo(o);
  53839. var d = i.append(o, O("span"));
  53840. if (d.style.whiteSpace = "pre-wrap", d.innerText = a, s || l) if ("string" == typeof l) (c = i.append(o, O("span"))).style.opacity = "0.6", c.style.paddingLeft = "6px", c.innerText = s && l ? s + "(" + l + ")" : s || "(" + l + ")"; else if (l) {
  53841. var c, h = O("span");
  53842. if (s) i.append(h, O("span")).innerText = s;
  53843. this._codeLink = i.append(h, O("a.code-link")), this._codeLink.setAttribute("href", l.link.toString()), this._codeLink.onclick = function (e) {
  53844. t._openerService.open(l.link), e.preventDefault(), e.stopPropagation()
  53845. }, i.append(this._codeLink, O("span")).innerText = l.value, (c = i.append(o, h)).style.opacity = "0.6", c.style.paddingLeft = "6px"
  53846. }
  53847. if (w.isNonEmptyArray(u)) for (var p = function (e, n, r, s) {
  53848. var a = i.append(o, O("div"));
  53849. a.style.marginTop = "8px";
  53850. var l = i.append(a, O("a"));
  53851. l.innerText = L.basename(n) + "(" + r + ", " + s + "): ", l.style.cursor = "pointer", l.onclick = function (e) {
  53852. e.stopPropagation(), e.preventDefault(), t._openerService && t._openerService.open(n.with({fragment: r + "," + s}), {fromUserGesture: !0}).catch(D.onUnexpectedError)
  53853. };
  53854. var u = i.append(a, O("span"));
  53855. u.innerText = e, g._editor.applyFontInfo(u)
  53856. }, g = this, f = 0, m = u; f < m.length; f++) {
  53857. var v = m[f];
  53858. p(v.message, v.resource, v.startLineNumber, v.startColumn)
  53859. }
  53860. return n
  53861. }, t.prototype.renderMarkerStatusbar = function (e) {
  53862. var t = this, o = O("div.hover-row.status-bar"), r = new u.DisposableStore,
  53863. s = i.append(o, O("div.actions"));
  53864. e.marker.severity !== E.MarkerSeverity.Error && e.marker.severity !== E.MarkerSeverity.Warning && e.marker.severity !== E.MarkerSeverity.Info || r.add(this.renderAction(s, {
  53865. label: n.localize(1, null),
  53866. commandId: x.NextMarkerAction.ID,
  53867. run: function () {
  53868. t.hide(), x.MarkerController.get(t._editor).show(e.marker), t._editor.focus()
  53869. }
  53870. }))
  53871. ;var a = i.append(s, O("div"));
  53872. a.style.opacity = "0", a.style.transition = "opacity 0.2s", setTimeout((function () {
  53873. return a.style.opacity = "1"
  53874. }), 200), a.textContent = n.localize(2, null), r.add(u.toDisposable((function () {
  53875. return a.remove()
  53876. })));
  53877. var l = this.getCodeActions(e.marker);
  53878. return r.add(u.toDisposable((function () {
  53879. return l.cancel()
  53880. }))), l.then((function (e) {
  53881. if (a.style.transition = "", a.style.opacity = "1", !e.validActions.length) return e.dispose(), void (a.textContent = n.localize(3, null));
  53882. a.remove();
  53883. var o = !1;
  53884. r.add(u.toDisposable((function () {
  53885. o || e.dispose()
  53886. }))), r.add(t.renderAction(s, {
  53887. label: n.localize(4, null),
  53888. commandId: k.QuickFixAction.Id,
  53889. run: function (n) {
  53890. o = !0;
  53891. var r = k.QuickFixController.get(t._editor), s = i.getDomNodePagePosition(n);
  53892. r.showCodeActions(W, e, {x: s.left + 6, y: s.top + s.height + 6})
  53893. }
  53894. }))
  53895. })), this.renderDisposable.value = r, o
  53896. }, t.prototype.getCodeActions = function (e) {
  53897. var t = this;
  53898. return I.createCancelablePromise((function (n) {
  53899. return M.getCodeActions(t._editor.getModel(), new c.Range(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn), W, n)
  53900. }))
  53901. }, t.prototype.renderAction = function (e, t) {
  53902. var n = i.append(e, O("div.action-container")), o = i.append(n, O("a.action"));
  53903. t.iconClass && i.append(o, O("span.icon." + t.iconClass));
  53904. var r = i.append(o, O("span"));
  53905. r.textContent = t.label;
  53906. var s = this._keybindingService.lookupKeybinding(t.commandId);
  53907. return s && (r.title = t.label + " (" + s.getLabel() + ")"), i.addDisposableListener(n, i.EventType.CLICK, (function (e) {
  53908. e.stopPropagation(), e.preventDefault(), t.run(n)
  53909. }))
  53910. }, t.ID = "editor.contrib.modesContentHoverWidget", t._DECORATION_OPTIONS = h.ModelDecorationOptions.register({className: "hoverHighlight"}), t
  53911. }(C.ContentHoverWidget);
  53912. t.ModesContentHoverWidget = B, S.registerThemingParticipant((function (e, t) {
  53913. var n = e.getColor(R.textLinkForeground);
  53914. n && t.addRule(".monaco-editor-hover .hover-contents a.code-link span:hover { color: " + n + "; }")
  53915. }))
  53916. })),
  53917. define(n[601], i([0, 1, 453, 36, 2, 12, 3, 23, 71, 600, 510, 51, 20, 14, 210, 34, 236, 315]), (function (e, t, n, i, o, s, a, l, u, d, c, p, f, m, v, _, y) {
  53918. "use strict";
  53919. Object.defineProperty(t, "__esModule", {value: !0});
  53920. var C = function () {
  53921. function e(e, t, n, i, r, s) {
  53922. var a = this;
  53923. this._editor = e, this._openerService = t, this._modeService = n, this._markerDecorationsService = i, this._keybindingService = r, this._themeService = s, this._toUnhook = new o.DisposableStore, this._contentWidget = new o.MutableDisposable, this._glyphWidget = new o.MutableDisposable, this._isMouseDown = !1, this._hoverClicked = !1, this._hookEvents(), this._didChangeConfigurationHandler = this._editor.onDidChangeConfiguration((function (e) {
  53924. e.hasChanged(44) && (a._hideWidgets(), a._unhookEvents(), a._hookEvents())
  53925. }))
  53926. }
  53927. return Object.defineProperty(e.prototype, "contentWidget", {
  53928. get: function () {
  53929. return this._contentWidget.value || this._createHoverWidgets(), this._contentWidget.value
  53930. }, enumerable: !0, configurable: !0
  53931. }), Object.defineProperty(e.prototype, "glyphWidget", {
  53932. get: function () {
  53933. return this._glyphWidget.value || this._createHoverWidgets(), this._glyphWidget.value
  53934. }, enumerable: !0, configurable: !0
  53935. }), e.get = function (t) {
  53936. return t.getContribution(e.ID)
  53937. }, e.prototype._hookEvents = function () {
  53938. var e = this, t = function () {
  53939. return e._hideWidgets()
  53940. }, n = this._editor.getOption(44);
  53941. this._isHoverEnabled = n.enabled, this._isHoverSticky = n.sticky, this._isHoverEnabled ? (this._toUnhook.add(this._editor.onMouseDown((function (t) {
  53942. return e._onEditorMouseDown(t)
  53943. }))), this._toUnhook.add(this._editor.onMouseUp((function (t) {
  53944. return e._onEditorMouseUp(t)
  53945. }))), this._toUnhook.add(this._editor.onMouseMove((function (t) {
  53946. return e._onEditorMouseMove(t)
  53947. }))), this._toUnhook.add(this._editor.onKeyDown((function (t) {
  53948. return e._onKeyDown(t)
  53949. }))), this._toUnhook.add(this._editor.onDidChangeModelDecorations((function () {
  53950. return e._onModelDecorationsChanged()
  53951. })))) : this._toUnhook.add(this._editor.onMouseMove(t)), this._toUnhook.add(this._editor.onMouseLeave(t)), this._toUnhook.add(this._editor.onDidChangeModel(t)),
  53952. this._toUnhook.add(this._editor.onDidScrollChange((function (t) {
  53953. return e._onEditorScrollChanged(t)
  53954. })))
  53955. }, e.prototype._unhookEvents = function () {
  53956. this._toUnhook.clear()
  53957. }, e.prototype._onModelDecorationsChanged = function () {
  53958. this.contentWidget.onModelDecorationsChanged(), this.glyphWidget.onModelDecorationsChanged()
  53959. }, e.prototype._onEditorScrollChanged = function (e) {
  53960. (e.scrollTopChanged || e.scrollLeftChanged) && this._hideWidgets()
  53961. }, e.prototype._onEditorMouseDown = function (e) {
  53962. this._isMouseDown = !0;
  53963. var t = e.target.type;
  53964. 9 !== t || e.target.detail !== d.ModesContentHoverWidget.ID ? 12 === t && e.target.detail === c.ModesGlyphHoverWidget.ID || (12 !== t && e.target.detail !== c.ModesGlyphHoverWidget.ID && (this._hoverClicked = !1), this._hideWidgets()) : this._hoverClicked = !0
  53965. }, e.prototype._onEditorMouseUp = function (e) {
  53966. this._isMouseDown = !1
  53967. }, e.prototype._onEditorMouseMove = function (e) {
  53968. var t = e.target.type
  53969. ;
  53970. if (!(this._isMouseDown && this._hoverClicked && this.contentWidget.isColorPickerVisible() || this._isHoverSticky && 9 === t && e.target.detail === d.ModesContentHoverWidget.ID || this._isHoverSticky && 12 === t && e.target.detail === c.ModesGlyphHoverWidget.ID)) {
  53971. if (7 === t) {
  53972. var n = this._editor.getOption(34).typicalHalfwidthCharacterWidth / 2, i = e.target.detail;
  53973. i && !i.isAfterLines && "number" == typeof i.horizontalDistanceToText && i.horizontalDistanceToText < n && (t = 6)
  53974. }
  53975. 6 === t ? (this.glyphWidget.hide(), this._isHoverEnabled && e.target.range && this.contentWidget.startShowingAt(e.target.range, 0, !1)) : 2 === t ? (this.contentWidget.hide(), this._isHoverEnabled && e.target.position && this.glyphWidget.startShowingAt(e.target.position.lineNumber)) : this._hideWidgets()
  53976. }
  53977. }, e.prototype._onKeyDown = function (e) {
  53978. 5 !== e.keyCode && 6 !== e.keyCode && 57 !== e.keyCode && 4 !== e.keyCode && this._hideWidgets()
  53979. }, e.prototype._hideWidgets = function () {
  53980. !this._glyphWidget.value || !this._contentWidget.value || this._isMouseDown && this._hoverClicked && this._contentWidget.value.isColorPickerVisible() || (this._glyphWidget.value.hide(), this._contentWidget.value.hide())
  53981. }, e.prototype._createHoverWidgets = function () {
  53982. this._contentWidget.value = new d.ModesContentHoverWidget(this._editor, this._markerDecorationsService, this._themeService, this._keybindingService, this._modeService, this._openerService), this._glyphWidget.value = new c.ModesGlyphHoverWidget(this._editor, this._modeService, this._openerService)
  53983. }, e.prototype.showContentHover = function (e, t, n) {
  53984. this.contentWidget.startShowingAt(e, t, n)
  53985. }, e.prototype.dispose = function () {
  53986. this._unhookEvents(), this._toUnhook.dispose(), this._didChangeConfigurationHandler.dispose(), this._glyphWidget.dispose(), this._contentWidget.dispose()
  53987. }, e.ID = "editor.contrib.hover", e = h([g(1, p.IOpenerService), g(2, u.IModeService), g(3, v.IMarkerDecorationsService), g(4, _.IKeybindingService), g(5, m.IThemeService)], e)
  53988. }();
  53989. t.ModesHoverController = C;
  53990. var b = function (e) {
  53991. function t() {
  53992. return e.call(this, {
  53993. id: "editor.action.showHover",
  53994. label: n.localize(0, null),
  53995. alias: "Show Hover",
  53996. precondition: void 0,
  53997. kbOpts: {
  53998. kbExpr: l.EditorContextKeys.editorTextFocus,
  53999. primary: i.KeyChord(2089, 2087),
  54000. weight: 100
  54001. }
  54002. }) || this
  54003. }
  54004. return r(t, e), t.prototype.run = function (e, t) {
  54005. if (t.hasModel()) {
  54006. var n = C.get(t);
  54007. if (n) {
  54008. var i = t.getPosition(), o = new a.Range(i.lineNumber, i.column, i.lineNumber, i.column),
  54009. r = 2 === t.getOption(2);
  54010. n.showContentHover(o, 1, r)
  54011. }
  54012. }
  54013. }, t
  54014. }(s.EditorAction), S = function (e) {
  54015. function t() {
  54016. return e.call(this, {
  54017. id: "editor.action.showDefinitionPreviewHover",
  54018. label: n.localize(1, null),
  54019. alias: "Show Definition Preview Hover",
  54020. precondition: void 0
  54021. }) || this
  54022. }
  54023. return r(t, e), t.prototype.run = function (e, t) {
  54024. var n = C.get(t);
  54025. if (n) {
  54026. var i = t.getPosition();
  54027. if (i) {
  54028. var o = new a.Range(i.lineNumber, i.column, i.lineNumber, i.column),
  54029. r = y.GotoDefinitionAtPositionEditorContribution.get(t).startFindDefinitionFromCursor(i);
  54030. r ? r.then((function () {
  54031. n.showContentHover(o, 1, !0)
  54032. })) : n.showContentHover(o, 1, !0)
  54033. }
  54034. }
  54035. }, t
  54036. }(s.EditorAction);
  54037. s.registerEditorContribution(C.ID, C),
  54038. s.registerEditorAction(b), s.registerEditorAction(S), m.registerThemingParticipant((function (e, t) {
  54039. var n = e.getColor(f.editorHoverHighlight);
  54040. n && t.addRule(".monaco-editor .hoverHighlight { background-color: " + n + "; }");
  54041. var i = e.getColor(f.editorHoverBackground);
  54042. i && t.addRule(".monaco-editor .monaco-editor-hover { background-color: " + i + "; }");
  54043. var o = e.getColor(f.editorHoverBorder);
  54044. o && (t.addRule(".monaco-editor .monaco-editor-hover { border: 1px solid " + o + "; }"), t.addRule(".monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid " + o.transparent(.5) + "; }"), t.addRule(".monaco-editor .monaco-editor-hover hr { border-top: 1px solid " + o.transparent(.5) + "; }"), t.addRule(".monaco-editor .monaco-editor-hover hr { border-bottom: 0px solid " + o.transparent(.5) + "; }"));
  54045. var r = e.getColor(f.textLinkForeground);
  54046. r && t.addRule(".monaco-editor .monaco-editor-hover a { color: " + r + "; }");
  54047. var s = e.getColor(f.editorHoverForeground);
  54048. s && t.addRule(".monaco-editor .monaco-editor-hover { color: " + s + "; }")
  54049. ;var a = e.getColor(f.editorHoverStatusBarBackground);
  54050. a && t.addRule(".monaco-editor .monaco-editor-hover .hover-row .actions { background-color: " + a + "; }");
  54051. var l = e.getColor(f.textCodeBlockBackground);
  54052. l && t.addRule(".monaco-editor .monaco-editor-hover code { background-color: " + l + "; }")
  54053. }))
  54054. })), define(n[171], i([0, 1, 25, 39, 11, 38]), (function (e, t, n, i, o, r) {
  54055. "use strict";
  54056. Object.defineProperty(t, "__esModule", {value: !0}), t.IWorkspaceContextService = o.createDecorator("contextService"), function (e) {
  54057. e.isIWorkspace = function (e) {
  54058. return e && "object" == typeof e && "string" == typeof e.id && Array.isArray(e.folders)
  54059. }
  54060. }(t.IWorkspace || (t.IWorkspace = {})), function (e) {
  54061. e.isIWorkspaceFolder = function (e) {
  54062. return e && "object" == typeof e && n.URI.isUri(e.uri) && "string" == typeof e.name && "function" == typeof e.toResource
  54063. }
  54064. }(t.IWorkspaceFolder || (t.IWorkspaceFolder = {}));
  54065. var s = function () {
  54066. function e(e, t, n) {
  54067. void 0 === t && (t = []), void 0 === n && (n = null), this._id = e, this._configuration = n, this._foldersMap = r.TernarySearchTree.forPaths(), this.folders = t
  54068. }
  54069. return Object.defineProperty(e.prototype, "folders", {
  54070. get: function () {
  54071. return this._folders
  54072. }, set: function (e) {
  54073. this._folders = e, this.updateFoldersMap()
  54074. }, enumerable: !0, configurable: !0
  54075. }), Object.defineProperty(e.prototype, "id", {
  54076. get: function () {
  54077. return this._id
  54078. }, enumerable: !0, configurable: !0
  54079. }), Object.defineProperty(e.prototype, "configuration", {
  54080. get: function () {
  54081. return this._configuration
  54082. }, set: function (e) {
  54083. this._configuration = e
  54084. }, enumerable: !0, configurable: !0
  54085. }), e.prototype.getFolder = function (e) {
  54086. return e && this._foldersMap.findSubstr(e.with({
  54087. scheme: e.scheme,
  54088. authority: e.authority,
  54089. path: e.path
  54090. }).toString()) || null
  54091. }, e.prototype.updateFoldersMap = function () {
  54092. this._foldersMap = r.TernarySearchTree.forPaths();
  54093. for (var e = 0, t = this.folders; e < t.length; e++) {
  54094. var n = t[e];
  54095. this._foldersMap.set(n.uri.toString(), n)
  54096. }
  54097. }, e.prototype.toJSON = function () {
  54098. return {id: this.id, folders: this.folders, configuration: this.configuration}
  54099. }, e
  54100. }();
  54101. t.Workspace = s;
  54102. var a = function () {
  54103. function e(e, t) {
  54104. this.raw = t, this.uri = e.uri, this.index = e.index, this.name = e.name
  54105. }
  54106. return e.prototype.toResource = function (e) {
  54107. return i.joinPath(this.uri, e)
  54108. }, e.prototype.toJSON = function () {
  54109. return {uri: this.uri, name: this.name, index: this.index}
  54110. }, e
  54111. }();
  54112. t.WorkspaceFolder = a
  54113. }));
  54114. a = this && this.__spreadArrays || function () {
  54115. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  54116. var i = Array(e), o = 0;
  54117. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  54118. return i
  54119. };
  54120. define(n[172], i([0, 1, 5, 6, 56, 4, 36, 2, 16, 112, 25, 108, 163, 58, 13, 3, 17, 29, 43, 518, 502, 217, 86, 504, 505, 35, 171, 59]), (function (e, t, n, i, o, s, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k) {
  54121. "use strict";
  54122. Object.defineProperty(t, "__esModule", {value: !0});
  54123. var T = function () {
  54124. function e(e) {
  54125. this.model = e, this._onDispose = new s.Emitter
  54126. }
  54127. return Object.defineProperty(e.prototype, "textEditorModel", {
  54128. get: function () {
  54129. return this.model
  54130. }, enumerable: !0, configurable: !0
  54131. }), e.prototype.dispose = function () {
  54132. this._onDispose.fire()
  54133. }, e
  54134. }();
  54135. t.SimpleModel = T;
  54136. var R = function () {
  54137. function e(e) {
  54138. this.modelService = e
  54139. }
  54140. return e.prototype.setEditor = function (e) {
  54141. this.editor = e
  54142. },
  54143. e.prototype.createModelReference = function (e) {
  54144. var t, n, i, o = this, r = null;
  54145. return this.editor && (t = this.editor, n = function (t) {
  54146. return o.findModel(t, e)
  54147. }, i = function (t) {
  54148. return o.findModel(t.getOriginalEditor(), e) || o.findModel(t.getModifiedEditor(), e)
  54149. }, r = f.isCodeEditor(t) ? n(t) : i(t)), r ? Promise.resolve(new u.ImmortalReference(new T(r))) : Promise.reject(new Error("Model not found"))
  54150. }, e.prototype.findModel = function (e, t) {
  54151. var n = this.modelService ? this.modelService.getModel(t) : e.getModel();
  54152. return n && n.uri.toString() !== t.toString() ? null : n
  54153. }, e
  54154. }();
  54155. t.SimpleEditorModelResolverService = R;
  54156. var O = function () {
  54157. function e() {
  54158. }
  54159. return e.prototype.show = function () {
  54160. return e.NULL_PROGRESS_RUNNER
  54161. }, e.prototype.showWhile = function (e, t) {
  54162. return Promise.resolve(void 0)
  54163. }, e.NULL_PROGRESS_RUNNER = {
  54164. done: function () {
  54165. }, total: function () {
  54166. }, worked: function () {
  54167. }
  54168. }, e
  54169. }();
  54170. t.SimpleEditorProgressService = O;
  54171. var P = function () {
  54172. };
  54173. t.SimpleDialogService = P;
  54174. var A = function () {
  54175. function e() {
  54176. }
  54177. return e.prototype.info = function (e) {
  54178. return this.notify({severity: c.default.Info, message: e})
  54179. },
  54180. e.prototype.warn = function (e) {
  54181. return this.notify({severity: c.default.Warning, message: e})
  54182. }, e.prototype.error = function (e) {
  54183. return this.notify({severity: c.default.Error, message: e})
  54184. }, e.prototype.notify = function (t) {
  54185. switch (t.severity) {
  54186. case c.default.Error:
  54187. console.error(t.message);
  54188. break;
  54189. case c.default.Warning:
  54190. console.warn(t.message);
  54191. break;
  54192. default:
  54193. console.log(t.message)
  54194. }
  54195. return e.NO_OP
  54196. }, e.prototype.status = function (e, t) {
  54197. return u.Disposable.None
  54198. }, e.NO_OP = new I.NoOpNotification, e
  54199. }();
  54200. t.SimpleNotificationService = A;
  54201. var F = function () {
  54202. function e(e) {
  54203. this._onWillExecuteCommand = new s.Emitter, this._onDidExecuteCommand = new s.Emitter, this._instantiationService = e, this._dynamicCommands = Object.create(null)
  54204. }
  54205. return e.prototype.addCommand = function (e) {
  54206. var t = this, n = e.id;
  54207. return this._dynamicCommands[n] = e, u.toDisposable((function () {
  54208. delete t._dynamicCommands[n]
  54209. }))
  54210. }, e.prototype.executeCommand = function (e) {
  54211. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  54212. var i = b.CommandsRegistry.getCommand(e) || this._dynamicCommands[e]
  54213. ;
  54214. if (!i) return Promise.reject(new Error("command '" + e + "' not found"));
  54215. try {
  54216. this._onWillExecuteCommand.fire({commandId: e, args: t});
  54217. var o = this._instantiationService.invokeFunction.apply(this._instantiationService, a([i.handler], t));
  54218. return this._onDidExecuteCommand.fire({commandId: e, args: t}), Promise.resolve(o)
  54219. } catch (e) {
  54220. return Promise.reject(e)
  54221. }
  54222. }, e
  54223. }();
  54224. t.StandaloneCommandService = F;
  54225. var W = function (e) {
  54226. function t(t, n, r, s, a) {
  54227. var l = e.call(this, t, n, r, s) || this;
  54228. return l._cachedResolver = null, l._dynamicKeybindings = [], l._register(i.addDisposableListener(a, i.EventType.KEY_DOWN, (function (e) {
  54229. var t = new o.StandardKeyboardEvent(e);
  54230. l._dispatch(t, t.target) && (t.preventDefault(), t.stopPropagation())
  54231. }))), l
  54232. }
  54233. return r(t, e), t.prototype.addDynamicKeybinding = function (e, t, n, i) {
  54234. var o = this, r = l.createKeybinding(t, d.OS), s = new u.DisposableStore;
  54235. r && (this._dynamicKeybindings.push({
  54236. keybinding: r,
  54237. command: e,
  54238. when: i,
  54239. weight1: 1e3,
  54240. weight2: 0
  54241. }), s.add(u.toDisposable((function () {
  54242. for (var t = 0; t < o._dynamicKeybindings.length; t++) {
  54243. if (o._dynamicKeybindings[t].command === e) return o._dynamicKeybindings.splice(t, 1), void o.updateResolver({source: 1})
  54244. }
  54245. }))));
  54246. var a = this._commandService;
  54247. if (!(a instanceof F)) throw new Error("Unknown command service!");
  54248. return s.add(a.addCommand({id: e, handler: n})), this.updateResolver({source: 1}), s
  54249. }, t.prototype.updateResolver = function (e) {
  54250. this._cachedResolver = null, this._onDidUpdateKeybindings.fire(e)
  54251. }, t.prototype._getResolver = function () {
  54252. if (!this._cachedResolver) {
  54253. var e = this._toNormalizedKeybindingItems(D.KeybindingsRegistry.getDefaultKeybindings(), !0),
  54254. t = this._toNormalizedKeybindingItems(this._dynamicKeybindings, !1);
  54255. this._cachedResolver = new L.KeybindingResolver(e, t)
  54256. }
  54257. return this._cachedResolver
  54258. }, t.prototype._documentHasFocus = function () {
  54259. return document.hasFocus()
  54260. }, t.prototype._toNormalizedKeybindingItems = function (e, t) {
  54261. for (var n = [], i = 0, o = 0, r = e; o < r.length; o++) {
  54262. var s = r[o], a = s.when || void 0, l = s.keybinding;
  54263. if (l) for (var u = 0, d = this.resolveKeybinding(l); u < d.length; u++) {
  54264. var c = d[u]
  54265. ;n[i++] = new N.ResolvedKeybindingItem(c, s.command, s.commandArgs, a, t)
  54266. } else n[i++] = new N.ResolvedKeybindingItem(void 0, s.command, s.commandArgs, a, t)
  54267. }
  54268. return n
  54269. }, t.prototype.resolveKeybinding = function (e) {
  54270. return [new x.USLayoutResolvedKeybinding(e, d.OS)]
  54271. }, t.prototype.resolveKeyboardEvent = function (e) {
  54272. var t = new l.SimpleKeybinding(e.ctrlKey, e.shiftKey, e.altKey, e.metaKey, e.keyCode).toChord();
  54273. return new x.USLayoutResolvedKeybinding(t, d.OS)
  54274. }, t
  54275. }(E.AbstractKeybindingService);
  54276. function B(e) {
  54277. return e && "object" == typeof e && (!e.overrideIdentifier || "string" == typeof e.overrideIdentifier) && (!e.resource || e.resource instanceof p.URI)
  54278. }
  54279. t.StandaloneKeybindingService = W;
  54280. var V = function () {
  54281. function e() {
  54282. this._onDidChangeConfiguration = new s.Emitter, this.onDidChangeConfiguration = this._onDidChangeConfiguration.event, this._configuration = new w.Configuration(new w.DefaultConfigurationModel, new w.ConfigurationModel)
  54283. }
  54284. return e.prototype.configuration = function () {
  54285. return this._configuration
  54286. }, e.prototype.getValue = function (e, t) {
  54287. var n = "string" == typeof e ? e : void 0, i = B(e) ? e : B(t) ? t : {};
  54288. return this.configuration().getValue(n, i, void 0)
  54289. }, e.prototype.updateValue = function (e, t, n, i) {
  54290. return this.configuration().updateValue(e, t), Promise.resolve()
  54291. }, e.prototype.inspect = function (e, t) {
  54292. return void 0 === t && (t = {}), this.configuration().inspect(e, t, void 0)
  54293. }, e
  54294. }();
  54295. t.SimpleConfigurationService = V;
  54296. var z = function () {
  54297. function e(e) {
  54298. var t = this;
  54299. this.configurationService = e, this._onDidChangeConfiguration = new s.Emitter, this.configurationService.onDidChangeConfiguration((function (e) {
  54300. t._onDidChangeConfiguration.fire({
  54301. affectedKeys: e.affectedKeys,
  54302. affectsConfiguration: function (t, n) {
  54303. return e.affectsConfiguration(n)
  54304. }
  54305. })
  54306. }))
  54307. }
  54308. return e.prototype.getValue = function (e, t, n) {
  54309. var i = (_.Position.isIPosition(t) ? t : null) ? "string" == typeof n ? n : void 0 : "string" == typeof t ? t : void 0;
  54310. return void 0 === i ? this.configurationService.getValue() : this.configurationService.getValue(i)
  54311. }, e
  54312. }();
  54313. t.SimpleResourceConfigurationService = z;
  54314. var H = function () {
  54315. function e(e) {
  54316. this.configurationService = e
  54317. }
  54318. return e.prototype.getEOL = function (e, t) {
  54319. var n = this.configurationService.getValue("files.eol", {overrideIdentifier: t, resource: e});
  54320. return n && "auto" !== n ? n : d.isLinux || d.isMacintosh ? "\n" : "\r\n"
  54321. }, e = h([g(0, S.IConfigurationService)], e)
  54322. }();
  54323. t.SimpleResourcePropertiesService = H;
  54324. var K = function () {
  54325. function e() {
  54326. }
  54327. return e.prototype.publicLog = function (e, t) {
  54328. return Promise.resolve(void 0)
  54329. }, e.prototype.publicLog2 = function (e, t) {
  54330. return this.publicLog(e, t)
  54331. }, e
  54332. }();
  54333. t.StandaloneTelemetryService = K;
  54334. var U = function () {
  54335. function e() {
  54336. var t = p.URI.from({scheme: e.SCHEME, authority: "model", path: "/"});
  54337. this.workspace = {
  54338. id: "4064f6ec-cb38-4ad0-af64-ee6467e63c82",
  54339. folders: [new M.WorkspaceFolder({uri: t, name: "", index: 0})]
  54340. }
  54341. }
  54342. return e.prototype.getWorkspace = function () {
  54343. return this.workspace
  54344. }, e.prototype.getWorkspaceFolder = function (t) {
  54345. return t && t.scheme === e.SCHEME ? this.workspace.folders[0] : null
  54346. }, e.SCHEME = "inmemory", e
  54347. }();
  54348. t.SimpleWorkspaceContextService = U, t.applyConfigurationValues = function (e, t, n) {
  54349. t && e instanceof V && Object.keys(t).forEach((function (i) {
  54350. m.isEditorConfigurationKey(i) && e.updateValue("editor." + i, t[i]), n && m.isDiffEditorConfigurationKey(i) && e.updateValue("diffEditor." + i, t[i])
  54351. }))
  54352. };
  54353. var j = function () {
  54354. function e(e) {
  54355. this._modelService = e
  54356. }
  54357. return e.prototype.hasPreviewHandler = function () {
  54358. return !1
  54359. }, e.prototype.apply = function (e, t) {
  54360. var i = new Map;
  54361. if (e.edits) for (var o = 0, r = e.edits; o < r.length; o++) {
  54362. var s = r[o];
  54363. if (!C.WorkspaceTextEdit.is(s)) return Promise.reject(new Error("bad edit - only text edits are supported"));
  54364. var a = this._modelService.getModel(s.resource);
  54365. if (!a) return Promise.reject(new Error("bad edit - model not found"));
  54366. var l = i.get(a);
  54367. l || (l = [], i.set(a, l)), l.push(s.edit)
  54368. }
  54369. var u = 0, d = 0;
  54370. return i.forEach((function (e, t) {
  54371. t.pushStackElement(), t.pushEditOperations([], e.map((function (e) {
  54372. return v.EditOperation.replaceMove(y.Range.lift(e.range), e.text)
  54373. })), (function () {
  54374. return []
  54375. })), t.pushStackElement(), d += 1, u += e.length
  54376. })), Promise.resolve({
  54377. selection: void 0,
  54378. ariaSummary: n.format(k.SimpleServicesNLS.bulkEditServiceSummary, u, d)
  54379. })
  54380. }, e
  54381. }();
  54382. t.SimpleBulkEditService = j
  54383. ;var q = function () {
  54384. function e() {
  54385. }
  54386. return e.prototype.getUriLabel = function (e, t) {
  54387. return "file" === e.scheme ? e.fsPath : e.path
  54388. }, e
  54389. }();
  54390. t.SimpleUriLabelService = q;
  54391. var G = function () {
  54392. function e(e) {
  54393. this._container = e, this.onLayout = s.Event.None
  54394. }
  54395. return Object.defineProperty(e.prototype, "container", {
  54396. get: function () {
  54397. return this._container
  54398. }, enumerable: !0, configurable: !0
  54399. }), e
  54400. }();
  54401. t.SimpleLayoutService = G
  54402. }));
  54403. a = this && this.__spreadArrays || function () {
  54404. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  54405. var i = Array(e), o = 0;
  54406. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  54407. return i
  54408. };
  54409. define(n[602], i([0, 1, 24, 50, 2, 32, 121, 230, 190, 62, 172, 94, 65, 29, 43, 18, 66, 11, 34, 35, 14, 64, 59, 162, 73]), (function (e, t, n, i, o, s, l, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x) {
  54410. "use strict";
  54411. Object.defineProperty(t, "__esModule", {value: !0});
  54412. var I = 0, M = !1;
  54413. var k = function (e) {
  54414. function t(t, o, r, s, a, l, u, d, c, h) {
  54415. var g = this;
  54416. return (o = o || {}).ariaLabel = o.ariaLabel || D.StandaloneCodeEditorNLS.editorViewAccessibleLabel,
  54417. o.ariaLabel = o.ariaLabel + ";" + (n.isIE ? D.StandaloneCodeEditorNLS.accessibilityHelpMessageIE : D.StandaloneCodeEditorNLS.accessibilityHelpMessage), g = e.call(this, t, o, {}, r, s, a, l, d, c, h) || this, u instanceof p.StandaloneKeybindingService ? g._standaloneKeybindingService = u : g._standaloneKeybindingService = null, M || (M = !0, i.setARIAContainer(document.body)), g
  54418. }
  54419. return r(t, e), t.prototype.addCommand = function (e, t, n) {
  54420. if (!this._standaloneKeybindingService) return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"), null;
  54421. var i = "DYNAMIC_" + ++I, o = y.ContextKeyExpr.deserialize(n);
  54422. return this._standaloneKeybindingService.addDynamicKeybinding(i, e, t, o), i
  54423. }, t.prototype.createContextKey = function (e, t) {
  54424. return this._contextKeyService.createKey(e, t)
  54425. }, t.prototype.addAction = function (e) {
  54426. var t = this;
  54427. if ("string" != typeof e.id || "string" != typeof e.label || "function" != typeof e.run) throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!")
  54428. ;
  54429. if (!this._standaloneKeybindingService) return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"), o.Disposable.None;
  54430. var n = e.id, i = e.label,
  54431. r = y.ContextKeyExpr.and(y.ContextKeyExpr.equals("editorId", this.getId()), y.ContextKeyExpr.deserialize(e.precondition)),
  54432. s = e.keybindings, l = y.ContextKeyExpr.and(r, y.ContextKeyExpr.deserialize(e.keybindingContext)),
  54433. u = e.contextMenuGroupId || null, c = e.contextMenuOrder || 0, h = function (n) {
  54434. for (var i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];
  54435. return Promise.resolve(e.run.apply(e, a([t], i)))
  54436. }, p = new o.DisposableStore, g = this.getId() + ":" + n;
  54437. if (p.add(v.CommandsRegistry.registerCommand(g, h)), u) {
  54438. var f = {command: {id: g, title: i}, when: r, group: u, order: c};
  54439. p.add(m.MenuRegistry.appendMenuItem(7, f))
  54440. }
  54441. if (Array.isArray(s)) for (var _ = 0, C = s; _ < C.length; _++) {
  54442. var b = C[_];
  54443. p.add(this._standaloneKeybindingService.addDynamicKeybinding(g, b, h, l))
  54444. }
  54445. var S = new d.InternalEditorAction(g, i, i, r, h, this._contextKeyService);
  54446. return this._actions[n] = S,
  54447. p.add(o.toDisposable((function () {
  54448. delete t._actions[n]
  54449. }))), p
  54450. }, t = h([g(2, b.IInstantiationService), g(3, s.ICodeEditorService), g(4, v.ICommandService), g(5, y.IContextKeyService), g(6, S.IKeybindingService), g(7, E.IThemeService), g(8, w.INotificationService), g(9, L.IAccessibilityService)], t)
  54451. }(l.CodeEditorWidget);
  54452. t.StandaloneCodeEditor = k;
  54453. var T = function (e) {
  54454. function t(t, n, i, o, r, s, a, l, u, d, c, h, g) {
  54455. var f = this;
  54456. p.applyConfigurationValues(h, n, !1);
  54457. var m = d.registerEditorContainer(t);
  54458. "string" == typeof (n = n || {}).theme && d.setTheme(n.theme);
  54459. var v, _ = n.model;
  54460. if (delete n.model, (f = e.call(this, t, n, o, r, s, a, l, d, c, g) || this)._contextViewService = u, f._configurationService = h, f._register(i), f._register(m), void 0 === _ ? (v = self.monaco.editor.createModel(n.value || "", n.language || "text/plain"), f._ownsModel = !0) : (v = _, f._ownsModel = !1), f._attachModel(v), v) {
  54461. var y = {oldModelUrl: null, newModelUrl: v.uri};
  54462. f._onDidChangeModel.fire(y)
  54463. }
  54464. return f
  54465. }
  54466. return r(t, e), t.prototype.dispose = function () {
  54467. e.prototype.dispose.call(this)
  54468. }, t.prototype.updateOptions = function (t) {
  54469. p.applyConfigurationValues(this._configurationService, t, !1), e.prototype.updateOptions.call(this, t)
  54470. }, t.prototype._attachModel = function (t) {
  54471. e.prototype._attachModel.call(this, t), this._modelData && this._contextViewService.setContainer(this._modelData.view.domNode.domNode)
  54472. }, t.prototype._postDetachModelCleanup = function (t) {
  54473. e.prototype._postDetachModelCleanup.call(this, t), t && this._ownsModel && (t.dispose(), this._ownsModel = !1)
  54474. }, t = h([g(3, b.IInstantiationService), g(4, s.ICodeEditorService), g(5, v.ICommandService), g(6, y.IContextKeyService), g(7, S.IKeybindingService), g(8, C.IContextViewService), g(9, f.IStandaloneThemeService), g(10, w.INotificationService), g(11, _.IConfigurationService), g(12, L.IAccessibilityService)], t)
  54475. }(k);
  54476. t.StandaloneEditor = T;
  54477. var R = function (e) {
  54478. function t(t, n, i, o, r, s, a, l, u, d, c, h, g, f, m) {
  54479. var v = this;
  54480. p.applyConfigurationValues(h, n, !0);
  54481. var _ = d.registerEditorContainer(t);
  54482. return "string" == typeof (n = n || {}).theme && (n.theme = d.setTheme(n.theme)), (v = e.call(this, t, n, m, l, r, o, u, d, c, g, f) || this)._contextViewService = a,
  54483. v._configurationService = h, v._register(i), v._register(_), v._contextViewService.setContainer(v._containerDomElement), v
  54484. }
  54485. return r(t, e), t.prototype.dispose = function () {
  54486. e.prototype.dispose.call(this)
  54487. }, t.prototype.updateOptions = function (t) {
  54488. p.applyConfigurationValues(this._configurationService, t, !0), e.prototype.updateOptions.call(this, t)
  54489. }, t.prototype._createInnerEditor = function (e, t, n) {
  54490. return e.createInstance(k, t, n)
  54491. }, t.prototype.getOriginalEditor = function () {
  54492. return e.prototype.getOriginalEditor.call(this)
  54493. }, t.prototype.getModifiedEditor = function () {
  54494. return e.prototype.getModifiedEditor.call(this)
  54495. }, t.prototype.addCommand = function (e, t, n) {
  54496. return this.getModifiedEditor().addCommand(e, t, n)
  54497. }, t.prototype.createContextKey = function (e, t) {
  54498. return this.getModifiedEditor().createContextKey(e, t)
  54499. }, t.prototype.addAction = function (e) {
  54500. return this.getModifiedEditor().addAction(e)
  54501. },
  54502. t = h([g(3, b.IInstantiationService), g(4, y.IContextKeyService), g(5, S.IKeybindingService), g(6, C.IContextViewService), g(7, c.IEditorWorkerService), g(8, s.ICodeEditorService), g(9, f.IStandaloneThemeService), g(10, w.INotificationService), g(11, _.IConfigurationService), g(12, C.IContextMenuService), g(13, x.IEditorProgressService), g(14, b.optional(N.IClipboardService))], t)
  54503. }(u.DiffEditorWidget);
  54504. t.StandaloneDiffEditor = R
  54505. })), define(n[238], i([0, 1, 2, 156, 32, 62, 219, 71, 516, 49, 556, 114, 172, 592, 594, 94, 65, 29, 43, 519, 18, 595, 66, 506, 500, 11, 501, 115, 34, 116, 170, 95, 508, 72, 35, 73, 74, 96, 14, 171, 499, 210, 565, 64, 218, 83, 517]), (function (e, t, n, i, o, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P, A, F, W, B, V, z, H, K, U, j, q, G) {
  54506. "use strict";
  54507. var Y;
  54508. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  54509. var t = new x.ServiceCollection, n = function () {
  54510. function e(e, t) {
  54511. this._serviceId = e, this._factory = t, this._value = null
  54512. }
  54513. return Object.defineProperty(e.prototype, "id", {
  54514. get: function () {
  54515. return this._serviceId
  54516. }, enumerable: !0, configurable: !0
  54517. }),
  54518. e.prototype.get = function (e) {
  54519. if (!this._value) {
  54520. if (e && (this._value = e[this._serviceId.toString()]), this._value || (this._value = this._factory(e)), !this._value) throw new Error("Service " + this._serviceId + " is missing!");
  54521. t.set(this._serviceId, this._value)
  54522. }
  54523. return this._value
  54524. }, e
  54525. }();
  54526. e.LazyStaticService = n;
  54527. var i = [];
  54528. function r(e, t) {
  54529. var o = new n(e, t);
  54530. return i.push(o), o
  54531. }
  54532. e.init = function (e) {
  54533. for (var t = new x.ServiceCollection, n = 0, o = q.getSingletonServiceDescriptors(); n < o.length; n++) {
  54534. var r = o[n], s = r[0], a = r[1];
  54535. t.set(s, a)
  54536. }
  54537. for (var l in e) e.hasOwnProperty(l) && t.set(D.createDecorator(l), e[l]);
  54538. i.forEach((function (n) {
  54539. return t.set(n.id, n.get(e))
  54540. }));
  54541. var u = new N.InstantiationService(t, !0);
  54542. return t.set(D.IInstantiationService, u), [t, u]
  54543. }, e.instantiationService = r(D.IInstantiationService, (function () {
  54544. return new N.InstantiationService(t, !0)
  54545. }));
  54546. var v = new p.SimpleConfigurationService;
  54547. e.configurationService = r(y.IConfigurationService, (function () {
  54548. return v
  54549. })), e.resourceConfigurationService = r(h.ITextResourceConfigurationService, (function () {
  54550. return new p.SimpleResourceConfigurationService(v)
  54551. })), e.resourcePropertiesService = r(h.ITextResourcePropertiesService, (function () {
  54552. return new p.SimpleResourcePropertiesService(v)
  54553. })), e.contextService = r(V.IWorkspaceContextService, (function () {
  54554. return new p.SimpleWorkspaceContextService
  54555. })), e.labelService = r(M.ILabelService, (function () {
  54556. return new p.SimpleUriLabelService
  54557. })), e.telemetryService = r(W.ITelemetryService, (function () {
  54558. return new p.StandaloneTelemetryService
  54559. })), e.dialogService = r(L.IDialogService, (function () {
  54560. return new p.SimpleDialogService
  54561. })), e.notificationService = r(P.INotificationService, (function () {
  54562. return new p.SimpleNotificationService
  54563. })), e.markerService = r(O.IMarkerService, (function () {
  54564. return new R.MarkerService
  54565. })), e.modeService = r(l.IModeService, (function (e) {
  54566. return new u.ModeServiceImpl
  54567. })), e.standaloneThemeService = r(m.IStandaloneThemeService, (function () {
  54568. return new f.StandaloneThemeServiceImpl
  54569. })), e.logService = r(T.ILogService, (function () {
  54570. return new T.NullLogService
  54571. })),
  54572. e.modelService = r(d.IModelService, (function (t) {
  54573. return new c.ModelServiceImpl(e.configurationService.get(t), e.resourcePropertiesService.get(t), e.standaloneThemeService.get(t), e.logService.get(t))
  54574. })), e.markerDecorationsService = r(H.IMarkerDecorationsService, (function (t) {
  54575. return new K.MarkerDecorationsService(e.modelService.get(t), e.markerService.get(t))
  54576. })), e.codeEditorService = r(o.ICodeEditorService, (function (t) {
  54577. return new g.StandaloneCodeEditorServiceImpl(e.standaloneThemeService.get(t))
  54578. })), e.editorProgressService = r(A.IEditorProgressService, (function () {
  54579. return new p.SimpleEditorProgressService
  54580. })), e.storageService = r(F.IStorageService, (function () {
  54581. return new F.InMemoryStorageService
  54582. })), e.editorWorkerService = r(s.IEditorWorkerService, (function (t) {
  54583. return new a.EditorWorkerServiceImpl(e.modelService.get(t), e.resourceConfigurationService.get(t), e.logService.get(t))
  54584. }))
  54585. }(Y = t.StaticServices || (t.StaticServices = {}));
  54586. var Z = function (e) {
  54587. function t(t, n) {
  54588. var o = e.call(this) || this, r = Y.init(n), s = r[0], a = r[1];
  54589. o._serviceCollection = s,
  54590. o._instantiationService = a;
  54591. var l = o.get(y.IConfigurationService), u = o.get(P.INotificationService),
  54592. c = o.get(W.ITelemetryService), h = o.get(B.IThemeService), g = function (e, t) {
  54593. var i = null;
  54594. return n && (i = n[e.toString()]), i || (i = t()), o._serviceCollection.set(e, i), i
  54595. }, f = g(b.IContextKeyService, (function () {
  54596. return o._register(new C.ContextKeyService(l))
  54597. }));
  54598. g(U.IAccessibilityService, (function () {
  54599. return new G.AccessibilityService(f, l)
  54600. })), g(k.IListService, (function () {
  54601. return new k.ListService(h)
  54602. }));
  54603. var m = g(_.ICommandService, (function () {
  54604. return new p.StandaloneCommandService(o._instantiationService)
  54605. })), L = g(I.IKeybindingService, (function () {
  54606. return o._register(new p.StandaloneKeybindingService(f, m, c, u, t))
  54607. })), D = g(j.ILayoutService, (function () {
  54608. return new p.SimpleLayoutService(t)
  54609. })), N = g(w.IContextViewService, (function () {
  54610. return o._register(new E.ContextViewService(D))
  54611. }));
  54612. return g(w.IContextMenuService, (function () {
  54613. var e = new S.ContextMenuService(c, u, N, L, h);
  54614. return e.configure({blockMouse: !1}), o._register(e)
  54615. })), g(v.IMenuService, (function () {
  54616. return new z.MenuService(m)
  54617. })), g(i.IBulkEditService, (function () {
  54618. return new p.SimpleBulkEditService(Y.modelService.get(d.IModelService))
  54619. })), o
  54620. }
  54621. return r(t, e), t.prototype.get = function (e) {
  54622. var t = this._serviceCollection.get(e);
  54623. if (!t) throw new Error("Missing service " + e);
  54624. return t
  54625. }, t.prototype.set = function (e, t) {
  54626. this._serviceCollection.set(e, t)
  54627. }, t.prototype.has = function (e) {
  54628. return this._serviceCollection.has(e)
  54629. }, t
  54630. }(n.Disposable);
  54631. t.DynamicStandaloneServices = Z
  54632. })), define(n[603], i([0, 1, 32, 509, 188, 33, 142, 68, 48, 17, 63, 62, 84, 507, 147, 494, 172, 602, 238, 94, 29, 43, 18, 66, 11, 34, 35, 51, 64, 60, 73, 331]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M) {
  54633. "use strict";
  54634. function k(e, t, o) {
  54635. var r = new _.DynamicStandaloneServices(e, t), s = null;
  54636. r.has(h.ITextModelService) || (s = new m.SimpleEditorModelResolverService(_.StaticServices.modelService.get()), r.set(h.ITextModelService, s)), r.has(N.IOpenerService) || r.set(N.IOpenerService, new i.OpenerService(r.get(n.ICodeEditorService), r.get(C.ICommandService)));
  54637. var a = o(r)
  54638. ;
  54639. return s && s.setEditor(a), a
  54640. }
  54641. function T(e, t, i) {
  54642. return k(e, i || {}, (function (i) {
  54643. return new v.StandaloneEditor(e, t, i, i.get(E.IInstantiationService), i.get(n.ICodeEditorService), i.get(C.ICommandService), i.get(S.IContextKeyService), i.get(L.IKeybindingService), i.get(w.IContextViewService), i.get(y.IStandaloneThemeService), i.get(D.INotificationService), i.get(b.IConfigurationService), i.get(x.IAccessibilityService))
  54644. }))
  54645. }
  54646. function R(e) {
  54647. return _.StaticServices.codeEditorService.get().onCodeEditorAdd((function (t) {
  54648. e(t)
  54649. }))
  54650. }
  54651. function O(e, t, i) {
  54652. return k(e, i || {}, (function (i) {
  54653. return new v.StandaloneDiffEditor(e, t, i, i.get(E.IInstantiationService), i.get(S.IContextKeyService), i.get(L.IKeybindingService), i.get(w.IContextViewService), i.get(c.IEditorWorkerService), i.get(n.ICodeEditorService), i.get(y.IStandaloneThemeService), i.get(D.INotificationService), i.get(b.IConfigurationService), i.get(w.IContextMenuService), i.get(M.IEditorProgressService), null)
  54654. }))
  54655. }
  54656. function P(e, t) {
  54657. return new o.DiffNavigator(e, t)
  54658. }
  54659. function A(e, t, n) {
  54660. return _.StaticServices.modelService.get().createModel(e, t, n)
  54661. }
  54662. function F(e, t, n) {
  54663. if (e = e || "", !t) {
  54664. var i = e.indexOf("\n"), o = e;
  54665. return -1 !== i && (o = e.substring(0, i)), A(e, _.StaticServices.modeService.get().createByFilepathOrFirstLine(n || null, o), n)
  54666. }
  54667. return A(e, _.StaticServices.modeService.get().create(t), n)
  54668. }
  54669. function W(e, t) {
  54670. _.StaticServices.modelService.get().setMode(e, _.StaticServices.modeService.get().create(t))
  54671. }
  54672. function B(e, t, n) {
  54673. e && _.StaticServices.markerService.get().changeOne(t, e.uri, n)
  54674. }
  54675. function V(e) {
  54676. return _.StaticServices.markerService.get().read(e)
  54677. }
  54678. function z(e) {
  54679. return _.StaticServices.modelService.get().getModel(e)
  54680. }
  54681. function H() {
  54682. return _.StaticServices.modelService.get().getModels()
  54683. }
  54684. function K(e) {
  54685. return _.StaticServices.modelService.get().onModelAdded(e)
  54686. }
  54687. function U(e) {
  54688. return _.StaticServices.modelService.get().onModelRemoved(e)
  54689. }
  54690. function j(e) {
  54691. return _.StaticServices.modelService.get().onModelModeChanged((function (t) {
  54692. e({model: t.model, oldLanguage: t.oldModeId})
  54693. }))
  54694. }
  54695. function q(e) {
  54696. return p.createWebWorker(_.StaticServices.modelService.get(), e)
  54697. }
  54698. function G(e, t) {
  54699. return f.Colorizer.colorizeElement(_.StaticServices.standaloneThemeService.get(), _.StaticServices.modeService.get(), e, t)
  54700. }
  54701. function Y(e, t, n) {
  54702. return f.Colorizer.colorize(_.StaticServices.modeService.get(), e, t, n)
  54703. }
  54704. function Z(e, t, n) {
  54705. return void 0 === n && (n = 4), f.Colorizer.colorizeModelLine(e, t, n)
  54706. }
  54707. function $(e, t) {
  54708. _.StaticServices.modeService.get().triggerMode(t);
  54709. for (var n = function (e) {
  54710. var t = u.TokenizationRegistry.get(e);
  54711. return t || {
  54712. getInitialState: function () {
  54713. return d.NULL_STATE
  54714. }, tokenize: function (t, n, i) {
  54715. return d.nullTokenize(e, t, n, i)
  54716. }
  54717. }
  54718. }(t), i = e.split(/\r\n|\r|\n/), o = [], r = n.getInitialState(), s = 0, a = i.length; s < a; s++) {
  54719. var l = i[s], c = n.tokenize(l, r, 0);
  54720. o[s] = c.tokens, r = c.endState
  54721. }
  54722. return o
  54723. }
  54724. function X(e, t) {
  54725. _.StaticServices.standaloneThemeService.get().defineTheme(e, t)
  54726. }
  54727. function Q(e) {
  54728. _.StaticServices.standaloneThemeService.get().setTheme(e)
  54729. }
  54730. function J() {
  54731. I.clearAllFontInfos()
  54732. }
  54733. Object.defineProperty(t, "__esModule", {value: !0}), t.create = T, t.onDidCreateEditor = R,
  54734. t.createDiffEditor = O, t.createDiffNavigator = P, t.createModel = F, t.setModelLanguage = W, t.setModelMarkers = B, t.getModelMarkers = V, t.getModel = z, t.getModels = H, t.onDidCreateModel = K, t.onWillDisposeModel = U, t.onDidChangeModelLanguage = j, t.createWebWorker = q, t.colorizeElement = G, t.colorize = Y, t.colorizeModelLine = Z, t.tokenize = $, t.defineTheme = X, t.setTheme = Q, t.remeasureFonts = J, t.createMonacoEditorAPI = function () {
  54735. return {
  54736. create: T,
  54737. onDidCreateEditor: R,
  54738. createDiffEditor: O,
  54739. createDiffNavigator: P,
  54740. createModel: F,
  54741. setModelLanguage: W,
  54742. setModelMarkers: B,
  54743. getModelMarkers: V,
  54744. getModels: H,
  54745. getModel: z,
  54746. onDidCreateModel: K,
  54747. onWillDisposeModel: U,
  54748. onDidChangeModelLanguage: j,
  54749. createWebWorker: q,
  54750. colorizeElement: G,
  54751. colorize: Y,
  54752. colorizeModelLine: Z,
  54753. tokenize: $,
  54754. defineTheme: X,
  54755. setTheme: Q,
  54756. remeasureFonts: J,
  54757. AccessibilitySupport: g.AccessibilitySupport,
  54758. ContentWidgetPositionPreference: g.ContentWidgetPositionPreference,
  54759. CursorChangeReason: g.CursorChangeReason,
  54760. DefaultEndOfLine: g.DefaultEndOfLine,
  54761. EditorAutoIndentStrategy: g.EditorAutoIndentStrategy,
  54762. EditorOption: g.EditorOption,
  54763. EndOfLinePreference: g.EndOfLinePreference,
  54764. EndOfLineSequence: g.EndOfLineSequence,
  54765. MinimapPosition: g.MinimapPosition,
  54766. MouseTargetType: g.MouseTargetType,
  54767. OverlayWidgetPositionPreference: g.OverlayWidgetPositionPreference,
  54768. OverviewRulerLane: g.OverviewRulerLane,
  54769. RenderLineNumbersType: g.RenderLineNumbersType,
  54770. RenderMinimap: g.RenderMinimap,
  54771. ScrollbarVisibility: g.ScrollbarVisibility,
  54772. ScrollType: g.ScrollType,
  54773. TextEditorCursorBlinkingStyle: g.TextEditorCursorBlinkingStyle,
  54774. TextEditorCursorStyle: g.TextEditorCursorStyle,
  54775. TrackedRangeStickiness: g.TrackedRangeStickiness,
  54776. WrappingIndent: g.WrappingIndent,
  54777. ConfigurationChangedEvent: r.ConfigurationChangedEvent,
  54778. BareFontInfo: s.BareFontInfo,
  54779. FontInfo: s.FontInfo,
  54780. TextModelResolvedOptions: l.TextModelResolvedOptions,
  54781. FindMatch: l.FindMatch,
  54782. EditorType: a.EditorType,
  54783. EditorOptions: r.EditorOptions
  54784. }
  54785. }
  54786. })), define(n[604], i([0, 1, 3, 107, 17, 41, 118, 147, 238, 393, 216]), (function (e, t, n, i, o, r, s, a, l, u, d) {
  54787. "use strict";
  54788. function c(e) {
  54789. s.ModesRegistry.registerLanguage(e)
  54790. }
  54791. function h() {
  54792. var e = []
  54793. ;
  54794. return e = e.concat(s.ModesRegistry.getLanguages())
  54795. }
  54796. function p(e) {
  54797. var t = l.StaticServices.modeService.get().getLanguageIdentifier(e);
  54798. return t ? t.id : 0
  54799. }
  54800. function g(e, t) {
  54801. var n = l.StaticServices.modeService.get().onDidCreateMode((function (i) {
  54802. i.getId() === e && (n.dispose(), t())
  54803. }));
  54804. return n
  54805. }
  54806. function f(e, t) {
  54807. var n = l.StaticServices.modeService.get().getLanguageIdentifier(e);
  54808. if (!n) throw new Error("Cannot set configuration for unknown language " + e);
  54809. return r.LanguageConfigurationRegistry.register(n, t)
  54810. }
  54811. Object.defineProperty(t, "__esModule", {value: !0}), t.register = c, t.getLanguages = h, t.getEncodedLanguageId = p, t.onLanguage = g, t.setLanguageConfiguration = f;
  54812. var m = function () {
  54813. function e(e) {
  54814. this._actual = e
  54815. }
  54816. return e.prototype.getInitialState = function () {
  54817. return this._actual.getInitialState()
  54818. }, e.prototype.tokenize = function (e, t, n) {
  54819. throw new Error("Not supported!")
  54820. }, e.prototype.tokenize2 = function (e, t) {
  54821. var n = this._actual.tokenizeEncoded(e, t);
  54822. return new i.TokenizationResult2(n.tokens, n.endState)
  54823. }, e
  54824. }();
  54825. t.EncodedTokenizationSupport2Adapter = m
  54826. ;var v = function () {
  54827. function e(e, t, n) {
  54828. this._standaloneThemeService = e, this._languageIdentifier = t, this._actual = n
  54829. }
  54830. return e.prototype.getInitialState = function () {
  54831. return this._actual.getInitialState()
  54832. }, e.prototype._toClassicTokens = function (e, t, n) {
  54833. for (var o = [], r = 0, s = 0, a = e.length; s < a; s++) {
  54834. var l = e[s], u = l.startIndex;
  54835. 0 === s ? u = 0 : u < r && (u = r), o[s] = new i.Token(u + n, l.scopes, t), r = u
  54836. }
  54837. return o
  54838. }, e.prototype.tokenize = function (e, t, n) {
  54839. var o, r = this._actual.tokenize(e, t),
  54840. s = this._toClassicTokens(r.tokens, this._languageIdentifier.language, n);
  54841. return o = r.endState.equals(t) ? t : r.endState, new i.TokenizationResult(s, o)
  54842. }, e.prototype._toBinaryTokens = function (e, t) {
  54843. for (var n = this._languageIdentifier.id, i = this._standaloneThemeService.getTheme().tokenTheme, o = [], r = 0, s = 0, a = 0, l = e.length; a < l; a++) {
  54844. var u = e[a], d = i.match(n, u.scopes);
  54845. if (!(r > 0 && o[r - 1] === d)) {
  54846. var c = u.startIndex;
  54847. 0 === a ? c = 0 : c < s && (c = s), o[r++] = c + t, o[r++] = d, s = c
  54848. }
  54849. }
  54850. var h = new Uint32Array(r);
  54851. for (a = 0; a < r; a++) h[a] = o[a];
  54852. return h
  54853. }, e.prototype.tokenize2 = function (e, t, n) {
  54854. var o, r = this._actual.tokenize(e, t), s = this._toBinaryTokens(r.tokens, n);
  54855. return o = r.endState.equals(t) ? t : r.endState, new i.TokenizationResult2(s, o)
  54856. }, e
  54857. }();
  54858. function _(e) {
  54859. return e && "function" == typeof e.then
  54860. }
  54861. function y(e, t) {
  54862. var n = l.StaticServices.modeService.get().getLanguageIdentifier(e);
  54863. if (!n) throw new Error("Cannot set tokens provider for unknown language " + e);
  54864. var i = function (e) {
  54865. return function (e) {
  54866. return "tokenizeEncoded" in e
  54867. }(e) ? new m(e) : new v(l.StaticServices.standaloneThemeService.get(), n, e)
  54868. };
  54869. return _(t) ? o.TokenizationRegistry.registerPromise(e, t.then((function (e) {
  54870. return i(e)
  54871. }))) : o.TokenizationRegistry.register(e, i(t))
  54872. }
  54873. function C(e, t) {
  54874. var n = function (t) {
  54875. return d.createTokenizationSupport(l.StaticServices.modeService.get(), l.StaticServices.standaloneThemeService.get(), e, u.compile(e, t))
  54876. };
  54877. return _(t) ? o.TokenizationRegistry.registerPromise(e, t.then((function (e) {
  54878. return n(e)
  54879. }))) : o.TokenizationRegistry.register(e, n(t))
  54880. }
  54881. function b(e, t) {
  54882. return o.ReferenceProviderRegistry.register(e, t)
  54883. }
  54884. function S(e, t) {
  54885. return o.RenameProviderRegistry.register(e, t)
  54886. }
  54887. function w(e, t) {
  54888. return o.SignatureHelpProviderRegistry.register(e, t)
  54889. }
  54890. function E(e, t) {
  54891. return o.HoverProviderRegistry.register(e, {
  54892. provideHover: function (e, i, o) {
  54893. var r = e.getWordAtPosition(i);
  54894. return Promise.resolve(t.provideHover(e, i, o)).then((function (e) {
  54895. if (e) return !e.range && r && (e.range = new n.Range(i.lineNumber, r.startColumn, i.lineNumber, r.endColumn)), e.range || (e.range = new n.Range(i.lineNumber, i.column, i.lineNumber, i.column)), e
  54896. }))
  54897. }
  54898. })
  54899. }
  54900. function L(e, t) {
  54901. return o.DocumentSymbolProviderRegistry.register(e, t)
  54902. }
  54903. function D(e, t) {
  54904. return o.DocumentHighlightProviderRegistry.register(e, t)
  54905. }
  54906. function N(e, t) {
  54907. return o.DefinitionProviderRegistry.register(e, t)
  54908. }
  54909. function x(e, t) {
  54910. return o.ImplementationProviderRegistry.register(e, t)
  54911. }
  54912. function I(e, t) {
  54913. return o.TypeDefinitionProviderRegistry.register(e, t)
  54914. }
  54915. function M(e, t) {
  54916. return o.CodeLensProviderRegistry.register(e, t)
  54917. }
  54918. function k(e, t) {
  54919. return o.CodeActionProviderRegistry.register(e, {
  54920. provideCodeActions: function (e, i, o, r) {
  54921. var s = l.StaticServices.markerService.get().read({resource: e.uri}).filter((function (e) {
  54922. return n.Range.areIntersectingOrTouching(e, i)
  54923. }));
  54924. return t.provideCodeActions(e, i, {markers: s, only: o.only}, r)
  54925. }
  54926. })
  54927. }
  54928. function T(e, t) {
  54929. return o.DocumentFormattingEditProviderRegistry.register(e, t)
  54930. }
  54931. function R(e, t) {
  54932. return o.DocumentRangeFormattingEditProviderRegistry.register(e, t)
  54933. }
  54934. function O(e, t) {
  54935. return o.OnTypeFormattingEditProviderRegistry.register(e, t)
  54936. }
  54937. function P(e, t) {
  54938. return o.LinkProviderRegistry.register(e, t)
  54939. }
  54940. function A(e, t) {
  54941. return o.CompletionProviderRegistry.register(e, t)
  54942. }
  54943. function F(e, t) {
  54944. return o.ColorProviderRegistry.register(e, t)
  54945. }
  54946. function W(e, t) {
  54947. return o.FoldingRangeProviderRegistry.register(e, t)
  54948. }
  54949. function B(e, t) {
  54950. return o.DeclarationProviderRegistry.register(e, t)
  54951. }
  54952. function V(e, t) {
  54953. return o.SelectionRangeRegistry.register(e, t)
  54954. }
  54955. function z(e, t) {
  54956. return o.DocumentSemanticTokensProviderRegistry.register(e, t)
  54957. }
  54958. function H(e, t) {
  54959. return o.DocumentRangeSemanticTokensProviderRegistry.register(e, t)
  54960. }
  54961. t.TokenizationSupport2Adapter = v,
  54962. t.setTokensProvider = y, t.setMonarchTokensProvider = C, t.registerReferenceProvider = b, t.registerRenameProvider = S, t.registerSignatureHelpProvider = w, t.registerHoverProvider = E, t.registerDocumentSymbolProvider = L, t.registerDocumentHighlightProvider = D, t.registerDefinitionProvider = N, t.registerImplementationProvider = x, t.registerTypeDefinitionProvider = I, t.registerCodeLensProvider = M, t.registerCodeActionProvider = k, t.registerDocumentFormattingEditProvider = T, t.registerDocumentRangeFormattingEditProvider = R, t.registerOnTypeFormattingEditProvider = O, t.registerLinkProvider = P, t.registerCompletionItemProvider = A, t.registerColorProvider = F, t.registerFoldingRangeProvider = W, t.registerDeclarationProvider = B, t.registerSelectionRangeProvider = V, t.registerDocumentSemanticTokensProvider = z, t.registerDocumentRangeSemanticTokensProvider = H, t.createMonacoLanguagesAPI = function () {
  54963. return {
  54964. register: c,
  54965. getLanguages: h,
  54966. onLanguage: g,
  54967. getEncodedLanguageId: p,
  54968. setLanguageConfiguration: f,
  54969. setTokensProvider: y,
  54970. setMonarchTokensProvider: C,
  54971. registerReferenceProvider: b,
  54972. registerRenameProvider: S,
  54973. registerCompletionItemProvider: A,
  54974. registerSignatureHelpProvider: w,
  54975. registerHoverProvider: E,
  54976. registerDocumentSymbolProvider: L,
  54977. registerDocumentHighlightProvider: D,
  54978. registerDefinitionProvider: N,
  54979. registerImplementationProvider: x,
  54980. registerTypeDefinitionProvider: I,
  54981. registerCodeLensProvider: M,
  54982. registerCodeActionProvider: k,
  54983. registerDocumentFormattingEditProvider: T,
  54984. registerDocumentRangeFormattingEditProvider: R,
  54985. registerOnTypeFormattingEditProvider: O,
  54986. registerLinkProvider: P,
  54987. registerColorProvider: F,
  54988. registerFoldingRangeProvider: W,
  54989. registerDeclarationProvider: B,
  54990. registerSelectionRangeProvider: V,
  54991. registerDocumentSemanticTokensProvider: z,
  54992. registerDocumentRangeSemanticTokensProvider: H,
  54993. DocumentHighlightKind: a.DocumentHighlightKind,
  54994. CompletionItemKind: a.CompletionItemKind,
  54995. CompletionItemTag: a.CompletionItemTag,
  54996. CompletionItemInsertTextRule: a.CompletionItemInsertTextRule,
  54997. SymbolKind: a.SymbolKind,
  54998. SymbolTag: a.SymbolTag,
  54999. IndentAction: a.IndentAction,
  55000. CompletionTriggerKind: a.CompletionTriggerKind,
  55001. SignatureHelpTriggerKind: a.SignatureHelpTriggerKind,
  55002. FoldingRangeKind: o.FoldingRangeKind
  55003. }
  55004. }
  55005. })), define(n[605], i([0, 1, 33, 192, 603, 604]), (function (e, t, n, i, o, r) {
  55006. "use strict";
  55007. Object.defineProperty(t, "__esModule", {value: !0});
  55008. var s = self;
  55009. n.EditorOptions.wrappingIndent.defaultValue = 0, n.EditorOptions.glyphMargin.defaultValue = !1, n.EditorOptions.autoIndent.defaultValue = 3, n.EditorOptions.overviewRulerLanes.defaultValue = 2;
  55010. var a = i.createMonacoBaseAPI();
  55011. a.editor = o.createMonacoEditorAPI(), a.languages = r.createMonacoLanguagesAPI(), t.CancellationTokenSource = a.CancellationTokenSource, t.Emitter = a.Emitter, t.KeyCode = a.KeyCode, t.KeyMod = a.KeyMod, t.Position = a.Position, t.Range = a.Range, t.Selection = a.Selection, t.SelectionDirection = a.SelectionDirection, t.MarkerSeverity = a.MarkerSeverity, t.MarkerTag = a.MarkerTag, t.Uri = a.Uri, t.Token = a.Token, t.editor = a.editor, t.languages = a.languages, s.monaco = a, void 0 !== s.require && "function" == typeof s.require.config && s.require.config({
  55012. ignoreDuplicateModules: ["vscode-languageserver-types", "vscode-languageserver-types/main", "vscode-nls", "vscode-nls/vscode-nls", "jsonc-parser", "jsonc-parser/main", "vscode-uri", "vscode-uri/index", "vs/basic-languages/typescript/typescript"]
  55013. })
  55014. })), define(n[606], i([0, 1, 25]), (function (e, t, n) {
  55015. "use strict";
  55016. Object.defineProperty(t, "__esModule", {value: !0}), t.WORKSPACE_EXTENSION = "code-workspace", t.isSingleFolderWorkspaceIdentifier = function (e) {
  55017. return e instanceof n.URI
  55018. }, t.toWorkspaceIdentifier = function (e) {
  55019. return e.configuration ? {
  55020. configPath: e.configuration,
  55021. id: e.id
  55022. } : 1 === e.folders.length ? e.folders[0].uri : void 0
  55023. }
  55024. })), define(n[607], i([0, 1, 466, 77, 39, 151, 41, 5, 606, 136]), (function (e, t, n, i, o, r, s, a, l, u) {
  55025. "use strict";
  55026. Object.defineProperty(t, "__esModule", {value: !0});
  55027. var d = function () {
  55028. function e(e) {
  55029. this._delegates = e
  55030. }
  55031. return e.prototype.resolve = function (e) {
  55032. for (var t = 0, n = this._delegates; t < n.length; t++) {
  55033. var i = n[t].resolve(e);
  55034. if (void 0 !== i) return i
  55035. }
  55036. }, e
  55037. }();
  55038. t.CompositeSnippetVariableResolver = d;
  55039. var c = function () {
  55040. function e(e, t) {
  55041. this._model = e,
  55042. this._selection = t
  55043. }
  55044. return e.prototype.resolve = function (e) {
  55045. var t = e.name;
  55046. if ("SELECTION" === t || "TM_SELECTED_TEXT" === t) {
  55047. var n = this._model.getValueInRange(this._selection) || void 0;
  55048. if (n && this._selection.startLineNumber !== this._selection.endLineNumber && e.snippet) {
  55049. var i = this._model.getLineContent(this._selection.startLineNumber),
  55050. o = a.getLeadingWhitespace(i, 0, this._selection.startColumn - 1), s = o;
  55051. e.snippet.walk((function (t) {
  55052. return t !== e && (t instanceof r.Text && (s = a.getLeadingWhitespace(t.value.split(/\r\n|\r|\n/).pop())), !0)
  55053. }));
  55054. var l = a.commonPrefixLength(s, o);
  55055. n = n.replace(/(\r\n|\r|\n)(.*)/g, (function (e, t, n) {
  55056. return "" + t + s.substr(l) + n
  55057. }))
  55058. }
  55059. return n
  55060. }
  55061. if ("TM_CURRENT_LINE" === t) return this._model.getLineContent(this._selection.positionLineNumber);
  55062. if ("TM_CURRENT_WORD" === t) {
  55063. var u = this._model.getWordAtPosition({
  55064. lineNumber: this._selection.positionLineNumber,
  55065. column: this._selection.positionColumn
  55066. });
  55067. return u && u.word || void 0
  55068. }
  55069. return "TM_LINE_INDEX" === t ? String(this._selection.positionLineNumber - 1) : "TM_LINE_NUMBER" === t ? String(this._selection.positionLineNumber) : void 0
  55070. }, e
  55071. }();
  55072. t.SelectionBasedVariableResolver = c;
  55073. var h = function () {
  55074. function e(e, t) {
  55075. this._labelService = e, this._model = t
  55076. }
  55077. return e.prototype.resolve = function (e) {
  55078. var t = e.name;
  55079. if ("TM_FILENAME" === t) return i.basename(this._model.uri.fsPath);
  55080. if ("TM_FILENAME_BASE" === t) {
  55081. var n = i.basename(this._model.uri.fsPath), r = n.lastIndexOf(".");
  55082. return r <= 0 ? n : n.slice(0, r)
  55083. }
  55084. return "TM_DIRECTORY" === t && this._labelService ? "." === i.dirname(this._model.uri.fsPath) ? "" : this._labelService.getUriLabel(o.dirname(this._model.uri)) : "TM_FILEPATH" === t && this._labelService ? this._labelService.getUriLabel(this._model.uri) : void 0
  55085. }, e
  55086. }();
  55087. t.ModelBasedVariableResolver = h;
  55088. var p = function () {
  55089. function e(e, t, n, i) {
  55090. this._readClipboardText = e, this._selectionIdx = t, this._selectionCount = n, this._spread = i
  55091. }
  55092. return e.prototype.resolve = function (e) {
  55093. if ("CLIPBOARD" === e.name) {
  55094. var t = this._readClipboardText();
  55095. if (t) {
  55096. if (this._spread) {
  55097. var n = t.split(/\r\n|\n|\r/).filter((function (e) {
  55098. return !a.isFalsyOrWhitespace(e)
  55099. }));
  55100. if (n.length === this._selectionCount) return n[this._selectionIdx]
  55101. }
  55102. return t
  55103. }
  55104. }
  55105. }, e
  55106. }();
  55107. t.ClipboardBasedVariableResolver = p;
  55108. var g = function () {
  55109. function e(e) {
  55110. this._model = e
  55111. }
  55112. return e.prototype.resolve = function (e) {
  55113. var t = e.name, n = this._model.getLanguageIdentifier(),
  55114. i = s.LanguageConfigurationRegistry.getComments(n.id);
  55115. if (i) return "LINE_COMMENT" === t ? i.lineCommentToken || void 0 : "BLOCK_COMMENT_START" === t ? i.blockCommentStartToken || void 0 : "BLOCK_COMMENT_END" === t && i.blockCommentEndToken || void 0
  55116. }, e
  55117. }();
  55118. t.CommentBasedVariableResolver = g;
  55119. var f = function () {
  55120. function e() {
  55121. }
  55122. return e.prototype.resolve = function (t) {
  55123. var n = t.name
  55124. ;
  55125. return "CURRENT_YEAR" === n ? String((new Date).getFullYear()) : "CURRENT_YEAR_SHORT" === n ? String((new Date).getFullYear()).slice(-2) : "CURRENT_MONTH" === n ? a.pad((new Date).getMonth().valueOf() + 1, 2) : "CURRENT_DATE" === n ? a.pad((new Date).getDate().valueOf(), 2) : "CURRENT_HOUR" === n ? a.pad((new Date).getHours().valueOf(), 2) : "CURRENT_MINUTE" === n ? a.pad((new Date).getMinutes().valueOf(), 2) : "CURRENT_SECOND" === n ? a.pad((new Date).getSeconds().valueOf(), 2) : "CURRENT_DAY_NAME" === n ? e.dayNames[(new Date).getDay()] : "CURRENT_DAY_NAME_SHORT" === n ? e.dayNamesShort[(new Date).getDay()] : "CURRENT_MONTH_NAME" === n ? e.monthNames[(new Date).getMonth()] : "CURRENT_MONTH_NAME_SHORT" === n ? e.monthNamesShort[(new Date).getMonth()] : "CURRENT_SECONDS_UNIX" === n ? String(Math.floor(Date.now() / 1e3)) : void 0
  55126. }, e.dayNames = [n.localize(0, null), n.localize(1, null), n.localize(2, null), n.localize(3, null), n.localize(4, null), n.localize(5, null), n.localize(6, null)],
  55127. e.dayNamesShort = [n.localize(7, null), n.localize(8, null), n.localize(9, null), n.localize(10, null), n.localize(11, null), n.localize(12, null), n.localize(13, null)], e.monthNames = [n.localize(14, null), n.localize(15, null), n.localize(16, null), n.localize(17, null), n.localize(18, null), n.localize(19, null), n.localize(20, null), n.localize(21, null), n.localize(22, null), n.localize(23, null), n.localize(24, null), n.localize(25, null)], e.monthNamesShort = [n.localize(26, null), n.localize(27, null), n.localize(28, null), n.localize(29, null), n.localize(30, null), n.localize(31, null), n.localize(32, null), n.localize(33, null), n.localize(34, null), n.localize(35, null), n.localize(36, null), n.localize(37, null)], e
  55128. }();
  55129. t.TimeBasedVariableResolver = f;
  55130. var m = function () {
  55131. function e(e) {
  55132. this._workspaceService = e
  55133. }
  55134. return e.prototype.resolve = function (e) {
  55135. if (this._workspaceService) {
  55136. var t = l.toWorkspaceIdentifier(this._workspaceService.getWorkspace())
  55137. ;
  55138. if (t) return "WORKSPACE_NAME" === e.name ? this._resolveWorkspaceName(t) : "WORKSPACE_FOLDER" === e.name ? this._resoveWorkspacePath(t) : void 0
  55139. }
  55140. }, e.prototype._resolveWorkspaceName = function (e) {
  55141. if (l.isSingleFolderWorkspaceIdentifier(e)) return i.basename(e.path);
  55142. var t = i.basename(e.configPath.path);
  55143. return a.endsWith(t, l.WORKSPACE_EXTENSION) && (t = t.substr(0, t.length - l.WORKSPACE_EXTENSION.length - 1)), t
  55144. }, e.prototype._resoveWorkspacePath = function (e) {
  55145. if (l.isSingleFolderWorkspaceIdentifier(e)) return u.normalizeDriveLetter(e.fsPath);
  55146. var t = i.basename(e.configPath.path), n = e.configPath.fsPath;
  55147. return a.endsWith(n, t) && (n = n.substr(0, n.length - t.length - 1)), n ? u.normalizeDriveLetter(n) : "/"
  55148. }, e
  55149. }();
  55150. t.WorkspaceBasedVariableResolver = m;
  55151. var v = function () {
  55152. function e() {
  55153. }
  55154. return e.prototype.resolve = function (e) {
  55155. var t = e.name;
  55156. return "RANDOM" === t ? Math.random().toString().slice(-6) : "RANDOM_HEX" === t ? Math.random().toString(16).slice(-6) : void 0
  55157. }, e
  55158. }();
  55159. t.RandomBasedVariableResolver = v
  55160. })),
  55161. define(n[608], i([0, 1, 19, 2, 5, 58, 3, 22, 30, 162, 171, 11, 151, 607, 14, 20, 116, 321]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g, f, m) {
  55162. "use strict";
  55163. Object.defineProperty(t, "__esModule", {value: !0}), g.registerThemingParticipant((function (e, t) {
  55164. function n(t) {
  55165. var n = e.getColor(t);
  55166. return n ? n.toString() : "transparent"
  55167. }
  55168. t.addRule(".monaco-editor .snippet-placeholder { background-color: " + n(f.snippetTabstopHighlightBackground) + "; outline-color: " + n(f.snippetTabstopHighlightBorder) + "; }"), t.addRule(".monaco-editor .finish-snippet-placeholder { background-color: " + n(f.snippetFinalTabstopHighlightBackground) + "; outline-color: " + n(f.snippetFinalTabstopHighlightBorder) + "; }")
  55169. }));
  55170. var v = function () {
  55171. function e(e, t, i) {
  55172. this._nestingLevel = 1, this._editor = e, this._snippet = t, this._offset = i, this._placeholderGroups = n.groupBy(t.placeholders, h.Placeholder.compareByIndex), this._placeholderGroupsIdx = -1
  55173. }
  55174. return e.prototype.dispose = function () {
  55175. if (this._placeholderDecorations) {
  55176. var e = [];
  55177. this._placeholderDecorations.forEach((function (t) {
  55178. return e.push(t)
  55179. })),
  55180. this._editor.deltaDecorations(e, [])
  55181. }
  55182. this._placeholderGroups.length = 0
  55183. }, e.prototype._initDecorations = function () {
  55184. var t = this;
  55185. if (!this._placeholderDecorations) {
  55186. this._placeholderDecorations = new Map;
  55187. var n = this._editor.getModel();
  55188. this._editor.changeDecorations((function (i) {
  55189. for (var o = 0, r = t._snippet.placeholders; o < r.length; o++) {
  55190. var a = r[o], l = t._snippet.offset(a), u = t._snippet.fullLen(a),
  55191. d = s.Range.fromPositions(n.getPositionAt(t._offset + l), n.getPositionAt(t._offset + l + u)),
  55192. c = a.isFinalTabstop ? e._decor.inactiveFinal : e._decor.inactive,
  55193. h = i.addDecoration(d, c);
  55194. t._placeholderDecorations.set(a, h)
  55195. }
  55196. }))
  55197. }
  55198. }, e.prototype.move = function (t) {
  55199. var n = this;
  55200. if (!this._editor.hasModel()) return [];
  55201. if (this._initDecorations(), this._placeholderGroupsIdx >= 0) {
  55202. for (var i = [], o = 0, s = this._placeholderGroups[this._placeholderGroupsIdx]; o < s.length; o++) {
  55203. var l = s[o];
  55204. if (l.transform) {
  55205. var u = this._placeholderDecorations.get(l),
  55206. d = this._editor.getModel().getDecorationRange(u),
  55207. c = this._editor.getModel().getValueInRange(d)
  55208. ;i.push(r.EditOperation.replaceMove(d, l.transform.resolve(c)))
  55209. }
  55210. }
  55211. i.length > 0 && this._editor.executeEdits("snippet.placeholderTransform", i)
  55212. }
  55213. var h = !1;
  55214. !0 === t && this._placeholderGroupsIdx < this._placeholderGroups.length - 1 ? (this._placeholderGroupsIdx += 1, h = !0) : !1 === t && this._placeholderGroupsIdx > 0 && (this._placeholderGroupsIdx -= 1, h = !0);
  55215. var p = this._editor.getModel().changeDecorations((function (t) {
  55216. for (var i = new Set, o = [], r = 0, s = n._placeholderGroups[n._placeholderGroupsIdx]; r < s.length; r++) {
  55217. var l = s[r], u = n._placeholderDecorations.get(l),
  55218. d = n._editor.getModel().getDecorationRange(u);
  55219. o.push(new a.Selection(d.startLineNumber, d.startColumn, d.endLineNumber, d.endColumn)), h = h && n._hasPlaceholderBeenCollapsed(l), t.changeDecorationOptions(u, l.isFinalTabstop ? e._decor.activeFinal : e._decor.active), i.add(l);
  55220. for (var c = 0, p = n._snippet.enclosingPlaceholders(l); c < p.length; c++) {
  55221. var g = p[c], f = n._placeholderDecorations.get(g);
  55222. t.changeDecorationOptions(f, g.isFinalTabstop ? e._decor.activeFinal : e._decor.active), i.add(g)
  55223. }
  55224. }
  55225. return n._placeholderDecorations.forEach((function (n, o) {
  55226. i.has(o) || t.changeDecorationOptions(n, o.isFinalTabstop ? e._decor.inactiveFinal : e._decor.inactive)
  55227. })), o
  55228. }));
  55229. return h ? this.move(t) : p
  55230. }, e.prototype._hasPlaceholderBeenCollapsed = function (e) {
  55231. for (var t = e; t;) {
  55232. if (t instanceof h.Placeholder) {
  55233. var n = this._placeholderDecorations.get(t);
  55234. if (this._editor.getModel().getDecorationRange(n).isEmpty() && t.toString().length > 0) return !0
  55235. }
  55236. t = t.parent
  55237. }
  55238. return !1
  55239. }, Object.defineProperty(e.prototype, "isAtFirstPlaceholder", {
  55240. get: function () {
  55241. return this._placeholderGroupsIdx <= 0 || 0 === this._placeholderGroups.length
  55242. }, enumerable: !0, configurable: !0
  55243. }), Object.defineProperty(e.prototype, "isAtLastPlaceholder", {
  55244. get: function () {
  55245. return this._placeholderGroupsIdx === this._placeholderGroups.length - 1
  55246. }, enumerable: !0, configurable: !0
  55247. }), Object.defineProperty(e.prototype, "hasPlaceholder", {
  55248. get: function () {
  55249. return this._snippet.placeholders.length > 0
  55250. }, enumerable: !0, configurable: !0
  55251. }), e.prototype.computePossibleSelections = function () {
  55252. for (var e = new Map, t = 0, n = this._placeholderGroups; t < n.length; t++) for (var i = void 0, o = 0, r = n[t]; o < r.length; o++) {
  55253. var s = r[o];
  55254. if (s.isFinalTabstop) break;
  55255. i || (i = [], e.set(s.index, i));
  55256. var a = this._placeholderDecorations.get(s), l = this._editor.getModel().getDecorationRange(a);
  55257. if (!l) {
  55258. e.delete(s.index);
  55259. break
  55260. }
  55261. i.push(l)
  55262. }
  55263. return e
  55264. }, Object.defineProperty(e.prototype, "choice", {
  55265. get: function () {
  55266. return this._placeholderGroups[this._placeholderGroupsIdx][0].choice
  55267. }, enumerable: !0, configurable: !0
  55268. }), e.prototype.merge = function (t) {
  55269. var i = this, o = this._editor.getModel();
  55270. this._nestingLevel *= 10, this._editor.changeDecorations((function (r) {
  55271. for (var a = 0, l = i._placeholderGroups[i._placeholderGroupsIdx]; a < l.length; a++) {
  55272. var u = l[a], d = t.shift();
  55273. console.assert(!d._placeholderDecorations);
  55274. for (var c = d._snippet.placeholderInfo.last.index, p = 0, g = d._snippet.placeholderInfo.all; p < g.length; p++) {
  55275. var f = g[p];
  55276. f.isFinalTabstop ? f.index = u.index + (c + 1) / i._nestingLevel : f.index = u.index + f.index / i._nestingLevel
  55277. }
  55278. i._snippet.replace(u, d._snippet.children)
  55279. ;var m = i._placeholderDecorations.get(u);
  55280. r.removeDecoration(m), i._placeholderDecorations.delete(u);
  55281. for (var v = 0, _ = d._snippet.placeholders; v < _.length; v++) {
  55282. var y = _[v], C = d._snippet.offset(y), b = d._snippet.fullLen(y),
  55283. S = s.Range.fromPositions(o.getPositionAt(d._offset + C), o.getPositionAt(d._offset + C + b)),
  55284. w = r.addDecoration(S, e._decor.inactive);
  55285. i._placeholderDecorations.set(y, w)
  55286. }
  55287. }
  55288. i._placeholderGroups = n.groupBy(i._snippet.placeholders, h.Placeholder.compareByIndex)
  55289. }))
  55290. }, e._decor = {
  55291. active: l.ModelDecorationOptions.register({
  55292. stickiness: 0,
  55293. className: "snippet-placeholder"
  55294. }),
  55295. inactive: l.ModelDecorationOptions.register({stickiness: 1, className: "snippet-placeholder"}),
  55296. activeFinal: l.ModelDecorationOptions.register({
  55297. stickiness: 1,
  55298. className: "finish-snippet-placeholder"
  55299. }),
  55300. inactiveFinal: l.ModelDecorationOptions.register({
  55301. stickiness: 1,
  55302. className: "finish-snippet-placeholder"
  55303. })
  55304. }, e
  55305. }();
  55306. t.OneSnippet = v;
  55307. var _ = {overwriteBefore: 0, overwriteAfter: 0, adjustWhitespace: !0, clipboardText: void 0},
  55308. y = function () {
  55309. function e(e, t, n) {
  55310. void 0 === n && (n = _),
  55311. this._templateMerges = [], this._snippets = [], this._editor = e, this._template = t, this._options = n
  55312. }
  55313. return e.adjustWhitespace = function (e, t, n, i, r) {
  55314. var s = e.getLineContent(t.lineNumber), a = o.getLeadingWhitespace(s, 0, t.column - 1);
  55315. n.walk((function (t) {
  55316. if (t instanceof h.Text && !(t.parent instanceof h.Choice)) {
  55317. var n = t.value.split(/\r\n|\r|\n/);
  55318. if (i) for (var s = 1; s < n.length; s++) {
  55319. var l = o.getLeadingWhitespace(n[s]);
  55320. n[s] = e.normalizeIndentation(a + l) + n[s].substr(l.length)
  55321. }
  55322. if (r) {
  55323. var u = n.join(e.getEOL());
  55324. u !== t.value && t.parent.replace(t, [new h.Text(u)])
  55325. }
  55326. }
  55327. return !0
  55328. }))
  55329. }, e.adjustSelection = function (e, t, n, i) {
  55330. if (0 !== n || 0 !== i) {
  55331. var o = t.positionLineNumber, r = t.positionColumn, s = r - n, l = r + i,
  55332. u = e.validateRange({
  55333. startLineNumber: o,
  55334. startColumn: s,
  55335. endLineNumber: o,
  55336. endColumn: l
  55337. });
  55338. t = a.Selection.createWithDirection(u.startLineNumber, u.startColumn, u.endLineNumber, u.endColumn, t.getDirection())
  55339. }
  55340. return t
  55341. }, e.createEditsAndSnippets = function (t, n, i, o, a, l, g) {
  55342. var f = [], _ = [];
  55343. if (!t.hasModel()) return {edits: f, snippets: _};
  55344. for (var y = t.getModel(), C = t.invokeWithinContext((function (e) {
  55345. return e.get(d.IWorkspaceContextService, c.optional)
  55346. })), b = t.invokeWithinContext((function (e) {
  55347. return new p.ModelBasedVariableResolver(e.get(m.ILabelService, c.optional), y)
  55348. })), S = t.invokeWithinContext((function (e) {
  55349. return e.get(u.IClipboardService, c.optional)
  55350. })), w = function () {
  55351. return g || S && S.readTextSync()
  55352. }, E = 0, L = y.getValueInRange(e.adjustSelection(y, t.getSelection(), i, 0)), D = y.getValueInRange(e.adjustSelection(y, t.getSelection(), 0, o)), N = y.getLineFirstNonWhitespaceColumn(t.getSelection().positionLineNumber), x = t.getSelections().map((function (e, t) {
  55353. return {selection: e, idx: t}
  55354. })).sort((function (e, t) {
  55355. return s.Range.compareRangesUsingStarts(e.selection, t.selection)
  55356. })), I = 0, M = x; I < M.length; I++) {
  55357. var k = M[I], T = k.selection, R = k.idx, O = e.adjustSelection(y, T, i, 0),
  55358. P = e.adjustSelection(y, T, 0, o);
  55359. L !== y.getValueInRange(O) && (O = T), D !== y.getValueInRange(P) && (P = T);
  55360. var A = T.setStartPosition(O.startLineNumber, O.startColumn).setEndPosition(P.endLineNumber, P.endColumn),
  55361. F = (new h.SnippetParser).parse(n, !0, a), W = A.getStartPosition()
  55362. ;e.adjustWhitespace(y, W, F, l || R > 0 && N !== y.getLineFirstNonWhitespaceColumn(T.positionLineNumber), !0), F.resolveVariables(new p.CompositeSnippetVariableResolver([b, new p.ClipboardBasedVariableResolver(w, R, x.length, "spread" === t.getOption(60)), new p.SelectionBasedVariableResolver(y, T), new p.CommentBasedVariableResolver(y), new p.TimeBasedVariableResolver, new p.WorkspaceBasedVariableResolver(C), new p.RandomBasedVariableResolver]));
  55363. var B = y.getOffsetAt(W) + E;
  55364. E += F.toString().length - y.getValueLengthInRange(A), f[R] = r.EditOperation.replace(A, F.toString()), _[R] = new v(t, F, B)
  55365. }
  55366. return {edits: f, snippets: _}
  55367. }, e.prototype.dispose = function () {
  55368. i.dispose(this._snippets)
  55369. }, e.prototype._logInfo = function () {
  55370. return 'template="' + this._template + '", merged_templates="' + this._templateMerges.join(" -> ") + '"'
  55371. }, e.prototype.insert = function () {
  55372. var t = this;
  55373. if (this._editor.hasModel()) {
  55374. var n = e.createEditsAndSnippets(this._editor, this._template, this._options.overwriteBefore, this._options.overwriteAfter, !1, this._options.adjustWhitespace, this._options.clipboardText),
  55375. i = n.edits, o = n.snippets;
  55376. this._snippets = o, this._editor.executeEdits("snippet", i, (function (e) {
  55377. return t._snippets[0].hasPlaceholder ? t._move(!0) : e.map((function (e) {
  55378. return a.Selection.fromPositions(e.range.getEndPosition())
  55379. }))
  55380. })), this._editor.revealRange(this._editor.getSelections()[0])
  55381. }
  55382. }, e.prototype.merge = function (t, n) {
  55383. var i = this;
  55384. if (void 0 === n && (n = _), this._editor.hasModel()) {
  55385. this._templateMerges.push([this._snippets[0]._nestingLevel, this._snippets[0]._placeholderGroupsIdx, t]);
  55386. var o = e.createEditsAndSnippets(this._editor, t, n.overwriteBefore, n.overwriteAfter, !0, n.adjustWhitespace, n.clipboardText),
  55387. r = o.edits, s = o.snippets;
  55388. this._editor.executeEdits("snippet", r, (function (e) {
  55389. for (var t = 0, n = i._snippets; t < n.length; t++) {
  55390. n[t].merge(s)
  55391. }
  55392. return console.assert(0 === s.length), i._snippets[0].hasPlaceholder ? i._move(void 0) : e.map((function (e) {
  55393. return a.Selection.fromPositions(e.range.getEndPosition())
  55394. }))
  55395. }))
  55396. }
  55397. }, e.prototype.next = function () {
  55398. var e = this._move(!0);
  55399. this._editor.setSelections(e), this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())
  55400. }, e.prototype.prev = function () {
  55401. var e = this._move(!1);
  55402. this._editor.setSelections(e), this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())
  55403. }, e.prototype._move = function (e) {
  55404. for (var t = [], n = 0, i = this._snippets; n < i.length; n++) {
  55405. var o = i[n].move(e);
  55406. t.push.apply(t, o)
  55407. }
  55408. return t
  55409. }, Object.defineProperty(e.prototype, "isAtFirstPlaceholder", {
  55410. get: function () {
  55411. return this._snippets[0].isAtFirstPlaceholder
  55412. }, enumerable: !0, configurable: !0
  55413. }), Object.defineProperty(e.prototype, "isAtLastPlaceholder", {
  55414. get: function () {
  55415. return this._snippets[0].isAtLastPlaceholder
  55416. }, enumerable: !0, configurable: !0
  55417. }), Object.defineProperty(e.prototype, "hasPlaceholder", {
  55418. get: function () {
  55419. return this._snippets[0].hasPlaceholder
  55420. }, enumerable: !0, configurable: !0
  55421. }), Object.defineProperty(e.prototype, "choice", {
  55422. get: function () {
  55423. return this._snippets[0].choice
  55424. }, enumerable: !0, configurable: !0
  55425. }), e.prototype.isSelectionWithinPlaceholders = function () {
  55426. if (!this.hasPlaceholder) return !1;
  55427. var e = this._editor.getSelections();
  55428. if (e.length < this._snippets.length) return !1;
  55429. for (var t = new Map, n = function (n) {
  55430. var i = n.computePossibleSelections();
  55431. if (0 === t.size && i.forEach((function (n, i) {
  55432. n.sort(s.Range.compareRangesUsingStarts);
  55433. for (var o = 0, r = e; o < r.length; o++) {
  55434. var a = r[o];
  55435. if (n[0].containsRange(a)) {
  55436. t.set(i, []);
  55437. break
  55438. }
  55439. }
  55440. })), 0 === t.size) return {value: !1};
  55441. t.forEach((function (e, t) {
  55442. e.push.apply(e, i.get(t))
  55443. }))
  55444. }, i = 0, o = this._snippets; i < o.length; i++) {
  55445. var r = n(o[i]);
  55446. if ("object" == typeof r) return r.value
  55447. }
  55448. return e.sort(s.Range.compareRangesUsingStarts), t.forEach((function (n, i) {
  55449. if (n.length === e.length) {
  55450. n.sort(s.Range.compareRangesUsingStarts);
  55451. for (var o = 0; o < n.length; o++) if (!n[o].containsRange(e[o])) return void t.delete(i)
  55452. } else t.delete(i)
  55453. })), t.size > 0
  55454. }, e
  55455. }();
  55456. t.SnippetSession = y
  55457. })), define(n[173], i([0, 1, 2, 5, 12, 3, 22, 23, 120, 18, 95, 608]), (function (e, t, n, i, o, r, s, a, u, d, c, p) {
  55458. "use strict"
  55459. ;Object.defineProperty(t, "__esModule", {value: !0});
  55460. var f = {
  55461. overwriteBefore: 0,
  55462. overwriteAfter: 0,
  55463. undoStopBefore: !0,
  55464. undoStopAfter: !0,
  55465. adjustWhitespace: !0,
  55466. clipboardText: void 0
  55467. }, m = function () {
  55468. function e(t, i, o) {
  55469. this._editor = t, this._logService = i, this._snippetListener = new n.DisposableStore, this._modelVersionId = -1, this._inSnippet = e.InSnippetMode.bindTo(o), this._hasNextTabstop = e.HasNextTabstop.bindTo(o), this._hasPrevTabstop = e.HasPrevTabstop.bindTo(o)
  55470. }
  55471. return e.get = function (t) {
  55472. return t.getContribution(e.ID)
  55473. }, e.prototype.dispose = function () {
  55474. this._inSnippet.reset(), this._hasPrevTabstop.reset(), this._hasNextTabstop.reset(), n.dispose(this._session), this._snippetListener.dispose()
  55475. }, e.prototype.insert = function (e, t) {
  55476. try {
  55477. this._doInsert(e, void 0 === t ? f : l(l({}, f), t))
  55478. } catch (t) {
  55479. this.cancel(), this._logService.error(t), this._logService.error("snippet_error"), this._logService.error("insert_template=", e), this._logService.error("existing_template=", this._session ? this._session._logInfo() : "<no_session>")
  55480. }
  55481. }, e.prototype._doInsert = function (e, t) {
  55482. var n = this;
  55483. this._editor.hasModel() && (this._snippetListener.clear(), t.undoStopBefore && this._editor.getModel().pushStackElement(), this._session ? this._session.merge(e, t) : (this._modelVersionId = this._editor.getModel().getAlternativeVersionId(), this._session = new p.SnippetSession(this._editor, e, t), this._session.insert()), t.undoStopAfter && this._editor.getModel().pushStackElement(), this._updateState(), this._snippetListener.add(this._editor.onDidChangeModelContent((function (e) {
  55484. return e.isFlush && n.cancel()
  55485. }))), this._snippetListener.add(this._editor.onDidChangeModel((function () {
  55486. return n.cancel()
  55487. }))), this._snippetListener.add(this._editor.onDidChangeCursorSelection((function () {
  55488. return n._updateState()
  55489. }))))
  55490. }, e.prototype._updateState = function () {
  55491. if (this._session && this._editor.hasModel()) {
  55492. if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) return this.cancel();
  55493. if (!this._session.hasPlaceholder) return this.cancel()
  55494. ;
  55495. if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) return this.cancel();
  55496. this._inSnippet.set(!0), this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder), this._hasNextTabstop.set(!this._session.isAtLastPlaceholder), this._handleChoice()
  55497. }
  55498. }, e.prototype._handleChoice = function () {
  55499. var e = this;
  55500. if (this._session && this._editor.hasModel()) {
  55501. var t = this._session.choice;
  55502. if (t) {
  55503. if (this._currentChoice !== t) {
  55504. this._currentChoice = t, this._editor.setSelections(this._editor.getSelections().map((function (e) {
  55505. return s.Selection.fromPositions(e.getStartPosition())
  55506. })));
  55507. var n = t.options[0];
  55508. u.showSimpleSuggestions(this._editor, t.options.map((function (t, o) {
  55509. return {
  55510. kind: 13,
  55511. label: t.value,
  55512. insertText: t.value,
  55513. sortText: i.repeat("a", o + 1),
  55514. range: r.Range.fromPositions(e._editor.getPosition(), e._editor.getPosition().delta(0, n.value.length))
  55515. }
  55516. })))
  55517. }
  55518. } else this._currentChoice = void 0
  55519. } else this._currentChoice = void 0
  55520. }, e.prototype.finish = function () {
  55521. for (; this._inSnippet.get();) this.next()
  55522. }, e.prototype.cancel = function (e) {
  55523. void 0 === e && (e = !1), this._inSnippet.reset(), this._hasPrevTabstop.reset(), this._hasNextTabstop.reset(), this._snippetListener.clear(), n.dispose(this._session), this._session = void 0, this._modelVersionId = -1, e && this._editor.setSelections([this._editor.getSelection()])
  55524. }, e.prototype.prev = function () {
  55525. this._session && this._session.prev(), this._updateState()
  55526. }, e.prototype.next = function () {
  55527. this._session && this._session.next(), this._updateState()
  55528. }, e.prototype.isInSnippet = function () {
  55529. return Boolean(this._inSnippet.get())
  55530. }, e.ID = "snippetController2", e.InSnippetMode = new d.RawContextKey("inSnippetMode", !1), e.HasNextTabstop = new d.RawContextKey("hasNextTabstop", !1), e.HasPrevTabstop = new d.RawContextKey("hasPrevTabstop", !1), e = h([g(1, c.ILogService), g(2, d.IContextKeyService)], e)
  55531. }();
  55532. t.SnippetController2 = m, o.registerEditorContribution(m.ID, m);
  55533. var v = o.EditorCommand.bindToContribution(m.get);
  55534. o.registerEditorCommand(new v({
  55535. id: "jumpToNextSnippetPlaceholder",
  55536. precondition: d.ContextKeyExpr.and(m.InSnippetMode, m.HasNextTabstop),
  55537. handler: function (e) {
  55538. return e.next()
  55539. },
  55540. kbOpts: {weight: 130, kbExpr: a.EditorContextKeys.editorTextFocus, primary: 2}
  55541. })), o.registerEditorCommand(new v({
  55542. id: "jumpToPrevSnippetPlaceholder",
  55543. precondition: d.ContextKeyExpr.and(m.InSnippetMode, m.HasPrevTabstop),
  55544. handler: function (e) {
  55545. return e.prev()
  55546. },
  55547. kbOpts: {weight: 130, kbExpr: a.EditorContextKeys.editorTextFocus, primary: 1026}
  55548. })), o.registerEditorCommand(new v({
  55549. id: "leaveSnippet", precondition: m.InSnippetMode, handler: function (e) {
  55550. return e.cancel(!0)
  55551. }, kbOpts: {weight: 130, kbExpr: a.EditorContextKeys.editorTextFocus, primary: 9, secondary: [1033]}
  55552. })), o.registerEditorCommand(new v({
  55553. id: "acceptSnippet", precondition: m.InSnippetMode, handler: function (e) {
  55554. return e.finish()
  55555. }
  55556. }))
  55557. })), define(n[609], i([0, 1, 19, 15, 10, 4, 2, 22, 17, 389, 120, 173, 26, 392, 5]), (function (e, t, n, i, o, r, s, a, l, u, d, c, h, p, g) {
  55558. "use strict";
  55559. Object.defineProperty(t, "__esModule", {value: !0});
  55560. var f = function () {
  55561. function e(e, t, n, i) {
  55562. this.leadingLineContent = e.getLineContent(t.lineNumber).substr(0, t.column - 1), this.leadingWord = e.getWordUntilPosition(t),
  55563. this.lineNumber = t.lineNumber, this.column = t.column, this.auto = n, this.shy = i
  55564. }
  55565. return e.shouldAutoTrigger = function (e) {
  55566. if (!e.hasModel()) return !1;
  55567. var t = e.getModel(), n = e.getPosition();
  55568. t.tokenizeIfCheap(n.lineNumber);
  55569. var i = t.getWordAtPosition(n);
  55570. return !!i && (i.endColumn === n.column && !!isNaN(Number(i.word)))
  55571. }, e
  55572. }();
  55573. t.LineContext = f;
  55574. var m = function () {
  55575. function e(e, t) {
  55576. var n = this;
  55577. this._editor = e, this._editorWorker = t, this._toDispose = new s.DisposableStore, this._quickSuggestDelay = 10, this._triggerCharacterListener = new s.DisposableStore, this._triggerQuickSuggest = new i.TimeoutTimer, this._state = 0, this._completionDisposables = new s.DisposableStore, this._onDidCancel = new r.Emitter, this._onDidTrigger = new r.Emitter, this._onDidSuggest = new r.Emitter, this.onDidCancel = this._onDidCancel.event, this.onDidTrigger = this._onDidTrigger.event, this.onDidSuggest = this._onDidSuggest.event, this._currentSelection = this._editor.getSelection() || new a.Selection(1, 1, 1, 1), this._toDispose.add(this._editor.onDidChangeModel((function () {
  55578. n._updateTriggerCharacters(),
  55579. n.cancel()
  55580. }))), this._toDispose.add(this._editor.onDidChangeModelLanguage((function () {
  55581. n._updateTriggerCharacters(), n.cancel()
  55582. }))), this._toDispose.add(this._editor.onDidChangeConfiguration((function () {
  55583. n._updateTriggerCharacters(), n._updateQuickSuggest()
  55584. }))), this._toDispose.add(l.CompletionProviderRegistry.onDidChange((function () {
  55585. n._updateTriggerCharacters(), n._updateActiveSuggestSession()
  55586. }))), this._toDispose.add(this._editor.onDidChangeCursorSelection((function (e) {
  55587. n._onCursorChange(e)
  55588. })));
  55589. var o = !1;
  55590. this._toDispose.add(this._editor.onDidCompositionStart((function () {
  55591. o = !0
  55592. }))), this._toDispose.add(this._editor.onDidCompositionEnd((function () {
  55593. o = !1, n._refilterCompletionItems()
  55594. }))), this._toDispose.add(this._editor.onDidChangeModelContent((function () {
  55595. o || n._refilterCompletionItems()
  55596. }))), this._updateTriggerCharacters(), this._updateQuickSuggest()
  55597. }
  55598. return e.prototype.dispose = function () {
  55599. s.dispose(this._triggerCharacterListener), s.dispose([this._onDidCancel, this._onDidSuggest, this._onDidTrigger, this._triggerQuickSuggest]),
  55600. this._toDispose.dispose(), this._completionDisposables.dispose(), this.cancel()
  55601. }, e.prototype._updateQuickSuggest = function () {
  55602. this._quickSuggestDelay = this._editor.getOption(67), (isNaN(this._quickSuggestDelay) || !this._quickSuggestDelay && 0 !== this._quickSuggestDelay || this._quickSuggestDelay < 0) && (this._quickSuggestDelay = 10)
  55603. }, e.prototype._updateTriggerCharacters = function () {
  55604. var e = this;
  55605. if (this._triggerCharacterListener.clear(), !this._editor.getOption(68) && this._editor.hasModel() && this._editor.getOption(92)) {
  55606. for (var t = new Map, n = 0, i = l.CompletionProviderRegistry.all(this._editor.getModel()); n < i.length; n++) for (var o = i[n], r = 0, s = o.triggerCharacters || []; r < s.length; r++) {
  55607. var a = s[r], u = t.get(a);
  55608. u || ((u = new Set).add(d.getSnippetSuggestSupport()), t.set(a, u)), u.add(o)
  55609. }
  55610. var c = function (n) {
  55611. if (!n) {
  55612. var i = e._editor.getPosition();
  55613. n = e._editor.getModel().getLineContent(i.lineNumber).substr(0, i.column - 1)
  55614. }
  55615. var o = ""
  55616. ;g.isLowSurrogate(n.charCodeAt(n.length - 1)) ? g.isHighSurrogate(n.charCodeAt(n.length - 2)) && (o = n.substr(n.length - 2)) : o = n.charAt(n.length - 1);
  55617. var r = t.get(o);
  55618. if (r) {
  55619. var s = e._completionModel ? e._completionModel.adopt(r) : void 0;
  55620. e.trigger({auto: !0, shy: !1, triggerCharacter: o}, Boolean(e._completionModel), r, s)
  55621. }
  55622. };
  55623. this._triggerCharacterListener.add(this._editor.onDidType(c)), this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(c))
  55624. }
  55625. }, Object.defineProperty(e.prototype, "state", {
  55626. get: function () {
  55627. return this._state
  55628. }, enumerable: !0, configurable: !0
  55629. }), e.prototype.cancel = function (e) {
  55630. void 0 === e && (e = !1), 0 !== this._state && (this._triggerQuickSuggest.cancel(), this._requestToken && (this._requestToken.cancel(), this._requestToken = void 0), this._state = 0, this._completionModel = void 0, this._context = void 0, this._onDidCancel.fire({retrigger: e}))
  55631. }, e.prototype.clear = function () {
  55632. this._completionDisposables.clear()
  55633. }, e.prototype._updateActiveSuggestSession = function () {
  55634. 0 !== this._state && (this._editor.hasModel() && l.CompletionProviderRegistry.has(this._editor.getModel()) ? this.trigger({
  55635. auto: 2 === this._state,
  55636. shy: !1
  55637. }, !0) : this.cancel())
  55638. }, e.prototype._onCursorChange = function (e) {
  55639. var t = this;
  55640. if (this._editor.hasModel()) {
  55641. var n = this._editor.getModel(), i = this._currentSelection;
  55642. if (this._currentSelection = this._editor.getSelection(), !e.selection.isEmpty() || 0 !== e.reason || "keyboard" !== e.source && "deleteLeft" !== e.source) this.cancel(); else if (l.CompletionProviderRegistry.has(n) && 0 === this._state) {
  55643. if (!1 === this._editor.getOption(66)) return;
  55644. if (!i.containsRange(this._currentSelection) && !i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())) return;
  55645. if (this._editor.getOption(89).snippetsPreventQuickSuggestions && c.SnippetController2.get(this._editor).isInSnippet()) return;
  55646. this.cancel(), this._triggerQuickSuggest.cancelAndSet((function () {
  55647. if (0 === t._state && f.shouldAutoTrigger(t._editor) && t._editor.hasModel()) {
  55648. var e = t._editor.getModel(), n = t._editor.getPosition(), i = t._editor.getOption(66)
  55649. ;
  55650. if (!1 !== i) {
  55651. if (!0 === i) ; else {
  55652. e.tokenizeIfCheap(n.lineNumber);
  55653. var o = e.getLineTokens(n.lineNumber),
  55654. r = o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(n.column - 1 - 1, 0)));
  55655. if (!(i.other && 0 === r || i.comments && 1 === r || i.strings && 2 === r)) return
  55656. }
  55657. t.trigger({auto: !0, shy: !1})
  55658. }
  55659. }
  55660. }), this._quickSuggestDelay)
  55661. }
  55662. }
  55663. }, e.prototype._refilterCompletionItems = function () {
  55664. var e = this;
  55665. Promise.resolve().then((function () {
  55666. if (0 !== e._state && e._editor.hasModel()) {
  55667. var t = e._editor.getModel(), n = e._editor.getPosition(), i = new f(t, n, 2 === e._state, !1);
  55668. e._onNewContext(i)
  55669. }
  55670. }))
  55671. }, e.prototype.trigger = function (t, i, r, a) {
  55672. var l = this;
  55673. if (void 0 === i && (i = !1), this._editor.hasModel()) {
  55674. var c, g = this._editor.getModel(), m = t.auto, v = new f(g, this._editor.getPosition(), m, t.shy);
  55675. this.cancel(i), this._state = m ? 2 : 1, this._onDidTrigger.fire({
  55676. auto: m,
  55677. shy: t.shy,
  55678. position: this._editor.getPosition()
  55679. }), this._context = v, c = t.triggerCharacter ? {
  55680. triggerKind: 1,
  55681. triggerCharacter: t.triggerCharacter
  55682. } : r && r.size > 0 ? {triggerKind: 2} : {triggerKind: 0}, this._requestToken = new h.CancellationTokenSource
  55683. ;var _ = this._editor.getOption(86), y = 1;
  55684. switch (_) {
  55685. case"top":
  55686. y = 0;
  55687. break;
  55688. case"bottom":
  55689. y = 2
  55690. }
  55691. var C = e._createItemKindFilter(this._editor),
  55692. b = p.WordDistance.create(this._editorWorker, this._editor),
  55693. S = d.provideSuggestionItems(g, this._editor.getPosition(), new d.CompletionOptions(y, C, r), c, this._requestToken.token);
  55694. Promise.all([S, b]).then((function (e) {
  55695. var i = e[0], o = e[1];
  55696. if (s.dispose(l._requestToken), 0 !== l._state && l._editor.hasModel()) {
  55697. var r = l._editor.getModel();
  55698. if (n.isNonEmptyArray(a)) {
  55699. var c = d.getSuggestionComparator(y);
  55700. i = i.concat(a).sort(c)
  55701. }
  55702. var h = new f(r, l._editor.getPosition(), m, t.shy);
  55703. l._completionModel = new u.CompletionModel(i, l._context.column, {
  55704. leadingLineContent: h.leadingLineContent,
  55705. characterCountDelta: h.column - l._context.column
  55706. }, o, l._editor.getOption(89), l._editor.getOption(86));
  55707. for (var p = 0, g = i; p < g.length; p++) {
  55708. var v = g[p];
  55709. s.isDisposable(v.container) && l._completionDisposables.add(v.container)
  55710. }
  55711. l._onNewContext(h)
  55712. }
  55713. })).catch(o.onUnexpectedError)
  55714. }
  55715. }, e._createItemKindFilter = function (e) {
  55716. var t = new Set
  55717. ;"none" === e.getOption(86) && t.add(25);
  55718. var n = e.getOption(89);
  55719. return n.showMethods || t.add(0), n.showFunctions || t.add(1), n.showConstructors || t.add(2), n.showFields || t.add(3), n.showVariables || t.add(4), n.showClasses || t.add(5), n.showStructs || t.add(6), n.showInterfaces || t.add(7), n.showModules || t.add(8), n.showProperties || t.add(9), n.showEvents || t.add(10), n.showOperators || t.add(11), n.showUnits || t.add(12), n.showValues || t.add(13), n.showConstants || t.add(14), n.showEnums || t.add(15), n.showEnumMembers || t.add(16), n.showKeywords || t.add(17), n.showWords || t.add(18), n.showColors || t.add(19), n.showFiles || t.add(20), n.showReferences || t.add(21), n.showColors || t.add(22), n.showFolders || t.add(23), n.showTypeParameters || t.add(24), n.showSnippets || t.add(25), t
  55720. }, e.prototype._onNewContext = function (e) {
  55721. if (this._context) if (e.lineNumber === this._context.lineNumber) {
  55722. if (e.leadingWord.startColumn < this._context.leadingWord.startColumn) this.cancel(); else if (e.column < this._context.column) e.leadingWord.word ? this.trigger({
  55723. auto: this._context.auto, shy: !1
  55724. }, !0) : this.cancel(); else if (this._completionModel) if (e.column > this._context.column && this._completionModel.incomplete.size > 0 && 0 !== e.leadingWord.word.length) {
  55725. var t = this._completionModel.incomplete, n = this._completionModel.adopt(t);
  55726. this.trigger({auto: 2 === this._state, shy: !1}, !0, t, n)
  55727. } else {
  55728. var i = this._completionModel.lineContext, o = !1;
  55729. if (this._completionModel.lineContext = {
  55730. leadingLineContent: e.leadingLineContent,
  55731. characterCountDelta: e.column - this._context.column
  55732. }, 0 === this._completionModel.items.length) {
  55733. if (f.shouldAutoTrigger(this._editor) && this._context.leadingWord.endColumn < e.leadingWord.startColumn) return void this.trigger({
  55734. auto: this._context.auto,
  55735. shy: !1
  55736. }, !0);
  55737. if (this._context.auto) return void this.cancel();
  55738. if (this._completionModel.lineContext = i, (o = this._completionModel.items.length > 0) && 0 === e.leadingWord.word.length) return void this.cancel()
  55739. }
  55740. this._onDidSuggest.fire({
  55741. completionModel: this._completionModel,
  55742. auto: this._context.auto,
  55743. shy: this._context.shy,
  55744. isFrozen: o
  55745. })
  55746. }
  55747. } else this.cancel()
  55748. }, e
  55749. }();
  55750. t.SuggestModel = m
  55751. }))
  55752. ;a = this && this.__spreadArrays || function () {
  55753. for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
  55754. var i = Array(e), o = 0;
  55755. for (t = 0; t < n; t++) for (var r = arguments[t], s = 0, a = r.length; s < a; s++, o++) i[o] = r[s];
  55756. return i
  55757. };
  55758. define(n[610], i([0, 1, 50, 19, 10, 36, 2, 12, 58, 3, 23, 173, 151, 521, 467, 29, 18, 11, 86, 120, 497, 609, 585, 498, 4, 62, 15, 21, 390, 16, 391]), (function (e, t, n, i, o, s, u, d, c, p, f, m, v, _, y, C, b, S, w, E, L, D, N, x, I, M, k, T, R, O, P) {
  55759. "use strict";
  55760. Object.defineProperty(t, "__esModule", {value: !0});
  55761. var A = !1, F = function () {
  55762. function e(e, t) {
  55763. if (this._model = e, this._position = t, e.getLineMaxColumn(t.lineNumber) !== t.column) {
  55764. var n = e.getOffsetAt(t), i = e.getPositionAt(n + 1);
  55765. this._marker = e.deltaDecorations([], [{
  55766. range: p.Range.fromPositions(t, i),
  55767. options: {stickiness: 1}
  55768. }])
  55769. }
  55770. }
  55771. return e.prototype.dispose = function () {
  55772. this._marker && !this._model.isDisposed() && this._model.deltaDecorations(this._marker, [])
  55773. }, e.prototype.delta = function (e) {
  55774. if (this._model.isDisposed() || this._position.lineNumber !== e.lineNumber) return 0;
  55775. if (this._marker) {
  55776. var t = this._model.getDecorationRange(this._marker[0]);
  55777. return this._model.getOffsetAt(t.getStartPosition()) - this._model.getOffsetAt(e)
  55778. }
  55779. return this._model.getLineMaxColumn(e.lineNumber) - e.column
  55780. }, e
  55781. }(), W = function () {
  55782. function e(e, t, n, i, o, r) {
  55783. var a = this;
  55784. this._memoryService = n, this._commandService = i, this._contextKeyService = o, this._instantiationService = r, this._lineSuffix = new u.MutableDisposable, this._toDispose = new u.DisposableStore, this.editor = e, this.model = new D.SuggestModel(this.editor, t), this.widget = this._toDispose.add(new k.IdleValue((function () {
  55785. var e = a._instantiationService.createInstance(N.SuggestWidget, a.editor);
  55786. a._toDispose.add(e), a._toDispose.add(e.onDidSelect((function (e) {
  55787. return a._insertSuggestion(e, 0)
  55788. }), a));
  55789. var t = new R.CommitCharacterController(a.editor, e, (function (e) {
  55790. return a._insertSuggestion(e, 2)
  55791. }));
  55792. a._toDispose.add(t), a._toDispose.add(a.model.onDidSuggest((function (e) {
  55793. 0 === e.completionModel.items.length && t.reset()
  55794. })));
  55795. var n = E.Context.MakesTextEdit.bindTo(a._contextKeyService)
  55796. ;
  55797. return a._toDispose.add(e.onDidFocus((function (e) {
  55798. var t = e.item, i = a.editor.getPosition(), o = t.editStart.column, r = i.column, s = !0;
  55799. "smart" !== a.editor.getOption(1) || 2 !== a.model.state || t.completion.command || t.completion.additionalTextEdits || 4 & t.completion.insertTextRules || r - o !== t.completion.insertText.length || (s = a.editor.getModel().getValueInRange({
  55800. startLineNumber: i.lineNumber,
  55801. startColumn: o,
  55802. endLineNumber: i.lineNumber,
  55803. endColumn: r
  55804. }) !== t.completion.insertText);
  55805. n.set(s)
  55806. }))), a._toDispose.add(u.toDisposable((function () {
  55807. return n.reset()
  55808. }))), a._toDispose.add(e.onDetailsKeyDown((function (e) {
  55809. e.toKeybinding().equals(new s.SimpleKeybinding(!0, !1, !1, !1, 33)) || O.isMacintosh && e.toKeybinding().equals(new s.SimpleKeybinding(!1, !1, !1, !0, 33)) ? e.stopPropagation() : e.toKeybinding().isModifierKey() || a.editor.focus()
  55810. }))), e
  55811. }))), this._alternatives = this._toDispose.add(new k.IdleValue((function () {
  55812. return a._toDispose.add(new L.SuggestAlternatives(a.editor, a._contextKeyService))
  55813. }))), this._toDispose.add(r.createInstance(x.WordContextKey, e)),
  55814. this._toDispose.add(this.model.onDidTrigger((function (e) {
  55815. a.widget.getValue().showTriggered(e.auto, e.shy ? 250 : 50), a._lineSuffix.value = new F(a.editor.getModel(), e.position)
  55816. }))), this._toDispose.add(this.model.onDidSuggest((function (e) {
  55817. if (!e.shy) {
  55818. var t = a._memoryService.select(a.editor.getModel(), a.editor.getPosition(), e.completionModel.items);
  55819. a.widget.getValue().showSuggestions(e.completionModel, t, e.isFrozen, e.auto)
  55820. }
  55821. }))), this._toDispose.add(this.model.onDidCancel((function (e) {
  55822. e.retrigger || a.widget.getValue().hideWidget()
  55823. }))), this._toDispose.add(this.editor.onDidBlurEditorWidget((function () {
  55824. A || (a.model.cancel(), a.model.clear())
  55825. })));
  55826. var l = E.Context.AcceptSuggestionsOnEnter.bindTo(o), d = function () {
  55827. var e = a.editor.getOption(1);
  55828. l.set("on" === e || "smart" === e)
  55829. };
  55830. this._toDispose.add(this.editor.onDidChangeConfiguration((function () {
  55831. return d()
  55832. }))), d(), this._toDispose.add(new P.SuggestRangeHighlighter(this))
  55833. }
  55834. return e.get = function (t) {
  55835. return t.getContribution(e.ID)
  55836. }, e.prototype.dispose = function () {
  55837. this._alternatives.dispose(),
  55838. this._toDispose.dispose(), this.widget.dispose(), this.model.dispose(), this._lineSuffix.dispose()
  55839. }, e.prototype._insertSuggestion = function (e, t) {
  55840. var n, i = this;
  55841. if (!e || !e.item) return this._alternatives.getValue().reset(), this.model.cancel(), void this.model.clear();
  55842. if (this.editor.hasModel()) {
  55843. var r = this.editor.getModel(), s = r.getAlternativeVersionId(), l = e.item, u = l.completion;
  55844. 1 & t || this.editor.pushUndoStop();
  55845. var d = this.getOverwriteInfo(l, Boolean(8 & t));
  55846. this._memoryService.memorize(r, this.editor.getPosition(), l), Array.isArray(u.additionalTextEdits) && this.editor.executeEdits("suggestController.additionalTextEdits", u.additionalTextEdits.map((function (e) {
  55847. return c.EditOperation.replace(p.Range.lift(e.range), e.text)
  55848. })));
  55849. var h = u.insertText;
  55850. 4 & u.insertTextRules || (h = v.SnippetParser.escape(h)), m.SnippetController2.get(this.editor).insert(h, {
  55851. overwriteBefore: d.overwriteBefore,
  55852. overwriteAfter: d.overwriteAfter,
  55853. undoStopBefore: !1,
  55854. undoStopAfter: !1,
  55855. adjustWhitespace: !(1 & u.insertTextRules)
  55856. }), 2 & t || this.editor.pushUndoStop(),
  55857. u.command ? u.command.id === B.id ? this.model.trigger({
  55858. auto: !0,
  55859. shy: !1
  55860. }, !0) : ((n = this._commandService).executeCommand.apply(n, a([u.command.id], u.command.arguments ? a(u.command.arguments) : [])).catch(o.onUnexpectedError).finally((function () {
  55861. return i.model.clear()
  55862. })), this.model.cancel()) : (this.model.cancel(), this.model.clear()), 4 & t && this._alternatives.getValue().set(e, (function (e) {
  55863. for (; r.canUndo();) {
  55864. s !== r.getAlternativeVersionId() && r.undo(), i._insertSuggestion(e, 3 | (8 & t ? 8 : 0));
  55865. break
  55866. }
  55867. })), this._alertCompletionItem(e.item)
  55868. }
  55869. }, e.prototype.getOverwriteInfo = function (e, t) {
  55870. T.assertType(this.editor.hasModel());
  55871. var n = "replace" === this.editor.getOption(89).insertMode;
  55872. t && (n = !n);
  55873. var i = e.position.column - e.editStart.column,
  55874. o = (n ? e.editReplaceEnd.column : e.editInsertEnd.column) - e.position.column;
  55875. return {
  55876. overwriteBefore: i + (this.editor.getPosition().column - e.position.column),
  55877. overwriteAfter: o + (this._lineSuffix.value ? this._lineSuffix.value.delta(this.editor.getPosition()) : 0)
  55878. }
  55879. }, e.prototype._alertCompletionItem = function (e) {
  55880. var t = e.completion, o = "string" == typeof t.label ? t.label : t.label.name;
  55881. if (i.isNonEmptyArray(t.additionalTextEdits)) {
  55882. var r = y.localize(0, null, o, t.additionalTextEdits.length);
  55883. n.alert(r)
  55884. }
  55885. }, e.prototype.triggerSuggest = function (e) {
  55886. this.editor.hasModel() && (this.model.trigger({
  55887. auto: !1,
  55888. shy: !1
  55889. }, !1, e), this.editor.revealLine(this.editor.getPosition().lineNumber, 0), this.editor.focus())
  55890. }, e.prototype.triggerSuggestAndAcceptBest = function (e) {
  55891. var t = this;
  55892. if (this.editor.hasModel()) {
  55893. var n = this.editor.getPosition(), i = function () {
  55894. n.equals(t.editor.getPosition()) && t._commandService.executeCommand(e.fallback)
  55895. };
  55896. I.Event.once(this.model.onDidTrigger)((function (e) {
  55897. var n = [];
  55898. I.Event.any(t.model.onDidTrigger, t.model.onDidCancel)((function () {
  55899. u.dispose(n), i()
  55900. }), void 0, n), t.model.onDidSuggest((function (e) {
  55901. var o = e.completionModel;
  55902. if (u.dispose(n), 0 !== o.items.length) {
  55903. var r = t._memoryService.select(t.editor.getModel(), t.editor.getPosition(), o.items),
  55904. s = o.items[r];
  55905. !function (e) {
  55906. if (4 & e.completion.insertTextRules || e.completion.additionalTextEdits) return !0
  55907. ;
  55908. var n = t.editor.getPosition(), i = e.editStart.column, o = n.column;
  55909. return o - i !== e.completion.insertText.length || t.editor.getModel().getValueInRange({
  55910. startLineNumber: n.lineNumber,
  55911. startColumn: i,
  55912. endLineNumber: n.lineNumber,
  55913. endColumn: o
  55914. }) !== e.completion.insertText
  55915. }(s) ? i() : (t.editor.pushUndoStop(), t._insertSuggestion({
  55916. index: r,
  55917. item: s,
  55918. model: o
  55919. }, 7))
  55920. } else i()
  55921. }), void 0, n)
  55922. })), this.model.trigger({
  55923. auto: !1,
  55924. shy: !0
  55925. }), this.editor.revealLine(n.lineNumber, 0), this.editor.focus()
  55926. }
  55927. }, e.prototype.acceptSelectedSuggestion = function (e, t) {
  55928. var n = this.widget.getValue().getFocusedItem(), i = 0;
  55929. e && (i |= 4), t && (i |= 8), this._insertSuggestion(n, i)
  55930. }, e.prototype.acceptNextSuggestion = function () {
  55931. this._alternatives.getValue().next()
  55932. }, e.prototype.acceptPrevSuggestion = function () {
  55933. this._alternatives.getValue().prev()
  55934. }, e.prototype.cancelSuggestWidget = function () {
  55935. this.model.cancel(), this.model.clear(), this.widget.getValue().hideWidget()
  55936. }, e.prototype.selectNextSuggestion = function () {
  55937. this.widget.getValue().selectNext()
  55938. }, e.prototype.selectNextPageSuggestion = function () {
  55939. this.widget.getValue().selectNextPage()
  55940. }, e.prototype.selectLastSuggestion = function () {
  55941. this.widget.getValue().selectLast()
  55942. }, e.prototype.selectPrevSuggestion = function () {
  55943. this.widget.getValue().selectPrevious()
  55944. }, e.prototype.selectPrevPageSuggestion = function () {
  55945. this.widget.getValue().selectPreviousPage()
  55946. }, e.prototype.selectFirstSuggestion = function () {
  55947. this.widget.getValue().selectFirst()
  55948. }, e.prototype.toggleSuggestionDetails = function () {
  55949. this.widget.getValue().toggleDetails()
  55950. }, e.prototype.toggleExplainMode = function () {
  55951. this.widget.getValue().toggleExplainMode()
  55952. }, e.prototype.toggleSuggestionFocus = function () {
  55953. this.widget.getValue().toggleDetailsFocus()
  55954. }, e.ID = "editor.contrib.suggestController", e = h([g(1, M.IEditorWorkerService), g(2, _.ISuggestMemoryService), g(3, C.ICommandService), g(4, b.IContextKeyService), g(5, S.IInstantiationService)], e)
  55955. }();
  55956. t.SuggestController = W;
  55957. var B = function (e) {
  55958. function t() {
  55959. return e.call(this, {
  55960. id: t.id,
  55961. label: y.localize(1, null),
  55962. alias: "Trigger Suggest",
  55963. precondition: b.ContextKeyExpr.and(f.EditorContextKeys.writable, f.EditorContextKeys.hasCompletionItemProvider),
  55964. kbOpts: {
  55965. kbExpr: f.EditorContextKeys.textInputFocus,
  55966. primary: 2058,
  55967. mac: {primary: 266, secondary: [521]},
  55968. weight: 100
  55969. }
  55970. }) || this
  55971. }
  55972. return r(t, e), t.prototype.run = function (e, t) {
  55973. var n = W.get(t);
  55974. n && n.triggerSuggest()
  55975. }, t.id = "editor.action.triggerSuggest", t
  55976. }(d.EditorAction);
  55977. t.TriggerSuggestAction = B, d.registerEditorContribution(W.ID, W), d.registerEditorAction(B);
  55978. var V = d.EditorCommand.bindToContribution(W.get);
  55979. d.registerEditorCommand(new V({
  55980. id: "acceptSelectedSuggestion",
  55981. precondition: E.Context.Visible,
  55982. handler: function (e) {
  55983. e.acceptSelectedSuggestion(!0, !1)
  55984. }
  55985. })), w.KeybindingsRegistry.registerKeybindingRule({
  55986. id: "acceptSelectedSuggestion",
  55987. when: b.ContextKeyExpr.and(E.Context.Visible, f.EditorContextKeys.textInputFocus),
  55988. primary: 2,
  55989. weight: 190
  55990. }), w.KeybindingsRegistry.registerKeybindingRule({
  55991. id: "acceptSelectedSuggestion",
  55992. when: b.ContextKeyExpr.and(E.Context.Visible, f.EditorContextKeys.textInputFocus, E.Context.AcceptSuggestionsOnEnter, E.Context.MakesTextEdit),
  55993. primary: 3,
  55994. weight: 190
  55995. }), d.registerEditorCommand(new V({
  55996. id: "acceptAlternativeSelectedSuggestion",
  55997. precondition: b.ContextKeyExpr.and(E.Context.Visible, f.EditorContextKeys.textInputFocus),
  55998. kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1027, secondary: [1026]},
  55999. handler: function (e) {
  56000. e.acceptSelectedSuggestion(!1, !0)
  56001. }
  56002. })), C.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter", "acceptSelectedSuggestion"), d.registerEditorCommand(new V({
  56003. id: "hideSuggestWidget",
  56004. precondition: E.Context.Visible,
  56005. handler: function (e) {
  56006. return e.cancelSuggestWidget()
  56007. },
  56008. kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 9, secondary: [1033]}
  56009. })), d.registerEditorCommand(new V({
  56010. id: "selectNextSuggestion",
  56011. precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
  56012. handler: function (e) {
  56013. return e.selectNextSuggestion()
  56014. },
  56015. kbOpts: {
  56016. weight: 190,
  56017. kbExpr: f.EditorContextKeys.textInputFocus,
  56018. primary: 18,
  56019. secondary: [2066],
  56020. mac: {primary: 18, secondary: [2066, 300]}
  56021. }
  56022. })), d.registerEditorCommand(new V({
  56023. id: "selectNextPageSuggestion",
  56024. precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
  56025. handler: function (e) {
  56026. return e.selectNextPageSuggestion()
  56027. },
  56028. kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 12, secondary: [2060]}
  56029. })), d.registerEditorCommand(new V({
  56030. id: "selectLastSuggestion",
  56031. precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
  56032. handler: function (e) {
  56033. return e.selectLastSuggestion()
  56034. }
  56035. })), d.registerEditorCommand(new V({
  56036. id: "selectPrevSuggestion",
  56037. precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
  56038. handler: function (e) {
  56039. return e.selectPrevSuggestion()
  56040. },
  56041. kbOpts: {
  56042. weight: 190,
  56043. kbExpr: f.EditorContextKeys.textInputFocus,
  56044. primary: 16,
  56045. secondary: [2064],
  56046. mac: {primary: 16, secondary: [2064, 302]}
  56047. }
  56048. })), d.registerEditorCommand(new V({
  56049. id: "selectPrevPageSuggestion",
  56050. precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
  56051. handler: function (e) {
  56052. return e.selectPrevPageSuggestion()
  56053. },
  56054. kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 11, secondary: [2059]}
  56055. })), d.registerEditorCommand(new V({
  56056. id: "selectFirstSuggestion",
  56057. precondition: b.ContextKeyExpr.and(E.Context.Visible, E.Context.MultipleSuggestions),
  56058. handler: function (e) {
  56059. return e.selectFirstSuggestion()
  56060. }
  56061. })), d.registerEditorCommand(new V({
  56062. id: "toggleSuggestionDetails",
  56063. precondition: E.Context.Visible,
  56064. handler: function (e) {
  56065. return e.toggleSuggestionDetails()
  56066. },
  56067. kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2058, mac: {primary: 266}}
  56068. })), d.registerEditorCommand(new V({
  56069. id: "toggleExplainMode",
  56070. precondition: E.Context.Visible,
  56071. handler: function (e) {
  56072. return e.toggleExplainMode()
  56073. },
  56074. kbOpts: {weight: 100, primary: 2133}
  56075. })), d.registerEditorCommand(new V({
  56076. id: "toggleSuggestionFocus", precondition: E.Context.Visible, handler: function (e) {
  56077. return e.toggleSuggestionFocus()
  56078. }, kbOpts: {
  56079. weight: 190,
  56080. kbExpr: f.EditorContextKeys.textInputFocus, primary: 2570, mac: {primary: 778}
  56081. }
  56082. })), d.registerEditorCommand(new V({
  56083. id: "insertBestCompletion",
  56084. precondition: b.ContextKeyExpr.and(b.ContextKeyExpr.equals("config.editor.tabCompletion", "on"), x.WordContextKey.AtEnd, E.Context.Visible.toNegated(), L.SuggestAlternatives.OtherSuggestions.toNegated(), m.SnippetController2.InSnippetMode.toNegated()),
  56085. handler: function (e, t) {
  56086. e.triggerSuggestAndAcceptBest(T.isObject(t) ? l({fallback: "tab"}, t) : {fallback: "tab"})
  56087. },
  56088. kbOpts: {weight: 190, primary: 2}
  56089. })), d.registerEditorCommand(new V({
  56090. id: "insertNextSuggestion",
  56091. precondition: b.ContextKeyExpr.and(b.ContextKeyExpr.equals("config.editor.tabCompletion", "on"), L.SuggestAlternatives.OtherSuggestions, E.Context.Visible.toNegated(), m.SnippetController2.InSnippetMode.toNegated()),
  56092. handler: function (e) {
  56093. return e.acceptNextSuggestion()
  56094. },
  56095. kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 2}
  56096. })), d.registerEditorCommand(new V({
  56097. id: "insertPrevSuggestion",
  56098. precondition: b.ContextKeyExpr.and(b.ContextKeyExpr.equals("config.editor.tabCompletion", "on"), L.SuggestAlternatives.OtherSuggestions, E.Context.Visible.toNegated(), m.SnippetController2.InSnippetMode.toNegated()),
  56099. handler: function (e) {
  56100. return e.acceptPrevSuggestion()
  56101. },
  56102. kbOpts: {weight: 190, kbExpr: f.EditorContextKeys.textInputFocus, primary: 1026}
  56103. }))
  56104. })), define(n[611], i([0, 1, 164, 121, 230, 188, 566, 524, 525, 526, 579, 569, 223, 530, 531, 532, 533, 232, 574, 534, 536, 235, 236, 237, 601, 576, 539, 577, 580, 582, 584, 541, 173, 610, 542, 225, 586, 226, 543, 59]), (function (e, t) {
  56105. "use strict";
  56106. Object.defineProperty(t, "__esModule", {value: !0})
  56107. })), define(n[615], i([0, 1, 605, 611, 587, 544, 588, 589, 590, 591, 597, 545]), (function (e, t, n) {
  56108. "use strict";
  56109. Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
  56110. for (var n in e) t.hasOwnProperty(n) || (t[n] = e[n])
  56111. }(n)
  56112. }))
  56113. }).call(this);
  56114. /*!-----------------------------------------------------------------------------
  56115. * Copyright (c) Microsoft Corporation. All rights reserved.
  56116. * monaco-typescript version: 3.7.0(887411e17c69d048791cdbb2763496bd6bcd133a)
  56117. * Released under the MIT license
  56118. * https://github.com/Microsoft/monaco-typescript/blob/master/LICENSE.md
  56119. *-----------------------------------------------------------------------------*/
  56120. define("vs/language/typescript/lib/typescriptServicesMetadata", ["require", "exports"], (function (t, e) {
  56121. "use strict";
  56122. Object.defineProperty(e, "__esModule", {value: !0}), e.typescriptVersion = "3.7.5"
  56123. })), define("vs/language/typescript/monaco.contribution", ["require", "exports", "./lib/typescriptServicesMetadata", "vs/editor/editor.api"], (function (t, e, n) {
  56124. "use strict";
  56125. Object.defineProperty(e, "__esModule", {value: !0});
  56126. var i, o, r, s, a, c = monaco.Emitter, u = function () {
  56127. function t(t, e) {
  56128. this._onDidChange = new c, this._onDidExtraLibsChange = new c, this._extraLibs = Object.create(null), this._eagerModelSync = !1, this.setCompilerOptions(t), this.setDiagnosticsOptions(e), this._onDidExtraLibsChangeTimeout = -1
  56129. }
  56130. return Object.defineProperty(t.prototype, "onDidChange", {
  56131. get: function () {
  56132. return this._onDidChange.event
  56133. }, enumerable: !0, configurable: !0
  56134. }), Object.defineProperty(t.prototype, "onDidExtraLibsChange", {
  56135. get: function () {
  56136. return this._onDidExtraLibsChange.event
  56137. }, enumerable: !0, configurable: !0
  56138. }), t.prototype.getExtraLibs = function () {
  56139. return this._extraLibs
  56140. }, t.prototype.addExtraLib = function (t, e) {
  56141. var n, i = this;
  56142. if (n = void 0 === e ? "ts:extralib-" + Math.random().toString(36).substring(2, 15) : e, this._extraLibs[n] && this._extraLibs[n].content === t) return {
  56143. dispose: function () {
  56144. }
  56145. };
  56146. var o = 1;
  56147. return this._extraLibs[n] && (o = this._extraLibs[n].version + 1), this._extraLibs[n] = {
  56148. content: t,
  56149. version: o
  56150. }, this._fireOnDidExtraLibsChangeSoon(), {
  56151. dispose: function () {
  56152. var t = i._extraLibs[n];
  56153. t && t.version === o && (delete i._extraLibs[n], i._fireOnDidExtraLibsChangeSoon())
  56154. }
  56155. }
  56156. }, t.prototype.setExtraLibs = function (t) {
  56157. if (this._extraLibs = Object.create(null), t && t.length > 0) for (var e = 0, n = t; e < n.length; e++) {
  56158. var i = n[e], o = i.filePath || "ts:extralib-" + Math.random().toString(36).substring(2, 15),
  56159. r = i.content;
  56160. this._extraLibs[o] = {content: r, version: 1}
  56161. }
  56162. this._fireOnDidExtraLibsChangeSoon()
  56163. }, t.prototype._fireOnDidExtraLibsChangeSoon = function () {
  56164. var t = this;
  56165. -1 === this._onDidExtraLibsChangeTimeout && (this._onDidExtraLibsChangeTimeout = setTimeout((function () {
  56166. t._onDidExtraLibsChangeTimeout = -1, t._onDidExtraLibsChange.fire(void 0)
  56167. }), 0))
  56168. }, t.prototype.getCompilerOptions = function () {
  56169. return this._compilerOptions
  56170. }, t.prototype.setCompilerOptions = function (t) {
  56171. this._compilerOptions = t || Object.create(null), this._onDidChange.fire(void 0)
  56172. }, t.prototype.getDiagnosticsOptions = function () {
  56173. return this._diagnosticsOptions
  56174. }, t.prototype.setDiagnosticsOptions = function (t) {
  56175. this._diagnosticsOptions = t || Object.create(null), this._onDidChange.fire(void 0)
  56176. }, t.prototype.setMaximumWorkerIdleTime = function (t) {
  56177. }, t.prototype.setEagerModelSync = function (t) {
  56178. this._eagerModelSync = t
  56179. }, t.prototype.getEagerModelSync = function () {
  56180. return this._eagerModelSync
  56181. }, t
  56182. }();
  56183. e.LanguageServiceDefaultsImpl = u, function (t) {
  56184. t[t.None = 0] = "None", t[t.CommonJS = 1] = "CommonJS", t[t.AMD = 2] = "AMD", t[t.UMD = 3] = "UMD", t[t.System = 4] = "System", t[t.ES2015 = 5] = "ES2015", t[t.ESNext = 99] = "ESNext"
  56185. }(i || (i = {})), function (t) {
  56186. t[t.None = 0] = "None", t[t.Preserve = 1] = "Preserve", t[t.React = 2] = "React", t[t.ReactNative = 3] = "ReactNative"
  56187. }(o || (o = {})), function (t) {
  56188. t[t.CarriageReturnLineFeed = 0] = "CarriageReturnLineFeed", t[t.LineFeed = 1] = "LineFeed"
  56189. }(r || (r = {})), function (t) {
  56190. t[t.ES3 = 0] = "ES3", t[t.ES5 = 1] = "ES5", t[t.ES2015 = 2] = "ES2015", t[t.ES2016 = 3] = "ES2016", t[t.ES2017 = 4] = "ES2017", t[t.ES2018 = 5] = "ES2018", t[t.ES2019 = 6] = "ES2019", t[t.ES2020 = 7] = "ES2020", t[t.ESNext = 99] = "ESNext", t[t.JSON = 100] = "JSON", t[t.Latest = 99] = "Latest"
  56191. }(s || (s = {})), function (t) {
  56192. t[t.Classic = 1] = "Classic", t[t.NodeJs = 2] = "NodeJs"
  56193. }(a || (a = {}));
  56194. var p = new u({allowNonTsExtensions: !0, target: s.Latest}, {noSemanticValidation: !1, noSyntaxValidation: !1}),
  56195. g = new u({allowNonTsExtensions: !0, allowJs: !0, target: s.Latest}, {
  56196. noSemanticValidation: !0,
  56197. noSyntaxValidation: !1
  56198. });
  56199. function d() {
  56200. return f().then((function (t) {
  56201. return t.getTypeScriptWorker()
  56202. }))
  56203. }
  56204. function l() {
  56205. return f().then((function (t) {
  56206. return t.getJavaScriptWorker()
  56207. }))
  56208. }
  56209. function f() {
  56210. return new Promise((function (e, n) {
  56211. t(["./tsMode"], e, n)
  56212. }))
  56213. }
  56214. monaco.languages.typescript = {
  56215. ModuleKind: i,
  56216. JsxEmit: o,
  56217. NewLineKind: r,
  56218. ScriptTarget: s,
  56219. ModuleResolutionKind: a,
  56220. typescriptVersion: n.typescriptVersion,
  56221. typescriptDefaults: p,
  56222. javascriptDefaults: g,
  56223. getTypeScriptWorker: d,
  56224. getJavaScriptWorker: l
  56225. }, monaco.languages.onLanguage("typescript", (function () {
  56226. return f().then((function (t) {
  56227. return t.setupTypeScript(p)
  56228. }))
  56229. })), monaco.languages.onLanguage("javascript", (function () {
  56230. return f().then((function (t) {
  56231. return t.setupJavaScript(g)
  56232. }))
  56233. }))
  56234. }));
  56235. /*!-----------------------------------------------------------------------------
  56236. * Copyright (c) Microsoft Corporation. All rights reserved.
  56237. * monaco-css version: 2.7.0(cbf1d6a12b013bb7e773531de7b4f30989e6e4d7)
  56238. * Released under the MIT license
  56239. * https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
  56240. *-----------------------------------------------------------------------------*/
  56241. define("vs/language/css/monaco.contribution", ["require", "exports", "vs/editor/editor.api"], (function (e, n) {
  56242. "use strict";
  56243. Object.defineProperty(n, "__esModule", {value: !0});
  56244. var o = monaco.Emitter, t = function () {
  56245. function e(e, n, t) {
  56246. this._onDidChange = new o, this._languageId = e, this.setDiagnosticsOptions(n), this.setModeConfiguration(t)
  56247. }
  56248. return Object.defineProperty(e.prototype, "onDidChange", {
  56249. get: function () {
  56250. return this._onDidChange.event
  56251. }, enumerable: !0, configurable: !0
  56252. }), Object.defineProperty(e.prototype, "languageId", {
  56253. get: function () {
  56254. return this._languageId
  56255. }, enumerable: !0, configurable: !0
  56256. }), Object.defineProperty(e.prototype, "modeConfiguration", {
  56257. get: function () {
  56258. return this._modeConfiguration
  56259. }, enumerable: !0, configurable: !0
  56260. }), Object.defineProperty(e.prototype, "diagnosticsOptions", {
  56261. get: function () {
  56262. return this._diagnosticsOptions
  56263. }, enumerable: !0, configurable: !0
  56264. }), e.prototype.setDiagnosticsOptions = function (e) {
  56265. this._diagnosticsOptions = e || Object.create(null), this._onDidChange.fire(this)
  56266. }, e.prototype.setModeConfiguration = function (e) {
  56267. this._modeConfiguration = e || Object.create(null), this._onDidChange.fire(this)
  56268. }, e
  56269. }();
  56270. n.LanguageServiceDefaultsImpl = t;
  56271. var i = {
  56272. validate: !0,
  56273. lint: {
  56274. compatibleVendorPrefixes: "ignore",
  56275. vendorPrefix: "warning",
  56276. duplicateProperties: "warning",
  56277. emptyRules: "warning",
  56278. importStatement: "ignore",
  56279. boxModel: "ignore",
  56280. universalSelector: "ignore",
  56281. zeroUnits: "ignore",
  56282. fontFaceProperties: "warning",
  56283. hexColorLength: "error",
  56284. argumentsInColorFunction: "error",
  56285. unknownProperties: "warning",
  56286. ieHack: "ignore",
  56287. unknownVendorSpecificProperties: "ignore",
  56288. propertyIgnoredDueToDisplay: "warning",
  56289. important: "ignore",
  56290. float: "ignore",
  56291. idSelector: "ignore"
  56292. }
  56293. }, r = {
  56294. completionItems: !0,
  56295. hovers: !0,
  56296. documentSymbols: !0,
  56297. definitions: !0,
  56298. references: !0,
  56299. documentHighlights: !0,
  56300. rename: !0,
  56301. colors: !0,
  56302. foldingRanges: !0,
  56303. diagnostics: !0,
  56304. selectionRanges: !0
  56305. }, s = new t("css", i, r), a = new t("scss", i, r), u = new t("less", i, r);
  56306. function g() {
  56307. return new Promise((function (n, o) {
  56308. e(["./cssMode"], n, o)
  56309. }))
  56310. }
  56311. monaco.languages.css = {
  56312. cssDefaults: s,
  56313. lessDefaults: u,
  56314. scssDefaults: a
  56315. }, monaco.languages.onLanguage("less", (function () {
  56316. g().then((function (e) {
  56317. return e.setupMode(u)
  56318. }))
  56319. })), monaco.languages.onLanguage("scss", (function () {
  56320. g().then((function (e) {
  56321. return e.setupMode(a)
  56322. }))
  56323. })), monaco.languages.onLanguage("css", (function () {
  56324. g().then((function (e) {
  56325. return e.setupMode(s)
  56326. }))
  56327. }))
  56328. }));
  56329. /*!-----------------------------------------------------------------------------
  56330. * Copyright (c) Microsoft Corporation. All rights reserved.
  56331. * monaco-json version: 2.9.0(47ee25bf887cd3f9fea208f31f1092d57acad2e0)
  56332. * Released under the MIT license
  56333. * https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md
  56334. *-----------------------------------------------------------------------------*/
  56335. define("vs/language/json/monaco.contribution", ["require", "exports", "vs/editor/editor.api"], (function (e, n) {
  56336. "use strict";
  56337. Object.defineProperty(n, "__esModule", {value: !0});
  56338. var t = monaco.Emitter, o = function () {
  56339. function e(e, n, o) {
  56340. this._onDidChange = new t, this._languageId = e, this.setDiagnosticsOptions(n), this.setModeConfiguration(o)
  56341. }
  56342. return Object.defineProperty(e.prototype, "onDidChange", {
  56343. get: function () {
  56344. return this._onDidChange.event
  56345. }, enumerable: !0, configurable: !0
  56346. }), Object.defineProperty(e.prototype, "languageId", {
  56347. get: function () {
  56348. return this._languageId
  56349. }, enumerable: !0, configurable: !0
  56350. }), Object.defineProperty(e.prototype, "modeConfiguration", {
  56351. get: function () {
  56352. return this._modeConfiguration
  56353. }, enumerable: !0, configurable: !0
  56354. }), Object.defineProperty(e.prototype, "diagnosticsOptions", {
  56355. get: function () {
  56356. return this._diagnosticsOptions
  56357. }, enumerable: !0, configurable: !0
  56358. }), e.prototype.setDiagnosticsOptions = function (e) {
  56359. this._diagnosticsOptions = e || Object.create(null), this._onDidChange.fire(this)
  56360. }, e.prototype.setModeConfiguration = function (e) {
  56361. this._modeConfiguration = e || Object.create(null), this._onDidChange.fire(this)
  56362. }, e
  56363. }();
  56364. n.LanguageServiceDefaultsImpl = o;
  56365. var i = new o("json", {
  56366. validate: !0,
  56367. allowComments: !0,
  56368. schemas: [],
  56369. enableSchemaRequest: !1
  56370. }, {
  56371. documentFormattingEdits: !0,
  56372. documentRangeFormattingEdits: !0,
  56373. completionItems: !0,
  56374. hovers: !0,
  56375. documentSymbols: !0,
  56376. tokens: !0,
  56377. colors: !0,
  56378. foldingRanges: !0,
  56379. diagnostics: !0,
  56380. selectionRanges: !0
  56381. });
  56382. monaco.languages.json = {jsonDefaults: i}, monaco.languages.register({
  56383. id: "json",
  56384. extensions: [".json", ".bowerrc", ".jshintrc", ".jscsrc", ".eslintrc", ".babelrc", ".har"],
  56385. aliases: ["JSON", "json"],
  56386. mimetypes: ["application/json"]
  56387. }), monaco.languages.onLanguage("json", (function () {
  56388. new Promise((function (n, t) {
  56389. e(["./jsonMode"], n, t)
  56390. })).then((function (e) {
  56391. return e.setupMode(i)
  56392. }))
  56393. }))
  56394. }));
  56395. /*!-----------------------------------------------------------------------------
  56396. * Copyright (c) Microsoft Corporation. All rights reserved.
  56397. * monaco-html version: 2.7.0(7d0bb2e5e3dcf1252779486a5fc5be658f1fadc1)
  56398. * Released under the MIT license
  56399. * https://github.com/Microsoft/monaco-html/blob/master/LICENSE.md
  56400. *-----------------------------------------------------------------------------*/
  56401. define("vs/language/html/monaco.contribution", ["require", "exports", "vs/editor/editor.api"], (function (e, n) {
  56402. "use strict";
  56403. Object.defineProperty(n, "__esModule", {value: !0});
  56404. var t = monaco.Emitter, o = function () {
  56405. function e(e, n, o) {
  56406. this._onDidChange = new t, this._languageId = e, this.setOptions(n), this.setModeConfiguration(o)
  56407. }
  56408. return Object.defineProperty(e.prototype, "onDidChange", {
  56409. get: function () {
  56410. return this._onDidChange.event
  56411. }, enumerable: !0, configurable: !0
  56412. }), Object.defineProperty(e.prototype, "languageId", {
  56413. get: function () {
  56414. return this._languageId
  56415. }, enumerable: !0, configurable: !0
  56416. }), Object.defineProperty(e.prototype, "options", {
  56417. get: function () {
  56418. return this._options
  56419. }, enumerable: !0, configurable: !0
  56420. }), Object.defineProperty(e.prototype, "modeConfiguration", {
  56421. get: function () {
  56422. return this._modeConfiguration
  56423. }, enumerable: !0, configurable: !0
  56424. }), e.prototype.setOptions = function (e) {
  56425. this._options = e || Object.create(null), this._onDidChange.fire(this)
  56426. }, e.prototype.setModeConfiguration = function (e) {
  56427. this._modeConfiguration = e || Object.create(null), this._onDidChange.fire(this)
  56428. }, e
  56429. }();
  56430. n.LanguageServiceDefaultsImpl = o;
  56431. var r = {
  56432. tabSize: 4,
  56433. insertSpaces: !1,
  56434. wrapLineLength: 120,
  56435. unformatted: 'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',
  56436. contentUnformatted: "pre",
  56437. indentInnerHtml: !1,
  56438. preserveNewLines: !0,
  56439. maxPreserveNewLines: null,
  56440. indentHandlebars: !1,
  56441. endWithNewline: !1,
  56442. extraLiners: "head, body, /html",
  56443. wrapAttributes: "auto"
  56444. }, a = {format: r, suggest: {html5: !0}}, i = {format: r, suggest: {html5: !0, razor: !0}};
  56445. function u(e) {
  56446. return {
  56447. completionItems: !0,
  56448. hovers: !0,
  56449. documentSymbols: !0,
  56450. links: !0,
  56451. documentHighlights: !0,
  56452. rename: !0,
  56453. colors: !0,
  56454. foldingRanges: !0,
  56455. selectionRanges: !0,
  56456. diagnostics: e === s,
  56457. documentFormattingEdits: e === s,
  56458. documentRangeFormattingEdits: e === s
  56459. }
  56460. }
  56461. var s = "html", g = new o(s, {format: r, suggest: {html5: !0, angular1: !0, ionic: !0}}, u(s)),
  56462. l = new o("handlebars", a, u("handlebars")), c = new o("razor", i, u("razor"));
  56463. function d() {
  56464. return new Promise((function (n, t) {
  56465. e(["./htmlMode"], n, t)
  56466. }))
  56467. }
  56468. monaco.languages.html = {
  56469. htmlDefaults: g,
  56470. razorDefaults: c,
  56471. handlebarDefaults: l
  56472. }, monaco.languages.onLanguage(s, (function () {
  56473. d().then((function (e) {
  56474. return e.setupMode(g)
  56475. }))
  56476. })), monaco.languages.onLanguage("handlebars", (function () {
  56477. d().then((function (e) {
  56478. return e.setupMode(l)
  56479. }))
  56480. })), monaco.languages.onLanguage("razor", (function () {
  56481. d().then((function (e) {
  56482. return e.setupMode(c)
  56483. }))
  56484. }))
  56485. }));
  56486. /*!-----------------------------------------------------------------------------
  56487. * Copyright (c) Microsoft Corporation. All rights reserved.
  56488. * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd)
  56489. * Released under the MIT license
  56490. * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
  56491. *-----------------------------------------------------------------------------*/
  56492. define("vs/basic-languages/_.contribution", ["require", "exports", "vs/editor/editor.api"], (function (e, i) {
  56493. "use strict";
  56494. Object.defineProperty(i, "__esModule", {value: !0});
  56495. var t = "undefined" == typeof monaco ? self.monaco : monaco, n = {}, s = {}, r = function () {
  56496. function e(e) {
  56497. var i = this;
  56498. this._languageId = e, this._loadingTriggered = !1, this._lazyLoadPromise = new Promise((function (e, t) {
  56499. i._lazyLoadPromiseResolve = e, i._lazyLoadPromiseReject = t
  56500. }))
  56501. }
  56502. return e.getOrCreate = function (i) {
  56503. return s[i] || (s[i] = new e(i)), s[i]
  56504. }, e.prototype.whenLoaded = function () {
  56505. return this._lazyLoadPromise
  56506. }, e.prototype.load = function () {
  56507. var e = this;
  56508. return this._loadingTriggered || (this._loadingTriggered = !0, n[this._languageId].loader().then((function (i) {
  56509. return e._lazyLoadPromiseResolve(i)
  56510. }), (function (i) {
  56511. return e._lazyLoadPromiseReject(i)
  56512. }))), this._lazyLoadPromise
  56513. }, e
  56514. }();
  56515. i.loadLanguage = function (e) {
  56516. return r.getOrCreate(e).load()
  56517. }, i.registerLanguage = function (e) {
  56518. var i = e.id;
  56519. n[i] = e, t.languages.register(e);
  56520. var s = r.getOrCreate(i);
  56521. t.languages.setMonarchTokensProvider(i, s.whenLoaded().then((function (e) {
  56522. return e.language
  56523. }))), t.languages.onLanguage(i, (function () {
  56524. s.load().then((function (e) {
  56525. t.languages.setLanguageConfiguration(i, e.conf)
  56526. }))
  56527. }))
  56528. }
  56529. })), define("vs/basic-languages/abap/abap.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56530. "use strict";
  56531. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56532. id: "abap",
  56533. extensions: [".abap"],
  56534. aliases: ["abap", "ABAP"],
  56535. loader: function () {
  56536. return new Promise((function (i, t) {
  56537. e(["./abap"], i, t)
  56538. }))
  56539. }
  56540. })
  56541. })), define("vs/basic-languages/apex/apex.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56542. "use strict";
  56543. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56544. id: "apex",
  56545. extensions: [".cls"],
  56546. aliases: ["Apex", "apex"],
  56547. mimetypes: ["text/x-apex-source", "text/x-apex"],
  56548. loader: function () {
  56549. return new Promise((function (i, t) {
  56550. e(["./apex"], i, t)
  56551. }))
  56552. }
  56553. })
  56554. })), define("vs/basic-languages/azcli/azcli.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56555. "use strict";
  56556. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56557. id: "azcli",
  56558. extensions: [".azcli"],
  56559. aliases: ["Azure CLI", "azcli"],
  56560. loader: function () {
  56561. return new Promise((function (i, t) {
  56562. e(["./azcli"], i, t)
  56563. }))
  56564. }
  56565. })
  56566. })), define("vs/basic-languages/bat/bat.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56567. "use strict";
  56568. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56569. id: "bat",
  56570. extensions: [".bat", ".cmd"],
  56571. aliases: ["Batch", "bat"],
  56572. loader: function () {
  56573. return new Promise((function (i, t) {
  56574. e(["./bat"], i, t)
  56575. }))
  56576. }
  56577. })
  56578. })), define("vs/basic-languages/cameligo/cameligo.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56579. "use strict";
  56580. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56581. id: "cameligo",
  56582. extensions: [".mligo"],
  56583. aliases: ["Cameligo"],
  56584. loader: function () {
  56585. return new Promise((function (i, t) {
  56586. e(["./cameligo"], i, t)
  56587. }))
  56588. }
  56589. })
  56590. })), define("vs/basic-languages/clojure/clojure.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56591. "use strict";
  56592. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56593. id: "clojure",
  56594. extensions: [".clj", ".cljs", ".cljc", ".edn"],
  56595. aliases: ["clojure", "Clojure"],
  56596. loader: function () {
  56597. return new Promise((function (i, t) {
  56598. e(["./clojure"], i, t)
  56599. }))
  56600. }
  56601. })
  56602. })), define("vs/basic-languages/coffee/coffee.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56603. "use strict";
  56604. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56605. id: "coffeescript",
  56606. extensions: [".coffee"],
  56607. aliases: ["CoffeeScript", "coffeescript", "coffee"],
  56608. mimetypes: ["text/x-coffeescript", "text/coffeescript"],
  56609. loader: function () {
  56610. return new Promise((function (i, t) {
  56611. e(["./coffee"], i, t)
  56612. }))
  56613. }
  56614. })
  56615. })), define("vs/basic-languages/cpp/cpp.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56616. "use strict";
  56617. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56618. id: "c",
  56619. extensions: [".c", ".h"],
  56620. aliases: ["C", "c"],
  56621. loader: function () {
  56622. return new Promise((function (i, t) {
  56623. e(["./cpp"], i, t)
  56624. }))
  56625. }
  56626. }), t.registerLanguage({
  56627. id: "cpp",
  56628. extensions: [".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx"],
  56629. aliases: ["C++", "Cpp", "cpp"],
  56630. loader: function () {
  56631. return new Promise((function (i, t) {
  56632. e(["./cpp"], i, t)
  56633. }))
  56634. }
  56635. })
  56636. })), define("vs/basic-languages/csharp/csharp.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56637. "use strict";
  56638. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56639. id: "csharp",
  56640. extensions: [".cs", ".csx", ".cake"],
  56641. aliases: ["C#", "csharp"],
  56642. loader: function () {
  56643. return new Promise((function (i, t) {
  56644. e(["./csharp"], i, t)
  56645. }))
  56646. }
  56647. })
  56648. })), define("vs/basic-languages/csp/csp.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56649. "use strict";
  56650. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56651. id: "csp",
  56652. extensions: [],
  56653. aliases: ["CSP", "csp"],
  56654. loader: function () {
  56655. return new Promise((function (i, t) {
  56656. e(["./csp"], i, t)
  56657. }))
  56658. }
  56659. })
  56660. })), define("vs/basic-languages/css/css.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56661. "use strict";
  56662. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56663. id: "css",
  56664. extensions: [".css"],
  56665. aliases: ["CSS", "css"],
  56666. mimetypes: ["text/css"],
  56667. loader: function () {
  56668. return new Promise((function (i, t) {
  56669. e(["./css"], i, t)
  56670. }))
  56671. }
  56672. })
  56673. })), define("vs/basic-languages/dockerfile/dockerfile.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56674. "use strict";
  56675. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56676. id: "dockerfile",
  56677. extensions: [".dockerfile"],
  56678. filenames: ["Dockerfile"],
  56679. aliases: ["Dockerfile"],
  56680. loader: function () {
  56681. return new Promise((function (i, t) {
  56682. e(["./dockerfile"], i, t)
  56683. }))
  56684. }
  56685. })
  56686. })), define("vs/basic-languages/fsharp/fsharp.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56687. "use strict";
  56688. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56689. id: "fsharp",
  56690. extensions: [".fs", ".fsi", ".ml", ".mli", ".fsx", ".fsscript"],
  56691. aliases: ["F#", "FSharp", "fsharp"],
  56692. loader: function () {
  56693. return new Promise((function (i, t) {
  56694. e(["./fsharp"], i, t)
  56695. }))
  56696. }
  56697. })
  56698. })), define("vs/basic-languages/go/go.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56699. "use strict";
  56700. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56701. id: "go",
  56702. extensions: [".go"],
  56703. aliases: ["Go"],
  56704. loader: function () {
  56705. return new Promise((function (i, t) {
  56706. e(["./go"], i, t)
  56707. }))
  56708. }
  56709. })
  56710. })), define("vs/basic-languages/graphql/graphql.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56711. "use strict";
  56712. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56713. id: "graphql",
  56714. extensions: [".graphql", ".gql"],
  56715. aliases: ["GraphQL", "graphql", "gql"],
  56716. mimetypes: ["application/graphql"],
  56717. loader: function () {
  56718. return new Promise((function (i, t) {
  56719. e(["./graphql"], i, t)
  56720. }))
  56721. }
  56722. })
  56723. })), define("vs/basic-languages/handlebars/handlebars.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56724. "use strict";
  56725. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56726. id: "handlebars",
  56727. extensions: [".handlebars", ".hbs"],
  56728. aliases: ["Handlebars", "handlebars"],
  56729. mimetypes: ["text/x-handlebars-template"],
  56730. loader: function () {
  56731. return new Promise((function (i, t) {
  56732. e(["./handlebars"], i, t)
  56733. }))
  56734. }
  56735. })
  56736. })), define("vs/basic-languages/html/html.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56737. "use strict";
  56738. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56739. id: "html",
  56740. extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
  56741. aliases: ["HTML", "htm", "html", "xhtml"],
  56742. mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
  56743. loader: function () {
  56744. return new Promise((function (i, t) {
  56745. e(["./html"], i, t)
  56746. }))
  56747. }
  56748. })
  56749. })), define("vs/basic-languages/ini/ini.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56750. "use strict";
  56751. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56752. id: "ini",
  56753. extensions: [".ini", ".properties", ".gitconfig"],
  56754. filenames: ["config", ".gitattributes", ".gitconfig", ".editorconfig"],
  56755. aliases: ["Ini", "ini"],
  56756. loader: function () {
  56757. return new Promise((function (i, t) {
  56758. e(["./ini"], i, t)
  56759. }))
  56760. }
  56761. })
  56762. })), define("vs/basic-languages/java/java.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56763. "use strict";
  56764. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56765. id: "java",
  56766. extensions: [".java", ".jav"],
  56767. aliases: ["Java", "java"],
  56768. mimetypes: ["text/x-java-source", "text/x-java"],
  56769. loader: function () {
  56770. return new Promise((function (i, t) {
  56771. e(["./java"], i, t)
  56772. }))
  56773. }
  56774. })
  56775. })), define("vs/basic-languages/javascript/javascript.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56776. "use strict";
  56777. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56778. id: "javascript",
  56779. extensions: [".js", ".es6", ".jsx"],
  56780. firstLine: "^#!.*\\bnode",
  56781. filenames: ["jakefile"],
  56782. aliases: ["JavaScript", "javascript", "js"],
  56783. mimetypes: ["text/javascript"],
  56784. loader: function () {
  56785. return new Promise((function (i, t) {
  56786. e(["./javascript"], i, t)
  56787. }))
  56788. }
  56789. })
  56790. })), define("vs/basic-languages/kotlin/kotlin.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56791. "use strict";
  56792. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56793. id: "kotlin",
  56794. extensions: [".kt"],
  56795. aliases: ["Kotlin", "kotlin"],
  56796. mimetypes: ["text/x-kotlin-source", "text/x-kotlin"],
  56797. loader: function () {
  56798. return new Promise((function (i, t) {
  56799. e(["./kotlin"], i, t)
  56800. }))
  56801. }
  56802. })
  56803. })), define("vs/basic-languages/less/less.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56804. "use strict";
  56805. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56806. id: "less",
  56807. extensions: [".less"],
  56808. aliases: ["Less", "less"],
  56809. mimetypes: ["text/x-less", "text/less"],
  56810. loader: function () {
  56811. return new Promise((function (i, t) {
  56812. e(["./less"], i, t)
  56813. }))
  56814. }
  56815. })
  56816. })), define("vs/basic-languages/lua/lua.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56817. "use strict";
  56818. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56819. id: "lua",
  56820. extensions: [".lua"],
  56821. aliases: ["Lua", "lua"],
  56822. loader: function () {
  56823. return new Promise((function (i, t) {
  56824. e(["./lua"], i, t)
  56825. }))
  56826. }
  56827. })
  56828. })), define("vs/basic-languages/markdown/markdown.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56829. "use strict";
  56830. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56831. id: "markdown",
  56832. extensions: [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".mdwn", ".mdtxt", ".mdtext"],
  56833. aliases: ["Markdown", "markdown"],
  56834. loader: function () {
  56835. return new Promise((function (i, t) {
  56836. e(["./markdown"], i, t)
  56837. }))
  56838. }
  56839. })
  56840. })), define("vs/basic-languages/mips/mips.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56841. "use strict";
  56842. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56843. id: "mips",
  56844. extensions: [".s"],
  56845. aliases: ["MIPS", "MIPS-V"],
  56846. mimetypes: ["text/x-mips", "text/mips", "text/plaintext"],
  56847. loader: function () {
  56848. return new Promise((function (i, t) {
  56849. e(["./mips"], i, t)
  56850. }))
  56851. }
  56852. })
  56853. })), define("vs/basic-languages/msdax/msdax.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56854. "use strict";
  56855. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56856. id: "msdax",
  56857. extensions: [".dax", ".msdax"],
  56858. aliases: ["DAX", "MSDAX"],
  56859. loader: function () {
  56860. return new Promise((function (i, t) {
  56861. e(["./msdax"], i, t)
  56862. }))
  56863. }
  56864. })
  56865. })), define("vs/basic-languages/mysql/mysql.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56866. "use strict";
  56867. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56868. id: "mysql",
  56869. extensions: [],
  56870. aliases: ["MySQL", "mysql"],
  56871. loader: function () {
  56872. return new Promise((function (i, t) {
  56873. e(["./mysql"], i, t)
  56874. }))
  56875. }
  56876. })
  56877. })), define("vs/basic-languages/objective-c/objective-c.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56878. "use strict";
  56879. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56880. id: "objective-c",
  56881. extensions: [".m"],
  56882. aliases: ["Objective-C"],
  56883. loader: function () {
  56884. return new Promise((function (i, t) {
  56885. e(["./objective-c"], i, t)
  56886. }))
  56887. }
  56888. })
  56889. })), define("vs/basic-languages/pascal/pascal.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56890. "use strict";
  56891. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56892. id: "pascal",
  56893. extensions: [".pas", ".p", ".pp"],
  56894. aliases: ["Pascal", "pas"],
  56895. mimetypes: ["text/x-pascal-source", "text/x-pascal"],
  56896. loader: function () {
  56897. return new Promise((function (i, t) {
  56898. e(["./pascal"], i, t)
  56899. }))
  56900. }
  56901. })
  56902. })), define("vs/basic-languages/pascaligo/pascaligo.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56903. "use strict";
  56904. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56905. id: "pascaligo",
  56906. extensions: [".ligo"],
  56907. aliases: ["Pascaligo", "ligo"],
  56908. loader: function () {
  56909. return new Promise((function (i, t) {
  56910. e(["./pascaligo"], i, t)
  56911. }))
  56912. }
  56913. })
  56914. })), define("vs/basic-languages/perl/perl.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56915. "use strict";
  56916. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56917. id: "perl",
  56918. extensions: [".pl"],
  56919. aliases: ["Perl", "pl"],
  56920. loader: function () {
  56921. return new Promise((function (i, t) {
  56922. e(["./perl"], i, t)
  56923. }))
  56924. }
  56925. })
  56926. })), define("vs/basic-languages/pgsql/pgsql.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56927. "use strict";
  56928. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56929. id: "pgsql",
  56930. extensions: [],
  56931. aliases: ["PostgreSQL", "postgres", "pg", "postgre"],
  56932. loader: function () {
  56933. return new Promise((function (i, t) {
  56934. e(["./pgsql"], i, t)
  56935. }))
  56936. }
  56937. })
  56938. })), define("vs/basic-languages/php/php.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56939. "use strict";
  56940. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56941. id: "php",
  56942. extensions: [".php", ".php4", ".php5", ".phtml", ".ctp"],
  56943. aliases: ["PHP", "php"],
  56944. mimetypes: ["application/x-php"],
  56945. loader: function () {
  56946. return new Promise((function (i, t) {
  56947. e(["./php"], i, t)
  56948. }))
  56949. }
  56950. })
  56951. })), define("vs/basic-languages/postiats/postiats.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56952. "use strict";
  56953. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56954. id: "postiats",
  56955. extensions: [".dats", ".sats", ".hats"],
  56956. aliases: ["ATS", "ATS/Postiats"],
  56957. loader: function () {
  56958. return new Promise((function (i, t) {
  56959. e(["./postiats"], i, t)
  56960. }))
  56961. }
  56962. })
  56963. })), define("vs/basic-languages/powerquery/powerquery.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56964. "use strict";
  56965. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56966. id: "powerquery",
  56967. extensions: [".pq", ".pqm"],
  56968. aliases: ["PQ", "M", "Power Query", "Power Query M"],
  56969. loader: function () {
  56970. return new Promise((function (i, t) {
  56971. e(["./powerquery"], i, t)
  56972. }))
  56973. }
  56974. })
  56975. })), define("vs/basic-languages/powershell/powershell.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56976. "use strict";
  56977. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56978. id: "powershell",
  56979. extensions: [".ps1", ".psm1", ".psd1"],
  56980. aliases: ["PowerShell", "powershell", "ps", "ps1"],
  56981. loader: function () {
  56982. return new Promise((function (i, t) {
  56983. e(["./powershell"], i, t)
  56984. }))
  56985. }
  56986. })
  56987. })), define("vs/basic-languages/pug/pug.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  56988. "use strict";
  56989. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  56990. id: "pug",
  56991. extensions: [".jade", ".pug"],
  56992. aliases: ["Pug", "Jade", "jade"],
  56993. loader: function () {
  56994. return new Promise((function (i, t) {
  56995. e(["./pug"], i, t)
  56996. }))
  56997. }
  56998. })
  56999. })), define("vs/basic-languages/python/python.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57000. "use strict";
  57001. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57002. id: "python",
  57003. extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
  57004. aliases: ["Python", "py"],
  57005. firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
  57006. loader: function () {
  57007. return new Promise((function (i, t) {
  57008. e(["./python"], i, t)
  57009. }))
  57010. }
  57011. })
  57012. })), define("vs/basic-languages/r/r.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57013. "use strict";
  57014. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57015. id: "r",
  57016. extensions: [".r", ".rhistory", ".rprofile", ".rt"],
  57017. aliases: ["R", "r"],
  57018. loader: function () {
  57019. return new Promise((function (i, t) {
  57020. e(["./r"], i, t)
  57021. }))
  57022. }
  57023. })
  57024. })), define("vs/basic-languages/razor/razor.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57025. "use strict";
  57026. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57027. id: "razor",
  57028. extensions: [".cshtml"],
  57029. aliases: ["Razor", "razor"],
  57030. mimetypes: ["text/x-cshtml"],
  57031. loader: function () {
  57032. return new Promise((function (i, t) {
  57033. e(["./razor"], i, t)
  57034. }))
  57035. }
  57036. })
  57037. })), define("vs/basic-languages/redis/redis.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57038. "use strict";
  57039. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57040. id: "redis",
  57041. extensions: [".redis"],
  57042. aliases: ["redis"],
  57043. loader: function () {
  57044. return new Promise((function (i, t) {
  57045. e(["./redis"], i, t)
  57046. }))
  57047. }
  57048. })
  57049. })), define("vs/basic-languages/redshift/redshift.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57050. "use strict";
  57051. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57052. id: "redshift",
  57053. extensions: [],
  57054. aliases: ["Redshift", "redshift"],
  57055. loader: function () {
  57056. return new Promise((function (i, t) {
  57057. e(["./redshift"], i, t)
  57058. }))
  57059. }
  57060. })
  57061. })), define("vs/basic-languages/restructuredtext/restructuredtext.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57062. "use strict";
  57063. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57064. id: "restructuredtext",
  57065. extensions: [".rst"],
  57066. aliases: ["reStructuredText", "restructuredtext"],
  57067. loader: function () {
  57068. return new Promise((function (i, t) {
  57069. e(["./restructuredtext"], i, t)
  57070. }))
  57071. }
  57072. })
  57073. })), define("vs/basic-languages/ruby/ruby.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57074. "use strict";
  57075. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57076. id: "ruby",
  57077. extensions: [".rb", ".rbx", ".rjs", ".gemspec", ".pp"],
  57078. filenames: ["rakefile"],
  57079. aliases: ["Ruby", "rb"],
  57080. loader: function () {
  57081. return new Promise((function (i, t) {
  57082. e(["./ruby"], i, t)
  57083. }))
  57084. }
  57085. })
  57086. })), define("vs/basic-languages/rust/rust.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57087. "use strict";
  57088. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57089. id: "rust",
  57090. extensions: [".rs", ".rlib"],
  57091. aliases: ["Rust", "rust"],
  57092. loader: function () {
  57093. return new Promise((function (i, t) {
  57094. e(["./rust"], i, t)
  57095. }))
  57096. }
  57097. })
  57098. })), define("vs/basic-languages/sb/sb.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57099. "use strict";
  57100. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57101. id: "sb",
  57102. extensions: [".sb"],
  57103. aliases: ["Small Basic", "sb"],
  57104. loader: function () {
  57105. return new Promise((function (i, t) {
  57106. e(["./sb"], i, t)
  57107. }))
  57108. }
  57109. })
  57110. })), define("vs/basic-languages/scheme/scheme.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57111. "use strict";
  57112. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57113. id: "scheme",
  57114. extensions: [".scm", ".ss", ".sch", ".rkt"],
  57115. aliases: ["scheme", "Scheme"],
  57116. loader: function () {
  57117. return new Promise((function (i, t) {
  57118. e(["./scheme"], i, t)
  57119. }))
  57120. }
  57121. })
  57122. })), define("vs/basic-languages/scss/scss.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57123. "use strict";
  57124. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57125. id: "scss",
  57126. extensions: [".scss"],
  57127. aliases: ["Sass", "sass", "scss"],
  57128. mimetypes: ["text/x-scss", "text/scss"],
  57129. loader: function () {
  57130. return new Promise((function (i, t) {
  57131. e(["./scss"], i, t)
  57132. }))
  57133. }
  57134. })
  57135. })), define("vs/basic-languages/shell/shell.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57136. "use strict";
  57137. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57138. id: "shell",
  57139. extensions: [".sh", ".bash"],
  57140. aliases: ["Shell", "sh"],
  57141. loader: function () {
  57142. return new Promise((function (i, t) {
  57143. e(["./shell"], i, t)
  57144. }))
  57145. }
  57146. })
  57147. })), define("vs/basic-languages/solidity/solidity.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57148. "use strict";
  57149. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57150. id: "sol",
  57151. extensions: [".sol"],
  57152. aliases: ["sol", "solidity", "Solidity"],
  57153. loader: function () {
  57154. return new Promise((function (i, t) {
  57155. e(["./solidity"], i, t)
  57156. }))
  57157. }
  57158. })
  57159. })), define("vs/basic-languages/sophia/sophia.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57160. "use strict";
  57161. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57162. id: "aes",
  57163. extensions: [".aes"],
  57164. aliases: ["aes", "sophia", "Sophia"],
  57165. loader: function () {
  57166. return new Promise((function (i, t) {
  57167. e(["./sophia"], i, t)
  57168. }))
  57169. }
  57170. })
  57171. })), define("vs/basic-languages/sql/sql.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57172. "use strict";
  57173. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57174. id: "sql",
  57175. extensions: [".sql"],
  57176. aliases: ["SQL"],
  57177. loader: function () {
  57178. return new Promise((function (i, t) {
  57179. e(["./sql"], i, t)
  57180. }))
  57181. }
  57182. })
  57183. })), define("vs/basic-languages/st/st.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57184. "use strict";
  57185. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57186. id: "st",
  57187. extensions: [".st", ".iecst", ".iecplc", ".lc3lib"],
  57188. aliases: ["StructuredText", "scl", "stl"],
  57189. loader: function () {
  57190. return new Promise((function (i, t) {
  57191. e(["./st"], i, t)
  57192. }))
  57193. }
  57194. })
  57195. })), define("vs/basic-languages/swift/swift.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57196. "use strict";
  57197. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57198. id: "swift",
  57199. aliases: ["Swift", "swift"],
  57200. extensions: [".swift"],
  57201. mimetypes: ["text/swift"],
  57202. loader: function () {
  57203. return new Promise((function (i, t) {
  57204. e(["./swift"], i, t)
  57205. }))
  57206. }
  57207. })
  57208. })), define("vs/basic-languages/tcl/tcl.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57209. "use strict";
  57210. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57211. id: "tcl",
  57212. extensions: [".tcl"],
  57213. aliases: ["tcl", "Tcl", "tcltk", "TclTk", "tcl/tk", "Tcl/Tk"],
  57214. loader: function () {
  57215. return new Promise((function (i, t) {
  57216. e(["./tcl"], i, t)
  57217. }))
  57218. }
  57219. })
  57220. })), define("vs/basic-languages/twig/twig.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57221. "use strict";
  57222. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57223. id: "twig",
  57224. extensions: [".twig"],
  57225. aliases: ["Twig", "twig"],
  57226. mimetypes: ["text/x-twig"],
  57227. loader: function () {
  57228. return new Promise((function (i, t) {
  57229. e(["./twig"], i, t)
  57230. }))
  57231. }
  57232. })
  57233. })), define("vs/basic-languages/typescript/typescript.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57234. "use strict";
  57235. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57236. id: "typescript",
  57237. extensions: [".ts", ".tsx"],
  57238. aliases: ["TypeScript", "ts", "typescript"],
  57239. mimetypes: ["text/typescript"],
  57240. loader: function () {
  57241. return new Promise((function (i, t) {
  57242. e(["./typescript"], i, t)
  57243. }))
  57244. }
  57245. })
  57246. })), define("vs/basic-languages/vb/vb.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57247. "use strict";
  57248. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57249. id: "vb",
  57250. extensions: [".vb"],
  57251. aliases: ["Visual Basic", "vb"],
  57252. loader: function () {
  57253. return new Promise((function (i, t) {
  57254. e(["./vb"], i, t)
  57255. }))
  57256. }
  57257. })
  57258. })), define("vs/basic-languages/xml/xml.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57259. "use strict";
  57260. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57261. id: "xml",
  57262. extensions: [".xml", ".dtd", ".ascx", ".csproj", ".config", ".wxi", ".wxl", ".wxs", ".xaml", ".svg", ".svgz", ".opf", ".xsl"],
  57263. firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
  57264. aliases: ["XML", "xml"],
  57265. mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
  57266. loader: function () {
  57267. return new Promise((function (i, t) {
  57268. e(["./xml"], i, t)
  57269. }))
  57270. }
  57271. })
  57272. })), define("vs/basic-languages/yaml/yaml.contribution", ["require", "exports", "../_.contribution"], (function (e, i, t) {
  57273. "use strict";
  57274. Object.defineProperty(i, "__esModule", {value: !0}), t.registerLanguage({
  57275. id: "yaml",
  57276. extensions: [".yaml", ".yml"],
  57277. aliases: ["YAML", "yaml", "YML", "yml"],
  57278. mimetypes: ["application/x-yaml"],
  57279. loader: function () {
  57280. return new Promise((function (i, t) {
  57281. e(["./yaml"], i, t)
  57282. }))
  57283. }
  57284. })
  57285. })), define("vs/basic-languages/monaco.contribution", ["require", "exports", "./abap/abap.contribution", "./apex/apex.contribution", "./azcli/azcli.contribution", "./bat/bat.contribution", "./cameligo/cameligo.contribution", "./clojure/clojure.contribution", "./coffee/coffee.contribution", "./cpp/cpp.contribution", "./csharp/csharp.contribution", "./csp/csp.contribution", "./css/css.contribution", "./dockerfile/dockerfile.contribution", "./fsharp/fsharp.contribution", "./go/go.contribution", "./graphql/graphql.contribution", "./handlebars/handlebars.contribution", "./html/html.contribution", "./ini/ini.contribution", "./java/java.contribution", "./javascript/javascript.contribution", "./kotlin/kotlin.contribution", "./less/less.contribution", "./lua/lua.contribution", "./markdown/markdown.contribution", "./mips/mips.contribution", "./msdax/msdax.contribution", "./mysql/mysql.contribution", "./objective-c/objective-c.contribution", "./pascal/pascal.contribution", "./pascaligo/pascaligo.contribution", "./perl/perl.contribution", "./pgsql/pgsql.contribution", "./php/php.contribution", "./postiats/postiats.contribution", "./powerquery/powerquery.contribution", "./powershell/powershell.contribution", "./pug/pug.contribution", "./python/python.contribution", "./r/r.contribution", "./razor/razor.contribution", "./redis/redis.contribution", "./redshift/redshift.contribution", "./restructuredtext/restructuredtext.contribution", "./ruby/ruby.contribution", "./rust/rust.contribution", "./sb/sb.contribution", "./scheme/scheme.contribution", "./scss/scss.contribution", "./shell/shell.contribution", "./solidity/solidity.contribution", "./sophia/sophia.contribution", "./sql/sql.contribution", "./st/st.contribution", "./swift/swift.contribution", "./tcl/tcl.contribution", "./twig/twig.contribution", "./typescript/typescript.contribution", "./vb/vb.contribution", "./xml/xml.contribution", "./yaml/yaml.contribution", "vs/editor/editor.api"], (function (e, i) {
  57286. "use strict";
  57287. Object.defineProperty(i, "__esModule", {value: !0})
  57288. }));
  57289. define("vs/editor/editor.main", ["vs/editor/edcore.main", "vs/language/typescript/monaco.contribution", "vs/language/css/monaco.contribution", "vs/language/json/monaco.contribution", "vs/language/html/monaco.contribution", "vs/basic-languages/monaco.contribution"], function (api) {
  57290. return api;
  57291. });
  57292. //# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map