basic.js 364 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  3. typeof define === 'function' && define.amd ? define(factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.renderVueComponentToString = factory());
  5. })(this, (function () { 'use strict';
  6. var emptyObject = Object.freeze({});
  7. var isArray = Array.isArray;
  8. // These helpers produce better VM code in JS engines due to their
  9. // explicitness and function inlining.
  10. function isUndef(v) {
  11. return v === undefined || v === null;
  12. }
  13. function isDef(v) {
  14. return v !== undefined && v !== null;
  15. }
  16. function isTrue(v) {
  17. return v === true;
  18. }
  19. function isFalse(v) {
  20. return v === false;
  21. }
  22. /**
  23. * Check if value is primitive.
  24. */
  25. function isPrimitive(value) {
  26. return (typeof value === 'string' ||
  27. typeof value === 'number' ||
  28. // $flow-disable-line
  29. typeof value === 'symbol' ||
  30. typeof value === 'boolean');
  31. }
  32. function isFunction(value) {
  33. return typeof value === 'function';
  34. }
  35. /**
  36. * Quick object check - this is primarily used to tell
  37. * objects from primitive values when we know the value
  38. * is a JSON-compliant type.
  39. */
  40. function isObject(obj) {
  41. return obj !== null && typeof obj === 'object';
  42. }
  43. /**
  44. * Get the raw type string of a value, e.g., [object Object].
  45. */
  46. var _toString = Object.prototype.toString;
  47. function toRawType(value) {
  48. return _toString.call(value).slice(8, -1);
  49. }
  50. /**
  51. * Strict object type check. Only returns true
  52. * for plain JavaScript objects.
  53. */
  54. function isPlainObject(obj) {
  55. return _toString.call(obj) === '[object Object]';
  56. }
  57. /**
  58. * Check if val is a valid array index.
  59. */
  60. function isValidArrayIndex(val) {
  61. var n = parseFloat(String(val));
  62. return n >= 0 && Math.floor(n) === n && isFinite(val);
  63. }
  64. function isPromise(val) {
  65. return (isDef(val) &&
  66. typeof val.then === 'function' &&
  67. typeof val.catch === 'function');
  68. }
  69. /**
  70. * Convert a value to a string that is actually rendered.
  71. */
  72. function toString(val) {
  73. return val == null
  74. ? ''
  75. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  76. ? JSON.stringify(val, null, 2)
  77. : String(val);
  78. }
  79. /**
  80. * Convert an input value to a number for persistence.
  81. * If the conversion fails, return original string.
  82. */
  83. function toNumber(val) {
  84. var n = parseFloat(val);
  85. return isNaN(n) ? val : n;
  86. }
  87. /**
  88. * Make a map and return a function for checking if a key
  89. * is in that map.
  90. */
  91. function makeMap(str, expectsLowerCase) {
  92. var map = Object.create(null);
  93. var list = str.split(',');
  94. for (var i = 0; i < list.length; i++) {
  95. map[list[i]] = true;
  96. }
  97. return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };
  98. }
  99. /**
  100. * Check if a tag is a built-in tag.
  101. */
  102. var isBuiltInTag = makeMap('slot,component', true);
  103. /**
  104. * Check if an attribute is a reserved attribute.
  105. */
  106. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  107. /**
  108. * Check whether an object has the property.
  109. */
  110. var hasOwnProperty = Object.prototype.hasOwnProperty;
  111. function hasOwn(obj, key) {
  112. return hasOwnProperty.call(obj, key);
  113. }
  114. /**
  115. * Create a cached version of a pure function.
  116. */
  117. function cached(fn) {
  118. var cache = Object.create(null);
  119. return function cachedFn(str) {
  120. var hit = cache[str];
  121. return hit || (cache[str] = fn(str));
  122. };
  123. }
  124. /**
  125. * Camelize a hyphen-delimited string.
  126. */
  127. var camelizeRE = /-(\w)/g;
  128. var camelize = cached(function (str) {
  129. return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });
  130. });
  131. /**
  132. * Capitalize a string.
  133. */
  134. var capitalize = cached(function (str) {
  135. return str.charAt(0).toUpperCase() + str.slice(1);
  136. });
  137. /**
  138. * Hyphenate a camelCase string.
  139. */
  140. var hyphenateRE = /\B([A-Z])/g;
  141. var hyphenate = cached(function (str) {
  142. return str.replace(hyphenateRE, '-$1').toLowerCase();
  143. });
  144. /**
  145. * Mix properties into target object.
  146. */
  147. function extend(to, _from) {
  148. for (var key in _from) {
  149. to[key] = _from[key];
  150. }
  151. return to;
  152. }
  153. /**
  154. * Merge an Array of Objects into a single Object.
  155. */
  156. function toObject(arr) {
  157. var res = {};
  158. for (var i = 0; i < arr.length; i++) {
  159. if (arr[i]) {
  160. extend(res, arr[i]);
  161. }
  162. }
  163. return res;
  164. }
  165. /* eslint-disable no-unused-vars */
  166. /**
  167. * Perform no operation.
  168. * Stubbing args to make Flow happy without leaving useless transpiled code
  169. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  170. */
  171. function noop$1(a, b, c) { }
  172. /**
  173. * Always return false.
  174. */
  175. var no = function (a, b, c) { return false; };
  176. /* eslint-enable no-unused-vars */
  177. /**
  178. * Return the same value.
  179. */
  180. var identity = function (_) { return _; };
  181. /**
  182. * Generate a string containing static keys from compiler modules.
  183. */
  184. function genStaticKeys(modules) {
  185. return modules
  186. .reduce(function (keys, m) {
  187. return keys.concat(m.staticKeys || []);
  188. }, [])
  189. .join(',');
  190. }
  191. /**
  192. * Check if two values are loosely equal - that is,
  193. * if they are plain objects, do they have the same shape?
  194. */
  195. function looseEqual(a, b) {
  196. if (a === b)
  197. return true;
  198. var isObjectA = isObject(a);
  199. var isObjectB = isObject(b);
  200. if (isObjectA && isObjectB) {
  201. try {
  202. var isArrayA = Array.isArray(a);
  203. var isArrayB = Array.isArray(b);
  204. if (isArrayA && isArrayB) {
  205. return (a.length === b.length &&
  206. a.every(function (e, i) {
  207. return looseEqual(e, b[i]);
  208. }));
  209. }
  210. else if (a instanceof Date && b instanceof Date) {
  211. return a.getTime() === b.getTime();
  212. }
  213. else if (!isArrayA && !isArrayB) {
  214. var keysA = Object.keys(a);
  215. var keysB = Object.keys(b);
  216. return (keysA.length === keysB.length &&
  217. keysA.every(function (key) {
  218. return looseEqual(a[key], b[key]);
  219. }));
  220. }
  221. else {
  222. /* istanbul ignore next */
  223. return false;
  224. }
  225. }
  226. catch (e) {
  227. /* istanbul ignore next */
  228. return false;
  229. }
  230. }
  231. else if (!isObjectA && !isObjectB) {
  232. return String(a) === String(b);
  233. }
  234. else {
  235. return false;
  236. }
  237. }
  238. /**
  239. * Return the first index at which a loosely equal value can be
  240. * found in the array (if value is a plain object, the array must
  241. * contain an object of the same shape), or -1 if it is not present.
  242. */
  243. function looseIndexOf(arr, val) {
  244. for (var i = 0; i < arr.length; i++) {
  245. if (looseEqual(arr[i], val))
  246. return i;
  247. }
  248. return -1;
  249. }
  250. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill
  251. function hasChanged(x, y) {
  252. if (x === y) {
  253. return x === 0 && 1 / x !== 1 / y;
  254. }
  255. else {
  256. return x === x || y === y;
  257. }
  258. }
  259. var isAttr = makeMap('accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
  260. 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
  261. 'checked,cite,class,code,codebase,color,cols,colspan,content,' +
  262. 'contenteditable,contextmenu,controls,coords,data,datetime,default,' +
  263. 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,for,' +
  264. 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' +
  265. 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' +
  266. 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' +
  267. 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' +
  268. 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' +
  269. 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' +
  270. 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' +
  271. 'target,title,usemap,value,width,wrap');
  272. var unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; // eslint-disable-line no-control-regex
  273. var isSSRUnsafeAttr = function (name) {
  274. return unsafeAttrCharRE.test(name);
  275. };
  276. /* istanbul ignore next */
  277. var isRenderableAttr = function (name) {
  278. return (isAttr(name) || name.indexOf('data-') === 0 || name.indexOf('aria-') === 0);
  279. };
  280. var propsToAttrMap = {
  281. acceptCharset: 'accept-charset',
  282. className: 'class',
  283. htmlFor: 'for',
  284. httpEquiv: 'http-equiv'
  285. };
  286. var ESC = {
  287. '<': '&lt;',
  288. '>': '&gt;',
  289. '"': '&quot;',
  290. '&': '&amp;'
  291. };
  292. function escape(s) {
  293. return s.replace(/[<>"&]/g, escapeChar);
  294. }
  295. function escapeChar(a) {
  296. return ESC[a] || a;
  297. }
  298. var noUnitNumericStyleProps = {
  299. 'animation-iteration-count': true,
  300. 'border-image-outset': true,
  301. 'border-image-slice': true,
  302. 'border-image-width': true,
  303. 'box-flex': true,
  304. 'box-flex-group': true,
  305. 'box-ordinal-group': true,
  306. 'column-count': true,
  307. columns: true,
  308. flex: true,
  309. 'flex-grow': true,
  310. 'flex-positive': true,
  311. 'flex-shrink': true,
  312. 'flex-negative': true,
  313. 'flex-order': true,
  314. 'grid-row': true,
  315. 'grid-row-end': true,
  316. 'grid-row-span': true,
  317. 'grid-row-start': true,
  318. 'grid-column': true,
  319. 'grid-column-end': true,
  320. 'grid-column-span': true,
  321. 'grid-column-start': true,
  322. 'font-weight': true,
  323. 'line-clamp': true,
  324. 'line-height': true,
  325. opacity: true,
  326. order: true,
  327. orphans: true,
  328. 'tab-size': true,
  329. widows: true,
  330. 'z-index': true,
  331. zoom: true,
  332. // SVG
  333. 'fill-opacity': true,
  334. 'flood-opacity': true,
  335. 'stop-opacity': true,
  336. 'stroke-dasharray': true,
  337. 'stroke-dashoffset': true,
  338. 'stroke-miterlimit': true,
  339. 'stroke-opacity': true,
  340. 'stroke-width': true
  341. };
  342. // these are reserved for web because they are directly compiled away
  343. // during template compilation
  344. makeMap('style,class');
  345. // attributes that should be using props for binding
  346. var acceptValue = makeMap('input,textarea,option,select,progress');
  347. var mustUseProp = function (tag, type, attr) {
  348. return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||
  349. (attr === 'selected' && tag === 'option') ||
  350. (attr === 'checked' && tag === 'input') ||
  351. (attr === 'muted' && tag === 'video'));
  352. };
  353. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  354. var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
  355. var convertEnumeratedValue = function (key, value) {
  356. return isFalsyAttrValue(value) || value === 'false'
  357. ? 'false'
  358. : // allow arbitrary string value for contenteditable
  359. key === 'contenteditable' && isValidContentEditableValue(value)
  360. ? value
  361. : 'true';
  362. };
  363. var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  364. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  365. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  366. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  367. 'required,reversed,scoped,seamless,selected,sortable,' +
  368. 'truespeed,typemustmatch,visible');
  369. var isFalsyAttrValue = function (val) {
  370. return val == null || val === false;
  371. };
  372. function renderAttrs$1(node) {
  373. var attrs = node.data.attrs;
  374. var res = '';
  375. var opts = node.parent && node.parent.componentOptions;
  376. if (isUndef(opts) || opts.Ctor.options.inheritAttrs !== false) {
  377. var parent_1 = node.parent;
  378. while (isDef(parent_1)) {
  379. // Stop fallthrough in case parent has inheritAttrs option set to false
  380. if (parent_1.componentOptions &&
  381. parent_1.componentOptions.Ctor.options.inheritAttrs === false) {
  382. break;
  383. }
  384. if (isDef(parent_1.data) && isDef(parent_1.data.attrs)) {
  385. attrs = extend(extend({}, attrs), parent_1.data.attrs);
  386. }
  387. parent_1 = parent_1.parent;
  388. }
  389. }
  390. if (isUndef(attrs)) {
  391. return res;
  392. }
  393. for (var key in attrs) {
  394. if (isSSRUnsafeAttr(key)) {
  395. continue;
  396. }
  397. if (key === 'style') {
  398. // leave it to the style module
  399. continue;
  400. }
  401. res += renderAttr(key, attrs[key]);
  402. }
  403. return res;
  404. }
  405. function renderAttr(key, value) {
  406. if (isBooleanAttr(key)) {
  407. if (!isFalsyAttrValue(value)) {
  408. return " ".concat(key, "=\"").concat(key, "\"");
  409. }
  410. }
  411. else if (isEnumeratedAttr(key)) {
  412. return " ".concat(key, "=\"").concat(escape(convertEnumeratedValue(key, value)), "\"");
  413. }
  414. else if (!isFalsyAttrValue(value)) {
  415. return " ".concat(key, "=\"").concat(escape(String(value)), "\"");
  416. }
  417. return '';
  418. }
  419. /**
  420. * @internal
  421. */
  422. var VNode = /** @class */ (function () {
  423. function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {
  424. this.tag = tag;
  425. this.data = data;
  426. this.children = children;
  427. this.text = text;
  428. this.elm = elm;
  429. this.ns = undefined;
  430. this.context = context;
  431. this.fnContext = undefined;
  432. this.fnOptions = undefined;
  433. this.fnScopeId = undefined;
  434. this.key = data && data.key;
  435. this.componentOptions = componentOptions;
  436. this.componentInstance = undefined;
  437. this.parent = undefined;
  438. this.raw = false;
  439. this.isStatic = false;
  440. this.isRootInsert = true;
  441. this.isComment = false;
  442. this.isCloned = false;
  443. this.isOnce = false;
  444. this.asyncFactory = asyncFactory;
  445. this.asyncMeta = undefined;
  446. this.isAsyncPlaceholder = false;
  447. }
  448. Object.defineProperty(VNode.prototype, "child", {
  449. // DEPRECATED: alias for componentInstance for backwards compat.
  450. /* istanbul ignore next */
  451. get: function () {
  452. return this.componentInstance;
  453. },
  454. enumerable: false,
  455. configurable: true
  456. });
  457. return VNode;
  458. }());
  459. var createEmptyVNode = function (text) {
  460. if (text === void 0) { text = ''; }
  461. var node = new VNode();
  462. node.text = text;
  463. node.isComment = true;
  464. return node;
  465. };
  466. function createTextVNode(val) {
  467. return new VNode(undefined, undefined, undefined, String(val));
  468. }
  469. // optimized shallow clone
  470. // used for static nodes and slot nodes because they may be reused across
  471. // multiple renders, cloning them avoids errors when DOM manipulations rely
  472. // on their elm reference.
  473. function cloneVNode(vnode) {
  474. var cloned = new VNode(vnode.tag, vnode.data,
  475. // #7975
  476. // clone children array to avoid mutating original in case of cloning
  477. // a child.
  478. vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);
  479. cloned.ns = vnode.ns;
  480. cloned.isStatic = vnode.isStatic;
  481. cloned.key = vnode.key;
  482. cloned.isComment = vnode.isComment;
  483. cloned.fnContext = vnode.fnContext;
  484. cloned.fnOptions = vnode.fnOptions;
  485. cloned.fnScopeId = vnode.fnScopeId;
  486. cloned.asyncMeta = vnode.asyncMeta;
  487. cloned.isCloned = true;
  488. return cloned;
  489. }
  490. function renderDOMProps$1(node) {
  491. var props = node.data.domProps;
  492. var res = '';
  493. var parent = node.parent;
  494. while (isDef(parent)) {
  495. if (parent.data && parent.data.domProps) {
  496. props = extend(extend({}, props), parent.data.domProps);
  497. }
  498. parent = parent.parent;
  499. }
  500. if (isUndef(props)) {
  501. return res;
  502. }
  503. var attrs = node.data.attrs;
  504. for (var key in props) {
  505. if (key === 'innerHTML') {
  506. setText(node, props[key], true);
  507. }
  508. else if (key === 'textContent') {
  509. setText(node, props[key], false);
  510. }
  511. else if (key === 'value' && node.tag === 'textarea') {
  512. setText(node, toString(props[key]), false);
  513. }
  514. else {
  515. // $flow-disable-line (WTF?)
  516. var attr = propsToAttrMap[key] || key.toLowerCase();
  517. if (isRenderableAttr(attr) &&
  518. // avoid rendering double-bound props/attrs twice
  519. !(isDef(attrs) && isDef(attrs[attr]))) {
  520. res += renderAttr(attr, props[key]);
  521. }
  522. }
  523. }
  524. return res;
  525. }
  526. function setText(node, text, raw) {
  527. var child = new VNode(undefined, undefined, undefined, text);
  528. child.raw = raw;
  529. node.children = [child];
  530. }
  531. /**
  532. * unicode letters used for parsing html tags, component names and property paths.
  533. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  534. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  535. */
  536. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  537. /**
  538. * Define a property.
  539. */
  540. function def(obj, key, val, enumerable) {
  541. Object.defineProperty(obj, key, {
  542. value: val,
  543. enumerable: !!enumerable,
  544. writable: true,
  545. configurable: true
  546. });
  547. }
  548. // can we use __proto__?
  549. var hasProto = '__proto__' in {};
  550. // Browser environment sniffing
  551. var inBrowser = typeof window !== 'undefined';
  552. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  553. var isIE = UA && /msie|trident/.test(UA);
  554. UA && UA.indexOf('msie 9.0') > 0;
  555. var isEdge = UA && UA.indexOf('edge/') > 0;
  556. UA && UA.indexOf('android') > 0;
  557. UA && /iphone|ipad|ipod|ios/.test(UA);
  558. UA && /chrome\/\d+/.test(UA) && !isEdge;
  559. UA && /phantomjs/.test(UA);
  560. UA && UA.match(/firefox\/(\d+)/);
  561. // Firefox has a "watch" function on Object.prototype...
  562. // @ts-expect-error firebox support
  563. var nativeWatch = {}.watch;
  564. var supportsPassive = false;
  565. if (inBrowser) {
  566. try {
  567. var opts = {};
  568. Object.defineProperty(opts, 'passive', {
  569. get: function () {
  570. /* istanbul ignore next */
  571. supportsPassive = true;
  572. }
  573. }); // https://github.com/facebook/flow/issues/285
  574. window.addEventListener('test-passive', null, opts);
  575. }
  576. catch (e) { }
  577. }
  578. // this needs to be lazy-evaled because vue may be required before
  579. // vue-server-renderer can set VUE_ENV
  580. var _isServer;
  581. var isServerRendering = function () {
  582. if (_isServer === undefined) {
  583. /* istanbul ignore if */
  584. if (!inBrowser && typeof global !== 'undefined') {
  585. // detect presence of vue-server-renderer and avoid
  586. // Webpack shimming the process
  587. _isServer =
  588. global['process'] && global['process'].env.VUE_ENV === 'server';
  589. }
  590. else {
  591. _isServer = false;
  592. }
  593. }
  594. return _isServer;
  595. };
  596. /* istanbul ignore next */
  597. function isNative(Ctor) {
  598. return typeof Ctor === 'function' && /native code/.test(Ctor.toString());
  599. }
  600. var hasSymbol = typeof Symbol !== 'undefined' &&
  601. isNative(Symbol) &&
  602. typeof Reflect !== 'undefined' &&
  603. isNative(Reflect.ownKeys);
  604. var _Set; // $flow-disable-line
  605. /* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {
  606. // use native Set when available.
  607. _Set = Set;
  608. }
  609. else {
  610. // a non-standard Set polyfill that only works with primitive keys.
  611. _Set = /** @class */ (function () {
  612. function Set() {
  613. this.set = Object.create(null);
  614. }
  615. Set.prototype.has = function (key) {
  616. return this.set[key] === true;
  617. };
  618. Set.prototype.add = function (key) {
  619. this.set[key] = true;
  620. };
  621. Set.prototype.clear = function () {
  622. this.set = Object.create(null);
  623. };
  624. return Set;
  625. }());
  626. }
  627. var SSR_ATTR = 'data-server-rendered';
  628. var ASSET_TYPES = ['component', 'directive', 'filter'];
  629. var LIFECYCLE_HOOKS = [
  630. 'beforeCreate',
  631. 'created',
  632. 'beforeMount',
  633. 'mounted',
  634. 'beforeUpdate',
  635. 'updated',
  636. 'beforeDestroy',
  637. 'destroyed',
  638. 'activated',
  639. 'deactivated',
  640. 'errorCaptured',
  641. 'serverPrefetch',
  642. 'renderTracked',
  643. 'renderTriggered'
  644. ];
  645. var config = {
  646. /**
  647. * Option merge strategies (used in core/util/options)
  648. */
  649. // $flow-disable-line
  650. optionMergeStrategies: Object.create(null),
  651. /**
  652. * Whether to suppress warnings.
  653. */
  654. silent: false,
  655. /**
  656. * Show production mode tip message on boot?
  657. */
  658. productionTip: true,
  659. /**
  660. * Whether to enable devtools
  661. */
  662. devtools: true,
  663. /**
  664. * Whether to record perf
  665. */
  666. performance: false,
  667. /**
  668. * Error handler for watcher errors
  669. */
  670. errorHandler: null,
  671. /**
  672. * Warn handler for watcher warns
  673. */
  674. warnHandler: null,
  675. /**
  676. * Ignore certain custom elements
  677. */
  678. ignoredElements: [],
  679. /**
  680. * Custom user key aliases for v-on
  681. */
  682. // $flow-disable-line
  683. keyCodes: Object.create(null),
  684. /**
  685. * Check if a tag is reserved so that it cannot be registered as a
  686. * component. This is platform-dependent and may be overwritten.
  687. */
  688. isReservedTag: no,
  689. /**
  690. * Check if an attribute is reserved so that it cannot be used as a component
  691. * prop. This is platform-dependent and may be overwritten.
  692. */
  693. isReservedAttr: no,
  694. /**
  695. * Check if a tag is an unknown element.
  696. * Platform-dependent.
  697. */
  698. isUnknownElement: no,
  699. /**
  700. * Get the namespace of an element
  701. */
  702. getTagNamespace: noop$1,
  703. /**
  704. * Parse the real tag name for the specific platform.
  705. */
  706. parsePlatformTagName: identity,
  707. /**
  708. * Check if an attribute must be bound using property, e.g. value
  709. * Platform-dependent.
  710. */
  711. mustUseProp: no,
  712. /**
  713. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  714. * This will significantly reduce performance if set to false.
  715. */
  716. async: true,
  717. /**
  718. * Exposed for legacy reasons
  719. */
  720. _lifecycleHooks: LIFECYCLE_HOOKS
  721. };
  722. var currentInstance = null;
  723. /**
  724. * @internal
  725. */
  726. function setCurrentInstance(vm) {
  727. if (vm === void 0) { vm = null; }
  728. if (!vm)
  729. currentInstance && currentInstance._scope.off();
  730. currentInstance = vm;
  731. vm && vm._scope.on();
  732. }
  733. /* not type checking this file because flow doesn't play well with Proxy */
  734. {
  735. makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +
  736. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  737. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
  738. 'require' // for Webpack/Browserify
  739. );
  740. var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);
  741. if (hasProxy_1) {
  742. var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  743. config.keyCodes = new Proxy(config.keyCodes, {
  744. set: function (target, key, value) {
  745. if (isBuiltInModifier_1(key)) {
  746. warn$2("Avoid overwriting built-in modifier in config.keyCodes: .".concat(key));
  747. return false;
  748. }
  749. else {
  750. target[key] = value;
  751. return true;
  752. }
  753. }
  754. });
  755. }
  756. }
  757. /******************************************************************************
  758. Copyright (c) Microsoft Corporation.
  759. Permission to use, copy, modify, and/or distribute this software for any
  760. purpose with or without fee is hereby granted.
  761. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  762. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  763. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  764. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  765. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  766. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  767. PERFORMANCE OF THIS SOFTWARE.
  768. ***************************************************************************** */
  769. var __assign = function() {
  770. __assign = Object.assign || function __assign(t) {
  771. for (var s, i = 1, n = arguments.length; i < n; i++) {
  772. s = arguments[i];
  773. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
  774. }
  775. return t;
  776. };
  777. return __assign.apply(this, arguments);
  778. };
  779. var uid = 0;
  780. /**
  781. * A dep is an observable that can have multiple
  782. * directives subscribing to it.
  783. * @internal
  784. */
  785. var Dep = /** @class */ (function () {
  786. function Dep() {
  787. // pending subs cleanup
  788. this._pending = false;
  789. this.id = uid++;
  790. this.subs = [];
  791. }
  792. Dep.prototype.addSub = function (sub) {
  793. this.subs.push(sub);
  794. };
  795. Dep.prototype.removeSub = function (sub) {
  796. // #12696 deps with massive amount of subscribers are extremely slow to
  797. // clean up in Chromium
  798. // to workaround this, we unset the sub for now, and clear them on
  799. // next scheduler flush.
  800. this.subs[this.subs.indexOf(sub)] = null;
  801. if (!this._pending) {
  802. this._pending = true;
  803. }
  804. };
  805. Dep.prototype.depend = function (info) {
  806. if (Dep.target) {
  807. Dep.target.addDep(this);
  808. if (info && Dep.target.onTrack) {
  809. Dep.target.onTrack(__assign({ effect: Dep.target }, info));
  810. }
  811. }
  812. };
  813. Dep.prototype.notify = function (info) {
  814. // stabilize the subscriber list first
  815. var subs = this.subs.filter(function (s) { return s; });
  816. for (var i = 0, l = subs.length; i < l; i++) {
  817. var sub = subs[i];
  818. if (info) {
  819. sub.onTrigger &&
  820. sub.onTrigger(__assign({ effect: subs[i] }, info));
  821. }
  822. sub.update();
  823. }
  824. };
  825. return Dep;
  826. }());
  827. // The current target watcher being evaluated.
  828. // This is globally unique because only one watcher
  829. // can be evaluated at a time.
  830. Dep.target = null;
  831. var targetStack = [];
  832. function pushTarget(target) {
  833. targetStack.push(target);
  834. Dep.target = target;
  835. }
  836. function popTarget() {
  837. targetStack.pop();
  838. Dep.target = targetStack[targetStack.length - 1];
  839. }
  840. /*
  841. * not type checking this file because flow doesn't play well with
  842. * dynamically accessing methods on Array prototype
  843. */
  844. var arrayProto = Array.prototype;
  845. var arrayMethods = Object.create(arrayProto);
  846. var methodsToPatch = [
  847. 'push',
  848. 'pop',
  849. 'shift',
  850. 'unshift',
  851. 'splice',
  852. 'sort',
  853. 'reverse'
  854. ];
  855. /**
  856. * Intercept mutating methods and emit events
  857. */
  858. methodsToPatch.forEach(function (method) {
  859. // cache original method
  860. var original = arrayProto[method];
  861. def(arrayMethods, method, function mutator() {
  862. var args = [];
  863. for (var _i = 0; _i < arguments.length; _i++) {
  864. args[_i] = arguments[_i];
  865. }
  866. var result = original.apply(this, args);
  867. var ob = this.__ob__;
  868. var inserted;
  869. switch (method) {
  870. case 'push':
  871. case 'unshift':
  872. inserted = args;
  873. break;
  874. case 'splice':
  875. inserted = args.slice(2);
  876. break;
  877. }
  878. if (inserted)
  879. ob.observeArray(inserted);
  880. // notify change
  881. {
  882. ob.dep.notify({
  883. type: "array mutation" /* TriggerOpTypes.ARRAY_MUTATION */,
  884. target: this,
  885. key: method
  886. });
  887. }
  888. return result;
  889. });
  890. });
  891. var rawMap = new WeakMap();
  892. function isReadonly(value) {
  893. return !!(value && value.__v_isReadonly);
  894. }
  895. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  896. var NO_INIITIAL_VALUE = {};
  897. /**
  898. * In some cases we may want to disable observation inside a component's
  899. * update computation.
  900. */
  901. var shouldObserve = true;
  902. function toggleObserving(value) {
  903. shouldObserve = value;
  904. }
  905. // ssr mock dep
  906. var mockDep = {
  907. notify: noop$1,
  908. depend: noop$1,
  909. addSub: noop$1,
  910. removeSub: noop$1
  911. };
  912. /**
  913. * Observer class that is attached to each observed
  914. * object. Once attached, the observer converts the target
  915. * object's property keys into getter/setters that
  916. * collect dependencies and dispatch updates.
  917. */
  918. var Observer = /** @class */ (function () {
  919. function Observer(value, shallow, mock) {
  920. if (shallow === void 0) { shallow = false; }
  921. if (mock === void 0) { mock = false; }
  922. this.value = value;
  923. this.shallow = shallow;
  924. this.mock = mock;
  925. // this.value = value
  926. this.dep = mock ? mockDep : new Dep();
  927. this.vmCount = 0;
  928. def(value, '__ob__', this);
  929. if (isArray(value)) {
  930. if (!mock) {
  931. if (hasProto) {
  932. value.__proto__ = arrayMethods;
  933. /* eslint-enable no-proto */
  934. }
  935. else {
  936. for (var i = 0, l = arrayKeys.length; i < l; i++) {
  937. var key = arrayKeys[i];
  938. def(value, key, arrayMethods[key]);
  939. }
  940. }
  941. }
  942. if (!shallow) {
  943. this.observeArray(value);
  944. }
  945. }
  946. else {
  947. /**
  948. * Walk through all properties and convert them into
  949. * getter/setters. This method should only be called when
  950. * value type is Object.
  951. */
  952. var keys = Object.keys(value);
  953. for (var i = 0; i < keys.length; i++) {
  954. var key = keys[i];
  955. defineReactive(value, key, NO_INIITIAL_VALUE, undefined, shallow, mock);
  956. }
  957. }
  958. }
  959. /**
  960. * Observe a list of Array items.
  961. */
  962. Observer.prototype.observeArray = function (value) {
  963. for (var i = 0, l = value.length; i < l; i++) {
  964. observe(value[i], false, this.mock);
  965. }
  966. };
  967. return Observer;
  968. }());
  969. // helpers
  970. /**
  971. * Attempt to create an observer instance for a value,
  972. * returns the new observer if successfully observed,
  973. * or the existing observer if the value already has one.
  974. */
  975. function observe(value, shallow, ssrMockReactivity) {
  976. if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  977. return value.__ob__;
  978. }
  979. if (shouldObserve &&
  980. (ssrMockReactivity || !isServerRendering()) &&
  981. (isArray(value) || isPlainObject(value)) &&
  982. Object.isExtensible(value) &&
  983. !value.__v_skip /* ReactiveFlags.SKIP */ &&
  984. !rawMap.has(value) &&
  985. !isRef(value) &&
  986. !(value instanceof VNode)) {
  987. return new Observer(value, shallow, ssrMockReactivity);
  988. }
  989. }
  990. /**
  991. * Define a reactive property on an Object.
  992. */
  993. function defineReactive(obj, key, val, customSetter, shallow, mock) {
  994. var dep = new Dep();
  995. var property = Object.getOwnPropertyDescriptor(obj, key);
  996. if (property && property.configurable === false) {
  997. return;
  998. }
  999. // cater for pre-defined getter/setters
  1000. var getter = property && property.get;
  1001. var setter = property && property.set;
  1002. if ((!getter || setter) &&
  1003. (val === NO_INIITIAL_VALUE || arguments.length === 2)) {
  1004. val = obj[key];
  1005. }
  1006. var childOb = !shallow && observe(val, false, mock);
  1007. Object.defineProperty(obj, key, {
  1008. enumerable: true,
  1009. configurable: true,
  1010. get: function reactiveGetter() {
  1011. var value = getter ? getter.call(obj) : val;
  1012. if (Dep.target) {
  1013. {
  1014. dep.depend({
  1015. target: obj,
  1016. type: "get" /* TrackOpTypes.GET */,
  1017. key: key
  1018. });
  1019. }
  1020. if (childOb) {
  1021. childOb.dep.depend();
  1022. if (isArray(value)) {
  1023. dependArray(value);
  1024. }
  1025. }
  1026. }
  1027. return isRef(value) && !shallow ? value.value : value;
  1028. },
  1029. set: function reactiveSetter(newVal) {
  1030. var value = getter ? getter.call(obj) : val;
  1031. if (!hasChanged(value, newVal)) {
  1032. return;
  1033. }
  1034. if (customSetter) {
  1035. customSetter();
  1036. }
  1037. if (setter) {
  1038. setter.call(obj, newVal);
  1039. }
  1040. else if (getter) {
  1041. // #7981: for accessor properties without setter
  1042. return;
  1043. }
  1044. else if (!shallow && isRef(value) && !isRef(newVal)) {
  1045. value.value = newVal;
  1046. return;
  1047. }
  1048. else {
  1049. val = newVal;
  1050. }
  1051. childOb = !shallow && observe(newVal, false, mock);
  1052. {
  1053. dep.notify({
  1054. type: "set" /* TriggerOpTypes.SET */,
  1055. target: obj,
  1056. key: key,
  1057. newValue: newVal,
  1058. oldValue: value
  1059. });
  1060. }
  1061. }
  1062. });
  1063. return dep;
  1064. }
  1065. function set(target, key, val) {
  1066. if ((isUndef(target) || isPrimitive(target))) {
  1067. warn$2("Cannot set reactive property on undefined, null, or primitive value: ".concat(target));
  1068. }
  1069. if (isReadonly(target)) {
  1070. warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));
  1071. return;
  1072. }
  1073. var ob = target.__ob__;
  1074. if (isArray(target) && isValidArrayIndex(key)) {
  1075. target.length = Math.max(target.length, key);
  1076. target.splice(key, 1, val);
  1077. // when mocking for SSR, array methods are not hijacked
  1078. if (ob && !ob.shallow && ob.mock) {
  1079. observe(val, false, true);
  1080. }
  1081. return val;
  1082. }
  1083. if (key in target && !(key in Object.prototype)) {
  1084. target[key] = val;
  1085. return val;
  1086. }
  1087. if (target._isVue || (ob && ob.vmCount)) {
  1088. warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +
  1089. 'at runtime - declare it upfront in the data option.');
  1090. return val;
  1091. }
  1092. if (!ob) {
  1093. target[key] = val;
  1094. return val;
  1095. }
  1096. defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);
  1097. {
  1098. ob.dep.notify({
  1099. type: "add" /* TriggerOpTypes.ADD */,
  1100. target: target,
  1101. key: key,
  1102. newValue: val,
  1103. oldValue: undefined
  1104. });
  1105. }
  1106. return val;
  1107. }
  1108. /**
  1109. * Collect dependencies on array elements when the array is touched, since
  1110. * we cannot intercept array element access like property getters.
  1111. */
  1112. function dependArray(value) {
  1113. for (var e = void 0, i = 0, l = value.length; i < l; i++) {
  1114. e = value[i];
  1115. if (e && e.__ob__) {
  1116. e.__ob__.dep.depend();
  1117. }
  1118. if (isArray(e)) {
  1119. dependArray(e);
  1120. }
  1121. }
  1122. }
  1123. function isRef(r) {
  1124. return !!(r && r.__v_isRef === true);
  1125. }
  1126. {
  1127. var perf_1 = inBrowser && window.performance;
  1128. /* istanbul ignore if */
  1129. if (perf_1 &&
  1130. // @ts-ignore
  1131. perf_1.mark &&
  1132. // @ts-ignore
  1133. perf_1.measure &&
  1134. // @ts-ignore
  1135. perf_1.clearMarks &&
  1136. // @ts-ignore
  1137. perf_1.clearMeasures) ;
  1138. }
  1139. var normalizeEvent = cached(function (name) {
  1140. var passive = name.charAt(0) === '&';
  1141. name = passive ? name.slice(1) : name;
  1142. var once = name.charAt(0) === '~'; // Prefixed last, checked first
  1143. name = once ? name.slice(1) : name;
  1144. var capture = name.charAt(0) === '!';
  1145. name = capture ? name.slice(1) : name;
  1146. return {
  1147. name: name,
  1148. once: once,
  1149. capture: capture,
  1150. passive: passive
  1151. };
  1152. });
  1153. function createFnInvoker(fns, vm) {
  1154. function invoker() {
  1155. var fns = invoker.fns;
  1156. if (isArray(fns)) {
  1157. var cloned = fns.slice();
  1158. for (var i = 0; i < cloned.length; i++) {
  1159. invokeWithErrorHandling(cloned[i], null, arguments, vm, "v-on handler");
  1160. }
  1161. }
  1162. else {
  1163. // return handler return value for single handlers
  1164. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler");
  1165. }
  1166. }
  1167. invoker.fns = fns;
  1168. return invoker;
  1169. }
  1170. function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {
  1171. var name, cur, old, event;
  1172. for (name in on) {
  1173. cur = on[name];
  1174. old = oldOn[name];
  1175. event = normalizeEvent(name);
  1176. if (isUndef(cur)) {
  1177. warn$2("Invalid handler for event \"".concat(event.name, "\": got ") + String(cur), vm);
  1178. }
  1179. else if (isUndef(old)) {
  1180. if (isUndef(cur.fns)) {
  1181. cur = on[name] = createFnInvoker(cur, vm);
  1182. }
  1183. if (isTrue(event.once)) {
  1184. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  1185. }
  1186. add(event.name, cur, event.capture, event.passive, event.params);
  1187. }
  1188. else if (cur !== old) {
  1189. old.fns = cur;
  1190. on[name] = old;
  1191. }
  1192. }
  1193. for (name in oldOn) {
  1194. if (isUndef(on[name])) {
  1195. event = normalizeEvent(name);
  1196. remove(event.name, oldOn[name], event.capture);
  1197. }
  1198. }
  1199. }
  1200. function extractPropsFromVNodeData(data, Ctor, tag) {
  1201. // we are only extracting raw values here.
  1202. // validation and default values are handled in the child
  1203. // component itself.
  1204. var propOptions = Ctor.options.props;
  1205. if (isUndef(propOptions)) {
  1206. return;
  1207. }
  1208. var res = {};
  1209. var attrs = data.attrs, props = data.props;
  1210. if (isDef(attrs) || isDef(props)) {
  1211. for (var key in propOptions) {
  1212. var altKey = hyphenate(key);
  1213. {
  1214. var keyInLowerCase = key.toLowerCase();
  1215. if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {
  1216. tip("Prop \"".concat(keyInLowerCase, "\" is passed to component ") +
  1217. "".concat(formatComponentName(
  1218. // @ts-expect-error tag is string
  1219. tag || Ctor), ", but the declared prop name is") +
  1220. " \"".concat(key, "\". ") +
  1221. "Note that HTML attributes are case-insensitive and camelCased " +
  1222. "props need to use their kebab-case equivalents when using in-DOM " +
  1223. "templates. You should probably use \"".concat(altKey, "\" instead of \"").concat(key, "\"."));
  1224. }
  1225. }
  1226. checkProp(res, props, key, altKey, true) ||
  1227. checkProp(res, attrs, key, altKey, false);
  1228. }
  1229. }
  1230. return res;
  1231. }
  1232. function checkProp(res, hash, key, altKey, preserve) {
  1233. if (isDef(hash)) {
  1234. if (hasOwn(hash, key)) {
  1235. res[key] = hash[key];
  1236. if (!preserve) {
  1237. delete hash[key];
  1238. }
  1239. return true;
  1240. }
  1241. else if (hasOwn(hash, altKey)) {
  1242. res[key] = hash[altKey];
  1243. if (!preserve) {
  1244. delete hash[altKey];
  1245. }
  1246. return true;
  1247. }
  1248. }
  1249. return false;
  1250. }
  1251. // The template compiler attempts to minimize the need for normalization by
  1252. // statically analyzing the template at compile time.
  1253. //
  1254. // For plain HTML markup, normalization can be completely skipped because the
  1255. // generated render function is guaranteed to return Array<VNode>. There are
  1256. // two cases where extra normalization is needed:
  1257. // 1. When the children contains components - because a functional component
  1258. // may return an Array instead of a single root. In this case, just a simple
  1259. // normalization is needed - if any child is an Array, we flatten the whole
  1260. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  1261. // because functional components already normalize their own children.
  1262. function simpleNormalizeChildren(children) {
  1263. for (var i = 0; i < children.length; i++) {
  1264. if (isArray(children[i])) {
  1265. return Array.prototype.concat.apply([], children);
  1266. }
  1267. }
  1268. return children;
  1269. }
  1270. // 2. When the children contains constructs that always generated nested Arrays,
  1271. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  1272. // with hand-written render functions / JSX. In such cases a full normalization
  1273. // is needed to cater to all possible types of children values.
  1274. function normalizeChildren(children) {
  1275. return isPrimitive(children)
  1276. ? [createTextVNode(children)]
  1277. : isArray(children)
  1278. ? normalizeArrayChildren(children)
  1279. : undefined;
  1280. }
  1281. function isTextNode(node) {
  1282. return isDef(node) && isDef(node.text) && isFalse(node.isComment);
  1283. }
  1284. function normalizeArrayChildren(children, nestedIndex) {
  1285. var res = [];
  1286. var i, c, lastIndex, last;
  1287. for (i = 0; i < children.length; i++) {
  1288. c = children[i];
  1289. if (isUndef(c) || typeof c === 'boolean')
  1290. continue;
  1291. lastIndex = res.length - 1;
  1292. last = res[lastIndex];
  1293. // nested
  1294. if (isArray(c)) {
  1295. if (c.length > 0) {
  1296. c = normalizeArrayChildren(c, "".concat(nestedIndex || '', "_").concat(i));
  1297. // merge adjacent text nodes
  1298. if (isTextNode(c[0]) && isTextNode(last)) {
  1299. res[lastIndex] = createTextVNode(last.text + c[0].text);
  1300. c.shift();
  1301. }
  1302. res.push.apply(res, c);
  1303. }
  1304. }
  1305. else if (isPrimitive(c)) {
  1306. if (isTextNode(last)) {
  1307. // merge adjacent text nodes
  1308. // this is necessary for SSR hydration because text nodes are
  1309. // essentially merged when rendered to HTML strings
  1310. res[lastIndex] = createTextVNode(last.text + c);
  1311. }
  1312. else if (c !== '') {
  1313. // convert primitive to vnode
  1314. res.push(createTextVNode(c));
  1315. }
  1316. }
  1317. else {
  1318. if (isTextNode(c) && isTextNode(last)) {
  1319. // merge adjacent text nodes
  1320. res[lastIndex] = createTextVNode(last.text + c.text);
  1321. }
  1322. else {
  1323. // default key for nested array children (likely generated by v-for)
  1324. if (isTrue(children._isVList) &&
  1325. isDef(c.tag) &&
  1326. isUndef(c.key) &&
  1327. isDef(nestedIndex)) {
  1328. c.key = "__vlist".concat(nestedIndex, "_").concat(i, "__");
  1329. }
  1330. res.push(c);
  1331. }
  1332. }
  1333. }
  1334. return res;
  1335. }
  1336. var SIMPLE_NORMALIZE = 1;
  1337. var ALWAYS_NORMALIZE = 2;
  1338. // wrapper function for providing a more flexible interface
  1339. // without getting yelled at by flow
  1340. function createElement(context, tag, data, children, normalizationType, alwaysNormalize) {
  1341. if (isArray(data) || isPrimitive(data)) {
  1342. normalizationType = children;
  1343. children = data;
  1344. data = undefined;
  1345. }
  1346. if (isTrue(alwaysNormalize)) {
  1347. normalizationType = ALWAYS_NORMALIZE;
  1348. }
  1349. return _createElement(context, tag, data, children, normalizationType);
  1350. }
  1351. function _createElement(context, tag, data, children, normalizationType) {
  1352. if (isDef(data) && isDef(data.__ob__)) {
  1353. warn$2("Avoid using observed data object as vnode data: ".concat(JSON.stringify(data), "\n") + 'Always create fresh vnode data objects in each render!', context);
  1354. return createEmptyVNode();
  1355. }
  1356. // object syntax in v-bind
  1357. if (isDef(data) && isDef(data.is)) {
  1358. tag = data.is;
  1359. }
  1360. if (!tag) {
  1361. // in case of component :is set to falsy value
  1362. return createEmptyVNode();
  1363. }
  1364. // warn against non-primitive key
  1365. if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {
  1366. warn$2('Avoid using non-primitive value as key, ' +
  1367. 'use string/number value instead.', context);
  1368. }
  1369. // support single function children as default scoped slot
  1370. if (isArray(children) && isFunction(children[0])) {
  1371. data = data || {};
  1372. data.scopedSlots = { default: children[0] };
  1373. children.length = 0;
  1374. }
  1375. if (normalizationType === ALWAYS_NORMALIZE) {
  1376. children = normalizeChildren(children);
  1377. }
  1378. else if (normalizationType === SIMPLE_NORMALIZE) {
  1379. children = simpleNormalizeChildren(children);
  1380. }
  1381. var vnode, ns;
  1382. if (typeof tag === 'string') {
  1383. var Ctor = void 0;
  1384. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  1385. if ((!data || !data.pre) &&
  1386. isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {
  1387. // component
  1388. vnode = createComponent(Ctor, data, context, children, tag);
  1389. }
  1390. else {
  1391. // unknown or unlisted namespaced elements
  1392. // check at runtime because it may get assigned a namespace when its
  1393. // parent normalizes children
  1394. vnode = new VNode(tag, data, children, undefined, undefined, context);
  1395. }
  1396. }
  1397. else {
  1398. // direct component options / constructor
  1399. vnode = createComponent(tag, data, context, children);
  1400. }
  1401. if (isArray(vnode)) {
  1402. return vnode;
  1403. }
  1404. else if (isDef(vnode)) {
  1405. if (isDef(ns))
  1406. applyNS(vnode, ns);
  1407. if (isDef(data))
  1408. registerDeepBindings(data);
  1409. return vnode;
  1410. }
  1411. else {
  1412. return createEmptyVNode();
  1413. }
  1414. }
  1415. function applyNS(vnode, ns, force) {
  1416. vnode.ns = ns;
  1417. if (vnode.tag === 'foreignObject') {
  1418. // use default namespace inside foreignObject
  1419. ns = undefined;
  1420. force = true;
  1421. }
  1422. if (isDef(vnode.children)) {
  1423. for (var i = 0, l = vnode.children.length; i < l; i++) {
  1424. var child = vnode.children[i];
  1425. if (isDef(child.tag) &&
  1426. (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  1427. applyNS(child, ns, force);
  1428. }
  1429. }
  1430. }
  1431. }
  1432. // ref #5318
  1433. // necessary to ensure parent re-render when deep bindings like :style and
  1434. // :class are used on slot nodes
  1435. function registerDeepBindings(data) {
  1436. if (isObject(data.style)) {
  1437. traverse(data.style);
  1438. }
  1439. if (isObject(data.class)) {
  1440. traverse(data.class);
  1441. }
  1442. }
  1443. /**
  1444. * Runtime helper for rendering v-for lists.
  1445. */
  1446. function renderList(val, render) {
  1447. var ret = null, i, l, keys, key;
  1448. if (isArray(val) || typeof val === 'string') {
  1449. ret = new Array(val.length);
  1450. for (i = 0, l = val.length; i < l; i++) {
  1451. ret[i] = render(val[i], i);
  1452. }
  1453. }
  1454. else if (typeof val === 'number') {
  1455. ret = new Array(val);
  1456. for (i = 0; i < val; i++) {
  1457. ret[i] = render(i + 1, i);
  1458. }
  1459. }
  1460. else if (isObject(val)) {
  1461. if (hasSymbol && val[Symbol.iterator]) {
  1462. ret = [];
  1463. var iterator = val[Symbol.iterator]();
  1464. var result = iterator.next();
  1465. while (!result.done) {
  1466. ret.push(render(result.value, ret.length));
  1467. result = iterator.next();
  1468. }
  1469. }
  1470. else {
  1471. keys = Object.keys(val);
  1472. ret = new Array(keys.length);
  1473. for (i = 0, l = keys.length; i < l; i++) {
  1474. key = keys[i];
  1475. ret[i] = render(val[key], key, i);
  1476. }
  1477. }
  1478. }
  1479. if (!isDef(ret)) {
  1480. ret = [];
  1481. }
  1482. ret._isVList = true;
  1483. return ret;
  1484. }
  1485. /**
  1486. * Runtime helper for rendering <slot>
  1487. */
  1488. function renderSlot(name, fallbackRender, props, bindObject) {
  1489. var scopedSlotFn = this.$scopedSlots[name];
  1490. var nodes;
  1491. if (scopedSlotFn) {
  1492. // scoped slot
  1493. props = props || {};
  1494. if (bindObject) {
  1495. if (!isObject(bindObject)) {
  1496. warn$2('slot v-bind without argument expects an Object', this);
  1497. }
  1498. props = extend(extend({}, bindObject), props);
  1499. }
  1500. nodes =
  1501. scopedSlotFn(props) ||
  1502. (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
  1503. }
  1504. else {
  1505. nodes =
  1506. this.$slots[name] ||
  1507. (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
  1508. }
  1509. var target = props && props.slot;
  1510. if (target) {
  1511. return this.$createElement('template', { slot: target }, nodes);
  1512. }
  1513. else {
  1514. return nodes;
  1515. }
  1516. }
  1517. /**
  1518. * Runtime helper for resolving filters
  1519. */
  1520. function resolveFilter(id) {
  1521. return resolveAsset(this.$options, 'filters', id, true) || identity;
  1522. }
  1523. function isKeyNotMatch(expect, actual) {
  1524. if (isArray(expect)) {
  1525. return expect.indexOf(actual) === -1;
  1526. }
  1527. else {
  1528. return expect !== actual;
  1529. }
  1530. }
  1531. /**
  1532. * Runtime helper for checking keyCodes from config.
  1533. * exposed as Vue.prototype._k
  1534. * passing in eventKeyName as last argument separately for backwards compat
  1535. */
  1536. function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {
  1537. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  1538. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  1539. return isKeyNotMatch(builtInKeyName, eventKeyName);
  1540. }
  1541. else if (mappedKeyCode) {
  1542. return isKeyNotMatch(mappedKeyCode, eventKeyCode);
  1543. }
  1544. else if (eventKeyName) {
  1545. return hyphenate(eventKeyName) !== key;
  1546. }
  1547. return eventKeyCode === undefined;
  1548. }
  1549. /**
  1550. * Runtime helper for merging v-bind="object" into a VNode's data.
  1551. */
  1552. function bindObjectProps(data, tag, value, asProp, isSync) {
  1553. if (value) {
  1554. if (!isObject(value)) {
  1555. warn$2('v-bind without argument expects an Object or Array value', this);
  1556. }
  1557. else {
  1558. if (isArray(value)) {
  1559. value = toObject(value);
  1560. }
  1561. var hash = void 0;
  1562. var _loop_1 = function (key) {
  1563. if (key === 'class' || key === 'style' || isReservedAttribute(key)) {
  1564. hash = data;
  1565. }
  1566. else {
  1567. var type = data.attrs && data.attrs.type;
  1568. hash =
  1569. asProp || config.mustUseProp(tag, type, key)
  1570. ? data.domProps || (data.domProps = {})
  1571. : data.attrs || (data.attrs = {});
  1572. }
  1573. var camelizedKey = camelize(key);
  1574. var hyphenatedKey = hyphenate(key);
  1575. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  1576. hash[key] = value[key];
  1577. if (isSync) {
  1578. var on = data.on || (data.on = {});
  1579. on["update:".concat(key)] = function ($event) {
  1580. value[key] = $event;
  1581. };
  1582. }
  1583. }
  1584. };
  1585. for (var key in value) {
  1586. _loop_1(key);
  1587. }
  1588. }
  1589. }
  1590. return data;
  1591. }
  1592. /**
  1593. * Runtime helper for rendering static trees.
  1594. */
  1595. function renderStatic(index, isInFor) {
  1596. var cached = this._staticTrees || (this._staticTrees = []);
  1597. var tree = cached[index];
  1598. // if has already-rendered static tree and not inside v-for,
  1599. // we can reuse the same tree.
  1600. if (tree && !isInFor) {
  1601. return tree;
  1602. }
  1603. // otherwise, render a fresh tree.
  1604. tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates
  1605. );
  1606. markStatic(tree, "__static__".concat(index), false);
  1607. return tree;
  1608. }
  1609. /**
  1610. * Runtime helper for v-once.
  1611. * Effectively it means marking the node as static with a unique key.
  1612. */
  1613. function markOnce(tree, index, key) {
  1614. markStatic(tree, "__once__".concat(index).concat(key ? "_".concat(key) : ""), true);
  1615. return tree;
  1616. }
  1617. function markStatic(tree, key, isOnce) {
  1618. if (isArray(tree)) {
  1619. for (var i = 0; i < tree.length; i++) {
  1620. if (tree[i] && typeof tree[i] !== 'string') {
  1621. markStaticNode(tree[i], "".concat(key, "_").concat(i), isOnce);
  1622. }
  1623. }
  1624. }
  1625. else {
  1626. markStaticNode(tree, key, isOnce);
  1627. }
  1628. }
  1629. function markStaticNode(node, key, isOnce) {
  1630. node.isStatic = true;
  1631. node.key = key;
  1632. node.isOnce = isOnce;
  1633. }
  1634. function bindObjectListeners(data, value) {
  1635. if (value) {
  1636. if (!isPlainObject(value)) {
  1637. warn$2('v-on without argument expects an Object value', this);
  1638. }
  1639. else {
  1640. var on = (data.on = data.on ? extend({}, data.on) : {});
  1641. for (var key in value) {
  1642. var existing = on[key];
  1643. var ours = value[key];
  1644. on[key] = existing ? [].concat(existing, ours) : ours;
  1645. }
  1646. }
  1647. }
  1648. return data;
  1649. }
  1650. function resolveScopedSlots(fns, res,
  1651. // the following are added in 2.6
  1652. hasDynamicKeys, contentHashKey) {
  1653. res = res || { $stable: !hasDynamicKeys };
  1654. for (var i = 0; i < fns.length; i++) {
  1655. var slot = fns[i];
  1656. if (isArray(slot)) {
  1657. resolveScopedSlots(slot, res, hasDynamicKeys);
  1658. }
  1659. else if (slot) {
  1660. // marker for reverse proxying v-slot without scope on this.$slots
  1661. // @ts-expect-error
  1662. if (slot.proxy) {
  1663. // @ts-expect-error
  1664. slot.fn.proxy = true;
  1665. }
  1666. res[slot.key] = slot.fn;
  1667. }
  1668. }
  1669. if (contentHashKey) {
  1670. res.$key = contentHashKey;
  1671. }
  1672. return res;
  1673. }
  1674. // helper to process dynamic keys for dynamic arguments in v-bind and v-on.
  1675. function bindDynamicKeys(baseObj, values) {
  1676. for (var i = 0; i < values.length; i += 2) {
  1677. var key = values[i];
  1678. if (typeof key === 'string' && key) {
  1679. baseObj[values[i]] = values[i + 1];
  1680. }
  1681. else if (key !== '' && key !== null) {
  1682. // null is a special value for explicitly removing a binding
  1683. warn$2("Invalid value for dynamic directive argument (expected string or null): ".concat(key), this);
  1684. }
  1685. }
  1686. return baseObj;
  1687. }
  1688. // helper to dynamically append modifier runtime markers to event names.
  1689. // ensure only append when value is already string, otherwise it will be cast
  1690. // to string and cause the type check to miss.
  1691. function prependModifier(value, symbol) {
  1692. return typeof value === 'string' ? symbol + value : value;
  1693. }
  1694. function installRenderHelpers(target) {
  1695. target._o = markOnce;
  1696. target._n = toNumber;
  1697. target._s = toString;
  1698. target._l = renderList;
  1699. target._t = renderSlot;
  1700. target._q = looseEqual;
  1701. target._i = looseIndexOf;
  1702. target._m = renderStatic;
  1703. target._f = resolveFilter;
  1704. target._k = checkKeyCodes;
  1705. target._b = bindObjectProps;
  1706. target._v = createTextVNode;
  1707. target._e = createEmptyVNode;
  1708. target._u = resolveScopedSlots;
  1709. target._g = bindObjectListeners;
  1710. target._d = bindDynamicKeys;
  1711. target._p = prependModifier;
  1712. }
  1713. /**
  1714. * Runtime helper for resolving raw children VNodes into a slot object.
  1715. */
  1716. function resolveSlots(children, context) {
  1717. if (!children || !children.length) {
  1718. return {};
  1719. }
  1720. var slots = {};
  1721. for (var i = 0, l = children.length; i < l; i++) {
  1722. var child = children[i];
  1723. var data = child.data;
  1724. // remove slot attribute if the node is resolved as a Vue slot node
  1725. if (data && data.attrs && data.attrs.slot) {
  1726. delete data.attrs.slot;
  1727. }
  1728. // named slots should only be respected if the vnode was rendered in the
  1729. // same context.
  1730. if ((child.context === context || child.fnContext === context) &&
  1731. data &&
  1732. data.slot != null) {
  1733. var name_1 = data.slot;
  1734. var slot = slots[name_1] || (slots[name_1] = []);
  1735. if (child.tag === 'template') {
  1736. slot.push.apply(slot, child.children || []);
  1737. }
  1738. else {
  1739. slot.push(child);
  1740. }
  1741. }
  1742. else {
  1743. (slots.default || (slots.default = [])).push(child);
  1744. }
  1745. }
  1746. // ignore slots that contains only whitespace
  1747. for (var name_2 in slots) {
  1748. if (slots[name_2].every(isWhitespace)) {
  1749. delete slots[name_2];
  1750. }
  1751. }
  1752. return slots;
  1753. }
  1754. function isWhitespace(node) {
  1755. return (node.isComment && !node.asyncFactory) || node.text === ' ';
  1756. }
  1757. function isAsyncPlaceholder(node) {
  1758. // @ts-expect-error not really boolean type
  1759. return node.isComment && node.asyncFactory;
  1760. }
  1761. function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {
  1762. var res;
  1763. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  1764. var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;
  1765. var key = scopedSlots && scopedSlots.$key;
  1766. if (!scopedSlots) {
  1767. res = {};
  1768. }
  1769. else if (scopedSlots._normalized) {
  1770. // fast path 1: child component re-render only, parent did not change
  1771. return scopedSlots._normalized;
  1772. }
  1773. else if (isStable &&
  1774. prevScopedSlots &&
  1775. prevScopedSlots !== emptyObject &&
  1776. key === prevScopedSlots.$key &&
  1777. !hasNormalSlots &&
  1778. !prevScopedSlots.$hasNormal) {
  1779. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  1780. // only need to normalize once
  1781. return prevScopedSlots;
  1782. }
  1783. else {
  1784. res = {};
  1785. for (var key_1 in scopedSlots) {
  1786. if (scopedSlots[key_1] && key_1[0] !== '$') {
  1787. res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);
  1788. }
  1789. }
  1790. }
  1791. // expose normal slots on scopedSlots
  1792. for (var key_2 in normalSlots) {
  1793. if (!(key_2 in res)) {
  1794. res[key_2] = proxyNormalSlot(normalSlots, key_2);
  1795. }
  1796. }
  1797. // avoriaz seems to mock a non-extensible $scopedSlots object
  1798. // and when that is passed down this would cause an error
  1799. if (scopedSlots && Object.isExtensible(scopedSlots)) {
  1800. scopedSlots._normalized = res;
  1801. }
  1802. def(res, '$stable', isStable);
  1803. def(res, '$key', key);
  1804. def(res, '$hasNormal', hasNormalSlots);
  1805. return res;
  1806. }
  1807. function normalizeScopedSlot(vm, normalSlots, key, fn) {
  1808. var normalized = function () {
  1809. var cur = currentInstance;
  1810. setCurrentInstance(vm);
  1811. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  1812. res =
  1813. res && typeof res === 'object' && !isArray(res)
  1814. ? [res] // single vnode
  1815. : normalizeChildren(res);
  1816. var vnode = res && res[0];
  1817. setCurrentInstance(cur);
  1818. return res &&
  1819. (!vnode ||
  1820. (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391
  1821. ? undefined
  1822. : res;
  1823. };
  1824. // this is a slot using the new v-slot syntax without scope. although it is
  1825. // compiled as a scoped slot, render fn users would expect it to be present
  1826. // on this.$slots because the usage is semantically a normal slot.
  1827. if (fn.proxy) {
  1828. Object.defineProperty(normalSlots, key, {
  1829. get: normalized,
  1830. enumerable: true,
  1831. configurable: true
  1832. });
  1833. }
  1834. return normalized;
  1835. }
  1836. function proxyNormalSlot(slots, key) {
  1837. return function () { return slots[key]; };
  1838. }
  1839. function syncSetupProxy(to, from, prev, instance, type) {
  1840. var changed = false;
  1841. for (var key in from) {
  1842. if (!(key in to)) {
  1843. changed = true;
  1844. defineProxyAttr(to, key, instance, type);
  1845. }
  1846. else if (from[key] !== prev[key]) {
  1847. changed = true;
  1848. }
  1849. }
  1850. for (var key in to) {
  1851. if (!(key in from)) {
  1852. changed = true;
  1853. delete to[key];
  1854. }
  1855. }
  1856. return changed;
  1857. }
  1858. function defineProxyAttr(proxy, key, instance, type) {
  1859. Object.defineProperty(proxy, key, {
  1860. enumerable: true,
  1861. configurable: true,
  1862. get: function () {
  1863. return instance[type][key];
  1864. }
  1865. });
  1866. }
  1867. function createAsyncPlaceholder(factory, data, context, children, tag) {
  1868. var node = createEmptyVNode();
  1869. node.asyncFactory = factory;
  1870. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  1871. return node;
  1872. }
  1873. function resolveAsyncComponent(factory, baseCtor) {
  1874. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  1875. return factory.errorComp;
  1876. }
  1877. if (isDef(factory.resolved)) {
  1878. return factory.resolved;
  1879. }
  1880. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  1881. return factory.loadingComp;
  1882. }
  1883. }
  1884. var target;
  1885. function add(event, fn) {
  1886. target.$on(event, fn);
  1887. }
  1888. function remove(event, fn) {
  1889. target.$off(event, fn);
  1890. }
  1891. function createOnceHandler(event, fn) {
  1892. var _target = target;
  1893. return function onceHandler() {
  1894. var res = fn.apply(null, arguments);
  1895. if (res !== null) {
  1896. _target.$off(event, onceHandler);
  1897. }
  1898. };
  1899. }
  1900. function updateComponentListeners(vm, listeners, oldListeners) {
  1901. target = vm;
  1902. updateListeners(listeners, oldListeners || {}, add, remove, createOnceHandler, vm);
  1903. target = undefined;
  1904. }
  1905. var activeInstance = null;
  1906. function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {
  1907. // determine whether component has slot children
  1908. // we need to do this before overwriting $options._renderChildren.
  1909. // check if there are dynamic scopedSlots (hand-written or compiled but with
  1910. // dynamic slot names). Static scoped slots compiled from template has the
  1911. // "$stable" marker.
  1912. var newScopedSlots = parentVnode.data.scopedSlots;
  1913. var oldScopedSlots = vm.$scopedSlots;
  1914. var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||
  1915. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  1916. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
  1917. (!newScopedSlots && vm.$scopedSlots.$key));
  1918. // Any static slot children from the parent may have changed during parent's
  1919. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  1920. // update is necessary to ensure correctness.
  1921. var needsForceUpdate = !!(renderChildren || // has new static slots
  1922. vm.$options._renderChildren || // has old static slots
  1923. hasDynamicScopedSlot);
  1924. var prevVNode = vm.$vnode;
  1925. vm.$options._parentVnode = parentVnode;
  1926. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  1927. if (vm._vnode) {
  1928. // update child tree's parent
  1929. vm._vnode.parent = parentVnode;
  1930. }
  1931. vm.$options._renderChildren = renderChildren;
  1932. // update $attrs and $listeners hash
  1933. // these are also reactive so they may trigger child update if the child
  1934. // used them during render
  1935. var attrs = parentVnode.data.attrs || emptyObject;
  1936. if (vm._attrsProxy) {
  1937. // force update if attrs are accessed and has changed since it may be
  1938. // passed to a child component.
  1939. if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {
  1940. needsForceUpdate = true;
  1941. }
  1942. }
  1943. vm.$attrs = attrs;
  1944. // update listeners
  1945. listeners = listeners || emptyObject;
  1946. var prevListeners = vm.$options._parentListeners;
  1947. if (vm._listenersProxy) {
  1948. syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');
  1949. }
  1950. vm.$listeners = vm.$options._parentListeners = listeners;
  1951. updateComponentListeners(vm, listeners, prevListeners);
  1952. // update props
  1953. if (propsData && vm.$options.props) {
  1954. toggleObserving(false);
  1955. var props = vm._props;
  1956. var propKeys = vm.$options._propKeys || [];
  1957. for (var i = 0; i < propKeys.length; i++) {
  1958. var key = propKeys[i];
  1959. var propOptions = vm.$options.props; // wtf flow?
  1960. props[key] = validateProp(key, propOptions, propsData, vm);
  1961. }
  1962. toggleObserving(true);
  1963. // keep a copy of raw propsData
  1964. vm.$options.propsData = propsData;
  1965. }
  1966. // resolve slots + force update if has children
  1967. if (needsForceUpdate) {
  1968. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  1969. vm.$forceUpdate();
  1970. }
  1971. }
  1972. function isInInactiveTree(vm) {
  1973. while (vm && (vm = vm.$parent)) {
  1974. if (vm._inactive)
  1975. return true;
  1976. }
  1977. return false;
  1978. }
  1979. function activateChildComponent(vm, direct) {
  1980. if (direct) {
  1981. vm._directInactive = false;
  1982. if (isInInactiveTree(vm)) {
  1983. return;
  1984. }
  1985. }
  1986. else if (vm._directInactive) {
  1987. return;
  1988. }
  1989. if (vm._inactive || vm._inactive === null) {
  1990. vm._inactive = false;
  1991. for (var i = 0; i < vm.$children.length; i++) {
  1992. activateChildComponent(vm.$children[i]);
  1993. }
  1994. callHook(vm, 'activated');
  1995. }
  1996. }
  1997. function deactivateChildComponent(vm, direct) {
  1998. if (direct) {
  1999. vm._directInactive = true;
  2000. if (isInInactiveTree(vm)) {
  2001. return;
  2002. }
  2003. }
  2004. if (!vm._inactive) {
  2005. vm._inactive = true;
  2006. for (var i = 0; i < vm.$children.length; i++) {
  2007. deactivateChildComponent(vm.$children[i]);
  2008. }
  2009. callHook(vm, 'deactivated');
  2010. }
  2011. }
  2012. function callHook(vm, hook, args, setContext) {
  2013. if (setContext === void 0) { setContext = true; }
  2014. // #7573 disable dep collection when invoking lifecycle hooks
  2015. pushTarget();
  2016. var prev = currentInstance;
  2017. setContext && setCurrentInstance(vm);
  2018. var handlers = vm.$options[hook];
  2019. var info = "".concat(hook, " hook");
  2020. if (handlers) {
  2021. for (var i = 0, j = handlers.length; i < j; i++) {
  2022. invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);
  2023. }
  2024. }
  2025. if (vm._hasHookEvent) {
  2026. vm.$emit('hook:' + hook);
  2027. }
  2028. setContext && setCurrentInstance(prev);
  2029. popTarget();
  2030. }
  2031. // Async edge case fix requires storing an event listener's attach timestamp.
  2032. var getNow = Date.now;
  2033. // Determine what event timestamp the browser is using. Annoyingly, the
  2034. // timestamp can either be hi-res (relative to page load) or low-res
  2035. // (relative to UNIX epoch), so in order to compare time we have to use the
  2036. // same timestamp type when saving the flush timestamp.
  2037. // All IE versions use low-res event timestamps, and have problematic clock
  2038. // implementations (#9632)
  2039. if (inBrowser && !isIE) {
  2040. var performance_1 = window.performance;
  2041. if (performance_1 &&
  2042. typeof performance_1.now === 'function' &&
  2043. getNow() > document.createEvent('Event').timeStamp) {
  2044. // if the event timestamp, although evaluated AFTER the Date.now(), is
  2045. // smaller than it, it means the event is using a hi-res timestamp,
  2046. // and we need to use the hi-res version for event listener timestamps as
  2047. // well.
  2048. getNow = function () { return performance_1.now(); };
  2049. }
  2050. }
  2051. /**
  2052. * Queue a kept-alive component that was activated during patch.
  2053. * The queue will be processed after the entire tree has been patched.
  2054. */
  2055. function queueActivatedComponent(vm) {
  2056. // setting _inactive to false here so that a render function can
  2057. // rely on checking whether it's in an inactive tree (e.g. router-view)
  2058. vm._inactive = false;
  2059. }
  2060. function handleError(err, vm, info) {
  2061. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  2062. // See: https://github.com/vuejs/vuex/issues/1505
  2063. pushTarget();
  2064. try {
  2065. if (vm) {
  2066. var cur = vm;
  2067. while ((cur = cur.$parent)) {
  2068. var hooks = cur.$options.errorCaptured;
  2069. if (hooks) {
  2070. for (var i = 0; i < hooks.length; i++) {
  2071. try {
  2072. var capture = hooks[i].call(cur, err, vm, info) === false;
  2073. if (capture)
  2074. return;
  2075. }
  2076. catch (e) {
  2077. globalHandleError(e, cur, 'errorCaptured hook');
  2078. }
  2079. }
  2080. }
  2081. }
  2082. }
  2083. globalHandleError(err, vm, info);
  2084. }
  2085. finally {
  2086. popTarget();
  2087. }
  2088. }
  2089. function invokeWithErrorHandling(handler, context, args, vm, info) {
  2090. var res;
  2091. try {
  2092. res = args ? handler.apply(context, args) : handler.call(context);
  2093. if (res && !res._isVue && isPromise(res) && !res._handled) {
  2094. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  2095. res._handled = true;
  2096. }
  2097. }
  2098. catch (e) {
  2099. handleError(e, vm, info);
  2100. }
  2101. return res;
  2102. }
  2103. function globalHandleError(err, vm, info) {
  2104. logError(err, vm, info);
  2105. }
  2106. function logError(err, vm, info) {
  2107. {
  2108. warn$2("Error in ".concat(info, ": \"").concat(err.toString(), "\""), vm);
  2109. }
  2110. /* istanbul ignore else */
  2111. if (inBrowser && typeof console !== 'undefined') {
  2112. console.error(err);
  2113. }
  2114. else {
  2115. throw err;
  2116. }
  2117. }
  2118. /* globals MutationObserver */
  2119. var callbacks = [];
  2120. function flushCallbacks() {
  2121. var copies = callbacks.slice(0);
  2122. callbacks.length = 0;
  2123. for (var i = 0; i < copies.length; i++) {
  2124. copies[i]();
  2125. }
  2126. }
  2127. // The nextTick behavior leverages the microtask queue, which can be accessed
  2128. // via either native Promise.then or MutationObserver.
  2129. // MutationObserver has wider support, however it is seriously bugged in
  2130. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  2131. // completely stops working after triggering a few times... so, if native
  2132. // Promise is available, we will use it:
  2133. /* istanbul ignore next, $flow-disable-line */
  2134. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  2135. Promise.resolve();
  2136. }
  2137. else if (!isIE &&
  2138. typeof MutationObserver !== 'undefined' &&
  2139. (isNative(MutationObserver) ||
  2140. // PhantomJS and iOS 7.x
  2141. MutationObserver.toString() === '[object MutationObserverConstructor]')) {
  2142. // Use MutationObserver where native Promise is not available,
  2143. // e.g. PhantomJS, iOS7, Android 4.4
  2144. // (#6466 MutationObserver is unreliable in IE11)
  2145. var counter_1 = 1;
  2146. var observer = new MutationObserver(flushCallbacks);
  2147. var textNode_1 = document.createTextNode(String(counter_1));
  2148. observer.observe(textNode_1, {
  2149. characterData: true
  2150. });
  2151. }
  2152. else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) ;
  2153. else ;
  2154. var seenObjects = new _Set();
  2155. /**
  2156. * Recursively traverse an object to evoke all converted
  2157. * getters, so that every nested property inside the object
  2158. * is collected as a "deep" dependency.
  2159. */
  2160. function traverse(val) {
  2161. _traverse(val, seenObjects);
  2162. seenObjects.clear();
  2163. return val;
  2164. }
  2165. function _traverse(val, seen) {
  2166. var i, keys;
  2167. var isA = isArray(val);
  2168. if ((!isA && !isObject(val)) ||
  2169. val.__v_skip /* ReactiveFlags.SKIP */ ||
  2170. Object.isFrozen(val) ||
  2171. val instanceof VNode) {
  2172. return;
  2173. }
  2174. if (val.__ob__) {
  2175. var depId = val.__ob__.dep.id;
  2176. if (seen.has(depId)) {
  2177. return;
  2178. }
  2179. seen.add(depId);
  2180. }
  2181. if (isA) {
  2182. i = val.length;
  2183. while (i--)
  2184. _traverse(val[i], seen);
  2185. }
  2186. else if (isRef(val)) {
  2187. _traverse(val.value, seen);
  2188. }
  2189. else {
  2190. keys = Object.keys(val);
  2191. i = keys.length;
  2192. while (i--)
  2193. _traverse(val[keys[i]], seen);
  2194. }
  2195. }
  2196. function resolveInject(inject, vm) {
  2197. if (inject) {
  2198. // inject is :any because flow is not smart enough to figure out cached
  2199. var result = Object.create(null);
  2200. var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);
  2201. for (var i = 0; i < keys.length; i++) {
  2202. var key = keys[i];
  2203. // #6574 in case the inject object is observed...
  2204. if (key === '__ob__')
  2205. continue;
  2206. var provideKey = inject[key].from;
  2207. if (provideKey in vm._provided) {
  2208. result[key] = vm._provided[provideKey];
  2209. }
  2210. else if ('default' in inject[key]) {
  2211. var provideDefault = inject[key].default;
  2212. result[key] = isFunction(provideDefault)
  2213. ? provideDefault.call(vm)
  2214. : provideDefault;
  2215. }
  2216. else {
  2217. warn$2("Injection \"".concat(key, "\" not found"), vm);
  2218. }
  2219. }
  2220. return result;
  2221. }
  2222. }
  2223. function resolveConstructorOptions(Ctor) {
  2224. var options = Ctor.options;
  2225. if (Ctor.super) {
  2226. var superOptions = resolveConstructorOptions(Ctor.super);
  2227. var cachedSuperOptions = Ctor.superOptions;
  2228. if (superOptions !== cachedSuperOptions) {
  2229. // super option changed,
  2230. // need to resolve new options.
  2231. Ctor.superOptions = superOptions;
  2232. // check if there are any late-modified/attached options (#4976)
  2233. var modifiedOptions = resolveModifiedOptions(Ctor);
  2234. // update base extend options
  2235. if (modifiedOptions) {
  2236. extend(Ctor.extendOptions, modifiedOptions);
  2237. }
  2238. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  2239. if (options.name) {
  2240. options.components[options.name] = Ctor;
  2241. }
  2242. }
  2243. }
  2244. return options;
  2245. }
  2246. function resolveModifiedOptions(Ctor) {
  2247. var modified;
  2248. var latest = Ctor.options;
  2249. var sealed = Ctor.sealedOptions;
  2250. for (var key in latest) {
  2251. if (latest[key] !== sealed[key]) {
  2252. if (!modified)
  2253. modified = {};
  2254. modified[key] = latest[key];
  2255. }
  2256. }
  2257. return modified;
  2258. }
  2259. function FunctionalRenderContext(data, props, children, parent, Ctor) {
  2260. var _this = this;
  2261. var options = Ctor.options;
  2262. // ensure the createElement function in functional components
  2263. // gets a unique context - this is necessary for correct named slot check
  2264. var contextVm;
  2265. if (hasOwn(parent, '_uid')) {
  2266. contextVm = Object.create(parent);
  2267. contextVm._original = parent;
  2268. }
  2269. else {
  2270. // the context vm passed in is a functional context as well.
  2271. // in this case we want to make sure we are able to get a hold to the
  2272. // real context instance.
  2273. contextVm = parent;
  2274. // @ts-ignore
  2275. parent = parent._original;
  2276. }
  2277. var isCompiled = isTrue(options._compiled);
  2278. var needNormalization = !isCompiled;
  2279. this.data = data;
  2280. this.props = props;
  2281. this.children = children;
  2282. this.parent = parent;
  2283. this.listeners = data.on || emptyObject;
  2284. this.injections = resolveInject(options.inject, parent);
  2285. this.slots = function () {
  2286. if (!_this.$slots) {
  2287. normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));
  2288. }
  2289. return _this.$slots;
  2290. };
  2291. Object.defineProperty(this, 'scopedSlots', {
  2292. enumerable: true,
  2293. get: function () {
  2294. return normalizeScopedSlots(parent, data.scopedSlots, this.slots());
  2295. }
  2296. });
  2297. // support for compiled functional template
  2298. if (isCompiled) {
  2299. // exposing $options for renderStatic()
  2300. this.$options = options;
  2301. // pre-resolve slots for renderSlot()
  2302. this.$slots = this.slots();
  2303. this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);
  2304. }
  2305. if (options._scopeId) {
  2306. this._c = function (a, b, c, d) {
  2307. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  2308. if (vnode && !isArray(vnode)) {
  2309. vnode.fnScopeId = options._scopeId;
  2310. vnode.fnContext = parent;
  2311. }
  2312. return vnode;
  2313. };
  2314. }
  2315. else {
  2316. this._c = function (a, b, c, d) {
  2317. return createElement(contextVm, a, b, c, d, needNormalization);
  2318. };
  2319. }
  2320. }
  2321. installRenderHelpers(FunctionalRenderContext.prototype);
  2322. function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {
  2323. var options = Ctor.options;
  2324. var props = {};
  2325. var propOptions = options.props;
  2326. if (isDef(propOptions)) {
  2327. for (var key in propOptions) {
  2328. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  2329. }
  2330. }
  2331. else {
  2332. if (isDef(data.attrs))
  2333. mergeProps(props, data.attrs);
  2334. if (isDef(data.props))
  2335. mergeProps(props, data.props);
  2336. }
  2337. var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);
  2338. var vnode = options.render.call(null, renderContext._c, renderContext);
  2339. if (vnode instanceof VNode) {
  2340. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);
  2341. }
  2342. else if (isArray(vnode)) {
  2343. var vnodes = normalizeChildren(vnode) || [];
  2344. var res = new Array(vnodes.length);
  2345. for (var i = 0; i < vnodes.length; i++) {
  2346. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  2347. }
  2348. return res;
  2349. }
  2350. }
  2351. function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {
  2352. // #7817 clone node before setting fnContext, otherwise if the node is reused
  2353. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  2354. // that should not be matched to match.
  2355. var clone = cloneVNode(vnode);
  2356. clone.fnContext = contextVm;
  2357. clone.fnOptions = options;
  2358. {
  2359. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =
  2360. renderContext;
  2361. }
  2362. if (data.slot) {
  2363. (clone.data || (clone.data = {})).slot = data.slot;
  2364. }
  2365. return clone;
  2366. }
  2367. function mergeProps(to, from) {
  2368. for (var key in from) {
  2369. to[camelize(key)] = from[key];
  2370. }
  2371. }
  2372. function getComponentName(options) {
  2373. return options.name || options.__name || options._componentTag;
  2374. }
  2375. // inline hooks to be invoked on component VNodes during patch
  2376. var componentVNodeHooks = {
  2377. init: function (vnode, hydrating) {
  2378. if (vnode.componentInstance &&
  2379. !vnode.componentInstance._isDestroyed &&
  2380. vnode.data.keepAlive) {
  2381. // kept-alive components, treat as a patch
  2382. var mountedNode = vnode; // work around flow
  2383. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  2384. }
  2385. else {
  2386. var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));
  2387. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  2388. }
  2389. },
  2390. prepatch: function (oldVnode, vnode) {
  2391. var options = vnode.componentOptions;
  2392. var child = (vnode.componentInstance = oldVnode.componentInstance);
  2393. updateChildComponent(child, options.propsData, // updated props
  2394. options.listeners, // updated listeners
  2395. vnode, // new parent vnode
  2396. options.children // new children
  2397. );
  2398. },
  2399. insert: function (vnode) {
  2400. var context = vnode.context, componentInstance = vnode.componentInstance;
  2401. if (!componentInstance._isMounted) {
  2402. componentInstance._isMounted = true;
  2403. callHook(componentInstance, 'mounted');
  2404. }
  2405. if (vnode.data.keepAlive) {
  2406. if (context._isMounted) {
  2407. // vue-router#1212
  2408. // During updates, a kept-alive component's child components may
  2409. // change, so directly walking the tree here may call activated hooks
  2410. // on incorrect children. Instead we push them into a queue which will
  2411. // be processed after the whole patch process ended.
  2412. queueActivatedComponent(componentInstance);
  2413. }
  2414. else {
  2415. activateChildComponent(componentInstance, true /* direct */);
  2416. }
  2417. }
  2418. },
  2419. destroy: function (vnode) {
  2420. var componentInstance = vnode.componentInstance;
  2421. if (!componentInstance._isDestroyed) {
  2422. if (!vnode.data.keepAlive) {
  2423. componentInstance.$destroy();
  2424. }
  2425. else {
  2426. deactivateChildComponent(componentInstance, true /* direct */);
  2427. }
  2428. }
  2429. }
  2430. };
  2431. var hooksToMerge = Object.keys(componentVNodeHooks);
  2432. function createComponent(Ctor, data, context, children, tag) {
  2433. if (isUndef(Ctor)) {
  2434. return;
  2435. }
  2436. var baseCtor = context.$options._base;
  2437. // plain options object: turn it into a constructor
  2438. if (isObject(Ctor)) {
  2439. Ctor = baseCtor.extend(Ctor);
  2440. }
  2441. // if at this stage it's not a constructor or an async component factory,
  2442. // reject.
  2443. if (typeof Ctor !== 'function') {
  2444. {
  2445. warn$2("Invalid Component definition: ".concat(String(Ctor)), context);
  2446. }
  2447. return;
  2448. }
  2449. // async component
  2450. var asyncFactory;
  2451. // @ts-expect-error
  2452. if (isUndef(Ctor.cid)) {
  2453. asyncFactory = Ctor;
  2454. Ctor = resolveAsyncComponent(asyncFactory);
  2455. if (Ctor === undefined) {
  2456. // return a placeholder node for async component, which is rendered
  2457. // as a comment node but preserves all the raw information for the node.
  2458. // the information will be used for async server-rendering and hydration.
  2459. return createAsyncPlaceholder(asyncFactory, data, context, children, tag);
  2460. }
  2461. }
  2462. data = data || {};
  2463. // resolve constructor options in case global mixins are applied after
  2464. // component constructor creation
  2465. resolveConstructorOptions(Ctor);
  2466. // transform component v-model data into props & events
  2467. if (isDef(data.model)) {
  2468. // @ts-expect-error
  2469. transformModel(Ctor.options, data);
  2470. }
  2471. // extract props
  2472. // @ts-expect-error
  2473. var propsData = extractPropsFromVNodeData(data, Ctor, tag);
  2474. // functional component
  2475. // @ts-expect-error
  2476. if (isTrue(Ctor.options.functional)) {
  2477. return createFunctionalComponent(Ctor, propsData, data, context, children);
  2478. }
  2479. // extract listeners, since these needs to be treated as
  2480. // child component listeners instead of DOM listeners
  2481. var listeners = data.on;
  2482. // replace with listeners with .native modifier
  2483. // so it gets processed during parent component patch.
  2484. data.on = data.nativeOn;
  2485. // @ts-expect-error
  2486. if (isTrue(Ctor.options.abstract)) {
  2487. // abstract components do not keep anything
  2488. // other than props & listeners & slot
  2489. // work around flow
  2490. var slot = data.slot;
  2491. data = {};
  2492. if (slot) {
  2493. data.slot = slot;
  2494. }
  2495. }
  2496. // install component management hooks onto the placeholder node
  2497. installComponentHooks(data);
  2498. // return a placeholder vnode
  2499. // @ts-expect-error
  2500. var name = getComponentName(Ctor.options) || tag;
  2501. var vnode = new VNode(
  2502. // @ts-expect-error
  2503. "vue-component-".concat(Ctor.cid).concat(name ? "-".concat(name) : ''), data, undefined, undefined, undefined, context,
  2504. // @ts-expect-error
  2505. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);
  2506. return vnode;
  2507. }
  2508. function createComponentInstanceForVnode(
  2509. // we know it's MountedComponentVNode but flow doesn't
  2510. vnode,
  2511. // activeInstance in lifecycle state
  2512. parent) {
  2513. var options = {
  2514. _isComponent: true,
  2515. _parentVnode: vnode,
  2516. parent: parent
  2517. };
  2518. // check inline-template render functions
  2519. var inlineTemplate = vnode.data.inlineTemplate;
  2520. if (isDef(inlineTemplate)) {
  2521. options.render = inlineTemplate.render;
  2522. options.staticRenderFns = inlineTemplate.staticRenderFns;
  2523. }
  2524. return new vnode.componentOptions.Ctor(options);
  2525. }
  2526. function installComponentHooks(data) {
  2527. var hooks = data.hook || (data.hook = {});
  2528. for (var i = 0; i < hooksToMerge.length; i++) {
  2529. var key = hooksToMerge[i];
  2530. var existing = hooks[key];
  2531. var toMerge = componentVNodeHooks[key];
  2532. // @ts-expect-error
  2533. if (existing !== toMerge && !(existing && existing._merged)) {
  2534. hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;
  2535. }
  2536. }
  2537. }
  2538. function mergeHook(f1, f2) {
  2539. var merged = function (a, b) {
  2540. // flow complains about extra args which is why we use any
  2541. f1(a, b);
  2542. f2(a, b);
  2543. };
  2544. merged._merged = true;
  2545. return merged;
  2546. }
  2547. // transform component v-model info (value and callback) into
  2548. // prop and event handler respectively.
  2549. function transformModel(options, data) {
  2550. var prop = (options.model && options.model.prop) || 'value';
  2551. var event = (options.model && options.model.event) || 'input';
  2552. (data.attrs || (data.attrs = {}))[prop] = data.model.value;
  2553. var on = data.on || (data.on = {});
  2554. var existing = on[event];
  2555. var callback = data.model.callback;
  2556. if (isDef(existing)) {
  2557. if (isArray(existing)
  2558. ? existing.indexOf(callback) === -1
  2559. : existing !== callback) {
  2560. on[event] = [callback].concat(existing);
  2561. }
  2562. }
  2563. else {
  2564. on[event] = callback;
  2565. }
  2566. }
  2567. var warn$2 = noop$1;
  2568. var tip = noop$1;
  2569. var generateComponentTrace; // work around flow check
  2570. var formatComponentName;
  2571. {
  2572. var hasConsole_1 = typeof console !== 'undefined';
  2573. var classifyRE_1 = /(?:^|[-_])(\w)/g;
  2574. var classify_1 = function (str) {
  2575. return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');
  2576. };
  2577. warn$2 = function (msg, vm) {
  2578. if (vm === void 0) { vm = currentInstance; }
  2579. var trace = vm ? generateComponentTrace(vm) : '';
  2580. if (hasConsole_1 && !config.silent) {
  2581. console.error("[Vue warn]: ".concat(msg).concat(trace));
  2582. }
  2583. };
  2584. tip = function (msg, vm) {
  2585. if (hasConsole_1 && !config.silent) {
  2586. console.warn("[Vue tip]: ".concat(msg) + (vm ? generateComponentTrace(vm) : ''));
  2587. }
  2588. };
  2589. formatComponentName = function (vm, includeFile) {
  2590. if (vm.$root === vm) {
  2591. return '<Root>';
  2592. }
  2593. var options = isFunction(vm) && vm.cid != null
  2594. ? vm.options
  2595. : vm._isVue
  2596. ? vm.$options || vm.constructor.options
  2597. : vm;
  2598. var name = getComponentName(options);
  2599. var file = options.__file;
  2600. if (!name && file) {
  2601. var match = file.match(/([^/\\]+)\.vue$/);
  2602. name = match && match[1];
  2603. }
  2604. return ((name ? "<".concat(classify_1(name), ">") : "<Anonymous>") +
  2605. (file && includeFile !== false ? " at ".concat(file) : ''));
  2606. };
  2607. var repeat_1 = function (str, n) {
  2608. var res = '';
  2609. while (n) {
  2610. if (n % 2 === 1)
  2611. res += str;
  2612. if (n > 1)
  2613. str += str;
  2614. n >>= 1;
  2615. }
  2616. return res;
  2617. };
  2618. generateComponentTrace = function (vm) {
  2619. if (vm._isVue && vm.$parent) {
  2620. var tree = [];
  2621. var currentRecursiveSequence = 0;
  2622. while (vm) {
  2623. if (tree.length > 0) {
  2624. var last = tree[tree.length - 1];
  2625. if (last.constructor === vm.constructor) {
  2626. currentRecursiveSequence++;
  2627. vm = vm.$parent;
  2628. continue;
  2629. }
  2630. else if (currentRecursiveSequence > 0) {
  2631. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2632. currentRecursiveSequence = 0;
  2633. }
  2634. }
  2635. tree.push(vm);
  2636. vm = vm.$parent;
  2637. }
  2638. return ('\n\nfound in\n\n' +
  2639. tree
  2640. .map(function (vm, i) {
  2641. return "".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)
  2642. ? "".concat(formatComponentName(vm[0]), "... (").concat(vm[1], " recursive calls)")
  2643. : formatComponentName(vm));
  2644. })
  2645. .join('\n'));
  2646. }
  2647. else {
  2648. return "\n\n(found in ".concat(formatComponentName(vm), ")");
  2649. }
  2650. };
  2651. }
  2652. /**
  2653. * Option overwriting strategies are functions that handle
  2654. * how to merge a parent option value and a child option
  2655. * value into the final value.
  2656. */
  2657. var strats = config.optionMergeStrategies;
  2658. /**
  2659. * Options with restrictions
  2660. */
  2661. {
  2662. strats.el = strats.propsData = function (parent, child, vm, key) {
  2663. if (!vm) {
  2664. warn$2("option \"".concat(key, "\" can only be used during instance ") +
  2665. 'creation with the `new` keyword.');
  2666. }
  2667. return defaultStrat(parent, child);
  2668. };
  2669. }
  2670. /**
  2671. * Helper that recursively merges two data objects together.
  2672. */
  2673. function mergeData(to, from) {
  2674. if (!from)
  2675. return to;
  2676. var key, toVal, fromVal;
  2677. var keys = hasSymbol
  2678. ? Reflect.ownKeys(from)
  2679. : Object.keys(from);
  2680. for (var i = 0; i < keys.length; i++) {
  2681. key = keys[i];
  2682. // in case the object is already observed...
  2683. if (key === '__ob__')
  2684. continue;
  2685. toVal = to[key];
  2686. fromVal = from[key];
  2687. if (!hasOwn(to, key)) {
  2688. set(to, key, fromVal);
  2689. }
  2690. else if (toVal !== fromVal &&
  2691. isPlainObject(toVal) &&
  2692. isPlainObject(fromVal)) {
  2693. mergeData(toVal, fromVal);
  2694. }
  2695. }
  2696. return to;
  2697. }
  2698. /**
  2699. * Data
  2700. */
  2701. function mergeDataOrFn(parentVal, childVal, vm) {
  2702. if (!vm) {
  2703. // in a Vue.extend merge, both should be functions
  2704. if (!childVal) {
  2705. return parentVal;
  2706. }
  2707. if (!parentVal) {
  2708. return childVal;
  2709. }
  2710. // when parentVal & childVal are both present,
  2711. // we need to return a function that returns the
  2712. // merged result of both functions... no need to
  2713. // check if parentVal is a function here because
  2714. // it has to be a function to pass previous merges.
  2715. return function mergedDataFn() {
  2716. return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);
  2717. };
  2718. }
  2719. else {
  2720. return function mergedInstanceDataFn() {
  2721. // instance merge
  2722. var instanceData = isFunction(childVal)
  2723. ? childVal.call(vm, vm)
  2724. : childVal;
  2725. var defaultData = isFunction(parentVal)
  2726. ? parentVal.call(vm, vm)
  2727. : parentVal;
  2728. if (instanceData) {
  2729. return mergeData(instanceData, defaultData);
  2730. }
  2731. else {
  2732. return defaultData;
  2733. }
  2734. };
  2735. }
  2736. }
  2737. strats.data = function (parentVal, childVal, vm) {
  2738. if (!vm) {
  2739. if (childVal && typeof childVal !== 'function') {
  2740. warn$2('The "data" option should be a function ' +
  2741. 'that returns a per-instance value in component ' +
  2742. 'definitions.', vm);
  2743. return parentVal;
  2744. }
  2745. return mergeDataOrFn(parentVal, childVal);
  2746. }
  2747. return mergeDataOrFn(parentVal, childVal, vm);
  2748. };
  2749. /**
  2750. * Hooks and props are merged as arrays.
  2751. */
  2752. function mergeLifecycleHook(parentVal, childVal) {
  2753. var res = childVal
  2754. ? parentVal
  2755. ? parentVal.concat(childVal)
  2756. : isArray(childVal)
  2757. ? childVal
  2758. : [childVal]
  2759. : parentVal;
  2760. return res ? dedupeHooks(res) : res;
  2761. }
  2762. function dedupeHooks(hooks) {
  2763. var res = [];
  2764. for (var i = 0; i < hooks.length; i++) {
  2765. if (res.indexOf(hooks[i]) === -1) {
  2766. res.push(hooks[i]);
  2767. }
  2768. }
  2769. return res;
  2770. }
  2771. LIFECYCLE_HOOKS.forEach(function (hook) {
  2772. strats[hook] = mergeLifecycleHook;
  2773. });
  2774. /**
  2775. * Assets
  2776. *
  2777. * When a vm is present (instance creation), we need to do
  2778. * a three-way merge between constructor options, instance
  2779. * options and parent options.
  2780. */
  2781. function mergeAssets(parentVal, childVal, vm, key) {
  2782. var res = Object.create(parentVal || null);
  2783. if (childVal) {
  2784. assertObjectType(key, childVal, vm);
  2785. return extend(res, childVal);
  2786. }
  2787. else {
  2788. return res;
  2789. }
  2790. }
  2791. ASSET_TYPES.forEach(function (type) {
  2792. strats[type + 's'] = mergeAssets;
  2793. });
  2794. /**
  2795. * Watchers.
  2796. *
  2797. * Watchers hashes should not overwrite one
  2798. * another, so we merge them as arrays.
  2799. */
  2800. strats.watch = function (parentVal, childVal, vm, key) {
  2801. // work around Firefox's Object.prototype.watch...
  2802. //@ts-expect-error work around
  2803. if (parentVal === nativeWatch)
  2804. parentVal = undefined;
  2805. //@ts-expect-error work around
  2806. if (childVal === nativeWatch)
  2807. childVal = undefined;
  2808. /* istanbul ignore if */
  2809. if (!childVal)
  2810. return Object.create(parentVal || null);
  2811. {
  2812. assertObjectType(key, childVal, vm);
  2813. }
  2814. if (!parentVal)
  2815. return childVal;
  2816. var ret = {};
  2817. extend(ret, parentVal);
  2818. for (var key_1 in childVal) {
  2819. var parent_1 = ret[key_1];
  2820. var child = childVal[key_1];
  2821. if (parent_1 && !isArray(parent_1)) {
  2822. parent_1 = [parent_1];
  2823. }
  2824. ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];
  2825. }
  2826. return ret;
  2827. };
  2828. /**
  2829. * Other object hashes.
  2830. */
  2831. strats.props =
  2832. strats.methods =
  2833. strats.inject =
  2834. strats.computed =
  2835. function (parentVal, childVal, vm, key) {
  2836. if (childVal && true) {
  2837. assertObjectType(key, childVal, vm);
  2838. }
  2839. if (!parentVal)
  2840. return childVal;
  2841. var ret = Object.create(null);
  2842. extend(ret, parentVal);
  2843. if (childVal)
  2844. extend(ret, childVal);
  2845. return ret;
  2846. };
  2847. strats.provide = mergeDataOrFn;
  2848. /**
  2849. * Default strategy.
  2850. */
  2851. var defaultStrat = function (parentVal, childVal) {
  2852. return childVal === undefined ? parentVal : childVal;
  2853. };
  2854. /**
  2855. * Validate component names
  2856. */
  2857. function checkComponents(options) {
  2858. for (var key in options.components) {
  2859. validateComponentName(key);
  2860. }
  2861. }
  2862. function validateComponentName(name) {
  2863. if (!new RegExp("^[a-zA-Z][\\-\\.0-9_".concat(unicodeRegExp.source, "]*$")).test(name)) {
  2864. warn$2('Invalid component name: "' +
  2865. name +
  2866. '". Component names ' +
  2867. 'should conform to valid custom element name in html5 specification.');
  2868. }
  2869. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  2870. warn$2('Do not use built-in or reserved HTML elements as component ' +
  2871. 'id: ' +
  2872. name);
  2873. }
  2874. }
  2875. /**
  2876. * Ensure all props option syntax are normalized into the
  2877. * Object-based format.
  2878. */
  2879. function normalizeProps(options, vm) {
  2880. var props = options.props;
  2881. if (!props)
  2882. return;
  2883. var res = {};
  2884. var i, val, name;
  2885. if (isArray(props)) {
  2886. i = props.length;
  2887. while (i--) {
  2888. val = props[i];
  2889. if (typeof val === 'string') {
  2890. name = camelize(val);
  2891. res[name] = { type: null };
  2892. }
  2893. else {
  2894. warn$2('props must be strings when using array syntax.');
  2895. }
  2896. }
  2897. }
  2898. else if (isPlainObject(props)) {
  2899. for (var key in props) {
  2900. val = props[key];
  2901. name = camelize(key);
  2902. res[name] = isPlainObject(val) ? val : { type: val };
  2903. }
  2904. }
  2905. else {
  2906. warn$2("Invalid value for option \"props\": expected an Array or an Object, " +
  2907. "but got ".concat(toRawType(props), "."), vm);
  2908. }
  2909. options.props = res;
  2910. }
  2911. /**
  2912. * Normalize all injections into Object-based format
  2913. */
  2914. function normalizeInject(options, vm) {
  2915. var inject = options.inject;
  2916. if (!inject)
  2917. return;
  2918. var normalized = (options.inject = {});
  2919. if (isArray(inject)) {
  2920. for (var i = 0; i < inject.length; i++) {
  2921. normalized[inject[i]] = { from: inject[i] };
  2922. }
  2923. }
  2924. else if (isPlainObject(inject)) {
  2925. for (var key in inject) {
  2926. var val = inject[key];
  2927. normalized[key] = isPlainObject(val)
  2928. ? extend({ from: key }, val)
  2929. : { from: val };
  2930. }
  2931. }
  2932. else {
  2933. warn$2("Invalid value for option \"inject\": expected an Array or an Object, " +
  2934. "but got ".concat(toRawType(inject), "."), vm);
  2935. }
  2936. }
  2937. /**
  2938. * Normalize raw function directives into object format.
  2939. */
  2940. function normalizeDirectives(options) {
  2941. var dirs = options.directives;
  2942. if (dirs) {
  2943. for (var key in dirs) {
  2944. var def = dirs[key];
  2945. if (isFunction(def)) {
  2946. dirs[key] = { bind: def, update: def };
  2947. }
  2948. }
  2949. }
  2950. }
  2951. function assertObjectType(name, value, vm) {
  2952. if (!isPlainObject(value)) {
  2953. warn$2("Invalid value for option \"".concat(name, "\": expected an Object, ") +
  2954. "but got ".concat(toRawType(value), "."), vm);
  2955. }
  2956. }
  2957. /**
  2958. * Merge two option objects into a new one.
  2959. * Core utility used in both instantiation and inheritance.
  2960. */
  2961. function mergeOptions(parent, child, vm) {
  2962. {
  2963. checkComponents(child);
  2964. }
  2965. if (isFunction(child)) {
  2966. // @ts-expect-error
  2967. child = child.options;
  2968. }
  2969. normalizeProps(child, vm);
  2970. normalizeInject(child, vm);
  2971. normalizeDirectives(child);
  2972. // Apply extends and mixins on the child options,
  2973. // but only if it is a raw options object that isn't
  2974. // the result of another mergeOptions call.
  2975. // Only merged options has the _base property.
  2976. if (!child._base) {
  2977. if (child.extends) {
  2978. parent = mergeOptions(parent, child.extends, vm);
  2979. }
  2980. if (child.mixins) {
  2981. for (var i = 0, l = child.mixins.length; i < l; i++) {
  2982. parent = mergeOptions(parent, child.mixins[i], vm);
  2983. }
  2984. }
  2985. }
  2986. var options = {};
  2987. var key;
  2988. for (key in parent) {
  2989. mergeField(key);
  2990. }
  2991. for (key in child) {
  2992. if (!hasOwn(parent, key)) {
  2993. mergeField(key);
  2994. }
  2995. }
  2996. function mergeField(key) {
  2997. var strat = strats[key] || defaultStrat;
  2998. options[key] = strat(parent[key], child[key], vm, key);
  2999. }
  3000. return options;
  3001. }
  3002. /**
  3003. * Resolve an asset.
  3004. * This function is used because child instances need access
  3005. * to assets defined in its ancestor chain.
  3006. */
  3007. function resolveAsset(options, type, id, warnMissing) {
  3008. /* istanbul ignore if */
  3009. if (typeof id !== 'string') {
  3010. return;
  3011. }
  3012. var assets = options[type];
  3013. // check local registration variations first
  3014. if (hasOwn(assets, id))
  3015. return assets[id];
  3016. var camelizedId = camelize(id);
  3017. if (hasOwn(assets, camelizedId))
  3018. return assets[camelizedId];
  3019. var PascalCaseId = capitalize(camelizedId);
  3020. if (hasOwn(assets, PascalCaseId))
  3021. return assets[PascalCaseId];
  3022. // fallback to prototype chain
  3023. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  3024. if (warnMissing && !res) {
  3025. warn$2('Failed to resolve ' + type.slice(0, -1) + ': ' + id);
  3026. }
  3027. return res;
  3028. }
  3029. function validateProp(key, propOptions, propsData, vm) {
  3030. var prop = propOptions[key];
  3031. var absent = !hasOwn(propsData, key);
  3032. var value = propsData[key];
  3033. // boolean casting
  3034. var booleanIndex = getTypeIndex(Boolean, prop.type);
  3035. if (booleanIndex > -1) {
  3036. if (absent && !hasOwn(prop, 'default')) {
  3037. value = false;
  3038. }
  3039. else if (value === '' || value === hyphenate(key)) {
  3040. // only cast empty string / same name to boolean if
  3041. // boolean has higher priority
  3042. var stringIndex = getTypeIndex(String, prop.type);
  3043. if (stringIndex < 0 || booleanIndex < stringIndex) {
  3044. value = true;
  3045. }
  3046. }
  3047. }
  3048. // check default value
  3049. if (value === undefined) {
  3050. value = getPropDefaultValue(vm, prop, key);
  3051. // since the default value is a fresh copy,
  3052. // make sure to observe it.
  3053. var prevShouldObserve = shouldObserve;
  3054. toggleObserving(true);
  3055. observe(value);
  3056. toggleObserving(prevShouldObserve);
  3057. }
  3058. {
  3059. assertProp(prop, key, value, vm, absent);
  3060. }
  3061. return value;
  3062. }
  3063. /**
  3064. * Get the default value of a prop.
  3065. */
  3066. function getPropDefaultValue(vm, prop, key) {
  3067. // no default, return undefined
  3068. if (!hasOwn(prop, 'default')) {
  3069. return undefined;
  3070. }
  3071. var def = prop.default;
  3072. // warn against non-factory defaults for Object & Array
  3073. if (isObject(def)) {
  3074. warn$2('Invalid default value for prop "' +
  3075. key +
  3076. '": ' +
  3077. 'Props with type Object/Array must use a factory function ' +
  3078. 'to return the default value.', vm);
  3079. }
  3080. // the raw prop value was also undefined from previous render,
  3081. // return previous default value to avoid unnecessary watcher trigger
  3082. if (vm &&
  3083. vm.$options.propsData &&
  3084. vm.$options.propsData[key] === undefined &&
  3085. vm._props[key] !== undefined) {
  3086. return vm._props[key];
  3087. }
  3088. // call factory function for non-Function types
  3089. // a value is Function if its prototype is function even across different execution context
  3090. return isFunction(def) && getType(prop.type) !== 'Function'
  3091. ? def.call(vm)
  3092. : def;
  3093. }
  3094. /**
  3095. * Assert whether a prop is valid.
  3096. */
  3097. function assertProp(prop, name, value, vm, absent) {
  3098. if (prop.required && absent) {
  3099. warn$2('Missing required prop: "' + name + '"', vm);
  3100. return;
  3101. }
  3102. if (value == null && !prop.required) {
  3103. return;
  3104. }
  3105. var type = prop.type;
  3106. var valid = !type || type === true;
  3107. var expectedTypes = [];
  3108. if (type) {
  3109. if (!isArray(type)) {
  3110. type = [type];
  3111. }
  3112. for (var i = 0; i < type.length && !valid; i++) {
  3113. var assertedType = assertType(value, type[i], vm);
  3114. expectedTypes.push(assertedType.expectedType || '');
  3115. valid = assertedType.valid;
  3116. }
  3117. }
  3118. var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
  3119. if (!valid && haveExpectedTypes) {
  3120. warn$2(getInvalidTypeMessage(name, value, expectedTypes), vm);
  3121. return;
  3122. }
  3123. var validator = prop.validator;
  3124. if (validator) {
  3125. if (!validator(value)) {
  3126. warn$2('Invalid prop: custom validator check failed for prop "' + name + '".', vm);
  3127. }
  3128. }
  3129. }
  3130. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;
  3131. function assertType(value, type, vm) {
  3132. var valid;
  3133. var expectedType = getType(type);
  3134. if (simpleCheckRE.test(expectedType)) {
  3135. var t = typeof value;
  3136. valid = t === expectedType.toLowerCase();
  3137. // for primitive wrapper objects
  3138. if (!valid && t === 'object') {
  3139. valid = value instanceof type;
  3140. }
  3141. }
  3142. else if (expectedType === 'Object') {
  3143. valid = isPlainObject(value);
  3144. }
  3145. else if (expectedType === 'Array') {
  3146. valid = isArray(value);
  3147. }
  3148. else {
  3149. try {
  3150. valid = value instanceof type;
  3151. }
  3152. catch (e) {
  3153. warn$2('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
  3154. valid = false;
  3155. }
  3156. }
  3157. return {
  3158. valid: valid,
  3159. expectedType: expectedType
  3160. };
  3161. }
  3162. var functionTypeCheckRE = /^\s*function (\w+)/;
  3163. /**
  3164. * Use function string name to check built-in types,
  3165. * because a simple equality check will fail when running
  3166. * across different vms / iframes.
  3167. */
  3168. function getType(fn) {
  3169. var match = fn && fn.toString().match(functionTypeCheckRE);
  3170. return match ? match[1] : '';
  3171. }
  3172. function isSameType(a, b) {
  3173. return getType(a) === getType(b);
  3174. }
  3175. function getTypeIndex(type, expectedTypes) {
  3176. if (!isArray(expectedTypes)) {
  3177. return isSameType(expectedTypes, type) ? 0 : -1;
  3178. }
  3179. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  3180. if (isSameType(expectedTypes[i], type)) {
  3181. return i;
  3182. }
  3183. }
  3184. return -1;
  3185. }
  3186. function getInvalidTypeMessage(name, value, expectedTypes) {
  3187. var message = "Invalid prop: type check failed for prop \"".concat(name, "\".") +
  3188. " Expected ".concat(expectedTypes.map(capitalize).join(', '));
  3189. var expectedType = expectedTypes[0];
  3190. var receivedType = toRawType(value);
  3191. // check if we need to specify expected value
  3192. if (expectedTypes.length === 1 &&
  3193. isExplicable(expectedType) &&
  3194. isExplicable(typeof value) &&
  3195. !isBoolean(expectedType, receivedType)) {
  3196. message += " with value ".concat(styleValue(value, expectedType));
  3197. }
  3198. message += ", got ".concat(receivedType, " ");
  3199. // check if we need to specify received value
  3200. if (isExplicable(receivedType)) {
  3201. message += "with value ".concat(styleValue(value, receivedType), ".");
  3202. }
  3203. return message;
  3204. }
  3205. function styleValue(value, type) {
  3206. if (type === 'String') {
  3207. return "\"".concat(value, "\"");
  3208. }
  3209. else if (type === 'Number') {
  3210. return "".concat(Number(value));
  3211. }
  3212. else {
  3213. return "".concat(value);
  3214. }
  3215. }
  3216. var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
  3217. function isExplicable(value) {
  3218. return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });
  3219. }
  3220. function isBoolean() {
  3221. var args = [];
  3222. for (var _i = 0; _i < arguments.length; _i++) {
  3223. args[_i] = arguments[_i];
  3224. }
  3225. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });
  3226. }
  3227. function genClassForVnode(vnode) {
  3228. var data = vnode.data;
  3229. var parentNode = vnode;
  3230. var childNode = vnode;
  3231. while (isDef(childNode.componentInstance)) {
  3232. childNode = childNode.componentInstance._vnode;
  3233. if (childNode && childNode.data) {
  3234. data = mergeClassData(childNode.data, data);
  3235. }
  3236. }
  3237. // @ts-expect-error parentNode.parent not VNodeWithData
  3238. while (isDef((parentNode = parentNode.parent))) {
  3239. if (parentNode && parentNode.data) {
  3240. data = mergeClassData(data, parentNode.data);
  3241. }
  3242. }
  3243. return renderClass$1(data.staticClass, data.class);
  3244. }
  3245. function mergeClassData(child, parent) {
  3246. return {
  3247. staticClass: concat(child.staticClass, parent.staticClass),
  3248. class: isDef(child.class) ? [child.class, parent.class] : parent.class
  3249. };
  3250. }
  3251. function renderClass$1(staticClass, dynamicClass) {
  3252. if (isDef(staticClass) || isDef(dynamicClass)) {
  3253. return concat(staticClass, stringifyClass(dynamicClass));
  3254. }
  3255. /* istanbul ignore next */
  3256. return '';
  3257. }
  3258. function concat(a, b) {
  3259. return a ? (b ? a + ' ' + b : a) : b || '';
  3260. }
  3261. function stringifyClass(value) {
  3262. if (Array.isArray(value)) {
  3263. return stringifyArray(value);
  3264. }
  3265. if (isObject(value)) {
  3266. return stringifyObject(value);
  3267. }
  3268. if (typeof value === 'string') {
  3269. return value;
  3270. }
  3271. /* istanbul ignore next */
  3272. return '';
  3273. }
  3274. function stringifyArray(value) {
  3275. var res = '';
  3276. var stringified;
  3277. for (var i = 0, l = value.length; i < l; i++) {
  3278. if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {
  3279. if (res)
  3280. res += ' ';
  3281. res += stringified;
  3282. }
  3283. }
  3284. return res;
  3285. }
  3286. function stringifyObject(value) {
  3287. var res = '';
  3288. for (var key in value) {
  3289. if (value[key]) {
  3290. if (res)
  3291. res += ' ';
  3292. res += key;
  3293. }
  3294. }
  3295. return res;
  3296. }
  3297. var isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +
  3298. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  3299. 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
  3300. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  3301. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  3302. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  3303. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  3304. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  3305. 'output,progress,select,textarea,' +
  3306. 'details,dialog,menu,menuitem,summary,' +
  3307. 'content,element,shadow,template,blockquote,iframe,tfoot');
  3308. // this map is intentionally selective, only covering SVG elements that may
  3309. // contain child elements.
  3310. var isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  3311. 'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  3312. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);
  3313. var isPreTag = function (tag) { return tag === 'pre'; };
  3314. var isReservedTag = function (tag) {
  3315. return isHTMLTag(tag) || isSVG(tag);
  3316. };
  3317. function getTagNamespace(tag) {
  3318. if (isSVG(tag)) {
  3319. return 'svg';
  3320. }
  3321. // basic support for MathML
  3322. // note it doesn't support other MathML elements being component roots
  3323. if (tag === 'math') {
  3324. return 'math';
  3325. }
  3326. }
  3327. makeMap('text,number,password,search,email,tel,url');
  3328. function renderClass(node) {
  3329. var classList = genClassForVnode(node);
  3330. if (classList !== '') {
  3331. return " class=\"".concat(escape(classList), "\"");
  3332. }
  3333. }
  3334. var parseStyleText = cached(function (cssText) {
  3335. var res = {};
  3336. var listDelimiter = /;(?![^(]*\))/g;
  3337. var propertyDelimiter = /:(.+)/;
  3338. cssText.split(listDelimiter).forEach(function (item) {
  3339. if (item) {
  3340. var tmp = item.split(propertyDelimiter);
  3341. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  3342. }
  3343. });
  3344. return res;
  3345. });
  3346. // merge static and dynamic style data on the same vnode
  3347. function normalizeStyleData(data) {
  3348. var style = normalizeStyleBinding(data.style);
  3349. // static style is pre-processed into an object during compilation
  3350. // and is always a fresh object, so it's safe to merge into it
  3351. return data.staticStyle ? extend(data.staticStyle, style) : style;
  3352. }
  3353. // normalize possible array / string values into Object
  3354. function normalizeStyleBinding(bindingStyle) {
  3355. if (Array.isArray(bindingStyle)) {
  3356. return toObject(bindingStyle);
  3357. }
  3358. if (typeof bindingStyle === 'string') {
  3359. return parseStyleText(bindingStyle);
  3360. }
  3361. return bindingStyle;
  3362. }
  3363. /**
  3364. * parent component style should be after child's
  3365. * so that parent component's style could override it
  3366. */
  3367. function getStyle(vnode, checkChild) {
  3368. var res = {};
  3369. var styleData;
  3370. if (checkChild) {
  3371. var childNode = vnode;
  3372. while (childNode.componentInstance) {
  3373. childNode = childNode.componentInstance._vnode;
  3374. if (childNode &&
  3375. childNode.data &&
  3376. (styleData = normalizeStyleData(childNode.data))) {
  3377. extend(res, styleData);
  3378. }
  3379. }
  3380. }
  3381. if ((styleData = normalizeStyleData(vnode.data))) {
  3382. extend(res, styleData);
  3383. }
  3384. var parentNode = vnode;
  3385. // @ts-expect-error parentNode.parent not VNodeWithData
  3386. while ((parentNode = parentNode.parent)) {
  3387. if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
  3388. extend(res, styleData);
  3389. }
  3390. }
  3391. return res;
  3392. }
  3393. function genStyle(style) {
  3394. var styleText = '';
  3395. for (var key in style) {
  3396. var value = style[key];
  3397. var hyphenatedKey = hyphenate(key);
  3398. if (Array.isArray(value)) {
  3399. for (var i = 0, len = value.length; i < len; i++) {
  3400. styleText += normalizeValue(hyphenatedKey, value[i]);
  3401. }
  3402. }
  3403. else {
  3404. styleText += normalizeValue(hyphenatedKey, value);
  3405. }
  3406. }
  3407. return styleText;
  3408. }
  3409. function normalizeValue(key, value) {
  3410. if (typeof value === 'string' ||
  3411. (typeof value === 'number' && noUnitNumericStyleProps[key]) ||
  3412. value === 0) {
  3413. return "".concat(key, ":").concat(value, ";");
  3414. }
  3415. else {
  3416. // invalid values
  3417. return "";
  3418. }
  3419. }
  3420. function renderStyle(vnode) {
  3421. var styleText = genStyle(getStyle(vnode, false));
  3422. if (styleText !== '') {
  3423. return " style=".concat(JSON.stringify(escape(styleText)));
  3424. }
  3425. }
  3426. var modules$1 = [renderAttrs$1, renderDOMProps$1, renderClass, renderStyle];
  3427. function show(node, dir) {
  3428. if (!dir.value) {
  3429. var style = node.data.style || (node.data.style = {});
  3430. if (Array.isArray(style)) {
  3431. style.push({ display: 'none' });
  3432. }
  3433. else {
  3434. style.display = 'none';
  3435. }
  3436. }
  3437. }
  3438. // this is only applied for <select v-model> because it is the only edge case
  3439. // that must be done at runtime instead of compile time.
  3440. function model$2(node, dir) {
  3441. if (!node.children)
  3442. return;
  3443. var value = dir.value;
  3444. var isMultiple = node.data.attrs && node.data.attrs.multiple;
  3445. for (var i = 0, l = node.children.length; i < l; i++) {
  3446. var option = node.children[i];
  3447. if (option.tag === 'option') {
  3448. if (isMultiple) {
  3449. var selected = Array.isArray(value) && looseIndexOf(value, getValue(option)) > -1;
  3450. if (selected) {
  3451. setSelected(option);
  3452. }
  3453. }
  3454. else {
  3455. if (looseEqual(value, getValue(option))) {
  3456. setSelected(option);
  3457. return;
  3458. }
  3459. }
  3460. }
  3461. }
  3462. }
  3463. function getValue(option) {
  3464. var data = option.data || {};
  3465. return ((data.attrs && data.attrs.value) ||
  3466. (data.domProps && data.domProps.value) ||
  3467. (option.children && option.children[0] && option.children[0].text));
  3468. }
  3469. function setSelected(option) {
  3470. var data = option.data || (option.data = {});
  3471. var attrs = data.attrs || (data.attrs = {});
  3472. attrs.selected = '';
  3473. }
  3474. var directives$1 = {
  3475. show: show,
  3476. model: model$2
  3477. };
  3478. var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  3479. 'link,meta,param,source,track,wbr');
  3480. // Elements that you can, intentionally, leave open
  3481. // (and which close themselves)
  3482. var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
  3483. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  3484. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  3485. var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  3486. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  3487. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  3488. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  3489. 'title,tr,track');
  3490. var MAX_STACK_DEPTH = 800;
  3491. var noop = function (_) { return _; };
  3492. var defer = typeof process !== 'undefined' && process.nextTick
  3493. ? process.nextTick
  3494. : typeof Promise !== 'undefined'
  3495. ? function (fn) { return Promise.resolve().then(fn); }
  3496. : typeof setTimeout !== 'undefined'
  3497. ? setTimeout
  3498. : noop;
  3499. if (defer === noop) {
  3500. throw new Error('Your JavaScript runtime does not support any asynchronous primitives ' +
  3501. 'that are required by vue-server-renderer. Please use a polyfill for ' +
  3502. 'either Promise or setTimeout.');
  3503. }
  3504. function createWriteFunction(write, onError) {
  3505. var stackDepth = 0;
  3506. var cachedWrite = function (text, next) {
  3507. if (text && cachedWrite.caching) {
  3508. cachedWrite.cacheBuffer[cachedWrite.cacheBuffer.length - 1] += text;
  3509. }
  3510. var waitForNext = write(text, next);
  3511. if (waitForNext !== true) {
  3512. if (stackDepth >= MAX_STACK_DEPTH) {
  3513. defer(function () {
  3514. try {
  3515. next();
  3516. }
  3517. catch (e) {
  3518. onError(e);
  3519. }
  3520. });
  3521. }
  3522. else {
  3523. stackDepth++;
  3524. next();
  3525. stackDepth--;
  3526. }
  3527. }
  3528. };
  3529. cachedWrite.caching = false;
  3530. cachedWrite.cacheBuffer = [];
  3531. cachedWrite.componentBuffer = [];
  3532. return cachedWrite;
  3533. }
  3534. var RenderContext = /** @class */ (function () {
  3535. function RenderContext(options) {
  3536. this.userContext = options.userContext;
  3537. this.activeInstance = options.activeInstance;
  3538. this.renderStates = [];
  3539. this.write = options.write;
  3540. this.done = options.done;
  3541. this.renderNode = options.renderNode;
  3542. this.isUnaryTag = options.isUnaryTag;
  3543. this.modules = options.modules;
  3544. this.directives = options.directives;
  3545. var cache = options.cache;
  3546. if (cache && (!cache.get || !cache.set)) {
  3547. throw new Error('renderer cache must implement at least get & set.');
  3548. }
  3549. this.cache = cache;
  3550. this.get = cache && normalizeAsync(cache, 'get');
  3551. this.has = cache && normalizeAsync(cache, 'has');
  3552. //@ts-expect-error
  3553. this.next = this.next.bind(this);
  3554. }
  3555. //@ts-expect-error
  3556. RenderContext.prototype.next = function () {
  3557. var _loop_1 = function () {
  3558. var lastState = this_1.renderStates[this_1.renderStates.length - 1];
  3559. if (isUndef(lastState)) {
  3560. return { value: this_1.done() };
  3561. }
  3562. /* eslint-disable no-case-declarations */
  3563. switch (lastState.type) {
  3564. case 'Element':
  3565. case 'Fragment':
  3566. var children = lastState.children, total = lastState.total;
  3567. var rendered = lastState.rendered++;
  3568. if (rendered < total) {
  3569. return { value: this_1.renderNode(children[rendered], false, this_1) };
  3570. }
  3571. else {
  3572. this_1.renderStates.pop();
  3573. if (lastState.type === 'Element') {
  3574. return { value: this_1.write(lastState.endTag, this_1.next) };
  3575. }
  3576. }
  3577. break;
  3578. case 'Component':
  3579. this_1.renderStates.pop();
  3580. this_1.activeInstance = lastState.prevActive;
  3581. break;
  3582. case 'ComponentWithCache':
  3583. this_1.renderStates.pop();
  3584. var buffer = lastState.buffer, bufferIndex = lastState.bufferIndex, componentBuffer = lastState.componentBuffer, key = lastState.key;
  3585. var result = {
  3586. html: buffer[bufferIndex],
  3587. components: componentBuffer[bufferIndex]
  3588. };
  3589. this_1.cache.set(key, result);
  3590. if (bufferIndex === 0) {
  3591. // this is a top-level cached component,
  3592. // exit caching mode.
  3593. //@ts-expect-error
  3594. this_1.write.caching = false;
  3595. }
  3596. else {
  3597. // parent component is also being cached,
  3598. // merge self into parent's result
  3599. buffer[bufferIndex - 1] += result.html;
  3600. var prev_1 = componentBuffer[bufferIndex - 1];
  3601. result.components.forEach(function (c) { return prev_1.add(c); });
  3602. }
  3603. buffer.length = bufferIndex;
  3604. componentBuffer.length = bufferIndex;
  3605. break;
  3606. }
  3607. };
  3608. var this_1 = this;
  3609. // eslint-disable-next-line
  3610. while (true) {
  3611. var state_1 = _loop_1();
  3612. if (typeof state_1 === "object")
  3613. return state_1.value;
  3614. }
  3615. };
  3616. return RenderContext;
  3617. }());
  3618. function normalizeAsync(cache, method) {
  3619. var fn = cache[method];
  3620. if (isUndef(fn)) {
  3621. return;
  3622. }
  3623. else if (fn.length > 1) {
  3624. return function (key, cb) { return fn.call(cache, key, cb); };
  3625. }
  3626. else {
  3627. return function (key, cb) { return cb(fn.call(cache, key)); };
  3628. }
  3629. }
  3630. var validDivisionCharRE = /[\w).+\-_$\]]/;
  3631. function parseFilters(exp) {
  3632. var inSingle = false;
  3633. var inDouble = false;
  3634. var inTemplateString = false;
  3635. var inRegex = false;
  3636. var curly = 0;
  3637. var square = 0;
  3638. var paren = 0;
  3639. var lastFilterIndex = 0;
  3640. var c, prev, i, expression, filters;
  3641. for (i = 0; i < exp.length; i++) {
  3642. prev = c;
  3643. c = exp.charCodeAt(i);
  3644. if (inSingle) {
  3645. if (c === 0x27 && prev !== 0x5c)
  3646. inSingle = false;
  3647. }
  3648. else if (inDouble) {
  3649. if (c === 0x22 && prev !== 0x5c)
  3650. inDouble = false;
  3651. }
  3652. else if (inTemplateString) {
  3653. if (c === 0x60 && prev !== 0x5c)
  3654. inTemplateString = false;
  3655. }
  3656. else if (inRegex) {
  3657. if (c === 0x2f && prev !== 0x5c)
  3658. inRegex = false;
  3659. }
  3660. else if (c === 0x7c && // pipe
  3661. exp.charCodeAt(i + 1) !== 0x7c &&
  3662. exp.charCodeAt(i - 1) !== 0x7c &&
  3663. !curly &&
  3664. !square &&
  3665. !paren) {
  3666. if (expression === undefined) {
  3667. // first filter, end of expression
  3668. lastFilterIndex = i + 1;
  3669. expression = exp.slice(0, i).trim();
  3670. }
  3671. else {
  3672. pushFilter();
  3673. }
  3674. }
  3675. else {
  3676. switch (c) {
  3677. case 0x22:
  3678. inDouble = true;
  3679. break; // "
  3680. case 0x27:
  3681. inSingle = true;
  3682. break; // '
  3683. case 0x60:
  3684. inTemplateString = true;
  3685. break; // `
  3686. case 0x28:
  3687. paren++;
  3688. break; // (
  3689. case 0x29:
  3690. paren--;
  3691. break; // )
  3692. case 0x5b:
  3693. square++;
  3694. break; // [
  3695. case 0x5d:
  3696. square--;
  3697. break; // ]
  3698. case 0x7b:
  3699. curly++;
  3700. break; // {
  3701. case 0x7d:
  3702. curly--;
  3703. break; // }
  3704. }
  3705. if (c === 0x2f) {
  3706. // /
  3707. var j = i - 1;
  3708. var p
  3709. // find first non-whitespace prev char
  3710. = void 0;
  3711. // find first non-whitespace prev char
  3712. for (; j >= 0; j--) {
  3713. p = exp.charAt(j);
  3714. if (p !== ' ')
  3715. break;
  3716. }
  3717. if (!p || !validDivisionCharRE.test(p)) {
  3718. inRegex = true;
  3719. }
  3720. }
  3721. }
  3722. }
  3723. if (expression === undefined) {
  3724. expression = exp.slice(0, i).trim();
  3725. }
  3726. else if (lastFilterIndex !== 0) {
  3727. pushFilter();
  3728. }
  3729. function pushFilter() {
  3730. (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
  3731. lastFilterIndex = i + 1;
  3732. }
  3733. if (filters) {
  3734. for (i = 0; i < filters.length; i++) {
  3735. expression = wrapFilter(expression, filters[i]);
  3736. }
  3737. }
  3738. return expression;
  3739. }
  3740. function wrapFilter(exp, filter) {
  3741. var i = filter.indexOf('(');
  3742. if (i < 0) {
  3743. // _f: resolveFilter
  3744. return "_f(\"".concat(filter, "\")(").concat(exp, ")");
  3745. }
  3746. else {
  3747. var name_1 = filter.slice(0, i);
  3748. var args = filter.slice(i + 1);
  3749. return "_f(\"".concat(name_1, "\")(").concat(exp).concat(args !== ')' ? ',' + args : args);
  3750. }
  3751. }
  3752. var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
  3753. var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
  3754. var buildRegex = cached(function (delimiters) {
  3755. var open = delimiters[0].replace(regexEscapeRE, '\\$&');
  3756. var close = delimiters[1].replace(regexEscapeRE, '\\$&');
  3757. return new RegExp(open + '((?:.|\\n)+?)' + close, 'g');
  3758. });
  3759. function parseText(text, delimiters) {
  3760. //@ts-expect-error
  3761. var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
  3762. if (!tagRE.test(text)) {
  3763. return;
  3764. }
  3765. var tokens = [];
  3766. var rawTokens = [];
  3767. var lastIndex = (tagRE.lastIndex = 0);
  3768. var match, index, tokenValue;
  3769. while ((match = tagRE.exec(text))) {
  3770. index = match.index;
  3771. // push text token
  3772. if (index > lastIndex) {
  3773. rawTokens.push((tokenValue = text.slice(lastIndex, index)));
  3774. tokens.push(JSON.stringify(tokenValue));
  3775. }
  3776. // tag token
  3777. var exp = parseFilters(match[1].trim());
  3778. tokens.push("_s(".concat(exp, ")"));
  3779. rawTokens.push({ '@binding': exp });
  3780. lastIndex = index + match[0].length;
  3781. }
  3782. if (lastIndex < text.length) {
  3783. rawTokens.push((tokenValue = text.slice(lastIndex)));
  3784. tokens.push(JSON.stringify(tokenValue));
  3785. }
  3786. return {
  3787. expression: tokens.join('+'),
  3788. tokens: rawTokens
  3789. };
  3790. }
  3791. /* eslint-disable no-unused-vars */
  3792. function baseWarn(msg, range) {
  3793. console.error("[Vue compiler]: ".concat(msg));
  3794. }
  3795. /* eslint-enable no-unused-vars */
  3796. function pluckModuleFunction(modules, key) {
  3797. return modules ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) : [];
  3798. }
  3799. function addProp(el, name, value, range, dynamic) {
  3800. (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
  3801. el.plain = false;
  3802. }
  3803. function addAttr(el, name, value, range, dynamic) {
  3804. var attrs = dynamic
  3805. ? el.dynamicAttrs || (el.dynamicAttrs = [])
  3806. : el.attrs || (el.attrs = []);
  3807. attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
  3808. el.plain = false;
  3809. }
  3810. // add a raw attr (use this in preTransforms)
  3811. function addRawAttr(el, name, value, range) {
  3812. el.attrsMap[name] = value;
  3813. el.attrsList.push(rangeSetItem({ name: name, value: value }, range));
  3814. }
  3815. function addDirective(el, name, rawName, value, arg, isDynamicArg, modifiers, range) {
  3816. (el.directives || (el.directives = [])).push(rangeSetItem({
  3817. name: name,
  3818. rawName: rawName,
  3819. value: value,
  3820. arg: arg,
  3821. isDynamicArg: isDynamicArg,
  3822. modifiers: modifiers
  3823. }, range));
  3824. el.plain = false;
  3825. }
  3826. function prependModifierMarker(symbol, name, dynamic) {
  3827. return dynamic ? "_p(".concat(name, ",\"").concat(symbol, "\")") : symbol + name; // mark the event as captured
  3828. }
  3829. function addHandler(el, name, value, modifiers, important, warn, range, dynamic) {
  3830. modifiers = modifiers || emptyObject;
  3831. // warn prevent and passive modifier
  3832. /* istanbul ignore if */
  3833. if (warn && modifiers.prevent && modifiers.passive) {
  3834. warn("passive and prevent can't be used together. " +
  3835. "Passive handler can't prevent default event.", range);
  3836. }
  3837. // normalize click.right and click.middle since they don't actually fire
  3838. // this is technically browser-specific, but at least for now browsers are
  3839. // the only target envs that have right/middle clicks.
  3840. if (modifiers.right) {
  3841. if (dynamic) {
  3842. name = "(".concat(name, ")==='click'?'contextmenu':(").concat(name, ")");
  3843. }
  3844. else if (name === 'click') {
  3845. name = 'contextmenu';
  3846. delete modifiers.right;
  3847. }
  3848. }
  3849. else if (modifiers.middle) {
  3850. if (dynamic) {
  3851. name = "(".concat(name, ")==='click'?'mouseup':(").concat(name, ")");
  3852. }
  3853. else if (name === 'click') {
  3854. name = 'mouseup';
  3855. }
  3856. }
  3857. // check capture modifier
  3858. if (modifiers.capture) {
  3859. delete modifiers.capture;
  3860. name = prependModifierMarker('!', name, dynamic);
  3861. }
  3862. if (modifiers.once) {
  3863. delete modifiers.once;
  3864. name = prependModifierMarker('~', name, dynamic);
  3865. }
  3866. /* istanbul ignore if */
  3867. if (modifiers.passive) {
  3868. delete modifiers.passive;
  3869. name = prependModifierMarker('&', name, dynamic);
  3870. }
  3871. var events;
  3872. if (modifiers.native) {
  3873. delete modifiers.native;
  3874. events = el.nativeEvents || (el.nativeEvents = {});
  3875. }
  3876. else {
  3877. events = el.events || (el.events = {});
  3878. }
  3879. var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);
  3880. if (modifiers !== emptyObject) {
  3881. newHandler.modifiers = modifiers;
  3882. }
  3883. var handlers = events[name];
  3884. /* istanbul ignore if */
  3885. if (Array.isArray(handlers)) {
  3886. important ? handlers.unshift(newHandler) : handlers.push(newHandler);
  3887. }
  3888. else if (handlers) {
  3889. events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
  3890. }
  3891. else {
  3892. events[name] = newHandler;
  3893. }
  3894. el.plain = false;
  3895. }
  3896. function getRawBindingAttr(el, name) {
  3897. return (el.rawAttrsMap[':' + name] ||
  3898. el.rawAttrsMap['v-bind:' + name] ||
  3899. el.rawAttrsMap[name]);
  3900. }
  3901. function getBindingAttr(el, name, getStatic) {
  3902. var dynamicValue = getAndRemoveAttr(el, ':' + name) || getAndRemoveAttr(el, 'v-bind:' + name);
  3903. if (dynamicValue != null) {
  3904. return parseFilters(dynamicValue);
  3905. }
  3906. else if (getStatic !== false) {
  3907. var staticValue = getAndRemoveAttr(el, name);
  3908. if (staticValue != null) {
  3909. return JSON.stringify(staticValue);
  3910. }
  3911. }
  3912. }
  3913. // note: this only removes the attr from the Array (attrsList) so that it
  3914. // doesn't get processed by processAttrs.
  3915. // By default it does NOT remove it from the map (attrsMap) because the map is
  3916. // needed during codegen.
  3917. function getAndRemoveAttr(el, name, removeFromMap) {
  3918. var val;
  3919. if ((val = el.attrsMap[name]) != null) {
  3920. var list = el.attrsList;
  3921. for (var i = 0, l = list.length; i < l; i++) {
  3922. if (list[i].name === name) {
  3923. list.splice(i, 1);
  3924. break;
  3925. }
  3926. }
  3927. }
  3928. if (removeFromMap) {
  3929. delete el.attrsMap[name];
  3930. }
  3931. return val;
  3932. }
  3933. function getAndRemoveAttrByRegex(el, name) {
  3934. var list = el.attrsList;
  3935. for (var i = 0, l = list.length; i < l; i++) {
  3936. var attr = list[i];
  3937. if (name.test(attr.name)) {
  3938. list.splice(i, 1);
  3939. return attr;
  3940. }
  3941. }
  3942. }
  3943. function rangeSetItem(item, range) {
  3944. if (range) {
  3945. if (range.start != null) {
  3946. item.start = range.start;
  3947. }
  3948. if (range.end != null) {
  3949. item.end = range.end;
  3950. }
  3951. }
  3952. return item;
  3953. }
  3954. function transformNode$1(el, options) {
  3955. var warn = options.warn || baseWarn;
  3956. var staticClass = getAndRemoveAttr(el, 'class');
  3957. if (staticClass) {
  3958. var res = parseText(staticClass, options.delimiters);
  3959. if (res) {
  3960. warn("class=\"".concat(staticClass, "\": ") +
  3961. 'Interpolation inside attributes has been removed. ' +
  3962. 'Use v-bind or the colon shorthand instead. For example, ' +
  3963. 'instead of <div class="{{ val }}">, use <div :class="val">.', el.rawAttrsMap['class']);
  3964. }
  3965. }
  3966. if (staticClass) {
  3967. el.staticClass = JSON.stringify(staticClass.replace(/\s+/g, ' ').trim());
  3968. }
  3969. var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
  3970. if (classBinding) {
  3971. el.classBinding = classBinding;
  3972. }
  3973. }
  3974. function genData$2(el) {
  3975. var data = '';
  3976. if (el.staticClass) {
  3977. data += "staticClass:".concat(el.staticClass, ",");
  3978. }
  3979. if (el.classBinding) {
  3980. data += "class:".concat(el.classBinding, ",");
  3981. }
  3982. return data;
  3983. }
  3984. var klass = {
  3985. staticKeys: ['staticClass'],
  3986. transformNode: transformNode$1,
  3987. genData: genData$2
  3988. };
  3989. function transformNode(el, options) {
  3990. var warn = options.warn || baseWarn;
  3991. var staticStyle = getAndRemoveAttr(el, 'style');
  3992. if (staticStyle) {
  3993. /* istanbul ignore if */
  3994. {
  3995. var res = parseText(staticStyle, options.delimiters);
  3996. if (res) {
  3997. warn("style=\"".concat(staticStyle, "\": ") +
  3998. 'Interpolation inside attributes has been removed. ' +
  3999. 'Use v-bind or the colon shorthand instead. For example, ' +
  4000. 'instead of <div style="{{ val }}">, use <div :style="val">.', el.rawAttrsMap['style']);
  4001. }
  4002. }
  4003. el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
  4004. }
  4005. var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
  4006. if (styleBinding) {
  4007. el.styleBinding = styleBinding;
  4008. }
  4009. }
  4010. function genData$1(el) {
  4011. var data = '';
  4012. if (el.staticStyle) {
  4013. data += "staticStyle:".concat(el.staticStyle, ",");
  4014. }
  4015. if (el.styleBinding) {
  4016. data += "style:(".concat(el.styleBinding, "),");
  4017. }
  4018. return data;
  4019. }
  4020. var style = {
  4021. staticKeys: ['staticStyle'],
  4022. transformNode: transformNode,
  4023. genData: genData$1
  4024. };
  4025. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  4026. var he$1 = {exports: {}};
  4027. /*! https://mths.be/he v1.2.0 by @mathias | MIT license */
  4028. (function (module, exports) {
  4029. (function(root) {
  4030. // Detect free variables `exports`.
  4031. var freeExports = exports;
  4032. // Detect free variable `module`.
  4033. var freeModule = module &&
  4034. module.exports == freeExports && module;
  4035. // Detect free variable `global`, from Node.js or Browserified code,
  4036. // and use it as `root`.
  4037. var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
  4038. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
  4039. root = freeGlobal;
  4040. }
  4041. /*--------------------------------------------------------------------------*/
  4042. // All astral symbols.
  4043. var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  4044. // All ASCII symbols (not just printable ASCII) except those listed in the
  4045. // first column of the overrides table.
  4046. // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides
  4047. var regexAsciiWhitelist = /[\x01-\x7F]/g;
  4048. // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
  4049. // code points listed in the first column of the overrides table on
  4050. // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.
  4051. var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
  4052. var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;
  4053. var encodeMap = {'\xAD':'shy','\u200C':'zwnj','\u200D':'zwj','\u200E':'lrm','\u2063':'ic','\u2062':'it','\u2061':'af','\u200F':'rlm','\u200B':'ZeroWidthSpace','\u2060':'NoBreak','\u0311':'DownBreve','\u20DB':'tdot','\u20DC':'DotDot','\t':'Tab','\n':'NewLine','\u2008':'puncsp','\u205F':'MediumSpace','\u2009':'thinsp','\u200A':'hairsp','\u2004':'emsp13','\u2002':'ensp','\u2005':'emsp14','\u2003':'emsp','\u2007':'numsp','\xA0':'nbsp','\u205F\u200A':'ThickSpace','\u203E':'oline','_':'lowbar','\u2010':'dash','\u2013':'ndash','\u2014':'mdash','\u2015':'horbar',',':'comma',';':'semi','\u204F':'bsemi',':':'colon','\u2A74':'Colone','!':'excl','\xA1':'iexcl','?':'quest','\xBF':'iquest','.':'period','\u2025':'nldr','\u2026':'mldr','\xB7':'middot','\'':'apos','\u2018':'lsquo','\u2019':'rsquo','\u201A':'sbquo','\u2039':'lsaquo','\u203A':'rsaquo','"':'quot','\u201C':'ldquo','\u201D':'rdquo','\u201E':'bdquo','\xAB':'laquo','\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\u2308':'lceil','\u2309':'rceil','\u230A':'lfloor','\u230B':'rfloor','\u2985':'lopar','\u2986':'ropar','\u298B':'lbrke','\u298C':'rbrke','\u298D':'lbrkslu','\u298E':'rbrksld','\u298F':'lbrksld','\u2990':'rbrkslu','\u2991':'langd','\u2992':'rangd','\u2993':'lparlt','\u2994':'rpargt','\u2995':'gtlPar','\u2996':'ltrPar','\u27E6':'lobrk','\u27E7':'robrk','\u27E8':'lang','\u27E9':'rang','\u27EA':'Lang','\u27EB':'Rang','\u27EC':'loang','\u27ED':'roang','\u2772':'lbbrk','\u2773':'rbbrk','\u2016':'Vert','\xA7':'sect','\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\u2030':'permil','\u2031':'pertenk','\u2020':'dagger','\u2021':'Dagger','\u2022':'bull','\u2043':'hybull','\u2032':'prime','\u2033':'Prime','\u2034':'tprime','\u2057':'qprime','\u2035':'bprime','\u2041':'caret','`':'grave','\xB4':'acute','\u02DC':'tilde','^':'Hat','\xAF':'macr','\u02D8':'breve','\u02D9':'dot','\xA8':'die','\u02DA':'ring','\u02DD':'dblac','\xB8':'cedil','\u02DB':'ogon','\u02C6':'circ','\u02C7':'caron','\xB0':'deg','\xA9':'copy','\xAE':'reg','\u2117':'copysr','\u2118':'wp','\u211E':'rx','\u2127':'mho','\u2129':'iiota','\u2190':'larr','\u219A':'nlarr','\u2192':'rarr','\u219B':'nrarr','\u2191':'uarr','\u2193':'darr','\u2194':'harr','\u21AE':'nharr','\u2195':'varr','\u2196':'nwarr','\u2197':'nearr','\u2198':'searr','\u2199':'swarr','\u219D':'rarrw','\u219D\u0338':'nrarrw','\u219E':'Larr','\u219F':'Uarr','\u21A0':'Rarr','\u21A1':'Darr','\u21A2':'larrtl','\u21A3':'rarrtl','\u21A4':'mapstoleft','\u21A5':'mapstoup','\u21A6':'map','\u21A7':'mapstodown','\u21A9':'larrhk','\u21AA':'rarrhk','\u21AB':'larrlp','\u21AC':'rarrlp','\u21AD':'harrw','\u21B0':'lsh','\u21B1':'rsh','\u21B2':'ldsh','\u21B3':'rdsh','\u21B5':'crarr','\u21B6':'cularr','\u21B7':'curarr','\u21BA':'olarr','\u21BB':'orarr','\u21BC':'lharu','\u21BD':'lhard','\u21BE':'uharr','\u21BF':'uharl','\u21C0':'rharu','\u21C1':'rhard','\u21C2':'dharr','\u21C3':'dharl','\u21C4':'rlarr','\u21C5':'udarr','\u21C6':'lrarr','\u21C7':'llarr','\u21C8':'uuarr','\u21C9':'rrarr','\u21CA':'ddarr','\u21CB':'lrhar','\u21CC':'rlhar','\u21D0':'lArr','\u21CD':'nlArr','\u21D1':'uArr','\u21D2':'rArr','\u21CF':'nrArr','\u21D3':'dArr','\u21D4':'iff','\u21CE':'nhArr','\u21D5':'vArr','\u21D6':'nwArr','\u21D7':'neArr','\u21D8':'seArr','\u21D9':'swArr','\u21DA':'lAarr','\u21DB':'rAarr','\u21DD':'zigrarr','\u21E4':'larrb','\u21E5':'rarrb','\u21F5':'duarr','\u21FD':'loarr','\u21FE':'roarr','\u21FF':'hoarr','\u2200':'forall','\u2201':'comp','\u2202':'part','\u2202\u0338':'npart','\u2203':'exist','\u2204':'nexist','\u2205':'empty','\u2207':'Del','\u2208':'in','\u2209':'notin','\u220B':'ni','\u220C':'notni','\u03F6':'bepsi','\u220F':'prod','\u2210':'coprod','\u2211':'sum','+':'plus','\xB1':'pm','\xF7':'div','\xD7':'times','<':'lt','\u226E':'nlt','<\u20D2':'nvlt','=':'equals','\u2260':'ne','=\u20E5':'bne','\u2A75':'Equal','>':'gt','\u226F':'ngt','>\u20D2':'nvgt','\xAC':'not','|':'vert','\xA6':'brvbar','\u2212':'minus','\u2213':'mp','\u2214':'plusdo','\u2044':'frasl','\u2216':'setmn','\u2217':'lowast','\u2218':'compfn','\u221A':'Sqrt','\u221D':'prop','\u221E':'infin','\u221F':'angrt','\u2220':'ang','\u2220\u20D2':'nang','\u2221':'angmsd','\u2222':'angsph','\u2223':'mid','\u2224':'nmid','\u2225':'par','\u2226':'npar','\u2227':'and','\u2228':'or','\u2229':'cap','\u2229\uFE00':'caps','\u222A':'cup','\u222A\uFE00':'cups','\u222B':'int','\u222C':'Int','\u222D':'tint','\u2A0C':'qint','\u222E':'oint','\u222F':'Conint','\u2230':'Cconint','\u2231':'cwint','\u2232':'cwconint','\u2233':'awconint','\u2234':'there4','\u2235':'becaus','\u2236':'ratio','\u2237':'Colon','\u2238':'minusd','\u223A':'mDDot','\u223B':'homtht','\u223C':'sim','\u2241':'nsim','\u223C\u20D2':'nvsim','\u223D':'bsim','\u223D\u0331':'race','\u223E':'ac','\u223E\u0333':'acE','\u223F':'acd','\u2240':'wr','\u2242':'esim','\u2242\u0338':'nesim','\u2243':'sime','\u2244':'nsime','\u2245':'cong','\u2247':'ncong','\u2246':'simne','\u2248':'ap','\u2249':'nap','\u224A':'ape','\u224B':'apid','\u224B\u0338':'napid','\u224C':'bcong','\u224D':'CupCap','\u226D':'NotCupCap','\u224D\u20D2':'nvap','\u224E':'bump','\u224E\u0338':'nbump','\u224F':'bumpe','\u224F\u0338':'nbumpe','\u2250':'doteq','\u2250\u0338':'nedot','\u2251':'eDot','\u2252':'efDot','\u2253':'erDot','\u2254':'colone','\u2255':'ecolon','\u2256':'ecir','\u2257':'cire','\u2259':'wedgeq','\u225A':'veeeq','\u225C':'trie','\u225F':'equest','\u2261':'equiv','\u2262':'nequiv','\u2261\u20E5':'bnequiv','\u2264':'le','\u2270':'nle','\u2264\u20D2':'nvle','\u2265':'ge','\u2271':'nge','\u2265\u20D2':'nvge','\u2266':'lE','\u2266\u0338':'nlE','\u2267':'gE','\u2267\u0338':'ngE','\u2268\uFE00':'lvnE','\u2268':'lnE','\u2269':'gnE','\u2269\uFE00':'gvnE','\u226A':'ll','\u226A\u0338':'nLtv','\u226A\u20D2':'nLt','\u226B':'gg','\u226B\u0338':'nGtv','\u226B\u20D2':'nGt','\u226C':'twixt','\u2272':'lsim','\u2274':'nlsim','\u2273':'gsim','\u2275':'ngsim','\u2276':'lg','\u2278':'ntlg','\u2277':'gl','\u2279':'ntgl','\u227A':'pr','\u2280':'npr','\u227B':'sc','\u2281':'nsc','\u227C':'prcue','\u22E0':'nprcue','\u227D':'sccue','\u22E1':'nsccue','\u227E':'prsim','\u227F':'scsim','\u227F\u0338':'NotSucceedsTilde','\u2282':'sub','\u2284':'nsub','\u2282\u20D2':'vnsub','\u2283':'sup','\u2285':'nsup','\u2283\u20D2':'vnsup','\u2286':'sube','\u2288':'nsube','\u2287':'supe','\u2289':'nsupe','\u228A\uFE00':'vsubne','\u228A':'subne','\u228B\uFE00':'vsupne','\u228B':'supne','\u228D':'cupdot','\u228E':'uplus','\u228F':'sqsub','\u228F\u0338':'NotSquareSubset','\u2290':'sqsup','\u2290\u0338':'NotSquareSuperset','\u2291':'sqsube','\u22E2':'nsqsube','\u2292':'sqsupe','\u22E3':'nsqsupe','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u2295':'oplus','\u2296':'ominus','\u2297':'otimes','\u2298':'osol','\u2299':'odot','\u229A':'ocir','\u229B':'oast','\u229D':'odash','\u229E':'plusb','\u229F':'minusb','\u22A0':'timesb','\u22A1':'sdotb','\u22A2':'vdash','\u22AC':'nvdash','\u22A3':'dashv','\u22A4':'top','\u22A5':'bot','\u22A7':'models','\u22A8':'vDash','\u22AD':'nvDash','\u22A9':'Vdash','\u22AE':'nVdash','\u22AA':'Vvdash','\u22AB':'VDash','\u22AF':'nVDash','\u22B0':'prurel','\u22B2':'vltri','\u22EA':'nltri','\u22B3':'vrtri','\u22EB':'nrtri','\u22B4':'ltrie','\u22EC':'nltrie','\u22B4\u20D2':'nvltrie','\u22B5':'rtrie','\u22ED':'nrtrie','\u22B5\u20D2':'nvrtrie','\u22B6':'origof','\u22B7':'imof','\u22B8':'mumap','\u22B9':'hercon','\u22BA':'intcal','\u22BB':'veebar','\u22BD':'barvee','\u22BE':'angrtvb','\u22BF':'lrtri','\u22C0':'Wedge','\u22C1':'Vee','\u22C2':'xcap','\u22C3':'xcup','\u22C4':'diam','\u22C5':'sdot','\u22C6':'Star','\u22C7':'divonx','\u22C8':'bowtie','\u22C9':'ltimes','\u22CA':'rtimes','\u22CB':'lthree','\u22CC':'rthree','\u22CD':'bsime','\u22CE':'cuvee','\u22CF':'cuwed','\u22D0':'Sub','\u22D1':'Sup','\u22D2':'Cap','\u22D3':'Cup','\u22D4':'fork','\u22D5':'epar','\u22D6':'ltdot','\u22D7':'gtdot','\u22D8':'Ll','\u22D8\u0338':'nLl','\u22D9':'Gg','\u22D9\u0338':'nGg','\u22DA\uFE00':'lesg','\u22DA':'leg','\u22DB':'gel','\u22DB\uFE00':'gesl','\u22DE':'cuepr','\u22DF':'cuesc','\u22E6':'lnsim','\u22E7':'gnsim','\u22E8':'prnsim','\u22E9':'scnsim','\u22EE':'vellip','\u22EF':'ctdot','\u22F0':'utdot','\u22F1':'dtdot','\u22F2':'disin','\u22F3':'isinsv','\u22F4':'isins','\u22F5':'isindot','\u22F5\u0338':'notindot','\u22F6':'notinvc','\u22F7':'notinvb','\u22F9':'isinE','\u22F9\u0338':'notinE','\u22FA':'nisd','\u22FB':'xnis','\u22FC':'nis','\u22FD':'notnivc','\u22FE':'notnivb','\u2305':'barwed','\u2306':'Barwed','\u230C':'drcrop','\u230D':'dlcrop','\u230E':'urcrop','\u230F':'ulcrop','\u2310':'bnot','\u2312':'profline','\u2313':'profsurf','\u2315':'telrec','\u2316':'target','\u231C':'ulcorn','\u231D':'urcorn','\u231E':'dlcorn','\u231F':'drcorn','\u2322':'frown','\u2323':'smile','\u232D':'cylcty','\u232E':'profalar','\u2336':'topbot','\u233D':'ovbar','\u233F':'solbar','\u237C':'angzarr','\u23B0':'lmoust','\u23B1':'rmoust','\u23B4':'tbrk','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u23DC':'OverParenthesis','\u23DD':'UnderParenthesis','\u23DE':'OverBrace','\u23DF':'UnderBrace','\u23E2':'trpezium','\u23E7':'elinters','\u2423':'blank','\u2500':'boxh','\u2502':'boxv','\u250C':'boxdr','\u2510':'boxdl','\u2514':'boxur','\u2518':'boxul','\u251C':'boxvr','\u2524':'boxvl','\u252C':'boxhd','\u2534':'boxhu','\u253C':'boxvh','\u2550':'boxH','\u2551':'boxV','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2580':'uhblk','\u2584':'lhblk','\u2588':'block','\u2591':'blk14','\u2592':'blk12','\u2593':'blk34','\u25A1':'squ','\u25AA':'squf','\u25AB':'EmptyVerySmallSquare','\u25AD':'rect','\u25AE':'marker','\u25B1':'fltns','\u25B3':'xutri','\u25B4':'utrif','\u25B5':'utri','\u25B8':'rtrif','\u25B9':'rtri','\u25BD':'xdtri','\u25BE':'dtrif','\u25BF':'dtri','\u25C2':'ltrif','\u25C3':'ltri','\u25CA':'loz','\u25CB':'cir','\u25EC':'tridot','\u25EF':'xcirc','\u25F8':'ultri','\u25F9':'urtri','\u25FA':'lltri','\u25FB':'EmptySmallSquare','\u25FC':'FilledSmallSquare','\u2605':'starf','\u2606':'star','\u260E':'phone','\u2640':'female','\u2642':'male','\u2660':'spades','\u2663':'clubs','\u2665':'hearts','\u2666':'diams','\u266A':'sung','\u2713':'check','\u2717':'cross','\u2720':'malt','\u2736':'sext','\u2758':'VerticalSeparator','\u27C8':'bsolhsub','\u27C9':'suphsol','\u27F5':'xlarr','\u27F6':'xrarr','\u27F7':'xharr','\u27F8':'xlArr','\u27F9':'xrArr','\u27FA':'xhArr','\u27FC':'xmap','\u27FF':'dzigrarr','\u2902':'nvlArr','\u2903':'nvrArr','\u2904':'nvHarr','\u2905':'Map','\u290C':'lbarr','\u290D':'rbarr','\u290E':'lBarr','\u290F':'rBarr','\u2910':'RBarr','\u2911':'DDotrahd','\u2912':'UpArrowBar','\u2913':'DownArrowBar','\u2916':'Rarrtl','\u2919':'latail','\u291A':'ratail','\u291B':'lAtail','\u291C':'rAtail','\u291D':'larrfs','\u291E':'rarrfs','\u291F':'larrbfs','\u2920':'rarrbfs','\u2923':'nwarhk','\u2924':'nearhk','\u2925':'searhk','\u2926':'swarhk','\u2927':'nwnear','\u2928':'toea','\u2929':'tosa','\u292A':'swnwar','\u2933':'rarrc','\u2933\u0338':'nrarrc','\u2935':'cudarrr','\u2936':'ldca','\u2937':'rdca','\u2938':'cudarrl','\u2939':'larrpl','\u293C':'curarrm','\u293D':'cularrp','\u2945':'rarrpl','\u2948':'harrcir','\u2949':'Uarrocir','\u294A':'lurdshar','\u294B':'ldrushar','\u294E':'LeftRightVector','\u294F':'RightUpDownVector','\u2950':'DownLeftRightVector','\u2951':'LeftUpDownVector','\u2952':'LeftVectorBar','\u2953':'RightVectorBar','\u2954':'RightUpVectorBar','\u2955':'RightDownVectorBar','\u2956':'DownLeftVectorBar','\u2957':'DownRightVectorBar','\u2958':'LeftUpVectorBar','\u2959':'LeftDownVectorBar','\u295A':'LeftTeeVector','\u295B':'RightTeeVector','\u295C':'RightUpTeeVector','\u295D':'RightDownTeeVector','\u295E':'DownLeftTeeVector','\u295F':'DownRightTeeVector','\u2960':'LeftUpTeeVector','\u2961':'LeftDownTeeVector','\u2962':'lHar','\u2963':'uHar','\u2964':'rHar','\u2965':'dHar','\u2966':'luruhar','\u2967':'ldrdhar','\u2968':'ruluhar','\u2969':'rdldhar','\u296A':'lharul','\u296B':'llhard','\u296C':'rharul','\u296D':'lrhard','\u296E':'udhar','\u296F':'duhar','\u2970':'RoundImplies','\u2971':'erarr','\u2972':'simrarr','\u2973':'larrsim','\u2974':'rarrsim','\u2975':'rarrap','\u2976':'ltlarr','\u2978':'gtrarr','\u2979':'subrarr','\u297B':'suplarr','\u297C':'lfisht','\u297D':'rfisht','\u297E':'ufisht','\u297F':'dfisht','\u299A':'vzigzag','\u299C':'vangrt','\u299D':'angrtvbd','\u29A4':'ange','\u29A5':'range','\u29A6':'dwangle','\u29A7':'uwangle','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u29B0':'bemptyv','\u29B1':'demptyv','\u29B2':'cemptyv','\u29B3':'raemptyv','\u29B4':'laemptyv','\u29B5':'ohbar','\u29B6':'omid','\u29B7':'opar','\u29B9':'operp','\u29BB':'olcross','\u29BC':'odsold','\u29BE':'olcir','\u29BF':'ofcir','\u29C0':'olt','\u29C1':'ogt','\u29C2':'cirscir','\u29C3':'cirE','\u29C4':'solb','\u29C5':'bsolb','\u29C9':'boxbox','\u29CD':'trisb','\u29CE':'rtriltri','\u29CF':'LeftTriangleBar','\u29CF\u0338':'NotLeftTriangleBar','\u29D0':'RightTriangleBar','\u29D0\u0338':'NotRightTriangleBar','\u29DC':'iinfin','\u29DD':'infintie','\u29DE':'nvinfin','\u29E3':'eparsl','\u29E4':'smeparsl','\u29E5':'eqvparsl','\u29EB':'lozf','\u29F4':'RuleDelayed','\u29F6':'dsol','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A04':'xuplus','\u2A06':'xsqcup','\u2A0D':'fpartint','\u2A10':'cirfnint','\u2A11':'awint','\u2A12':'rppolint','\u2A13':'scpolint','\u2A14':'npolint','\u2A15':'pointint','\u2A16':'quatint','\u2A17':'intlarhk','\u2A22':'pluscir','\u2A23':'plusacir','\u2A24':'simplus','\u2A25':'plusdu','\u2A26':'plussim','\u2A27':'plustwo','\u2A29':'mcomma','\u2A2A':'minusdu','\u2A2D':'loplus','\u2A2E':'roplus','\u2A2F':'Cross','\u2A30':'timesd','\u2A31':'timesbar','\u2A33':'smashp','\u2A34':'lotimes','\u2A35':'rotimes','\u2A36':'otimesas','\u2A37':'Otimes','\u2A38':'odiv','\u2A39':'triplus','\u2A3A':'triminus','\u2A3B':'tritime','\u2A3C':'iprod','\u2A3F':'amalg','\u2A40':'capdot','\u2A42':'ncup','\u2A43':'ncap','\u2A44':'capand','\u2A45':'cupor','\u2A46':'cupcap','\u2A47':'capcup','\u2A48':'cupbrcap','\u2A49':'capbrcup','\u2A4A':'cupcup','\u2A4B':'capcap','\u2A4C':'ccups','\u2A4D':'ccaps','\u2A50':'ccupssm','\u2A53':'And','\u2A54':'Or','\u2A55':'andand','\u2A56':'oror','\u2A57':'orslope','\u2A58':'andslope','\u2A5A':'andv','\u2A5B':'orv','\u2A5C':'andd','\u2A5D':'ord','\u2A5F':'wedbar','\u2A66':'sdote','\u2A6A':'simdot','\u2A6D':'congdot','\u2A6D\u0338':'ncongdot','\u2A6E':'easter','\u2A6F':'apacir','\u2A70':'apE','\u2A70\u0338':'napE','\u2A71':'eplus','\u2A72':'pluse','\u2A73':'Esim','\u2A77':'eDDot','\u2A78':'equivDD','\u2A79':'ltcir','\u2A7A':'gtcir','\u2A7B':'ltquest','\u2A7C':'gtquest','\u2A7D':'les','\u2A7D\u0338':'nles','\u2A7E':'ges','\u2A7E\u0338':'nges','\u2A7F':'lesdot','\u2A80':'gesdot','\u2A81':'lesdoto','\u2A82':'gesdoto','\u2A83':'lesdotor','\u2A84':'gesdotol','\u2A85':'lap','\u2A86':'gap','\u2A87':'lne','\u2A88':'gne','\u2A89':'lnap','\u2A8A':'gnap','\u2A8B':'lEg','\u2A8C':'gEl','\u2A8D':'lsime','\u2A8E':'gsime','\u2A8F':'lsimg','\u2A90':'gsiml','\u2A91':'lgE','\u2A92':'glE','\u2A93':'lesges','\u2A94':'gesles','\u2A95':'els','\u2A96':'egs','\u2A97':'elsdot','\u2A98':'egsdot','\u2A99':'el','\u2A9A':'eg','\u2A9D':'siml','\u2A9E':'simg','\u2A9F':'simlE','\u2AA0':'simgE','\u2AA1':'LessLess','\u2AA1\u0338':'NotNestedLessLess','\u2AA2':'GreaterGreater','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA4':'glj','\u2AA5':'gla','\u2AA6':'ltcc','\u2AA7':'gtcc','\u2AA8':'lescc','\u2AA9':'gescc','\u2AAA':'smt','\u2AAB':'lat','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u2AAD':'late','\u2AAD\uFE00':'lates','\u2AAE':'bumpE','\u2AAF':'pre','\u2AAF\u0338':'npre','\u2AB0':'sce','\u2AB0\u0338':'nsce','\u2AB3':'prE','\u2AB4':'scE','\u2AB5':'prnE','\u2AB6':'scnE','\u2AB7':'prap','\u2AB8':'scap','\u2AB9':'prnap','\u2ABA':'scnap','\u2ABB':'Pr','\u2ABC':'Sc','\u2ABD':'subdot','\u2ABE':'supdot','\u2ABF':'subplus','\u2AC0':'supplus','\u2AC1':'submult','\u2AC2':'supmult','\u2AC3':'subedot','\u2AC4':'supedot','\u2AC5':'subE','\u2AC5\u0338':'nsubE','\u2AC6':'supE','\u2AC6\u0338':'nsupE','\u2AC7':'subsim','\u2AC8':'supsim','\u2ACB\uFE00':'vsubnE','\u2ACB':'subnE','\u2ACC\uFE00':'vsupnE','\u2ACC':'supnE','\u2ACF':'csub','\u2AD0':'csup','\u2AD1':'csube','\u2AD2':'csupe','\u2AD3':'subsup','\u2AD4':'supsub','\u2AD5':'subsub','\u2AD6':'supsup','\u2AD7':'suphsub','\u2AD8':'supdsub','\u2AD9':'forkv','\u2ADA':'topfork','\u2ADB':'mlcp','\u2AE4':'Dashv','\u2AE6':'Vdashl','\u2AE7':'Barv','\u2AE8':'vBar','\u2AE9':'vBarv','\u2AEB':'Vbar','\u2AEC':'Not','\u2AED':'bNot','\u2AEE':'rnmid','\u2AEF':'cirmid','\u2AF0':'midcir','\u2AF1':'topcir','\u2AF2':'nhpar','\u2AF3':'parsim','\u2AFD':'parsl','\u2AFD\u20E5':'nparsl','\u266D':'flat','\u266E':'natur','\u266F':'sharp','\xA4':'curren','\xA2':'cent','$':'dollar','\xA3':'pound','\xA5':'yen','\u20AC':'euro','\xB9':'sup1','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\xB2':'sup2','\u2154':'frac23','\u2156':'frac25','\xB3':'sup3','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\uD835\uDCB6':'ascr','\uD835\uDD52':'aopf','\uD835\uDD1E':'afr','\uD835\uDD38':'Aopf','\uD835\uDD04':'Afr','\uD835\uDC9C':'Ascr','\xAA':'ordf','\xE1':'aacute','\xC1':'Aacute','\xE0':'agrave','\xC0':'Agrave','\u0103':'abreve','\u0102':'Abreve','\xE2':'acirc','\xC2':'Acirc','\xE5':'aring','\xC5':'angst','\xE4':'auml','\xC4':'Auml','\xE3':'atilde','\xC3':'Atilde','\u0105':'aogon','\u0104':'Aogon','\u0101':'amacr','\u0100':'Amacr','\xE6':'aelig','\xC6':'AElig','\uD835\uDCB7':'bscr','\uD835\uDD53':'bopf','\uD835\uDD1F':'bfr','\uD835\uDD39':'Bopf','\u212C':'Bscr','\uD835\uDD05':'Bfr','\uD835\uDD20':'cfr','\uD835\uDCB8':'cscr','\uD835\uDD54':'copf','\u212D':'Cfr','\uD835\uDC9E':'Cscr','\u2102':'Copf','\u0107':'cacute','\u0106':'Cacute','\u0109':'ccirc','\u0108':'Ccirc','\u010D':'ccaron','\u010C':'Ccaron','\u010B':'cdot','\u010A':'Cdot','\xE7':'ccedil','\xC7':'Ccedil','\u2105':'incare','\uD835\uDD21':'dfr','\u2146':'dd','\uD835\uDD55':'dopf','\uD835\uDCB9':'dscr','\uD835\uDC9F':'Dscr','\uD835\uDD07':'Dfr','\u2145':'DD','\uD835\uDD3B':'Dopf','\u010F':'dcaron','\u010E':'Dcaron','\u0111':'dstrok','\u0110':'Dstrok','\xF0':'eth','\xD0':'ETH','\u2147':'ee','\u212F':'escr','\uD835\uDD22':'efr','\uD835\uDD56':'eopf','\u2130':'Escr','\uD835\uDD08':'Efr','\uD835\uDD3C':'Eopf','\xE9':'eacute','\xC9':'Eacute','\xE8':'egrave','\xC8':'Egrave','\xEA':'ecirc','\xCA':'Ecirc','\u011B':'ecaron','\u011A':'Ecaron','\xEB':'euml','\xCB':'Euml','\u0117':'edot','\u0116':'Edot','\u0119':'eogon','\u0118':'Eogon','\u0113':'emacr','\u0112':'Emacr','\uD835\uDD23':'ffr','\uD835\uDD57':'fopf','\uD835\uDCBB':'fscr','\uD835\uDD09':'Ffr','\uD835\uDD3D':'Fopf','\u2131':'Fscr','\uFB00':'fflig','\uFB03':'ffilig','\uFB04':'ffllig','\uFB01':'filig','fj':'fjlig','\uFB02':'fllig','\u0192':'fnof','\u210A':'gscr','\uD835\uDD58':'gopf','\uD835\uDD24':'gfr','\uD835\uDCA2':'Gscr','\uD835\uDD3E':'Gopf','\uD835\uDD0A':'Gfr','\u01F5':'gacute','\u011F':'gbreve','\u011E':'Gbreve','\u011D':'gcirc','\u011C':'Gcirc','\u0121':'gdot','\u0120':'Gdot','\u0122':'Gcedil','\uD835\uDD25':'hfr','\u210E':'planckh','\uD835\uDCBD':'hscr','\uD835\uDD59':'hopf','\u210B':'Hscr','\u210C':'Hfr','\u210D':'Hopf','\u0125':'hcirc','\u0124':'Hcirc','\u210F':'hbar','\u0127':'hstrok','\u0126':'Hstrok','\uD835\uDD5A':'iopf','\uD835\uDD26':'ifr','\uD835\uDCBE':'iscr','\u2148':'ii','\uD835\uDD40':'Iopf','\u2110':'Iscr','\u2111':'Im','\xED':'iacute','\xCD':'Iacute','\xEC':'igrave','\xCC':'Igrave','\xEE':'icirc','\xCE':'Icirc','\xEF':'iuml','\xCF':'Iuml','\u0129':'itilde','\u0128':'Itilde','\u0130':'Idot','\u012F':'iogon','\u012E':'Iogon','\u012B':'imacr','\u012A':'Imacr','\u0133':'ijlig','\u0132':'IJlig','\u0131':'imath','\uD835\uDCBF':'jscr','\uD835\uDD5B':'jopf','\uD835\uDD27':'jfr','\uD835\uDCA5':'Jscr','\uD835\uDD0D':'Jfr','\uD835\uDD41':'Jopf','\u0135':'jcirc','\u0134':'Jcirc','\u0237':'jmath','\uD835\uDD5C':'kopf','\uD835\uDCC0':'kscr','\uD835\uDD28':'kfr','\uD835\uDCA6':'Kscr','\uD835\uDD42':'Kopf','\uD835\uDD0E':'Kfr','\u0137':'kcedil','\u0136':'Kcedil','\uD835\uDD29':'lfr','\uD835\uDCC1':'lscr','\u2113':'ell','\uD835\uDD5D':'lopf','\u2112':'Lscr','\uD835\uDD0F':'Lfr','\uD835\uDD43':'Lopf','\u013A':'lacute','\u0139':'Lacute','\u013E':'lcaron','\u013D':'Lcaron','\u013C':'lcedil','\u013B':'Lcedil','\u0142':'lstrok','\u0141':'Lstrok','\u0140':'lmidot','\u013F':'Lmidot','\uD835\uDD2A':'mfr','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\uD835\uDD10':'Mfr','\uD835\uDD44':'Mopf','\u2133':'Mscr','\uD835\uDD2B':'nfr','\uD835\uDD5F':'nopf','\uD835\uDCC3':'nscr','\u2115':'Nopf','\uD835\uDCA9':'Nscr','\uD835\uDD11':'Nfr','\u0144':'nacute','\u0143':'Nacute','\u0148':'ncaron','\u0147':'Ncaron','\xF1':'ntilde','\xD1':'Ntilde','\u0146':'ncedil','\u0145':'Ncedil','\u2116':'numero','\u014B':'eng','\u014A':'ENG','\uD835\uDD60':'oopf','\uD835\uDD2C':'ofr','\u2134':'oscr','\uD835\uDCAA':'Oscr','\uD835\uDD12':'Ofr','\uD835\uDD46':'Oopf','\xBA':'ordm','\xF3':'oacute','\xD3':'Oacute','\xF2':'ograve','\xD2':'Ograve','\xF4':'ocirc','\xD4':'Ocirc','\xF6':'ouml','\xD6':'Ouml','\u0151':'odblac','\u0150':'Odblac','\xF5':'otilde','\xD5':'Otilde','\xF8':'oslash','\xD8':'Oslash','\u014D':'omacr','\u014C':'Omacr','\u0153':'oelig','\u0152':'OElig','\uD835\uDD2D':'pfr','\uD835\uDCC5':'pscr','\uD835\uDD61':'popf','\u2119':'Popf','\uD835\uDD13':'Pfr','\uD835\uDCAB':'Pscr','\uD835\uDD62':'qopf','\uD835\uDD2E':'qfr','\uD835\uDCC6':'qscr','\uD835\uDCAC':'Qscr','\uD835\uDD14':'Qfr','\u211A':'Qopf','\u0138':'kgreen','\uD835\uDD2F':'rfr','\uD835\uDD63':'ropf','\uD835\uDCC7':'rscr','\u211B':'Rscr','\u211C':'Re','\u211D':'Ropf','\u0155':'racute','\u0154':'Racute','\u0159':'rcaron','\u0158':'Rcaron','\u0157':'rcedil','\u0156':'Rcedil','\uD835\uDD64':'sopf','\uD835\uDCC8':'sscr','\uD835\uDD30':'sfr','\uD835\uDD4A':'Sopf','\uD835\uDD16':'Sfr','\uD835\uDCAE':'Sscr','\u24C8':'oS','\u015B':'sacute','\u015A':'Sacute','\u015D':'scirc','\u015C':'Scirc','\u0161':'scaron','\u0160':'Scaron','\u015F':'scedil','\u015E':'Scedil','\xDF':'szlig','\uD835\uDD31':'tfr','\uD835\uDCC9':'tscr','\uD835\uDD65':'topf','\uD835\uDCAF':'Tscr','\uD835\uDD17':'Tfr','\uD835\uDD4B':'Topf','\u0165':'tcaron','\u0164':'Tcaron','\u0163':'tcedil','\u0162':'Tcedil','\u2122':'trade','\u0167':'tstrok','\u0166':'Tstrok','\uD835\uDCCA':'uscr','\uD835\uDD66':'uopf','\uD835\uDD32':'ufr','\uD835\uDD4C':'Uopf','\uD835\uDD18':'Ufr','\uD835\uDCB0':'Uscr','\xFA':'uacute','\xDA':'Uacute','\xF9':'ugrave','\xD9':'Ugrave','\u016D':'ubreve','\u016C':'Ubreve','\xFB':'ucirc','\xDB':'Ucirc','\u016F':'uring','\u016E':'Uring','\xFC':'uuml','\xDC':'Uuml','\u0171':'udblac','\u0170':'Udblac','\u0169':'utilde','\u0168':'Utilde','\u0173':'uogon','\u0172':'Uogon','\u016B':'umacr','\u016A':'Umacr','\uD835\uDD33':'vfr','\uD835\uDD67':'vopf','\uD835\uDCCB':'vscr','\uD835\uDD19':'Vfr','\uD835\uDD4D':'Vopf','\uD835\uDCB1':'Vscr','\uD835\uDD68':'wopf','\uD835\uDCCC':'wscr','\uD835\uDD34':'wfr','\uD835\uDCB2':'Wscr','\uD835\uDD4E':'Wopf','\uD835\uDD1A':'Wfr','\u0175':'wcirc','\u0174':'Wcirc','\uD835\uDD35':'xfr','\uD835\uDCCD':'xscr','\uD835\uDD69':'xopf','\uD835\uDD4F':'Xopf','\uD835\uDD1B':'Xfr','\uD835\uDCB3':'Xscr','\uD835\uDD36':'yfr','\uD835\uDCCE':'yscr','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDD1C':'Yfr','\uD835\uDD50':'Yopf','\xFD':'yacute','\xDD':'Yacute','\u0177':'ycirc','\u0176':'Ycirc','\xFF':'yuml','\u0178':'Yuml','\uD835\uDCCF':'zscr','\uD835\uDD37':'zfr','\uD835\uDD6B':'zopf','\u2128':'Zfr','\u2124':'Zopf','\uD835\uDCB5':'Zscr','\u017A':'zacute','\u0179':'Zacute','\u017E':'zcaron','\u017D':'Zcaron','\u017C':'zdot','\u017B':'Zdot','\u01B5':'imped','\xFE':'thorn','\xDE':'THORN','\u0149':'napos','\u03B1':'alpha','\u0391':'Alpha','\u03B2':'beta','\u0392':'Beta','\u03B3':'gamma','\u0393':'Gamma','\u03B4':'delta','\u0394':'Delta','\u03B5':'epsi','\u03F5':'epsiv','\u0395':'Epsilon','\u03DD':'gammad','\u03DC':'Gammad','\u03B6':'zeta','\u0396':'Zeta','\u03B7':'eta','\u0397':'Eta','\u03B8':'theta','\u03D1':'thetav','\u0398':'Theta','\u03B9':'iota','\u0399':'Iota','\u03BA':'kappa','\u03F0':'kappav','\u039A':'Kappa','\u03BB':'lambda','\u039B':'Lambda','\u03BC':'mu','\xB5':'micro','\u039C':'Mu','\u03BD':'nu','\u039D':'Nu','\u03BE':'xi','\u039E':'Xi','\u03BF':'omicron','\u039F':'Omicron','\u03C0':'pi','\u03D6':'piv','\u03A0':'Pi','\u03C1':'rho','\u03F1':'rhov','\u03A1':'Rho','\u03C3':'sigma','\u03A3':'Sigma','\u03C2':'sigmaf','\u03C4':'tau','\u03A4':'Tau','\u03C5':'upsi','\u03A5':'Upsilon','\u03D2':'Upsi','\u03C6':'phi','\u03D5':'phiv','\u03A6':'Phi','\u03C7':'chi','\u03A7':'Chi','\u03C8':'psi','\u03A8':'Psi','\u03C9':'omega','\u03A9':'ohm','\u0430':'acy','\u0410':'Acy','\u0431':'bcy','\u0411':'Bcy','\u0432':'vcy','\u0412':'Vcy','\u0433':'gcy','\u0413':'Gcy','\u0453':'gjcy','\u0403':'GJcy','\u0434':'dcy','\u0414':'Dcy','\u0452':'djcy','\u0402':'DJcy','\u0435':'iecy','\u0415':'IEcy','\u0451':'iocy','\u0401':'IOcy','\u0454':'jukcy','\u0404':'Jukcy','\u0436':'zhcy','\u0416':'ZHcy','\u0437':'zcy','\u0417':'Zcy','\u0455':'dscy','\u0405':'DScy','\u0438':'icy','\u0418':'Icy','\u0456':'iukcy','\u0406':'Iukcy','\u0457':'yicy','\u0407':'YIcy','\u0439':'jcy','\u0419':'Jcy','\u0458':'jsercy','\u0408':'Jsercy','\u043A':'kcy','\u041A':'Kcy','\u045C':'kjcy','\u040C':'KJcy','\u043B':'lcy','\u041B':'Lcy','\u0459':'ljcy','\u0409':'LJcy','\u043C':'mcy','\u041C':'Mcy','\u043D':'ncy','\u041D':'Ncy','\u045A':'njcy','\u040A':'NJcy','\u043E':'ocy','\u041E':'Ocy','\u043F':'pcy','\u041F':'Pcy','\u0440':'rcy','\u0420':'Rcy','\u0441':'scy','\u0421':'Scy','\u0442':'tcy','\u0422':'Tcy','\u045B':'tshcy','\u040B':'TSHcy','\u0443':'ucy','\u0423':'Ucy','\u045E':'ubrcy','\u040E':'Ubrcy','\u0444':'fcy','\u0424':'Fcy','\u0445':'khcy','\u0425':'KHcy','\u0446':'tscy','\u0426':'TScy','\u0447':'chcy','\u0427':'CHcy','\u045F':'dzcy','\u040F':'DZcy','\u0448':'shcy','\u0428':'SHcy','\u0449':'shchcy','\u0429':'SHCHcy','\u044A':'hardcy','\u042A':'HARDcy','\u044B':'ycy','\u042B':'Ycy','\u044C':'softcy','\u042C':'SOFTcy','\u044D':'ecy','\u042D':'Ecy','\u044E':'yucy','\u042E':'YUcy','\u044F':'yacy','\u042F':'YAcy','\u2135':'aleph','\u2136':'beth','\u2137':'gimel','\u2138':'daleth'};
  4054. var regexEscape = /["&'<>`]/g;
  4055. var escapeMap = {
  4056. '"': '&quot;',
  4057. '&': '&amp;',
  4058. '\'': '&#x27;',
  4059. '<': '&lt;',
  4060. // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
  4061. // following is not strictly necessary unless it’s part of a tag or an
  4062. // unquoted attribute value. We’re only escaping it to support those
  4063. // situations, and for XML support.
  4064. '>': '&gt;',
  4065. // In Internet Explorer ≤ 8, the backtick character can be used
  4066. // to break out of (un)quoted attribute values or HTML comments.
  4067. // See http://html5sec.org/#102, http://html5sec.org/#108, and
  4068. // http://html5sec.org/#133.
  4069. '`': '&#x60;'
  4070. };
  4071. var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
  4072. var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
  4073. var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;
  4074. var decodeMap = {'aacute':'\xE1','Aacute':'\xC1','abreve':'\u0103','Abreve':'\u0102','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','acy':'\u0430','Acy':'\u0410','aelig':'\xE6','AElig':'\xC6','af':'\u2061','afr':'\uD835\uDD1E','Afr':'\uD835\uDD04','agrave':'\xE0','Agrave':'\xC0','alefsym':'\u2135','aleph':'\u2135','alpha':'\u03B1','Alpha':'\u0391','amacr':'\u0101','Amacr':'\u0100','amalg':'\u2A3F','amp':'&','AMP':'&','and':'\u2227','And':'\u2A53','andand':'\u2A55','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsd':'\u2221','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','aogon':'\u0105','Aogon':'\u0104','aopf':'\uD835\uDD52','Aopf':'\uD835\uDD38','ap':'\u2248','apacir':'\u2A6F','ape':'\u224A','apE':'\u2A70','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','aring':'\xE5','Aring':'\xC5','ascr':'\uD835\uDCB6','Ascr':'\uD835\uDC9C','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','bcy':'\u0431','Bcy':'\u0411','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','beta':'\u03B2','Beta':'\u0392','beth':'\u2136','between':'\u226C','bfr':'\uD835\uDD1F','Bfr':'\uD835\uDD05','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bnot':'\u2310','bNot':'\u2AED','bopf':'\uD835\uDD53','Bopf':'\uD835\uDD39','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxhD':'\u2565','boxHd':'\u2564','boxHD':'\u2566','boxhu':'\u2534','boxhU':'\u2568','boxHu':'\u2567','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsol':'\\','bsolb':'\u29C5','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpe':'\u224F','bumpE':'\u2AAE','bumpeq':'\u224F','Bumpeq':'\u224E','cacute':'\u0107','Cacute':'\u0106','cap':'\u2229','Cap':'\u22D2','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','ccaron':'\u010D','Ccaron':'\u010C','ccedil':'\xE7','Ccedil':'\xC7','ccirc':'\u0109','Ccirc':'\u0108','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','cdot':'\u010B','Cdot':'\u010A','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','chcy':'\u0447','CHcy':'\u0427','check':'\u2713','checkmark':'\u2713','chi':'\u03C7','Chi':'\u03A7','cir':'\u25CB','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cire':'\u2257','cirE':'\u29C3','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','colone':'\u2254','Colone':'\u2A74','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','cscr':'\uD835\uDCB8','Cscr':'\uD835\uDC9E','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cup':'\u222A','Cup':'\u22D3','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','dArr':'\u21D3','Darr':'\u21A1','dash':'\u2010','dashv':'\u22A3','Dashv':'\u2AE4','dbkarow':'\u290F','dblac':'\u02DD','dcaron':'\u010F','Dcaron':'\u010E','dcy':'\u0434','Dcy':'\u0414','dd':'\u2146','DD':'\u2145','ddagger':'\u2021','ddarr':'\u21CA','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','delta':'\u03B4','Delta':'\u0394','demptyv':'\u29B1','dfisht':'\u297F','dfr':'\uD835\uDD21','Dfr':'\uD835\uDD07','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','djcy':'\u0452','DJcy':'\u0402','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','dopf':'\uD835\uDD55','Dopf':'\uD835\uDD3B','dot':'\u02D9','Dot':'\xA8','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','downarrow':'\u2193','Downarrow':'\u21D3','DownArrow':'\u2193','DownArrowBar':'\u2913','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVector':'\u21BD','DownLeftVectorBar':'\u2956','DownRightTeeVector':'\u295F','DownRightVector':'\u21C1','DownRightVectorBar':'\u2957','DownTee':'\u22A4','DownTeeArrow':'\u21A7','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','dscr':'\uD835\uDCB9','Dscr':'\uD835\uDC9F','dscy':'\u0455','DScy':'\u0405','dsol':'\u29F6','dstrok':'\u0111','Dstrok':'\u0110','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','dzcy':'\u045F','DZcy':'\u040F','dzigrarr':'\u27FF','eacute':'\xE9','Eacute':'\xC9','easter':'\u2A6E','ecaron':'\u011B','Ecaron':'\u011A','ecir':'\u2256','ecirc':'\xEA','Ecirc':'\xCA','ecolon':'\u2255','ecy':'\u044D','Ecy':'\u042D','eDDot':'\u2A77','edot':'\u0117','eDot':'\u2251','Edot':'\u0116','ee':'\u2147','efDot':'\u2252','efr':'\uD835\uDD22','Efr':'\uD835\uDD08','eg':'\u2A9A','egrave':'\xE8','Egrave':'\xC8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','emacr':'\u0113','Emacr':'\u0112','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp':'\u2003','emsp13':'\u2004','emsp14':'\u2005','eng':'\u014B','ENG':'\u014A','ensp':'\u2002','eogon':'\u0119','Eogon':'\u0118','eopf':'\uD835\uDD56','Eopf':'\uD835\uDD3C','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','epsilon':'\u03B5','Epsilon':'\u0395','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','esim':'\u2242','Esim':'\u2A73','eta':'\u03B7','Eta':'\u0397','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','fcy':'\u0444','Fcy':'\u0424','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','ffr':'\uD835\uDD23','Ffr':'\uD835\uDD09','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','fopf':'\uD835\uDD57','Fopf':'\uD835\uDD3D','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','gamma':'\u03B3','Gamma':'\u0393','gammad':'\u03DD','Gammad':'\u03DC','gap':'\u2A86','gbreve':'\u011F','Gbreve':'\u011E','Gcedil':'\u0122','gcirc':'\u011D','Gcirc':'\u011C','gcy':'\u0433','Gcy':'\u0413','gdot':'\u0121','Gdot':'\u0120','ge':'\u2265','gE':'\u2267','gel':'\u22DB','gEl':'\u2A8C','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','ges':'\u2A7E','gescc':'\u2AA9','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','gfr':'\uD835\uDD24','Gfr':'\uD835\uDD0A','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','gjcy':'\u0453','GJcy':'\u0403','gl':'\u2277','gla':'\u2AA5','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','gopf':'\uD835\uDD58','Gopf':'\uD835\uDD3E','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','gscr':'\u210A','Gscr':'\uD835\uDCA2','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gt':'>','Gt':'\u226B','GT':'>','gtcc':'\u2AA7','gtcir':'\u2A7A','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','hardcy':'\u044A','HARDcy':'\u042A','harr':'\u2194','hArr':'\u21D4','harrcir':'\u2948','harrw':'\u21AD','Hat':'^','hbar':'\u210F','hcirc':'\u0125','Hcirc':'\u0124','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','hstrok':'\u0127','Hstrok':'\u0126','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','iacute':'\xED','Iacute':'\xCD','ic':'\u2063','icirc':'\xEE','Icirc':'\xCE','icy':'\u0438','Icy':'\u0418','Idot':'\u0130','iecy':'\u0435','IEcy':'\u0415','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','igrave':'\xEC','Igrave':'\xCC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','ijlig':'\u0133','IJlig':'\u0132','Im':'\u2111','imacr':'\u012B','Imacr':'\u012A','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','in':'\u2208','incare':'\u2105','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','int':'\u222B','Int':'\u222C','intcal':'\u22BA','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','iocy':'\u0451','IOcy':'\u0401','iogon':'\u012F','Iogon':'\u012E','iopf':'\uD835\uDD5A','Iopf':'\uD835\uDD40','iota':'\u03B9','Iota':'\u0399','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','itilde':'\u0129','Itilde':'\u0128','iukcy':'\u0456','Iukcy':'\u0406','iuml':'\xEF','Iuml':'\xCF','jcirc':'\u0135','Jcirc':'\u0134','jcy':'\u0439','Jcy':'\u0419','jfr':'\uD835\uDD27','Jfr':'\uD835\uDD0D','jmath':'\u0237','jopf':'\uD835\uDD5B','Jopf':'\uD835\uDD41','jscr':'\uD835\uDCBF','Jscr':'\uD835\uDCA5','jsercy':'\u0458','Jsercy':'\u0408','jukcy':'\u0454','Jukcy':'\u0404','kappa':'\u03BA','Kappa':'\u039A','kappav':'\u03F0','kcedil':'\u0137','Kcedil':'\u0136','kcy':'\u043A','Kcy':'\u041A','kfr':'\uD835\uDD28','Kfr':'\uD835\uDD0E','kgreen':'\u0138','khcy':'\u0445','KHcy':'\u0425','kjcy':'\u045C','KJcy':'\u040C','kopf':'\uD835\uDD5C','Kopf':'\uD835\uDD42','kscr':'\uD835\uDCC0','Kscr':'\uD835\uDCA6','lAarr':'\u21DA','lacute':'\u013A','Lacute':'\u0139','laemptyv':'\u29B4','lagran':'\u2112','lambda':'\u03BB','Lambda':'\u039B','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larr':'\u2190','lArr':'\u21D0','Larr':'\u219E','larrb':'\u21E4','larrbfs':'\u291F','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','lat':'\u2AAB','latail':'\u2919','lAtail':'\u291B','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','lcaron':'\u013E','Lcaron':'\u013D','lcedil':'\u013C','Lcedil':'\u013B','lceil':'\u2308','lcub':'{','lcy':'\u043B','Lcy':'\u041B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','leftarrow':'\u2190','Leftarrow':'\u21D0','LeftArrow':'\u2190','LeftArrowBar':'\u21E4','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVector':'\u21C3','LeftDownVectorBar':'\u2959','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','Leftrightarrow':'\u21D4','LeftRightArrow':'\u2194','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTee':'\u22A3','LeftTeeArrow':'\u21A4','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangle':'\u22B2','LeftTriangleBar':'\u29CF','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVector':'\u21BF','LeftUpVectorBar':'\u2958','LeftVector':'\u21BC','LeftVectorBar':'\u2952','leg':'\u22DA','lEg':'\u2A8B','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','les':'\u2A7D','lescc':'\u2AA8','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','lfr':'\uD835\uDD29','Lfr':'\uD835\uDD0F','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','ljcy':'\u0459','LJcy':'\u0409','ll':'\u226A','Ll':'\u22D8','llarr':'\u21C7','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','lmidot':'\u0140','Lmidot':'\u013F','lmoust':'\u23B0','lmoustache':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','Longleftarrow':'\u27F8','LongLeftArrow':'\u27F5','longleftrightarrow':'\u27F7','Longleftrightarrow':'\u27FA','LongLeftRightArrow':'\u27F7','longmapsto':'\u27FC','longrightarrow':'\u27F6','Longrightarrow':'\u27F9','LongRightArrow':'\u27F6','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','lopf':'\uD835\uDD5D','Lopf':'\uD835\uDD43','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','lstrok':'\u0142','Lstrok':'\u0141','lt':'<','Lt':'\u226A','LT':'<','ltcc':'\u2AA6','ltcir':'\u2A79','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','map':'\u21A6','Map':'\u2905','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','mcy':'\u043C','Mcy':'\u041C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','mfr':'\uD835\uDD2A','Mfr':'\uD835\uDD10','mho':'\u2127','micro':'\xB5','mid':'\u2223','midast':'*','midcir':'\u2AF0','middot':'\xB7','minus':'\u2212','minusb':'\u229F','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','mopf':'\uD835\uDD5E','Mopf':'\uD835\uDD44','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','mu':'\u03BC','Mu':'\u039C','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','nacute':'\u0144','Nacute':'\u0143','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natur':'\u266E','natural':'\u266E','naturals':'\u2115','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','ncaron':'\u0148','Ncaron':'\u0147','ncedil':'\u0146','Ncedil':'\u0145','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','ncy':'\u043D','Ncy':'\u041D','ndash':'\u2013','ne':'\u2260','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','nfr':'\uD835\uDD2B','Nfr':'\uD835\uDD11','nge':'\u2271','ngE':'\u2267\u0338','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','ngt':'\u226F','nGt':'\u226B\u20D2','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','njcy':'\u045A','NJcy':'\u040A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nle':'\u2270','nlE':'\u2266\u0338','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nlt':'\u226E','nLt':'\u226A\u20D2','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','not':'\xAC','Not':'\u2AEC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangle':'\u22EA','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangle':'\u22EB','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','npar':'\u2226','nparallel':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','npre':'\u2AAF\u0338','nprec':'\u2280','npreceq':'\u2AAF\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrc':'\u2933\u0338','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','nscr':'\uD835\uDCC3','Nscr':'\uD835\uDCA9','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsube':'\u2288','nsubE':'\u2AC5\u0338','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupe':'\u2289','nsupE':'\u2AC6\u0338','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','ntilde':'\xF1','Ntilde':'\xD1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','nu':'\u03BD','Nu':'\u039D','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','oacute':'\xF3','Oacute':'\xD3','oast':'\u229B','ocir':'\u229A','ocirc':'\xF4','Ocirc':'\xD4','ocy':'\u043E','Ocy':'\u041E','odash':'\u229D','odblac':'\u0151','Odblac':'\u0150','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','oelig':'\u0153','OElig':'\u0152','ofcir':'\u29BF','ofr':'\uD835\uDD2C','Ofr':'\uD835\uDD12','ogon':'\u02DB','ograve':'\xF2','Ograve':'\xD2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','omacr':'\u014D','Omacr':'\u014C','omega':'\u03C9','Omega':'\u03A9','omicron':'\u03BF','Omicron':'\u039F','omid':'\u29B6','ominus':'\u2296','oopf':'\uD835\uDD60','Oopf':'\uD835\uDD46','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','or':'\u2228','Or':'\u2A54','orarr':'\u21BB','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','oscr':'\u2134','Oscr':'\uD835\uDCAA','oslash':'\xF8','Oslash':'\xD8','osol':'\u2298','otilde':'\xF5','Otilde':'\xD5','otimes':'\u2297','Otimes':'\u2A37','otimesas':'\u2A36','ouml':'\xF6','Ouml':'\xD6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','par':'\u2225','para':'\xB6','parallel':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','pcy':'\u043F','Pcy':'\u041F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','pfr':'\uD835\uDD2D','Pfr':'\uD835\uDD13','phi':'\u03C6','Phi':'\u03A6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','pi':'\u03C0','Pi':'\u03A0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plus':'+','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','pr':'\u227A','Pr':'\u2ABB','prap':'\u2AB7','prcue':'\u227C','pre':'\u2AAF','prE':'\u2AB3','prec':'\u227A','precapprox':'\u2AB7','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportion':'\u2237','Proportional':'\u221D','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','pscr':'\uD835\uDCC5','Pscr':'\uD835\uDCAB','psi':'\u03C8','Psi':'\u03A8','puncsp':'\u2008','qfr':'\uD835\uDD2E','Qfr':'\uD835\uDD14','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','qscr':'\uD835\uDCC6','Qscr':'\uD835\uDCAC','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','racute':'\u0155','Racute':'\u0154','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarr':'\u2192','rArr':'\u21D2','Rarr':'\u21A0','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','rarrtl':'\u21A3','Rarrtl':'\u2916','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','rcaron':'\u0159','Rcaron':'\u0158','rcedil':'\u0157','Rcedil':'\u0156','rceil':'\u2309','rcub':'}','rcy':'\u0440','Rcy':'\u0420','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','Re':'\u211C','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','rho':'\u03C1','Rho':'\u03A1','rhov':'\u03F1','RightAngleBracket':'\u27E9','rightarrow':'\u2192','Rightarrow':'\u21D2','RightArrow':'\u2192','RightArrowBar':'\u21E5','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVector':'\u21C2','RightDownVectorBar':'\u2955','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTee':'\u22A2','RightTeeArrow':'\u21A6','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangle':'\u22B3','RightTriangleBar':'\u29D0','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVector':'\u21BE','RightUpVectorBar':'\u2954','RightVector':'\u21C0','RightVectorBar':'\u2953','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoust':'\u23B1','rmoustache':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','sacute':'\u015B','Sacute':'\u015A','sbquo':'\u201A','sc':'\u227B','Sc':'\u2ABC','scap':'\u2AB8','scaron':'\u0161','Scaron':'\u0160','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','scedil':'\u015F','Scedil':'\u015E','scirc':'\u015D','Scirc':'\u015C','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','scy':'\u0441','Scy':'\u0421','sdot':'\u22C5','sdotb':'\u22A1','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','sfr':'\uD835\uDD30','Sfr':'\uD835\uDD16','sfrown':'\u2322','sharp':'\u266F','shchcy':'\u0449','SHCHcy':'\u0429','shcy':'\u0448','SHcy':'\u0428','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','sigma':'\u03C3','Sigma':'\u03A3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','softcy':'\u044C','SOFTcy':'\u042C','sol':'/','solb':'\u29C4','solbar':'\u233F','sopf':'\uD835\uDD64','Sopf':'\uD835\uDD4A','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','squ':'\u25A1','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squf':'\u25AA','srarr':'\u2192','sscr':'\uD835\uDCC8','Sscr':'\uD835\uDCAE','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','star':'\u2606','Star':'\u22C6','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','sube':'\u2286','subE':'\u2AC5','subedot':'\u2AC3','submult':'\u2AC1','subne':'\u228A','subnE':'\u2ACB','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succ':'\u227B','succapprox':'\u2AB8','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup':'\u2283','Sup':'\u22D1','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','supdot':'\u2ABE','supdsub':'\u2AD8','supe':'\u2287','supE':'\u2AC6','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supne':'\u228B','supnE':'\u2ACC','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','tau':'\u03C4','Tau':'\u03A4','tbrk':'\u23B4','tcaron':'\u0165','Tcaron':'\u0164','tcedil':'\u0163','Tcedil':'\u0162','tcy':'\u0442','Tcy':'\u0422','tdot':'\u20DB','telrec':'\u2315','tfr':'\uD835\uDD31','Tfr':'\uD835\uDD17','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','theta':'\u03B8','Theta':'\u0398','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','thinsp':'\u2009','ThinSpace':'\u2009','thkap':'\u2248','thksim':'\u223C','thorn':'\xFE','THORN':'\xDE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','times':'\xD7','timesb':'\u22A0','timesbar':'\u2A31','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','top':'\u22A4','topbot':'\u2336','topcir':'\u2AF1','topf':'\uD835\uDD65','Topf':'\uD835\uDD4B','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','tscr':'\uD835\uDCC9','Tscr':'\uD835\uDCAF','tscy':'\u0446','TScy':'\u0426','tshcy':'\u045B','TSHcy':'\u040B','tstrok':'\u0167','Tstrok':'\u0166','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','uacute':'\xFA','Uacute':'\xDA','uarr':'\u2191','uArr':'\u21D1','Uarr':'\u219F','Uarrocir':'\u2949','ubrcy':'\u045E','Ubrcy':'\u040E','ubreve':'\u016D','Ubreve':'\u016C','ucirc':'\xFB','Ucirc':'\xDB','ucy':'\u0443','Ucy':'\u0423','udarr':'\u21C5','udblac':'\u0171','Udblac':'\u0170','udhar':'\u296E','ufisht':'\u297E','ufr':'\uD835\uDD32','Ufr':'\uD835\uDD18','ugrave':'\xF9','Ugrave':'\xD9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','umacr':'\u016B','Umacr':'\u016A','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','uogon':'\u0173','Uogon':'\u0172','uopf':'\uD835\uDD66','Uopf':'\uD835\uDD4C','uparrow':'\u2191','Uparrow':'\u21D1','UpArrow':'\u2191','UpArrowBar':'\u2912','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','Updownarrow':'\u21D5','UpDownArrow':'\u2195','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','upsilon':'\u03C5','Upsilon':'\u03A5','UpTee':'\u22A5','UpTeeArrow':'\u21A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','uring':'\u016F','Uring':'\u016E','urtri':'\u25F9','uscr':'\uD835\uDCCA','Uscr':'\uD835\uDCB0','utdot':'\u22F0','utilde':'\u0169','Utilde':'\u0168','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','uuml':'\xFC','Uuml':'\xDC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','vcy':'\u0432','Vcy':'\u0412','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','vee':'\u2228','Vee':'\u22C1','veebar':'\u22BB','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','vfr':'\uD835\uDD33','Vfr':'\uD835\uDD19','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','vopf':'\uD835\uDD67','Vopf':'\uD835\uDD4D','vprop':'\u221D','vrtri':'\u22B3','vscr':'\uD835\uDCCB','Vscr':'\uD835\uDCB1','vsubne':'\u228A\uFE00','vsubnE':'\u2ACB\uFE00','vsupne':'\u228B\uFE00','vsupnE':'\u2ACC\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','wcirc':'\u0175','Wcirc':'\u0174','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','wfr':'\uD835\uDD34','Wfr':'\uD835\uDD1A','wopf':'\uD835\uDD68','Wopf':'\uD835\uDD4E','wp':'\u2118','wr':'\u2240','wreath':'\u2240','wscr':'\uD835\uDCCC','Wscr':'\uD835\uDCB2','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','xfr':'\uD835\uDD35','Xfr':'\uD835\uDD1B','xharr':'\u27F7','xhArr':'\u27FA','xi':'\u03BE','Xi':'\u039E','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','xopf':'\uD835\uDD69','Xopf':'\uD835\uDD4F','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','xscr':'\uD835\uDCCD','Xscr':'\uD835\uDCB3','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','yacute':'\xFD','Yacute':'\xDD','yacy':'\u044F','YAcy':'\u042F','ycirc':'\u0177','Ycirc':'\u0176','ycy':'\u044B','Ycy':'\u042B','yen':'\xA5','yfr':'\uD835\uDD36','Yfr':'\uD835\uDD1C','yicy':'\u0457','YIcy':'\u0407','yopf':'\uD835\uDD6A','Yopf':'\uD835\uDD50','yscr':'\uD835\uDCCE','Yscr':'\uD835\uDCB4','yucy':'\u044E','YUcy':'\u042E','yuml':'\xFF','Yuml':'\u0178','zacute':'\u017A','Zacute':'\u0179','zcaron':'\u017E','Zcaron':'\u017D','zcy':'\u0437','Zcy':'\u0417','zdot':'\u017C','Zdot':'\u017B','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','zeta':'\u03B6','Zeta':'\u0396','zfr':'\uD835\uDD37','Zfr':'\u2128','zhcy':'\u0436','ZHcy':'\u0416','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','zscr':'\uD835\uDCCF','Zscr':'\uD835\uDCB5','zwj':'\u200D','zwnj':'\u200C'};
  4075. var decodeMapLegacy = {'aacute':'\xE1','Aacute':'\xC1','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','aelig':'\xE6','AElig':'\xC6','agrave':'\xE0','Agrave':'\xC0','amp':'&','AMP':'&','aring':'\xE5','Aring':'\xC5','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','brvbar':'\xA6','ccedil':'\xE7','Ccedil':'\xC7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','eacute':'\xE9','Eacute':'\xC9','ecirc':'\xEA','Ecirc':'\xCA','egrave':'\xE8','Egrave':'\xC8','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','iacute':'\xED','Iacute':'\xCD','icirc':'\xEE','Icirc':'\xCE','iexcl':'\xA1','igrave':'\xEC','Igrave':'\xCC','iquest':'\xBF','iuml':'\xEF','Iuml':'\xCF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','ntilde':'\xF1','Ntilde':'\xD1','oacute':'\xF3','Oacute':'\xD3','ocirc':'\xF4','Ocirc':'\xD4','ograve':'\xF2','Ograve':'\xD2','ordf':'\xAA','ordm':'\xBA','oslash':'\xF8','Oslash':'\xD8','otilde':'\xF5','Otilde':'\xD5','ouml':'\xF6','Ouml':'\xD6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','thorn':'\xFE','THORN':'\xDE','times':'\xD7','uacute':'\xFA','Uacute':'\xDA','ucirc':'\xFB','Ucirc':'\xDB','ugrave':'\xF9','Ugrave':'\xD9','uml':'\xA8','uuml':'\xFC','Uuml':'\xDC','yacute':'\xFD','Yacute':'\xDD','yen':'\xA5','yuml':'\xFF'};
  4076. var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'};
  4077. var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];
  4078. /*--------------------------------------------------------------------------*/
  4079. var stringFromCharCode = String.fromCharCode;
  4080. var object = {};
  4081. var hasOwnProperty = object.hasOwnProperty;
  4082. var has = function(object, propertyName) {
  4083. return hasOwnProperty.call(object, propertyName);
  4084. };
  4085. var contains = function(array, value) {
  4086. var index = -1;
  4087. var length = array.length;
  4088. while (++index < length) {
  4089. if (array[index] == value) {
  4090. return true;
  4091. }
  4092. }
  4093. return false;
  4094. };
  4095. var merge = function(options, defaults) {
  4096. if (!options) {
  4097. return defaults;
  4098. }
  4099. var result = {};
  4100. var key;
  4101. for (key in defaults) {
  4102. // A `hasOwnProperty` check is not needed here, since only recognized
  4103. // option names are used anyway. Any others are ignored.
  4104. result[key] = has(options, key) ? options[key] : defaults[key];
  4105. }
  4106. return result;
  4107. };
  4108. // Modified version of `ucs2encode`; see https://mths.be/punycode.
  4109. var codePointToSymbol = function(codePoint, strict) {
  4110. var output = '';
  4111. if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {
  4112. // See issue #4:
  4113. // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
  4114. // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
  4115. // REPLACEMENT CHARACTER.”
  4116. if (strict) {
  4117. parseError('character reference outside the permissible Unicode range');
  4118. }
  4119. return '\uFFFD';
  4120. }
  4121. if (has(decodeMapNumeric, codePoint)) {
  4122. if (strict) {
  4123. parseError('disallowed character reference');
  4124. }
  4125. return decodeMapNumeric[codePoint];
  4126. }
  4127. if (strict && contains(invalidReferenceCodePoints, codePoint)) {
  4128. parseError('disallowed character reference');
  4129. }
  4130. if (codePoint > 0xFFFF) {
  4131. codePoint -= 0x10000;
  4132. output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
  4133. codePoint = 0xDC00 | codePoint & 0x3FF;
  4134. }
  4135. output += stringFromCharCode(codePoint);
  4136. return output;
  4137. };
  4138. var hexEscape = function(codePoint) {
  4139. return '&#x' + codePoint.toString(16).toUpperCase() + ';';
  4140. };
  4141. var decEscape = function(codePoint) {
  4142. return '&#' + codePoint + ';';
  4143. };
  4144. var parseError = function(message) {
  4145. throw Error('Parse error: ' + message);
  4146. };
  4147. /*--------------------------------------------------------------------------*/
  4148. var encode = function(string, options) {
  4149. options = merge(options, encode.options);
  4150. var strict = options.strict;
  4151. if (strict && regexInvalidRawCodePoint.test(string)) {
  4152. parseError('forbidden code point');
  4153. }
  4154. var encodeEverything = options.encodeEverything;
  4155. var useNamedReferences = options.useNamedReferences;
  4156. var allowUnsafeSymbols = options.allowUnsafeSymbols;
  4157. var escapeCodePoint = options.decimal ? decEscape : hexEscape;
  4158. var escapeBmpSymbol = function(symbol) {
  4159. return escapeCodePoint(symbol.charCodeAt(0));
  4160. };
  4161. if (encodeEverything) {
  4162. // Encode ASCII symbols.
  4163. string = string.replace(regexAsciiWhitelist, function(symbol) {
  4164. // Use named references if requested & possible.
  4165. if (useNamedReferences && has(encodeMap, symbol)) {
  4166. return '&' + encodeMap[symbol] + ';';
  4167. }
  4168. return escapeBmpSymbol(symbol);
  4169. });
  4170. // Shorten a few escapes that represent two symbols, of which at least one
  4171. // is within the ASCII range.
  4172. if (useNamedReferences) {
  4173. string = string
  4174. .replace(/&gt;\u20D2/g, '&nvgt;')
  4175. .replace(/&lt;\u20D2/g, '&nvlt;')
  4176. .replace(/&#x66;&#x6A;/g, '&fjlig;');
  4177. }
  4178. // Encode non-ASCII symbols.
  4179. if (useNamedReferences) {
  4180. // Encode non-ASCII symbols that can be replaced with a named reference.
  4181. string = string.replace(regexEncodeNonAscii, function(string) {
  4182. // Note: there is no need to check `has(encodeMap, string)` here.
  4183. return '&' + encodeMap[string] + ';';
  4184. });
  4185. }
  4186. // Note: any remaining non-ASCII symbols are handled outside of the `if`.
  4187. } else if (useNamedReferences) {
  4188. // Apply named character references.
  4189. // Encode `<>"'&` using named character references.
  4190. if (!allowUnsafeSymbols) {
  4191. string = string.replace(regexEscape, function(string) {
  4192. return '&' + encodeMap[string] + ';'; // no need to check `has()` here
  4193. });
  4194. }
  4195. // Shorten escapes that represent two symbols, of which at least one is
  4196. // `<>"'&`.
  4197. string = string
  4198. .replace(/&gt;\u20D2/g, '&nvgt;')
  4199. .replace(/&lt;\u20D2/g, '&nvlt;');
  4200. // Encode non-ASCII symbols that can be replaced with a named reference.
  4201. string = string.replace(regexEncodeNonAscii, function(string) {
  4202. // Note: there is no need to check `has(encodeMap, string)` here.
  4203. return '&' + encodeMap[string] + ';';
  4204. });
  4205. } else if (!allowUnsafeSymbols) {
  4206. // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
  4207. // using named character references.
  4208. string = string.replace(regexEscape, escapeBmpSymbol);
  4209. }
  4210. return string
  4211. // Encode astral symbols.
  4212. .replace(regexAstralSymbols, function($0) {
  4213. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  4214. var high = $0.charCodeAt(0);
  4215. var low = $0.charCodeAt(1);
  4216. var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
  4217. return escapeCodePoint(codePoint);
  4218. })
  4219. // Encode any remaining BMP symbols that are not printable ASCII symbols
  4220. // using a hexadecimal escape.
  4221. .replace(regexBmpWhitelist, escapeBmpSymbol);
  4222. };
  4223. // Expose default options (so they can be overridden globally).
  4224. encode.options = {
  4225. 'allowUnsafeSymbols': false,
  4226. 'encodeEverything': false,
  4227. 'strict': false,
  4228. 'useNamedReferences': false,
  4229. 'decimal' : false
  4230. };
  4231. var decode = function(html, options) {
  4232. options = merge(options, decode.options);
  4233. var strict = options.strict;
  4234. if (strict && regexInvalidEntity.test(html)) {
  4235. parseError('malformed character reference');
  4236. }
  4237. return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {
  4238. var codePoint;
  4239. var semicolon;
  4240. var decDigits;
  4241. var hexDigits;
  4242. var reference;
  4243. var next;
  4244. if ($1) {
  4245. reference = $1;
  4246. // Note: there is no need to check `has(decodeMap, reference)`.
  4247. return decodeMap[reference];
  4248. }
  4249. if ($2) {
  4250. // Decode named character references without trailing `;`, e.g. `&amp`.
  4251. // This is only a parse error if it gets converted to `&`, or if it is
  4252. // followed by `=` in an attribute context.
  4253. reference = $2;
  4254. next = $3;
  4255. if (next && options.isAttributeValue) {
  4256. if (strict && next == '=') {
  4257. parseError('`&` did not start a character reference');
  4258. }
  4259. return $0;
  4260. } else {
  4261. if (strict) {
  4262. parseError(
  4263. 'named character reference was not terminated by a semicolon'
  4264. );
  4265. }
  4266. // Note: there is no need to check `has(decodeMapLegacy, reference)`.
  4267. return decodeMapLegacy[reference] + (next || '');
  4268. }
  4269. }
  4270. if ($4) {
  4271. // Decode decimal escapes, e.g. `&#119558;`.
  4272. decDigits = $4;
  4273. semicolon = $5;
  4274. if (strict && !semicolon) {
  4275. parseError('character reference was not terminated by a semicolon');
  4276. }
  4277. codePoint = parseInt(decDigits, 10);
  4278. return codePointToSymbol(codePoint, strict);
  4279. }
  4280. if ($6) {
  4281. // Decode hexadecimal escapes, e.g. `&#x1D306;`.
  4282. hexDigits = $6;
  4283. semicolon = $7;
  4284. if (strict && !semicolon) {
  4285. parseError('character reference was not terminated by a semicolon');
  4286. }
  4287. codePoint = parseInt(hexDigits, 16);
  4288. return codePointToSymbol(codePoint, strict);
  4289. }
  4290. // If we’re still here, `if ($7)` is implied; it’s an ambiguous
  4291. // ampersand for sure. https://mths.be/notes/ambiguous-ampersands
  4292. if (strict) {
  4293. parseError(
  4294. 'named character reference was not terminated by a semicolon'
  4295. );
  4296. }
  4297. return $0;
  4298. });
  4299. };
  4300. // Expose default options (so they can be overridden globally).
  4301. decode.options = {
  4302. 'isAttributeValue': false,
  4303. 'strict': false
  4304. };
  4305. var escape = function(string) {
  4306. return string.replace(regexEscape, function($0) {
  4307. // Note: there is no need to check `has(escapeMap, $0)` here.
  4308. return escapeMap[$0];
  4309. });
  4310. };
  4311. /*--------------------------------------------------------------------------*/
  4312. var he = {
  4313. 'version': '1.2.0',
  4314. 'encode': encode,
  4315. 'decode': decode,
  4316. 'escape': escape,
  4317. 'unescape': decode
  4318. };
  4319. // Some AMD build optimizers, like r.js, check for specific condition patterns
  4320. // like the following:
  4321. if (freeExports && !freeExports.nodeType) {
  4322. if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+
  4323. freeModule.exports = he;
  4324. } else { // in Narwhal or RingoJS v0.7.0-
  4325. for (var key in he) {
  4326. has(he, key) && (freeExports[key] = he[key]);
  4327. }
  4328. }
  4329. } else { // in Rhino or a web browser
  4330. root.he = he;
  4331. }
  4332. }(commonjsGlobal));
  4333. } (he$1, he$1.exports));
  4334. var he = he$1.exports;
  4335. /**
  4336. * Not type-checking this file because it's mostly vendor code.
  4337. */
  4338. // Regular Expressions for parsing tags and attributes
  4339. var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  4340. var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  4341. var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(unicodeRegExp.source, "]*");
  4342. var qnameCapture = "((?:".concat(ncname, "\\:)?").concat(ncname, ")");
  4343. var startTagOpen = new RegExp("^<".concat(qnameCapture));
  4344. var startTagClose = /^\s*(\/?)>/;
  4345. var endTag = new RegExp("^<\\/".concat(qnameCapture, "[^>]*>"));
  4346. var doctype = /^<!DOCTYPE [^>]+>/i;
  4347. // #7298: escape - to avoid being passed as HTML comment when inlined in page
  4348. var comment = /^<!\--/;
  4349. var conditionalComment = /^<!\[/;
  4350. // Special Elements (can contain anything)
  4351. var isPlainTextElement = makeMap('script,style,textarea', true);
  4352. var reCache = {};
  4353. var decodingMap = {
  4354. '&lt;': '<',
  4355. '&gt;': '>',
  4356. '&quot;': '"',
  4357. '&amp;': '&',
  4358. '&#10;': '\n',
  4359. '&#9;': '\t',
  4360. '&#39;': "'"
  4361. };
  4362. var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;
  4363. var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;
  4364. // #5992
  4365. var isIgnoreNewlineTag = makeMap('pre,textarea', true);
  4366. var shouldIgnoreFirstNewline = function (tag, html) {
  4367. return tag && isIgnoreNewlineTag(tag) && html[0] === '\n';
  4368. };
  4369. function decodeAttr(value, shouldDecodeNewlines) {
  4370. var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
  4371. return value.replace(re, function (match) { return decodingMap[match]; });
  4372. }
  4373. function parseHTML(html, options) {
  4374. var stack = [];
  4375. var expectHTML = options.expectHTML;
  4376. var isUnaryTag = options.isUnaryTag || no;
  4377. var canBeLeftOpenTag = options.canBeLeftOpenTag || no;
  4378. var index = 0;
  4379. var last, lastTag;
  4380. var _loop_1 = function () {
  4381. last = html;
  4382. // Make sure we're not in a plaintext content element like script/style
  4383. if (!lastTag || !isPlainTextElement(lastTag)) {
  4384. var textEnd = html.indexOf('<');
  4385. if (textEnd === 0) {
  4386. // Comment:
  4387. if (comment.test(html)) {
  4388. var commentEnd = html.indexOf('-->');
  4389. if (commentEnd >= 0) {
  4390. if (options.shouldKeepComment && options.comment) {
  4391. options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
  4392. }
  4393. advance(commentEnd + 3);
  4394. return "continue";
  4395. }
  4396. }
  4397. // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
  4398. if (conditionalComment.test(html)) {
  4399. var conditionalEnd = html.indexOf(']>');
  4400. if (conditionalEnd >= 0) {
  4401. advance(conditionalEnd + 2);
  4402. return "continue";
  4403. }
  4404. }
  4405. // Doctype:
  4406. var doctypeMatch = html.match(doctype);
  4407. if (doctypeMatch) {
  4408. advance(doctypeMatch[0].length);
  4409. return "continue";
  4410. }
  4411. // End tag:
  4412. var endTagMatch = html.match(endTag);
  4413. if (endTagMatch) {
  4414. var curIndex = index;
  4415. advance(endTagMatch[0].length);
  4416. parseEndTag(endTagMatch[1], curIndex, index);
  4417. return "continue";
  4418. }
  4419. // Start tag:
  4420. var startTagMatch = parseStartTag();
  4421. if (startTagMatch) {
  4422. handleStartTag(startTagMatch);
  4423. if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
  4424. advance(1);
  4425. }
  4426. return "continue";
  4427. }
  4428. }
  4429. var text = void 0, rest = void 0, next = void 0;
  4430. if (textEnd >= 0) {
  4431. rest = html.slice(textEnd);
  4432. while (!endTag.test(rest) &&
  4433. !startTagOpen.test(rest) &&
  4434. !comment.test(rest) &&
  4435. !conditionalComment.test(rest)) {
  4436. // < in plain text, be forgiving and treat it as text
  4437. next = rest.indexOf('<', 1);
  4438. if (next < 0)
  4439. break;
  4440. textEnd += next;
  4441. rest = html.slice(textEnd);
  4442. }
  4443. text = html.substring(0, textEnd);
  4444. }
  4445. if (textEnd < 0) {
  4446. text = html;
  4447. }
  4448. if (text) {
  4449. advance(text.length);
  4450. }
  4451. if (options.chars && text) {
  4452. options.chars(text, index - text.length, index);
  4453. }
  4454. }
  4455. else {
  4456. var endTagLength_1 = 0;
  4457. var stackedTag_1 = lastTag.toLowerCase();
  4458. var reStackedTag = reCache[stackedTag_1] ||
  4459. (reCache[stackedTag_1] = new RegExp('([\\s\\S]*?)(</' + stackedTag_1 + '[^>]*>)', 'i'));
  4460. var rest = html.replace(reStackedTag, function (all, text, endTag) {
  4461. endTagLength_1 = endTag.length;
  4462. if (!isPlainTextElement(stackedTag_1) && stackedTag_1 !== 'noscript') {
  4463. text = text
  4464. .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
  4465. .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
  4466. }
  4467. if (shouldIgnoreFirstNewline(stackedTag_1, text)) {
  4468. text = text.slice(1);
  4469. }
  4470. if (options.chars) {
  4471. options.chars(text);
  4472. }
  4473. return '';
  4474. });
  4475. index += html.length - rest.length;
  4476. html = rest;
  4477. parseEndTag(stackedTag_1, index - endTagLength_1, index);
  4478. }
  4479. if (html === last) {
  4480. options.chars && options.chars(html);
  4481. if (!stack.length && options.warn) {
  4482. options.warn("Mal-formatted tag at end of template: \"".concat(html, "\""), {
  4483. start: index + html.length
  4484. });
  4485. }
  4486. return "break";
  4487. }
  4488. };
  4489. while (html) {
  4490. var state_1 = _loop_1();
  4491. if (state_1 === "break")
  4492. break;
  4493. }
  4494. // Clean up any remaining tags
  4495. parseEndTag();
  4496. function advance(n) {
  4497. index += n;
  4498. html = html.substring(n);
  4499. }
  4500. function parseStartTag() {
  4501. var start = html.match(startTagOpen);
  4502. if (start) {
  4503. var match = {
  4504. tagName: start[1],
  4505. attrs: [],
  4506. start: index
  4507. };
  4508. advance(start[0].length);
  4509. var end = void 0, attr = void 0;
  4510. while (!(end = html.match(startTagClose)) &&
  4511. (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
  4512. attr.start = index;
  4513. advance(attr[0].length);
  4514. attr.end = index;
  4515. match.attrs.push(attr);
  4516. }
  4517. if (end) {
  4518. match.unarySlash = end[1];
  4519. advance(end[0].length);
  4520. match.end = index;
  4521. return match;
  4522. }
  4523. }
  4524. }
  4525. function handleStartTag(match) {
  4526. var tagName = match.tagName;
  4527. var unarySlash = match.unarySlash;
  4528. if (expectHTML) {
  4529. if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
  4530. parseEndTag(lastTag);
  4531. }
  4532. if (canBeLeftOpenTag(tagName) && lastTag === tagName) {
  4533. parseEndTag(tagName);
  4534. }
  4535. }
  4536. var unary = isUnaryTag(tagName) || !!unarySlash;
  4537. var l = match.attrs.length;
  4538. var attrs = new Array(l);
  4539. for (var i = 0; i < l; i++) {
  4540. var args = match.attrs[i];
  4541. var value = args[3] || args[4] || args[5] || '';
  4542. var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
  4543. ? options.shouldDecodeNewlinesForHref
  4544. : options.shouldDecodeNewlines;
  4545. attrs[i] = {
  4546. name: args[1],
  4547. value: decodeAttr(value, shouldDecodeNewlines)
  4548. };
  4549. if (options.outputSourceRange) {
  4550. attrs[i].start = args.start + args[0].match(/^\s*/).length;
  4551. attrs[i].end = args.end;
  4552. }
  4553. }
  4554. if (!unary) {
  4555. stack.push({
  4556. tag: tagName,
  4557. lowerCasedTag: tagName.toLowerCase(),
  4558. attrs: attrs,
  4559. start: match.start,
  4560. end: match.end
  4561. });
  4562. lastTag = tagName;
  4563. }
  4564. if (options.start) {
  4565. options.start(tagName, attrs, unary, match.start, match.end);
  4566. }
  4567. }
  4568. function parseEndTag(tagName, start, end) {
  4569. var pos, lowerCasedTagName;
  4570. if (start == null)
  4571. start = index;
  4572. if (end == null)
  4573. end = index;
  4574. // Find the closest opened tag of the same type
  4575. if (tagName) {
  4576. lowerCasedTagName = tagName.toLowerCase();
  4577. for (pos = stack.length - 1; pos >= 0; pos--) {
  4578. if (stack[pos].lowerCasedTag === lowerCasedTagName) {
  4579. break;
  4580. }
  4581. }
  4582. }
  4583. else {
  4584. // If no tag name is provided, clean shop
  4585. pos = 0;
  4586. }
  4587. if (pos >= 0) {
  4588. // Close all the open elements, up the stack
  4589. for (var i = stack.length - 1; i >= pos; i--) {
  4590. if ((i > pos || !tagName) && options.warn) {
  4591. options.warn("tag <".concat(stack[i].tag, "> has no matching end tag."), {
  4592. start: stack[i].start,
  4593. end: stack[i].end
  4594. });
  4595. }
  4596. if (options.end) {
  4597. options.end(stack[i].tag, start, end);
  4598. }
  4599. }
  4600. // Remove the open elements from the stack
  4601. stack.length = pos;
  4602. lastTag = pos && stack[pos - 1].tag;
  4603. }
  4604. else if (lowerCasedTagName === 'br') {
  4605. if (options.start) {
  4606. options.start(tagName, [], true, start, end);
  4607. }
  4608. }
  4609. else if (lowerCasedTagName === 'p') {
  4610. if (options.start) {
  4611. options.start(tagName, [], false, start, end);
  4612. }
  4613. if (options.end) {
  4614. options.end(tagName, start, end);
  4615. }
  4616. }
  4617. }
  4618. }
  4619. /**
  4620. * Cross-platform code generation for component v-model
  4621. */
  4622. function genComponentModel(el, value, modifiers) {
  4623. var _a = modifiers || {}, number = _a.number, trim = _a.trim;
  4624. var baseValueExpression = '$$v';
  4625. var valueExpression = baseValueExpression;
  4626. if (trim) {
  4627. valueExpression =
  4628. "(typeof ".concat(baseValueExpression, " === 'string'") +
  4629. "? ".concat(baseValueExpression, ".trim()") +
  4630. ": ".concat(baseValueExpression, ")");
  4631. }
  4632. if (number) {
  4633. valueExpression = "_n(".concat(valueExpression, ")");
  4634. }
  4635. var assignment = genAssignmentCode(value, valueExpression);
  4636. el.model = {
  4637. value: "(".concat(value, ")"),
  4638. expression: JSON.stringify(value),
  4639. callback: "function (".concat(baseValueExpression, ") {").concat(assignment, "}")
  4640. };
  4641. }
  4642. /**
  4643. * Cross-platform codegen helper for generating v-model value assignment code.
  4644. */
  4645. function genAssignmentCode(value, assignment) {
  4646. var res = parseModel(value);
  4647. if (res.key === null) {
  4648. return "".concat(value, "=").concat(assignment);
  4649. }
  4650. else {
  4651. return "$set(".concat(res.exp, ", ").concat(res.key, ", ").concat(assignment, ")");
  4652. }
  4653. }
  4654. /**
  4655. * Parse a v-model expression into a base path and a final key segment.
  4656. * Handles both dot-path and possible square brackets.
  4657. *
  4658. * Possible cases:
  4659. *
  4660. * - test
  4661. * - test[key]
  4662. * - test[test1[key]]
  4663. * - test["a"][key]
  4664. * - xxx.test[a[a].test1[key]]
  4665. * - test.xxx.a["asa"][test1[key]]
  4666. *
  4667. */
  4668. var len, str, chr, index, expressionPos, expressionEndPos;
  4669. function parseModel(val) {
  4670. // Fix https://github.com/vuejs/vue/pull/7730
  4671. // allow v-model="obj.val " (trailing whitespace)
  4672. val = val.trim();
  4673. len = val.length;
  4674. if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
  4675. index = val.lastIndexOf('.');
  4676. if (index > -1) {
  4677. return {
  4678. exp: val.slice(0, index),
  4679. key: '"' + val.slice(index + 1) + '"'
  4680. };
  4681. }
  4682. else {
  4683. return {
  4684. exp: val,
  4685. key: null
  4686. };
  4687. }
  4688. }
  4689. str = val;
  4690. index = expressionPos = expressionEndPos = 0;
  4691. while (!eof()) {
  4692. chr = next();
  4693. /* istanbul ignore if */
  4694. if (isStringStart(chr)) {
  4695. parseString(chr);
  4696. }
  4697. else if (chr === 0x5b) {
  4698. parseBracket(chr);
  4699. }
  4700. }
  4701. return {
  4702. exp: val.slice(0, expressionPos),
  4703. key: val.slice(expressionPos + 1, expressionEndPos)
  4704. };
  4705. }
  4706. function next() {
  4707. return str.charCodeAt(++index);
  4708. }
  4709. function eof() {
  4710. return index >= len;
  4711. }
  4712. function isStringStart(chr) {
  4713. return chr === 0x22 || chr === 0x27;
  4714. }
  4715. function parseBracket(chr) {
  4716. var inBracket = 1;
  4717. expressionPos = index;
  4718. while (!eof()) {
  4719. chr = next();
  4720. if (isStringStart(chr)) {
  4721. parseString(chr);
  4722. continue;
  4723. }
  4724. if (chr === 0x5b)
  4725. inBracket++;
  4726. if (chr === 0x5d)
  4727. inBracket--;
  4728. if (inBracket === 0) {
  4729. expressionEndPos = index;
  4730. break;
  4731. }
  4732. }
  4733. }
  4734. function parseString(chr) {
  4735. var stringQuote = chr;
  4736. while (!eof()) {
  4737. chr = next();
  4738. if (chr === stringQuote) {
  4739. break;
  4740. }
  4741. }
  4742. }
  4743. var onRE = /^@|^v-on:/;
  4744. var dirRE = /^v-|^@|^:|^#/;
  4745. var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
  4746. var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
  4747. var stripParensRE = /^\(|\)$/g;
  4748. var dynamicArgRE = /^\[.*\]$/;
  4749. var argRE = /:(.*)$/;
  4750. var bindRE = /^:|^\.|^v-bind:/;
  4751. var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
  4752. var slotRE = /^v-slot(:|$)|^#/;
  4753. var lineBreakRE = /[\r\n]/;
  4754. var whitespaceRE = /[ \f\t\r\n]+/g;
  4755. var invalidAttributeRE = /[\s"'<>\/=]/;
  4756. var decodeHTMLCached = cached(he.decode);
  4757. var emptySlotScopeToken = "_empty_";
  4758. // configurable state
  4759. var warn$1;
  4760. var delimiters;
  4761. var transforms;
  4762. var preTransforms;
  4763. var postTransforms;
  4764. var platformIsPreTag;
  4765. var platformMustUseProp;
  4766. var platformGetTagNamespace;
  4767. var maybeComponent;
  4768. function createASTElement(tag, attrs, parent) {
  4769. return {
  4770. type: 1,
  4771. tag: tag,
  4772. attrsList: attrs,
  4773. attrsMap: makeAttrsMap(attrs),
  4774. rawAttrsMap: {},
  4775. parent: parent,
  4776. children: []
  4777. };
  4778. }
  4779. /**
  4780. * Convert HTML string to AST.
  4781. */
  4782. function parse(template, options) {
  4783. warn$1 = options.warn || baseWarn;
  4784. platformIsPreTag = options.isPreTag || no;
  4785. platformMustUseProp = options.mustUseProp || no;
  4786. platformGetTagNamespace = options.getTagNamespace || no;
  4787. var isReservedTag = options.isReservedTag || no;
  4788. maybeComponent = function (el) {
  4789. return !!(el.component ||
  4790. el.attrsMap[':is'] ||
  4791. el.attrsMap['v-bind:is'] ||
  4792. !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)));
  4793. };
  4794. transforms = pluckModuleFunction(options.modules, 'transformNode');
  4795. preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
  4796. postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
  4797. delimiters = options.delimiters;
  4798. var stack = [];
  4799. var preserveWhitespace = options.preserveWhitespace !== false;
  4800. var whitespaceOption = options.whitespace;
  4801. var root;
  4802. var currentParent;
  4803. var inVPre = false;
  4804. var inPre = false;
  4805. var warned = false;
  4806. function warnOnce(msg, range) {
  4807. if (!warned) {
  4808. warned = true;
  4809. warn$1(msg, range);
  4810. }
  4811. }
  4812. function closeElement(element) {
  4813. trimEndingWhitespace(element);
  4814. if (!inVPre && !element.processed) {
  4815. element = processElement(element, options);
  4816. }
  4817. // tree management
  4818. if (!stack.length && element !== root) {
  4819. // allow root elements with v-if, v-else-if and v-else
  4820. if (root.if && (element.elseif || element.else)) {
  4821. {
  4822. checkRootConstraints(element);
  4823. }
  4824. addIfCondition(root, {
  4825. exp: element.elseif,
  4826. block: element
  4827. });
  4828. }
  4829. else {
  4830. warnOnce("Component template should contain exactly one root element. " +
  4831. "If you are using v-if on multiple elements, " +
  4832. "use v-else-if to chain them instead.", { start: element.start });
  4833. }
  4834. }
  4835. if (currentParent && !element.forbidden) {
  4836. if (element.elseif || element.else) {
  4837. processIfConditions(element, currentParent);
  4838. }
  4839. else {
  4840. if (element.slotScope) {
  4841. // scoped slot
  4842. // keep it in the children list so that v-else(-if) conditions can
  4843. // find it as the prev node.
  4844. var name_1 = element.slotTarget || '"default"';
  4845. (currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name_1] = element;
  4846. }
  4847. currentParent.children.push(element);
  4848. element.parent = currentParent;
  4849. }
  4850. }
  4851. // final children cleanup
  4852. // filter out scoped slots
  4853. element.children = element.children.filter(function (c) { return !c.slotScope; });
  4854. // remove trailing whitespace node again
  4855. trimEndingWhitespace(element);
  4856. // check pre state
  4857. if (element.pre) {
  4858. inVPre = false;
  4859. }
  4860. if (platformIsPreTag(element.tag)) {
  4861. inPre = false;
  4862. }
  4863. // apply post-transforms
  4864. for (var i = 0; i < postTransforms.length; i++) {
  4865. postTransforms[i](element, options);
  4866. }
  4867. }
  4868. function trimEndingWhitespace(el) {
  4869. // remove trailing whitespace node
  4870. if (!inPre) {
  4871. var lastNode = void 0;
  4872. while ((lastNode = el.children[el.children.length - 1]) &&
  4873. lastNode.type === 3 &&
  4874. lastNode.text === ' ') {
  4875. el.children.pop();
  4876. }
  4877. }
  4878. }
  4879. function checkRootConstraints(el) {
  4880. if (el.tag === 'slot' || el.tag === 'template') {
  4881. warnOnce("Cannot use <".concat(el.tag, "> as component root element because it may ") +
  4882. 'contain multiple nodes.', { start: el.start });
  4883. }
  4884. if (el.attrsMap.hasOwnProperty('v-for')) {
  4885. warnOnce('Cannot use v-for on stateful component root element because ' +
  4886. 'it renders multiple elements.', el.rawAttrsMap['v-for']);
  4887. }
  4888. }
  4889. parseHTML(template, {
  4890. warn: warn$1,
  4891. expectHTML: options.expectHTML,
  4892. isUnaryTag: options.isUnaryTag,
  4893. canBeLeftOpenTag: options.canBeLeftOpenTag,
  4894. shouldDecodeNewlines: options.shouldDecodeNewlines,
  4895. shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
  4896. shouldKeepComment: options.comments,
  4897. outputSourceRange: options.outputSourceRange,
  4898. start: function (tag, attrs, unary, start, end) {
  4899. // check namespace.
  4900. // inherit parent ns if there is one
  4901. var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
  4902. // handle IE svg bug
  4903. /* istanbul ignore if */
  4904. if (isIE && ns === 'svg') {
  4905. attrs = guardIESVGBug(attrs);
  4906. }
  4907. var element = createASTElement(tag, attrs, currentParent);
  4908. if (ns) {
  4909. element.ns = ns;
  4910. }
  4911. {
  4912. if (options.outputSourceRange) {
  4913. element.start = start;
  4914. element.end = end;
  4915. element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
  4916. cumulated[attr.name] = attr;
  4917. return cumulated;
  4918. }, {});
  4919. }
  4920. attrs.forEach(function (attr) {
  4921. if (invalidAttributeRE.test(attr.name)) {
  4922. warn$1("Invalid dynamic argument expression: attribute names cannot contain " +
  4923. "spaces, quotes, <, >, / or =.", options.outputSourceRange
  4924. ? {
  4925. start: attr.start + attr.name.indexOf("["),
  4926. end: attr.start + attr.name.length
  4927. }
  4928. : undefined);
  4929. }
  4930. });
  4931. }
  4932. if (isForbiddenTag(element) && !isServerRendering()) {
  4933. element.forbidden = true;
  4934. warn$1('Templates should only be responsible for mapping the state to the ' +
  4935. 'UI. Avoid placing tags with side-effects in your templates, such as ' +
  4936. "<".concat(tag, ">") +
  4937. ', as they will not be parsed.', { start: element.start });
  4938. }
  4939. // apply pre-transforms
  4940. for (var i = 0; i < preTransforms.length; i++) {
  4941. element = preTransforms[i](element, options) || element;
  4942. }
  4943. if (!inVPre) {
  4944. processPre(element);
  4945. if (element.pre) {
  4946. inVPre = true;
  4947. }
  4948. }
  4949. if (platformIsPreTag(element.tag)) {
  4950. inPre = true;
  4951. }
  4952. if (inVPre) {
  4953. processRawAttrs(element);
  4954. }
  4955. else if (!element.processed) {
  4956. // structural directives
  4957. processFor(element);
  4958. processIf(element);
  4959. processOnce(element);
  4960. }
  4961. if (!root) {
  4962. root = element;
  4963. {
  4964. checkRootConstraints(root);
  4965. }
  4966. }
  4967. if (!unary) {
  4968. currentParent = element;
  4969. stack.push(element);
  4970. }
  4971. else {
  4972. closeElement(element);
  4973. }
  4974. },
  4975. end: function (tag, start, end) {
  4976. var element = stack[stack.length - 1];
  4977. // pop stack
  4978. stack.length -= 1;
  4979. currentParent = stack[stack.length - 1];
  4980. if (options.outputSourceRange) {
  4981. element.end = end;
  4982. }
  4983. closeElement(element);
  4984. },
  4985. chars: function (text, start, end) {
  4986. if (!currentParent) {
  4987. {
  4988. if (text === template) {
  4989. warnOnce('Component template requires a root element, rather than just text.', { start: start });
  4990. }
  4991. else if ((text = text.trim())) {
  4992. warnOnce("text \"".concat(text, "\" outside root element will be ignored."), {
  4993. start: start
  4994. });
  4995. }
  4996. }
  4997. return;
  4998. }
  4999. // IE textarea placeholder bug
  5000. /* istanbul ignore if */
  5001. if (isIE &&
  5002. currentParent.tag === 'textarea' &&
  5003. currentParent.attrsMap.placeholder === text) {
  5004. return;
  5005. }
  5006. var children = currentParent.children;
  5007. if (inPre || text.trim()) {
  5008. text = isTextTag(currentParent)
  5009. ? text
  5010. : decodeHTMLCached(text);
  5011. }
  5012. else if (!children.length) {
  5013. // remove the whitespace-only node right after an opening tag
  5014. text = '';
  5015. }
  5016. else if (whitespaceOption) {
  5017. if (whitespaceOption === 'condense') {
  5018. // in condense mode, remove the whitespace node if it contains
  5019. // line break, otherwise condense to a single space
  5020. text = lineBreakRE.test(text) ? '' : ' ';
  5021. }
  5022. else {
  5023. text = ' ';
  5024. }
  5025. }
  5026. else {
  5027. text = preserveWhitespace ? ' ' : '';
  5028. }
  5029. if (text) {
  5030. if (!inPre && whitespaceOption === 'condense') {
  5031. // condense consecutive whitespaces into single space
  5032. text = text.replace(whitespaceRE, ' ');
  5033. }
  5034. var res = void 0;
  5035. var child = void 0;
  5036. if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
  5037. child = {
  5038. type: 2,
  5039. expression: res.expression,
  5040. tokens: res.tokens,
  5041. text: text
  5042. };
  5043. }
  5044. else if (text !== ' ' ||
  5045. !children.length ||
  5046. children[children.length - 1].text !== ' ') {
  5047. child = {
  5048. type: 3,
  5049. text: text
  5050. };
  5051. }
  5052. if (child) {
  5053. if (options.outputSourceRange) {
  5054. child.start = start;
  5055. child.end = end;
  5056. }
  5057. children.push(child);
  5058. }
  5059. }
  5060. },
  5061. comment: function (text, start, end) {
  5062. // adding anything as a sibling to the root node is forbidden
  5063. // comments should still be allowed, but ignored
  5064. if (currentParent) {
  5065. var child = {
  5066. type: 3,
  5067. text: text,
  5068. isComment: true
  5069. };
  5070. if (options.outputSourceRange) {
  5071. child.start = start;
  5072. child.end = end;
  5073. }
  5074. currentParent.children.push(child);
  5075. }
  5076. }
  5077. });
  5078. return root;
  5079. }
  5080. function processPre(el) {
  5081. if (getAndRemoveAttr(el, 'v-pre') != null) {
  5082. el.pre = true;
  5083. }
  5084. }
  5085. function processRawAttrs(el) {
  5086. var list = el.attrsList;
  5087. var len = list.length;
  5088. if (len) {
  5089. var attrs = (el.attrs = new Array(len));
  5090. for (var i = 0; i < len; i++) {
  5091. attrs[i] = {
  5092. name: list[i].name,
  5093. value: JSON.stringify(list[i].value)
  5094. };
  5095. if (list[i].start != null) {
  5096. attrs[i].start = list[i].start;
  5097. attrs[i].end = list[i].end;
  5098. }
  5099. }
  5100. }
  5101. else if (!el.pre) {
  5102. // non root node in pre blocks with no attributes
  5103. el.plain = true;
  5104. }
  5105. }
  5106. function processElement(element, options) {
  5107. processKey(element);
  5108. // determine whether this is a plain element after
  5109. // removing structural attributes
  5110. element.plain =
  5111. !element.key && !element.scopedSlots && !element.attrsList.length;
  5112. processRef(element);
  5113. processSlotContent(element);
  5114. processSlotOutlet(element);
  5115. processComponent(element);
  5116. for (var i = 0; i < transforms.length; i++) {
  5117. element = transforms[i](element, options) || element;
  5118. }
  5119. processAttrs(element);
  5120. return element;
  5121. }
  5122. function processKey(el) {
  5123. var exp = getBindingAttr(el, 'key');
  5124. if (exp) {
  5125. {
  5126. if (el.tag === 'template') {
  5127. warn$1("<template> cannot be keyed. Place the key on real elements instead.", getRawBindingAttr(el, 'key'));
  5128. }
  5129. if (el.for) {
  5130. var iterator = el.iterator2 || el.iterator1;
  5131. var parent_1 = el.parent;
  5132. if (iterator &&
  5133. iterator === exp &&
  5134. parent_1 &&
  5135. parent_1.tag === 'transition-group') {
  5136. warn$1("Do not use v-for index as key on <transition-group> children, " +
  5137. "this is the same as not using keys.", getRawBindingAttr(el, 'key'), true /* tip */);
  5138. }
  5139. }
  5140. }
  5141. el.key = exp;
  5142. }
  5143. }
  5144. function processRef(el) {
  5145. var ref = getBindingAttr(el, 'ref');
  5146. if (ref) {
  5147. el.ref = ref;
  5148. el.refInFor = checkInFor(el);
  5149. }
  5150. }
  5151. function processFor(el) {
  5152. var exp;
  5153. if ((exp = getAndRemoveAttr(el, 'v-for'))) {
  5154. var res = parseFor(exp);
  5155. if (res) {
  5156. extend(el, res);
  5157. }
  5158. else {
  5159. warn$1("Invalid v-for expression: ".concat(exp), el.rawAttrsMap['v-for']);
  5160. }
  5161. }
  5162. }
  5163. function parseFor(exp) {
  5164. var inMatch = exp.match(forAliasRE);
  5165. if (!inMatch)
  5166. return;
  5167. var res = {};
  5168. res.for = inMatch[2].trim();
  5169. var alias = inMatch[1].trim().replace(stripParensRE, '');
  5170. var iteratorMatch = alias.match(forIteratorRE);
  5171. if (iteratorMatch) {
  5172. res.alias = alias.replace(forIteratorRE, '').trim();
  5173. res.iterator1 = iteratorMatch[1].trim();
  5174. if (iteratorMatch[2]) {
  5175. res.iterator2 = iteratorMatch[2].trim();
  5176. }
  5177. }
  5178. else {
  5179. res.alias = alias;
  5180. }
  5181. return res;
  5182. }
  5183. function processIf(el) {
  5184. var exp = getAndRemoveAttr(el, 'v-if');
  5185. if (exp) {
  5186. el.if = exp;
  5187. addIfCondition(el, {
  5188. exp: exp,
  5189. block: el
  5190. });
  5191. }
  5192. else {
  5193. if (getAndRemoveAttr(el, 'v-else') != null) {
  5194. el.else = true;
  5195. }
  5196. var elseif = getAndRemoveAttr(el, 'v-else-if');
  5197. if (elseif) {
  5198. el.elseif = elseif;
  5199. }
  5200. }
  5201. }
  5202. function processIfConditions(el, parent) {
  5203. var prev = findPrevElement(parent.children);
  5204. if (prev && prev.if) {
  5205. addIfCondition(prev, {
  5206. exp: el.elseif,
  5207. block: el
  5208. });
  5209. }
  5210. else {
  5211. warn$1("v-".concat(el.elseif ? 'else-if="' + el.elseif + '"' : 'else', " ") +
  5212. "used on element <".concat(el.tag, "> without corresponding v-if."), el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']);
  5213. }
  5214. }
  5215. function findPrevElement(children) {
  5216. var i = children.length;
  5217. while (i--) {
  5218. if (children[i].type === 1) {
  5219. return children[i];
  5220. }
  5221. else {
  5222. if (children[i].text !== ' ') {
  5223. warn$1("text \"".concat(children[i].text.trim(), "\" between v-if and v-else(-if) ") +
  5224. "will be ignored.", children[i]);
  5225. }
  5226. children.pop();
  5227. }
  5228. }
  5229. }
  5230. function addIfCondition(el, condition) {
  5231. if (!el.ifConditions) {
  5232. el.ifConditions = [];
  5233. }
  5234. el.ifConditions.push(condition);
  5235. }
  5236. function processOnce(el) {
  5237. var once = getAndRemoveAttr(el, 'v-once');
  5238. if (once != null) {
  5239. el.once = true;
  5240. }
  5241. }
  5242. // handle content being passed to a component as slot,
  5243. // e.g. <template slot="xxx">, <div slot-scope="xxx">
  5244. function processSlotContent(el) {
  5245. var slotScope;
  5246. if (el.tag === 'template') {
  5247. slotScope = getAndRemoveAttr(el, 'scope');
  5248. /* istanbul ignore if */
  5249. if (slotScope) {
  5250. warn$1("the \"scope\" attribute for scoped slots have been deprecated and " +
  5251. "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
  5252. "can also be used on plain elements in addition to <template> to " +
  5253. "denote scoped slots.", el.rawAttrsMap['scope'], true);
  5254. }
  5255. el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
  5256. }
  5257. else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
  5258. /* istanbul ignore if */
  5259. if (el.attrsMap['v-for']) {
  5260. warn$1("Ambiguous combined usage of slot-scope and v-for on <".concat(el.tag, "> ") +
  5261. "(v-for takes higher priority). Use a wrapper <template> for the " +
  5262. "scoped slot to make it clearer.", el.rawAttrsMap['slot-scope'], true);
  5263. }
  5264. el.slotScope = slotScope;
  5265. }
  5266. // slot="xxx"
  5267. var slotTarget = getBindingAttr(el, 'slot');
  5268. if (slotTarget) {
  5269. el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
  5270. el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);
  5271. // preserve slot as an attribute for native shadow DOM compat
  5272. // only for non-scoped slots.
  5273. if (el.tag !== 'template' && !el.slotScope) {
  5274. addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));
  5275. }
  5276. }
  5277. // 2.6 v-slot syntax
  5278. {
  5279. if (el.tag === 'template') {
  5280. // v-slot on <template>
  5281. var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
  5282. if (slotBinding) {
  5283. {
  5284. if (el.slotTarget || el.slotScope) {
  5285. warn$1("Unexpected mixed usage of different slot syntaxes.", el);
  5286. }
  5287. if (el.parent && !maybeComponent(el.parent)) {
  5288. warn$1("<template v-slot> can only appear at the root level inside " +
  5289. "the receiving component", el);
  5290. }
  5291. }
  5292. var _a = getSlotName(slotBinding), name_2 = _a.name, dynamic = _a.dynamic;
  5293. el.slotTarget = name_2;
  5294. el.slotTargetDynamic = dynamic;
  5295. el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
  5296. }
  5297. }
  5298. else {
  5299. // v-slot on component, denotes default slot
  5300. var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
  5301. if (slotBinding) {
  5302. {
  5303. if (!maybeComponent(el)) {
  5304. warn$1("v-slot can only be used on components or <template>.", slotBinding);
  5305. }
  5306. if (el.slotScope || el.slotTarget) {
  5307. warn$1("Unexpected mixed usage of different slot syntaxes.", el);
  5308. }
  5309. if (el.scopedSlots) {
  5310. warn$1("To avoid scope ambiguity, the default slot should also use " +
  5311. "<template> syntax when there are other named slots.", slotBinding);
  5312. }
  5313. }
  5314. // add the component's children to its default slot
  5315. var slots = el.scopedSlots || (el.scopedSlots = {});
  5316. var _b = getSlotName(slotBinding), name_3 = _b.name, dynamic = _b.dynamic;
  5317. var slotContainer_1 = (slots[name_3] = createASTElement('template', [], el));
  5318. slotContainer_1.slotTarget = name_3;
  5319. slotContainer_1.slotTargetDynamic = dynamic;
  5320. slotContainer_1.children = el.children.filter(function (c) {
  5321. if (!c.slotScope) {
  5322. c.parent = slotContainer_1;
  5323. return true;
  5324. }
  5325. });
  5326. slotContainer_1.slotScope = slotBinding.value || emptySlotScopeToken;
  5327. // remove children as they are returned from scopedSlots now
  5328. el.children = [];
  5329. // mark el non-plain so data gets generated
  5330. el.plain = false;
  5331. }
  5332. }
  5333. }
  5334. }
  5335. function getSlotName(binding) {
  5336. var name = binding.name.replace(slotRE, '');
  5337. if (!name) {
  5338. if (binding.name[0] !== '#') {
  5339. name = 'default';
  5340. }
  5341. else {
  5342. warn$1("v-slot shorthand syntax requires a slot name.", binding);
  5343. }
  5344. }
  5345. return dynamicArgRE.test(name)
  5346. ? // dynamic [name]
  5347. { name: name.slice(1, -1), dynamic: true }
  5348. : // static name
  5349. { name: "\"".concat(name, "\""), dynamic: false };
  5350. }
  5351. // handle <slot/> outlets
  5352. function processSlotOutlet(el) {
  5353. if (el.tag === 'slot') {
  5354. el.slotName = getBindingAttr(el, 'name');
  5355. if (el.key) {
  5356. warn$1("`key` does not work on <slot> because slots are abstract outlets " +
  5357. "and can possibly expand into multiple elements. " +
  5358. "Use the key on a wrapping element instead.", getRawBindingAttr(el, 'key'));
  5359. }
  5360. }
  5361. }
  5362. function processComponent(el) {
  5363. var binding;
  5364. if ((binding = getBindingAttr(el, 'is'))) {
  5365. el.component = binding;
  5366. }
  5367. if (getAndRemoveAttr(el, 'inline-template') != null) {
  5368. el.inlineTemplate = true;
  5369. }
  5370. }
  5371. function processAttrs(el) {
  5372. var list = el.attrsList;
  5373. var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
  5374. for (i = 0, l = list.length; i < l; i++) {
  5375. name = rawName = list[i].name;
  5376. value = list[i].value;
  5377. if (dirRE.test(name)) {
  5378. // mark element as dynamic
  5379. el.hasBindings = true;
  5380. // modifiers
  5381. modifiers = parseModifiers(name.replace(dirRE, ''));
  5382. // support .foo shorthand syntax for the .prop modifier
  5383. if (modifiers) {
  5384. name = name.replace(modifierRE, '');
  5385. }
  5386. if (bindRE.test(name)) {
  5387. // v-bind
  5388. name = name.replace(bindRE, '');
  5389. value = parseFilters(value);
  5390. isDynamic = dynamicArgRE.test(name);
  5391. if (isDynamic) {
  5392. name = name.slice(1, -1);
  5393. }
  5394. if (value.trim().length === 0) {
  5395. warn$1("The value for a v-bind expression cannot be empty. Found in \"v-bind:".concat(name, "\""));
  5396. }
  5397. if (modifiers) {
  5398. if (modifiers.prop && !isDynamic) {
  5399. name = camelize(name);
  5400. if (name === 'innerHtml')
  5401. name = 'innerHTML';
  5402. }
  5403. if (modifiers.camel && !isDynamic) {
  5404. name = camelize(name);
  5405. }
  5406. if (modifiers.sync) {
  5407. syncGen = genAssignmentCode(value, "$event");
  5408. if (!isDynamic) {
  5409. addHandler(el, "update:".concat(camelize(name)), syncGen, null, false, warn$1, list[i]);
  5410. if (hyphenate(name) !== camelize(name)) {
  5411. addHandler(el, "update:".concat(hyphenate(name)), syncGen, null, false, warn$1, list[i]);
  5412. }
  5413. }
  5414. else {
  5415. // handler w/ dynamic event name
  5416. addHandler(el, "\"update:\"+(".concat(name, ")"), syncGen, null, false, warn$1, list[i], true // dynamic
  5417. );
  5418. }
  5419. }
  5420. }
  5421. if ((modifiers && modifiers.prop) ||
  5422. (!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))) {
  5423. addProp(el, name, value, list[i], isDynamic);
  5424. }
  5425. else {
  5426. addAttr(el, name, value, list[i], isDynamic);
  5427. }
  5428. }
  5429. else if (onRE.test(name)) {
  5430. // v-on
  5431. name = name.replace(onRE, '');
  5432. isDynamic = dynamicArgRE.test(name);
  5433. if (isDynamic) {
  5434. name = name.slice(1, -1);
  5435. }
  5436. addHandler(el, name, value, modifiers, false, warn$1, list[i], isDynamic);
  5437. }
  5438. else {
  5439. // normal directives
  5440. name = name.replace(dirRE, '');
  5441. // parse arg
  5442. var argMatch = name.match(argRE);
  5443. var arg = argMatch && argMatch[1];
  5444. isDynamic = false;
  5445. if (arg) {
  5446. name = name.slice(0, -(arg.length + 1));
  5447. if (dynamicArgRE.test(arg)) {
  5448. arg = arg.slice(1, -1);
  5449. isDynamic = true;
  5450. }
  5451. }
  5452. addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);
  5453. if (name === 'model') {
  5454. checkForAliasModel(el, value);
  5455. }
  5456. }
  5457. }
  5458. else {
  5459. // literal attribute
  5460. {
  5461. var res = parseText(value, delimiters);
  5462. if (res) {
  5463. warn$1("".concat(name, "=\"").concat(value, "\": ") +
  5464. 'Interpolation inside attributes has been removed. ' +
  5465. 'Use v-bind or the colon shorthand instead. For example, ' +
  5466. 'instead of <div id="{{ val }}">, use <div :id="val">.', list[i]);
  5467. }
  5468. }
  5469. addAttr(el, name, JSON.stringify(value), list[i]);
  5470. // #6887 firefox doesn't update muted state if set via attribute
  5471. // even immediately after element creation
  5472. if (!el.component &&
  5473. name === 'muted' &&
  5474. platformMustUseProp(el.tag, el.attrsMap.type, name)) {
  5475. addProp(el, name, 'true', list[i]);
  5476. }
  5477. }
  5478. }
  5479. }
  5480. function checkInFor(el) {
  5481. var parent = el;
  5482. while (parent) {
  5483. if (parent.for !== undefined) {
  5484. return true;
  5485. }
  5486. parent = parent.parent;
  5487. }
  5488. return false;
  5489. }
  5490. function parseModifiers(name) {
  5491. var match = name.match(modifierRE);
  5492. if (match) {
  5493. var ret_1 = {};
  5494. match.forEach(function (m) {
  5495. ret_1[m.slice(1)] = true;
  5496. });
  5497. return ret_1;
  5498. }
  5499. }
  5500. function makeAttrsMap(attrs) {
  5501. var map = {};
  5502. for (var i = 0, l = attrs.length; i < l; i++) {
  5503. if (map[attrs[i].name] && !isIE && !isEdge) {
  5504. warn$1('duplicate attribute: ' + attrs[i].name, attrs[i]);
  5505. }
  5506. map[attrs[i].name] = attrs[i].value;
  5507. }
  5508. return map;
  5509. }
  5510. // for script (e.g. type="x/template") or style, do not decode content
  5511. function isTextTag(el) {
  5512. return el.tag === 'script' || el.tag === 'style';
  5513. }
  5514. function isForbiddenTag(el) {
  5515. return (el.tag === 'style' ||
  5516. (el.tag === 'script' &&
  5517. (!el.attrsMap.type || el.attrsMap.type === 'text/javascript')));
  5518. }
  5519. var ieNSBug = /^xmlns:NS\d+/;
  5520. var ieNSPrefix = /^NS\d+:/;
  5521. /* istanbul ignore next */
  5522. function guardIESVGBug(attrs) {
  5523. var res = [];
  5524. for (var i = 0; i < attrs.length; i++) {
  5525. var attr = attrs[i];
  5526. if (!ieNSBug.test(attr.name)) {
  5527. attr.name = attr.name.replace(ieNSPrefix, '');
  5528. res.push(attr);
  5529. }
  5530. }
  5531. return res;
  5532. }
  5533. function checkForAliasModel(el, value) {
  5534. var _el = el;
  5535. while (_el) {
  5536. if (_el.for && _el.alias === value) {
  5537. warn$1("<".concat(el.tag, " v-model=\"").concat(value, "\">: ") +
  5538. "You are binding v-model directly to a v-for iteration alias. " +
  5539. "This will not be able to modify the v-for source array because " +
  5540. "writing to the alias is like modifying a function local variable. " +
  5541. "Consider using an array of objects and use v-model on an object property instead.", el.rawAttrsMap['v-model']);
  5542. }
  5543. _el = _el.parent;
  5544. }
  5545. }
  5546. /**
  5547. * Expand input[v-model] with dynamic type bindings into v-if-else chains
  5548. * Turn this:
  5549. * <input v-model="data[type]" :type="type">
  5550. * into this:
  5551. * <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]">
  5552. * <input v-else-if="type === 'radio'" type="radio" v-model="data[type]">
  5553. * <input v-else :type="type" v-model="data[type]">
  5554. */
  5555. function preTransformNode(el, options) {
  5556. if (el.tag === 'input') {
  5557. var map = el.attrsMap;
  5558. if (!map['v-model']) {
  5559. return;
  5560. }
  5561. var typeBinding = void 0;
  5562. if (map[':type'] || map['v-bind:type']) {
  5563. typeBinding = getBindingAttr(el, 'type');
  5564. }
  5565. if (!map.type && !typeBinding && map['v-bind']) {
  5566. typeBinding = "(".concat(map['v-bind'], ").type");
  5567. }
  5568. if (typeBinding) {
  5569. var ifCondition = getAndRemoveAttr(el, 'v-if', true);
  5570. var ifConditionExtra = ifCondition ? "&&(".concat(ifCondition, ")") : "";
  5571. var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
  5572. var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
  5573. // 1. checkbox
  5574. var branch0 = cloneASTElement(el);
  5575. // process for on the main node
  5576. processFor(branch0);
  5577. addRawAttr(branch0, 'type', 'checkbox');
  5578. processElement(branch0, options);
  5579. branch0.processed = true; // prevent it from double-processed
  5580. branch0.if = "(".concat(typeBinding, ")==='checkbox'") + ifConditionExtra;
  5581. addIfCondition(branch0, {
  5582. exp: branch0.if,
  5583. block: branch0
  5584. });
  5585. // 2. add radio else-if condition
  5586. var branch1 = cloneASTElement(el);
  5587. getAndRemoveAttr(branch1, 'v-for', true);
  5588. addRawAttr(branch1, 'type', 'radio');
  5589. processElement(branch1, options);
  5590. addIfCondition(branch0, {
  5591. exp: "(".concat(typeBinding, ")==='radio'") + ifConditionExtra,
  5592. block: branch1
  5593. });
  5594. // 3. other
  5595. var branch2 = cloneASTElement(el);
  5596. getAndRemoveAttr(branch2, 'v-for', true);
  5597. addRawAttr(branch2, ':type', typeBinding);
  5598. processElement(branch2, options);
  5599. addIfCondition(branch0, {
  5600. exp: ifCondition,
  5601. block: branch2
  5602. });
  5603. if (hasElse) {
  5604. branch0.else = true;
  5605. }
  5606. else if (elseIfCondition) {
  5607. branch0.elseif = elseIfCondition;
  5608. }
  5609. return branch0;
  5610. }
  5611. }
  5612. }
  5613. function cloneASTElement(el) {
  5614. return createASTElement(el.tag, el.attrsList.slice(), el.parent);
  5615. }
  5616. var model$1 = {
  5617. preTransformNode: preTransformNode
  5618. };
  5619. var modules = [klass, style, model$1];
  5620. var warn;
  5621. // in some cases, the event used has to be determined at runtime
  5622. // so we used some reserved tokens during compile.
  5623. var RANGE_TOKEN = '__r';
  5624. function model(el, dir, _warn) {
  5625. warn = _warn;
  5626. var value = dir.value;
  5627. var modifiers = dir.modifiers;
  5628. var tag = el.tag;
  5629. var type = el.attrsMap.type;
  5630. {
  5631. // inputs with type="file" are read only and setting the input's
  5632. // value will throw an error.
  5633. if (tag === 'input' && type === 'file') {
  5634. warn("<".concat(el.tag, " v-model=\"").concat(value, "\" type=\"file\">:\n") +
  5635. "File inputs are read only. Use a v-on:change listener instead.", el.rawAttrsMap['v-model']);
  5636. }
  5637. }
  5638. if (el.component) {
  5639. genComponentModel(el, value, modifiers);
  5640. // component v-model doesn't need extra runtime
  5641. return false;
  5642. }
  5643. else if (tag === 'select') {
  5644. genSelect(el, value, modifiers);
  5645. }
  5646. else if (tag === 'input' && type === 'checkbox') {
  5647. genCheckboxModel(el, value, modifiers);
  5648. }
  5649. else if (tag === 'input' && type === 'radio') {
  5650. genRadioModel(el, value, modifiers);
  5651. }
  5652. else if (tag === 'input' || tag === 'textarea') {
  5653. genDefaultModel(el, value, modifiers);
  5654. }
  5655. else {
  5656. genComponentModel(el, value, modifiers);
  5657. // component v-model doesn't need extra runtime
  5658. return false;
  5659. }
  5660. // ensure runtime directive metadata
  5661. return true;
  5662. }
  5663. function genCheckboxModel(el, value, modifiers) {
  5664. var number = modifiers && modifiers.number;
  5665. var valueBinding = getBindingAttr(el, 'value') || 'null';
  5666. var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
  5667. var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
  5668. addProp(el, 'checked', "Array.isArray(".concat(value, ")") +
  5669. "?_i(".concat(value, ",").concat(valueBinding, ")>-1") +
  5670. (trueValueBinding === 'true'
  5671. ? ":(".concat(value, ")")
  5672. : ":_q(".concat(value, ",").concat(trueValueBinding, ")")));
  5673. addHandler(el, 'change', "var $$a=".concat(value, ",") +
  5674. '$$el=$event.target,' +
  5675. "$$c=$$el.checked?(".concat(trueValueBinding, "):(").concat(falseValueBinding, ");") +
  5676. 'if(Array.isArray($$a)){' +
  5677. "var $$v=".concat(number ? '_n(' + valueBinding + ')' : valueBinding, ",") +
  5678. '$$i=_i($$a,$$v);' +
  5679. "if($$el.checked){$$i<0&&(".concat(genAssignmentCode(value, '$$a.concat([$$v])'), ")}") +
  5680. "else{$$i>-1&&(".concat(genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))'), ")}") +
  5681. "}else{".concat(genAssignmentCode(value, '$$c'), "}"), null, true);
  5682. }
  5683. function genRadioModel(el, value, modifiers) {
  5684. var number = modifiers && modifiers.number;
  5685. var valueBinding = getBindingAttr(el, 'value') || 'null';
  5686. valueBinding = number ? "_n(".concat(valueBinding, ")") : valueBinding;
  5687. addProp(el, 'checked', "_q(".concat(value, ",").concat(valueBinding, ")"));
  5688. addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
  5689. }
  5690. function genSelect(el, value, modifiers) {
  5691. var number = modifiers && modifiers.number;
  5692. var selectedVal = "Array.prototype.filter" +
  5693. ".call($event.target.options,function(o){return o.selected})" +
  5694. ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
  5695. "return ".concat(number ? '_n(val)' : 'val', "})");
  5696. var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
  5697. var code = "var $$selectedVal = ".concat(selectedVal, ";");
  5698. code = "".concat(code, " ").concat(genAssignmentCode(value, assignment));
  5699. addHandler(el, 'change', code, null, true);
  5700. }
  5701. function genDefaultModel(el, value, modifiers) {
  5702. var type = el.attrsMap.type;
  5703. // warn if v-bind:value conflicts with v-model
  5704. // except for inputs with v-bind:type
  5705. {
  5706. var value_1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
  5707. var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
  5708. if (value_1 && !typeBinding) {
  5709. var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
  5710. warn("".concat(binding, "=\"").concat(value_1, "\" conflicts with v-model on the same element ") +
  5711. 'because the latter already expands to a value binding internally', el.rawAttrsMap[binding]);
  5712. }
  5713. }
  5714. var _a = modifiers || {}, lazy = _a.lazy, number = _a.number, trim = _a.trim;
  5715. var needCompositionGuard = !lazy && type !== 'range';
  5716. var event = lazy ? 'change' : type === 'range' ? RANGE_TOKEN : 'input';
  5717. var valueExpression = '$event.target.value';
  5718. if (trim) {
  5719. valueExpression = "$event.target.value.trim()";
  5720. }
  5721. if (number) {
  5722. valueExpression = "_n(".concat(valueExpression, ")");
  5723. }
  5724. var code = genAssignmentCode(value, valueExpression);
  5725. if (needCompositionGuard) {
  5726. code = "if($event.target.composing)return;".concat(code);
  5727. }
  5728. addProp(el, 'value', "(".concat(value, ")"));
  5729. addHandler(el, event, code, null, true);
  5730. if (trim || number) {
  5731. addHandler(el, 'blur', '$forceUpdate()');
  5732. }
  5733. }
  5734. function text(el, dir) {
  5735. if (dir.value) {
  5736. addProp(el, 'textContent', "_s(".concat(dir.value, ")"), dir);
  5737. }
  5738. }
  5739. function html(el, dir) {
  5740. if (dir.value) {
  5741. addProp(el, 'innerHTML', "_s(".concat(dir.value, ")"), dir);
  5742. }
  5743. }
  5744. var directives = {
  5745. model: model,
  5746. text: text,
  5747. html: html
  5748. };
  5749. var baseOptions = {
  5750. expectHTML: true,
  5751. modules: modules,
  5752. directives: directives,
  5753. isPreTag: isPreTag,
  5754. isUnaryTag: isUnaryTag,
  5755. mustUseProp: mustUseProp,
  5756. canBeLeftOpenTag: canBeLeftOpenTag,
  5757. isReservedTag: isReservedTag,
  5758. getTagNamespace: getTagNamespace,
  5759. staticKeys: genStaticKeys(modules)
  5760. };
  5761. var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
  5762. var fnInvokeRE = /\([^)]*?\);*$/;
  5763. var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
  5764. // KeyboardEvent.keyCode aliases
  5765. var keyCodes = {
  5766. esc: 27,
  5767. tab: 9,
  5768. enter: 13,
  5769. space: 32,
  5770. up: 38,
  5771. left: 37,
  5772. right: 39,
  5773. down: 40,
  5774. delete: [8, 46]
  5775. };
  5776. // KeyboardEvent.key aliases
  5777. var keyNames = {
  5778. // #7880: IE11 and Edge use `Esc` for Escape key name.
  5779. esc: ['Esc', 'Escape'],
  5780. tab: 'Tab',
  5781. enter: 'Enter',
  5782. // #9112: IE11 uses `Spacebar` for Space key name.
  5783. space: [' ', 'Spacebar'],
  5784. // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
  5785. up: ['Up', 'ArrowUp'],
  5786. left: ['Left', 'ArrowLeft'],
  5787. right: ['Right', 'ArrowRight'],
  5788. down: ['Down', 'ArrowDown'],
  5789. // #9112: IE11 uses `Del` for Delete key name.
  5790. delete: ['Backspace', 'Delete', 'Del']
  5791. };
  5792. // #4868: modifiers that prevent the execution of the listener
  5793. // need to explicitly return null so that we can determine whether to remove
  5794. // the listener for .once
  5795. var genGuard = function (condition) { return "if(".concat(condition, ")return null;"); };
  5796. var modifierCode = {
  5797. stop: '$event.stopPropagation();',
  5798. prevent: '$event.preventDefault();',
  5799. self: genGuard("$event.target !== $event.currentTarget"),
  5800. ctrl: genGuard("!$event.ctrlKey"),
  5801. shift: genGuard("!$event.shiftKey"),
  5802. alt: genGuard("!$event.altKey"),
  5803. meta: genGuard("!$event.metaKey"),
  5804. left: genGuard("'button' in $event && $event.button !== 0"),
  5805. middle: genGuard("'button' in $event && $event.button !== 1"),
  5806. right: genGuard("'button' in $event && $event.button !== 2")
  5807. };
  5808. function genHandlers(events, isNative) {
  5809. var prefix = isNative ? 'nativeOn:' : 'on:';
  5810. var staticHandlers = "";
  5811. var dynamicHandlers = "";
  5812. for (var name_1 in events) {
  5813. var handlerCode = genHandler(events[name_1]);
  5814. //@ts-expect-error
  5815. if (events[name_1] && events[name_1].dynamic) {
  5816. dynamicHandlers += "".concat(name_1, ",").concat(handlerCode, ",");
  5817. }
  5818. else {
  5819. staticHandlers += "\"".concat(name_1, "\":").concat(handlerCode, ",");
  5820. }
  5821. }
  5822. staticHandlers = "{".concat(staticHandlers.slice(0, -1), "}");
  5823. if (dynamicHandlers) {
  5824. return prefix + "_d(".concat(staticHandlers, ",[").concat(dynamicHandlers.slice(0, -1), "])");
  5825. }
  5826. else {
  5827. return prefix + staticHandlers;
  5828. }
  5829. }
  5830. function genHandler(handler) {
  5831. if (!handler) {
  5832. return 'function(){}';
  5833. }
  5834. if (Array.isArray(handler)) {
  5835. return "[".concat(handler.map(function (handler) { return genHandler(handler); }).join(','), "]");
  5836. }
  5837. var isMethodPath = simplePathRE.test(handler.value);
  5838. var isFunctionExpression = fnExpRE.test(handler.value);
  5839. var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));
  5840. if (!handler.modifiers) {
  5841. if (isMethodPath || isFunctionExpression) {
  5842. return handler.value;
  5843. }
  5844. return "function($event){".concat(isFunctionInvocation ? "return ".concat(handler.value) : handler.value, "}"); // inline statement
  5845. }
  5846. else {
  5847. var code = '';
  5848. var genModifierCode = '';
  5849. var keys = [];
  5850. var _loop_1 = function (key) {
  5851. if (modifierCode[key]) {
  5852. genModifierCode += modifierCode[key];
  5853. // left/right
  5854. if (keyCodes[key]) {
  5855. keys.push(key);
  5856. }
  5857. }
  5858. else if (key === 'exact') {
  5859. var modifiers_1 = handler.modifiers;
  5860. genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta']
  5861. .filter(function (keyModifier) { return !modifiers_1[keyModifier]; })
  5862. .map(function (keyModifier) { return "$event.".concat(keyModifier, "Key"); })
  5863. .join('||'));
  5864. }
  5865. else {
  5866. keys.push(key);
  5867. }
  5868. };
  5869. for (var key in handler.modifiers) {
  5870. _loop_1(key);
  5871. }
  5872. if (keys.length) {
  5873. code += genKeyFilter(keys);
  5874. }
  5875. // Make sure modifiers like prevent and stop get executed after key filtering
  5876. if (genModifierCode) {
  5877. code += genModifierCode;
  5878. }
  5879. var handlerCode = isMethodPath
  5880. ? "return ".concat(handler.value, ".apply(null, arguments)")
  5881. : isFunctionExpression
  5882. ? "return (".concat(handler.value, ").apply(null, arguments)")
  5883. : isFunctionInvocation
  5884. ? "return ".concat(handler.value)
  5885. : handler.value;
  5886. return "function($event){".concat(code).concat(handlerCode, "}");
  5887. }
  5888. }
  5889. function genKeyFilter(keys) {
  5890. return (
  5891. // make sure the key filters only apply to KeyboardEvents
  5892. // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake
  5893. // key events that do not have keyCode property...
  5894. "if(!$event.type.indexOf('key')&&" +
  5895. "".concat(keys.map(genFilterCode).join('&&'), ")return null;"));
  5896. }
  5897. function genFilterCode(key) {
  5898. var keyVal = parseInt(key, 10);
  5899. if (keyVal) {
  5900. return "$event.keyCode!==".concat(keyVal);
  5901. }
  5902. var keyCode = keyCodes[key];
  5903. var keyName = keyNames[key];
  5904. return ("_k($event.keyCode," +
  5905. "".concat(JSON.stringify(key), ",") +
  5906. "".concat(JSON.stringify(keyCode), ",") +
  5907. "$event.key," +
  5908. "".concat(JSON.stringify(keyName)) +
  5909. ")");
  5910. }
  5911. function on(el, dir) {
  5912. if (dir.modifiers) {
  5913. warn$2("v-on without argument does not support modifiers.");
  5914. }
  5915. el.wrapListeners = function (code) { return "_g(".concat(code, ",").concat(dir.value, ")"); };
  5916. }
  5917. function bind(el, dir) {
  5918. el.wrapData = function (code) {
  5919. return "_b(".concat(code, ",'").concat(el.tag, "',").concat(dir.value, ",").concat(dir.modifiers && dir.modifiers.prop ? 'true' : 'false').concat(dir.modifiers && dir.modifiers.sync ? ',true' : '', ")");
  5920. };
  5921. }
  5922. var baseDirectives = {
  5923. on: on,
  5924. bind: bind,
  5925. cloak: noop$1
  5926. };
  5927. var CodegenState = /** @class */ (function () {
  5928. function CodegenState(options) {
  5929. this.options = options;
  5930. this.warn = options.warn || baseWarn;
  5931. this.transforms = pluckModuleFunction(options.modules, 'transformCode');
  5932. this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
  5933. this.directives = extend(extend({}, baseDirectives), options.directives);
  5934. var isReservedTag = options.isReservedTag || no;
  5935. this.maybeComponent = function (el) {
  5936. return !!el.component || !isReservedTag(el.tag);
  5937. };
  5938. this.onceId = 0;
  5939. this.staticRenderFns = [];
  5940. this.pre = false;
  5941. }
  5942. return CodegenState;
  5943. }());
  5944. function generate$1(ast, options) {
  5945. var state = new CodegenState(options);
  5946. // fix #11483, Root level <script> tags should not be rendered.
  5947. var code = ast
  5948. ? ast.tag === 'script'
  5949. ? 'null'
  5950. : genElement(ast, state)
  5951. : '_c("div")';
  5952. return {
  5953. render: "with(this){return ".concat(code, "}"),
  5954. staticRenderFns: state.staticRenderFns
  5955. };
  5956. }
  5957. function genElement(el, state) {
  5958. if (el.parent) {
  5959. el.pre = el.pre || el.parent.pre;
  5960. }
  5961. if (el.staticRoot && !el.staticProcessed) {
  5962. return genStatic(el, state);
  5963. }
  5964. else if (el.once && !el.onceProcessed) {
  5965. return genOnce(el, state);
  5966. }
  5967. else if (el.for && !el.forProcessed) {
  5968. return genFor(el, state);
  5969. }
  5970. else if (el.if && !el.ifProcessed) {
  5971. return genIf(el, state);
  5972. }
  5973. else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
  5974. return genChildren(el, state) || 'void 0';
  5975. }
  5976. else if (el.tag === 'slot') {
  5977. return genSlot(el, state);
  5978. }
  5979. else {
  5980. // component or element
  5981. var code = void 0;
  5982. if (el.component) {
  5983. code = genComponent(el.component, el, state);
  5984. }
  5985. else {
  5986. var data = void 0;
  5987. var maybeComponent = state.maybeComponent(el);
  5988. if (!el.plain || (el.pre && maybeComponent)) {
  5989. data = genData(el, state);
  5990. }
  5991. var tag
  5992. // check if this is a component in <script setup>
  5993. = void 0;
  5994. // check if this is a component in <script setup>
  5995. var bindings = state.options.bindings;
  5996. if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {
  5997. tag = checkBindingType(bindings, el.tag);
  5998. }
  5999. if (!tag)
  6000. tag = "'".concat(el.tag, "'");
  6001. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  6002. code = "_c(".concat(tag).concat(data ? ",".concat(data) : '' // data
  6003. ).concat(children ? ",".concat(children) : '' // children
  6004. , ")");
  6005. }
  6006. // module transforms
  6007. for (var i = 0; i < state.transforms.length; i++) {
  6008. code = state.transforms[i](el, code);
  6009. }
  6010. return code;
  6011. }
  6012. }
  6013. function checkBindingType(bindings, key) {
  6014. var camelName = camelize(key);
  6015. var PascalName = capitalize(camelName);
  6016. var checkType = function (type) {
  6017. if (bindings[key] === type) {
  6018. return key;
  6019. }
  6020. if (bindings[camelName] === type) {
  6021. return camelName;
  6022. }
  6023. if (bindings[PascalName] === type) {
  6024. return PascalName;
  6025. }
  6026. };
  6027. var fromConst = checkType("setup-const" /* BindingTypes.SETUP_CONST */) ||
  6028. checkType("setup-reactive-const" /* BindingTypes.SETUP_REACTIVE_CONST */);
  6029. if (fromConst) {
  6030. return fromConst;
  6031. }
  6032. var fromMaybeRef = checkType("setup-let" /* BindingTypes.SETUP_LET */) ||
  6033. checkType("setup-ref" /* BindingTypes.SETUP_REF */) ||
  6034. checkType("setup-maybe-ref" /* BindingTypes.SETUP_MAYBE_REF */);
  6035. if (fromMaybeRef) {
  6036. return fromMaybeRef;
  6037. }
  6038. }
  6039. // hoist static sub-trees out
  6040. function genStatic(el, state) {
  6041. el.staticProcessed = true;
  6042. // Some elements (templates) need to behave differently inside of a v-pre
  6043. // node. All pre nodes are static roots, so we can use this as a location to
  6044. // wrap a state change and reset it upon exiting the pre node.
  6045. var originalPreState = state.pre;
  6046. if (el.pre) {
  6047. state.pre = el.pre;
  6048. }
  6049. state.staticRenderFns.push("with(this){return ".concat(genElement(el, state), "}"));
  6050. state.pre = originalPreState;
  6051. return "_m(".concat(state.staticRenderFns.length - 1).concat(el.staticInFor ? ',true' : '', ")");
  6052. }
  6053. // v-once
  6054. function genOnce(el, state) {
  6055. el.onceProcessed = true;
  6056. if (el.if && !el.ifProcessed) {
  6057. return genIf(el, state);
  6058. }
  6059. else if (el.staticInFor) {
  6060. var key = '';
  6061. var parent_1 = el.parent;
  6062. while (parent_1) {
  6063. if (parent_1.for) {
  6064. key = parent_1.key;
  6065. break;
  6066. }
  6067. parent_1 = parent_1.parent;
  6068. }
  6069. if (!key) {
  6070. state.warn("v-once can only be used inside v-for that is keyed. ", el.rawAttrsMap['v-once']);
  6071. return genElement(el, state);
  6072. }
  6073. return "_o(".concat(genElement(el, state), ",").concat(state.onceId++, ",").concat(key, ")");
  6074. }
  6075. else {
  6076. return genStatic(el, state);
  6077. }
  6078. }
  6079. function genIf(el, state, altGen, altEmpty) {
  6080. el.ifProcessed = true; // avoid recursion
  6081. return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty);
  6082. }
  6083. function genIfConditions(conditions, state, altGen, altEmpty) {
  6084. if (!conditions.length) {
  6085. return altEmpty || '_e()';
  6086. }
  6087. var condition = conditions.shift();
  6088. if (condition.exp) {
  6089. return "(".concat(condition.exp, ")?").concat(genTernaryExp(condition.block), ":").concat(genIfConditions(conditions, state, altGen, altEmpty));
  6090. }
  6091. else {
  6092. return "".concat(genTernaryExp(condition.block));
  6093. }
  6094. // v-if with v-once should generate code like (a)?_m(0):_m(1)
  6095. function genTernaryExp(el) {
  6096. return altGen
  6097. ? altGen(el, state)
  6098. : el.once
  6099. ? genOnce(el, state)
  6100. : genElement(el, state);
  6101. }
  6102. }
  6103. function genFor(el, state, altGen, altHelper) {
  6104. var exp = el.for;
  6105. var alias = el.alias;
  6106. var iterator1 = el.iterator1 ? ",".concat(el.iterator1) : '';
  6107. var iterator2 = el.iterator2 ? ",".concat(el.iterator2) : '';
  6108. if (state.maybeComponent(el) &&
  6109. el.tag !== 'slot' &&
  6110. el.tag !== 'template' &&
  6111. !el.key) {
  6112. state.warn("<".concat(el.tag, " v-for=\"").concat(alias, " in ").concat(exp, "\">: component lists rendered with ") +
  6113. "v-for should have explicit keys. " +
  6114. "See https://vuejs.org/guide/list.html#key for more info.", el.rawAttrsMap['v-for'], true /* tip */);
  6115. }
  6116. el.forProcessed = true; // avoid recursion
  6117. return ("".concat(altHelper || '_l', "((").concat(exp, "),") +
  6118. "function(".concat(alias).concat(iterator1).concat(iterator2, "){") +
  6119. "return ".concat((altGen || genElement)(el, state)) +
  6120. '})');
  6121. }
  6122. function genData(el, state) {
  6123. var data = '{';
  6124. // directives first.
  6125. // directives may mutate the el's other properties before they are generated.
  6126. var dirs = genDirectives(el, state);
  6127. if (dirs)
  6128. data += dirs + ',';
  6129. // key
  6130. if (el.key) {
  6131. data += "key:".concat(el.key, ",");
  6132. }
  6133. // ref
  6134. if (el.ref) {
  6135. data += "ref:".concat(el.ref, ",");
  6136. }
  6137. if (el.refInFor) {
  6138. data += "refInFor:true,";
  6139. }
  6140. // pre
  6141. if (el.pre) {
  6142. data += "pre:true,";
  6143. }
  6144. // record original tag name for components using "is" attribute
  6145. if (el.component) {
  6146. data += "tag:\"".concat(el.tag, "\",");
  6147. }
  6148. // module data generation functions
  6149. for (var i = 0; i < state.dataGenFns.length; i++) {
  6150. data += state.dataGenFns[i](el);
  6151. }
  6152. // attributes
  6153. if (el.attrs) {
  6154. data += "attrs:".concat(genProps(el.attrs), ",");
  6155. }
  6156. // DOM props
  6157. if (el.props) {
  6158. data += "domProps:".concat(genProps(el.props), ",");
  6159. }
  6160. // event handlers
  6161. if (el.events) {
  6162. data += "".concat(genHandlers(el.events, false), ",");
  6163. }
  6164. if (el.nativeEvents) {
  6165. data += "".concat(genHandlers(el.nativeEvents, true), ",");
  6166. }
  6167. // slot target
  6168. // only for non-scoped slots
  6169. if (el.slotTarget && !el.slotScope) {
  6170. data += "slot:".concat(el.slotTarget, ",");
  6171. }
  6172. // scoped slots
  6173. if (el.scopedSlots) {
  6174. data += "".concat(genScopedSlots(el, el.scopedSlots, state), ",");
  6175. }
  6176. // component v-model
  6177. if (el.model) {
  6178. data += "model:{value:".concat(el.model.value, ",callback:").concat(el.model.callback, ",expression:").concat(el.model.expression, "},");
  6179. }
  6180. // inline-template
  6181. if (el.inlineTemplate) {
  6182. var inlineTemplate = genInlineTemplate(el, state);
  6183. if (inlineTemplate) {
  6184. data += "".concat(inlineTemplate, ",");
  6185. }
  6186. }
  6187. data = data.replace(/,$/, '') + '}';
  6188. // v-bind dynamic argument wrap
  6189. // v-bind with dynamic arguments must be applied using the same v-bind object
  6190. // merge helper so that class/style/mustUseProp attrs are handled correctly.
  6191. if (el.dynamicAttrs) {
  6192. data = "_b(".concat(data, ",\"").concat(el.tag, "\",").concat(genProps(el.dynamicAttrs), ")");
  6193. }
  6194. // v-bind data wrap
  6195. if (el.wrapData) {
  6196. data = el.wrapData(data);
  6197. }
  6198. // v-on data wrap
  6199. if (el.wrapListeners) {
  6200. data = el.wrapListeners(data);
  6201. }
  6202. return data;
  6203. }
  6204. function genDirectives(el, state) {
  6205. var dirs = el.directives;
  6206. if (!dirs)
  6207. return;
  6208. var res = 'directives:[';
  6209. var hasRuntime = false;
  6210. var i, l, dir, needRuntime;
  6211. for (i = 0, l = dirs.length; i < l; i++) {
  6212. dir = dirs[i];
  6213. needRuntime = true;
  6214. var gen = state.directives[dir.name];
  6215. if (gen) {
  6216. // compile-time directive that manipulates AST.
  6217. // returns true if it also needs a runtime counterpart.
  6218. needRuntime = !!gen(el, dir, state.warn);
  6219. }
  6220. if (needRuntime) {
  6221. hasRuntime = true;
  6222. res += "{name:\"".concat(dir.name, "\",rawName:\"").concat(dir.rawName, "\"").concat(dir.value
  6223. ? ",value:(".concat(dir.value, "),expression:").concat(JSON.stringify(dir.value))
  6224. : '').concat(dir.arg ? ",arg:".concat(dir.isDynamicArg ? dir.arg : "\"".concat(dir.arg, "\"")) : '').concat(dir.modifiers ? ",modifiers:".concat(JSON.stringify(dir.modifiers)) : '', "},");
  6225. }
  6226. }
  6227. if (hasRuntime) {
  6228. return res.slice(0, -1) + ']';
  6229. }
  6230. }
  6231. function genInlineTemplate(el, state) {
  6232. var ast = el.children[0];
  6233. if ((el.children.length !== 1 || ast.type !== 1)) {
  6234. state.warn('Inline-template components must have exactly one child element.', { start: el.start });
  6235. }
  6236. if (ast && ast.type === 1) {
  6237. var inlineRenderFns = generate$1(ast, state.options);
  6238. return "inlineTemplate:{render:function(){".concat(inlineRenderFns.render, "},staticRenderFns:[").concat(inlineRenderFns.staticRenderFns
  6239. .map(function (code) { return "function(){".concat(code, "}"); })
  6240. .join(','), "]}");
  6241. }
  6242. }
  6243. function genScopedSlots(el, slots, state) {
  6244. // by default scoped slots are considered "stable", this allows child
  6245. // components with only scoped slots to skip forced updates from parent.
  6246. // but in some cases we have to bail-out of this optimization
  6247. // for example if the slot contains dynamic names, has v-if or v-for on them...
  6248. var needsForceUpdate = el.for ||
  6249. Object.keys(slots).some(function (key) {
  6250. var slot = slots[key];
  6251. return (slot.slotTargetDynamic || slot.if || slot.for || containsSlotChild(slot) // is passing down slot from parent which may be dynamic
  6252. );
  6253. });
  6254. // #9534: if a component with scoped slots is inside a conditional branch,
  6255. // it's possible for the same component to be reused but with different
  6256. // compiled slot content. To avoid that, we generate a unique key based on
  6257. // the generated code of all the slot contents.
  6258. var needsKey = !!el.if;
  6259. // OR when it is inside another scoped slot or v-for (the reactivity may be
  6260. // disconnected due to the intermediate scope variable)
  6261. // #9438, #9506
  6262. // TODO: this can be further optimized by properly analyzing in-scope bindings
  6263. // and skip force updating ones that do not actually use scope variables.
  6264. if (!needsForceUpdate) {
  6265. var parent_2 = el.parent;
  6266. while (parent_2) {
  6267. if ((parent_2.slotScope && parent_2.slotScope !== emptySlotScopeToken) ||
  6268. parent_2.for) {
  6269. needsForceUpdate = true;
  6270. break;
  6271. }
  6272. if (parent_2.if) {
  6273. needsKey = true;
  6274. }
  6275. parent_2 = parent_2.parent;
  6276. }
  6277. }
  6278. var generatedSlots = Object.keys(slots)
  6279. .map(function (key) { return genScopedSlot(slots[key], state); })
  6280. .join(',');
  6281. return "scopedSlots:_u([".concat(generatedSlots, "]").concat(needsForceUpdate ? ",null,true" : "").concat(!needsForceUpdate && needsKey ? ",null,false,".concat(hash(generatedSlots)) : "", ")");
  6282. }
  6283. function hash(str) {
  6284. var hash = 5381;
  6285. var i = str.length;
  6286. while (i) {
  6287. hash = (hash * 33) ^ str.charCodeAt(--i);
  6288. }
  6289. return hash >>> 0;
  6290. }
  6291. function containsSlotChild(el) {
  6292. if (el.type === 1) {
  6293. if (el.tag === 'slot') {
  6294. return true;
  6295. }
  6296. return el.children.some(containsSlotChild);
  6297. }
  6298. return false;
  6299. }
  6300. function genScopedSlot(el, state) {
  6301. var isLegacySyntax = el.attrsMap['slot-scope'];
  6302. if (el.if && !el.ifProcessed && !isLegacySyntax) {
  6303. return genIf(el, state, genScopedSlot, "null");
  6304. }
  6305. if (el.for && !el.forProcessed) {
  6306. return genFor(el, state, genScopedSlot);
  6307. }
  6308. var slotScope = el.slotScope === emptySlotScopeToken ? "" : String(el.slotScope);
  6309. var fn = "function(".concat(slotScope, "){") +
  6310. "return ".concat(el.tag === 'template'
  6311. ? el.if && isLegacySyntax
  6312. ? "(".concat(el.if, ")?").concat(genChildren(el, state) || 'undefined', ":undefined")
  6313. : genChildren(el, state) || 'undefined'
  6314. : genElement(el, state), "}");
  6315. // reverse proxy v-slot without scope on this.$slots
  6316. var reverseProxy = slotScope ? "" : ",proxy:true";
  6317. return "{key:".concat(el.slotTarget || "\"default\"", ",fn:").concat(fn).concat(reverseProxy, "}");
  6318. }
  6319. function genChildren(el, state, checkSkip, altGenElement, altGenNode) {
  6320. var children = el.children;
  6321. if (children.length) {
  6322. var el_1 = children[0];
  6323. // optimize single v-for
  6324. if (children.length === 1 &&
  6325. el_1.for &&
  6326. el_1.tag !== 'template' &&
  6327. el_1.tag !== 'slot') {
  6328. var normalizationType_1 = checkSkip
  6329. ? state.maybeComponent(el_1)
  6330. ? ",1"
  6331. : ",0"
  6332. : "";
  6333. return "".concat((altGenElement || genElement)(el_1, state)).concat(normalizationType_1);
  6334. }
  6335. var normalizationType = checkSkip
  6336. ? getNormalizationType(children, state.maybeComponent)
  6337. : 0;
  6338. var gen_1 = altGenNode || genNode;
  6339. return "[".concat(children.map(function (c) { return gen_1(c, state); }).join(','), "]").concat(normalizationType ? ",".concat(normalizationType) : '');
  6340. }
  6341. }
  6342. // determine the normalization needed for the children array.
  6343. // 0: no normalization needed
  6344. // 1: simple normalization needed (possible 1-level deep nested array)
  6345. // 2: full normalization needed
  6346. function getNormalizationType(children, maybeComponent) {
  6347. var res = 0;
  6348. for (var i = 0; i < children.length; i++) {
  6349. var el = children[i];
  6350. if (el.type !== 1) {
  6351. continue;
  6352. }
  6353. if (needsNormalization(el) ||
  6354. (el.ifConditions &&
  6355. el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
  6356. res = 2;
  6357. break;
  6358. }
  6359. if (maybeComponent(el) ||
  6360. (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
  6361. res = 1;
  6362. }
  6363. }
  6364. return res;
  6365. }
  6366. function needsNormalization(el) {
  6367. return el.for !== undefined || el.tag === 'template' || el.tag === 'slot';
  6368. }
  6369. function genNode(node, state) {
  6370. if (node.type === 1) {
  6371. return genElement(node, state);
  6372. }
  6373. else if (node.type === 3 && node.isComment) {
  6374. return genComment(node);
  6375. }
  6376. else {
  6377. return genText(node);
  6378. }
  6379. }
  6380. function genText(text) {
  6381. return "_v(".concat(text.type === 2
  6382. ? text.expression // no need for () because already wrapped in _s()
  6383. : transformSpecialNewlines(JSON.stringify(text.text)), ")");
  6384. }
  6385. function genComment(comment) {
  6386. return "_e(".concat(JSON.stringify(comment.text), ")");
  6387. }
  6388. function genSlot(el, state) {
  6389. var slotName = el.slotName || '"default"';
  6390. var children = genChildren(el, state);
  6391. var res = "_t(".concat(slotName).concat(children ? ",function(){return ".concat(children, "}") : '');
  6392. var attrs = el.attrs || el.dynamicAttrs
  6393. ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
  6394. // slot props are camelized
  6395. name: camelize(attr.name),
  6396. value: attr.value,
  6397. dynamic: attr.dynamic
  6398. }); }))
  6399. : null;
  6400. var bind = el.attrsMap['v-bind'];
  6401. if ((attrs || bind) && !children) {
  6402. res += ",null";
  6403. }
  6404. if (attrs) {
  6405. res += ",".concat(attrs);
  6406. }
  6407. if (bind) {
  6408. res += "".concat(attrs ? '' : ',null', ",").concat(bind);
  6409. }
  6410. return res + ')';
  6411. }
  6412. // componentName is el.component, take it as argument to shun flow's pessimistic refinement
  6413. function genComponent(componentName, el, state) {
  6414. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  6415. return "_c(".concat(componentName, ",").concat(genData(el, state)).concat(children ? ",".concat(children) : '', ")");
  6416. }
  6417. function genProps(props) {
  6418. var staticProps = "";
  6419. var dynamicProps = "";
  6420. for (var i = 0; i < props.length; i++) {
  6421. var prop = props[i];
  6422. var value = transformSpecialNewlines(prop.value);
  6423. if (prop.dynamic) {
  6424. dynamicProps += "".concat(prop.name, ",").concat(value, ",");
  6425. }
  6426. else {
  6427. staticProps += "\"".concat(prop.name, "\":").concat(value, ",");
  6428. }
  6429. }
  6430. staticProps = "{".concat(staticProps.slice(0, -1), "}");
  6431. if (dynamicProps) {
  6432. return "_d(".concat(staticProps, ",[").concat(dynamicProps.slice(0, -1), "])");
  6433. }
  6434. else {
  6435. return staticProps;
  6436. }
  6437. }
  6438. // #3895, #4268
  6439. function transformSpecialNewlines(text) {
  6440. return text.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
  6441. }
  6442. var plainStringRE = /^"(?:[^"\\]|\\.)*"$|^'(?:[^'\\]|\\.)*'$/;
  6443. // let the model AST transform translate v-model into appropriate
  6444. // props bindings
  6445. function applyModelTransform(el, state) {
  6446. if (el.directives) {
  6447. for (var i = 0; i < el.directives.length; i++) {
  6448. var dir = el.directives[i];
  6449. if (dir.name === 'model') {
  6450. state.directives.model(el, dir, state.warn);
  6451. // remove value for textarea as its converted to text
  6452. if (el.tag === 'textarea' && el.props) {
  6453. el.props = el.props.filter(function (p) { return p.name !== 'value'; });
  6454. }
  6455. break;
  6456. }
  6457. }
  6458. }
  6459. }
  6460. function genAttrSegments(attrs) {
  6461. return attrs.map(function (_a) {
  6462. var name = _a.name, value = _a.value;
  6463. return genAttrSegment(name, value);
  6464. });
  6465. }
  6466. function genDOMPropSegments(props, attrs) {
  6467. var segments = [];
  6468. props.forEach(function (_a) {
  6469. var name = _a.name, value = _a.value;
  6470. name = propsToAttrMap[name] || name.toLowerCase();
  6471. if (isRenderableAttr(name) &&
  6472. !(attrs && attrs.some(function (a) { return a.name === name; }))) {
  6473. segments.push(genAttrSegment(name, value));
  6474. }
  6475. });
  6476. return segments;
  6477. }
  6478. function genAttrSegment(name, value) {
  6479. if (plainStringRE.test(value)) {
  6480. // force double quote
  6481. value = value.replace(/^'|'$/g, '"');
  6482. // force enumerated attr to "true"
  6483. if (isEnumeratedAttr(name) && value !== "\"false\"") {
  6484. value = "\"true\"";
  6485. }
  6486. return {
  6487. type: RAW,
  6488. value: isBooleanAttr(name)
  6489. ? " ".concat(name, "=\"").concat(name, "\"")
  6490. : value === '""'
  6491. ? " ".concat(name)
  6492. : " ".concat(name, "=\"").concat(JSON.parse(value), "\"")
  6493. };
  6494. }
  6495. else {
  6496. return {
  6497. type: EXPRESSION,
  6498. value: "_ssrAttr(".concat(JSON.stringify(name), ",").concat(value, ")")
  6499. };
  6500. }
  6501. }
  6502. function genClassSegments(staticClass, classBinding) {
  6503. if (staticClass && !classBinding) {
  6504. return [{ type: RAW, value: " class=\"".concat(JSON.parse(staticClass), "\"") }];
  6505. }
  6506. else {
  6507. return [
  6508. {
  6509. type: EXPRESSION,
  6510. value: "_ssrClass(".concat(staticClass || 'null', ",").concat(classBinding || 'null', ")")
  6511. }
  6512. ];
  6513. }
  6514. }
  6515. function genStyleSegments(staticStyle, parsedStaticStyle, styleBinding, vShowExpression) {
  6516. if (staticStyle && !styleBinding && !vShowExpression) {
  6517. return [{ type: RAW, value: " style=".concat(JSON.stringify(staticStyle)) }];
  6518. }
  6519. else {
  6520. return [
  6521. {
  6522. type: EXPRESSION,
  6523. value: "_ssrStyle(".concat(parsedStaticStyle || 'null', ",").concat(styleBinding || 'null', ", ").concat(vShowExpression
  6524. ? "{ display: (".concat(vShowExpression, ") ? '' : 'none' }")
  6525. : 'null', ")")
  6526. }
  6527. ];
  6528. }
  6529. }
  6530. /**
  6531. * In SSR, the vdom tree is generated only once and never patched, so
  6532. * we can optimize most element / trees into plain string render functions.
  6533. * The SSR optimizer walks the AST tree to detect optimizable elements and trees.
  6534. *
  6535. * The criteria for SSR optimizability is quite a bit looser than static tree
  6536. * detection (which is designed for client re-render). In SSR we bail only for
  6537. * components/slots/custom directives.
  6538. */
  6539. // optimizability constants
  6540. var optimizability = {
  6541. FALSE: 0,
  6542. FULL: 1,
  6543. SELF: 2,
  6544. CHILDREN: 3,
  6545. PARTIAL: 4 // self un-optimizable with some un-optimizable children
  6546. };
  6547. var isPlatformReservedTag;
  6548. function optimize(root, options) {
  6549. if (!root)
  6550. return;
  6551. isPlatformReservedTag = options.isReservedTag || no;
  6552. walk(root, true);
  6553. }
  6554. function walk(node, isRoot) {
  6555. if (isUnOptimizableTree(node)) {
  6556. node.ssrOptimizability = optimizability.FALSE;
  6557. return;
  6558. }
  6559. // root node or nodes with custom directives should always be a VNode
  6560. var selfUnoptimizable = isRoot || hasCustomDirective(node);
  6561. var check = function (child) {
  6562. if (child.ssrOptimizability !== optimizability.FULL) {
  6563. node.ssrOptimizability = selfUnoptimizable
  6564. ? optimizability.PARTIAL
  6565. : optimizability.SELF;
  6566. }
  6567. };
  6568. if (selfUnoptimizable) {
  6569. node.ssrOptimizability = optimizability.CHILDREN;
  6570. }
  6571. if (node.type === 1) {
  6572. for (var i = 0, l = node.children.length; i < l; i++) {
  6573. var child = node.children[i];
  6574. walk(child);
  6575. check(child);
  6576. }
  6577. if (node.ifConditions) {
  6578. for (var i = 1, l = node.ifConditions.length; i < l; i++) {
  6579. var block = node.ifConditions[i].block;
  6580. walk(block, isRoot);
  6581. check(block);
  6582. }
  6583. }
  6584. if (node.ssrOptimizability == null ||
  6585. (!isRoot && (node.attrsMap['v-html'] || node.attrsMap['v-text']))) {
  6586. node.ssrOptimizability = optimizability.FULL;
  6587. }
  6588. else {
  6589. node.children = optimizeSiblings(node);
  6590. }
  6591. }
  6592. else {
  6593. node.ssrOptimizability = optimizability.FULL;
  6594. }
  6595. }
  6596. function optimizeSiblings(el) {
  6597. var children = el.children;
  6598. var optimizedChildren = [];
  6599. var currentOptimizableGroup = [];
  6600. var pushGroup = function () {
  6601. if (currentOptimizableGroup.length) {
  6602. optimizedChildren.push({
  6603. type: 1,
  6604. parent: el,
  6605. tag: 'template',
  6606. attrsList: [],
  6607. attrsMap: {},
  6608. rawAttrsMap: {},
  6609. children: currentOptimizableGroup,
  6610. ssrOptimizability: optimizability.FULL
  6611. });
  6612. }
  6613. currentOptimizableGroup = [];
  6614. };
  6615. for (var i = 0; i < children.length; i++) {
  6616. var c = children[i];
  6617. if (c.ssrOptimizability === optimizability.FULL) {
  6618. currentOptimizableGroup.push(c);
  6619. }
  6620. else {
  6621. // wrap fully-optimizable adjacent siblings inside a template tag
  6622. // so that they can be optimized into a single ssrNode by codegen
  6623. pushGroup();
  6624. optimizedChildren.push(c);
  6625. }
  6626. }
  6627. pushGroup();
  6628. return optimizedChildren;
  6629. }
  6630. function isUnOptimizableTree(node) {
  6631. if (node.type === 2 || node.type === 3) {
  6632. // text or expression
  6633. return false;
  6634. }
  6635. return (isBuiltInTag(node.tag) || // built-in (slot, component)
  6636. !isPlatformReservedTag(node.tag) || // custom component
  6637. !!node.component || // "is" component
  6638. isSelectWithModel(node) // <select v-model> requires runtime inspection
  6639. );
  6640. }
  6641. var isBuiltInDir = makeMap('text,html,show,on,bind,model,pre,cloak,once');
  6642. function hasCustomDirective(node) {
  6643. return (node.type === 1 &&
  6644. node.directives &&
  6645. node.directives.some(function (d) { return !isBuiltInDir(d.name); }));
  6646. }
  6647. // <select v-model> cannot be optimized because it requires a runtime check
  6648. // to determine proper selected option
  6649. function isSelectWithModel(node) {
  6650. return (node.type === 1 &&
  6651. node.tag === 'select' &&
  6652. node.directives != null &&
  6653. node.directives.some(function (d) { return d.name === 'model'; }));
  6654. }
  6655. // The SSR codegen is essentially extending the default codegen to handle
  6656. // segment types
  6657. var RAW = 0;
  6658. var INTERPOLATION = 1;
  6659. var EXPRESSION = 2;
  6660. function generate(ast, options) {
  6661. var state = new CodegenState(options);
  6662. var code = ast ? genSSRElement(ast, state) : '_c("div")';
  6663. return {
  6664. render: "with(this){return ".concat(code, "}"),
  6665. staticRenderFns: state.staticRenderFns
  6666. };
  6667. }
  6668. function genSSRElement(el, state) {
  6669. if (el.for && !el.forProcessed) {
  6670. return genFor(el, state, genSSRElement);
  6671. }
  6672. else if (el.if && !el.ifProcessed) {
  6673. return genIf(el, state, genSSRElement);
  6674. }
  6675. else if (el.tag === 'template' && !el.slotTarget) {
  6676. return el.ssrOptimizability === optimizability.FULL
  6677. ? genChildrenAsStringNode(el, state)
  6678. : genSSRChildren(el, state) || 'void 0';
  6679. }
  6680. switch (el.ssrOptimizability) {
  6681. case optimizability.FULL:
  6682. // stringify whole tree
  6683. return genStringElement(el, state);
  6684. case optimizability.SELF:
  6685. // stringify self and check children
  6686. return genStringElementWithChildren(el, state);
  6687. case optimizability.CHILDREN:
  6688. // generate self as VNode and stringify children
  6689. return genNormalElement(el, state, true);
  6690. case optimizability.PARTIAL:
  6691. // generate self as VNode and check children
  6692. return genNormalElement(el, state, false);
  6693. default:
  6694. // bail whole tree
  6695. return genElement(el, state);
  6696. }
  6697. }
  6698. function genNormalElement(el, state, stringifyChildren) {
  6699. var data = el.plain ? undefined : genData(el, state);
  6700. var children = stringifyChildren
  6701. ? "[".concat(genChildrenAsStringNode(el, state), "]")
  6702. : genSSRChildren(el, state, true);
  6703. return "_c('".concat(el.tag, "'").concat(data ? ",".concat(data) : '').concat(children ? ",".concat(children) : '', ")");
  6704. }
  6705. function genSSRChildren(el, state, checkSkip) {
  6706. return genChildren(el, state, checkSkip, genSSRElement, genSSRNode);
  6707. }
  6708. function genSSRNode(el, state) {
  6709. return el.type === 1 ? genSSRElement(el, state) : genText(el);
  6710. }
  6711. function genChildrenAsStringNode(el, state) {
  6712. return el.children.length
  6713. ? "_ssrNode(".concat(flattenSegments(childrenToSegments(el, state)), ")")
  6714. : '';
  6715. }
  6716. function genStringElement(el, state) {
  6717. return "_ssrNode(".concat(elementToString(el, state), ")");
  6718. }
  6719. function genStringElementWithChildren(el, state) {
  6720. var children = genSSRChildren(el, state, true);
  6721. return "_ssrNode(".concat(flattenSegments(elementToOpenTagSegments(el, state)), ",\"</").concat(el.tag, ">\"").concat(children ? ",".concat(children) : '', ")");
  6722. }
  6723. function elementToString(el, state) {
  6724. return "(".concat(flattenSegments(elementToSegments(el, state)), ")");
  6725. }
  6726. function elementToSegments(el, state) {
  6727. // v-for / v-if
  6728. if (el.for && !el.forProcessed) {
  6729. el.forProcessed = true;
  6730. return [
  6731. {
  6732. type: EXPRESSION,
  6733. value: genFor(el, state, elementToString, '_ssrList')
  6734. }
  6735. ];
  6736. }
  6737. else if (el.if && !el.ifProcessed) {
  6738. el.ifProcessed = true;
  6739. return [
  6740. {
  6741. type: EXPRESSION,
  6742. value: genIf(el, state, elementToString, '"<!---->"')
  6743. }
  6744. ];
  6745. }
  6746. else if (el.tag === 'template') {
  6747. return childrenToSegments(el, state);
  6748. }
  6749. var openSegments = elementToOpenTagSegments(el, state);
  6750. var childrenSegments = childrenToSegments(el, state);
  6751. var isUnaryTag = state.options.isUnaryTag;
  6752. var close = isUnaryTag && isUnaryTag(el.tag)
  6753. ? []
  6754. : [{ type: RAW, value: "</".concat(el.tag, ">") }];
  6755. return openSegments.concat(childrenSegments, close);
  6756. }
  6757. function elementToOpenTagSegments(el, state) {
  6758. applyModelTransform(el, state);
  6759. var binding;
  6760. var segments = [{ type: RAW, value: "<".concat(el.tag) }];
  6761. // attrs
  6762. if (el.attrs) {
  6763. segments.push.apply(segments, genAttrSegments(el.attrs));
  6764. }
  6765. // domProps
  6766. if (el.props) {
  6767. segments.push.apply(segments, genDOMPropSegments(el.props, el.attrs));
  6768. }
  6769. // v-bind="object"
  6770. if ((binding = el.attrsMap['v-bind'])) {
  6771. segments.push({ type: EXPRESSION, value: "_ssrAttrs(".concat(binding, ")") });
  6772. }
  6773. // v-bind.prop="object"
  6774. if ((binding = el.attrsMap['v-bind.prop'])) {
  6775. segments.push({ type: EXPRESSION, value: "_ssrDOMProps(".concat(binding, ")") });
  6776. }
  6777. // class
  6778. if (el.staticClass || el.classBinding) {
  6779. segments.push.apply(segments, genClassSegments(el.staticClass, el.classBinding));
  6780. }
  6781. // style & v-show
  6782. if (el.staticStyle || el.styleBinding || el.attrsMap['v-show']) {
  6783. segments.push.apply(segments, genStyleSegments(el.attrsMap.style, el.staticStyle, el.styleBinding, el.attrsMap['v-show']));
  6784. }
  6785. // _scopedId
  6786. if (state.options.scopeId) {
  6787. segments.push({ type: RAW, value: " ".concat(state.options.scopeId) });
  6788. }
  6789. segments.push({ type: RAW, value: ">" });
  6790. return segments;
  6791. }
  6792. function childrenToSegments(el, state) {
  6793. var binding;
  6794. if ((binding = el.attrsMap['v-html'])) {
  6795. return [{ type: EXPRESSION, value: "_s(".concat(binding, ")") }];
  6796. }
  6797. if ((binding = el.attrsMap['v-text'])) {
  6798. return [{ type: INTERPOLATION, value: "_s(".concat(binding, ")") }];
  6799. }
  6800. if (el.tag === 'textarea' && (binding = el.attrsMap['v-model'])) {
  6801. return [{ type: INTERPOLATION, value: "_s(".concat(binding, ")") }];
  6802. }
  6803. return el.children ? nodesToSegments(el.children, state) : [];
  6804. }
  6805. function nodesToSegments(children, state) {
  6806. var segments = [];
  6807. for (var i = 0; i < children.length; i++) {
  6808. var c = children[i];
  6809. if (c.type === 1) {
  6810. segments.push.apply(segments, elementToSegments(c, state));
  6811. }
  6812. else if (c.type === 2) {
  6813. segments.push({ type: INTERPOLATION, value: c.expression });
  6814. }
  6815. else if (c.type === 3) {
  6816. var text = escape(c.text);
  6817. if (c.isComment) {
  6818. text = '<!--' + text + '-->';
  6819. }
  6820. segments.push({ type: RAW, value: text });
  6821. }
  6822. }
  6823. return segments;
  6824. }
  6825. function flattenSegments(segments) {
  6826. var mergedSegments = [];
  6827. var textBuffer = '';
  6828. var pushBuffer = function () {
  6829. if (textBuffer) {
  6830. mergedSegments.push(JSON.stringify(textBuffer));
  6831. textBuffer = '';
  6832. }
  6833. };
  6834. for (var i = 0; i < segments.length; i++) {
  6835. var s = segments[i];
  6836. if (s.type === RAW) {
  6837. textBuffer += s.value;
  6838. }
  6839. else if (s.type === INTERPOLATION) {
  6840. pushBuffer();
  6841. mergedSegments.push("_ssrEscape(".concat(s.value, ")"));
  6842. }
  6843. else if (s.type === EXPRESSION) {
  6844. pushBuffer();
  6845. mergedSegments.push("(".concat(s.value, ")"));
  6846. }
  6847. }
  6848. pushBuffer();
  6849. return mergedSegments.join('+');
  6850. }
  6851. // these keywords should not appear inside expressions, but operators like
  6852. // typeof, instanceof and in are allowed
  6853. var prohibitedKeywordRE = new RegExp('\\b' +
  6854. ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  6855. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  6856. 'extends,finally,continue,debugger,function,arguments')
  6857. .split(',')
  6858. .join('\\b|\\b') +
  6859. '\\b');
  6860. // these unary operators should not be used as property/method names
  6861. var unaryOperatorsRE = new RegExp('\\b' +
  6862. 'delete,typeof,void'.split(',').join('\\s*\\([^\\)]*\\)|\\b') +
  6863. '\\s*\\([^\\)]*\\)');
  6864. // strip strings in expressions
  6865. var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  6866. // detect problematic expressions in a template
  6867. function detectErrors(ast, warn) {
  6868. if (ast) {
  6869. checkNode(ast, warn);
  6870. }
  6871. }
  6872. function checkNode(node, warn) {
  6873. if (node.type === 1) {
  6874. for (var name_1 in node.attrsMap) {
  6875. if (dirRE.test(name_1)) {
  6876. var value = node.attrsMap[name_1];
  6877. if (value) {
  6878. var range = node.rawAttrsMap[name_1];
  6879. if (name_1 === 'v-for') {
  6880. checkFor(node, "v-for=\"".concat(value, "\""), warn, range);
  6881. }
  6882. else if (name_1 === 'v-slot' || name_1[0] === '#') {
  6883. checkFunctionParameterExpression(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
  6884. }
  6885. else if (onRE.test(name_1)) {
  6886. checkEvent(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
  6887. }
  6888. else {
  6889. checkExpression(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);
  6890. }
  6891. }
  6892. }
  6893. }
  6894. if (node.children) {
  6895. for (var i = 0; i < node.children.length; i++) {
  6896. checkNode(node.children[i], warn);
  6897. }
  6898. }
  6899. }
  6900. else if (node.type === 2) {
  6901. checkExpression(node.expression, node.text, warn, node);
  6902. }
  6903. }
  6904. function checkEvent(exp, text, warn, range) {
  6905. var stripped = exp.replace(stripStringRE, '');
  6906. var keywordMatch = stripped.match(unaryOperatorsRE);
  6907. if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
  6908. warn("avoid using JavaScript unary operator as property name: " +
  6909. "\"".concat(keywordMatch[0], "\" in expression ").concat(text.trim()), range);
  6910. }
  6911. checkExpression(exp, text, warn, range);
  6912. }
  6913. function checkFor(node, text, warn, range) {
  6914. checkExpression(node.for || '', text, warn, range);
  6915. checkIdentifier(node.alias, 'v-for alias', text, warn, range);
  6916. checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);
  6917. checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);
  6918. }
  6919. function checkIdentifier(ident, type, text, warn, range) {
  6920. if (typeof ident === 'string') {
  6921. try {
  6922. new Function("var ".concat(ident, "=_"));
  6923. }
  6924. catch (e) {
  6925. warn("invalid ".concat(type, " \"").concat(ident, "\" in expression: ").concat(text.trim()), range);
  6926. }
  6927. }
  6928. }
  6929. function checkExpression(exp, text, warn, range) {
  6930. try {
  6931. new Function("return ".concat(exp));
  6932. }
  6933. catch (e) {
  6934. var keywordMatch = exp
  6935. .replace(stripStringRE, '')
  6936. .match(prohibitedKeywordRE);
  6937. if (keywordMatch) {
  6938. warn("avoid using JavaScript keyword as property name: " +
  6939. "\"".concat(keywordMatch[0], "\"\n Raw expression: ").concat(text.trim()), range);
  6940. }
  6941. else {
  6942. warn("invalid expression: ".concat(e.message, " in\n\n") +
  6943. " ".concat(exp, "\n\n") +
  6944. " Raw expression: ".concat(text.trim(), "\n"), range);
  6945. }
  6946. }
  6947. }
  6948. function checkFunctionParameterExpression(exp, text, warn, range) {
  6949. try {
  6950. new Function(exp, '');
  6951. }
  6952. catch (e) {
  6953. warn("invalid function parameter expression: ".concat(e.message, " in\n\n") +
  6954. " ".concat(exp, "\n\n") +
  6955. " Raw expression: ".concat(text.trim(), "\n"), range);
  6956. }
  6957. }
  6958. var range = 2;
  6959. function generateCodeFrame(source, start, end) {
  6960. if (start === void 0) { start = 0; }
  6961. if (end === void 0) { end = source.length; }
  6962. var lines = source.split(/\r?\n/);
  6963. var count = 0;
  6964. var res = [];
  6965. for (var i = 0; i < lines.length; i++) {
  6966. count += lines[i].length + 1;
  6967. if (count >= start) {
  6968. for (var j = i - range; j <= i + range || end > count; j++) {
  6969. if (j < 0 || j >= lines.length)
  6970. continue;
  6971. res.push("".concat(j + 1).concat(repeat(" ", 3 - String(j + 1).length), "| ").concat(lines[j]));
  6972. var lineLength = lines[j].length;
  6973. if (j === i) {
  6974. // push underline
  6975. var pad = start - (count - lineLength) + 1;
  6976. var length_1 = end > count ? lineLength - pad : end - start;
  6977. res.push(" | " + repeat(" ", pad) + repeat("^", length_1));
  6978. }
  6979. else if (j > i) {
  6980. if (end > count) {
  6981. var length_2 = Math.min(end - count, lineLength);
  6982. res.push(" | " + repeat("^", length_2));
  6983. }
  6984. count += lineLength + 1;
  6985. }
  6986. }
  6987. break;
  6988. }
  6989. }
  6990. return res.join('\n');
  6991. }
  6992. function repeat(str, n) {
  6993. var result = '';
  6994. if (n > 0) {
  6995. // eslint-disable-next-line no-constant-condition
  6996. while (true) {
  6997. // eslint-disable-line
  6998. if (n & 1)
  6999. result += str;
  7000. n >>>= 1;
  7001. if (n <= 0)
  7002. break;
  7003. str += str;
  7004. }
  7005. }
  7006. return result;
  7007. }
  7008. function createFunction(code, errors) {
  7009. try {
  7010. return new Function(code);
  7011. }
  7012. catch (err) {
  7013. errors.push({ err: err, code: code });
  7014. return noop$1;
  7015. }
  7016. }
  7017. function createCompileToFunctionFn(compile) {
  7018. var cache = Object.create(null);
  7019. return function compileToFunctions(template, options, vm) {
  7020. options = extend({}, options);
  7021. var warn = options.warn || warn$2;
  7022. delete options.warn;
  7023. /* istanbul ignore if */
  7024. {
  7025. // detect possible CSP restriction
  7026. try {
  7027. new Function('return 1');
  7028. }
  7029. catch (e) {
  7030. if (e.toString().match(/unsafe-eval|CSP/)) {
  7031. warn('It seems you are using the standalone build of Vue.js in an ' +
  7032. 'environment with Content Security Policy that prohibits unsafe-eval. ' +
  7033. 'The template compiler cannot work in this environment. Consider ' +
  7034. 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
  7035. 'templates into render functions.');
  7036. }
  7037. }
  7038. }
  7039. // check cache
  7040. var key = options.delimiters
  7041. ? String(options.delimiters) + template
  7042. : template;
  7043. if (cache[key]) {
  7044. return cache[key];
  7045. }
  7046. // compile
  7047. var compiled = compile(template, options);
  7048. // check compilation errors/tips
  7049. {
  7050. if (compiled.errors && compiled.errors.length) {
  7051. if (options.outputSourceRange) {
  7052. compiled.errors.forEach(function (e) {
  7053. warn("Error compiling template:\n\n".concat(e.msg, "\n\n") +
  7054. generateCodeFrame(template, e.start, e.end), vm);
  7055. });
  7056. }
  7057. else {
  7058. warn("Error compiling template:\n\n".concat(template, "\n\n") +
  7059. compiled.errors.map(function (e) { return "- ".concat(e); }).join('\n') +
  7060. '\n', vm);
  7061. }
  7062. }
  7063. if (compiled.tips && compiled.tips.length) {
  7064. if (options.outputSourceRange) {
  7065. compiled.tips.forEach(function (e) { return tip(e.msg, vm); });
  7066. }
  7067. else {
  7068. compiled.tips.forEach(function (msg) { return tip(msg, vm); });
  7069. }
  7070. }
  7071. }
  7072. // turn code into functions
  7073. var res = {};
  7074. var fnGenErrors = [];
  7075. res.render = createFunction(compiled.render, fnGenErrors);
  7076. res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
  7077. return createFunction(code, fnGenErrors);
  7078. });
  7079. // check function generation errors.
  7080. // this should only happen if there is a bug in the compiler itself.
  7081. // mostly for codegen development use
  7082. /* istanbul ignore if */
  7083. {
  7084. if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
  7085. warn("Failed to generate render function:\n\n" +
  7086. fnGenErrors
  7087. .map(function (_a) {
  7088. var err = _a.err, code = _a.code;
  7089. return "".concat(err.toString(), " in\n\n").concat(code, "\n");
  7090. })
  7091. .join('\n'), vm);
  7092. }
  7093. }
  7094. return (cache[key] = res);
  7095. };
  7096. }
  7097. function createCompilerCreator(baseCompile) {
  7098. return function createCompiler(baseOptions) {
  7099. function compile(template, options) {
  7100. var finalOptions = Object.create(baseOptions);
  7101. var errors = [];
  7102. var tips = [];
  7103. var warn = function (msg, range, tip) {
  7104. (tip ? tips : errors).push(msg);
  7105. };
  7106. if (options) {
  7107. if (options.outputSourceRange) {
  7108. // $flow-disable-line
  7109. var leadingSpaceLength_1 = template.match(/^\s*/)[0].length;
  7110. warn = function (msg, range, tip) {
  7111. var data = typeof msg === 'string' ? { msg: msg } : msg;
  7112. if (range) {
  7113. if (range.start != null) {
  7114. data.start = range.start + leadingSpaceLength_1;
  7115. }
  7116. if (range.end != null) {
  7117. data.end = range.end + leadingSpaceLength_1;
  7118. }
  7119. }
  7120. (tip ? tips : errors).push(data);
  7121. };
  7122. }
  7123. // merge custom modules
  7124. if (options.modules) {
  7125. finalOptions.modules = (baseOptions.modules || []).concat(options.modules);
  7126. }
  7127. // merge custom directives
  7128. if (options.directives) {
  7129. finalOptions.directives = extend(Object.create(baseOptions.directives || null), options.directives);
  7130. }
  7131. // copy other options
  7132. for (var key in options) {
  7133. if (key !== 'modules' && key !== 'directives') {
  7134. finalOptions[key] = options[key];
  7135. }
  7136. }
  7137. }
  7138. finalOptions.warn = warn;
  7139. var compiled = baseCompile(template.trim(), finalOptions);
  7140. {
  7141. detectErrors(compiled.ast, warn);
  7142. }
  7143. compiled.errors = errors;
  7144. compiled.tips = tips;
  7145. return compiled;
  7146. }
  7147. return {
  7148. compile: compile,
  7149. compileToFunctions: createCompileToFunctionFn(compile)
  7150. };
  7151. };
  7152. }
  7153. var createCompiler = createCompilerCreator(function baseCompile(template, options) {
  7154. var ast = parse(template.trim(), options);
  7155. optimize(ast, options);
  7156. var code = generate(ast, options);
  7157. return {
  7158. ast: ast,
  7159. render: code.render,
  7160. staticRenderFns: code.staticRenderFns
  7161. };
  7162. });
  7163. var _a = createCompiler(baseOptions), compileToFunctions = _a.compileToFunctions;
  7164. var ssrHelpers = {
  7165. _ssrEscape: escape,
  7166. _ssrNode: renderStringNode$1,
  7167. _ssrList: renderStringList,
  7168. _ssrAttr: renderAttr,
  7169. _ssrAttrs: renderAttrs,
  7170. _ssrDOMProps: renderDOMProps,
  7171. _ssrClass: renderSSRClass,
  7172. _ssrStyle: renderSSRStyle
  7173. };
  7174. function installSSRHelpers(vm) {
  7175. if (vm._ssrNode) {
  7176. return;
  7177. }
  7178. var Vue = vm.constructor;
  7179. // @ts-expect-error
  7180. while (Vue.super) {
  7181. // @ts-expect-error
  7182. Vue = Vue.super;
  7183. }
  7184. extend(Vue.prototype, ssrHelpers);
  7185. // @ts-expect-error
  7186. if (Vue.FunctionalRenderContext) {
  7187. // @ts-expect-error
  7188. extend(Vue.FunctionalRenderContext.prototype, ssrHelpers);
  7189. }
  7190. }
  7191. var StringNode = /** @class */ (function () {
  7192. function StringNode(open, close, children, normalizationType) {
  7193. this.isString = true;
  7194. this.open = open;
  7195. this.close = close;
  7196. if (children) {
  7197. this.children =
  7198. normalizationType === 1
  7199. ? simpleNormalizeChildren(children)
  7200. : normalizationType === 2
  7201. ? normalizeChildren(children)
  7202. : children;
  7203. }
  7204. else {
  7205. this.children = void 0;
  7206. }
  7207. }
  7208. return StringNode;
  7209. }());
  7210. function renderStringNode$1(open, close, children, normalizationType) {
  7211. return new StringNode(open, close, children, normalizationType);
  7212. }
  7213. function renderStringList(val, render) {
  7214. var ret = '';
  7215. var i, l, keys, key;
  7216. if (Array.isArray(val) || typeof val === 'string') {
  7217. for (i = 0, l = val.length; i < l; i++) {
  7218. ret += render(val[i], i);
  7219. }
  7220. }
  7221. else if (typeof val === 'number') {
  7222. for (i = 0; i < val; i++) {
  7223. ret += render(i + 1, i);
  7224. }
  7225. }
  7226. else if (isObject(val)) {
  7227. keys = Object.keys(val);
  7228. for (i = 0, l = keys.length; i < l; i++) {
  7229. key = keys[i];
  7230. ret += render(val[key], key, i);
  7231. }
  7232. }
  7233. return ret;
  7234. }
  7235. function renderAttrs(obj) {
  7236. var res = '';
  7237. for (var key in obj) {
  7238. if (isSSRUnsafeAttr(key)) {
  7239. continue;
  7240. }
  7241. res += renderAttr(key, obj[key]);
  7242. }
  7243. return res;
  7244. }
  7245. function renderDOMProps(obj) {
  7246. var res = '';
  7247. for (var key in obj) {
  7248. var attr = propsToAttrMap[key] || key.toLowerCase();
  7249. if (isRenderableAttr(attr)) {
  7250. res += renderAttr(attr, obj[key]);
  7251. }
  7252. }
  7253. return res;
  7254. }
  7255. function renderSSRClass(staticClass, dynamic) {
  7256. var res = renderClass$1(staticClass, dynamic);
  7257. return res === '' ? res : " class=\"".concat(escape(res), "\"");
  7258. }
  7259. function renderSSRStyle(staticStyle, dynamic, extra) {
  7260. var style = {};
  7261. if (staticStyle)
  7262. extend(style, staticStyle);
  7263. if (dynamic)
  7264. extend(style, normalizeStyleBinding(dynamic));
  7265. if (extra)
  7266. extend(style, extra);
  7267. var res = genStyle(style);
  7268. return res === '' ? res : " style=".concat(JSON.stringify(escape(res)));
  7269. }
  7270. var warned = Object.create(null);
  7271. var warnOnce = function (msg) {
  7272. if (!warned[msg]) {
  7273. warned[msg] = true;
  7274. // eslint-disable-next-line no-console
  7275. console.warn("\n\u001B[31m".concat(msg, "\u001B[39m\n"));
  7276. }
  7277. };
  7278. var onCompilationError = function (err, vm) {
  7279. var trace = vm ? generateComponentTrace(vm) : '';
  7280. throw new Error("\n\u001B[31m".concat(err).concat(trace, "\u001B[39m\n"));
  7281. };
  7282. var normalizeRender = function (vm) {
  7283. var _a = vm.$options, render = _a.render, template = _a.template, _scopeId = _a._scopeId;
  7284. if (isUndef(render)) {
  7285. if (template) {
  7286. var compiled = compileToFunctions(template, {
  7287. scopeId: _scopeId,
  7288. warn: onCompilationError
  7289. }, vm);
  7290. vm.$options.render = compiled.render;
  7291. vm.$options.staticRenderFns = compiled.staticRenderFns;
  7292. }
  7293. else {
  7294. throw new Error("render function or template not defined in component: ".concat(vm.$options.name || vm.$options._componentTag || 'anonymous'));
  7295. }
  7296. }
  7297. };
  7298. function waitForServerPrefetch(vm, resolve, reject) {
  7299. var handlers = vm.$options.serverPrefetch;
  7300. if (isDef(handlers)) {
  7301. if (!Array.isArray(handlers))
  7302. handlers = [handlers];
  7303. try {
  7304. var promises = [];
  7305. for (var i = 0, j = handlers.length; i < j; i++) {
  7306. var result = handlers[i].call(vm, vm);
  7307. if (result && typeof result.then === 'function') {
  7308. promises.push(result);
  7309. }
  7310. }
  7311. Promise.all(promises).then(resolve).catch(reject);
  7312. return;
  7313. }
  7314. catch (e) {
  7315. reject(e);
  7316. }
  7317. }
  7318. resolve();
  7319. }
  7320. function renderNode(node, isRoot, context) {
  7321. if (node.isString) {
  7322. renderStringNode(node, context);
  7323. }
  7324. else if (isDef(node.componentOptions)) {
  7325. renderComponent(node, isRoot, context);
  7326. }
  7327. else if (isDef(node.tag)) {
  7328. renderElement(node, isRoot, context);
  7329. }
  7330. else if (isTrue(node.isComment)) {
  7331. if (isDef(node.asyncFactory)) {
  7332. // async component
  7333. renderAsyncComponent(node, isRoot, context);
  7334. }
  7335. else {
  7336. context.write("<!--".concat(node.text, "-->"), context.next);
  7337. }
  7338. }
  7339. else {
  7340. context.write(node.raw ? node.text : escape(String(node.text)), context.next);
  7341. }
  7342. }
  7343. function registerComponentForCache(options, write) {
  7344. // exposed by vue-loader, need to call this if cache hit because
  7345. // component lifecycle hooks will not be called.
  7346. var register = options._ssrRegister;
  7347. if (write.caching && isDef(register)) {
  7348. write.componentBuffer[write.componentBuffer.length - 1].add(register);
  7349. }
  7350. return register;
  7351. }
  7352. function renderComponent(node, isRoot, context) {
  7353. var write = context.write, next = context.next, userContext = context.userContext;
  7354. // check cache hit
  7355. var Ctor = node.componentOptions.Ctor;
  7356. var getKey = Ctor.options.serverCacheKey;
  7357. var name = Ctor.options.name;
  7358. var cache = context.cache;
  7359. var registerComponent = registerComponentForCache(Ctor.options, write);
  7360. if (isDef(getKey) && isDef(cache) && isDef(name)) {
  7361. var rawKey = getKey(node.componentOptions.propsData);
  7362. if (rawKey === false) {
  7363. renderComponentInner(node, isRoot, context);
  7364. return;
  7365. }
  7366. var key_1 = name + '::' + rawKey;
  7367. var has = context.has, get_1 = context.get;
  7368. if (isDef(has)) {
  7369. has(key_1, function (hit) {
  7370. if (hit === true && isDef(get_1)) {
  7371. get_1(key_1, function (res) {
  7372. if (isDef(registerComponent)) {
  7373. registerComponent(userContext);
  7374. }
  7375. res.components.forEach(function (register) { return register(userContext); });
  7376. write(res.html, next);
  7377. });
  7378. }
  7379. else {
  7380. renderComponentWithCache(node, isRoot, key_1, context);
  7381. }
  7382. });
  7383. }
  7384. else if (isDef(get_1)) {
  7385. get_1(key_1, function (res) {
  7386. if (isDef(res)) {
  7387. if (isDef(registerComponent)) {
  7388. registerComponent(userContext);
  7389. }
  7390. res.components.forEach(function (register) { return register(userContext); });
  7391. write(res.html, next);
  7392. }
  7393. else {
  7394. renderComponentWithCache(node, isRoot, key_1, context);
  7395. }
  7396. });
  7397. }
  7398. }
  7399. else {
  7400. if (isDef(getKey) && isUndef(cache)) {
  7401. warnOnce("[vue-server-renderer] Component ".concat(Ctor.options.name || '(anonymous)', " implemented serverCacheKey, ") +
  7402. 'but no cache was provided to the renderer.');
  7403. }
  7404. if (isDef(getKey) && isUndef(name)) {
  7405. warnOnce("[vue-server-renderer] Components that implement \"serverCacheKey\" " +
  7406. "must also define a unique \"name\" option.");
  7407. }
  7408. renderComponentInner(node, isRoot, context);
  7409. }
  7410. }
  7411. function renderComponentWithCache(node, isRoot, key, context) {
  7412. var write = context.write;
  7413. write.caching = true;
  7414. var buffer = write.cacheBuffer;
  7415. var bufferIndex = buffer.push('') - 1;
  7416. var componentBuffer = write.componentBuffer;
  7417. componentBuffer.push(new Set());
  7418. context.renderStates.push({
  7419. type: 'ComponentWithCache',
  7420. key: key,
  7421. buffer: buffer,
  7422. bufferIndex: bufferIndex,
  7423. componentBuffer: componentBuffer
  7424. });
  7425. renderComponentInner(node, isRoot, context);
  7426. }
  7427. function renderComponentInner(node, isRoot, context) {
  7428. var prevActive = context.activeInstance;
  7429. // expose userContext on vnode
  7430. node.ssrContext = context.userContext;
  7431. var child = (context.activeInstance = createComponentInstanceForVnode(node, context.activeInstance));
  7432. normalizeRender(child);
  7433. var resolve = function () {
  7434. var childNode = child._render();
  7435. childNode.parent = node;
  7436. context.renderStates.push({
  7437. type: 'Component',
  7438. prevActive: prevActive
  7439. });
  7440. if (isDef(node.data) && isDef(node.data.directives)) {
  7441. childNode.data = childNode.data || {};
  7442. childNode.data.directives = node.data.directives;
  7443. childNode.isComponentRootElement = true;
  7444. }
  7445. renderNode(childNode, isRoot, context);
  7446. };
  7447. var reject = context.done;
  7448. waitForServerPrefetch(child, resolve, reject);
  7449. }
  7450. function renderAsyncComponent(node, isRoot, context) {
  7451. var factory = node.asyncFactory;
  7452. var resolve = function (comp) {
  7453. if (comp.__esModule && comp.default) {
  7454. comp = comp.default;
  7455. }
  7456. var _a = node.asyncMeta, data = _a.data, children = _a.children, tag = _a.tag;
  7457. var nodeContext = node.asyncMeta.context;
  7458. var resolvedNode = createComponent(comp, data, nodeContext, children, tag);
  7459. if (resolvedNode) {
  7460. if (resolvedNode.componentOptions) {
  7461. // normal component
  7462. renderComponent(resolvedNode, isRoot, context);
  7463. }
  7464. else if (!Array.isArray(resolvedNode)) {
  7465. // single return node from functional component
  7466. renderNode(resolvedNode, isRoot, context);
  7467. }
  7468. else {
  7469. // multiple return nodes from functional component
  7470. context.renderStates.push({
  7471. type: 'Fragment',
  7472. children: resolvedNode,
  7473. rendered: 0,
  7474. total: resolvedNode.length
  7475. });
  7476. context.next();
  7477. }
  7478. }
  7479. else {
  7480. // invalid component, but this does not throw on the client
  7481. // so render empty comment node
  7482. context.write("<!---->", context.next);
  7483. }
  7484. };
  7485. if (factory.resolved) {
  7486. resolve(factory.resolved);
  7487. return;
  7488. }
  7489. var reject = context.done;
  7490. var res;
  7491. try {
  7492. res = factory(resolve, reject);
  7493. }
  7494. catch (e) {
  7495. reject(e);
  7496. }
  7497. if (res) {
  7498. if (typeof res.then === 'function') {
  7499. res.then(resolve, reject).catch(reject);
  7500. }
  7501. else {
  7502. // new syntax in 2.3
  7503. var comp = res.component;
  7504. if (comp && typeof comp.then === 'function') {
  7505. comp.then(resolve, reject).catch(reject);
  7506. }
  7507. }
  7508. }
  7509. }
  7510. function renderStringNode(el, context) {
  7511. var write = context.write, next = context.next;
  7512. if (isUndef(el.children) || el.children.length === 0) {
  7513. write(el.open + (el.close || ''), next);
  7514. }
  7515. else {
  7516. var children = el.children;
  7517. context.renderStates.push({
  7518. type: 'Element',
  7519. children: children,
  7520. rendered: 0,
  7521. total: children.length,
  7522. endTag: el.close
  7523. });
  7524. write(el.open, next);
  7525. }
  7526. }
  7527. function renderElement(el, isRoot, context) {
  7528. var write = context.write, next = context.next;
  7529. if (isTrue(isRoot)) {
  7530. if (!el.data)
  7531. el.data = {};
  7532. if (!el.data.attrs)
  7533. el.data.attrs = {};
  7534. el.data.attrs[SSR_ATTR] = 'true';
  7535. }
  7536. if (el.fnOptions) {
  7537. registerComponentForCache(el.fnOptions, write);
  7538. }
  7539. var startTag = renderStartingTag(el, context);
  7540. var endTag = "</".concat(el.tag, ">");
  7541. if (context.isUnaryTag(el.tag)) {
  7542. write(startTag, next);
  7543. }
  7544. else if (isUndef(el.children) || el.children.length === 0) {
  7545. write(startTag + endTag, next);
  7546. }
  7547. else {
  7548. var children = el.children;
  7549. context.renderStates.push({
  7550. type: 'Element',
  7551. children: children,
  7552. rendered: 0,
  7553. total: children.length,
  7554. endTag: endTag
  7555. });
  7556. write(startTag, next);
  7557. }
  7558. }
  7559. function hasAncestorData(node) {
  7560. var parentNode = node.parent;
  7561. return (isDef(parentNode) && (isDef(parentNode.data) || hasAncestorData(parentNode)));
  7562. }
  7563. function getVShowDirectiveInfo(node) {
  7564. var dir;
  7565. var tmp;
  7566. while (isDef(node)) {
  7567. if (node.data && node.data.directives) {
  7568. tmp = node.data.directives.find(function (dir) { return dir.name === 'show'; });
  7569. if (tmp) {
  7570. dir = tmp;
  7571. }
  7572. }
  7573. node = node.parent;
  7574. }
  7575. //@ts-expect-error
  7576. return dir;
  7577. }
  7578. function renderStartingTag(node, context) {
  7579. var markup = "<".concat(node.tag);
  7580. var directives = context.directives, modules = context.modules;
  7581. // construct synthetic data for module processing
  7582. // because modules like style also produce code by parent VNode data
  7583. if (isUndef(node.data) && hasAncestorData(node)) {
  7584. node.data = {};
  7585. }
  7586. if (isDef(node.data)) {
  7587. // check directives
  7588. var dirs = node.data.directives;
  7589. if (dirs) {
  7590. for (var i = 0; i < dirs.length; i++) {
  7591. var name_1 = dirs[i].name;
  7592. if (name_1 !== 'show') {
  7593. var dirRenderer = resolveAsset(context, 'directives', name_1);
  7594. if (dirRenderer) {
  7595. // directives mutate the node's data
  7596. // which then gets rendered by modules
  7597. dirRenderer(node.isComponentRootElement ? node.parent : node, dirs[i]);
  7598. }
  7599. }
  7600. }
  7601. }
  7602. // v-show directive needs to be merged from parent to child
  7603. var vshowDirectiveInfo = getVShowDirectiveInfo(node);
  7604. if (vshowDirectiveInfo) {
  7605. directives.show(node, vshowDirectiveInfo);
  7606. }
  7607. // apply other modules
  7608. for (var i = 0; i < modules.length; i++) {
  7609. var res = modules[i](node);
  7610. if (res) {
  7611. markup += res;
  7612. }
  7613. }
  7614. }
  7615. // attach scoped CSS ID
  7616. var scopeId;
  7617. var activeInstance = context.activeInstance;
  7618. if (isDef(activeInstance) &&
  7619. activeInstance !== node.context &&
  7620. isDef((scopeId = activeInstance.$options._scopeId))) {
  7621. markup += " ".concat(scopeId);
  7622. }
  7623. if (isDef(node.fnScopeId)) {
  7624. markup += " ".concat(node.fnScopeId);
  7625. }
  7626. else {
  7627. while (isDef(node)) {
  7628. //@ts-expect-error
  7629. if (isDef((scopeId = node.context.$options._scopeId))) {
  7630. markup += " ".concat(scopeId);
  7631. }
  7632. node = node.parent;
  7633. }
  7634. }
  7635. return markup + '>';
  7636. }
  7637. function createRenderFunction(modules, directives, isUnaryTag, cache) {
  7638. return function render(component, write, userContext, done) {
  7639. warned = Object.create(null);
  7640. var context = new RenderContext({
  7641. activeInstance: component,
  7642. userContext: userContext,
  7643. write: write,
  7644. done: done,
  7645. renderNode: renderNode,
  7646. isUnaryTag: isUnaryTag,
  7647. modules: modules,
  7648. directives: directives,
  7649. cache: cache
  7650. });
  7651. installSSRHelpers(component);
  7652. normalizeRender(component);
  7653. var resolve = function () {
  7654. renderNode(component._render(), true, context);
  7655. };
  7656. waitForServerPrefetch(component, resolve, done);
  7657. };
  7658. }
  7659. function createBasicRenderer(_a) {
  7660. var _b = _a === void 0 ? {} : _a, _c = _b.modules, modules = _c === void 0 ? [] : _c, _d = _b.directives, directives = _d === void 0 ? {} : _d, _e = _b.isUnaryTag, isUnaryTag = _e === void 0 ? function () { return false; } : _e, cache = _b.cache;
  7661. var render = createRenderFunction(modules, directives, isUnaryTag, cache);
  7662. return function renderToString(component, context, done) {
  7663. if (typeof context === 'function') {
  7664. done = context;
  7665. context = {};
  7666. }
  7667. var result = '';
  7668. var write = createWriteFunction(function (text) {
  7669. result += text;
  7670. return false;
  7671. }, done);
  7672. try {
  7673. //@ts-expect-error
  7674. render(component, write, context, function () {
  7675. done(null, result);
  7676. });
  7677. }
  7678. catch (e) {
  7679. done(e);
  7680. }
  7681. };
  7682. }
  7683. var indexBasic = createBasicRenderer({
  7684. // @ts-expect-error
  7685. modules: modules$1,
  7686. directives: directives$1,
  7687. isUnaryTag: isUnaryTag,
  7688. canBeLeftOpenTag: canBeLeftOpenTag
  7689. });
  7690. return indexBasic;
  7691. }));