index.es.js 185 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574
  1. (function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#ffffff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
  2. import Ue from "vue";
  3. import Gn, { computed as he, ref as Ve, watch as Kn } from "@vue/composition-api/dist/vue-composition-api.mjs";
  4. function Wn(e) {
  5. e = e || Ue, e && !e.__composition_api_installed__ && e.use(Gn);
  6. }
  7. Wn(Ue);
  8. Ue.version;
  9. function ne() {
  10. }
  11. ne.prototype = {
  12. diff: function(n, a) {
  13. var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, d = f.callback;
  14. typeof f == "function" && (d = f, f = {}), this.options = f;
  15. var t = this;
  16. function r(p) {
  17. return d ? (setTimeout(function() {
  18. d(void 0, p);
  19. }, 0), !0) : p;
  20. }
  21. n = this.castInput(n), a = this.castInput(a), n = this.removeEmpty(this.tokenize(n)), a = this.removeEmpty(this.tokenize(a));
  22. var i = a.length, s = n.length, o = 1, l = i + s;
  23. f.maxEditLength && (l = Math.min(l, f.maxEditLength));
  24. var c = [{
  25. newPos: -1,
  26. components: []
  27. }], u = this.extractCommon(c[0], a, n, 0);
  28. if (c[0].newPos + 1 >= i && u + 1 >= s)
  29. return r([{
  30. value: this.join(a),
  31. count: a.length
  32. }]);
  33. function h() {
  34. for (var p = -1 * o; p <= o; p += 2) {
  35. var _ = void 0, v = c[p - 1], m = c[p + 1], E = (m ? m.newPos : 0) - p;
  36. v && (c[p - 1] = void 0);
  37. var A = v && v.newPos + 1 < i, D = m && 0 <= E && E < s;
  38. if (!A && !D) {
  39. c[p] = void 0;
  40. continue;
  41. }
  42. if (!A || D && v.newPos < m.newPos ? (_ = Qn(m), t.pushComponent(_.components, void 0, !0)) : (_ = v, _.newPos++, t.pushComponent(_.components, !0, void 0)), E = t.extractCommon(_, a, n, p), _.newPos + 1 >= i && E + 1 >= s)
  43. return r(qn(t, _.components, a, n, t.useLongestToken));
  44. c[p] = _;
  45. }
  46. o++;
  47. }
  48. if (d)
  49. (function p() {
  50. setTimeout(function() {
  51. if (o > l)
  52. return d();
  53. h() || p();
  54. }, 0);
  55. })();
  56. else
  57. for (; o <= l; ) {
  58. var g = h();
  59. if (g)
  60. return g;
  61. }
  62. },
  63. pushComponent: function(n, a, f) {
  64. var d = n[n.length - 1];
  65. d && d.added === a && d.removed === f ? n[n.length - 1] = {
  66. count: d.count + 1,
  67. added: a,
  68. removed: f
  69. } : n.push({
  70. count: 1,
  71. added: a,
  72. removed: f
  73. });
  74. },
  75. extractCommon: function(n, a, f, d) {
  76. for (var t = a.length, r = f.length, i = n.newPos, s = i - d, o = 0; i + 1 < t && s + 1 < r && this.equals(a[i + 1], f[s + 1]); )
  77. i++, s++, o++;
  78. return o && n.components.push({
  79. count: o
  80. }), n.newPos = i, s;
  81. },
  82. equals: function(n, a) {
  83. return this.options.comparator ? this.options.comparator(n, a) : n === a || this.options.ignoreCase && n.toLowerCase() === a.toLowerCase();
  84. },
  85. removeEmpty: function(n) {
  86. for (var a = [], f = 0; f < n.length; f++)
  87. n[f] && a.push(n[f]);
  88. return a;
  89. },
  90. castInput: function(n) {
  91. return n;
  92. },
  93. tokenize: function(n) {
  94. return n.split("");
  95. },
  96. join: function(n) {
  97. return n.join("");
  98. }
  99. };
  100. function qn(e, n, a, f, d) {
  101. for (var t = 0, r = n.length, i = 0, s = 0; t < r; t++) {
  102. var o = n[t];
  103. if (o.removed) {
  104. if (o.value = e.join(f.slice(s, s + o.count)), s += o.count, t && n[t - 1].added) {
  105. var c = n[t - 1];
  106. n[t - 1] = n[t], n[t] = c;
  107. }
  108. } else {
  109. if (!o.added && d) {
  110. var l = a.slice(i, i + o.count);
  111. l = l.map(function(h, g) {
  112. var p = f[s + g];
  113. return p.length > h.length ? p : h;
  114. }), o.value = e.join(l);
  115. } else
  116. o.value = e.join(a.slice(i, i + o.count));
  117. i += o.count, o.added || (s += o.count);
  118. }
  119. }
  120. var u = n[r - 1];
  121. return r > 1 && typeof u.value == "string" && (u.added || u.removed) && e.equals("", u.value) && (n[r - 2].value += u.value, n.pop()), n;
  122. }
  123. function Qn(e) {
  124. return {
  125. newPos: e.newPos,
  126. components: e.components.slice(0)
  127. };
  128. }
  129. var jn = new ne();
  130. function Zn(e, n, a) {
  131. return jn.diff(e, n, a);
  132. }
  133. function Vn(e, n) {
  134. if (typeof e == "function")
  135. n.callback = e;
  136. else if (e)
  137. for (var a in e)
  138. e.hasOwnProperty(a) && (n[a] = e[a]);
  139. return n;
  140. }
  141. var Ye = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Xe = /\S/, Pe = new ne();
  142. Pe.equals = function(e, n) {
  143. return this.options.ignoreCase && (e = e.toLowerCase(), n = n.toLowerCase()), e === n || this.options.ignoreWhitespace && !Xe.test(e) && !Xe.test(n);
  144. };
  145. Pe.tokenize = function(e) {
  146. for (var n = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), a = 0; a < n.length - 1; a++)
  147. !n[a + 1] && n[a + 2] && Ye.test(n[a]) && Ye.test(n[a + 2]) && (n[a] += n[a + 2], n.splice(a + 1, 2), a--);
  148. return n;
  149. };
  150. function Yn(e, n, a) {
  151. return a = Vn(a, {
  152. ignoreWhitespace: !0
  153. }), Pe.diff(e, n, a);
  154. }
  155. var _n = new ne();
  156. _n.tokenize = function(e) {
  157. var n = [], a = e.split(/(\n|\r\n)/);
  158. a[a.length - 1] || a.pop();
  159. for (var f = 0; f < a.length; f++) {
  160. var d = a[f];
  161. f % 2 && !this.options.newlineIsToken ? n[n.length - 1] += d : (this.options.ignoreWhitespace && (d = d.trim()), n.push(d));
  162. }
  163. return n;
  164. };
  165. var Xn = new ne();
  166. Xn.tokenize = function(e) {
  167. return e.split(/(\S.+?[.!?])(?=\s+|$)/);
  168. };
  169. var Jn = new ne();
  170. Jn.tokenize = function(e) {
  171. return e.split(/([{}:;,]|\s+)/);
  172. };
  173. function Te(e) {
  174. "@babel/helpers - typeof";
  175. return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Te = function(n) {
  176. return typeof n;
  177. } : Te = function(n) {
  178. return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
  179. }, Te(e);
  180. }
  181. var et = Object.prototype.toString, de = new ne();
  182. de.useLongestToken = !0;
  183. de.tokenize = _n.tokenize;
  184. de.castInput = function(e) {
  185. var n = this.options, a = n.undefinedReplacement, f = n.stringifyReplacer, d = f === void 0 ? function(t, r) {
  186. return typeof r == "undefined" ? a : r;
  187. } : f;
  188. return typeof e == "string" ? e : JSON.stringify($e(e, null, null, d), d, " ");
  189. };
  190. de.equals = function(e, n) {
  191. return ne.prototype.equals.call(de, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"));
  192. };
  193. function $e(e, n, a, f, d) {
  194. n = n || [], a = a || [], f && (e = f(d, e));
  195. var t;
  196. for (t = 0; t < n.length; t += 1)
  197. if (n[t] === e)
  198. return a[t];
  199. var r;
  200. if (et.call(e) === "[object Array]") {
  201. for (n.push(e), r = new Array(e.length), a.push(r), t = 0; t < e.length; t += 1)
  202. r[t] = $e(e[t], n, a, f, d);
  203. return n.pop(), a.pop(), r;
  204. }
  205. if (e && e.toJSON && (e = e.toJSON()), Te(e) === "object" && e !== null) {
  206. n.push(e), r = {}, a.push(r);
  207. var i = [], s;
  208. for (s in e)
  209. e.hasOwnProperty(s) && i.push(s);
  210. for (i.sort(), t = 0; t < i.length; t += 1)
  211. s = i[t], r[s] = $e(e[s], n, a, f, s);
  212. n.pop(), a.pop();
  213. } else
  214. r = e;
  215. return r;
  216. }
  217. var Be = new ne();
  218. Be.tokenize = function(e) {
  219. return e.slice();
  220. };
  221. Be.join = Be.removeEmpty = function(e) {
  222. return e;
  223. };
  224. function nt(e) {
  225. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  226. }
  227. var bn = { exports: {} };
  228. (function(e) {
  229. var n = function() {
  230. this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = 0.5, this.Match_Distance = 1e3, this.Patch_DeleteThreshold = 0.5, this.Patch_Margin = 4, this.Match_MaxBits = 32;
  231. }, a = -1, f = 1, d = 0;
  232. n.Diff = function(t, r) {
  233. return [t, r];
  234. }, n.prototype.diff_main = function(t, r, i, s) {
  235. typeof s == "undefined" && (this.Diff_Timeout <= 0 ? s = Number.MAX_VALUE : s = (/* @__PURE__ */ new Date()).getTime() + this.Diff_Timeout * 1e3);
  236. var o = s;
  237. if (t == null || r == null)
  238. throw new Error("Null input. (diff_main)");
  239. if (t == r)
  240. return t ? [new n.Diff(d, t)] : [];
  241. typeof i == "undefined" && (i = !0);
  242. var l = i, c = this.diff_commonPrefix(t, r), u = t.substring(0, c);
  243. t = t.substring(c), r = r.substring(c), c = this.diff_commonSuffix(t, r);
  244. var h = t.substring(t.length - c);
  245. t = t.substring(0, t.length - c), r = r.substring(0, r.length - c);
  246. var g = this.diff_compute_(t, r, l, o);
  247. return u && g.unshift(new n.Diff(d, u)), h && g.push(new n.Diff(d, h)), this.diff_cleanupMerge(g), g;
  248. }, n.prototype.diff_compute_ = function(t, r, i, s) {
  249. var o;
  250. if (!t)
  251. return [new n.Diff(f, r)];
  252. if (!r)
  253. return [new n.Diff(a, t)];
  254. var l = t.length > r.length ? t : r, c = t.length > r.length ? r : t, u = l.indexOf(c);
  255. if (u != -1)
  256. return o = [
  257. new n.Diff(f, l.substring(0, u)),
  258. new n.Diff(d, c),
  259. new n.Diff(
  260. f,
  261. l.substring(u + c.length)
  262. )
  263. ], t.length > r.length && (o[0][0] = o[2][0] = a), o;
  264. if (c.length == 1)
  265. return [
  266. new n.Diff(a, t),
  267. new n.Diff(f, r)
  268. ];
  269. var h = this.diff_halfMatch_(t, r);
  270. if (h) {
  271. var g = h[0], p = h[1], _ = h[2], v = h[3], m = h[4], E = this.diff_main(g, _, i, s), A = this.diff_main(p, v, i, s);
  272. return E.concat(
  273. [new n.Diff(d, m)],
  274. A
  275. );
  276. }
  277. return i && t.length > 100 && r.length > 100 ? this.diff_lineMode_(t, r, s) : this.diff_bisect_(t, r, s);
  278. }, n.prototype.diff_lineMode_ = function(t, r, i) {
  279. var s = this.diff_linesToChars_(t, r);
  280. t = s.chars1, r = s.chars2;
  281. var o = s.lineArray, l = this.diff_main(t, r, !1, i);
  282. this.diff_charsToLines_(l, o), this.diff_cleanupSemantic(l), l.push(new n.Diff(d, ""));
  283. for (var c = 0, u = 0, h = 0, g = "", p = ""; c < l.length; ) {
  284. switch (l[c][0]) {
  285. case f:
  286. h++, p += l[c][1];
  287. break;
  288. case a:
  289. u++, g += l[c][1];
  290. break;
  291. case d:
  292. if (u >= 1 && h >= 1) {
  293. l.splice(
  294. c - u - h,
  295. u + h
  296. ), c = c - u - h;
  297. for (var _ = this.diff_main(g, p, !1, i), v = _.length - 1; v >= 0; v--)
  298. l.splice(c, 0, _[v]);
  299. c = c + _.length;
  300. }
  301. h = 0, u = 0, g = "", p = "";
  302. break;
  303. }
  304. c++;
  305. }
  306. return l.pop(), l;
  307. }, n.prototype.diff_bisect_ = function(t, r, i) {
  308. for (var s = t.length, o = r.length, l = Math.ceil((s + o) / 2), c = l, u = 2 * l, h = new Array(u), g = new Array(u), p = 0; p < u; p++)
  309. h[p] = -1, g[p] = -1;
  310. h[c + 1] = 0, g[c + 1] = 0;
  311. for (var _ = s - o, v = _ % 2 != 0, m = 0, E = 0, A = 0, D = 0, S = 0; S < l && !((/* @__PURE__ */ new Date()).getTime() > i); S++) {
  312. for (var N = -S + m; N <= S - E; N += 2) {
  313. var R = c + N, C;
  314. N == -S || N != S && h[R - 1] < h[R + 1] ? C = h[R + 1] : C = h[R - 1] + 1;
  315. for (var I = C - N; C < s && I < o && t.charAt(C) == r.charAt(I); )
  316. C++, I++;
  317. if (h[R] = C, C > s)
  318. E += 2;
  319. else if (I > o)
  320. m += 2;
  321. else if (v) {
  322. var B = c + _ - N;
  323. if (B >= 0 && B < u && g[B] != -1) {
  324. var $ = s - g[B];
  325. if (C >= $)
  326. return this.diff_bisectSplit_(t, r, C, I, i);
  327. }
  328. }
  329. }
  330. for (var F = -S + A; F <= S - D; F += 2) {
  331. var B = c + F, $;
  332. F == -S || F != S && g[B - 1] < g[B + 1] ? $ = g[B + 1] : $ = g[B - 1] + 1;
  333. for (var K = $ - F; $ < s && K < o && t.charAt(s - $ - 1) == r.charAt(o - K - 1); )
  334. $++, K++;
  335. if (g[B] = $, $ > s)
  336. D += 2;
  337. else if (K > o)
  338. A += 2;
  339. else if (!v) {
  340. var R = c + _ - F;
  341. if (R >= 0 && R < u && h[R] != -1) {
  342. var C = h[R], I = c + C - R;
  343. if ($ = s - $, C >= $)
  344. return this.diff_bisectSplit_(t, r, C, I, i);
  345. }
  346. }
  347. }
  348. }
  349. return [
  350. new n.Diff(a, t),
  351. new n.Diff(f, r)
  352. ];
  353. }, n.prototype.diff_bisectSplit_ = function(t, r, i, s, o) {
  354. var l = t.substring(0, i), c = r.substring(0, s), u = t.substring(i), h = r.substring(s), g = this.diff_main(l, c, !1, o), p = this.diff_main(u, h, !1, o);
  355. return g.concat(p);
  356. }, n.prototype.diff_linesToChars_ = function(t, r) {
  357. var i = [], s = {};
  358. i[0] = "";
  359. function o(h) {
  360. for (var g = "", p = 0, _ = -1, v = i.length; _ < h.length - 1; ) {
  361. _ = h.indexOf(`
  362. `, p), _ == -1 && (_ = h.length - 1);
  363. var m = h.substring(p, _ + 1);
  364. (s.hasOwnProperty ? s.hasOwnProperty(m) : s[m] !== void 0) ? g += String.fromCharCode(s[m]) : (v == l && (m = h.substring(p), _ = h.length), g += String.fromCharCode(v), s[m] = v, i[v++] = m), p = _ + 1;
  365. }
  366. return g;
  367. }
  368. var l = 4e4, c = o(t);
  369. l = 65535;
  370. var u = o(r);
  371. return { chars1: c, chars2: u, lineArray: i };
  372. }, n.prototype.diff_charsToLines_ = function(t, r) {
  373. for (var i = 0; i < t.length; i++) {
  374. for (var s = t[i][1], o = [], l = 0; l < s.length; l++)
  375. o[l] = r[s.charCodeAt(l)];
  376. t[i][1] = o.join("");
  377. }
  378. }, n.prototype.diff_commonPrefix = function(t, r) {
  379. if (!t || !r || t.charAt(0) != r.charAt(0))
  380. return 0;
  381. for (var i = 0, s = Math.min(t.length, r.length), o = s, l = 0; i < o; )
  382. t.substring(l, o) == r.substring(l, o) ? (i = o, l = i) : s = o, o = Math.floor((s - i) / 2 + i);
  383. return o;
  384. }, n.prototype.diff_commonSuffix = function(t, r) {
  385. if (!t || !r || t.charAt(t.length - 1) != r.charAt(r.length - 1))
  386. return 0;
  387. for (var i = 0, s = Math.min(t.length, r.length), o = s, l = 0; i < o; )
  388. t.substring(t.length - o, t.length - l) == r.substring(r.length - o, r.length - l) ? (i = o, l = i) : s = o, o = Math.floor((s - i) / 2 + i);
  389. return o;
  390. }, n.prototype.diff_commonOverlap_ = function(t, r) {
  391. var i = t.length, s = r.length;
  392. if (i == 0 || s == 0)
  393. return 0;
  394. i > s ? t = t.substring(i - s) : i < s && (r = r.substring(0, i));
  395. var o = Math.min(i, s);
  396. if (t == r)
  397. return o;
  398. for (var l = 0, c = 1; ; ) {
  399. var u = t.substring(o - c), h = r.indexOf(u);
  400. if (h == -1)
  401. return l;
  402. c += h, (h == 0 || t.substring(o - c) == r.substring(0, c)) && (l = c, c++);
  403. }
  404. }, n.prototype.diff_halfMatch_ = function(t, r) {
  405. if (this.Diff_Timeout <= 0)
  406. return null;
  407. var i = t.length > r.length ? t : r, s = t.length > r.length ? r : t;
  408. if (i.length < 4 || s.length * 2 < i.length)
  409. return null;
  410. var o = this;
  411. function l(E, A, D) {
  412. for (var S = E.substring(D, D + Math.floor(E.length / 4)), N = -1, R = "", C, I, B, $; (N = A.indexOf(S, N + 1)) != -1; ) {
  413. var F = o.diff_commonPrefix(
  414. E.substring(D),
  415. A.substring(N)
  416. ), K = o.diff_commonSuffix(
  417. E.substring(0, D),
  418. A.substring(0, N)
  419. );
  420. R.length < K + F && (R = A.substring(N - K, N) + A.substring(N, N + F), C = E.substring(0, D - K), I = E.substring(D + F), B = A.substring(0, N - K), $ = A.substring(N + F));
  421. }
  422. return R.length * 2 >= E.length ? [
  423. C,
  424. I,
  425. B,
  426. $,
  427. R
  428. ] : null;
  429. }
  430. var c = l(
  431. i,
  432. s,
  433. Math.ceil(i.length / 4)
  434. ), u = l(
  435. i,
  436. s,
  437. Math.ceil(i.length / 2)
  438. ), h;
  439. if (!c && !u)
  440. return null;
  441. u ? c ? h = c[4].length > u[4].length ? c : u : h = u : h = c;
  442. var g, p, _, v;
  443. t.length > r.length ? (g = h[0], p = h[1], _ = h[2], v = h[3]) : (_ = h[0], v = h[1], g = h[2], p = h[3]);
  444. var m = h[4];
  445. return [g, p, _, v, m];
  446. }, n.prototype.diff_cleanupSemantic = function(t) {
  447. for (var r = !1, i = [], s = 0, o = null, l = 0, c = 0, u = 0, h = 0, g = 0; l < t.length; )
  448. t[l][0] == d ? (i[s++] = l, c = h, u = g, h = 0, g = 0, o = t[l][1]) : (t[l][0] == f ? h += t[l][1].length : g += t[l][1].length, o && o.length <= Math.max(c, u) && o.length <= Math.max(
  449. h,
  450. g
  451. ) && (t.splice(
  452. i[s - 1],
  453. 0,
  454. new n.Diff(a, o)
  455. ), t[i[s - 1] + 1][0] = f, s--, s--, l = s > 0 ? i[s - 1] : -1, c = 0, u = 0, h = 0, g = 0, o = null, r = !0)), l++;
  456. for (r && this.diff_cleanupMerge(t), this.diff_cleanupSemanticLossless(t), l = 1; l < t.length; ) {
  457. if (t[l - 1][0] == a && t[l][0] == f) {
  458. var p = t[l - 1][1], _ = t[l][1], v = this.diff_commonOverlap_(p, _), m = this.diff_commonOverlap_(_, p);
  459. v >= m ? (v >= p.length / 2 || v >= _.length / 2) && (t.splice(l, 0, new n.Diff(
  460. d,
  461. _.substring(0, v)
  462. )), t[l - 1][1] = p.substring(0, p.length - v), t[l + 1][1] = _.substring(v), l++) : (m >= p.length / 2 || m >= _.length / 2) && (t.splice(l, 0, new n.Diff(
  463. d,
  464. p.substring(0, m)
  465. )), t[l - 1][0] = f, t[l - 1][1] = _.substring(0, _.length - m), t[l + 1][0] = a, t[l + 1][1] = p.substring(m), l++), l++;
  466. }
  467. l++;
  468. }
  469. }, n.prototype.diff_cleanupSemanticLossless = function(t) {
  470. function r(m, E) {
  471. if (!m || !E)
  472. return 6;
  473. var A = m.charAt(m.length - 1), D = E.charAt(0), S = A.match(n.nonAlphaNumericRegex_), N = D.match(n.nonAlphaNumericRegex_), R = S && A.match(n.whitespaceRegex_), C = N && D.match(n.whitespaceRegex_), I = R && A.match(n.linebreakRegex_), B = C && D.match(n.linebreakRegex_), $ = I && m.match(n.blanklineEndRegex_), F = B && E.match(n.blanklineStartRegex_);
  474. return $ || F ? 5 : I || B ? 4 : S && !R && C ? 3 : R || C ? 2 : S || N ? 1 : 0;
  475. }
  476. for (var i = 1; i < t.length - 1; ) {
  477. if (t[i - 1][0] == d && t[i + 1][0] == d) {
  478. var s = t[i - 1][1], o = t[i][1], l = t[i + 1][1], c = this.diff_commonSuffix(s, o);
  479. if (c) {
  480. var u = o.substring(o.length - c);
  481. s = s.substring(0, s.length - c), o = u + o.substring(0, o.length - c), l = u + l;
  482. }
  483. for (var h = s, g = o, p = l, _ = r(s, o) + r(o, l); o.charAt(0) === l.charAt(0); ) {
  484. s += o.charAt(0), o = o.substring(1) + l.charAt(0), l = l.substring(1);
  485. var v = r(s, o) + r(o, l);
  486. v >= _ && (_ = v, h = s, g = o, p = l);
  487. }
  488. t[i - 1][1] != h && (h ? t[i - 1][1] = h : (t.splice(i - 1, 1), i--), t[i][1] = g, p ? t[i + 1][1] = p : (t.splice(i + 1, 1), i--));
  489. }
  490. i++;
  491. }
  492. }, n.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, n.whitespaceRegex_ = /\s/, n.linebreakRegex_ = /[\r\n]/, n.blanklineEndRegex_ = /\n\r?\n$/, n.blanklineStartRegex_ = /^\r?\n\r?\n/, n.prototype.diff_cleanupEfficiency = function(t) {
  493. for (var r = !1, i = [], s = 0, o = null, l = 0, c = !1, u = !1, h = !1, g = !1; l < t.length; )
  494. t[l][0] == d ? (t[l][1].length < this.Diff_EditCost && (h || g) ? (i[s++] = l, c = h, u = g, o = t[l][1]) : (s = 0, o = null), h = g = !1) : (t[l][0] == a ? g = !0 : h = !0, o && (c && u && h && g || o.length < this.Diff_EditCost / 2 && c + u + h + g == 3) && (t.splice(
  495. i[s - 1],
  496. 0,
  497. new n.Diff(a, o)
  498. ), t[i[s - 1] + 1][0] = f, s--, o = null, c && u ? (h = g = !0, s = 0) : (s--, l = s > 0 ? i[s - 1] : -1, h = g = !1), r = !0)), l++;
  499. r && this.diff_cleanupMerge(t);
  500. }, n.prototype.diff_cleanupMerge = function(t) {
  501. t.push(new n.Diff(d, ""));
  502. for (var r = 0, i = 0, s = 0, o = "", l = "", c; r < t.length; )
  503. switch (t[r][0]) {
  504. case f:
  505. s++, l += t[r][1], r++;
  506. break;
  507. case a:
  508. i++, o += t[r][1], r++;
  509. break;
  510. case d:
  511. i + s > 1 ? (i !== 0 && s !== 0 && (c = this.diff_commonPrefix(l, o), c !== 0 && (r - i - s > 0 && t[r - i - s - 1][0] == d ? t[r - i - s - 1][1] += l.substring(0, c) : (t.splice(0, 0, new n.Diff(
  512. d,
  513. l.substring(0, c)
  514. )), r++), l = l.substring(c), o = o.substring(c)), c = this.diff_commonSuffix(l, o), c !== 0 && (t[r][1] = l.substring(l.length - c) + t[r][1], l = l.substring(0, l.length - c), o = o.substring(0, o.length - c))), r -= i + s, t.splice(r, i + s), o.length && (t.splice(
  515. r,
  516. 0,
  517. new n.Diff(a, o)
  518. ), r++), l.length && (t.splice(
  519. r,
  520. 0,
  521. new n.Diff(f, l)
  522. ), r++), r++) : r !== 0 && t[r - 1][0] == d ? (t[r - 1][1] += t[r][1], t.splice(r, 1)) : r++, s = 0, i = 0, o = "", l = "";
  523. break;
  524. }
  525. t[t.length - 1][1] === "" && t.pop();
  526. var u = !1;
  527. for (r = 1; r < t.length - 1; )
  528. t[r - 1][0] == d && t[r + 1][0] == d && (t[r][1].substring(t[r][1].length - t[r - 1][1].length) == t[r - 1][1] ? (t[r][1] = t[r - 1][1] + t[r][1].substring(0, t[r][1].length - t[r - 1][1].length), t[r + 1][1] = t[r - 1][1] + t[r + 1][1], t.splice(r - 1, 1), u = !0) : t[r][1].substring(0, t[r + 1][1].length) == t[r + 1][1] && (t[r - 1][1] += t[r + 1][1], t[r][1] = t[r][1].substring(t[r + 1][1].length) + t[r + 1][1], t.splice(r + 1, 1), u = !0)), r++;
  529. u && this.diff_cleanupMerge(t);
  530. }, n.prototype.diff_xIndex = function(t, r) {
  531. var i = 0, s = 0, o = 0, l = 0, c;
  532. for (c = 0; c < t.length && (t[c][0] !== f && (i += t[c][1].length), t[c][0] !== a && (s += t[c][1].length), !(i > r)); c++)
  533. o = i, l = s;
  534. return t.length != c && t[c][0] === a ? l : l + (r - o);
  535. }, n.prototype.diff_prettyHtml = function(t) {
  536. for (var r = [], i = /&/g, s = /</g, o = />/g, l = /\n/g, c = 0; c < t.length; c++) {
  537. var u = t[c][0], h = t[c][1], g = h.replace(i, "&amp;").replace(s, "&lt;").replace(o, "&gt;").replace(l, "&para;<br>");
  538. switch (u) {
  539. case f:
  540. r[c] = '<ins style="background:#e6ffe6;">' + g + "</ins>";
  541. break;
  542. case a:
  543. r[c] = '<del style="background:#ffe6e6;">' + g + "</del>";
  544. break;
  545. case d:
  546. r[c] = "<span>" + g + "</span>";
  547. break;
  548. }
  549. }
  550. return r.join("");
  551. }, n.prototype.diff_text1 = function(t) {
  552. for (var r = [], i = 0; i < t.length; i++)
  553. t[i][0] !== f && (r[i] = t[i][1]);
  554. return r.join("");
  555. }, n.prototype.diff_text2 = function(t) {
  556. for (var r = [], i = 0; i < t.length; i++)
  557. t[i][0] !== a && (r[i] = t[i][1]);
  558. return r.join("");
  559. }, n.prototype.diff_levenshtein = function(t) {
  560. for (var r = 0, i = 0, s = 0, o = 0; o < t.length; o++) {
  561. var l = t[o][0], c = t[o][1];
  562. switch (l) {
  563. case f:
  564. i += c.length;
  565. break;
  566. case a:
  567. s += c.length;
  568. break;
  569. case d:
  570. r += Math.max(i, s), i = 0, s = 0;
  571. break;
  572. }
  573. }
  574. return r += Math.max(i, s), r;
  575. }, n.prototype.diff_toDelta = function(t) {
  576. for (var r = [], i = 0; i < t.length; i++)
  577. switch (t[i][0]) {
  578. case f:
  579. r[i] = "+" + encodeURI(t[i][1]);
  580. break;
  581. case a:
  582. r[i] = "-" + t[i][1].length;
  583. break;
  584. case d:
  585. r[i] = "=" + t[i][1].length;
  586. break;
  587. }
  588. return r.join(" ").replace(/%20/g, " ");
  589. }, n.prototype.diff_fromDelta = function(t, r) {
  590. for (var i = [], s = 0, o = 0, l = r.split(/\t/g), c = 0; c < l.length; c++) {
  591. var u = l[c].substring(1);
  592. switch (l[c].charAt(0)) {
  593. case "+":
  594. try {
  595. i[s++] = new n.Diff(f, decodeURI(u));
  596. } catch (p) {
  597. throw new Error("Illegal escape in diff_fromDelta: " + u);
  598. }
  599. break;
  600. case "-":
  601. case "=":
  602. var h = parseInt(u, 10);
  603. if (isNaN(h) || h < 0)
  604. throw new Error("Invalid number in diff_fromDelta: " + u);
  605. var g = t.substring(o, o += h);
  606. l[c].charAt(0) == "=" ? i[s++] = new n.Diff(d, g) : i[s++] = new n.Diff(a, g);
  607. break;
  608. default:
  609. if (l[c])
  610. throw new Error("Invalid diff operation in diff_fromDelta: " + l[c]);
  611. }
  612. }
  613. if (o != t.length)
  614. throw new Error("Delta length (" + o + ") does not equal source text length (" + t.length + ").");
  615. return i;
  616. }, n.prototype.match_main = function(t, r, i) {
  617. if (t == null || r == null || i == null)
  618. throw new Error("Null input. (match_main)");
  619. return i = Math.max(0, Math.min(i, t.length)), t == r ? 0 : t.length ? t.substring(i, i + r.length) == r ? i : this.match_bitap_(t, r, i) : -1;
  620. }, n.prototype.match_bitap_ = function(t, r, i) {
  621. if (r.length > this.Match_MaxBits)
  622. throw new Error("Pattern too long for this browser.");
  623. var s = this.match_alphabet_(r), o = this;
  624. function l(C, I) {
  625. var B = C / r.length, $ = Math.abs(i - I);
  626. return o.Match_Distance ? B + $ / o.Match_Distance : $ ? 1 : B;
  627. }
  628. var c = this.Match_Threshold, u = t.indexOf(r, i);
  629. u != -1 && (c = Math.min(l(0, u), c), u = t.lastIndexOf(r, i + r.length), u != -1 && (c = Math.min(l(0, u), c)));
  630. var h = 1 << r.length - 1;
  631. u = -1;
  632. for (var g, p, _ = r.length + t.length, v, m = 0; m < r.length; m++) {
  633. for (g = 0, p = _; g < p; )
  634. l(m, i + p) <= c ? g = p : _ = p, p = Math.floor((_ - g) / 2 + g);
  635. _ = p;
  636. var E = Math.max(1, i - p + 1), A = Math.min(i + p, t.length) + r.length, D = Array(A + 2);
  637. D[A + 1] = (1 << m) - 1;
  638. for (var S = A; S >= E; S--) {
  639. var N = s[t.charAt(S - 1)];
  640. if (m === 0 ? D[S] = (D[S + 1] << 1 | 1) & N : D[S] = (D[S + 1] << 1 | 1) & N | ((v[S + 1] | v[S]) << 1 | 1) | v[S + 1], D[S] & h) {
  641. var R = l(m, S - 1);
  642. if (R <= c)
  643. if (c = R, u = S - 1, u > i)
  644. E = Math.max(1, 2 * i - u);
  645. else
  646. break;
  647. }
  648. }
  649. if (l(m + 1, i) > c)
  650. break;
  651. v = D;
  652. }
  653. return u;
  654. }, n.prototype.match_alphabet_ = function(t) {
  655. for (var r = {}, i = 0; i < t.length; i++)
  656. r[t.charAt(i)] = 0;
  657. for (var i = 0; i < t.length; i++)
  658. r[t.charAt(i)] |= 1 << t.length - i - 1;
  659. return r;
  660. }, n.prototype.patch_addContext_ = function(t, r) {
  661. if (r.length != 0) {
  662. if (t.start2 === null)
  663. throw Error("patch not initialized");
  664. for (var i = r.substring(t.start2, t.start2 + t.length1), s = 0; r.indexOf(i) != r.lastIndexOf(i) && i.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin; )
  665. s += this.Patch_Margin, i = r.substring(
  666. t.start2 - s,
  667. t.start2 + t.length1 + s
  668. );
  669. s += this.Patch_Margin;
  670. var o = r.substring(t.start2 - s, t.start2);
  671. o && t.diffs.unshift(new n.Diff(d, o));
  672. var l = r.substring(
  673. t.start2 + t.length1,
  674. t.start2 + t.length1 + s
  675. );
  676. l && t.diffs.push(new n.Diff(d, l)), t.start1 -= o.length, t.start2 -= o.length, t.length1 += o.length + l.length, t.length2 += o.length + l.length;
  677. }
  678. }, n.prototype.patch_make = function(t, r, i) {
  679. var s, o;
  680. if (typeof t == "string" && typeof r == "string" && typeof i == "undefined")
  681. s = /** @type {string} */
  682. t, o = this.diff_main(
  683. s,
  684. /** @type {string} */
  685. r,
  686. !0
  687. ), o.length > 2 && (this.diff_cleanupSemantic(o), this.diff_cleanupEfficiency(o));
  688. else if (t && typeof t == "object" && typeof r == "undefined" && typeof i == "undefined")
  689. o = /** @type {!Array.<!diff_match_patch.Diff>} */
  690. t, s = this.diff_text1(o);
  691. else if (typeof t == "string" && r && typeof r == "object" && typeof i == "undefined")
  692. s = /** @type {string} */
  693. t, o = /** @type {!Array.<!diff_match_patch.Diff>} */
  694. r;
  695. else if (typeof t == "string" && typeof r == "string" && i && typeof i == "object")
  696. s = /** @type {string} */
  697. t, o = /** @type {!Array.<!diff_match_patch.Diff>} */
  698. i;
  699. else
  700. throw new Error("Unknown call format to patch_make.");
  701. if (o.length === 0)
  702. return [];
  703. for (var l = [], c = new n.patch_obj(), u = 0, h = 0, g = 0, p = s, _ = s, v = 0; v < o.length; v++) {
  704. var m = o[v][0], E = o[v][1];
  705. switch (!u && m !== d && (c.start1 = h, c.start2 = g), m) {
  706. case f:
  707. c.diffs[u++] = o[v], c.length2 += E.length, _ = _.substring(0, g) + E + _.substring(g);
  708. break;
  709. case a:
  710. c.length1 += E.length, c.diffs[u++] = o[v], _ = _.substring(0, g) + _.substring(g + E.length);
  711. break;
  712. case d:
  713. E.length <= 2 * this.Patch_Margin && u && o.length != v + 1 ? (c.diffs[u++] = o[v], c.length1 += E.length, c.length2 += E.length) : E.length >= 2 * this.Patch_Margin && u && (this.patch_addContext_(c, p), l.push(c), c = new n.patch_obj(), u = 0, p = _, h = g);
  714. break;
  715. }
  716. m !== f && (h += E.length), m !== a && (g += E.length);
  717. }
  718. return u && (this.patch_addContext_(c, p), l.push(c)), l;
  719. }, n.prototype.patch_deepCopy = function(t) {
  720. for (var r = [], i = 0; i < t.length; i++) {
  721. var s = t[i], o = new n.patch_obj();
  722. o.diffs = [];
  723. for (var l = 0; l < s.diffs.length; l++)
  724. o.diffs[l] = new n.Diff(s.diffs[l][0], s.diffs[l][1]);
  725. o.start1 = s.start1, o.start2 = s.start2, o.length1 = s.length1, o.length2 = s.length2, r[i] = o;
  726. }
  727. return r;
  728. }, n.prototype.patch_apply = function(t, r) {
  729. if (t.length == 0)
  730. return [r, []];
  731. t = this.patch_deepCopy(t);
  732. var i = this.patch_addPadding(t);
  733. r = i + r + i, this.patch_splitMax(t);
  734. for (var s = 0, o = [], l = 0; l < t.length; l++) {
  735. var c = t[l].start2 + s, u = this.diff_text1(t[l].diffs), h, g = -1;
  736. if (u.length > this.Match_MaxBits ? (h = this.match_main(
  737. r,
  738. u.substring(0, this.Match_MaxBits),
  739. c
  740. ), h != -1 && (g = this.match_main(
  741. r,
  742. u.substring(u.length - this.Match_MaxBits),
  743. c + u.length - this.Match_MaxBits
  744. ), (g == -1 || h >= g) && (h = -1))) : h = this.match_main(r, u, c), h == -1)
  745. o[l] = !1, s -= t[l].length2 - t[l].length1;
  746. else {
  747. o[l] = !0, s = h - c;
  748. var p;
  749. if (g == -1 ? p = r.substring(h, h + u.length) : p = r.substring(h, g + this.Match_MaxBits), u == p)
  750. r = r.substring(0, h) + this.diff_text2(t[l].diffs) + r.substring(h + u.length);
  751. else {
  752. var _ = this.diff_main(u, p, !1);
  753. if (u.length > this.Match_MaxBits && this.diff_levenshtein(_) / u.length > this.Patch_DeleteThreshold)
  754. o[l] = !1;
  755. else {
  756. this.diff_cleanupSemanticLossless(_);
  757. for (var v = 0, m, E = 0; E < t[l].diffs.length; E++) {
  758. var A = t[l].diffs[E];
  759. A[0] !== d && (m = this.diff_xIndex(_, v)), A[0] === f ? r = r.substring(0, h + m) + A[1] + r.substring(h + m) : A[0] === a && (r = r.substring(0, h + m) + r.substring(h + this.diff_xIndex(
  760. _,
  761. v + A[1].length
  762. ))), A[0] !== a && (v += A[1].length);
  763. }
  764. }
  765. }
  766. }
  767. }
  768. return r = r.substring(i.length, r.length - i.length), [r, o];
  769. }, n.prototype.patch_addPadding = function(t) {
  770. for (var r = this.Patch_Margin, i = "", s = 1; s <= r; s++)
  771. i += String.fromCharCode(s);
  772. for (var s = 0; s < t.length; s++)
  773. t[s].start1 += r, t[s].start2 += r;
  774. var o = t[0], l = o.diffs;
  775. if (l.length == 0 || l[0][0] != d)
  776. l.unshift(new n.Diff(d, i)), o.start1 -= r, o.start2 -= r, o.length1 += r, o.length2 += r;
  777. else if (r > l[0][1].length) {
  778. var c = r - l[0][1].length;
  779. l[0][1] = i.substring(l[0][1].length) + l[0][1], o.start1 -= c, o.start2 -= c, o.length1 += c, o.length2 += c;
  780. }
  781. if (o = t[t.length - 1], l = o.diffs, l.length == 0 || l[l.length - 1][0] != d)
  782. l.push(new n.Diff(d, i)), o.length1 += r, o.length2 += r;
  783. else if (r > l[l.length - 1][1].length) {
  784. var c = r - l[l.length - 1][1].length;
  785. l[l.length - 1][1] += i.substring(0, c), o.length1 += c, o.length2 += c;
  786. }
  787. return i;
  788. }, n.prototype.patch_splitMax = function(t) {
  789. for (var r = this.Match_MaxBits, i = 0; i < t.length; i++)
  790. if (!(t[i].length1 <= r)) {
  791. var s = t[i];
  792. t.splice(i--, 1);
  793. for (var o = s.start1, l = s.start2, c = ""; s.diffs.length !== 0; ) {
  794. var u = new n.patch_obj(), h = !0;
  795. for (u.start1 = o - c.length, u.start2 = l - c.length, c !== "" && (u.length1 = u.length2 = c.length, u.diffs.push(new n.Diff(d, c))); s.diffs.length !== 0 && u.length1 < r - this.Patch_Margin; ) {
  796. var g = s.diffs[0][0], p = s.diffs[0][1];
  797. g === f ? (u.length2 += p.length, l += p.length, u.diffs.push(s.diffs.shift()), h = !1) : g === a && u.diffs.length == 1 && u.diffs[0][0] == d && p.length > 2 * r ? (u.length1 += p.length, o += p.length, h = !1, u.diffs.push(new n.Diff(g, p)), s.diffs.shift()) : (p = p.substring(
  798. 0,
  799. r - u.length1 - this.Patch_Margin
  800. ), u.length1 += p.length, o += p.length, g === d ? (u.length2 += p.length, l += p.length) : h = !1, u.diffs.push(new n.Diff(g, p)), p == s.diffs[0][1] ? s.diffs.shift() : s.diffs[0][1] = s.diffs[0][1].substring(p.length));
  801. }
  802. c = this.diff_text2(u.diffs), c = c.substring(c.length - this.Patch_Margin);
  803. var _ = this.diff_text1(s.diffs).substring(0, this.Patch_Margin);
  804. _ !== "" && (u.length1 += _.length, u.length2 += _.length, u.diffs.length !== 0 && u.diffs[u.diffs.length - 1][0] === d ? u.diffs[u.diffs.length - 1][1] += _ : u.diffs.push(new n.Diff(d, _))), h || t.splice(++i, 0, u);
  805. }
  806. }
  807. }, n.prototype.patch_toText = function(t) {
  808. for (var r = [], i = 0; i < t.length; i++)
  809. r[i] = t[i];
  810. return r.join("");
  811. }, n.prototype.patch_fromText = function(t) {
  812. var r = [];
  813. if (!t)
  814. return r;
  815. for (var i = t.split(`
  816. `), s = 0, o = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; s < i.length; ) {
  817. var l = i[s].match(o);
  818. if (!l)
  819. throw new Error("Invalid patch string: " + i[s]);
  820. var c = new n.patch_obj();
  821. for (r.push(c), c.start1 = parseInt(l[1], 10), l[2] === "" ? (c.start1--, c.length1 = 1) : l[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(l[2], 10)), c.start2 = parseInt(l[3], 10), l[4] === "" ? (c.start2--, c.length2 = 1) : l[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(l[4], 10)), s++; s < i.length; ) {
  822. var u = i[s].charAt(0);
  823. try {
  824. var h = decodeURI(i[s].substring(1));
  825. } catch (g) {
  826. throw new Error("Illegal escape in patch_fromText: " + h);
  827. }
  828. if (u == "-")
  829. c.diffs.push(new n.Diff(a, h));
  830. else if (u == "+")
  831. c.diffs.push(new n.Diff(f, h));
  832. else if (u == " ")
  833. c.diffs.push(new n.Diff(d, h));
  834. else {
  835. if (u == "@")
  836. break;
  837. if (u !== "")
  838. throw new Error('Invalid patch mode "' + u + '" in: ' + h);
  839. }
  840. s++;
  841. }
  842. }
  843. return r;
  844. }, n.patch_obj = function() {
  845. this.diffs = [], this.start1 = null, this.start2 = null, this.length1 = 0, this.length2 = 0;
  846. }, n.patch_obj.prototype.toString = function() {
  847. var t, r;
  848. this.length1 === 0 ? t = this.start1 + ",0" : this.length1 == 1 ? t = this.start1 + 1 : t = this.start1 + 1 + "," + this.length1, this.length2 === 0 ? r = this.start2 + ",0" : this.length2 == 1 ? r = this.start2 + 1 : r = this.start2 + 1 + "," + this.length2;
  849. for (var i = ["@@ -" + t + " +" + r + ` @@
  850. `], s, o = 0; o < this.diffs.length; o++) {
  851. switch (this.diffs[o][0]) {
  852. case f:
  853. s = "+";
  854. break;
  855. case a:
  856. s = "-";
  857. break;
  858. case d:
  859. s = " ";
  860. break;
  861. }
  862. i[o + 1] = s + encodeURI(this.diffs[o][1]) + `
  863. `;
  864. }
  865. return i.join("").replace(/%20/g, " ");
  866. }, e.exports = n, e.exports.diff_match_patch = n, e.exports.DIFF_DELETE = a, e.exports.DIFF_INSERT = f, e.exports.DIFF_EQUAL = d;
  867. })(bn);
  868. var Ie = bn.exports;
  869. function vn(e) {
  870. return e instanceof Map ? e.clear = e.delete = e.set = function() {
  871. throw new Error("map is read-only");
  872. } : e instanceof Set && (e.add = e.clear = e.delete = function() {
  873. throw new Error("set is read-only");
  874. }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((n) => {
  875. const a = e[n], f = typeof a;
  876. (f === "object" || f === "function") && !Object.isFrozen(a) && vn(a);
  877. }), e;
  878. }
  879. class Je {
  880. /**
  881. * @param {CompiledMode} mode
  882. */
  883. constructor(n) {
  884. n.data === void 0 && (n.data = {}), this.data = n.data, this.isMatchIgnored = !1;
  885. }
  886. ignoreMatch() {
  887. this.isMatchIgnored = !0;
  888. }
  889. }
  890. function mn(e) {
  891. return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
  892. }
  893. function re(e, ...n) {
  894. const a = /* @__PURE__ */ Object.create(null);
  895. for (const f in e)
  896. a[f] = e[f];
  897. return n.forEach(function(f) {
  898. for (const d in f)
  899. a[d] = f[d];
  900. }), /** @type {T} */
  901. a;
  902. }
  903. const tt = "</span>", en = (e) => !!e.scope, rt = (e, { prefix: n }) => {
  904. if (e.startsWith("language:"))
  905. return e.replace("language:", "language-");
  906. if (e.includes(".")) {
  907. const a = e.split(".");
  908. return [
  909. `${n}${a.shift()}`,
  910. ...a.map((f, d) => `${f}${"_".repeat(d + 1)}`)
  911. ].join(" ");
  912. }
  913. return `${n}${e}`;
  914. };
  915. class it {
  916. /**
  917. * Creates a new HTMLRenderer
  918. *
  919. * @param {Tree} parseTree - the parse tree (must support `walk` API)
  920. * @param {{classPrefix: string}} options
  921. */
  922. constructor(n, a) {
  923. this.buffer = "", this.classPrefix = a.classPrefix, n.walk(this);
  924. }
  925. /**
  926. * Adds texts to the output stream
  927. *
  928. * @param {string} text */
  929. addText(n) {
  930. this.buffer += mn(n);
  931. }
  932. /**
  933. * Adds a node open to the output stream (if needed)
  934. *
  935. * @param {Node} node */
  936. openNode(n) {
  937. if (!en(n))
  938. return;
  939. const a = rt(
  940. n.scope,
  941. { prefix: this.classPrefix }
  942. );
  943. this.span(a);
  944. }
  945. /**
  946. * Adds a node close to the output stream (if needed)
  947. *
  948. * @param {Node} node */
  949. closeNode(n) {
  950. en(n) && (this.buffer += tt);
  951. }
  952. /**
  953. * returns the accumulated buffer
  954. */
  955. value() {
  956. return this.buffer;
  957. }
  958. // helpers
  959. /**
  960. * Builds a span element
  961. *
  962. * @param {string} className */
  963. span(n) {
  964. this.buffer += `<span class="${n}">`;
  965. }
  966. }
  967. const nn = (e = {}) => {
  968. const n = { children: [] };
  969. return Object.assign(n, e), n;
  970. };
  971. class xe {
  972. constructor() {
  973. this.rootNode = nn(), this.stack = [this.rootNode];
  974. }
  975. get top() {
  976. return this.stack[this.stack.length - 1];
  977. }
  978. get root() {
  979. return this.rootNode;
  980. }
  981. /** @param {Node} node */
  982. add(n) {
  983. this.top.children.push(n);
  984. }
  985. /** @param {string} scope */
  986. openNode(n) {
  987. const a = nn({ scope: n });
  988. this.add(a), this.stack.push(a);
  989. }
  990. closeNode() {
  991. if (this.stack.length > 1)
  992. return this.stack.pop();
  993. }
  994. closeAllNodes() {
  995. for (; this.closeNode(); )
  996. ;
  997. }
  998. toJSON() {
  999. return JSON.stringify(this.rootNode, null, 4);
  1000. }
  1001. /**
  1002. * @typedef { import("./html_renderer").Renderer } Renderer
  1003. * @param {Renderer} builder
  1004. */
  1005. walk(n) {
  1006. return this.constructor._walk(n, this.rootNode);
  1007. }
  1008. /**
  1009. * @param {Renderer} builder
  1010. * @param {Node} node
  1011. */
  1012. static _walk(n, a) {
  1013. return typeof a == "string" ? n.addText(a) : a.children && (n.openNode(a), a.children.forEach((f) => this._walk(n, f)), n.closeNode(a)), n;
  1014. }
  1015. /**
  1016. * @param {Node} node
  1017. */
  1018. static _collapse(n) {
  1019. typeof n != "string" && n.children && (n.children.every((a) => typeof a == "string") ? n.children = [n.children.join("")] : n.children.forEach((a) => {
  1020. xe._collapse(a);
  1021. }));
  1022. }
  1023. }
  1024. class st extends xe {
  1025. /**
  1026. * @param {*} options
  1027. */
  1028. constructor(n) {
  1029. super(), this.options = n;
  1030. }
  1031. /**
  1032. * @param {string} text
  1033. */
  1034. addText(n) {
  1035. n !== "" && this.add(n);
  1036. }
  1037. /** @param {string} scope */
  1038. startScope(n) {
  1039. this.openNode(n);
  1040. }
  1041. endScope() {
  1042. this.closeNode();
  1043. }
  1044. /**
  1045. * @param {Emitter & {root: DataNode}} emitter
  1046. * @param {string} name
  1047. */
  1048. __addSublanguage(n, a) {
  1049. const f = n.root;
  1050. a && (f.scope = `language:${a}`), this.add(f);
  1051. }
  1052. toHTML() {
  1053. return new it(this, this.options).value();
  1054. }
  1055. finalize() {
  1056. return this.closeAllNodes(), !0;
  1057. }
  1058. }
  1059. function pe(e) {
  1060. return e ? typeof e == "string" ? e : e.source : null;
  1061. }
  1062. function En(e) {
  1063. return ae("(?=", e, ")");
  1064. }
  1065. function at(e) {
  1066. return ae("(?:", e, ")*");
  1067. }
  1068. function ot(e) {
  1069. return ae("(?:", e, ")?");
  1070. }
  1071. function ae(...e) {
  1072. return e.map((a) => pe(a)).join("");
  1073. }
  1074. function lt(e) {
  1075. const n = e[e.length - 1];
  1076. return typeof n == "object" && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {};
  1077. }
  1078. function He(...e) {
  1079. return "(" + (lt(e).capture ? "" : "?:") + e.map((f) => pe(f)).join("|") + ")";
  1080. }
  1081. function yn(e) {
  1082. return new RegExp(e.toString() + "|").exec("").length - 1;
  1083. }
  1084. function ct(e, n) {
  1085. const a = e && e.exec(n);
  1086. return a && a.index === 0;
  1087. }
  1088. const ut = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
  1089. function Fe(e, { joinWith: n }) {
  1090. let a = 0;
  1091. return e.map((f) => {
  1092. a += 1;
  1093. const d = a;
  1094. let t = pe(f), r = "";
  1095. for (; t.length > 0; ) {
  1096. const i = ut.exec(t);
  1097. if (!i) {
  1098. r += t;
  1099. break;
  1100. }
  1101. r += t.substring(0, i.index), t = t.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? r += "\\" + String(Number(i[1]) + d) : (r += i[0], i[0] === "(" && a++);
  1102. }
  1103. return r;
  1104. }).map((f) => `(${f})`).join(n);
  1105. }
  1106. const ft = /\b\B/, wn = "[a-zA-Z]\\w*", ze = "[a-zA-Z_]\\w*", An = "\\b\\d+(\\.\\d+)?", Nn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Mn = "\\b(0b[01]+)", gt = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ht = (e = {}) => {
  1107. const n = /^#![ ]*\//;
  1108. return e.binary && (e.begin = ae(
  1109. n,
  1110. /.*\b/,
  1111. e.binary,
  1112. /\b.*/
  1113. )), re({
  1114. scope: "meta",
  1115. begin: n,
  1116. end: /$/,
  1117. relevance: 0,
  1118. /** @type {ModeCallback} */
  1119. "on:begin": (a, f) => {
  1120. a.index !== 0 && f.ignoreMatch();
  1121. }
  1122. }, e);
  1123. }, _e = {
  1124. begin: "\\\\[\\s\\S]",
  1125. relevance: 0
  1126. }, dt = {
  1127. scope: "string",
  1128. begin: "'",
  1129. end: "'",
  1130. illegal: "\\n",
  1131. contains: [_e]
  1132. }, pt = {
  1133. scope: "string",
  1134. begin: '"',
  1135. end: '"',
  1136. illegal: "\\n",
  1137. contains: [_e]
  1138. }, _t = {
  1139. begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
  1140. }, Ce = function(e, n, a = {}) {
  1141. const f = re(
  1142. {
  1143. scope: "comment",
  1144. begin: e,
  1145. end: n,
  1146. contains: []
  1147. },
  1148. a
  1149. );
  1150. f.contains.push({
  1151. scope: "doctag",
  1152. // hack to avoid the space from being included. the space is necessary to
  1153. // match here to prevent the plain text rule below from gobbling up doctags
  1154. begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
  1155. end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
  1156. excludeBegin: !0,
  1157. relevance: 0
  1158. });
  1159. const d = He(
  1160. // list of common 1 and 2 letter words in English
  1161. "I",
  1162. "a",
  1163. "is",
  1164. "so",
  1165. "us",
  1166. "to",
  1167. "at",
  1168. "if",
  1169. "in",
  1170. "it",
  1171. "on",
  1172. // note: this is not an exhaustive list of contractions, just popular ones
  1173. /[A-Za-z]+['](d|ve|re|ll|t|s|n)/,
  1174. // contractions - can't we'd they're let's, etc
  1175. /[A-Za-z]+[-][a-z]+/,
  1176. // `no-way`, etc.
  1177. /[A-Za-z][a-z]{2,}/
  1178. // allow capitalized words at beginning of sentences
  1179. );
  1180. return f.contains.push(
  1181. {
  1182. // TODO: how to include ", (, ) without breaking grammars that use these for
  1183. // comment delimiters?
  1184. // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/
  1185. // ---
  1186. // this tries to find sequences of 3 english words in a row (without any
  1187. // "programming" type syntax) this gives us a strong signal that we've
  1188. // TRULY found a comment - vs perhaps scanning with the wrong language.
  1189. // It's possible to find something that LOOKS like the start of the
  1190. // comment - but then if there is no readable text - good chance it is a
  1191. // false match and not a comment.
  1192. //
  1193. // for a visual example please see:
  1194. // https://github.com/highlightjs/highlight.js/issues/2827
  1195. begin: ae(
  1196. /[ ]+/,
  1197. // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
  1198. "(",
  1199. d,
  1200. /[.]?[:]?([.][ ]|[ ])/,
  1201. "){3}"
  1202. )
  1203. // look for 3 words in a row
  1204. }
  1205. ), f;
  1206. }, bt = Ce("//", "$"), vt = Ce("/\\*", "\\*/"), mt = Ce("#", "$"), Et = {
  1207. scope: "number",
  1208. begin: An,
  1209. relevance: 0
  1210. }, yt = {
  1211. scope: "number",
  1212. begin: Nn,
  1213. relevance: 0
  1214. }, wt = {
  1215. scope: "number",
  1216. begin: Mn,
  1217. relevance: 0
  1218. }, At = {
  1219. scope: "regexp",
  1220. begin: /\/(?=[^/\n]*\/)/,
  1221. end: /\/[gimuy]*/,
  1222. contains: [
  1223. _e,
  1224. {
  1225. begin: /\[/,
  1226. end: /\]/,
  1227. relevance: 0,
  1228. contains: [_e]
  1229. }
  1230. ]
  1231. }, Nt = {
  1232. scope: "title",
  1233. begin: wn,
  1234. relevance: 0
  1235. }, Mt = {
  1236. scope: "title",
  1237. begin: ze,
  1238. relevance: 0
  1239. }, Tt = {
  1240. // excludes method names from keyword processing
  1241. begin: "\\.\\s*" + ze,
  1242. relevance: 0
  1243. }, St = function(e) {
  1244. return Object.assign(
  1245. e,
  1246. {
  1247. /** @type {ModeCallback} */
  1248. "on:begin": (n, a) => {
  1249. a.data._beginMatch = n[1];
  1250. },
  1251. /** @type {ModeCallback} */
  1252. "on:end": (n, a) => {
  1253. a.data._beginMatch !== n[1] && a.ignoreMatch();
  1254. }
  1255. }
  1256. );
  1257. };
  1258. var Ae = /* @__PURE__ */ Object.freeze({
  1259. __proto__: null,
  1260. APOS_STRING_MODE: dt,
  1261. BACKSLASH_ESCAPE: _e,
  1262. BINARY_NUMBER_MODE: wt,
  1263. BINARY_NUMBER_RE: Mn,
  1264. COMMENT: Ce,
  1265. C_BLOCK_COMMENT_MODE: vt,
  1266. C_LINE_COMMENT_MODE: bt,
  1267. C_NUMBER_MODE: yt,
  1268. C_NUMBER_RE: Nn,
  1269. END_SAME_AS_BEGIN: St,
  1270. HASH_COMMENT_MODE: mt,
  1271. IDENT_RE: wn,
  1272. MATCH_NOTHING_RE: ft,
  1273. METHOD_GUARD: Tt,
  1274. NUMBER_MODE: Et,
  1275. NUMBER_RE: An,
  1276. PHRASAL_WORDS_MODE: _t,
  1277. QUOTE_STRING_MODE: pt,
  1278. REGEXP_MODE: At,
  1279. RE_STARTERS_RE: gt,
  1280. SHEBANG: ht,
  1281. TITLE_MODE: Nt,
  1282. UNDERSCORE_IDENT_RE: ze,
  1283. UNDERSCORE_TITLE_MODE: Mt
  1284. });
  1285. function Dt(e, n) {
  1286. e.input[e.index - 1] === "." && n.ignoreMatch();
  1287. }
  1288. function Ct(e, n) {
  1289. e.className !== void 0 && (e.scope = e.className, delete e.className);
  1290. }
  1291. function Rt(e, n) {
  1292. n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Dt, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
  1293. }
  1294. function Lt(e, n) {
  1295. Array.isArray(e.illegal) && (e.illegal = He(...e.illegal));
  1296. }
  1297. function Ot(e, n) {
  1298. if (e.match) {
  1299. if (e.begin || e.end)
  1300. throw new Error("begin & end are not supported with match");
  1301. e.begin = e.match, delete e.match;
  1302. }
  1303. }
  1304. function It(e, n) {
  1305. e.relevance === void 0 && (e.relevance = 1);
  1306. }
  1307. const kt = (e, n) => {
  1308. if (!e.beforeMatch)
  1309. return;
  1310. if (e.starts)
  1311. throw new Error("beforeMatch cannot be used with starts");
  1312. const a = Object.assign({}, e);
  1313. Object.keys(e).forEach((f) => {
  1314. delete e[f];
  1315. }), e.keywords = a.keywords, e.begin = ae(a.beforeMatch, En(a.begin)), e.starts = {
  1316. relevance: 0,
  1317. contains: [
  1318. Object.assign(a, { endsParent: !0 })
  1319. ]
  1320. }, e.relevance = 0, delete a.beforeMatch;
  1321. }, $t = [
  1322. "of",
  1323. "and",
  1324. "for",
  1325. "in",
  1326. "not",
  1327. "or",
  1328. "if",
  1329. "then",
  1330. "parent",
  1331. // common variable name
  1332. "list",
  1333. // common variable name
  1334. "value"
  1335. // common variable name
  1336. ], Bt = "keyword";
  1337. function Tn(e, n, a = Bt) {
  1338. const f = /* @__PURE__ */ Object.create(null);
  1339. return typeof e == "string" ? d(a, e.split(" ")) : Array.isArray(e) ? d(a, e) : Object.keys(e).forEach(function(t) {
  1340. Object.assign(
  1341. f,
  1342. Tn(e[t], n, t)
  1343. );
  1344. }), f;
  1345. function d(t, r) {
  1346. n && (r = r.map((i) => i.toLowerCase())), r.forEach(function(i) {
  1347. const s = i.split("|");
  1348. f[s[0]] = [t, Ut(s[0], s[1])];
  1349. });
  1350. }
  1351. }
  1352. function Ut(e, n) {
  1353. return n ? Number(n) : Pt(e) ? 0 : 1;
  1354. }
  1355. function Pt(e) {
  1356. return $t.includes(e.toLowerCase());
  1357. }
  1358. const tn = {}, se = (e) => {
  1359. console.error(e);
  1360. }, rn = (e, ...n) => {
  1361. console.log(`WARN: ${e}`, ...n);
  1362. }, ce = (e, n) => {
  1363. tn[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), tn[`${e}/${n}`] = !0);
  1364. }, Se = new Error();
  1365. function Sn(e, n, { key: a }) {
  1366. let f = 0;
  1367. const d = e[a], t = {}, r = {};
  1368. for (let i = 1; i <= n.length; i++)
  1369. r[i + f] = d[i], t[i + f] = !0, f += yn(n[i - 1]);
  1370. e[a] = r, e[a]._emit = t, e[a]._multi = !0;
  1371. }
  1372. function xt(e) {
  1373. if (Array.isArray(e.begin)) {
  1374. if (e.skip || e.excludeBegin || e.returnBegin)
  1375. throw se("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Se;
  1376. if (typeof e.beginScope != "object" || e.beginScope === null)
  1377. throw se("beginScope must be object"), Se;
  1378. Sn(e, e.begin, { key: "beginScope" }), e.begin = Fe(e.begin, { joinWith: "" });
  1379. }
  1380. }
  1381. function Ht(e) {
  1382. if (Array.isArray(e.end)) {
  1383. if (e.skip || e.excludeEnd || e.returnEnd)
  1384. throw se("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Se;
  1385. if (typeof e.endScope != "object" || e.endScope === null)
  1386. throw se("endScope must be object"), Se;
  1387. Sn(e, e.end, { key: "endScope" }), e.end = Fe(e.end, { joinWith: "" });
  1388. }
  1389. }
  1390. function Ft(e) {
  1391. e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
  1392. }
  1393. function zt(e) {
  1394. Ft(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), xt(e), Ht(e);
  1395. }
  1396. function Gt(e) {
  1397. function n(r, i) {
  1398. return new RegExp(
  1399. pe(r),
  1400. "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (i ? "g" : "")
  1401. );
  1402. }
  1403. class a {
  1404. constructor() {
  1405. this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
  1406. }
  1407. // @ts-ignore
  1408. addRule(i, s) {
  1409. s.position = this.position++, this.matchIndexes[this.matchAt] = s, this.regexes.push([s, i]), this.matchAt += yn(i) + 1;
  1410. }
  1411. compile() {
  1412. this.regexes.length === 0 && (this.exec = () => null);
  1413. const i = this.regexes.map((s) => s[1]);
  1414. this.matcherRe = n(Fe(i, { joinWith: "|" }), !0), this.lastIndex = 0;
  1415. }
  1416. /** @param {string} s */
  1417. exec(i) {
  1418. this.matcherRe.lastIndex = this.lastIndex;
  1419. const s = this.matcherRe.exec(i);
  1420. if (!s)
  1421. return null;
  1422. const o = s.findIndex((c, u) => u > 0 && c !== void 0), l = this.matchIndexes[o];
  1423. return s.splice(0, o), Object.assign(s, l);
  1424. }
  1425. }
  1426. class f {
  1427. constructor() {
  1428. this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
  1429. }
  1430. // @ts-ignore
  1431. getMatcher(i) {
  1432. if (this.multiRegexes[i])
  1433. return this.multiRegexes[i];
  1434. const s = new a();
  1435. return this.rules.slice(i).forEach(([o, l]) => s.addRule(o, l)), s.compile(), this.multiRegexes[i] = s, s;
  1436. }
  1437. resumingScanAtSamePosition() {
  1438. return this.regexIndex !== 0;
  1439. }
  1440. considerAll() {
  1441. this.regexIndex = 0;
  1442. }
  1443. // @ts-ignore
  1444. addRule(i, s) {
  1445. this.rules.push([i, s]), s.type === "begin" && this.count++;
  1446. }
  1447. /** @param {string} s */
  1448. exec(i) {
  1449. const s = this.getMatcher(this.regexIndex);
  1450. s.lastIndex = this.lastIndex;
  1451. let o = s.exec(i);
  1452. if (this.resumingScanAtSamePosition() && !(o && o.index === this.lastIndex)) {
  1453. const l = this.getMatcher(0);
  1454. l.lastIndex = this.lastIndex + 1, o = l.exec(i);
  1455. }
  1456. return o && (this.regexIndex += o.position + 1, this.regexIndex === this.count && this.considerAll()), o;
  1457. }
  1458. }
  1459. function d(r) {
  1460. const i = new f();
  1461. return r.contains.forEach((s) => i.addRule(s.begin, { rule: s, type: "begin" })), r.terminatorEnd && i.addRule(r.terminatorEnd, { type: "end" }), r.illegal && i.addRule(r.illegal, { type: "illegal" }), i;
  1462. }
  1463. function t(r, i) {
  1464. const s = (
  1465. /** @type CompiledMode */
  1466. r
  1467. );
  1468. if (r.isCompiled)
  1469. return s;
  1470. [
  1471. Ct,
  1472. // do this early so compiler extensions generally don't have to worry about
  1473. // the distinction between match/begin
  1474. Ot,
  1475. zt,
  1476. kt
  1477. ].forEach((l) => l(r, i)), e.compilerExtensions.forEach((l) => l(r, i)), r.__beforeBegin = null, [
  1478. Rt,
  1479. // do this later so compiler extensions that come earlier have access to the
  1480. // raw array if they wanted to perhaps manipulate it, etc.
  1481. Lt,
  1482. // default to 1 relevance if not specified
  1483. It
  1484. ].forEach((l) => l(r, i)), r.isCompiled = !0;
  1485. let o = null;
  1486. return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), o = r.keywords.$pattern, delete r.keywords.$pattern), o = o || /\w+/, r.keywords && (r.keywords = Tn(r.keywords, e.case_insensitive)), s.keywordPatternRe = n(o, !0), i && (r.begin || (r.begin = /\B|\b/), s.beginRe = n(s.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (s.endRe = n(s.end)), s.terminatorEnd = pe(s.end) || "", r.endsWithParent && i.terminatorEnd && (s.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (s.illegalRe = n(
  1487. /** @type {RegExp | string} */
  1488. r.illegal
  1489. )), r.contains || (r.contains = []), r.contains = [].concat(...r.contains.map(function(l) {
  1490. return Kt(l === "self" ? r : l);
  1491. })), r.contains.forEach(function(l) {
  1492. t(
  1493. /** @type Mode */
  1494. l,
  1495. s
  1496. );
  1497. }), r.starts && t(r.starts, i), s.matcher = d(s), s;
  1498. }
  1499. if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
  1500. throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
  1501. return e.classNameAliases = re(e.classNameAliases || {}), t(
  1502. /** @type Mode */
  1503. e
  1504. );
  1505. }
  1506. function Dn(e) {
  1507. return e ? e.endsWithParent || Dn(e.starts) : !1;
  1508. }
  1509. function Kt(e) {
  1510. return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
  1511. return re(e, { variants: null }, n);
  1512. })), e.cachedVariants ? e.cachedVariants : Dn(e) ? re(e, { starts: e.starts ? re(e.starts) : null }) : Object.isFrozen(e) ? re(e) : e;
  1513. }
  1514. var Wt = "11.9.0";
  1515. class qt extends Error {
  1516. constructor(n, a) {
  1517. super(n), this.name = "HTMLInjectionError", this.html = a;
  1518. }
  1519. }
  1520. const ke = mn, sn = re, an = Symbol("nomatch"), Qt = 7, Cn = function(e) {
  1521. const n = /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ Object.create(null), f = [];
  1522. let d = !0;
  1523. const t = "Could not find the language '{}', did you forget to load/include a language module?", r = { disableAutodetect: !0, name: "Plain text", contains: [] };
  1524. let i = {
  1525. ignoreUnescapedHTML: !1,
  1526. throwUnescapedHTML: !1,
  1527. noHighlightRe: /^(no-?highlight)$/i,
  1528. languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
  1529. classPrefix: "hljs-",
  1530. cssSelector: "pre code",
  1531. languages: null,
  1532. // beta configuration options, subject to change, welcome to discuss
  1533. // https://github.com/highlightjs/highlight.js/issues/1086
  1534. __emitter: st
  1535. };
  1536. function s(b) {
  1537. return i.noHighlightRe.test(b);
  1538. }
  1539. function o(b) {
  1540. let w = b.className + " ";
  1541. w += b.parentNode ? b.parentNode.className : "";
  1542. const L = i.languageDetectRe.exec(w);
  1543. if (L) {
  1544. const U = C(L[1]);
  1545. return U || (rn(t.replace("{}", L[1])), rn("Falling back to no-highlight mode for this block.", b)), U ? L[1] : "no-highlight";
  1546. }
  1547. return w.split(/\s+/).find((U) => s(U) || C(U));
  1548. }
  1549. function l(b, w, L) {
  1550. let U = "", H = "";
  1551. typeof w == "object" ? (U = b, L = w.ignoreIllegals, H = w.language) : (ce("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ce("10.7.0", `Please use highlight(code, options) instead.
  1552. https://github.com/highlightjs/highlight.js/issues/2277`), H = b, U = w), L === void 0 && (L = !0);
  1553. const W = {
  1554. code: U,
  1555. language: H
  1556. };
  1557. te("before:highlight", W);
  1558. const Z = W.result ? W.result : c(W.language, W.code, L);
  1559. return Z.code = W.code, te("after:highlight", Z), Z;
  1560. }
  1561. function c(b, w, L, U) {
  1562. const H = /* @__PURE__ */ Object.create(null);
  1563. function W(y, M) {
  1564. return y.keywords[M];
  1565. }
  1566. function Z() {
  1567. if (!O.keywords) {
  1568. z.addText(x);
  1569. return;
  1570. }
  1571. let y = 0;
  1572. O.keywordPatternRe.lastIndex = 0;
  1573. let M = O.keywordPatternRe.exec(x), k = "";
  1574. for (; M; ) {
  1575. k += x.substring(y, M.index);
  1576. const P = Y.case_insensitive ? M[0].toLowerCase() : M[0], G = W(O, P);
  1577. if (G) {
  1578. const [X, Fn] = G;
  1579. if (z.addText(k), k = "", H[P] = (H[P] || 0) + 1, H[P] <= Qt && (we += Fn), X.startsWith("_"))
  1580. k += M[0];
  1581. else {
  1582. const zn = Y.classNameAliases[X] || X;
  1583. V(M[0], zn);
  1584. }
  1585. } else
  1586. k += M[0];
  1587. y = O.keywordPatternRe.lastIndex, M = O.keywordPatternRe.exec(x);
  1588. }
  1589. k += x.substring(y), z.addText(k);
  1590. }
  1591. function Ee() {
  1592. if (x === "")
  1593. return;
  1594. let y = null;
  1595. if (typeof O.subLanguage == "string") {
  1596. if (!n[O.subLanguage]) {
  1597. z.addText(x);
  1598. return;
  1599. }
  1600. y = c(O.subLanguage, x, !0, Ze[O.subLanguage]), Ze[O.subLanguage] = /** @type {CompiledMode} */
  1601. y._top;
  1602. } else
  1603. y = h(x, O.subLanguage.length ? O.subLanguage : null);
  1604. O.relevance > 0 && (we += y.relevance), z.__addSublanguage(y._emitter, y.language);
  1605. }
  1606. function q() {
  1607. O.subLanguage != null ? Ee() : Z(), x = "";
  1608. }
  1609. function V(y, M) {
  1610. y !== "" && (z.startScope(M), z.addText(y), z.endScope());
  1611. }
  1612. function We(y, M) {
  1613. let k = 1;
  1614. const P = M.length - 1;
  1615. for (; k <= P; ) {
  1616. if (!y._emit[k]) {
  1617. k++;
  1618. continue;
  1619. }
  1620. const G = Y.classNameAliases[y[k]] || y[k], X = M[k];
  1621. G ? V(X, G) : (x = X, Z(), x = ""), k++;
  1622. }
  1623. }
  1624. function qe(y, M) {
  1625. return y.scope && typeof y.scope == "string" && z.openNode(Y.classNameAliases[y.scope] || y.scope), y.beginScope && (y.beginScope._wrap ? (V(x, Y.classNameAliases[y.beginScope._wrap] || y.beginScope._wrap), x = "") : y.beginScope._multi && (We(y.beginScope, M), x = "")), O = Object.create(y, { parent: { value: O } }), O;
  1626. }
  1627. function Qe(y, M, k) {
  1628. let P = ct(y.endRe, k);
  1629. if (P) {
  1630. if (y["on:end"]) {
  1631. const G = new Je(y);
  1632. y["on:end"](M, G), G.isMatchIgnored && (P = !1);
  1633. }
  1634. if (P) {
  1635. for (; y.endsParent && y.parent; )
  1636. y = y.parent;
  1637. return y;
  1638. }
  1639. }
  1640. if (y.endsWithParent)
  1641. return Qe(y.parent, M, k);
  1642. }
  1643. function Bn(y) {
  1644. return O.matcher.regexIndex === 0 ? (x += y[0], 1) : (Oe = !0, 0);
  1645. }
  1646. function Un(y) {
  1647. const M = y[0], k = y.rule, P = new Je(k), G = [k.__beforeBegin, k["on:begin"]];
  1648. for (const X of G)
  1649. if (X && (X(y, P), P.isMatchIgnored))
  1650. return Bn(M);
  1651. return k.skip ? x += M : (k.excludeBegin && (x += M), q(), !k.returnBegin && !k.excludeBegin && (x = M)), qe(k, y), k.returnBegin ? 0 : M.length;
  1652. }
  1653. function Pn(y) {
  1654. const M = y[0], k = w.substring(y.index), P = Qe(O, y, k);
  1655. if (!P)
  1656. return an;
  1657. const G = O;
  1658. O.endScope && O.endScope._wrap ? (q(), V(M, O.endScope._wrap)) : O.endScope && O.endScope._multi ? (q(), We(O.endScope, y)) : G.skip ? x += M : (G.returnEnd || G.excludeEnd || (x += M), q(), G.excludeEnd && (x = M));
  1659. do
  1660. O.scope && z.closeNode(), !O.skip && !O.subLanguage && (we += O.relevance), O = O.parent;
  1661. while (O !== P.parent);
  1662. return P.starts && qe(P.starts, y), G.returnEnd ? 0 : M.length;
  1663. }
  1664. function xn() {
  1665. const y = [];
  1666. for (let M = O; M !== Y; M = M.parent)
  1667. M.scope && y.unshift(M.scope);
  1668. y.forEach((M) => z.openNode(M));
  1669. }
  1670. let ye = {};
  1671. function je(y, M) {
  1672. const k = M && M[0];
  1673. if (x += y, k == null)
  1674. return q(), 0;
  1675. if (ye.type === "begin" && M.type === "end" && ye.index === M.index && k === "") {
  1676. if (x += w.slice(M.index, M.index + 1), !d) {
  1677. const P = new Error(`0 width match regex (${b})`);
  1678. throw P.languageName = b, P.badRule = ye.rule, P;
  1679. }
  1680. return 1;
  1681. }
  1682. if (ye = M, M.type === "begin")
  1683. return Un(M);
  1684. if (M.type === "illegal" && !L) {
  1685. const P = new Error('Illegal lexeme "' + k + '" for mode "' + (O.scope || "<unnamed>") + '"');
  1686. throw P.mode = O, P;
  1687. } else if (M.type === "end") {
  1688. const P = Pn(M);
  1689. if (P !== an)
  1690. return P;
  1691. }
  1692. if (M.type === "illegal" && k === "")
  1693. return 1;
  1694. if (Le > 1e5 && Le > M.index * 3)
  1695. throw new Error("potential infinite loop, way more iterations than matches");
  1696. return x += k, k.length;
  1697. }
  1698. const Y = C(b);
  1699. if (!Y)
  1700. throw se(t.replace("{}", b)), new Error('Unknown language: "' + b + '"');
  1701. const Hn = Gt(Y);
  1702. let Re = "", O = U || Hn;
  1703. const Ze = {}, z = new i.__emitter(i);
  1704. xn();
  1705. let x = "", we = 0, ie = 0, Le = 0, Oe = !1;
  1706. try {
  1707. if (Y.__emitTokens)
  1708. Y.__emitTokens(w, z);
  1709. else {
  1710. for (O.matcher.considerAll(); ; ) {
  1711. Le++, Oe ? Oe = !1 : O.matcher.considerAll(), O.matcher.lastIndex = ie;
  1712. const y = O.matcher.exec(w);
  1713. if (!y)
  1714. break;
  1715. const M = w.substring(ie, y.index), k = je(M, y);
  1716. ie = y.index + k;
  1717. }
  1718. je(w.substring(ie));
  1719. }
  1720. return z.finalize(), Re = z.toHTML(), {
  1721. language: b,
  1722. value: Re,
  1723. relevance: we,
  1724. illegal: !1,
  1725. _emitter: z,
  1726. _top: O
  1727. };
  1728. } catch (y) {
  1729. if (y.message && y.message.includes("Illegal"))
  1730. return {
  1731. language: b,
  1732. value: ke(w),
  1733. illegal: !0,
  1734. relevance: 0,
  1735. _illegalBy: {
  1736. message: y.message,
  1737. index: ie,
  1738. context: w.slice(ie - 100, ie + 100),
  1739. mode: y.mode,
  1740. resultSoFar: Re
  1741. },
  1742. _emitter: z
  1743. };
  1744. if (d)
  1745. return {
  1746. language: b,
  1747. value: ke(w),
  1748. illegal: !1,
  1749. relevance: 0,
  1750. errorRaised: y,
  1751. _emitter: z,
  1752. _top: O
  1753. };
  1754. throw y;
  1755. }
  1756. }
  1757. function u(b) {
  1758. const w = {
  1759. value: ke(b),
  1760. illegal: !1,
  1761. relevance: 0,
  1762. _top: r,
  1763. _emitter: new i.__emitter(i)
  1764. };
  1765. return w._emitter.addText(b), w;
  1766. }
  1767. function h(b, w) {
  1768. w = w || i.languages || Object.keys(n);
  1769. const L = u(b), U = w.filter(C).filter(B).map(
  1770. (q) => c(q, b, !1)
  1771. );
  1772. U.unshift(L);
  1773. const H = U.sort((q, V) => {
  1774. if (q.relevance !== V.relevance)
  1775. return V.relevance - q.relevance;
  1776. if (q.language && V.language) {
  1777. if (C(q.language).supersetOf === V.language)
  1778. return 1;
  1779. if (C(V.language).supersetOf === q.language)
  1780. return -1;
  1781. }
  1782. return 0;
  1783. }), [W, Z] = H, Ee = W;
  1784. return Ee.secondBest = Z, Ee;
  1785. }
  1786. function g(b, w, L) {
  1787. const U = w && a[w] || L;
  1788. b.classList.add("hljs"), b.classList.add(`language-${U}`);
  1789. }
  1790. function p(b) {
  1791. let w = null;
  1792. const L = o(b);
  1793. if (s(L))
  1794. return;
  1795. if (te(
  1796. "before:highlightElement",
  1797. { el: b, language: L }
  1798. ), b.dataset.highlighted) {
  1799. console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", b);
  1800. return;
  1801. }
  1802. if (b.children.length > 0 && (i.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(b)), i.throwUnescapedHTML))
  1803. throw new qt(
  1804. "One of your code blocks includes unescaped HTML.",
  1805. b.innerHTML
  1806. );
  1807. w = b;
  1808. const U = w.textContent, H = L ? l(U, { language: L, ignoreIllegals: !0 }) : h(U);
  1809. b.innerHTML = H.value, b.dataset.highlighted = "yes", g(b, L, H.language), b.result = {
  1810. language: H.language,
  1811. // TODO: remove with version 11.0
  1812. re: H.relevance,
  1813. relevance: H.relevance
  1814. }, H.secondBest && (b.secondBest = {
  1815. language: H.secondBest.language,
  1816. relevance: H.secondBest.relevance
  1817. }), te("after:highlightElement", { el: b, result: H, text: U });
  1818. }
  1819. function _(b) {
  1820. i = sn(i, b);
  1821. }
  1822. const v = () => {
  1823. A(), ce("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
  1824. };
  1825. function m() {
  1826. A(), ce("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
  1827. }
  1828. let E = !1;
  1829. function A() {
  1830. if (document.readyState === "loading") {
  1831. E = !0;
  1832. return;
  1833. }
  1834. document.querySelectorAll(i.cssSelector).forEach(p);
  1835. }
  1836. function D() {
  1837. E && A();
  1838. }
  1839. typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", D, !1);
  1840. function S(b, w) {
  1841. let L = null;
  1842. try {
  1843. L = w(e);
  1844. } catch (U) {
  1845. if (se("Language definition for '{}' could not be registered.".replace("{}", b)), d)
  1846. se(U);
  1847. else
  1848. throw U;
  1849. L = r;
  1850. }
  1851. L.name || (L.name = b), n[b] = L, L.rawDefinition = w.bind(null, e), L.aliases && I(L.aliases, { languageName: b });
  1852. }
  1853. function N(b) {
  1854. delete n[b];
  1855. for (const w of Object.keys(a))
  1856. a[w] === b && delete a[w];
  1857. }
  1858. function R() {
  1859. return Object.keys(n);
  1860. }
  1861. function C(b) {
  1862. return b = (b || "").toLowerCase(), n[b] || n[a[b]];
  1863. }
  1864. function I(b, { languageName: w }) {
  1865. typeof b == "string" && (b = [b]), b.forEach((L) => {
  1866. a[L.toLowerCase()] = w;
  1867. });
  1868. }
  1869. function B(b) {
  1870. const w = C(b);
  1871. return w && !w.disableAutodetect;
  1872. }
  1873. function $(b) {
  1874. b["before:highlightBlock"] && !b["before:highlightElement"] && (b["before:highlightElement"] = (w) => {
  1875. b["before:highlightBlock"](
  1876. Object.assign({ block: w.el }, w)
  1877. );
  1878. }), b["after:highlightBlock"] && !b["after:highlightElement"] && (b["after:highlightElement"] = (w) => {
  1879. b["after:highlightBlock"](
  1880. Object.assign({ block: w.el }, w)
  1881. );
  1882. });
  1883. }
  1884. function F(b) {
  1885. $(b), f.push(b);
  1886. }
  1887. function K(b) {
  1888. const w = f.indexOf(b);
  1889. w !== -1 && f.splice(w, 1);
  1890. }
  1891. function te(b, w) {
  1892. const L = b;
  1893. f.forEach(function(U) {
  1894. U[L] && U[L](w);
  1895. });
  1896. }
  1897. function le(b) {
  1898. return ce("10.7.0", "highlightBlock will be removed entirely in v12.0"), ce("10.7.0", "Please use highlightElement now."), p(b);
  1899. }
  1900. Object.assign(e, {
  1901. highlight: l,
  1902. highlightAuto: h,
  1903. highlightAll: A,
  1904. highlightElement: p,
  1905. // TODO: Remove with v12 API
  1906. highlightBlock: le,
  1907. configure: _,
  1908. initHighlighting: v,
  1909. initHighlightingOnLoad: m,
  1910. registerLanguage: S,
  1911. unregisterLanguage: N,
  1912. listLanguages: R,
  1913. getLanguage: C,
  1914. registerAliases: I,
  1915. autoDetection: B,
  1916. inherit: sn,
  1917. addPlugin: F,
  1918. removePlugin: K
  1919. }), e.debugMode = function() {
  1920. d = !1;
  1921. }, e.safeMode = function() {
  1922. d = !0;
  1923. }, e.versionString = Wt, e.regex = {
  1924. concat: ae,
  1925. lookahead: En,
  1926. either: He,
  1927. optional: ot,
  1928. anyNumberOfTimes: at
  1929. };
  1930. for (const b in Ae)
  1931. typeof Ae[b] == "object" && vn(Ae[b]);
  1932. return Object.assign(e, Ae), e;
  1933. }, fe = Cn({});
  1934. fe.newInstance = () => Cn({});
  1935. var jt = fe;
  1936. fe.HighlightJS = fe;
  1937. fe.default = fe;
  1938. const j = /* @__PURE__ */ nt(jt);
  1939. function Zt(e) {
  1940. const n = e.regex, a = n.concat(/[\p{L}_]/u, n.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), f = /[\p{L}0-9._:-]+/u, d = {
  1941. className: "symbol",
  1942. begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
  1943. }, t = {
  1944. begin: /\s/,
  1945. contains: [
  1946. {
  1947. className: "keyword",
  1948. begin: /#?[a-z_][a-z1-9_-]+/,
  1949. illegal: /\n/
  1950. }
  1951. ]
  1952. }, r = e.inherit(t, {
  1953. begin: /\(/,
  1954. end: /\)/
  1955. }), i = e.inherit(e.APOS_STRING_MODE, { className: "string" }), s = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), o = {
  1956. endsWithParent: !0,
  1957. illegal: /</,
  1958. relevance: 0,
  1959. contains: [
  1960. {
  1961. className: "attr",
  1962. begin: f,
  1963. relevance: 0
  1964. },
  1965. {
  1966. begin: /=\s*/,
  1967. relevance: 0,
  1968. contains: [
  1969. {
  1970. className: "string",
  1971. endsParent: !0,
  1972. variants: [
  1973. {
  1974. begin: /"/,
  1975. end: /"/,
  1976. contains: [d]
  1977. },
  1978. {
  1979. begin: /'/,
  1980. end: /'/,
  1981. contains: [d]
  1982. },
  1983. { begin: /[^\s"'=<>`]+/ }
  1984. ]
  1985. }
  1986. ]
  1987. }
  1988. ]
  1989. };
  1990. return {
  1991. name: "HTML, XML",
  1992. aliases: [
  1993. "html",
  1994. "xhtml",
  1995. "rss",
  1996. "atom",
  1997. "xjb",
  1998. "xsd",
  1999. "xsl",
  2000. "plist",
  2001. "wsf",
  2002. "svg"
  2003. ],
  2004. case_insensitive: !0,
  2005. unicodeRegex: !0,
  2006. contains: [
  2007. {
  2008. className: "meta",
  2009. begin: /<![a-z]/,
  2010. end: />/,
  2011. relevance: 10,
  2012. contains: [
  2013. t,
  2014. s,
  2015. i,
  2016. r,
  2017. {
  2018. begin: /\[/,
  2019. end: /\]/,
  2020. contains: [
  2021. {
  2022. className: "meta",
  2023. begin: /<![a-z]/,
  2024. end: />/,
  2025. contains: [
  2026. t,
  2027. r,
  2028. s,
  2029. i
  2030. ]
  2031. }
  2032. ]
  2033. }
  2034. ]
  2035. },
  2036. e.COMMENT(
  2037. /<!--/,
  2038. /-->/,
  2039. { relevance: 10 }
  2040. ),
  2041. {
  2042. begin: /<!\[CDATA\[/,
  2043. end: /\]\]>/,
  2044. relevance: 10
  2045. },
  2046. d,
  2047. // xml processing instructions
  2048. {
  2049. className: "meta",
  2050. end: /\?>/,
  2051. variants: [
  2052. {
  2053. begin: /<\?xml/,
  2054. relevance: 10,
  2055. contains: [
  2056. s
  2057. ]
  2058. },
  2059. {
  2060. begin: /<\?[a-z][a-z0-9]+/
  2061. }
  2062. ]
  2063. },
  2064. {
  2065. className: "tag",
  2066. /*
  2067. The lookahead pattern (?=...) ensures that 'begin' only matches
  2068. '<style' as a single word, followed by a whitespace or an
  2069. ending bracket.
  2070. */
  2071. begin: /<style(?=\s|>)/,
  2072. end: />/,
  2073. keywords: { name: "style" },
  2074. contains: [o],
  2075. starts: {
  2076. end: /<\/style>/,
  2077. returnEnd: !0,
  2078. subLanguage: [
  2079. "css",
  2080. "xml"
  2081. ]
  2082. }
  2083. },
  2084. {
  2085. className: "tag",
  2086. // See the comment in the <style tag about the lookahead pattern
  2087. begin: /<script(?=\s|>)/,
  2088. end: />/,
  2089. keywords: { name: "script" },
  2090. contains: [o],
  2091. starts: {
  2092. end: /<\/script>/,
  2093. returnEnd: !0,
  2094. subLanguage: [
  2095. "javascript",
  2096. "handlebars",
  2097. "xml"
  2098. ]
  2099. }
  2100. },
  2101. // we need this for now for jSX
  2102. {
  2103. className: "tag",
  2104. begin: /<>|<\/>/
  2105. },
  2106. // open tag
  2107. {
  2108. className: "tag",
  2109. begin: n.concat(
  2110. /</,
  2111. n.lookahead(n.concat(
  2112. a,
  2113. // <tag/>
  2114. // <tag>
  2115. // <tag ...
  2116. n.either(/\/>/, />/, /\s/)
  2117. ))
  2118. ),
  2119. end: /\/?>/,
  2120. contains: [
  2121. {
  2122. className: "name",
  2123. begin: a,
  2124. relevance: 0,
  2125. starts: o
  2126. }
  2127. ]
  2128. },
  2129. // close tag
  2130. {
  2131. className: "tag",
  2132. begin: n.concat(
  2133. /<\//,
  2134. n.lookahead(n.concat(
  2135. a,
  2136. />/
  2137. ))
  2138. ),
  2139. contains: [
  2140. {
  2141. className: "name",
  2142. begin: a,
  2143. relevance: 0
  2144. },
  2145. {
  2146. begin: />/,
  2147. relevance: 0,
  2148. endsParent: !0
  2149. }
  2150. ]
  2151. }
  2152. ]
  2153. };
  2154. }
  2155. const on = "[A-Za-z$_][0-9A-Za-z$_]*", Vt = [
  2156. "as",
  2157. // for exports
  2158. "in",
  2159. "of",
  2160. "if",
  2161. "for",
  2162. "while",
  2163. "finally",
  2164. "var",
  2165. "new",
  2166. "function",
  2167. "do",
  2168. "return",
  2169. "void",
  2170. "else",
  2171. "break",
  2172. "catch",
  2173. "instanceof",
  2174. "with",
  2175. "throw",
  2176. "case",
  2177. "default",
  2178. "try",
  2179. "switch",
  2180. "continue",
  2181. "typeof",
  2182. "delete",
  2183. "let",
  2184. "yield",
  2185. "const",
  2186. "class",
  2187. // JS handles these with a special rule
  2188. // "get",
  2189. // "set",
  2190. "debugger",
  2191. "async",
  2192. "await",
  2193. "static",
  2194. "import",
  2195. "from",
  2196. "export",
  2197. "extends"
  2198. ], Yt = [
  2199. "true",
  2200. "false",
  2201. "null",
  2202. "undefined",
  2203. "NaN",
  2204. "Infinity"
  2205. ], Rn = [
  2206. // Fundamental objects
  2207. "Object",
  2208. "Function",
  2209. "Boolean",
  2210. "Symbol",
  2211. // numbers and dates
  2212. "Math",
  2213. "Date",
  2214. "Number",
  2215. "BigInt",
  2216. // text
  2217. "String",
  2218. "RegExp",
  2219. // Indexed collections
  2220. "Array",
  2221. "Float32Array",
  2222. "Float64Array",
  2223. "Int8Array",
  2224. "Uint8Array",
  2225. "Uint8ClampedArray",
  2226. "Int16Array",
  2227. "Int32Array",
  2228. "Uint16Array",
  2229. "Uint32Array",
  2230. "BigInt64Array",
  2231. "BigUint64Array",
  2232. // Keyed collections
  2233. "Set",
  2234. "Map",
  2235. "WeakSet",
  2236. "WeakMap",
  2237. // Structured data
  2238. "ArrayBuffer",
  2239. "SharedArrayBuffer",
  2240. "Atomics",
  2241. "DataView",
  2242. "JSON",
  2243. // Control abstraction objects
  2244. "Promise",
  2245. "Generator",
  2246. "GeneratorFunction",
  2247. "AsyncFunction",
  2248. // Reflection
  2249. "Reflect",
  2250. "Proxy",
  2251. // Internationalization
  2252. "Intl",
  2253. // WebAssembly
  2254. "WebAssembly"
  2255. ], Ln = [
  2256. "Error",
  2257. "EvalError",
  2258. "InternalError",
  2259. "RangeError",
  2260. "ReferenceError",
  2261. "SyntaxError",
  2262. "TypeError",
  2263. "URIError"
  2264. ], On = [
  2265. "setInterval",
  2266. "setTimeout",
  2267. "clearInterval",
  2268. "clearTimeout",
  2269. "require",
  2270. "exports",
  2271. "eval",
  2272. "isFinite",
  2273. "isNaN",
  2274. "parseFloat",
  2275. "parseInt",
  2276. "decodeURI",
  2277. "decodeURIComponent",
  2278. "encodeURI",
  2279. "encodeURIComponent",
  2280. "escape",
  2281. "unescape"
  2282. ], Xt = [
  2283. "arguments",
  2284. "this",
  2285. "super",
  2286. "console",
  2287. "window",
  2288. "document",
  2289. "localStorage",
  2290. "sessionStorage",
  2291. "module",
  2292. "global"
  2293. // Node.js
  2294. ], Jt = [].concat(
  2295. On,
  2296. Rn,
  2297. Ln
  2298. );
  2299. function er(e) {
  2300. const n = e.regex, a = (w, { after: L }) => {
  2301. const U = "</" + w[0].slice(1);
  2302. return w.input.indexOf(U, L) !== -1;
  2303. }, f = on, d = {
  2304. begin: "<>",
  2305. end: "</>"
  2306. }, t = /<[A-Za-z0-9\\._:-]+\s*\/>/, r = {
  2307. begin: /<[A-Za-z0-9\\._:-]+/,
  2308. end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
  2309. /**
  2310. * @param {RegExpMatchArray} match
  2311. * @param {CallbackResponse} response
  2312. */
  2313. isTrulyOpeningTag: (w, L) => {
  2314. const U = w[0].length + w.index, H = w.input[U];
  2315. if (
  2316. // HTML should not include another raw `<` inside a tag
  2317. // nested type?
  2318. // `<Array<Array<number>>`, etc.
  2319. H === "<" || // the , gives away that this is not HTML
  2320. // `<T, A extends keyof T, V>`
  2321. H === ","
  2322. ) {
  2323. L.ignoreMatch();
  2324. return;
  2325. }
  2326. H === ">" && (a(w, { after: U }) || L.ignoreMatch());
  2327. let W;
  2328. const Z = w.input.substring(U);
  2329. if (W = Z.match(/^\s*=/)) {
  2330. L.ignoreMatch();
  2331. return;
  2332. }
  2333. if ((W = Z.match(/^\s+extends\s+/)) && W.index === 0) {
  2334. L.ignoreMatch();
  2335. return;
  2336. }
  2337. }
  2338. }, i = {
  2339. $pattern: on,
  2340. keyword: Vt,
  2341. literal: Yt,
  2342. built_in: Jt,
  2343. "variable.language": Xt
  2344. }, s = "[0-9](_?[0-9])*", o = `\\.(${s})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
  2345. className: "number",
  2346. variants: [
  2347. // DecimalLiteral
  2348. { begin: `(\\b(${l})((${o})|\\.)?|(${o}))[eE][+-]?(${s})\\b` },
  2349. { begin: `\\b(${l})\\b((${o})\\b|\\.)?|(${o})\\b` },
  2350. // DecimalBigIntegerLiteral
  2351. { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
  2352. // NonDecimalIntegerLiteral
  2353. { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
  2354. { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
  2355. { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
  2356. // LegacyOctalIntegerLiteral (does not include underscore separators)
  2357. // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
  2358. { begin: "\\b0[0-7]+n?\\b" }
  2359. ],
  2360. relevance: 0
  2361. }, u = {
  2362. className: "subst",
  2363. begin: "\\$\\{",
  2364. end: "\\}",
  2365. keywords: i,
  2366. contains: []
  2367. // defined later
  2368. }, h = {
  2369. begin: "html`",
  2370. end: "",
  2371. starts: {
  2372. end: "`",
  2373. returnEnd: !1,
  2374. contains: [
  2375. e.BACKSLASH_ESCAPE,
  2376. u
  2377. ],
  2378. subLanguage: "xml"
  2379. }
  2380. }, g = {
  2381. begin: "css`",
  2382. end: "",
  2383. starts: {
  2384. end: "`",
  2385. returnEnd: !1,
  2386. contains: [
  2387. e.BACKSLASH_ESCAPE,
  2388. u
  2389. ],
  2390. subLanguage: "css"
  2391. }
  2392. }, p = {
  2393. begin: "gql`",
  2394. end: "",
  2395. starts: {
  2396. end: "`",
  2397. returnEnd: !1,
  2398. contains: [
  2399. e.BACKSLASH_ESCAPE,
  2400. u
  2401. ],
  2402. subLanguage: "graphql"
  2403. }
  2404. }, _ = {
  2405. className: "string",
  2406. begin: "`",
  2407. end: "`",
  2408. contains: [
  2409. e.BACKSLASH_ESCAPE,
  2410. u
  2411. ]
  2412. }, m = {
  2413. className: "comment",
  2414. variants: [
  2415. e.COMMENT(
  2416. /\/\*\*(?!\/)/,
  2417. "\\*/",
  2418. {
  2419. relevance: 0,
  2420. contains: [
  2421. {
  2422. begin: "(?=@[A-Za-z]+)",
  2423. relevance: 0,
  2424. contains: [
  2425. {
  2426. className: "doctag",
  2427. begin: "@[A-Za-z]+"
  2428. },
  2429. {
  2430. className: "type",
  2431. begin: "\\{",
  2432. end: "\\}",
  2433. excludeEnd: !0,
  2434. excludeBegin: !0,
  2435. relevance: 0
  2436. },
  2437. {
  2438. className: "variable",
  2439. begin: f + "(?=\\s*(-)|$)",
  2440. endsParent: !0,
  2441. relevance: 0
  2442. },
  2443. // eat spaces (not newlines) so we can find
  2444. // types or variables
  2445. {
  2446. begin: /(?=[^\n])\s/,
  2447. relevance: 0
  2448. }
  2449. ]
  2450. }
  2451. ]
  2452. }
  2453. ),
  2454. e.C_BLOCK_COMMENT_MODE,
  2455. e.C_LINE_COMMENT_MODE
  2456. ]
  2457. }, E = [
  2458. e.APOS_STRING_MODE,
  2459. e.QUOTE_STRING_MODE,
  2460. h,
  2461. g,
  2462. p,
  2463. _,
  2464. // Skip numbers when they are part of a variable name
  2465. { match: /\$\d+/ },
  2466. c
  2467. // This is intentional:
  2468. // See https://github.com/highlightjs/highlight.js/issues/3288
  2469. // hljs.REGEXP_MODE
  2470. ];
  2471. u.contains = E.concat({
  2472. // we need to pair up {} inside our subst to prevent
  2473. // it from ending too early by matching another }
  2474. begin: /\{/,
  2475. end: /\}/,
  2476. keywords: i,
  2477. contains: [
  2478. "self"
  2479. ].concat(E)
  2480. });
  2481. const A = [].concat(m, u.contains), D = A.concat([
  2482. // eat recursive parens in sub expressions
  2483. {
  2484. begin: /\(/,
  2485. end: /\)/,
  2486. keywords: i,
  2487. contains: ["self"].concat(A)
  2488. }
  2489. ]), S = {
  2490. className: "params",
  2491. begin: /\(/,
  2492. end: /\)/,
  2493. excludeBegin: !0,
  2494. excludeEnd: !0,
  2495. keywords: i,
  2496. contains: D
  2497. }, N = {
  2498. variants: [
  2499. // class Car extends vehicle
  2500. {
  2501. match: [
  2502. /class/,
  2503. /\s+/,
  2504. f,
  2505. /\s+/,
  2506. /extends/,
  2507. /\s+/,
  2508. n.concat(f, "(", n.concat(/\./, f), ")*")
  2509. ],
  2510. scope: {
  2511. 1: "keyword",
  2512. 3: "title.class",
  2513. 5: "keyword",
  2514. 7: "title.class.inherited"
  2515. }
  2516. },
  2517. // class Car
  2518. {
  2519. match: [
  2520. /class/,
  2521. /\s+/,
  2522. f
  2523. ],
  2524. scope: {
  2525. 1: "keyword",
  2526. 3: "title.class"
  2527. }
  2528. }
  2529. ]
  2530. }, R = {
  2531. relevance: 0,
  2532. match: n.either(
  2533. // Hard coded exceptions
  2534. /\bJSON/,
  2535. // Float32Array, OutT
  2536. /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,
  2537. // CSSFactory, CSSFactoryT
  2538. /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,
  2539. // FPs, FPsT
  2540. /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/
  2541. // P
  2542. // single letters are not highlighted
  2543. // BLAH
  2544. // this will be flagged as a UPPER_CASE_CONSTANT instead
  2545. ),
  2546. className: "title.class",
  2547. keywords: {
  2548. _: [
  2549. // se we still get relevance credit for JS library classes
  2550. ...Rn,
  2551. ...Ln
  2552. ]
  2553. }
  2554. }, C = {
  2555. label: "use_strict",
  2556. className: "meta",
  2557. relevance: 10,
  2558. begin: /^\s*['"]use (strict|asm)['"]/
  2559. }, I = {
  2560. variants: [
  2561. {
  2562. match: [
  2563. /function/,
  2564. /\s+/,
  2565. f,
  2566. /(?=\s*\()/
  2567. ]
  2568. },
  2569. // anonymous function
  2570. {
  2571. match: [
  2572. /function/,
  2573. /\s*(?=\()/
  2574. ]
  2575. }
  2576. ],
  2577. className: {
  2578. 1: "keyword",
  2579. 3: "title.function"
  2580. },
  2581. label: "func.def",
  2582. contains: [S],
  2583. illegal: /%/
  2584. }, B = {
  2585. relevance: 0,
  2586. match: /\b[A-Z][A-Z_0-9]+\b/,
  2587. className: "variable.constant"
  2588. };
  2589. function $(w) {
  2590. return n.concat("(?!", w.join("|"), ")");
  2591. }
  2592. const F = {
  2593. match: n.concat(
  2594. /\b/,
  2595. $([
  2596. ...On,
  2597. "super",
  2598. "import"
  2599. ]),
  2600. f,
  2601. n.lookahead(/\(/)
  2602. ),
  2603. className: "title.function",
  2604. relevance: 0
  2605. }, K = {
  2606. begin: n.concat(/\./, n.lookahead(
  2607. n.concat(f, /(?![0-9A-Za-z$_(])/)
  2608. )),
  2609. end: f,
  2610. excludeBegin: !0,
  2611. keywords: "prototype",
  2612. className: "property",
  2613. relevance: 0
  2614. }, te = {
  2615. match: [
  2616. /get|set/,
  2617. /\s+/,
  2618. f,
  2619. /(?=\()/
  2620. ],
  2621. className: {
  2622. 1: "keyword",
  2623. 3: "title.function"
  2624. },
  2625. contains: [
  2626. {
  2627. // eat to avoid empty params
  2628. begin: /\(\)/
  2629. },
  2630. S
  2631. ]
  2632. }, le = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", b = {
  2633. match: [
  2634. /const|var|let/,
  2635. /\s+/,
  2636. f,
  2637. /\s*/,
  2638. /=\s*/,
  2639. /(async\s*)?/,
  2640. // async is optional
  2641. n.lookahead(le)
  2642. ],
  2643. keywords: "async",
  2644. className: {
  2645. 1: "keyword",
  2646. 3: "title.function"
  2647. },
  2648. contains: [
  2649. S
  2650. ]
  2651. };
  2652. return {
  2653. name: "JavaScript",
  2654. aliases: ["js", "jsx", "mjs", "cjs"],
  2655. keywords: i,
  2656. // this will be extended by TypeScript
  2657. exports: { PARAMS_CONTAINS: D, CLASS_REFERENCE: R },
  2658. illegal: /#(?![$_A-z])/,
  2659. contains: [
  2660. e.SHEBANG({
  2661. label: "shebang",
  2662. binary: "node",
  2663. relevance: 5
  2664. }),
  2665. C,
  2666. e.APOS_STRING_MODE,
  2667. e.QUOTE_STRING_MODE,
  2668. h,
  2669. g,
  2670. p,
  2671. _,
  2672. m,
  2673. // Skip numbers when they are part of a variable name
  2674. { match: /\$\d+/ },
  2675. c,
  2676. R,
  2677. {
  2678. className: "attr",
  2679. begin: f + n.lookahead(":"),
  2680. relevance: 0
  2681. },
  2682. b,
  2683. {
  2684. // "value" container
  2685. begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
  2686. keywords: "return throw case",
  2687. relevance: 0,
  2688. contains: [
  2689. m,
  2690. e.REGEXP_MODE,
  2691. {
  2692. className: "function",
  2693. // we have to count the parens to make sure we actually have the
  2694. // correct bounding ( ) before the =>. There could be any number of
  2695. // sub-expressions inside also surrounded by parens.
  2696. begin: le,
  2697. returnBegin: !0,
  2698. end: "\\s*=>",
  2699. contains: [
  2700. {
  2701. className: "params",
  2702. variants: [
  2703. {
  2704. begin: e.UNDERSCORE_IDENT_RE,
  2705. relevance: 0
  2706. },
  2707. {
  2708. className: null,
  2709. begin: /\(\s*\)/,
  2710. skip: !0
  2711. },
  2712. {
  2713. begin: /\(/,
  2714. end: /\)/,
  2715. excludeBegin: !0,
  2716. excludeEnd: !0,
  2717. keywords: i,
  2718. contains: D
  2719. }
  2720. ]
  2721. }
  2722. ]
  2723. },
  2724. {
  2725. // could be a comma delimited list of params to a function call
  2726. begin: /,/,
  2727. relevance: 0
  2728. },
  2729. {
  2730. match: /\s+/,
  2731. relevance: 0
  2732. },
  2733. {
  2734. // JSX
  2735. variants: [
  2736. { begin: d.begin, end: d.end },
  2737. { match: t },
  2738. {
  2739. begin: r.begin,
  2740. // we carefully check the opening tag to see if it truly
  2741. // is a tag and not a false positive
  2742. "on:begin": r.isTrulyOpeningTag,
  2743. end: r.end
  2744. }
  2745. ],
  2746. subLanguage: "xml",
  2747. contains: [
  2748. {
  2749. begin: r.begin,
  2750. end: r.end,
  2751. skip: !0,
  2752. contains: ["self"]
  2753. }
  2754. ]
  2755. }
  2756. ]
  2757. },
  2758. I,
  2759. {
  2760. // prevent this from getting swallowed up by function
  2761. // since they appear "function like"
  2762. beginKeywords: "while if switch catch for"
  2763. },
  2764. {
  2765. // we have to count the parens to make sure we actually have the correct
  2766. // bounding ( ). There could be any number of sub-expressions inside
  2767. // also surrounded by parens.
  2768. begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
  2769. // end parens
  2770. returnBegin: !0,
  2771. label: "func.def",
  2772. contains: [
  2773. S,
  2774. e.inherit(e.TITLE_MODE, { begin: f, className: "title.function" })
  2775. ]
  2776. },
  2777. // catch ... so it won't trigger the property rule below
  2778. {
  2779. match: /\.\.\./,
  2780. relevance: 0
  2781. },
  2782. K,
  2783. // hack: prevents detection of keywords in some circumstances
  2784. // .keyword()
  2785. // $keyword = x
  2786. {
  2787. match: "\\$" + f,
  2788. relevance: 0
  2789. },
  2790. {
  2791. match: [/\bconstructor(?=\s*\()/],
  2792. className: { 1: "title.function" },
  2793. contains: [S]
  2794. },
  2795. F,
  2796. B,
  2797. N,
  2798. te,
  2799. {
  2800. match: /\$[(.]/
  2801. // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
  2802. }
  2803. ]
  2804. };
  2805. }
  2806. function nr(e) {
  2807. const n = {
  2808. className: "attr",
  2809. begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
  2810. relevance: 1.01
  2811. }, a = {
  2812. match: /[{}[\],:]/,
  2813. className: "punctuation",
  2814. relevance: 0
  2815. }, f = [
  2816. "true",
  2817. "false",
  2818. "null"
  2819. ], d = {
  2820. scope: "literal",
  2821. beginKeywords: f.join(" ")
  2822. };
  2823. return {
  2824. name: "JSON",
  2825. keywords: {
  2826. literal: f
  2827. },
  2828. contains: [
  2829. n,
  2830. a,
  2831. e.QUOTE_STRING_MODE,
  2832. d,
  2833. e.C_NUMBER_MODE,
  2834. e.C_LINE_COMMENT_MODE,
  2835. e.C_BLOCK_COMMENT_MODE
  2836. ],
  2837. illegal: "\\S"
  2838. };
  2839. }
  2840. function tr(e) {
  2841. const n = "true false yes no null", a = "[\\w#;/?:@&=+$,.~*'()[\\]]+", f = {
  2842. className: "attr",
  2843. variants: [
  2844. { begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
  2845. {
  2846. // double quoted keys
  2847. begin: '"\\w[\\w :\\/.-]*":(?=[ ]|$)'
  2848. },
  2849. {
  2850. // single quoted keys
  2851. begin: "'\\w[\\w :\\/.-]*':(?=[ ]|$)"
  2852. }
  2853. ]
  2854. }, d = {
  2855. className: "template-variable",
  2856. variants: [
  2857. {
  2858. // jinja templates Ansible
  2859. begin: /\{\{/,
  2860. end: /\}\}/
  2861. },
  2862. {
  2863. // Ruby i18n
  2864. begin: /%\{/,
  2865. end: /\}/
  2866. }
  2867. ]
  2868. }, t = {
  2869. className: "string",
  2870. relevance: 0,
  2871. variants: [
  2872. {
  2873. begin: /'/,
  2874. end: /'/
  2875. },
  2876. {
  2877. begin: /"/,
  2878. end: /"/
  2879. },
  2880. { begin: /\S+/ }
  2881. ],
  2882. contains: [
  2883. e.BACKSLASH_ESCAPE,
  2884. d
  2885. ]
  2886. }, r = e.inherit(t, { variants: [
  2887. {
  2888. begin: /'/,
  2889. end: /'/
  2890. },
  2891. {
  2892. begin: /"/,
  2893. end: /"/
  2894. },
  2895. { begin: /[^\s,{}[\]]+/ }
  2896. ] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", s = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", o = "(\\.[0-9]*)?", l = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", c = {
  2897. className: "number",
  2898. begin: "\\b" + i + s + o + l + "\\b"
  2899. }, u = {
  2900. end: ",",
  2901. endsWithParent: !0,
  2902. excludeEnd: !0,
  2903. keywords: n,
  2904. relevance: 0
  2905. }, h = {
  2906. begin: /\{/,
  2907. end: /\}/,
  2908. contains: [u],
  2909. illegal: "\\n",
  2910. relevance: 0
  2911. }, g = {
  2912. begin: "\\[",
  2913. end: "\\]",
  2914. contains: [u],
  2915. illegal: "\\n",
  2916. relevance: 0
  2917. }, p = [
  2918. f,
  2919. {
  2920. className: "meta",
  2921. begin: "^---\\s*$",
  2922. relevance: 10
  2923. },
  2924. {
  2925. // multi line string
  2926. // Blocks start with a | or > followed by a newline
  2927. //
  2928. // Indentation of subsequent lines must be the same to
  2929. // be considered part of the block
  2930. className: "string",
  2931. begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"
  2932. },
  2933. {
  2934. // Ruby/Rails erb
  2935. begin: "<%[%=-]?",
  2936. end: "[%-]?%>",
  2937. subLanguage: "ruby",
  2938. excludeBegin: !0,
  2939. excludeEnd: !0,
  2940. relevance: 0
  2941. },
  2942. {
  2943. // named tags
  2944. className: "type",
  2945. begin: "!\\w+!" + a
  2946. },
  2947. // https://yaml.org/spec/1.2/spec.html#id2784064
  2948. {
  2949. // verbatim tags
  2950. className: "type",
  2951. begin: "!<" + a + ">"
  2952. },
  2953. {
  2954. // primary tags
  2955. className: "type",
  2956. begin: "!" + a
  2957. },
  2958. {
  2959. // secondary tags
  2960. className: "type",
  2961. begin: "!!" + a
  2962. },
  2963. {
  2964. // fragment id &ref
  2965. className: "meta",
  2966. begin: "&" + e.UNDERSCORE_IDENT_RE + "$"
  2967. },
  2968. {
  2969. // fragment reference *ref
  2970. className: "meta",
  2971. begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$"
  2972. },
  2973. {
  2974. // array listing
  2975. className: "bullet",
  2976. // TODO: remove |$ hack when we have proper look-ahead support
  2977. begin: "-(?=[ ]|$)",
  2978. relevance: 0
  2979. },
  2980. e.HASH_COMMENT_MODE,
  2981. {
  2982. beginKeywords: n,
  2983. keywords: { literal: n }
  2984. },
  2985. c,
  2986. // numbers are any valid C-style number that
  2987. // sit isolated from other words
  2988. {
  2989. className: "number",
  2990. begin: e.C_NUMBER_RE + "\\b",
  2991. relevance: 0
  2992. },
  2993. h,
  2994. g,
  2995. t
  2996. ], _ = [...p];
  2997. return _.pop(), _.push(r), u.contains = _, {
  2998. name: "YAML",
  2999. case_insensitive: !0,
  3000. aliases: ["yml"],
  3001. contains: p
  3002. };
  3003. }
  3004. function rr(e) {
  3005. return {
  3006. name: "Plain text",
  3007. aliases: [
  3008. "text",
  3009. "txt"
  3010. ],
  3011. disableAutodetect: !0
  3012. };
  3013. }
  3014. function ir(e) {
  3015. const n = e.regex, a = /[\p{XID_Start}_]\p{XID_Continue}*/u, f = [
  3016. "and",
  3017. "as",
  3018. "assert",
  3019. "async",
  3020. "await",
  3021. "break",
  3022. "case",
  3023. "class",
  3024. "continue",
  3025. "def",
  3026. "del",
  3027. "elif",
  3028. "else",
  3029. "except",
  3030. "finally",
  3031. "for",
  3032. "from",
  3033. "global",
  3034. "if",
  3035. "import",
  3036. "in",
  3037. "is",
  3038. "lambda",
  3039. "match",
  3040. "nonlocal|10",
  3041. "not",
  3042. "or",
  3043. "pass",
  3044. "raise",
  3045. "return",
  3046. "try",
  3047. "while",
  3048. "with",
  3049. "yield"
  3050. ], i = {
  3051. $pattern: /[A-Za-z]\w+|__\w+__/,
  3052. keyword: f,
  3053. built_in: [
  3054. "__import__",
  3055. "abs",
  3056. "all",
  3057. "any",
  3058. "ascii",
  3059. "bin",
  3060. "bool",
  3061. "breakpoint",
  3062. "bytearray",
  3063. "bytes",
  3064. "callable",
  3065. "chr",
  3066. "classmethod",
  3067. "compile",
  3068. "complex",
  3069. "delattr",
  3070. "dict",
  3071. "dir",
  3072. "divmod",
  3073. "enumerate",
  3074. "eval",
  3075. "exec",
  3076. "filter",
  3077. "float",
  3078. "format",
  3079. "frozenset",
  3080. "getattr",
  3081. "globals",
  3082. "hasattr",
  3083. "hash",
  3084. "help",
  3085. "hex",
  3086. "id",
  3087. "input",
  3088. "int",
  3089. "isinstance",
  3090. "issubclass",
  3091. "iter",
  3092. "len",
  3093. "list",
  3094. "locals",
  3095. "map",
  3096. "max",
  3097. "memoryview",
  3098. "min",
  3099. "next",
  3100. "object",
  3101. "oct",
  3102. "open",
  3103. "ord",
  3104. "pow",
  3105. "print",
  3106. "property",
  3107. "range",
  3108. "repr",
  3109. "reversed",
  3110. "round",
  3111. "set",
  3112. "setattr",
  3113. "slice",
  3114. "sorted",
  3115. "staticmethod",
  3116. "str",
  3117. "sum",
  3118. "super",
  3119. "tuple",
  3120. "type",
  3121. "vars",
  3122. "zip"
  3123. ],
  3124. literal: [
  3125. "__debug__",
  3126. "Ellipsis",
  3127. "False",
  3128. "None",
  3129. "NotImplemented",
  3130. "True"
  3131. ],
  3132. type: [
  3133. "Any",
  3134. "Callable",
  3135. "Coroutine",
  3136. "Dict",
  3137. "List",
  3138. "Literal",
  3139. "Generic",
  3140. "Optional",
  3141. "Sequence",
  3142. "Set",
  3143. "Tuple",
  3144. "Type",
  3145. "Union"
  3146. ]
  3147. }, s = {
  3148. className: "meta",
  3149. begin: /^(>>>|\.\.\.) /
  3150. }, o = {
  3151. className: "subst",
  3152. begin: /\{/,
  3153. end: /\}/,
  3154. keywords: i,
  3155. illegal: /#/
  3156. }, l = {
  3157. begin: /\{\{/,
  3158. relevance: 0
  3159. }, c = {
  3160. className: "string",
  3161. contains: [e.BACKSLASH_ESCAPE],
  3162. variants: [
  3163. {
  3164. begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
  3165. end: /'''/,
  3166. contains: [
  3167. e.BACKSLASH_ESCAPE,
  3168. s
  3169. ],
  3170. relevance: 10
  3171. },
  3172. {
  3173. begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
  3174. end: /"""/,
  3175. contains: [
  3176. e.BACKSLASH_ESCAPE,
  3177. s
  3178. ],
  3179. relevance: 10
  3180. },
  3181. {
  3182. begin: /([fF][rR]|[rR][fF]|[fF])'''/,
  3183. end: /'''/,
  3184. contains: [
  3185. e.BACKSLASH_ESCAPE,
  3186. s,
  3187. l,
  3188. o
  3189. ]
  3190. },
  3191. {
  3192. begin: /([fF][rR]|[rR][fF]|[fF])"""/,
  3193. end: /"""/,
  3194. contains: [
  3195. e.BACKSLASH_ESCAPE,
  3196. s,
  3197. l,
  3198. o
  3199. ]
  3200. },
  3201. {
  3202. begin: /([uU]|[rR])'/,
  3203. end: /'/,
  3204. relevance: 10
  3205. },
  3206. {
  3207. begin: /([uU]|[rR])"/,
  3208. end: /"/,
  3209. relevance: 10
  3210. },
  3211. {
  3212. begin: /([bB]|[bB][rR]|[rR][bB])'/,
  3213. end: /'/
  3214. },
  3215. {
  3216. begin: /([bB]|[bB][rR]|[rR][bB])"/,
  3217. end: /"/
  3218. },
  3219. {
  3220. begin: /([fF][rR]|[rR][fF]|[fF])'/,
  3221. end: /'/,
  3222. contains: [
  3223. e.BACKSLASH_ESCAPE,
  3224. l,
  3225. o
  3226. ]
  3227. },
  3228. {
  3229. begin: /([fF][rR]|[rR][fF]|[fF])"/,
  3230. end: /"/,
  3231. contains: [
  3232. e.BACKSLASH_ESCAPE,
  3233. l,
  3234. o
  3235. ]
  3236. },
  3237. e.APOS_STRING_MODE,
  3238. e.QUOTE_STRING_MODE
  3239. ]
  3240. }, u = "[0-9](_?[0-9])*", h = `(\\b(${u}))?\\.(${u})|\\b(${u})\\.`, g = `\\b|${f.join("|")}`, p = {
  3241. className: "number",
  3242. relevance: 0,
  3243. variants: [
  3244. // exponentfloat, pointfloat
  3245. // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
  3246. // optionally imaginary
  3247. // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
  3248. // Note: no leading \b because floats can start with a decimal point
  3249. // and we don't want to mishandle e.g. `fn(.5)`,
  3250. // no trailing \b for pointfloat because it can end with a decimal point
  3251. // and we don't want to mishandle e.g. `0..hex()`; this should be safe
  3252. // because both MUST contain a decimal point and so cannot be confused with
  3253. // the interior part of an identifier
  3254. {
  3255. begin: `(\\b(${u})|(${h}))[eE][+-]?(${u})[jJ]?(?=${g})`
  3256. },
  3257. {
  3258. begin: `(${h})[jJ]?`
  3259. },
  3260. // decinteger, bininteger, octinteger, hexinteger
  3261. // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
  3262. // optionally "long" in Python 2
  3263. // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
  3264. // decinteger is optionally imaginary
  3265. // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
  3266. {
  3267. begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`
  3268. },
  3269. {
  3270. begin: `\\b0[bB](_?[01])+[lL]?(?=${g})`
  3271. },
  3272. {
  3273. begin: `\\b0[oO](_?[0-7])+[lL]?(?=${g})`
  3274. },
  3275. {
  3276. begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`
  3277. },
  3278. // imagnumber (digitpart-based)
  3279. // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
  3280. {
  3281. begin: `\\b(${u})[jJ](?=${g})`
  3282. }
  3283. ]
  3284. }, _ = {
  3285. className: "comment",
  3286. begin: n.lookahead(/# type:/),
  3287. end: /$/,
  3288. keywords: i,
  3289. contains: [
  3290. {
  3291. // prevent keywords from coloring `type`
  3292. begin: /# type:/
  3293. },
  3294. // comment within a datatype comment includes no keywords
  3295. {
  3296. begin: /#/,
  3297. end: /\b\B/,
  3298. endsWithParent: !0
  3299. }
  3300. ]
  3301. }, v = {
  3302. className: "params",
  3303. variants: [
  3304. // Exclude params in functions without params
  3305. {
  3306. className: "",
  3307. begin: /\(\s*\)/,
  3308. skip: !0
  3309. },
  3310. {
  3311. begin: /\(/,
  3312. end: /\)/,
  3313. excludeBegin: !0,
  3314. excludeEnd: !0,
  3315. keywords: i,
  3316. contains: [
  3317. "self",
  3318. s,
  3319. p,
  3320. c,
  3321. e.HASH_COMMENT_MODE
  3322. ]
  3323. }
  3324. ]
  3325. };
  3326. return o.contains = [
  3327. c,
  3328. p,
  3329. s
  3330. ], {
  3331. name: "Python",
  3332. aliases: [
  3333. "py",
  3334. "gyp",
  3335. "ipython"
  3336. ],
  3337. unicodeRegex: !0,
  3338. keywords: i,
  3339. illegal: /(<\/|\?)|=>/,
  3340. contains: [
  3341. s,
  3342. p,
  3343. {
  3344. // very common convention
  3345. begin: /\bself\b/
  3346. },
  3347. {
  3348. // eat "if" prior to string so that it won't accidentally be
  3349. // labeled as an f-string
  3350. beginKeywords: "if",
  3351. relevance: 0
  3352. },
  3353. c,
  3354. _,
  3355. e.HASH_COMMENT_MODE,
  3356. {
  3357. match: [
  3358. /\bdef/,
  3359. /\s+/,
  3360. a
  3361. ],
  3362. scope: {
  3363. 1: "keyword",
  3364. 3: "title.function"
  3365. },
  3366. contains: [v]
  3367. },
  3368. {
  3369. variants: [
  3370. {
  3371. match: [
  3372. /\bclass/,
  3373. /\s+/,
  3374. a,
  3375. /\s*/,
  3376. /\(\s*/,
  3377. a,
  3378. /\s*\)/
  3379. ]
  3380. },
  3381. {
  3382. match: [
  3383. /\bclass/,
  3384. /\s+/,
  3385. a
  3386. ]
  3387. }
  3388. ],
  3389. scope: {
  3390. 1: "keyword",
  3391. 3: "title.class",
  3392. 6: "title.class.inherited"
  3393. }
  3394. },
  3395. {
  3396. className: "meta",
  3397. begin: /^[\t ]*@/,
  3398. end: /(?=#)|$/,
  3399. contains: [
  3400. p,
  3401. v,
  3402. c
  3403. ]
  3404. }
  3405. ]
  3406. };
  3407. }
  3408. var ue = "[0-9](_*[0-9])*", Ne = `\\.(${ue})`, Me = "[0-9a-fA-F](_*[0-9a-fA-F])*", ln = {
  3409. className: "number",
  3410. variants: [
  3411. // DecimalFloatingPointLiteral
  3412. // including ExponentPart
  3413. { begin: `(\\b(${ue})((${Ne})|\\.)?|(${Ne}))[eE][+-]?(${ue})[fFdD]?\\b` },
  3414. // excluding ExponentPart
  3415. { begin: `\\b(${ue})((${Ne})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
  3416. { begin: `(${Ne})[fFdD]?\\b` },
  3417. { begin: `\\b(${ue})[fFdD]\\b` },
  3418. // HexadecimalFloatingPointLiteral
  3419. { begin: `\\b0[xX]((${Me})\\.?|(${Me})?\\.(${Me}))[pP][+-]?(${ue})[fFdD]?\\b` },
  3420. // DecimalIntegerLiteral
  3421. { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
  3422. // HexIntegerLiteral
  3423. { begin: `\\b0[xX](${Me})[lL]?\\b` },
  3424. // OctalIntegerLiteral
  3425. { begin: "\\b0(_*[0-7])*[lL]?\\b" },
  3426. // BinaryIntegerLiteral
  3427. { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
  3428. ],
  3429. relevance: 0
  3430. };
  3431. function In(e, n, a) {
  3432. return a === -1 ? "" : e.replace(n, (f) => In(e, n, a - 1));
  3433. }
  3434. function sr(e) {
  3435. const n = e.regex, a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", f = a + In("(?:<" + a + "~~~(?:\\s*,\\s*" + a + "~~~)*>)?", /~~~/g, 2), s = {
  3436. keyword: [
  3437. "synchronized",
  3438. "abstract",
  3439. "private",
  3440. "var",
  3441. "static",
  3442. "if",
  3443. "const ",
  3444. "for",
  3445. "while",
  3446. "strictfp",
  3447. "finally",
  3448. "protected",
  3449. "import",
  3450. "native",
  3451. "final",
  3452. "void",
  3453. "enum",
  3454. "else",
  3455. "break",
  3456. "transient",
  3457. "catch",
  3458. "instanceof",
  3459. "volatile",
  3460. "case",
  3461. "assert",
  3462. "package",
  3463. "default",
  3464. "public",
  3465. "try",
  3466. "switch",
  3467. "continue",
  3468. "throws",
  3469. "protected",
  3470. "public",
  3471. "private",
  3472. "module",
  3473. "requires",
  3474. "exports",
  3475. "do",
  3476. "sealed",
  3477. "yield",
  3478. "permits"
  3479. ],
  3480. literal: [
  3481. "false",
  3482. "true",
  3483. "null"
  3484. ],
  3485. type: [
  3486. "char",
  3487. "boolean",
  3488. "long",
  3489. "float",
  3490. "int",
  3491. "byte",
  3492. "short",
  3493. "double"
  3494. ],
  3495. built_in: [
  3496. "super",
  3497. "this"
  3498. ]
  3499. }, o = {
  3500. className: "meta",
  3501. begin: "@" + a,
  3502. contains: [
  3503. {
  3504. begin: /\(/,
  3505. end: /\)/,
  3506. contains: ["self"]
  3507. // allow nested () inside our annotation
  3508. }
  3509. ]
  3510. }, l = {
  3511. className: "params",
  3512. begin: /\(/,
  3513. end: /\)/,
  3514. keywords: s,
  3515. relevance: 0,
  3516. contains: [e.C_BLOCK_COMMENT_MODE],
  3517. endsParent: !0
  3518. };
  3519. return {
  3520. name: "Java",
  3521. aliases: ["jsp"],
  3522. keywords: s,
  3523. illegal: /<\/|#/,
  3524. contains: [
  3525. e.COMMENT(
  3526. "/\\*\\*",
  3527. "\\*/",
  3528. {
  3529. relevance: 0,
  3530. contains: [
  3531. {
  3532. // eat up @'s in emails to prevent them to be recognized as doctags
  3533. begin: /\w+@/,
  3534. relevance: 0
  3535. },
  3536. {
  3537. className: "doctag",
  3538. begin: "@[A-Za-z]+"
  3539. }
  3540. ]
  3541. }
  3542. ),
  3543. // relevance boost
  3544. {
  3545. begin: /import java\.[a-z]+\./,
  3546. keywords: "import",
  3547. relevance: 2
  3548. },
  3549. e.C_LINE_COMMENT_MODE,
  3550. e.C_BLOCK_COMMENT_MODE,
  3551. {
  3552. begin: /"""/,
  3553. end: /"""/,
  3554. className: "string",
  3555. contains: [e.BACKSLASH_ESCAPE]
  3556. },
  3557. e.APOS_STRING_MODE,
  3558. e.QUOTE_STRING_MODE,
  3559. {
  3560. match: [
  3561. /\b(?:class|interface|enum|extends|implements|new)/,
  3562. /\s+/,
  3563. a
  3564. ],
  3565. className: {
  3566. 1: "keyword",
  3567. 3: "title.class"
  3568. }
  3569. },
  3570. {
  3571. // Exceptions for hyphenated keywords
  3572. match: /non-sealed/,
  3573. scope: "keyword"
  3574. },
  3575. {
  3576. begin: [
  3577. n.concat(/(?!else)/, a),
  3578. /\s+/,
  3579. a,
  3580. /\s+/,
  3581. /=(?!=)/
  3582. ],
  3583. className: {
  3584. 1: "type",
  3585. 3: "variable",
  3586. 5: "operator"
  3587. }
  3588. },
  3589. {
  3590. begin: [
  3591. /record/,
  3592. /\s+/,
  3593. a
  3594. ],
  3595. className: {
  3596. 1: "keyword",
  3597. 3: "title.class"
  3598. },
  3599. contains: [
  3600. l,
  3601. e.C_LINE_COMMENT_MODE,
  3602. e.C_BLOCK_COMMENT_MODE
  3603. ]
  3604. },
  3605. {
  3606. // Expression keywords prevent 'keyword Name(...)' from being
  3607. // recognized as a function definition
  3608. beginKeywords: "new throw return else",
  3609. relevance: 0
  3610. },
  3611. {
  3612. begin: [
  3613. "(?:" + f + "\\s+)",
  3614. e.UNDERSCORE_IDENT_RE,
  3615. /\s*(?=\()/
  3616. ],
  3617. className: { 2: "title.function" },
  3618. keywords: s,
  3619. contains: [
  3620. {
  3621. className: "params",
  3622. begin: /\(/,
  3623. end: /\)/,
  3624. keywords: s,
  3625. relevance: 0,
  3626. contains: [
  3627. o,
  3628. e.APOS_STRING_MODE,
  3629. e.QUOTE_STRING_MODE,
  3630. ln,
  3631. e.C_BLOCK_COMMENT_MODE
  3632. ]
  3633. },
  3634. e.C_LINE_COMMENT_MODE,
  3635. e.C_BLOCK_COMMENT_MODE
  3636. ]
  3637. },
  3638. ln,
  3639. o
  3640. ]
  3641. };
  3642. }
  3643. function ar(e) {
  3644. const n = e.regex, a = {}, f = {
  3645. begin: /\$\{/,
  3646. end: /\}/,
  3647. contains: [
  3648. "self",
  3649. {
  3650. begin: /:-/,
  3651. contains: [a]
  3652. }
  3653. // default values
  3654. ]
  3655. };
  3656. Object.assign(a, {
  3657. className: "variable",
  3658. variants: [
  3659. { begin: n.concat(
  3660. /\$[\w\d#@][\w\d_]*/,
  3661. // negative look-ahead tries to avoid matching patterns that are not
  3662. // Perl at all like $ident$, @ident@, etc.
  3663. "(?![\\w\\d])(?![$])"
  3664. ) },
  3665. f
  3666. ]
  3667. });
  3668. const d = {
  3669. className: "subst",
  3670. begin: /\$\(/,
  3671. end: /\)/,
  3672. contains: [e.BACKSLASH_ESCAPE]
  3673. }, t = {
  3674. begin: /<<-?\s*(?=\w+)/,
  3675. starts: { contains: [
  3676. e.END_SAME_AS_BEGIN({
  3677. begin: /(\w+)/,
  3678. end: /(\w+)/,
  3679. className: "string"
  3680. })
  3681. ] }
  3682. }, r = {
  3683. className: "string",
  3684. begin: /"/,
  3685. end: /"/,
  3686. contains: [
  3687. e.BACKSLASH_ESCAPE,
  3688. a,
  3689. d
  3690. ]
  3691. };
  3692. d.contains.push(r);
  3693. const i = {
  3694. match: /\\"/
  3695. }, s = {
  3696. className: "string",
  3697. begin: /'/,
  3698. end: /'/
  3699. }, o = {
  3700. match: /\\'/
  3701. }, l = {
  3702. begin: /\$?\(\(/,
  3703. end: /\)\)/,
  3704. contains: [
  3705. {
  3706. begin: /\d+#[0-9a-f]+/,
  3707. className: "number"
  3708. },
  3709. e.NUMBER_MODE,
  3710. a
  3711. ]
  3712. }, c = [
  3713. "fish",
  3714. "bash",
  3715. "zsh",
  3716. "sh",
  3717. "csh",
  3718. "ksh",
  3719. "tcsh",
  3720. "dash",
  3721. "scsh"
  3722. ], u = e.SHEBANG({
  3723. binary: `(${c.join("|")})`,
  3724. relevance: 10
  3725. }), h = {
  3726. className: "function",
  3727. begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
  3728. returnBegin: !0,
  3729. contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
  3730. relevance: 0
  3731. }, g = [
  3732. "if",
  3733. "then",
  3734. "else",
  3735. "elif",
  3736. "fi",
  3737. "for",
  3738. "while",
  3739. "until",
  3740. "in",
  3741. "do",
  3742. "done",
  3743. "case",
  3744. "esac",
  3745. "function",
  3746. "select"
  3747. ], p = [
  3748. "true",
  3749. "false"
  3750. ], _ = { match: /(\/[a-z._-]+)+/ }, v = [
  3751. "break",
  3752. "cd",
  3753. "continue",
  3754. "eval",
  3755. "exec",
  3756. "exit",
  3757. "export",
  3758. "getopts",
  3759. "hash",
  3760. "pwd",
  3761. "readonly",
  3762. "return",
  3763. "shift",
  3764. "test",
  3765. "times",
  3766. "trap",
  3767. "umask",
  3768. "unset"
  3769. ], m = [
  3770. "alias",
  3771. "bind",
  3772. "builtin",
  3773. "caller",
  3774. "command",
  3775. "declare",
  3776. "echo",
  3777. "enable",
  3778. "help",
  3779. "let",
  3780. "local",
  3781. "logout",
  3782. "mapfile",
  3783. "printf",
  3784. "read",
  3785. "readarray",
  3786. "source",
  3787. "type",
  3788. "typeset",
  3789. "ulimit",
  3790. "unalias"
  3791. ], E = [
  3792. "autoload",
  3793. "bg",
  3794. "bindkey",
  3795. "bye",
  3796. "cap",
  3797. "chdir",
  3798. "clone",
  3799. "comparguments",
  3800. "compcall",
  3801. "compctl",
  3802. "compdescribe",
  3803. "compfiles",
  3804. "compgroups",
  3805. "compquote",
  3806. "comptags",
  3807. "comptry",
  3808. "compvalues",
  3809. "dirs",
  3810. "disable",
  3811. "disown",
  3812. "echotc",
  3813. "echoti",
  3814. "emulate",
  3815. "fc",
  3816. "fg",
  3817. "float",
  3818. "functions",
  3819. "getcap",
  3820. "getln",
  3821. "history",
  3822. "integer",
  3823. "jobs",
  3824. "kill",
  3825. "limit",
  3826. "log",
  3827. "noglob",
  3828. "popd",
  3829. "print",
  3830. "pushd",
  3831. "pushln",
  3832. "rehash",
  3833. "sched",
  3834. "setcap",
  3835. "setopt",
  3836. "stat",
  3837. "suspend",
  3838. "ttyctl",
  3839. "unfunction",
  3840. "unhash",
  3841. "unlimit",
  3842. "unsetopt",
  3843. "vared",
  3844. "wait",
  3845. "whence",
  3846. "where",
  3847. "which",
  3848. "zcompile",
  3849. "zformat",
  3850. "zftp",
  3851. "zle",
  3852. "zmodload",
  3853. "zparseopts",
  3854. "zprof",
  3855. "zpty",
  3856. "zregexparse",
  3857. "zsocket",
  3858. "zstyle",
  3859. "ztcp"
  3860. ], A = [
  3861. "chcon",
  3862. "chgrp",
  3863. "chown",
  3864. "chmod",
  3865. "cp",
  3866. "dd",
  3867. "df",
  3868. "dir",
  3869. "dircolors",
  3870. "ln",
  3871. "ls",
  3872. "mkdir",
  3873. "mkfifo",
  3874. "mknod",
  3875. "mktemp",
  3876. "mv",
  3877. "realpath",
  3878. "rm",
  3879. "rmdir",
  3880. "shred",
  3881. "sync",
  3882. "touch",
  3883. "truncate",
  3884. "vdir",
  3885. "b2sum",
  3886. "base32",
  3887. "base64",
  3888. "cat",
  3889. "cksum",
  3890. "comm",
  3891. "csplit",
  3892. "cut",
  3893. "expand",
  3894. "fmt",
  3895. "fold",
  3896. "head",
  3897. "join",
  3898. "md5sum",
  3899. "nl",
  3900. "numfmt",
  3901. "od",
  3902. "paste",
  3903. "ptx",
  3904. "pr",
  3905. "sha1sum",
  3906. "sha224sum",
  3907. "sha256sum",
  3908. "sha384sum",
  3909. "sha512sum",
  3910. "shuf",
  3911. "sort",
  3912. "split",
  3913. "sum",
  3914. "tac",
  3915. "tail",
  3916. "tr",
  3917. "tsort",
  3918. "unexpand",
  3919. "uniq",
  3920. "wc",
  3921. "arch",
  3922. "basename",
  3923. "chroot",
  3924. "date",
  3925. "dirname",
  3926. "du",
  3927. "echo",
  3928. "env",
  3929. "expr",
  3930. "factor",
  3931. // "false", // keyword literal already
  3932. "groups",
  3933. "hostid",
  3934. "id",
  3935. "link",
  3936. "logname",
  3937. "nice",
  3938. "nohup",
  3939. "nproc",
  3940. "pathchk",
  3941. "pinky",
  3942. "printenv",
  3943. "printf",
  3944. "pwd",
  3945. "readlink",
  3946. "runcon",
  3947. "seq",
  3948. "sleep",
  3949. "stat",
  3950. "stdbuf",
  3951. "stty",
  3952. "tee",
  3953. "test",
  3954. "timeout",
  3955. // "true", // keyword literal already
  3956. "tty",
  3957. "uname",
  3958. "unlink",
  3959. "uptime",
  3960. "users",
  3961. "who",
  3962. "whoami",
  3963. "yes"
  3964. ];
  3965. return {
  3966. name: "Bash",
  3967. aliases: ["sh"],
  3968. keywords: {
  3969. $pattern: /\b[a-z][a-z0-9._-]+\b/,
  3970. keyword: g,
  3971. literal: p,
  3972. built_in: [
  3973. ...v,
  3974. ...m,
  3975. // Shell modifiers
  3976. "set",
  3977. "shopt",
  3978. ...E,
  3979. ...A
  3980. ]
  3981. },
  3982. contains: [
  3983. u,
  3984. // to catch known shells and boost relevancy
  3985. e.SHEBANG(),
  3986. // to catch unknown shells but still highlight the shebang
  3987. h,
  3988. l,
  3989. e.HASH_COMMENT_MODE,
  3990. t,
  3991. _,
  3992. r,
  3993. i,
  3994. s,
  3995. o,
  3996. a
  3997. ]
  3998. };
  3999. }
  4000. function or(e) {
  4001. const n = e.regex, a = e.COMMENT("--", "$"), f = {
  4002. className: "string",
  4003. variants: [
  4004. {
  4005. begin: /'/,
  4006. end: /'/,
  4007. contains: [{ begin: /''/ }]
  4008. }
  4009. ]
  4010. }, d = {
  4011. begin: /"/,
  4012. end: /"/,
  4013. contains: [{ begin: /""/ }]
  4014. }, t = [
  4015. "true",
  4016. "false",
  4017. // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
  4018. // "null",
  4019. "unknown"
  4020. ], r = [
  4021. "double precision",
  4022. "large object",
  4023. "with timezone",
  4024. "without timezone"
  4025. ], i = [
  4026. "bigint",
  4027. "binary",
  4028. "blob",
  4029. "boolean",
  4030. "char",
  4031. "character",
  4032. "clob",
  4033. "date",
  4034. "dec",
  4035. "decfloat",
  4036. "decimal",
  4037. "float",
  4038. "int",
  4039. "integer",
  4040. "interval",
  4041. "nchar",
  4042. "nclob",
  4043. "national",
  4044. "numeric",
  4045. "real",
  4046. "row",
  4047. "smallint",
  4048. "time",
  4049. "timestamp",
  4050. "varchar",
  4051. "varying",
  4052. // modifier (character varying)
  4053. "varbinary"
  4054. ], s = [
  4055. "add",
  4056. "asc",
  4057. "collation",
  4058. "desc",
  4059. "final",
  4060. "first",
  4061. "last",
  4062. "view"
  4063. ], o = [
  4064. "abs",
  4065. "acos",
  4066. "all",
  4067. "allocate",
  4068. "alter",
  4069. "and",
  4070. "any",
  4071. "are",
  4072. "array",
  4073. "array_agg",
  4074. "array_max_cardinality",
  4075. "as",
  4076. "asensitive",
  4077. "asin",
  4078. "asymmetric",
  4079. "at",
  4080. "atan",
  4081. "atomic",
  4082. "authorization",
  4083. "avg",
  4084. "begin",
  4085. "begin_frame",
  4086. "begin_partition",
  4087. "between",
  4088. "bigint",
  4089. "binary",
  4090. "blob",
  4091. "boolean",
  4092. "both",
  4093. "by",
  4094. "call",
  4095. "called",
  4096. "cardinality",
  4097. "cascaded",
  4098. "case",
  4099. "cast",
  4100. "ceil",
  4101. "ceiling",
  4102. "char",
  4103. "char_length",
  4104. "character",
  4105. "character_length",
  4106. "check",
  4107. "classifier",
  4108. "clob",
  4109. "close",
  4110. "coalesce",
  4111. "collate",
  4112. "collect",
  4113. "column",
  4114. "commit",
  4115. "condition",
  4116. "connect",
  4117. "constraint",
  4118. "contains",
  4119. "convert",
  4120. "copy",
  4121. "corr",
  4122. "corresponding",
  4123. "cos",
  4124. "cosh",
  4125. "count",
  4126. "covar_pop",
  4127. "covar_samp",
  4128. "create",
  4129. "cross",
  4130. "cube",
  4131. "cume_dist",
  4132. "current",
  4133. "current_catalog",
  4134. "current_date",
  4135. "current_default_transform_group",
  4136. "current_path",
  4137. "current_role",
  4138. "current_row",
  4139. "current_schema",
  4140. "current_time",
  4141. "current_timestamp",
  4142. "current_path",
  4143. "current_role",
  4144. "current_transform_group_for_type",
  4145. "current_user",
  4146. "cursor",
  4147. "cycle",
  4148. "date",
  4149. "day",
  4150. "deallocate",
  4151. "dec",
  4152. "decimal",
  4153. "decfloat",
  4154. "declare",
  4155. "default",
  4156. "define",
  4157. "delete",
  4158. "dense_rank",
  4159. "deref",
  4160. "describe",
  4161. "deterministic",
  4162. "disconnect",
  4163. "distinct",
  4164. "double",
  4165. "drop",
  4166. "dynamic",
  4167. "each",
  4168. "element",
  4169. "else",
  4170. "empty",
  4171. "end",
  4172. "end_frame",
  4173. "end_partition",
  4174. "end-exec",
  4175. "equals",
  4176. "escape",
  4177. "every",
  4178. "except",
  4179. "exec",
  4180. "execute",
  4181. "exists",
  4182. "exp",
  4183. "external",
  4184. "extract",
  4185. "false",
  4186. "fetch",
  4187. "filter",
  4188. "first_value",
  4189. "float",
  4190. "floor",
  4191. "for",
  4192. "foreign",
  4193. "frame_row",
  4194. "free",
  4195. "from",
  4196. "full",
  4197. "function",
  4198. "fusion",
  4199. "get",
  4200. "global",
  4201. "grant",
  4202. "group",
  4203. "grouping",
  4204. "groups",
  4205. "having",
  4206. "hold",
  4207. "hour",
  4208. "identity",
  4209. "in",
  4210. "indicator",
  4211. "initial",
  4212. "inner",
  4213. "inout",
  4214. "insensitive",
  4215. "insert",
  4216. "int",
  4217. "integer",
  4218. "intersect",
  4219. "intersection",
  4220. "interval",
  4221. "into",
  4222. "is",
  4223. "join",
  4224. "json_array",
  4225. "json_arrayagg",
  4226. "json_exists",
  4227. "json_object",
  4228. "json_objectagg",
  4229. "json_query",
  4230. "json_table",
  4231. "json_table_primitive",
  4232. "json_value",
  4233. "lag",
  4234. "language",
  4235. "large",
  4236. "last_value",
  4237. "lateral",
  4238. "lead",
  4239. "leading",
  4240. "left",
  4241. "like",
  4242. "like_regex",
  4243. "listagg",
  4244. "ln",
  4245. "local",
  4246. "localtime",
  4247. "localtimestamp",
  4248. "log",
  4249. "log10",
  4250. "lower",
  4251. "match",
  4252. "match_number",
  4253. "match_recognize",
  4254. "matches",
  4255. "max",
  4256. "member",
  4257. "merge",
  4258. "method",
  4259. "min",
  4260. "minute",
  4261. "mod",
  4262. "modifies",
  4263. "module",
  4264. "month",
  4265. "multiset",
  4266. "national",
  4267. "natural",
  4268. "nchar",
  4269. "nclob",
  4270. "new",
  4271. "no",
  4272. "none",
  4273. "normalize",
  4274. "not",
  4275. "nth_value",
  4276. "ntile",
  4277. "null",
  4278. "nullif",
  4279. "numeric",
  4280. "octet_length",
  4281. "occurrences_regex",
  4282. "of",
  4283. "offset",
  4284. "old",
  4285. "omit",
  4286. "on",
  4287. "one",
  4288. "only",
  4289. "open",
  4290. "or",
  4291. "order",
  4292. "out",
  4293. "outer",
  4294. "over",
  4295. "overlaps",
  4296. "overlay",
  4297. "parameter",
  4298. "partition",
  4299. "pattern",
  4300. "per",
  4301. "percent",
  4302. "percent_rank",
  4303. "percentile_cont",
  4304. "percentile_disc",
  4305. "period",
  4306. "portion",
  4307. "position",
  4308. "position_regex",
  4309. "power",
  4310. "precedes",
  4311. "precision",
  4312. "prepare",
  4313. "primary",
  4314. "procedure",
  4315. "ptf",
  4316. "range",
  4317. "rank",
  4318. "reads",
  4319. "real",
  4320. "recursive",
  4321. "ref",
  4322. "references",
  4323. "referencing",
  4324. "regr_avgx",
  4325. "regr_avgy",
  4326. "regr_count",
  4327. "regr_intercept",
  4328. "regr_r2",
  4329. "regr_slope",
  4330. "regr_sxx",
  4331. "regr_sxy",
  4332. "regr_syy",
  4333. "release",
  4334. "result",
  4335. "return",
  4336. "returns",
  4337. "revoke",
  4338. "right",
  4339. "rollback",
  4340. "rollup",
  4341. "row",
  4342. "row_number",
  4343. "rows",
  4344. "running",
  4345. "savepoint",
  4346. "scope",
  4347. "scroll",
  4348. "search",
  4349. "second",
  4350. "seek",
  4351. "select",
  4352. "sensitive",
  4353. "session_user",
  4354. "set",
  4355. "show",
  4356. "similar",
  4357. "sin",
  4358. "sinh",
  4359. "skip",
  4360. "smallint",
  4361. "some",
  4362. "specific",
  4363. "specifictype",
  4364. "sql",
  4365. "sqlexception",
  4366. "sqlstate",
  4367. "sqlwarning",
  4368. "sqrt",
  4369. "start",
  4370. "static",
  4371. "stddev_pop",
  4372. "stddev_samp",
  4373. "submultiset",
  4374. "subset",
  4375. "substring",
  4376. "substring_regex",
  4377. "succeeds",
  4378. "sum",
  4379. "symmetric",
  4380. "system",
  4381. "system_time",
  4382. "system_user",
  4383. "table",
  4384. "tablesample",
  4385. "tan",
  4386. "tanh",
  4387. "then",
  4388. "time",
  4389. "timestamp",
  4390. "timezone_hour",
  4391. "timezone_minute",
  4392. "to",
  4393. "trailing",
  4394. "translate",
  4395. "translate_regex",
  4396. "translation",
  4397. "treat",
  4398. "trigger",
  4399. "trim",
  4400. "trim_array",
  4401. "true",
  4402. "truncate",
  4403. "uescape",
  4404. "union",
  4405. "unique",
  4406. "unknown",
  4407. "unnest",
  4408. "update",
  4409. "upper",
  4410. "user",
  4411. "using",
  4412. "value",
  4413. "values",
  4414. "value_of",
  4415. "var_pop",
  4416. "var_samp",
  4417. "varbinary",
  4418. "varchar",
  4419. "varying",
  4420. "versioning",
  4421. "when",
  4422. "whenever",
  4423. "where",
  4424. "width_bucket",
  4425. "window",
  4426. "with",
  4427. "within",
  4428. "without",
  4429. "year"
  4430. ], l = [
  4431. "abs",
  4432. "acos",
  4433. "array_agg",
  4434. "asin",
  4435. "atan",
  4436. "avg",
  4437. "cast",
  4438. "ceil",
  4439. "ceiling",
  4440. "coalesce",
  4441. "corr",
  4442. "cos",
  4443. "cosh",
  4444. "count",
  4445. "covar_pop",
  4446. "covar_samp",
  4447. "cume_dist",
  4448. "dense_rank",
  4449. "deref",
  4450. "element",
  4451. "exp",
  4452. "extract",
  4453. "first_value",
  4454. "floor",
  4455. "json_array",
  4456. "json_arrayagg",
  4457. "json_exists",
  4458. "json_object",
  4459. "json_objectagg",
  4460. "json_query",
  4461. "json_table",
  4462. "json_table_primitive",
  4463. "json_value",
  4464. "lag",
  4465. "last_value",
  4466. "lead",
  4467. "listagg",
  4468. "ln",
  4469. "log",
  4470. "log10",
  4471. "lower",
  4472. "max",
  4473. "min",
  4474. "mod",
  4475. "nth_value",
  4476. "ntile",
  4477. "nullif",
  4478. "percent_rank",
  4479. "percentile_cont",
  4480. "percentile_disc",
  4481. "position",
  4482. "position_regex",
  4483. "power",
  4484. "rank",
  4485. "regr_avgx",
  4486. "regr_avgy",
  4487. "regr_count",
  4488. "regr_intercept",
  4489. "regr_r2",
  4490. "regr_slope",
  4491. "regr_sxx",
  4492. "regr_sxy",
  4493. "regr_syy",
  4494. "row_number",
  4495. "sin",
  4496. "sinh",
  4497. "sqrt",
  4498. "stddev_pop",
  4499. "stddev_samp",
  4500. "substring",
  4501. "substring_regex",
  4502. "sum",
  4503. "tan",
  4504. "tanh",
  4505. "translate",
  4506. "translate_regex",
  4507. "treat",
  4508. "trim",
  4509. "trim_array",
  4510. "unnest",
  4511. "upper",
  4512. "value_of",
  4513. "var_pop",
  4514. "var_samp",
  4515. "width_bucket"
  4516. ], c = [
  4517. "current_catalog",
  4518. "current_date",
  4519. "current_default_transform_group",
  4520. "current_path",
  4521. "current_role",
  4522. "current_schema",
  4523. "current_transform_group_for_type",
  4524. "current_user",
  4525. "session_user",
  4526. "system_time",
  4527. "system_user",
  4528. "current_time",
  4529. "localtime",
  4530. "current_timestamp",
  4531. "localtimestamp"
  4532. ], u = [
  4533. "create table",
  4534. "insert into",
  4535. "primary key",
  4536. "foreign key",
  4537. "not null",
  4538. "alter table",
  4539. "add constraint",
  4540. "grouping sets",
  4541. "on overflow",
  4542. "character set",
  4543. "respect nulls",
  4544. "ignore nulls",
  4545. "nulls first",
  4546. "nulls last",
  4547. "depth first",
  4548. "breadth first"
  4549. ], h = l, g = [
  4550. ...o,
  4551. ...s
  4552. ].filter((E) => !l.includes(E)), p = {
  4553. className: "variable",
  4554. begin: /@[a-z0-9][a-z0-9_]*/
  4555. }, _ = {
  4556. className: "operator",
  4557. begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
  4558. relevance: 0
  4559. }, v = {
  4560. begin: n.concat(/\b/, n.either(...h), /\s*\(/),
  4561. relevance: 0,
  4562. keywords: { built_in: h }
  4563. };
  4564. function m(E, {
  4565. exceptions: A,
  4566. when: D
  4567. } = {}) {
  4568. const S = D;
  4569. return A = A || [], E.map((N) => N.match(/\|\d+$/) || A.includes(N) ? N : S(N) ? `${N}|0` : N);
  4570. }
  4571. return {
  4572. name: "SQL",
  4573. case_insensitive: !0,
  4574. // does not include {} or HTML tags `</`
  4575. illegal: /[{}]|<\//,
  4576. keywords: {
  4577. $pattern: /\b[\w\.]+/,
  4578. keyword: m(g, { when: (E) => E.length < 3 }),
  4579. literal: t,
  4580. type: i,
  4581. built_in: c
  4582. },
  4583. contains: [
  4584. {
  4585. begin: n.either(...u),
  4586. relevance: 0,
  4587. keywords: {
  4588. $pattern: /[\w\.]+/,
  4589. keyword: g.concat(u),
  4590. literal: t,
  4591. type: i
  4592. }
  4593. },
  4594. {
  4595. className: "type",
  4596. begin: n.either(...r)
  4597. },
  4598. v,
  4599. p,
  4600. f,
  4601. d,
  4602. e.C_NUMBER_MODE,
  4603. e.C_BLOCK_COMMENT_MODE,
  4604. a,
  4605. _
  4606. ]
  4607. };
  4608. }
  4609. j.registerLanguage("xml", Zt);
  4610. j.registerLanguage("javascript", er);
  4611. j.registerLanguage("json", nr);
  4612. j.registerLanguage("yaml", tr);
  4613. j.registerLanguage("plaintext", rr);
  4614. j.registerLanguage("python", ir);
  4615. j.registerLanguage("java", sr);
  4616. j.registerLanguage("bash", ar);
  4617. j.registerLanguage("sql", or);
  4618. var T = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(T || {});
  4619. const J = "<code-diff-modified>", ee = "</code-diff-modified>", lr = J.replace("<", "&lt;").replace(">", "&gt;"), cr = ee.replace("<", "&lt;").replace(">", "&gt;");
  4620. function ge(e) {
  4621. return e === void 0 ? T.EQUAL : e.added ? T.ADD : e.removed ? T.DELETE : T.EQUAL;
  4622. }
  4623. function De(e, n, a = "word") {
  4624. return typeof e == "undefined" ? n : typeof n == "undefined" ? e : (a === "char" ? Zn : Yn)(e, n).filter((d) => ge(d) !== T.DELETE).map(
  4625. (d) => ge(d) === T.ADD ? `${J}${d.value}${ee}` : d.value
  4626. ).join("");
  4627. }
  4628. function kn(e, n) {
  4629. const a = new Ie.diff_match_patch(), f = a.diff_linesToChars_(e, n), d = f.chars1, t = f.chars2, r = f.lineArray, i = a.diff_main(d, t, !1);
  4630. return a.diff_charsToLines_(i, r), i.map((s) => {
  4631. const [o, l] = s;
  4632. return {
  4633. count: l.replace(/\n$/, "").split(`
  4634. `).length,
  4635. value: l,
  4636. removed: o === Ie.DIFF_DELETE,
  4637. added: o === Ie.DIFF_INSERT
  4638. };
  4639. });
  4640. }
  4641. function Q(e, n) {
  4642. if (!n.match(new RegExp(`(${J}|${ee})`, "g")))
  4643. return j.highlight(n, { language: e }).value;
  4644. let f = n;
  4645. const d = n.replace(new RegExp(`(${J}|${ee})`, "g"), ""), t = document.createElement("div");
  4646. t.innerHTML = j.highlight(d, { language: e }).value;
  4647. let r = !1;
  4648. const i = (s) => {
  4649. s.childNodes.forEach((o) => {
  4650. if (o.nodeType === Node.ELEMENT_NODE && i(o), o.nodeType === Node.TEXT_NODE) {
  4651. if (!o.textContent)
  4652. return;
  4653. let l = o.textContent, c = "";
  4654. for (r && (c = c + J); l.length; ) {
  4655. if (f.startsWith(J)) {
  4656. f = f.slice(J.length), c = c + J, r = !0;
  4657. continue;
  4658. }
  4659. if (f.startsWith(ee)) {
  4660. f = f.slice(ee.length), c = c + ee, r = !1;
  4661. continue;
  4662. }
  4663. const u = f.match(new RegExp(`(${J}|${ee})`)), h = u && u.index ? u.index : f.length, g = Math.min(h, l.length);
  4664. c = c + f.substring(0, g), f = f.slice(g), l = l.slice(g);
  4665. }
  4666. r && (c = c + ee), o.textContent = c;
  4667. }
  4668. });
  4669. };
  4670. return i(t), t.innerHTML.replace(new RegExp(lr, "g"), '<span class="x">').replace(new RegExp(cr, "g"), "</span>");
  4671. }
  4672. function $n(e, n) {
  4673. const a = (s, o) => (s.match(new RegExp(o, "g")) || []).length, f = (s) => s.filter((o) => n == null ? void 0 : n.test(o)).length;
  4674. let d = 0, t = 0, r = 0, i = 0;
  4675. for (const s of e) {
  4676. if (s.added) {
  4677. const o = f(s.value.trim().split(`
  4678. `));
  4679. d += a(s.value.trim(), `
  4680. `) + 1 - o, r += o;
  4681. continue;
  4682. }
  4683. if (s.removed) {
  4684. const o = f(s.value.trim().split(`
  4685. `));
  4686. t += a(s.value.trim(), `
  4687. `) + 1 - o, i += o;
  4688. continue;
  4689. }
  4690. }
  4691. return {
  4692. additionsNum: d,
  4693. deletionsNum: t,
  4694. ignoreAdditionsNum: r,
  4695. ignoreDeletionsNum: i
  4696. };
  4697. }
  4698. function ur(e, n, a = "plaintext", f = "word", d = !1, t = 10, r) {
  4699. const i = () => ({ type: T.EMPTY }), s = (m, E, A) => ({ type: m, num: E, code: A }), o = kn(e, n), l = r ? new RegExp(r) : void 0;
  4700. let c = 0, u = 0, h = !1;
  4701. const g = [], p = {
  4702. changes: g,
  4703. collector: [],
  4704. stat: $n(o, l)
  4705. };
  4706. for (let m = 0; m < o.length; m++) {
  4707. if (h) {
  4708. h = !1;
  4709. continue;
  4710. }
  4711. const [E, A] = [o[m], o[m + 1]], [D, S] = [ge(E), ge(A)], N = E.value.replace(/\n$/, "").split(`
  4712. `);
  4713. if (A === void 0) {
  4714. for (const C of N) {
  4715. let I = i(), B = i();
  4716. const $ = Q(a, C);
  4717. D === T.EQUAL && (c++, u++, I = s(T.EQUAL, c, $), B = s(T.EQUAL, u, $)), D === T.DELETE && (c++, I = s(T.DELETE, c, $), B = i()), D === T.ADD && (u++, I = i(), B = s(T.ADD, u, $)), g.push({ left: I, right: B });
  4718. }
  4719. break;
  4720. }
  4721. if (D === T.EQUAL)
  4722. for (const C of N) {
  4723. c++, u++;
  4724. const I = Q(a, C);
  4725. g.push({
  4726. left: s(T.EQUAL, c, I),
  4727. right: s(T.EQUAL, u, I)
  4728. });
  4729. }
  4730. const R = A.value.replace(/\n$/, "").split(`
  4731. `);
  4732. if (D === T.DELETE) {
  4733. if (S === T.EQUAL)
  4734. for (const C of N)
  4735. c++, g.push({
  4736. left: s(T.DELETE, c, Q(a, C)),
  4737. right: i()
  4738. });
  4739. if (S === T.ADD) {
  4740. h = !0;
  4741. const C = Math.max(E.count, A.count);
  4742. for (let I = 0; I < C; I++) {
  4743. I < E.count && c++, I < A.count && u++;
  4744. const [B, $] = [N[I], R[I]], F = d || N.length === R.length, K = F ? De($, B, f) : B, te = F ? De(B, $, f) : $, le = l != null && l.test(B) ? T.EQUAL : T.DELETE, b = l != null && l.test($) ? T.EQUAL : T.ADD, w = I < E.count ? s(le, c, Q(a, K)) : i(), L = I < A.count ? s(b, u, Q(a, te)) : i();
  4745. g.push({ left: w, right: L });
  4746. }
  4747. }
  4748. }
  4749. if (D === T.ADD)
  4750. for (const C of N)
  4751. u++, g.push({
  4752. left: i(),
  4753. right: s(T.ADD, u, Q(a, C))
  4754. });
  4755. }
  4756. if (e === n) {
  4757. for (let m = 0; m < g.length; m++)
  4758. g[m].fold = !1;
  4759. return p;
  4760. }
  4761. for (let m = 0; m < g.length; m++) {
  4762. const E = g[m];
  4763. if (E.left.type === T.DELETE || E.right.type === T.ADD) {
  4764. const [A, D] = [Math.max(m - t, 0), Math.min(m + t + 1, g.length)];
  4765. for (let S = A; S < D; S++)
  4766. g[S].fold = !1;
  4767. }
  4768. E.fold === void 0 && (E.fold = !0);
  4769. }
  4770. const _ = [];
  4771. let v = [];
  4772. for (let m = 0; m < g.length; m++) {
  4773. const E = g[m];
  4774. if (E.fold === !1) {
  4775. v.length && (v[0].hideIndex = p.collector.length, p.collector.push({
  4776. lines: v,
  4777. fold: !0
  4778. }), v = []), _.push(E);
  4779. continue;
  4780. }
  4781. E.hide = !0, v.push(E), _.push(E);
  4782. }
  4783. return v.length && (v[0].hideIndex = p.collector.length, p.collector.push({
  4784. lines: v,
  4785. fold: !0
  4786. }), v = []), p.changes = _, p;
  4787. }
  4788. function fr(e, n, a = "plaintext", f = "word", d = !1, t = 10, r) {
  4789. const i = kn(e, n), s = r ? new RegExp(r) : void 0;
  4790. let o = 0, l = 0, c = !1;
  4791. const u = [], h = {
  4792. changes: u,
  4793. collector: [],
  4794. stat: $n(i, s)
  4795. };
  4796. for (let _ = 0; _ < i.length; _++) {
  4797. if (c) {
  4798. c = !1;
  4799. continue;
  4800. }
  4801. const [v, m] = [i[_], i[_ + 1]], [E, A] = [ge(v), ge(m)], D = v.value.replace(/\n$/, "").split(`
  4802. `);
  4803. if (m === void 0) {
  4804. for (const N of D) {
  4805. E === T.EQUAL && (o++, l++), E === T.DELETE && o++, E === T.ADD && l++;
  4806. const R = Q(a, N);
  4807. u.push({
  4808. type: E,
  4809. code: R,
  4810. addNum: E === T.DELETE ? void 0 : l,
  4811. delNum: E === T.ADD ? void 0 : o
  4812. });
  4813. }
  4814. break;
  4815. }
  4816. if (E === T.EQUAL)
  4817. for (const N of D) {
  4818. o++, l++;
  4819. const R = Q(a, N);
  4820. u.push({ type: T.EQUAL, code: R, delNum: o, addNum: l });
  4821. }
  4822. const S = m.value.replace(/\n$/, "").split(`
  4823. `);
  4824. if (E === T.DELETE)
  4825. if (A === T.ADD && (D.length === S.length || d)) {
  4826. for (let N = 0; N < D.length; N++) {
  4827. const R = D[N], C = S[N];
  4828. o++;
  4829. const I = Q(a, De(C, R, f));
  4830. u.push({
  4831. type: s != null && s.test(R) ? T.EQUAL : T.DELETE,
  4832. code: I,
  4833. delNum: o
  4834. });
  4835. }
  4836. for (let N = 0; N < S.length; N++) {
  4837. const R = D[N], C = S[N];
  4838. l++;
  4839. const I = Q(a, De(R, C, f));
  4840. u.push({
  4841. type: s != null && s.test(C) ? T.EQUAL : T.ADD,
  4842. code: I,
  4843. addNum: l
  4844. });
  4845. }
  4846. c = !0;
  4847. } else
  4848. for (const N of D) {
  4849. o++;
  4850. const R = Q(a, N);
  4851. u.push({ type: T.DELETE, code: R, delNum: o });
  4852. }
  4853. if (E === T.ADD)
  4854. for (const N of D) {
  4855. l++;
  4856. const R = Q(a, N);
  4857. u.push({ type: T.ADD, code: R, addNum: l });
  4858. }
  4859. }
  4860. for (let _ = 0; _ < u.length; _++) {
  4861. const v = u[_];
  4862. if (v.type === T.DELETE || v.type === T.ADD) {
  4863. const [m, E] = [Math.max(_ - t, 0), Math.min(_ + t + 1, u.length)];
  4864. for (let A = m; A < E; A++)
  4865. u[A].fold = !1;
  4866. }
  4867. v.fold === void 0 && (v.fold = !0);
  4868. }
  4869. if (e === n) {
  4870. for (let _ = 0; _ < u.length; _++)
  4871. u[_].fold = !1;
  4872. return h;
  4873. }
  4874. const g = [];
  4875. let p = [];
  4876. for (let _ = 0; _ < u.length; _++) {
  4877. const v = u[_];
  4878. if (v.fold === !1) {
  4879. p.length && (p[0].hideIndex = h.collector.length, h.collector.push({
  4880. lines: p,
  4881. fold: !0
  4882. }), p = []), g.push(v);
  4883. continue;
  4884. }
  4885. v.type === "equal" && (v.hide = !0, p.push(v)), g.push(v);
  4886. }
  4887. return p.length && (p[0].hideIndex = h.collector.length, h.collector.push({
  4888. lines: p,
  4889. fold: !0
  4890. }), p = []), h.changes = g, h;
  4891. }
  4892. const Ge = {};
  4893. Ge.props = {
  4894. line: {
  4895. key: "line",
  4896. required: !0,
  4897. type: null
  4898. }
  4899. };
  4900. Ge.setup = (e, n) => {
  4901. const a = n.emit;
  4902. function f(d) {
  4903. return d === T.DELETE ? "-" : d === T.ADD ? "+" : "";
  4904. }
  4905. return {
  4906. DiffType: T,
  4907. emit: a,
  4908. getCodeMarker: f
  4909. };
  4910. };
  4911. var gr = function() {
  4912. var e = this, n = e.$createElement, a = e._self._c || n;
  4913. return e.line.hideIndex !== void 0 && e.line.hide ? a("tr", [a("td", {
  4914. staticClass: "blob-num blob-num-hunk text-center",
  4915. attrs: {
  4916. colspan: "2"
  4917. },
  4918. on: {
  4919. click: function(f) {
  4920. return e.emit("expand", e.line);
  4921. }
  4922. }
  4923. }, [e._v(" > ")]), a("td", {
  4924. staticClass: "blob-code blob-code-hunk",
  4925. attrs: {
  4926. align: "left"
  4927. }
  4928. }, [e._v(" ⋯ ")])]) : e.line.hide ? e._e() : a("tr", [a("td", {
  4929. staticClass: "blob-num",
  4930. class: {
  4931. "blob-num-deletion": e.line.type === e.DiffType.DELETE,
  4932. "blob-num-addition": e.line.type === e.DiffType.ADD,
  4933. "blob-num-context": e.line.type === e.DiffType.EQUAL,
  4934. "blob-num-hunk": e.line.hide !== void 0
  4935. }
  4936. }, [e._v(" " + e._s(e.line.delNum) + " ")]), a("td", {
  4937. staticClass: "blob-num",
  4938. class: {
  4939. "blob-num-deletion": e.line.type === e.DiffType.DELETE,
  4940. "blob-num-addition": e.line.type === e.DiffType.ADD,
  4941. "blob-num-context": e.line.type === e.DiffType.EQUAL,
  4942. "blob-num-hunk": e.line.hide !== void 0
  4943. }
  4944. }, [e._v(" " + e._s(e.line.addNum) + " ")]), a("td", {
  4945. staticClass: "blob-code",
  4946. class: {
  4947. "blob-code-deletion": e.line.type === e.DiffType.DELETE,
  4948. "blob-code-addition": e.line.type === e.DiffType.ADD,
  4949. "blob-code-context": e.line.type === e.DiffType.EQUAL,
  4950. "blob-code-hunk": e.line.hide !== void 0
  4951. }
  4952. }, [a("span", {
  4953. staticClass: "blob-code-inner blob-code-marker",
  4954. attrs: {
  4955. "data-code-marker": e.getCodeMarker(e.line.type)
  4956. },
  4957. domProps: {
  4958. innerHTML: e._s(e.line.code)
  4959. }
  4960. })])]);
  4961. }, hr = [];
  4962. function oe(e, n, a, f, d, t, r, i) {
  4963. var s = typeof e == "function" ? e.options : e;
  4964. n && (s.render = n, s.staticRenderFns = a, s._compiled = !0), f && (s.functional = !0), t && (s._scopeId = "data-v-" + t);
  4965. var o;
  4966. if (r ? (o = function(u) {
  4967. u = u || // cached call
  4968. this.$vnode && this.$vnode.ssrContext || // stateful
  4969. this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !u && typeof __VUE_SSR_CONTEXT__ != "undefined" && (u = __VUE_SSR_CONTEXT__), d && d.call(this, u), u && u._registeredComponents && u._registeredComponents.add(r);
  4970. }, s._ssrRegister = o) : d && (o = i ? function() {
  4971. d.call(
  4972. this,
  4973. (s.functional ? this.parent : this).$root.$options.shadowRoot
  4974. );
  4975. } : d), o)
  4976. if (s.functional) {
  4977. s._injectStyles = o;
  4978. var l = s.render;
  4979. s.render = function(h, g) {
  4980. return o.call(g), l(h, g);
  4981. };
  4982. } else {
  4983. var c = s.beforeCreate;
  4984. s.beforeCreate = c ? [].concat(c, o) : [o];
  4985. }
  4986. return {
  4987. exports: e,
  4988. options: s
  4989. };
  4990. }
  4991. const cn = {};
  4992. var dr = /* @__PURE__ */ oe(
  4993. Ge,
  4994. gr,
  4995. hr,
  4996. !1,
  4997. pr,
  4998. null,
  4999. null,
  5000. null
  5001. );
  5002. function pr(e) {
  5003. for (let n in cn)
  5004. this[n] = cn[n];
  5005. }
  5006. const _r = /* @__PURE__ */ function() {
  5007. return dr.exports;
  5008. }(), be = {};
  5009. be.props = {
  5010. diffChange: {
  5011. key: "diffChange",
  5012. required: !0,
  5013. type: null
  5014. }
  5015. };
  5016. be.setup = (e, n) => {
  5017. const a = e;
  5018. function f({
  5019. hideIndex: d
  5020. }) {
  5021. d !== void 0 && a.diffChange.collector[d].lines.forEach((t) => {
  5022. t.hide = !1, t.fold = !1;
  5023. });
  5024. }
  5025. return {
  5026. expandHandler: f
  5027. };
  5028. };
  5029. be.components = Object.assign({
  5030. UnifiedLine: _r
  5031. }, be.components);
  5032. var br = function() {
  5033. var e, n = this, a = n.$createElement, f = n._self._c || a;
  5034. return f("table", {
  5035. staticClass: "diff-table"
  5036. }, [f("tbody", n._l((e = n.diffChange) === null || e === void 0 ? void 0 : e.changes, function(d, t) {
  5037. return f("UnifiedLine", {
  5038. key: t,
  5039. attrs: {
  5040. line: d
  5041. },
  5042. on: {
  5043. expand: n.expandHandler
  5044. }
  5045. });
  5046. }), 1)]);
  5047. }, vr = [];
  5048. const un = {};
  5049. var mr = /* @__PURE__ */ oe(
  5050. be,
  5051. br,
  5052. vr,
  5053. !1,
  5054. Er,
  5055. null,
  5056. null,
  5057. null
  5058. );
  5059. function Er(e) {
  5060. for (let n in un)
  5061. this[n] = un[n];
  5062. }
  5063. const yr = /* @__PURE__ */ function() {
  5064. return mr.exports;
  5065. }(), Ke = {};
  5066. Ke.props = {
  5067. splitLine: {
  5068. key: "splitLine",
  5069. required: !0,
  5070. type: null
  5071. }
  5072. };
  5073. Ke.setup = (e, n) => {
  5074. const a = n.emit;
  5075. function f(t) {
  5076. return t === T.DELETE ? "-" : t === T.ADD ? "+" : "";
  5077. }
  5078. function d(t) {
  5079. window.getSelection().removeAllRanges();
  5080. const r = document.querySelectorAll(".file-diff-split .split-side-left"), i = document.querySelectorAll(".file-diff-split .split-side-right");
  5081. for (const s of i)
  5082. s.classList.toggle("no-select", t === "left");
  5083. for (const s of r)
  5084. s.classList.toggle("no-select", t === "right");
  5085. }
  5086. return {
  5087. DiffType: T,
  5088. emit: a,
  5089. getCodeMarker: f,
  5090. onSplitLineMousedown: d
  5091. };
  5092. };
  5093. var wr = function() {
  5094. var e = this, n = e.$createElement, a = e._self._c || n;
  5095. return e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? a("tr", [a("td", {
  5096. staticClass: "blob-num blob-num-hunk",
  5097. attrs: {
  5098. colspan: "1"
  5099. },
  5100. on: {
  5101. click: function(f) {
  5102. return e.emit("expand", e.splitLine);
  5103. }
  5104. }
  5105. }, [e._v(" > ")]), a("td", {
  5106. staticClass: "blob-code blob-code-inner blob-code-hunk",
  5107. attrs: {
  5108. colspan: "3",
  5109. align: "left"
  5110. }
  5111. }, [e._v(" ⋯ ")])]) : e.splitLine.hide ? e._e() : a("tr", [e._l([e.splitLine.left, e.splitLine.right], function(f, d) {
  5112. return [f.type === e.DiffType.EMPTY ? [a("td", {
  5113. staticClass: "blob-num blob-num-empty empty-cell"
  5114. }), a("td", {
  5115. staticClass: "blob-code blob-code-empty empty-cell"
  5116. })] : [a("td", {
  5117. staticClass: "blob-num",
  5118. class: {
  5119. "blob-num-deletion": f.type === e.DiffType.DELETE,
  5120. "blob-num-addition": f.type === e.DiffType.ADD,
  5121. "blob-num-context": f.type === e.DiffType.EQUAL,
  5122. "blob-num-hunk": e.splitLine.hide !== void 0
  5123. }
  5124. }, [e._v(" " + e._s(f.num) + " ")]), a("td", {
  5125. staticClass: "blob-code",
  5126. class: {
  5127. "blob-code-deletion": f.type === e.DiffType.DELETE,
  5128. "blob-code-addition": f.type === e.DiffType.ADD,
  5129. "blob-code-context": f.type === e.DiffType.EQUAL,
  5130. "blob-code-hunk": e.splitLine.hide !== void 0,
  5131. "split-side-left": d === 0,
  5132. "split-side-right": d === 1
  5133. },
  5134. on: {
  5135. mousedown: function(t) {
  5136. return e.onSplitLineMousedown(d === 0 ? "left" : "right");
  5137. }
  5138. }
  5139. }, [a("span", {
  5140. staticClass: "blob-code-inner blob-code-marker",
  5141. attrs: {
  5142. "data-code-marker": e.getCodeMarker(f.type)
  5143. },
  5144. domProps: {
  5145. innerHTML: e._s(f.code)
  5146. }
  5147. })])]];
  5148. })], 2);
  5149. }, Ar = [];
  5150. const fn = {};
  5151. var Nr = /* @__PURE__ */ oe(
  5152. Ke,
  5153. wr,
  5154. Ar,
  5155. !1,
  5156. Mr,
  5157. null,
  5158. null,
  5159. null
  5160. );
  5161. function Mr(e) {
  5162. for (let n in fn)
  5163. this[n] = fn[n];
  5164. }
  5165. const Tr = /* @__PURE__ */ function() {
  5166. return Nr.exports;
  5167. }(), ve = {};
  5168. ve.props = {
  5169. diffChange: {
  5170. key: "diffChange",
  5171. required: !0,
  5172. type: null
  5173. }
  5174. };
  5175. ve.setup = (e, n) => {
  5176. const a = e;
  5177. function f({
  5178. hideIndex: d
  5179. }) {
  5180. d !== void 0 && a.diffChange.collector[d].lines.forEach((t) => {
  5181. t.hide = !1, t.fold = !1;
  5182. });
  5183. }
  5184. return {
  5185. expandHandler: f
  5186. };
  5187. };
  5188. ve.components = Object.assign({
  5189. SplitLine: Tr
  5190. }, ve.components);
  5191. var Sr = function() {
  5192. var e, n = this, a = n.$createElement, f = n._self._c || a;
  5193. return f("table", {
  5194. staticClass: "file-diff-split diff-table"
  5195. }, [n._m(0), f("tbody", n._l((e = n.diffChange) === null || e === void 0 ? void 0 : e.changes, function(d, t) {
  5196. return f("SplitLine", {
  5197. key: t,
  5198. attrs: {
  5199. "split-line": d
  5200. },
  5201. on: {
  5202. expand: n.expandHandler
  5203. }
  5204. });
  5205. }), 1)]);
  5206. }, Dr = [function() {
  5207. var e = this, n = e.$createElement, a = e._self._c || n;
  5208. return a("colgroup", [a("col", {
  5209. attrs: {
  5210. width: "44"
  5211. }
  5212. }), a("col"), a("col", {
  5213. attrs: {
  5214. width: "44"
  5215. }
  5216. }), a("col")]);
  5217. }];
  5218. const gn = {};
  5219. var Cr = /* @__PURE__ */ oe(
  5220. ve,
  5221. Sr,
  5222. Dr,
  5223. !1,
  5224. Rr,
  5225. null,
  5226. null,
  5227. null
  5228. );
  5229. function Rr(e) {
  5230. for (let n in gn)
  5231. this[n] = gn[n];
  5232. }
  5233. const Lr = /* @__PURE__ */ function() {
  5234. return Cr.exports;
  5235. }();
  5236. var Or = function() {
  5237. var e = this, n = e.$createElement, a = e._self._c || n;
  5238. return a("svg", {
  5239. attrs: {
  5240. width: "1rem",
  5241. viewBox: "0 0 512 512",
  5242. xmlns: "http://www.w3.org/2000/svg"
  5243. }
  5244. }, [a("path", {
  5245. attrs: {
  5246. d: "M383.6,322.7L278.6,423c-5.8,6-13.7,9-22.4,9c-8.7,0-16.5-3-22.4-9L128.4,322.7c-12.5-11.9-12.5-31.3,0-43.2 c12.5-11.9,32.7-11.9,45.2,0l50.4,48.2v-217c0-16.9,14.3-30.6,32-30.6c17.7,0,32,13.7,32,30.6v217l50.4-48.2 c12.5-11.9,32.7-11.9,45.2,0C396.1,291.4,396.1,310.7,383.6,322.7z"
  5247. }
  5248. })]);
  5249. }, Ir = [];
  5250. const kr = {
  5251. name: "DownArrowIcon"
  5252. }, hn = {};
  5253. var $r = /* @__PURE__ */ oe(
  5254. kr,
  5255. Or,
  5256. Ir,
  5257. !1,
  5258. Br,
  5259. null,
  5260. null,
  5261. null
  5262. );
  5263. function Br(e) {
  5264. for (let n in hn)
  5265. this[n] = hn[n];
  5266. }
  5267. const Ur = /* @__PURE__ */ function() {
  5268. return $r.exports;
  5269. }();
  5270. var Pr = function() {
  5271. var e = this, n = e.$createElement, a = e._self._c || n;
  5272. return a("svg", {
  5273. attrs: {
  5274. width: "1rem",
  5275. viewBox: "0 0 512 512",
  5276. xmlns: "http://www.w3.org/2000/svg"
  5277. }
  5278. }, [a("path", {
  5279. attrs: {
  5280. d: "M128.4,189.3L233.4,89c5.8-6,13.7-9,22.4-9c8.7,0,16.5,3,22.4,9l105.4,100.3c12.5,11.9,12.5,31.3,0,43.2 c-12.5,11.9-32.7,11.9-45.2,0L288,184.4v217c0,16.9-14.3,30.6-32,30.6c-17.7,0-32-13.7-32-30.6v-217l-50.4,48.2 c-12.5,11.9-32.7,11.9-45.2,0C115.9,220.6,115.9,201.3,128.4,189.3z"
  5281. }
  5282. })]);
  5283. }, xr = [];
  5284. const Hr = {
  5285. name: "UpArrowIcon"
  5286. }, dn = {};
  5287. var Fr = /* @__PURE__ */ oe(
  5288. Hr,
  5289. Pr,
  5290. xr,
  5291. !1,
  5292. zr,
  5293. null,
  5294. null,
  5295. null
  5296. );
  5297. function zr(e) {
  5298. for (let n in dn)
  5299. this[n] = dn[n];
  5300. }
  5301. const Gr = /* @__PURE__ */ function() {
  5302. return Fr.exports;
  5303. }();
  5304. const me = {};
  5305. me.props = {
  5306. newString: {
  5307. key: "newString",
  5308. required: !0,
  5309. type: String
  5310. },
  5311. oldString: {
  5312. key: "oldString",
  5313. required: !0,
  5314. type: String
  5315. },
  5316. language: {
  5317. key: "language",
  5318. required: !1,
  5319. type: String,
  5320. default: "plaintext"
  5321. },
  5322. context: {
  5323. key: "context",
  5324. required: !1,
  5325. type: Number,
  5326. default: 10
  5327. },
  5328. diffStyle: {
  5329. key: "diffStyle",
  5330. required: !1,
  5331. type: String,
  5332. default: "word"
  5333. },
  5334. forceInlineComparison: {
  5335. key: "forceInlineComparison",
  5336. required: !1,
  5337. type: Boolean,
  5338. default: !1
  5339. },
  5340. outputFormat: {
  5341. key: "outputFormat",
  5342. required: !1,
  5343. type: String,
  5344. default: "line-by-line"
  5345. },
  5346. trim: {
  5347. key: "trim",
  5348. required: !1,
  5349. type: Boolean,
  5350. default: !1
  5351. },
  5352. noDiffLineFeed: {
  5353. key: "noDiffLineFeed",
  5354. required: !1,
  5355. type: Boolean,
  5356. default: !1
  5357. },
  5358. maxHeight: {
  5359. key: "maxHeight",
  5360. required: !1,
  5361. type: String,
  5362. default: void 0
  5363. },
  5364. filename: {
  5365. key: "filename",
  5366. required: !1,
  5367. type: String,
  5368. default: void 0
  5369. },
  5370. newFilename: {
  5371. key: "newFilename",
  5372. required: !1,
  5373. type: String,
  5374. default: void 0
  5375. },
  5376. hideHeader: {
  5377. key: "hideHeader",
  5378. required: !1,
  5379. type: Boolean,
  5380. default: !1
  5381. },
  5382. hideStat: {
  5383. key: "hideStat",
  5384. required: !1,
  5385. type: Boolean,
  5386. default: !1
  5387. },
  5388. theme: {
  5389. key: "theme",
  5390. required: !1,
  5391. type: String,
  5392. default: "light"
  5393. },
  5394. ignoreMatchingLines: {
  5395. key: "ignoreMatchingLines",
  5396. required: !1,
  5397. type: String,
  5398. default: void 0
  5399. }
  5400. };
  5401. me.setup = (e, n) => {
  5402. const a = e, f = n.emit, d = he(() => a.outputFormat === "line-by-line"), t = he(() => {
  5403. let g = a.oldString || "";
  5404. return g = a.trim ? g.trim() : g, g = a.noDiffLineFeed ? g.replace(/(\r\n)/g, `
  5405. `) : g, g;
  5406. }), r = he(() => {
  5407. let g = a.newString || "";
  5408. return g = a.trim ? g.trim() : g, g = a.noDiffLineFeed ? g.replace(/(\r\n)/g, `
  5409. `) : g, g;
  5410. }), i = he(() => d.value ? fr(t.value, r.value, a.language, a.diffStyle, a.forceInlineComparison, a.context, a.ignoreMatchingLines) : ur(t.value, r.value, a.language, a.diffStyle, a.forceInlineComparison, a.context, a.ignoreMatchingLines)), s = Ve(i.value), o = he(() => s.value.stat.additionsNum === 0 && s.value.stat.deletionsNum === 0), l = Ve(-1);
  5411. function c() {
  5412. const g = document.querySelectorAll(".blob-code-addition");
  5413. l.value < g.length - 1 && (l.value++, h(g));
  5414. }
  5415. function u() {
  5416. const g = document.querySelectorAll(".blob-code-addition");
  5417. l.value > 0 && (l.value--, h(g));
  5418. }
  5419. function h(g) {
  5420. g.forEach((_) => _.classList.remove("current-diff"));
  5421. const p = g[l.value];
  5422. p && (p.classList.add("current-diff"), p.scrollIntoView({
  5423. behavior: "smooth",
  5424. block: "center"
  5425. }));
  5426. }
  5427. return Kn(() => a, () => {
  5428. s.value = i.value, f("diff", {
  5429. stat: {
  5430. isChanged: !o.value,
  5431. addNum: s.value.stat.additionsNum,
  5432. delNum: s.value.stat.deletionsNum
  5433. }
  5434. });
  5435. }, {
  5436. deep: !0,
  5437. immediate: !0
  5438. }), {
  5439. isUnifiedViewer: d,
  5440. diffChange: s,
  5441. goToNextDiff: c,
  5442. goToPrevDiff: u
  5443. };
  5444. };
  5445. me.components = Object.assign({
  5446. DownArrowIcon: Ur,
  5447. UpArrowIcon: Gr,
  5448. UnifiedViewer: yr,
  5449. SplitViewer: Lr
  5450. }, me.components);
  5451. var Kr = function() {
  5452. var e = this, n = e.$createElement, a = e._self._c || n;
  5453. return a("div", {
  5454. staticClass: "code-diff-view",
  5455. style: {
  5456. maxHeight: e.maxHeight
  5457. },
  5458. attrs: {
  5459. theme: e.theme
  5460. }
  5461. }, [e.hideHeader ? e._e() : a("div", {
  5462. staticClass: "file-header"
  5463. }, [e.isUnifiedViewer ? a("div", {
  5464. staticClass: "file-info"
  5465. }, [a("span", [a("div", {
  5466. staticClass: "info-left"
  5467. }, [e._v(e._s(e.filename))]), a("div", {
  5468. staticClass: "info-left"
  5469. }, [e._v(e._s(e.newFilename))])]), a("span", {
  5470. staticClass: "diff-commandbar"
  5471. }, [a("button", {
  5472. staticClass: "command-item-button",
  5473. attrs: {
  5474. title: "Next Change"
  5475. },
  5476. on: {
  5477. click: e.goToNextDiff
  5478. }
  5479. }, [a("DownArrowIcon")], 1), a("button", {
  5480. staticClass: "command-item-button",
  5481. attrs: {
  5482. title: "Previous Change"
  5483. },
  5484. on: {
  5485. click: e.goToPrevDiff
  5486. }
  5487. }, [a("UpArrowIcon")], 1)]), e.hideStat ? e._e() : a("span", {
  5488. staticClass: "diff-stat"
  5489. }, [e._t("stat", function() {
  5490. return [a("span", {
  5491. staticClass: "diff-stat-added"
  5492. }, [e._v("+" + e._s(e.diffChange.stat.additionsNum) + " additions")]), a("span", {
  5493. staticClass: "diff-stat-deleted"
  5494. }, [e._v("-" + e._s(e.diffChange.stat.deletionsNum) + " deletions")])];
  5495. }, {
  5496. stat: e.diffChange.stat
  5497. })], 2)]) : a("div", {
  5498. staticClass: "file-info"
  5499. }, [a("span", {
  5500. staticClass: "info-left"
  5501. }, [e._v(e._s(e.filename))]), a("span", {
  5502. staticClass: "info-right"
  5503. }, [a("span", {
  5504. staticStyle: {
  5505. "margin-left": "20px"
  5506. }
  5507. }, [e._v(e._s(e.newFilename))]), a("span", {
  5508. staticClass: "diff-commandbar"
  5509. }, [a("button", {
  5510. staticClass: "command-item-button",
  5511. attrs: {
  5512. title: "Next Change"
  5513. },
  5514. on: {
  5515. click: e.goToNextDiff
  5516. }
  5517. }, [a("DownArrowIcon")], 1), a("button", {
  5518. staticClass: "command-item-button",
  5519. attrs: {
  5520. title: "Previous Change"
  5521. },
  5522. on: {
  5523. click: e.goToPrevDiff
  5524. }
  5525. }, [a("UpArrowIcon")], 1)]), e.hideStat ? e._e() : a("span", {
  5526. staticClass: "diff-stat"
  5527. }, [e._t("stat", function() {
  5528. return [a("span", {
  5529. staticClass: "diff-stat-added"
  5530. }, [e._v("+" + e._s(e.diffChange.stat.additionsNum) + " additions")]), a("span", {
  5531. staticClass: "diff-stat-deleted"
  5532. }, [e._v("-" + e._s(e.diffChange.stat.deletionsNum) + " deletions")])];
  5533. }, {
  5534. stat: e.diffChange.stat
  5535. })], 2)])])]), e.isUnifiedViewer ? a("UnifiedViewer", {
  5536. attrs: {
  5537. "diff-change": e.diffChange
  5538. }
  5539. }) : a("SplitViewer", {
  5540. attrs: {
  5541. "diff-change": e.diffChange
  5542. }
  5543. })], 1);
  5544. }, Wr = [];
  5545. const pn = {};
  5546. var qr = /* @__PURE__ */ oe(
  5547. me,
  5548. Kr,
  5549. Wr,
  5550. !1,
  5551. Qr,
  5552. null,
  5553. null,
  5554. null
  5555. );
  5556. function Qr(e) {
  5557. for (let n in pn)
  5558. this[n] = pn[n];
  5559. }
  5560. const jr = /* @__PURE__ */ function() {
  5561. return qr.exports;
  5562. }();
  5563. function Zr(e) {
  5564. e.component("CodeDiff", jr);
  5565. }
  5566. const Xr = {
  5567. install: Zr,
  5568. hljs: j
  5569. };
  5570. export {
  5571. jr as CodeDiff,
  5572. Xr as default,
  5573. j as hljs
  5574. };