browser.js 206 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  4. (factory((global.VueTemplateCompiler = {})));
  5. }(this, (function (exports) { 'use strict';
  6. var splitRE = /\r?\n/g;
  7. var emptyRE = /^\s*$/;
  8. var needFixRE = /^(\r?\n)*[\t\s]/;
  9. var deIndent = function deindent (str) {
  10. if (!needFixRE.test(str)) {
  11. return str
  12. }
  13. var lines = str.split(splitRE);
  14. var min = Infinity;
  15. var type, cur, c;
  16. for (var i = 0; i < lines.length; i++) {
  17. var line = lines[i];
  18. if (!emptyRE.test(line)) {
  19. if (!type) {
  20. c = line.charAt(0);
  21. if (c === ' ' || c === '\t') {
  22. type = c;
  23. cur = count(line, type);
  24. if (cur < min) {
  25. min = cur;
  26. }
  27. } else {
  28. return str
  29. }
  30. } else {
  31. cur = count(line, type);
  32. if (cur < min) {
  33. min = cur;
  34. }
  35. }
  36. }
  37. }
  38. return lines.map(function (line) {
  39. return line.slice(min)
  40. }).join('\n')
  41. };
  42. function count (line, type) {
  43. var i = 0;
  44. while (line.charAt(i) === type) {
  45. i++;
  46. }
  47. return i
  48. }
  49. /* */
  50. var emptyObject = Object.freeze({});
  51. // these helpers produces better vm code in JS engines due to their
  52. // explicitness and function inlining
  53. function isUndef (v) {
  54. return v === undefined || v === null
  55. }
  56. /**
  57. * Check if value is primitive
  58. */
  59. function isPrimitive (value) {
  60. return (
  61. typeof value === 'string' ||
  62. typeof value === 'number' ||
  63. // $flow-disable-line
  64. typeof value === 'symbol' ||
  65. typeof value === 'boolean'
  66. )
  67. }
  68. /**
  69. * Quick object check - this is primarily used to tell
  70. * Objects from primitive values when we know the value
  71. * is a JSON-compliant type.
  72. */
  73. function isObject (obj) {
  74. return obj !== null && typeof obj === 'object'
  75. }
  76. /**
  77. * Get the raw type string of a value e.g. [object Object]
  78. */
  79. var _toString = Object.prototype.toString;
  80. function toRawType (value) {
  81. return _toString.call(value).slice(8, -1)
  82. }
  83. /**
  84. * Strict object type check. Only returns true
  85. * for plain JavaScript objects.
  86. */
  87. function isPlainObject (obj) {
  88. return _toString.call(obj) === '[object Object]'
  89. }
  90. /**
  91. * Check if val is a valid array index.
  92. */
  93. function isValidArrayIndex (val) {
  94. var n = parseFloat(String(val));
  95. return n >= 0 && Math.floor(n) === n && isFinite(val)
  96. }
  97. /**
  98. * Convert a value to a string that is actually rendered.
  99. */
  100. /**
  101. * Convert a input value to a number for persistence.
  102. * If the conversion fails, return original string.
  103. */
  104. /**
  105. * Make a map and return a function for checking if a key
  106. * is in that map.
  107. */
  108. function makeMap (
  109. str,
  110. expectsLowerCase
  111. ) {
  112. var map = Object.create(null);
  113. var list = str.split(',');
  114. for (var i = 0; i < list.length; i++) {
  115. map[list[i]] = true;
  116. }
  117. return expectsLowerCase
  118. ? function (val) { return map[val.toLowerCase()]; }
  119. : function (val) { return map[val]; }
  120. }
  121. /**
  122. * Check if a tag is a built-in tag.
  123. */
  124. var isBuiltInTag = makeMap('slot,component', true);
  125. /**
  126. * Check if a attribute is a reserved attribute.
  127. */
  128. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  129. /**
  130. * Remove an item from an array
  131. */
  132. function remove (arr, item) {
  133. if (arr.length) {
  134. var index = arr.indexOf(item);
  135. if (index > -1) {
  136. return arr.splice(index, 1)
  137. }
  138. }
  139. }
  140. /**
  141. * Check whether the object has the property.
  142. */
  143. var hasOwnProperty = Object.prototype.hasOwnProperty;
  144. function hasOwn (obj, key) {
  145. return hasOwnProperty.call(obj, key)
  146. }
  147. /**
  148. * Create a cached version of a pure function.
  149. */
  150. function cached (fn) {
  151. var cache = Object.create(null);
  152. return (function cachedFn (str) {
  153. var hit = cache[str];
  154. return hit || (cache[str] = fn(str))
  155. })
  156. }
  157. /**
  158. * Camelize a hyphen-delimited string.
  159. */
  160. var camelizeRE = /-(\w)/g;
  161. var camelize = cached(function (str) {
  162. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  163. });
  164. /**
  165. * Capitalize a string.
  166. */
  167. /**
  168. * Simple bind polyfill for environments that do not support it... e.g.
  169. * PhantomJS 1.x. Technically we don't need this anymore since native bind is
  170. * now more performant in most browsers, but removing it would be breaking for
  171. * code that was able to run in PhantomJS 1.x, so this must be kept for
  172. * backwards compatibility.
  173. */
  174. /* istanbul ignore next */
  175. function polyfillBind (fn, ctx) {
  176. function boundFn (a) {
  177. var l = arguments.length;
  178. return l
  179. ? l > 1
  180. ? fn.apply(ctx, arguments)
  181. : fn.call(ctx, a)
  182. : fn.call(ctx)
  183. }
  184. boundFn._length = fn.length;
  185. return boundFn
  186. }
  187. function nativeBind (fn, ctx) {
  188. return fn.bind(ctx)
  189. }
  190. var bind = Function.prototype.bind
  191. ? nativeBind
  192. : polyfillBind;
  193. /**
  194. * Convert an Array-like object to a real Array.
  195. */
  196. /**
  197. * Mix properties into target object.
  198. */
  199. function extend (to, _from) {
  200. for (var key in _from) {
  201. to[key] = _from[key];
  202. }
  203. return to
  204. }
  205. /**
  206. * Merge an Array of Objects into a single Object.
  207. */
  208. /**
  209. * Perform no operation.
  210. * Stubbing args to make Flow happy without leaving useless transpiled code
  211. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
  212. */
  213. function noop (a, b, c) {}
  214. /**
  215. * Always return false.
  216. */
  217. var no = function (a, b, c) { return false; };
  218. /**
  219. * Return same value
  220. */
  221. var identity = function (_) { return _; };
  222. /**
  223. * Generate a static keys string from compiler modules.
  224. */
  225. function genStaticKeys (modules) {
  226. return modules.reduce(function (keys, m) {
  227. return keys.concat(m.staticKeys || [])
  228. }, []).join(',')
  229. }
  230. /**
  231. * Check if two values are loosely equal - that is,
  232. * if they are plain objects, do they have the same shape?
  233. */
  234. /**
  235. * Ensure a function is called only once.
  236. */
  237. /* */
  238. var isUnaryTag = makeMap(
  239. 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  240. 'link,meta,param,source,track,wbr'
  241. );
  242. // Elements that you can, intentionally, leave open
  243. // (and which close themselves)
  244. var canBeLeftOpenTag = makeMap(
  245. 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
  246. );
  247. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  248. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  249. var isNonPhrasingTag = makeMap(
  250. 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  251. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  252. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  253. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  254. 'title,tr,track'
  255. );
  256. /**
  257. * Not type-checking this file because it's mostly vendor code.
  258. */
  259. /*!
  260. * HTML Parser By John Resig (ejohn.org)
  261. * Modified by Juriy "kangax" Zaytsev
  262. * Original code by Erik Arvidsson, Mozilla Public License
  263. * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
  264. */
  265. // Regular Expressions for parsing tags and attributes
  266. var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  267. // could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName
  268. // but for Vue templates we can enforce a simple charset
  269. var ncname = '[a-zA-Z_][\\w\\-\\.]*';
  270. var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
  271. var startTagOpen = new RegExp(("^<" + qnameCapture));
  272. var startTagClose = /^\s*(\/?)>/;
  273. var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
  274. var doctype = /^<!DOCTYPE [^>]+>/i;
  275. // #7298: escape - to avoid being pased as HTML comment when inlined in page
  276. var comment = /^<!\--/;
  277. var conditionalComment = /^<!\[/;
  278. var IS_REGEX_CAPTURING_BROKEN = false;
  279. 'x'.replace(/x(.)?/g, function (m, g) {
  280. IS_REGEX_CAPTURING_BROKEN = g === '';
  281. });
  282. // Special Elements (can contain anything)
  283. var isPlainTextElement = makeMap('script,style,textarea', true);
  284. var reCache = {};
  285. var decodingMap = {
  286. '&lt;': '<',
  287. '&gt;': '>',
  288. '&quot;': '"',
  289. '&amp;': '&',
  290. '&#10;': '\n',
  291. '&#9;': '\t'
  292. };
  293. var encodedAttr = /&(?:lt|gt|quot|amp);/g;
  294. var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;
  295. // #5992
  296. var isIgnoreNewlineTag = makeMap('pre,textarea', true);
  297. var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
  298. function decodeAttr (value, shouldDecodeNewlines) {
  299. var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
  300. return value.replace(re, function (match) { return decodingMap[match]; })
  301. }
  302. function parseHTML (html, options) {
  303. var stack = [];
  304. var expectHTML = options.expectHTML;
  305. var isUnaryTag$$1 = options.isUnaryTag || no;
  306. var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
  307. var index = 0;
  308. var last, lastTag;
  309. while (html) {
  310. last = html;
  311. // Make sure we're not in a plaintext content element like script/style
  312. if (!lastTag || !isPlainTextElement(lastTag)) {
  313. var textEnd = html.indexOf('<');
  314. if (textEnd === 0) {
  315. // Comment:
  316. if (comment.test(html)) {
  317. var commentEnd = html.indexOf('-->');
  318. if (commentEnd >= 0) {
  319. if (options.shouldKeepComment) {
  320. options.comment(html.substring(4, commentEnd));
  321. }
  322. advance(commentEnd + 3);
  323. continue
  324. }
  325. }
  326. // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
  327. if (conditionalComment.test(html)) {
  328. var conditionalEnd = html.indexOf(']>');
  329. if (conditionalEnd >= 0) {
  330. advance(conditionalEnd + 2);
  331. continue
  332. }
  333. }
  334. // Doctype:
  335. var doctypeMatch = html.match(doctype);
  336. if (doctypeMatch) {
  337. advance(doctypeMatch[0].length);
  338. continue
  339. }
  340. // End tag:
  341. var endTagMatch = html.match(endTag);
  342. if (endTagMatch) {
  343. var curIndex = index;
  344. advance(endTagMatch[0].length);
  345. parseEndTag(endTagMatch[1], curIndex, index);
  346. continue
  347. }
  348. // Start tag:
  349. var startTagMatch = parseStartTag();
  350. if (startTagMatch) {
  351. handleStartTag(startTagMatch);
  352. if (shouldIgnoreFirstNewline(lastTag, html)) {
  353. advance(1);
  354. }
  355. continue
  356. }
  357. }
  358. var text = (void 0), rest = (void 0), next = (void 0);
  359. if (textEnd >= 0) {
  360. rest = html.slice(textEnd);
  361. while (
  362. !endTag.test(rest) &&
  363. !startTagOpen.test(rest) &&
  364. !comment.test(rest) &&
  365. !conditionalComment.test(rest)
  366. ) {
  367. // < in plain text, be forgiving and treat it as text
  368. next = rest.indexOf('<', 1);
  369. if (next < 0) { break }
  370. textEnd += next;
  371. rest = html.slice(textEnd);
  372. }
  373. text = html.substring(0, textEnd);
  374. advance(textEnd);
  375. }
  376. if (textEnd < 0) {
  377. text = html;
  378. html = '';
  379. }
  380. if (options.chars && text) {
  381. options.chars(text);
  382. }
  383. } else {
  384. var endTagLength = 0;
  385. var stackedTag = lastTag.toLowerCase();
  386. var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
  387. var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
  388. endTagLength = endTag.length;
  389. if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
  390. text = text
  391. .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
  392. .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
  393. }
  394. if (shouldIgnoreFirstNewline(stackedTag, text)) {
  395. text = text.slice(1);
  396. }
  397. if (options.chars) {
  398. options.chars(text);
  399. }
  400. return ''
  401. });
  402. index += html.length - rest$1.length;
  403. html = rest$1;
  404. parseEndTag(stackedTag, index - endTagLength, index);
  405. }
  406. if (html === last) {
  407. options.chars && options.chars(html);
  408. if ("development" !== 'production' && !stack.length && options.warn) {
  409. options.warn(("Mal-formatted tag at end of template: \"" + html + "\""));
  410. }
  411. break
  412. }
  413. }
  414. // Clean up any remaining tags
  415. parseEndTag();
  416. function advance (n) {
  417. index += n;
  418. html = html.substring(n);
  419. }
  420. function parseStartTag () {
  421. var start = html.match(startTagOpen);
  422. if (start) {
  423. var match = {
  424. tagName: start[1],
  425. attrs: [],
  426. start: index
  427. };
  428. advance(start[0].length);
  429. var end, attr;
  430. while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {
  431. advance(attr[0].length);
  432. match.attrs.push(attr);
  433. }
  434. if (end) {
  435. match.unarySlash = end[1];
  436. advance(end[0].length);
  437. match.end = index;
  438. return match
  439. }
  440. }
  441. }
  442. function handleStartTag (match) {
  443. var tagName = match.tagName;
  444. var unarySlash = match.unarySlash;
  445. if (expectHTML) {
  446. if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
  447. parseEndTag(lastTag);
  448. }
  449. if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
  450. parseEndTag(tagName);
  451. }
  452. }
  453. var unary = isUnaryTag$$1(tagName) || !!unarySlash;
  454. var l = match.attrs.length;
  455. var attrs = new Array(l);
  456. for (var i = 0; i < l; i++) {
  457. var args = match.attrs[i];
  458. // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778
  459. if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) {
  460. if (args[3] === '') { delete args[3]; }
  461. if (args[4] === '') { delete args[4]; }
  462. if (args[5] === '') { delete args[5]; }
  463. }
  464. var value = args[3] || args[4] || args[5] || '';
  465. var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
  466. ? options.shouldDecodeNewlinesForHref
  467. : options.shouldDecodeNewlines;
  468. attrs[i] = {
  469. name: args[1],
  470. value: decodeAttr(value, shouldDecodeNewlines)
  471. };
  472. }
  473. if (!unary) {
  474. stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });
  475. lastTag = tagName;
  476. }
  477. if (options.start) {
  478. options.start(tagName, attrs, unary, match.start, match.end);
  479. }
  480. }
  481. function parseEndTag (tagName, start, end) {
  482. var pos, lowerCasedTagName;
  483. if (start == null) { start = index; }
  484. if (end == null) { end = index; }
  485. if (tagName) {
  486. lowerCasedTagName = tagName.toLowerCase();
  487. }
  488. // Find the closest opened tag of the same type
  489. if (tagName) {
  490. for (pos = stack.length - 1; pos >= 0; pos--) {
  491. if (stack[pos].lowerCasedTag === lowerCasedTagName) {
  492. break
  493. }
  494. }
  495. } else {
  496. // If no tag name is provided, clean shop
  497. pos = 0;
  498. }
  499. if (pos >= 0) {
  500. // Close all the open elements, up the stack
  501. for (var i = stack.length - 1; i >= pos; i--) {
  502. if ("development" !== 'production' &&
  503. (i > pos || !tagName) &&
  504. options.warn
  505. ) {
  506. options.warn(
  507. ("tag <" + (stack[i].tag) + "> has no matching end tag.")
  508. );
  509. }
  510. if (options.end) {
  511. options.end(stack[i].tag, start, end);
  512. }
  513. }
  514. // Remove the open elements from the stack
  515. stack.length = pos;
  516. lastTag = pos && stack[pos - 1].tag;
  517. } else if (lowerCasedTagName === 'br') {
  518. if (options.start) {
  519. options.start(tagName, [], true, start, end);
  520. }
  521. } else if (lowerCasedTagName === 'p') {
  522. if (options.start) {
  523. options.start(tagName, [], false, start, end);
  524. }
  525. if (options.end) {
  526. options.end(tagName, start, end);
  527. }
  528. }
  529. }
  530. }
  531. /* */
  532. var splitRE$1 = /\r?\n/g;
  533. var replaceRE = /./g;
  534. var isSpecialTag = makeMap('script,style,template', true);
  535. /**
  536. * Parse a single-file component (*.vue) file into an SFC Descriptor Object.
  537. */
  538. function parseComponent (
  539. content,
  540. options
  541. ) {
  542. if ( options === void 0 ) options = {};
  543. var sfc = {
  544. template: null,
  545. script: null,
  546. styles: [],
  547. customBlocks: []
  548. };
  549. var depth = 0;
  550. var currentBlock = null;
  551. function start (
  552. tag,
  553. attrs,
  554. unary,
  555. start,
  556. end
  557. ) {
  558. if (depth === 0) {
  559. currentBlock = {
  560. type: tag,
  561. content: '',
  562. start: end,
  563. attrs: attrs.reduce(function (cumulated, ref) {
  564. var name = ref.name;
  565. var value = ref.value;
  566. cumulated[name] = value || true;
  567. return cumulated
  568. }, {})
  569. };
  570. if (isSpecialTag(tag)) {
  571. checkAttrs(currentBlock, attrs);
  572. if (tag === 'style') {
  573. sfc.styles.push(currentBlock);
  574. } else {
  575. sfc[tag] = currentBlock;
  576. }
  577. } else { // custom blocks
  578. sfc.customBlocks.push(currentBlock);
  579. }
  580. }
  581. if (!unary) {
  582. depth++;
  583. }
  584. }
  585. function checkAttrs (block, attrs) {
  586. for (var i = 0; i < attrs.length; i++) {
  587. var attr = attrs[i];
  588. if (attr.name === 'lang') {
  589. block.lang = attr.value;
  590. }
  591. if (attr.name === 'scoped') {
  592. block.scoped = true;
  593. }
  594. if (attr.name === 'module') {
  595. block.module = attr.value || true;
  596. }
  597. if (attr.name === 'src') {
  598. block.src = attr.value;
  599. }
  600. }
  601. }
  602. function end (tag, start, end) {
  603. if (depth === 1 && currentBlock) {
  604. currentBlock.end = start;
  605. var text = deIndent(content.slice(currentBlock.start, currentBlock.end));
  606. // pad content so that linters and pre-processors can output correct
  607. // line numbers in errors and warnings
  608. if (currentBlock.type !== 'template' && options.pad) {
  609. text = padContent(currentBlock, options.pad) + text;
  610. }
  611. currentBlock.content = text;
  612. currentBlock = null;
  613. }
  614. depth--;
  615. }
  616. function padContent (block, pad) {
  617. if (pad === 'space') {
  618. return content.slice(0, block.start).replace(replaceRE, ' ')
  619. } else {
  620. var offset = content.slice(0, block.start).split(splitRE$1).length;
  621. var padChar = block.type === 'script' && !block.lang
  622. ? '//\n'
  623. : '\n';
  624. return Array(offset).join(padChar)
  625. }
  626. }
  627. parseHTML(content, {
  628. start: start,
  629. end: end
  630. });
  631. return sfc
  632. }
  633. /* */
  634. /**
  635. * Check if a string starts with $ or _
  636. */
  637. /**
  638. * Define a property.
  639. */
  640. function def (obj, key, val, enumerable) {
  641. Object.defineProperty(obj, key, {
  642. value: val,
  643. enumerable: !!enumerable,
  644. writable: true,
  645. configurable: true
  646. });
  647. }
  648. /* */
  649. // can we use __proto__?
  650. var hasProto = '__proto__' in {};
  651. // Browser environment sniffing
  652. var inBrowser = typeof window !== 'undefined';
  653. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  654. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  655. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  656. var isIE = UA && /msie|trident/.test(UA);
  657. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  658. var isEdge = UA && UA.indexOf('edge/') > 0;
  659. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  660. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  661. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  662. // Firefox has a "watch" function on Object.prototype...
  663. var nativeWatch = ({}).watch;
  664. if (inBrowser) {
  665. try {
  666. var opts = {};
  667. Object.defineProperty(opts, 'passive', ({
  668. get: function get () {
  669. /* istanbul ignore next */
  670. }
  671. })); // https://github.com/facebook/flow/issues/285
  672. window.addEventListener('test-passive', null, opts);
  673. } catch (e) {}
  674. }
  675. // this needs to be lazy-evaled because vue may be required before
  676. // vue-server-renderer can set VUE_ENV
  677. var _isServer;
  678. var isServerRendering = function () {
  679. if (_isServer === undefined) {
  680. /* istanbul ignore if */
  681. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  682. // detect presence of vue-server-renderer and avoid
  683. // Webpack shimming the process
  684. _isServer = global['process'].env.VUE_ENV === 'server';
  685. } else {
  686. _isServer = false;
  687. }
  688. }
  689. return _isServer
  690. };
  691. // detect devtools
  692. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  693. /* istanbul ignore next */
  694. function isNative (Ctor) {
  695. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  696. }
  697. var hasSymbol =
  698. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  699. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  700. /* istanbul ignore if */ // $flow-disable-line
  701. if (typeof Set !== 'undefined' && isNative(Set)) {
  702. // use native Set when available.
  703. } else {
  704. // a non-standard Set polyfill that only works with primitive keys.
  705. }
  706. var ASSET_TYPES = [
  707. 'component',
  708. 'directive',
  709. 'filter'
  710. ];
  711. var LIFECYCLE_HOOKS = [
  712. 'beforeCreate',
  713. 'created',
  714. 'beforeMount',
  715. 'mounted',
  716. 'beforeUpdate',
  717. 'updated',
  718. 'beforeDestroy',
  719. 'destroyed',
  720. 'activated',
  721. 'deactivated',
  722. 'errorCaptured'
  723. ];
  724. /* */
  725. var config = ({
  726. /**
  727. * Option merge strategies (used in core/util/options)
  728. */
  729. // $flow-disable-line
  730. optionMergeStrategies: Object.create(null),
  731. /**
  732. * Whether to suppress warnings.
  733. */
  734. silent: false,
  735. /**
  736. * Show production mode tip message on boot?
  737. */
  738. productionTip: "development" !== 'production',
  739. /**
  740. * Whether to enable devtools
  741. */
  742. devtools: "development" !== 'production',
  743. /**
  744. * Whether to record perf
  745. */
  746. performance: false,
  747. /**
  748. * Error handler for watcher errors
  749. */
  750. errorHandler: null,
  751. /**
  752. * Warn handler for watcher warns
  753. */
  754. warnHandler: null,
  755. /**
  756. * Ignore certain custom elements
  757. */
  758. ignoredElements: [],
  759. /**
  760. * Custom user key aliases for v-on
  761. */
  762. // $flow-disable-line
  763. keyCodes: Object.create(null),
  764. /**
  765. * Check if a tag is reserved so that it cannot be registered as a
  766. * component. This is platform-dependent and may be overwritten.
  767. */
  768. isReservedTag: no,
  769. /**
  770. * Check if an attribute is reserved so that it cannot be used as a component
  771. * prop. This is platform-dependent and may be overwritten.
  772. */
  773. isReservedAttr: no,
  774. /**
  775. * Check if a tag is an unknown element.
  776. * Platform-dependent.
  777. */
  778. isUnknownElement: no,
  779. /**
  780. * Get the namespace of an element
  781. */
  782. getTagNamespace: noop,
  783. /**
  784. * Parse the real tag name for the specific platform.
  785. */
  786. parsePlatformTagName: identity,
  787. /**
  788. * Check if an attribute must be bound using property, e.g. value
  789. * Platform-dependent.
  790. */
  791. mustUseProp: no,
  792. /**
  793. * Exposed for legacy reasons
  794. */
  795. _lifecycleHooks: LIFECYCLE_HOOKS
  796. })
  797. /* */
  798. var warn = noop;
  799. var tip = noop;
  800. var generateComponentTrace = (noop); // work around flow check
  801. var formatComponentName = (noop);
  802. {
  803. var hasConsole = typeof console !== 'undefined';
  804. var classifyRE = /(?:^|[-_])(\w)/g;
  805. var classify = function (str) { return str
  806. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  807. .replace(/[-_]/g, ''); };
  808. warn = function (msg, vm) {
  809. var trace = vm ? generateComponentTrace(vm) : '';
  810. if (config.warnHandler) {
  811. config.warnHandler.call(null, msg, vm, trace);
  812. } else if (hasConsole && (!config.silent)) {
  813. console.error(("[Vue warn]: " + msg + trace));
  814. }
  815. };
  816. tip = function (msg, vm) {
  817. if (hasConsole && (!config.silent)) {
  818. console.warn("[Vue tip]: " + msg + (
  819. vm ? generateComponentTrace(vm) : ''
  820. ));
  821. }
  822. };
  823. formatComponentName = function (vm, includeFile) {
  824. if (vm.$root === vm) {
  825. return '<Root>'
  826. }
  827. var options = typeof vm === 'function' && vm.cid != null
  828. ? vm.options
  829. : vm._isVue
  830. ? vm.$options || vm.constructor.options
  831. : vm || {};
  832. var name = options.name || options._componentTag;
  833. var file = options.__file;
  834. if (!name && file) {
  835. var match = file.match(/([^/\\]+)\.vue$/);
  836. name = match && match[1];
  837. }
  838. return (
  839. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  840. (file && includeFile !== false ? (" at " + file) : '')
  841. )
  842. };
  843. var repeat = function (str, n) {
  844. var res = '';
  845. while (n) {
  846. if (n % 2 === 1) { res += str; }
  847. if (n > 1) { str += str; }
  848. n >>= 1;
  849. }
  850. return res
  851. };
  852. generateComponentTrace = function (vm) {
  853. if (vm._isVue && vm.$parent) {
  854. var tree = [];
  855. var currentRecursiveSequence = 0;
  856. while (vm) {
  857. if (tree.length > 0) {
  858. var last = tree[tree.length - 1];
  859. if (last.constructor === vm.constructor) {
  860. currentRecursiveSequence++;
  861. vm = vm.$parent;
  862. continue
  863. } else if (currentRecursiveSequence > 0) {
  864. tree[tree.length - 1] = [last, currentRecursiveSequence];
  865. currentRecursiveSequence = 0;
  866. }
  867. }
  868. tree.push(vm);
  869. vm = vm.$parent;
  870. }
  871. return '\n\nfound in\n\n' + tree
  872. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  873. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  874. : formatComponentName(vm))); })
  875. .join('\n')
  876. } else {
  877. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  878. }
  879. };
  880. }
  881. /* */
  882. var uid = 0;
  883. /**
  884. * A dep is an observable that can have multiple
  885. * directives subscribing to it.
  886. */
  887. var Dep = function Dep () {
  888. this.id = uid++;
  889. this.subs = [];
  890. };
  891. Dep.prototype.addSub = function addSub (sub) {
  892. this.subs.push(sub);
  893. };
  894. Dep.prototype.removeSub = function removeSub (sub) {
  895. remove(this.subs, sub);
  896. };
  897. Dep.prototype.depend = function depend () {
  898. if (Dep.target) {
  899. Dep.target.addDep(this);
  900. }
  901. };
  902. Dep.prototype.notify = function notify () {
  903. // stabilize the subscriber list first
  904. var subs = this.subs.slice();
  905. for (var i = 0, l = subs.length; i < l; i++) {
  906. subs[i].update();
  907. }
  908. };
  909. // the current target watcher being evaluated.
  910. // this is globally unique because there could be only one
  911. // watcher being evaluated at any time.
  912. Dep.target = null;
  913. /* */
  914. var VNode = function VNode (
  915. tag,
  916. data,
  917. children,
  918. text,
  919. elm,
  920. context,
  921. componentOptions,
  922. asyncFactory
  923. ) {
  924. this.tag = tag;
  925. this.data = data;
  926. this.children = children;
  927. this.text = text;
  928. this.elm = elm;
  929. this.ns = undefined;
  930. this.context = context;
  931. this.fnContext = undefined;
  932. this.fnOptions = undefined;
  933. this.fnScopeId = undefined;
  934. this.key = data && data.key;
  935. this.componentOptions = componentOptions;
  936. this.componentInstance = undefined;
  937. this.parent = undefined;
  938. this.raw = false;
  939. this.isStatic = false;
  940. this.isRootInsert = true;
  941. this.isComment = false;
  942. this.isCloned = false;
  943. this.isOnce = false;
  944. this.asyncFactory = asyncFactory;
  945. this.asyncMeta = undefined;
  946. this.isAsyncPlaceholder = false;
  947. };
  948. var prototypeAccessors = { child: { configurable: true } };
  949. // DEPRECATED: alias for componentInstance for backwards compat.
  950. /* istanbul ignore next */
  951. prototypeAccessors.child.get = function () {
  952. return this.componentInstance
  953. };
  954. Object.defineProperties( VNode.prototype, prototypeAccessors );
  955. // optimized shallow clone
  956. // used for static nodes and slot nodes because they may be reused across
  957. // multiple renders, cloning them avoids errors when DOM manipulations rely
  958. // on their elm reference.
  959. /*
  960. * not type checking this file because flow doesn't play well with
  961. * dynamically accessing methods on Array prototype
  962. */
  963. var arrayProto = Array.prototype;
  964. var arrayMethods = Object.create(arrayProto);
  965. var methodsToPatch = [
  966. 'push',
  967. 'pop',
  968. 'shift',
  969. 'unshift',
  970. 'splice',
  971. 'sort',
  972. 'reverse'
  973. ];
  974. /**
  975. * Intercept mutating methods and emit events
  976. */
  977. methodsToPatch.forEach(function (method) {
  978. // cache original method
  979. var original = arrayProto[method];
  980. def(arrayMethods, method, function mutator () {
  981. var args = [], len = arguments.length;
  982. while ( len-- ) args[ len ] = arguments[ len ];
  983. var result = original.apply(this, args);
  984. var ob = this.__ob__;
  985. var inserted;
  986. switch (method) {
  987. case 'push':
  988. case 'unshift':
  989. inserted = args;
  990. break
  991. case 'splice':
  992. inserted = args.slice(2);
  993. break
  994. }
  995. if (inserted) { ob.observeArray(inserted); }
  996. // notify change
  997. ob.dep.notify();
  998. return result
  999. });
  1000. });
  1001. /* */
  1002. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  1003. /**
  1004. * In some cases we may want to disable observation inside a component's
  1005. * update computation.
  1006. */
  1007. var shouldObserve = true;
  1008. /**
  1009. * Observer class that is attached to each observed
  1010. * object. Once attached, the observer converts the target
  1011. * object's property keys into getter/setters that
  1012. * collect dependencies and dispatch updates.
  1013. */
  1014. var Observer = function Observer (value) {
  1015. this.value = value;
  1016. this.dep = new Dep();
  1017. this.vmCount = 0;
  1018. def(value, '__ob__', this);
  1019. if (Array.isArray(value)) {
  1020. var augment = hasProto
  1021. ? protoAugment
  1022. : copyAugment;
  1023. augment(value, arrayMethods, arrayKeys);
  1024. this.observeArray(value);
  1025. } else {
  1026. this.walk(value);
  1027. }
  1028. };
  1029. /**
  1030. * Walk through each property and convert them into
  1031. * getter/setters. This method should only be called when
  1032. * value type is Object.
  1033. */
  1034. Observer.prototype.walk = function walk (obj) {
  1035. var keys = Object.keys(obj);
  1036. for (var i = 0; i < keys.length; i++) {
  1037. defineReactive(obj, keys[i]);
  1038. }
  1039. };
  1040. /**
  1041. * Observe a list of Array items.
  1042. */
  1043. Observer.prototype.observeArray = function observeArray (items) {
  1044. for (var i = 0, l = items.length; i < l; i++) {
  1045. observe(items[i]);
  1046. }
  1047. };
  1048. // helpers
  1049. /**
  1050. * Augment an target Object or Array by intercepting
  1051. * the prototype chain using __proto__
  1052. */
  1053. function protoAugment (target, src, keys) {
  1054. /* eslint-disable no-proto */
  1055. target.__proto__ = src;
  1056. /* eslint-enable no-proto */
  1057. }
  1058. /**
  1059. * Augment an target Object or Array by defining
  1060. * hidden properties.
  1061. */
  1062. /* istanbul ignore next */
  1063. function copyAugment (target, src, keys) {
  1064. for (var i = 0, l = keys.length; i < l; i++) {
  1065. var key = keys[i];
  1066. def(target, key, src[key]);
  1067. }
  1068. }
  1069. /**
  1070. * Attempt to create an observer instance for a value,
  1071. * returns the new observer if successfully observed,
  1072. * or the existing observer if the value already has one.
  1073. */
  1074. function observe (value, asRootData) {
  1075. if (!isObject(value) || value instanceof VNode) {
  1076. return
  1077. }
  1078. var ob;
  1079. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  1080. ob = value.__ob__;
  1081. } else if (
  1082. shouldObserve &&
  1083. !isServerRendering() &&
  1084. (Array.isArray(value) || isPlainObject(value)) &&
  1085. Object.isExtensible(value) &&
  1086. !value._isVue
  1087. ) {
  1088. ob = new Observer(value);
  1089. }
  1090. if (asRootData && ob) {
  1091. ob.vmCount++;
  1092. }
  1093. return ob
  1094. }
  1095. /**
  1096. * Define a reactive property on an Object.
  1097. */
  1098. function defineReactive (
  1099. obj,
  1100. key,
  1101. val,
  1102. customSetter,
  1103. shallow
  1104. ) {
  1105. var dep = new Dep();
  1106. var property = Object.getOwnPropertyDescriptor(obj, key);
  1107. if (property && property.configurable === false) {
  1108. return
  1109. }
  1110. // cater for pre-defined getter/setters
  1111. var getter = property && property.get;
  1112. if (!getter && arguments.length === 2) {
  1113. val = obj[key];
  1114. }
  1115. var setter = property && property.set;
  1116. var childOb = !shallow && observe(val);
  1117. Object.defineProperty(obj, key, {
  1118. enumerable: true,
  1119. configurable: true,
  1120. get: function reactiveGetter () {
  1121. var value = getter ? getter.call(obj) : val;
  1122. if (Dep.target) {
  1123. dep.depend();
  1124. if (childOb) {
  1125. childOb.dep.depend();
  1126. if (Array.isArray(value)) {
  1127. dependArray(value);
  1128. }
  1129. }
  1130. }
  1131. return value
  1132. },
  1133. set: function reactiveSetter (newVal) {
  1134. var value = getter ? getter.call(obj) : val;
  1135. /* eslint-disable no-self-compare */
  1136. if (newVal === value || (newVal !== newVal && value !== value)) {
  1137. return
  1138. }
  1139. /* eslint-enable no-self-compare */
  1140. if ("development" !== 'production' && customSetter) {
  1141. customSetter();
  1142. }
  1143. if (setter) {
  1144. setter.call(obj, newVal);
  1145. } else {
  1146. val = newVal;
  1147. }
  1148. childOb = !shallow && observe(newVal);
  1149. dep.notify();
  1150. }
  1151. });
  1152. }
  1153. /**
  1154. * Set a property on an object. Adds the new property and
  1155. * triggers change notification if the property doesn't
  1156. * already exist.
  1157. */
  1158. function set (target, key, val) {
  1159. if ("development" !== 'production' &&
  1160. (isUndef(target) || isPrimitive(target))
  1161. ) {
  1162. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  1163. }
  1164. if (Array.isArray(target) && isValidArrayIndex(key)) {
  1165. target.length = Math.max(target.length, key);
  1166. target.splice(key, 1, val);
  1167. return val
  1168. }
  1169. if (key in target && !(key in Object.prototype)) {
  1170. target[key] = val;
  1171. return val
  1172. }
  1173. var ob = (target).__ob__;
  1174. if (target._isVue || (ob && ob.vmCount)) {
  1175. "development" !== 'production' && warn(
  1176. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  1177. 'at runtime - declare it upfront in the data option.'
  1178. );
  1179. return val
  1180. }
  1181. if (!ob) {
  1182. target[key] = val;
  1183. return val
  1184. }
  1185. defineReactive(ob.value, key, val);
  1186. ob.dep.notify();
  1187. return val
  1188. }
  1189. /**
  1190. * Delete a property and trigger change if necessary.
  1191. */
  1192. /**
  1193. * Collect dependencies on array elements when the array is touched, since
  1194. * we cannot intercept array element access like property getters.
  1195. */
  1196. function dependArray (value) {
  1197. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  1198. e = value[i];
  1199. e && e.__ob__ && e.__ob__.dep.depend();
  1200. if (Array.isArray(e)) {
  1201. dependArray(e);
  1202. }
  1203. }
  1204. }
  1205. /* */
  1206. /**
  1207. * Option overwriting strategies are functions that handle
  1208. * how to merge a parent option value and a child option
  1209. * value into the final value.
  1210. */
  1211. var strats = config.optionMergeStrategies;
  1212. /**
  1213. * Options with restrictions
  1214. */
  1215. {
  1216. strats.el = strats.propsData = function (parent, child, vm, key) {
  1217. if (!vm) {
  1218. warn(
  1219. "option \"" + key + "\" can only be used during instance " +
  1220. 'creation with the `new` keyword.'
  1221. );
  1222. }
  1223. return defaultStrat(parent, child)
  1224. };
  1225. }
  1226. /**
  1227. * Helper that recursively merges two data objects together.
  1228. */
  1229. function mergeData (to, from) {
  1230. if (!from) { return to }
  1231. var key, toVal, fromVal;
  1232. var keys = Object.keys(from);
  1233. for (var i = 0; i < keys.length; i++) {
  1234. key = keys[i];
  1235. toVal = to[key];
  1236. fromVal = from[key];
  1237. if (!hasOwn(to, key)) {
  1238. set(to, key, fromVal);
  1239. } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
  1240. mergeData(toVal, fromVal);
  1241. }
  1242. }
  1243. return to
  1244. }
  1245. /**
  1246. * Data
  1247. */
  1248. function mergeDataOrFn (
  1249. parentVal,
  1250. childVal,
  1251. vm
  1252. ) {
  1253. if (!vm) {
  1254. // in a Vue.extend merge, both should be functions
  1255. if (!childVal) {
  1256. return parentVal
  1257. }
  1258. if (!parentVal) {
  1259. return childVal
  1260. }
  1261. // when parentVal & childVal are both present,
  1262. // we need to return a function that returns the
  1263. // merged result of both functions... no need to
  1264. // check if parentVal is a function here because
  1265. // it has to be a function to pass previous merges.
  1266. return function mergedDataFn () {
  1267. return mergeData(
  1268. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  1269. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  1270. )
  1271. }
  1272. } else {
  1273. return function mergedInstanceDataFn () {
  1274. // instance merge
  1275. var instanceData = typeof childVal === 'function'
  1276. ? childVal.call(vm, vm)
  1277. : childVal;
  1278. var defaultData = typeof parentVal === 'function'
  1279. ? parentVal.call(vm, vm)
  1280. : parentVal;
  1281. if (instanceData) {
  1282. return mergeData(instanceData, defaultData)
  1283. } else {
  1284. return defaultData
  1285. }
  1286. }
  1287. }
  1288. }
  1289. strats.data = function (
  1290. parentVal,
  1291. childVal,
  1292. vm
  1293. ) {
  1294. if (!vm) {
  1295. if (childVal && typeof childVal !== 'function') {
  1296. "development" !== 'production' && warn(
  1297. 'The "data" option should be a function ' +
  1298. 'that returns a per-instance value in component ' +
  1299. 'definitions.',
  1300. vm
  1301. );
  1302. return parentVal
  1303. }
  1304. return mergeDataOrFn(parentVal, childVal)
  1305. }
  1306. return mergeDataOrFn(parentVal, childVal, vm)
  1307. };
  1308. /**
  1309. * Hooks and props are merged as arrays.
  1310. */
  1311. function mergeHook (
  1312. parentVal,
  1313. childVal
  1314. ) {
  1315. return childVal
  1316. ? parentVal
  1317. ? parentVal.concat(childVal)
  1318. : Array.isArray(childVal)
  1319. ? childVal
  1320. : [childVal]
  1321. : parentVal
  1322. }
  1323. LIFECYCLE_HOOKS.forEach(function (hook) {
  1324. strats[hook] = mergeHook;
  1325. });
  1326. /**
  1327. * Assets
  1328. *
  1329. * When a vm is present (instance creation), we need to do
  1330. * a three-way merge between constructor options, instance
  1331. * options and parent options.
  1332. */
  1333. function mergeAssets (
  1334. parentVal,
  1335. childVal,
  1336. vm,
  1337. key
  1338. ) {
  1339. var res = Object.create(parentVal || null);
  1340. if (childVal) {
  1341. "development" !== 'production' && assertObjectType(key, childVal, vm);
  1342. return extend(res, childVal)
  1343. } else {
  1344. return res
  1345. }
  1346. }
  1347. ASSET_TYPES.forEach(function (type) {
  1348. strats[type + 's'] = mergeAssets;
  1349. });
  1350. /**
  1351. * Watchers.
  1352. *
  1353. * Watchers hashes should not overwrite one
  1354. * another, so we merge them as arrays.
  1355. */
  1356. strats.watch = function (
  1357. parentVal,
  1358. childVal,
  1359. vm,
  1360. key
  1361. ) {
  1362. // work around Firefox's Object.prototype.watch...
  1363. if (parentVal === nativeWatch) { parentVal = undefined; }
  1364. if (childVal === nativeWatch) { childVal = undefined; }
  1365. /* istanbul ignore if */
  1366. if (!childVal) { return Object.create(parentVal || null) }
  1367. {
  1368. assertObjectType(key, childVal, vm);
  1369. }
  1370. if (!parentVal) { return childVal }
  1371. var ret = {};
  1372. extend(ret, parentVal);
  1373. for (var key$1 in childVal) {
  1374. var parent = ret[key$1];
  1375. var child = childVal[key$1];
  1376. if (parent && !Array.isArray(parent)) {
  1377. parent = [parent];
  1378. }
  1379. ret[key$1] = parent
  1380. ? parent.concat(child)
  1381. : Array.isArray(child) ? child : [child];
  1382. }
  1383. return ret
  1384. };
  1385. /**
  1386. * Other object hashes.
  1387. */
  1388. strats.props =
  1389. strats.methods =
  1390. strats.inject =
  1391. strats.computed = function (
  1392. parentVal,
  1393. childVal,
  1394. vm,
  1395. key
  1396. ) {
  1397. if (childVal && "development" !== 'production') {
  1398. assertObjectType(key, childVal, vm);
  1399. }
  1400. if (!parentVal) { return childVal }
  1401. var ret = Object.create(null);
  1402. extend(ret, parentVal);
  1403. if (childVal) { extend(ret, childVal); }
  1404. return ret
  1405. };
  1406. strats.provide = mergeDataOrFn;
  1407. /**
  1408. * Default strategy.
  1409. */
  1410. var defaultStrat = function (parentVal, childVal) {
  1411. return childVal === undefined
  1412. ? parentVal
  1413. : childVal
  1414. };
  1415. function assertObjectType (name, value, vm) {
  1416. if (!isPlainObject(value)) {
  1417. warn(
  1418. "Invalid value for option \"" + name + "\": expected an Object, " +
  1419. "but got " + (toRawType(value)) + ".",
  1420. vm
  1421. );
  1422. }
  1423. }
  1424. /**
  1425. * Merge two option objects into a new one.
  1426. * Core utility used in both instantiation and inheritance.
  1427. */
  1428. /**
  1429. * Resolve an asset.
  1430. * This function is used because child instances need access
  1431. * to assets defined in its ancestor chain.
  1432. */
  1433. /* */
  1434. /* */
  1435. /* */
  1436. /* globals MessageChannel */
  1437. var callbacks = [];
  1438. function flushCallbacks () {
  1439. var copies = callbacks.slice(0);
  1440. callbacks.length = 0;
  1441. for (var i = 0; i < copies.length; i++) {
  1442. copies[i]();
  1443. }
  1444. }
  1445. // Determine (macro) task defer implementation.
  1446. // Technically setImmediate should be the ideal choice, but it's only available
  1447. // in IE. The only polyfill that consistently queues the callback after all DOM
  1448. // events triggered in the same loop is by using MessageChannel.
  1449. /* istanbul ignore if */
  1450. if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  1451. } else if (typeof MessageChannel !== 'undefined' && (
  1452. isNative(MessageChannel) ||
  1453. // PhantomJS
  1454. MessageChannel.toString() === '[object MessageChannelConstructor]'
  1455. )) {
  1456. var channel = new MessageChannel();
  1457. channel.port1.onmessage = flushCallbacks;
  1458. } else {
  1459. /* istanbul ignore next */
  1460. }
  1461. // Determine microtask defer implementation.
  1462. /* istanbul ignore next, $flow-disable-line */
  1463. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  1464. } else {
  1465. // fallback to macro
  1466. }
  1467. /**
  1468. * Wrap a function so that if any code inside triggers state change,
  1469. * the changes are queued using a (macro) task instead of a microtask.
  1470. */
  1471. /* */
  1472. /* */
  1473. // these are reserved for web because they are directly compiled away
  1474. // during template compilation
  1475. var isReservedAttr = makeMap('style,class');
  1476. // attributes that should be using props for binding
  1477. var acceptValue = makeMap('input,textarea,option,select,progress');
  1478. var mustUseProp = function (tag, type, attr) {
  1479. return (
  1480. (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
  1481. (attr === 'selected' && tag === 'option') ||
  1482. (attr === 'checked' && tag === 'input') ||
  1483. (attr === 'muted' && tag === 'video')
  1484. )
  1485. };
  1486. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  1487. var isBooleanAttr = makeMap(
  1488. 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  1489. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  1490. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  1491. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  1492. 'required,reversed,scoped,seamless,selected,sortable,translate,' +
  1493. 'truespeed,typemustmatch,visible'
  1494. );
  1495. /* */
  1496. /* */
  1497. var isHTMLTag = makeMap(
  1498. 'html,body,base,head,link,meta,style,title,' +
  1499. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  1500. 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
  1501. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  1502. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  1503. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  1504. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  1505. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  1506. 'output,progress,select,textarea,' +
  1507. 'details,dialog,menu,menuitem,summary,' +
  1508. 'content,element,shadow,template,blockquote,iframe,tfoot'
  1509. );
  1510. // this map is intentionally selective, only covering SVG elements that may
  1511. // contain child elements.
  1512. var isSVG = makeMap(
  1513. 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  1514. 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  1515. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
  1516. true
  1517. );
  1518. var isPreTag = function (tag) { return tag === 'pre'; };
  1519. var isReservedTag = function (tag) {
  1520. return isHTMLTag(tag) || isSVG(tag)
  1521. };
  1522. function getTagNamespace (tag) {
  1523. if (isSVG(tag)) {
  1524. return 'svg'
  1525. }
  1526. // basic support for MathML
  1527. // note it doesn't support other MathML elements being component roots
  1528. if (tag === 'math') {
  1529. return 'math'
  1530. }
  1531. }
  1532. var isTextInputType = makeMap('text,number,password,search,email,tel,url');
  1533. /* */
  1534. /**
  1535. * Query an element selector if it's not an element already.
  1536. */
  1537. /* */
  1538. var validDivisionCharRE = /[\w).+\-_$\]]/;
  1539. function parseFilters (exp) {
  1540. var inSingle = false;
  1541. var inDouble = false;
  1542. var inTemplateString = false;
  1543. var inRegex = false;
  1544. var curly = 0;
  1545. var square = 0;
  1546. var paren = 0;
  1547. var lastFilterIndex = 0;
  1548. var c, prev, i, expression, filters;
  1549. for (i = 0; i < exp.length; i++) {
  1550. prev = c;
  1551. c = exp.charCodeAt(i);
  1552. if (inSingle) {
  1553. if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
  1554. } else if (inDouble) {
  1555. if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
  1556. } else if (inTemplateString) {
  1557. if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
  1558. } else if (inRegex) {
  1559. if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
  1560. } else if (
  1561. c === 0x7C && // pipe
  1562. exp.charCodeAt(i + 1) !== 0x7C &&
  1563. exp.charCodeAt(i - 1) !== 0x7C &&
  1564. !curly && !square && !paren
  1565. ) {
  1566. if (expression === undefined) {
  1567. // first filter, end of expression
  1568. lastFilterIndex = i + 1;
  1569. expression = exp.slice(0, i).trim();
  1570. } else {
  1571. pushFilter();
  1572. }
  1573. } else {
  1574. switch (c) {
  1575. case 0x22: inDouble = true; break // "
  1576. case 0x27: inSingle = true; break // '
  1577. case 0x60: inTemplateString = true; break // `
  1578. case 0x28: paren++; break // (
  1579. case 0x29: paren--; break // )
  1580. case 0x5B: square++; break // [
  1581. case 0x5D: square--; break // ]
  1582. case 0x7B: curly++; break // {
  1583. case 0x7D: curly--; break // }
  1584. }
  1585. if (c === 0x2f) { // /
  1586. var j = i - 1;
  1587. var p = (void 0);
  1588. // find first non-whitespace prev char
  1589. for (; j >= 0; j--) {
  1590. p = exp.charAt(j);
  1591. if (p !== ' ') { break }
  1592. }
  1593. if (!p || !validDivisionCharRE.test(p)) {
  1594. inRegex = true;
  1595. }
  1596. }
  1597. }
  1598. }
  1599. if (expression === undefined) {
  1600. expression = exp.slice(0, i).trim();
  1601. } else if (lastFilterIndex !== 0) {
  1602. pushFilter();
  1603. }
  1604. function pushFilter () {
  1605. (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
  1606. lastFilterIndex = i + 1;
  1607. }
  1608. if (filters) {
  1609. for (i = 0; i < filters.length; i++) {
  1610. expression = wrapFilter(expression, filters[i]);
  1611. }
  1612. }
  1613. return expression
  1614. }
  1615. function wrapFilter (exp, filter) {
  1616. var i = filter.indexOf('(');
  1617. if (i < 0) {
  1618. // _f: resolveFilter
  1619. return ("_f(\"" + filter + "\")(" + exp + ")")
  1620. } else {
  1621. var name = filter.slice(0, i);
  1622. var args = filter.slice(i + 1);
  1623. return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args))
  1624. }
  1625. }
  1626. /* */
  1627. var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g;
  1628. var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
  1629. var buildRegex = cached(function (delimiters) {
  1630. var open = delimiters[0].replace(regexEscapeRE, '\\$&');
  1631. var close = delimiters[1].replace(regexEscapeRE, '\\$&');
  1632. return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
  1633. });
  1634. function parseText (
  1635. text,
  1636. delimiters
  1637. ) {
  1638. var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
  1639. if (!tagRE.test(text)) {
  1640. return
  1641. }
  1642. var tokens = [];
  1643. var rawTokens = [];
  1644. var lastIndex = tagRE.lastIndex = 0;
  1645. var match, index, tokenValue;
  1646. while ((match = tagRE.exec(text))) {
  1647. index = match.index;
  1648. // push text token
  1649. if (index > lastIndex) {
  1650. rawTokens.push(tokenValue = text.slice(lastIndex, index));
  1651. tokens.push(JSON.stringify(tokenValue));
  1652. }
  1653. // tag token
  1654. var exp = parseFilters(match[1].trim());
  1655. tokens.push(("_s(" + exp + ")"));
  1656. rawTokens.push({ '@binding': exp });
  1657. lastIndex = index + match[0].length;
  1658. }
  1659. if (lastIndex < text.length) {
  1660. rawTokens.push(tokenValue = text.slice(lastIndex));
  1661. tokens.push(JSON.stringify(tokenValue));
  1662. }
  1663. return {
  1664. expression: tokens.join('+'),
  1665. tokens: rawTokens
  1666. }
  1667. }
  1668. /* */
  1669. function baseWarn (msg) {
  1670. console.error(("[Vue compiler]: " + msg));
  1671. }
  1672. function pluckModuleFunction (
  1673. modules,
  1674. key
  1675. ) {
  1676. return modules
  1677. ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
  1678. : []
  1679. }
  1680. function addProp (el, name, value) {
  1681. (el.props || (el.props = [])).push({ name: name, value: value });
  1682. el.plain = false;
  1683. }
  1684. function addAttr (el, name, value) {
  1685. (el.attrs || (el.attrs = [])).push({ name: name, value: value });
  1686. el.plain = false;
  1687. }
  1688. // add a raw attr (use this in preTransforms)
  1689. function addRawAttr (el, name, value) {
  1690. el.attrsMap[name] = value;
  1691. el.attrsList.push({ name: name, value: value });
  1692. }
  1693. function addDirective (
  1694. el,
  1695. name,
  1696. rawName,
  1697. value,
  1698. arg,
  1699. modifiers
  1700. ) {
  1701. (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });
  1702. el.plain = false;
  1703. }
  1704. function addHandler (
  1705. el,
  1706. name,
  1707. value,
  1708. modifiers,
  1709. important,
  1710. warn
  1711. ) {
  1712. modifiers = modifiers || emptyObject;
  1713. // warn prevent and passive modifier
  1714. /* istanbul ignore if */
  1715. if (
  1716. "development" !== 'production' && warn &&
  1717. modifiers.prevent && modifiers.passive
  1718. ) {
  1719. warn(
  1720. 'passive and prevent can\'t be used together. ' +
  1721. 'Passive handler can\'t prevent default event.'
  1722. );
  1723. }
  1724. // check capture modifier
  1725. if (modifiers.capture) {
  1726. delete modifiers.capture;
  1727. name = '!' + name; // mark the event as captured
  1728. }
  1729. if (modifiers.once) {
  1730. delete modifiers.once;
  1731. name = '~' + name; // mark the event as once
  1732. }
  1733. /* istanbul ignore if */
  1734. if (modifiers.passive) {
  1735. delete modifiers.passive;
  1736. name = '&' + name; // mark the event as passive
  1737. }
  1738. // normalize click.right and click.middle since they don't actually fire
  1739. // this is technically browser-specific, but at least for now browsers are
  1740. // the only target envs that have right/middle clicks.
  1741. if (name === 'click') {
  1742. if (modifiers.right) {
  1743. name = 'contextmenu';
  1744. delete modifiers.right;
  1745. } else if (modifiers.middle) {
  1746. name = 'mouseup';
  1747. }
  1748. }
  1749. var events;
  1750. if (modifiers.native) {
  1751. delete modifiers.native;
  1752. events = el.nativeEvents || (el.nativeEvents = {});
  1753. } else {
  1754. events = el.events || (el.events = {});
  1755. }
  1756. var newHandler = {
  1757. value: value.trim()
  1758. };
  1759. if (modifiers !== emptyObject) {
  1760. newHandler.modifiers = modifiers;
  1761. }
  1762. var handlers = events[name];
  1763. /* istanbul ignore if */
  1764. if (Array.isArray(handlers)) {
  1765. important ? handlers.unshift(newHandler) : handlers.push(newHandler);
  1766. } else if (handlers) {
  1767. events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
  1768. } else {
  1769. events[name] = newHandler;
  1770. }
  1771. el.plain = false;
  1772. }
  1773. function getBindingAttr (
  1774. el,
  1775. name,
  1776. getStatic
  1777. ) {
  1778. var dynamicValue =
  1779. getAndRemoveAttr(el, ':' + name) ||
  1780. getAndRemoveAttr(el, 'v-bind:' + name);
  1781. if (dynamicValue != null) {
  1782. return parseFilters(dynamicValue)
  1783. } else if (getStatic !== false) {
  1784. var staticValue = getAndRemoveAttr(el, name);
  1785. if (staticValue != null) {
  1786. return JSON.stringify(staticValue)
  1787. }
  1788. }
  1789. }
  1790. // note: this only removes the attr from the Array (attrsList) so that it
  1791. // doesn't get processed by processAttrs.
  1792. // By default it does NOT remove it from the map (attrsMap) because the map is
  1793. // needed during codegen.
  1794. function getAndRemoveAttr (
  1795. el,
  1796. name,
  1797. removeFromMap
  1798. ) {
  1799. var val;
  1800. if ((val = el.attrsMap[name]) != null) {
  1801. var list = el.attrsList;
  1802. for (var i = 0, l = list.length; i < l; i++) {
  1803. if (list[i].name === name) {
  1804. list.splice(i, 1);
  1805. break
  1806. }
  1807. }
  1808. }
  1809. if (removeFromMap) {
  1810. delete el.attrsMap[name];
  1811. }
  1812. return val
  1813. }
  1814. /* */
  1815. function transformNode (el, options) {
  1816. var warn = options.warn || baseWarn;
  1817. var staticClass = getAndRemoveAttr(el, 'class');
  1818. if ("development" !== 'production' && staticClass) {
  1819. var res = parseText(staticClass, options.delimiters);
  1820. if (res) {
  1821. warn(
  1822. "class=\"" + staticClass + "\": " +
  1823. 'Interpolation inside attributes has been removed. ' +
  1824. 'Use v-bind or the colon shorthand instead. For example, ' +
  1825. 'instead of <div class="{{ val }}">, use <div :class="val">.'
  1826. );
  1827. }
  1828. }
  1829. if (staticClass) {
  1830. el.staticClass = JSON.stringify(staticClass);
  1831. }
  1832. var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
  1833. if (classBinding) {
  1834. el.classBinding = classBinding;
  1835. }
  1836. }
  1837. function genData (el) {
  1838. var data = '';
  1839. if (el.staticClass) {
  1840. data += "staticClass:" + (el.staticClass) + ",";
  1841. }
  1842. if (el.classBinding) {
  1843. data += "class:" + (el.classBinding) + ",";
  1844. }
  1845. return data
  1846. }
  1847. var klass = {
  1848. staticKeys: ['staticClass'],
  1849. transformNode: transformNode,
  1850. genData: genData
  1851. }
  1852. /* */
  1853. var parseStyleText = cached(function (cssText) {
  1854. var res = {};
  1855. var listDelimiter = /;(?![^(]*\))/g;
  1856. var propertyDelimiter = /:(.+)/;
  1857. cssText.split(listDelimiter).forEach(function (item) {
  1858. if (item) {
  1859. var tmp = item.split(propertyDelimiter);
  1860. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  1861. }
  1862. });
  1863. return res
  1864. });
  1865. // normalize possible array / string values into Object
  1866. /**
  1867. * parent component style should be after child's
  1868. * so that parent component's style could override it
  1869. */
  1870. /* */
  1871. function transformNode$1 (el, options) {
  1872. var warn = options.warn || baseWarn;
  1873. var staticStyle = getAndRemoveAttr(el, 'style');
  1874. if (staticStyle) {
  1875. /* istanbul ignore if */
  1876. {
  1877. var res = parseText(staticStyle, options.delimiters);
  1878. if (res) {
  1879. warn(
  1880. "style=\"" + staticStyle + "\": " +
  1881. 'Interpolation inside attributes has been removed. ' +
  1882. 'Use v-bind or the colon shorthand instead. For example, ' +
  1883. 'instead of <div style="{{ val }}">, use <div :style="val">.'
  1884. );
  1885. }
  1886. }
  1887. el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
  1888. }
  1889. var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
  1890. if (styleBinding) {
  1891. el.styleBinding = styleBinding;
  1892. }
  1893. }
  1894. function genData$1 (el) {
  1895. var data = '';
  1896. if (el.staticStyle) {
  1897. data += "staticStyle:" + (el.staticStyle) + ",";
  1898. }
  1899. if (el.styleBinding) {
  1900. data += "style:(" + (el.styleBinding) + "),";
  1901. }
  1902. return data
  1903. }
  1904. var style = {
  1905. staticKeys: ['staticStyle'],
  1906. transformNode: transformNode$1,
  1907. genData: genData$1
  1908. }
  1909. var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  1910. function createCommonjsModule(fn, module) {
  1911. return module = { exports: {} }, fn(module, module.exports), module.exports;
  1912. }
  1913. var he = createCommonjsModule(function (module, exports) {
  1914. /*! https://mths.be/he v1.1.1 by @mathias | MIT license */
  1915. (function(root) {
  1916. // Detect free variables `exports`.
  1917. var freeExports = 'object' == 'object' && exports;
  1918. // Detect free variable `module`.
  1919. var freeModule = 'object' == 'object' && module &&
  1920. module.exports == freeExports && module;
  1921. // Detect free variable `global`, from Node.js or Browserified code,
  1922. // and use it as `root`.
  1923. var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
  1924. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
  1925. root = freeGlobal;
  1926. }
  1927. /*--------------------------------------------------------------------------*/
  1928. // All astral symbols.
  1929. var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  1930. // All ASCII symbols (not just printable ASCII) except those listed in the
  1931. // first column of the overrides table.
  1932. // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides
  1933. var regexAsciiWhitelist = /[\x01-\x7F]/g;
  1934. // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
  1935. // code points listed in the first column of the overrides table on
  1936. // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.
  1937. var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
  1938. 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;
  1939. 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'};
  1940. var regexEscape = /["&'<>`]/g;
  1941. var escapeMap = {
  1942. '"': '&quot;',
  1943. '&': '&amp;',
  1944. '\'': '&#x27;',
  1945. '<': '&lt;',
  1946. // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
  1947. // following is not strictly necessary unless it’s part of a tag or an
  1948. // unquoted attribute value. We’re only escaping it to support those
  1949. // situations, and for XML support.
  1950. '>': '&gt;',
  1951. // In Internet Explorer ≤ 8, the backtick character can be used
  1952. // to break out of (un)quoted attribute values or HTML comments.
  1953. // See http://html5sec.org/#102, http://html5sec.org/#108, and
  1954. // http://html5sec.org/#133.
  1955. '`': '&#x60;'
  1956. };
  1957. var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
  1958. 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]/;
  1959. var regexDecode = /&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(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])?/g;
  1960. 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'};
  1961. 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'};
  1962. 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'};
  1963. 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];
  1964. /*--------------------------------------------------------------------------*/
  1965. var stringFromCharCode = String.fromCharCode;
  1966. var object = {};
  1967. var hasOwnProperty = object.hasOwnProperty;
  1968. var has = function(object, propertyName) {
  1969. return hasOwnProperty.call(object, propertyName);
  1970. };
  1971. var contains = function(array, value) {
  1972. var index = -1;
  1973. var length = array.length;
  1974. while (++index < length) {
  1975. if (array[index] == value) {
  1976. return true;
  1977. }
  1978. }
  1979. return false;
  1980. };
  1981. var merge = function(options, defaults) {
  1982. if (!options) {
  1983. return defaults;
  1984. }
  1985. var result = {};
  1986. var key;
  1987. for (key in defaults) {
  1988. // A `hasOwnProperty` check is not needed here, since only recognized
  1989. // option names are used anyway. Any others are ignored.
  1990. result[key] = has(options, key) ? options[key] : defaults[key];
  1991. }
  1992. return result;
  1993. };
  1994. // Modified version of `ucs2encode`; see https://mths.be/punycode.
  1995. var codePointToSymbol = function(codePoint, strict) {
  1996. var output = '';
  1997. if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {
  1998. // See issue #4:
  1999. // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
  2000. // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
  2001. // REPLACEMENT CHARACTER.”
  2002. if (strict) {
  2003. parseError('character reference outside the permissible Unicode range');
  2004. }
  2005. return '\uFFFD';
  2006. }
  2007. if (has(decodeMapNumeric, codePoint)) {
  2008. if (strict) {
  2009. parseError('disallowed character reference');
  2010. }
  2011. return decodeMapNumeric[codePoint];
  2012. }
  2013. if (strict && contains(invalidReferenceCodePoints, codePoint)) {
  2014. parseError('disallowed character reference');
  2015. }
  2016. if (codePoint > 0xFFFF) {
  2017. codePoint -= 0x10000;
  2018. output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
  2019. codePoint = 0xDC00 | codePoint & 0x3FF;
  2020. }
  2021. output += stringFromCharCode(codePoint);
  2022. return output;
  2023. };
  2024. var hexEscape = function(codePoint) {
  2025. return '&#x' + codePoint.toString(16).toUpperCase() + ';';
  2026. };
  2027. var decEscape = function(codePoint) {
  2028. return '&#' + codePoint + ';';
  2029. };
  2030. var parseError = function(message) {
  2031. throw Error('Parse error: ' + message);
  2032. };
  2033. /*--------------------------------------------------------------------------*/
  2034. var encode = function(string, options) {
  2035. options = merge(options, encode.options);
  2036. var strict = options.strict;
  2037. if (strict && regexInvalidRawCodePoint.test(string)) {
  2038. parseError('forbidden code point');
  2039. }
  2040. var encodeEverything = options.encodeEverything;
  2041. var useNamedReferences = options.useNamedReferences;
  2042. var allowUnsafeSymbols = options.allowUnsafeSymbols;
  2043. var escapeCodePoint = options.decimal ? decEscape : hexEscape;
  2044. var escapeBmpSymbol = function(symbol) {
  2045. return escapeCodePoint(symbol.charCodeAt(0));
  2046. };
  2047. if (encodeEverything) {
  2048. // Encode ASCII symbols.
  2049. string = string.replace(regexAsciiWhitelist, function(symbol) {
  2050. // Use named references if requested & possible.
  2051. if (useNamedReferences && has(encodeMap, symbol)) {
  2052. return '&' + encodeMap[symbol] + ';';
  2053. }
  2054. return escapeBmpSymbol(symbol);
  2055. });
  2056. // Shorten a few escapes that represent two symbols, of which at least one
  2057. // is within the ASCII range.
  2058. if (useNamedReferences) {
  2059. string = string
  2060. .replace(/&gt;\u20D2/g, '&nvgt;')
  2061. .replace(/&lt;\u20D2/g, '&nvlt;')
  2062. .replace(/&#x66;&#x6A;/g, '&fjlig;');
  2063. }
  2064. // Encode non-ASCII symbols.
  2065. if (useNamedReferences) {
  2066. // Encode non-ASCII symbols that can be replaced with a named reference.
  2067. string = string.replace(regexEncodeNonAscii, function(string) {
  2068. // Note: there is no need to check `has(encodeMap, string)` here.
  2069. return '&' + encodeMap[string] + ';';
  2070. });
  2071. }
  2072. // Note: any remaining non-ASCII symbols are handled outside of the `if`.
  2073. } else if (useNamedReferences) {
  2074. // Apply named character references.
  2075. // Encode `<>"'&` using named character references.
  2076. if (!allowUnsafeSymbols) {
  2077. string = string.replace(regexEscape, function(string) {
  2078. return '&' + encodeMap[string] + ';'; // no need to check `has()` here
  2079. });
  2080. }
  2081. // Shorten escapes that represent two symbols, of which at least one is
  2082. // `<>"'&`.
  2083. string = string
  2084. .replace(/&gt;\u20D2/g, '&nvgt;')
  2085. .replace(/&lt;\u20D2/g, '&nvlt;');
  2086. // Encode non-ASCII symbols that can be replaced with a named reference.
  2087. string = string.replace(regexEncodeNonAscii, function(string) {
  2088. // Note: there is no need to check `has(encodeMap, string)` here.
  2089. return '&' + encodeMap[string] + ';';
  2090. });
  2091. } else if (!allowUnsafeSymbols) {
  2092. // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
  2093. // using named character references.
  2094. string = string.replace(regexEscape, escapeBmpSymbol);
  2095. }
  2096. return string
  2097. // Encode astral symbols.
  2098. .replace(regexAstralSymbols, function($0) {
  2099. // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  2100. var high = $0.charCodeAt(0);
  2101. var low = $0.charCodeAt(1);
  2102. var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
  2103. return escapeCodePoint(codePoint);
  2104. })
  2105. // Encode any remaining BMP symbols that are not printable ASCII symbols
  2106. // using a hexadecimal escape.
  2107. .replace(regexBmpWhitelist, escapeBmpSymbol);
  2108. };
  2109. // Expose default options (so they can be overridden globally).
  2110. encode.options = {
  2111. 'allowUnsafeSymbols': false,
  2112. 'encodeEverything': false,
  2113. 'strict': false,
  2114. 'useNamedReferences': false,
  2115. 'decimal' : false
  2116. };
  2117. var decode = function(html, options) {
  2118. options = merge(options, decode.options);
  2119. var strict = options.strict;
  2120. if (strict && regexInvalidEntity.test(html)) {
  2121. parseError('malformed character reference');
  2122. }
  2123. return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7) {
  2124. var codePoint;
  2125. var semicolon;
  2126. var decDigits;
  2127. var hexDigits;
  2128. var reference;
  2129. var next;
  2130. if ($1) {
  2131. // Decode decimal escapes, e.g. `&#119558;`.
  2132. decDigits = $1;
  2133. semicolon = $2;
  2134. if (strict && !semicolon) {
  2135. parseError('character reference was not terminated by a semicolon');
  2136. }
  2137. codePoint = parseInt(decDigits, 10);
  2138. return codePointToSymbol(codePoint, strict);
  2139. }
  2140. if ($3) {
  2141. // Decode hexadecimal escapes, e.g. `&#x1D306;`.
  2142. hexDigits = $3;
  2143. semicolon = $4;
  2144. if (strict && !semicolon) {
  2145. parseError('character reference was not terminated by a semicolon');
  2146. }
  2147. codePoint = parseInt(hexDigits, 16);
  2148. return codePointToSymbol(codePoint, strict);
  2149. }
  2150. if ($5) {
  2151. // Decode named character references with trailing `;`, e.g. `&copy;`.
  2152. reference = $5;
  2153. if (has(decodeMap, reference)) {
  2154. return decodeMap[reference];
  2155. } else {
  2156. // Ambiguous ampersand. https://mths.be/notes/ambiguous-ampersands
  2157. if (strict) {
  2158. parseError(
  2159. 'named character reference was not terminated by a semicolon'
  2160. );
  2161. }
  2162. return $0;
  2163. }
  2164. }
  2165. // If we’re still here, it’s a legacy reference for sure. No need for an
  2166. // extra `if` check.
  2167. // Decode named character references without trailing `;`, e.g. `&amp`
  2168. // This is only a parse error if it gets converted to `&`, or if it is
  2169. // followed by `=` in an attribute context.
  2170. reference = $6;
  2171. next = $7;
  2172. if (next && options.isAttributeValue) {
  2173. if (strict && next == '=') {
  2174. parseError('`&` did not start a character reference');
  2175. }
  2176. return $0;
  2177. } else {
  2178. if (strict) {
  2179. parseError(
  2180. 'named character reference was not terminated by a semicolon'
  2181. );
  2182. }
  2183. // Note: there is no need to check `has(decodeMapLegacy, reference)`.
  2184. return decodeMapLegacy[reference] + (next || '');
  2185. }
  2186. });
  2187. };
  2188. // Expose default options (so they can be overridden globally).
  2189. decode.options = {
  2190. 'isAttributeValue': false,
  2191. 'strict': false
  2192. };
  2193. var escape = function(string) {
  2194. return string.replace(regexEscape, function($0) {
  2195. // Note: there is no need to check `has(escapeMap, $0)` here.
  2196. return escapeMap[$0];
  2197. });
  2198. };
  2199. /*--------------------------------------------------------------------------*/
  2200. var he = {
  2201. 'version': '1.1.1',
  2202. 'encode': encode,
  2203. 'decode': decode,
  2204. 'escape': escape,
  2205. 'unescape': decode
  2206. };
  2207. // Some AMD build optimizers, like r.js, check for specific condition patterns
  2208. // like the following:
  2209. if (
  2210. typeof undefined == 'function' &&
  2211. typeof undefined.amd == 'object' &&
  2212. undefined.amd
  2213. ) {
  2214. undefined(function() {
  2215. return he;
  2216. });
  2217. } else if (freeExports && !freeExports.nodeType) {
  2218. if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+
  2219. freeModule.exports = he;
  2220. } else { // in Narwhal or RingoJS v0.7.0-
  2221. for (var key in he) {
  2222. has(he, key) && (freeExports[key] = he[key]);
  2223. }
  2224. }
  2225. } else { // in Rhino or a web browser
  2226. root.he = he;
  2227. }
  2228. }(commonjsGlobal));
  2229. });
  2230. /* */
  2231. /**
  2232. * Cross-platform code generation for component v-model
  2233. */
  2234. function genComponentModel (
  2235. el,
  2236. value,
  2237. modifiers
  2238. ) {
  2239. var ref = modifiers || {};
  2240. var number = ref.number;
  2241. var trim = ref.trim;
  2242. var baseValueExpression = '$$v';
  2243. var valueExpression = baseValueExpression;
  2244. if (trim) {
  2245. valueExpression =
  2246. "(typeof " + baseValueExpression + " === 'string'" +
  2247. "? " + baseValueExpression + ".trim()" +
  2248. ": " + baseValueExpression + ")";
  2249. }
  2250. if (number) {
  2251. valueExpression = "_n(" + valueExpression + ")";
  2252. }
  2253. var assignment = genAssignmentCode(value, valueExpression);
  2254. el.model = {
  2255. value: ("(" + value + ")"),
  2256. expression: ("\"" + value + "\""),
  2257. callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
  2258. };
  2259. }
  2260. /**
  2261. * Cross-platform codegen helper for generating v-model value assignment code.
  2262. */
  2263. function genAssignmentCode (
  2264. value,
  2265. assignment
  2266. ) {
  2267. var res = parseModel(value);
  2268. if (res.key === null) {
  2269. return (value + "=" + assignment)
  2270. } else {
  2271. return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
  2272. }
  2273. }
  2274. /**
  2275. * Parse a v-model expression into a base path and a final key segment.
  2276. * Handles both dot-path and possible square brackets.
  2277. *
  2278. * Possible cases:
  2279. *
  2280. * - test
  2281. * - test[key]
  2282. * - test[test1[key]]
  2283. * - test["a"][key]
  2284. * - xxx.test[a[a].test1[key]]
  2285. * - test.xxx.a["asa"][test1[key]]
  2286. *
  2287. */
  2288. var len;
  2289. var str;
  2290. var chr;
  2291. var index;
  2292. var expressionPos;
  2293. var expressionEndPos;
  2294. function parseModel (val) {
  2295. // Fix https://github.com/vuejs/vue/pull/7730
  2296. // allow v-model="obj.val " (trailing whitespace)
  2297. val = val.trim();
  2298. len = val.length;
  2299. if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
  2300. index = val.lastIndexOf('.');
  2301. if (index > -1) {
  2302. return {
  2303. exp: val.slice(0, index),
  2304. key: '"' + val.slice(index + 1) + '"'
  2305. }
  2306. } else {
  2307. return {
  2308. exp: val,
  2309. key: null
  2310. }
  2311. }
  2312. }
  2313. str = val;
  2314. index = expressionPos = expressionEndPos = 0;
  2315. while (!eof()) {
  2316. chr = next();
  2317. /* istanbul ignore if */
  2318. if (isStringStart(chr)) {
  2319. parseString(chr);
  2320. } else if (chr === 0x5B) {
  2321. parseBracket(chr);
  2322. }
  2323. }
  2324. return {
  2325. exp: val.slice(0, expressionPos),
  2326. key: val.slice(expressionPos + 1, expressionEndPos)
  2327. }
  2328. }
  2329. function next () {
  2330. return str.charCodeAt(++index)
  2331. }
  2332. function eof () {
  2333. return index >= len
  2334. }
  2335. function isStringStart (chr) {
  2336. return chr === 0x22 || chr === 0x27
  2337. }
  2338. function parseBracket (chr) {
  2339. var inBracket = 1;
  2340. expressionPos = index;
  2341. while (!eof()) {
  2342. chr = next();
  2343. if (isStringStart(chr)) {
  2344. parseString(chr);
  2345. continue
  2346. }
  2347. if (chr === 0x5B) { inBracket++; }
  2348. if (chr === 0x5D) { inBracket--; }
  2349. if (inBracket === 0) {
  2350. expressionEndPos = index;
  2351. break
  2352. }
  2353. }
  2354. }
  2355. function parseString (chr) {
  2356. var stringQuote = chr;
  2357. while (!eof()) {
  2358. chr = next();
  2359. if (chr === stringQuote) {
  2360. break
  2361. }
  2362. }
  2363. }
  2364. /* */
  2365. var onRE = /^@|^v-on:/;
  2366. var dirRE = /^v-|^@|^:/;
  2367. var forAliasRE = /([^]*?)\s+(?:in|of)\s+([^]*)/;
  2368. var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
  2369. var stripParensRE = /^\(|\)$/g;
  2370. var argRE = /:(.*)$/;
  2371. var bindRE = /^:|^v-bind:/;
  2372. var modifierRE = /\.[^.]+/g;
  2373. var decodeHTMLCached = cached(he.decode);
  2374. // configurable state
  2375. var warn$1;
  2376. var delimiters;
  2377. var transforms;
  2378. var preTransforms;
  2379. var postTransforms;
  2380. var platformIsPreTag;
  2381. var platformMustUseProp;
  2382. var platformGetTagNamespace;
  2383. function createASTElement (
  2384. tag,
  2385. attrs,
  2386. parent
  2387. ) {
  2388. return {
  2389. type: 1,
  2390. tag: tag,
  2391. attrsList: attrs,
  2392. attrsMap: makeAttrsMap(attrs),
  2393. parent: parent,
  2394. children: []
  2395. }
  2396. }
  2397. /**
  2398. * Convert HTML string to AST.
  2399. */
  2400. function parse (
  2401. template,
  2402. options
  2403. ) {
  2404. warn$1 = options.warn || baseWarn;
  2405. platformIsPreTag = options.isPreTag || no;
  2406. platformMustUseProp = options.mustUseProp || no;
  2407. platformGetTagNamespace = options.getTagNamespace || no;
  2408. transforms = pluckModuleFunction(options.modules, 'transformNode');
  2409. preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
  2410. postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
  2411. delimiters = options.delimiters;
  2412. var stack = [];
  2413. var preserveWhitespace = options.preserveWhitespace !== false;
  2414. var root;
  2415. var currentParent;
  2416. var inVPre = false;
  2417. var inPre = false;
  2418. var warned = false;
  2419. function warnOnce (msg) {
  2420. if (!warned) {
  2421. warned = true;
  2422. warn$1(msg);
  2423. }
  2424. }
  2425. function closeElement (element) {
  2426. // check pre state
  2427. if (element.pre) {
  2428. inVPre = false;
  2429. }
  2430. if (platformIsPreTag(element.tag)) {
  2431. inPre = false;
  2432. }
  2433. // apply post-transforms
  2434. for (var i = 0; i < postTransforms.length; i++) {
  2435. postTransforms[i](element, options);
  2436. }
  2437. }
  2438. parseHTML(template, {
  2439. warn: warn$1,
  2440. expectHTML: options.expectHTML,
  2441. isUnaryTag: options.isUnaryTag,
  2442. canBeLeftOpenTag: options.canBeLeftOpenTag,
  2443. shouldDecodeNewlines: options.shouldDecodeNewlines,
  2444. shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
  2445. shouldKeepComment: options.comments,
  2446. start: function start (tag, attrs, unary) {
  2447. // check namespace.
  2448. // inherit parent ns if there is one
  2449. var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
  2450. // handle IE svg bug
  2451. /* istanbul ignore if */
  2452. if (isIE && ns === 'svg') {
  2453. attrs = guardIESVGBug(attrs);
  2454. }
  2455. var element = createASTElement(tag, attrs, currentParent);
  2456. if (ns) {
  2457. element.ns = ns;
  2458. }
  2459. if (isForbiddenTag(element) && !isServerRendering()) {
  2460. element.forbidden = true;
  2461. "development" !== 'production' && warn$1(
  2462. 'Templates should only be responsible for mapping the state to the ' +
  2463. 'UI. Avoid placing tags with side-effects in your templates, such as ' +
  2464. "<" + tag + ">" + ', as they will not be parsed.'
  2465. );
  2466. }
  2467. // apply pre-transforms
  2468. for (var i = 0; i < preTransforms.length; i++) {
  2469. element = preTransforms[i](element, options) || element;
  2470. }
  2471. if (!inVPre) {
  2472. processPre(element);
  2473. if (element.pre) {
  2474. inVPre = true;
  2475. }
  2476. }
  2477. if (platformIsPreTag(element.tag)) {
  2478. inPre = true;
  2479. }
  2480. if (inVPre) {
  2481. processRawAttrs(element);
  2482. } else if (!element.processed) {
  2483. // structural directives
  2484. processFor(element);
  2485. processIf(element);
  2486. processOnce(element);
  2487. // element-scope stuff
  2488. processElement(element, options);
  2489. }
  2490. function checkRootConstraints (el) {
  2491. {
  2492. if (el.tag === 'slot' || el.tag === 'template') {
  2493. warnOnce(
  2494. "Cannot use <" + (el.tag) + "> as component root element because it may " +
  2495. 'contain multiple nodes.'
  2496. );
  2497. }
  2498. if (el.attrsMap.hasOwnProperty('v-for')) {
  2499. warnOnce(
  2500. 'Cannot use v-for on stateful component root element because ' +
  2501. 'it renders multiple elements.'
  2502. );
  2503. }
  2504. }
  2505. }
  2506. // tree management
  2507. if (!root) {
  2508. root = element;
  2509. checkRootConstraints(root);
  2510. } else if (!stack.length) {
  2511. // allow root elements with v-if, v-else-if and v-else
  2512. if (root.if && (element.elseif || element.else)) {
  2513. checkRootConstraints(element);
  2514. addIfCondition(root, {
  2515. exp: element.elseif,
  2516. block: element
  2517. });
  2518. } else {
  2519. warnOnce(
  2520. "Component template should contain exactly one root element. " +
  2521. "If you are using v-if on multiple elements, " +
  2522. "use v-else-if to chain them instead."
  2523. );
  2524. }
  2525. }
  2526. if (currentParent && !element.forbidden) {
  2527. if (element.elseif || element.else) {
  2528. processIfConditions(element, currentParent);
  2529. } else if (element.slotScope) { // scoped slot
  2530. currentParent.plain = false;
  2531. var name = element.slotTarget || '"default"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
  2532. } else {
  2533. currentParent.children.push(element);
  2534. element.parent = currentParent;
  2535. }
  2536. }
  2537. if (!unary) {
  2538. currentParent = element;
  2539. stack.push(element);
  2540. } else {
  2541. closeElement(element);
  2542. }
  2543. },
  2544. end: function end () {
  2545. // remove trailing whitespace
  2546. var element = stack[stack.length - 1];
  2547. var lastNode = element.children[element.children.length - 1];
  2548. if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
  2549. element.children.pop();
  2550. }
  2551. // pop stack
  2552. stack.length -= 1;
  2553. currentParent = stack[stack.length - 1];
  2554. closeElement(element);
  2555. },
  2556. chars: function chars (text) {
  2557. if (!currentParent) {
  2558. {
  2559. if (text === template) {
  2560. warnOnce(
  2561. 'Component template requires a root element, rather than just text.'
  2562. );
  2563. } else if ((text = text.trim())) {
  2564. warnOnce(
  2565. ("text \"" + text + "\" outside root element will be ignored.")
  2566. );
  2567. }
  2568. }
  2569. return
  2570. }
  2571. // IE textarea placeholder bug
  2572. /* istanbul ignore if */
  2573. if (isIE &&
  2574. currentParent.tag === 'textarea' &&
  2575. currentParent.attrsMap.placeholder === text
  2576. ) {
  2577. return
  2578. }
  2579. var children = currentParent.children;
  2580. text = inPre || text.trim()
  2581. ? isTextTag(currentParent) ? text : decodeHTMLCached(text)
  2582. // only preserve whitespace if its not right after a starting tag
  2583. : preserveWhitespace && children.length ? ' ' : '';
  2584. if (text) {
  2585. var res;
  2586. if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
  2587. children.push({
  2588. type: 2,
  2589. expression: res.expression,
  2590. tokens: res.tokens,
  2591. text: text
  2592. });
  2593. } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
  2594. children.push({
  2595. type: 3,
  2596. text: text
  2597. });
  2598. }
  2599. }
  2600. },
  2601. comment: function comment (text) {
  2602. currentParent.children.push({
  2603. type: 3,
  2604. text: text,
  2605. isComment: true
  2606. });
  2607. }
  2608. });
  2609. return root
  2610. }
  2611. function processPre (el) {
  2612. if (getAndRemoveAttr(el, 'v-pre') != null) {
  2613. el.pre = true;
  2614. }
  2615. }
  2616. function processRawAttrs (el) {
  2617. var l = el.attrsList.length;
  2618. if (l) {
  2619. var attrs = el.attrs = new Array(l);
  2620. for (var i = 0; i < l; i++) {
  2621. attrs[i] = {
  2622. name: el.attrsList[i].name,
  2623. value: JSON.stringify(el.attrsList[i].value)
  2624. };
  2625. }
  2626. } else if (!el.pre) {
  2627. // non root node in pre blocks with no attributes
  2628. el.plain = true;
  2629. }
  2630. }
  2631. function processElement (element, options) {
  2632. processKey(element);
  2633. // determine whether this is a plain element after
  2634. // removing structural attributes
  2635. element.plain = !element.key && !element.attrsList.length;
  2636. processRef(element);
  2637. processSlot(element);
  2638. processComponent(element);
  2639. for (var i = 0; i < transforms.length; i++) {
  2640. element = transforms[i](element, options) || element;
  2641. }
  2642. processAttrs(element);
  2643. }
  2644. function processKey (el) {
  2645. var exp = getBindingAttr(el, 'key');
  2646. if (exp) {
  2647. if ("development" !== 'production' && el.tag === 'template') {
  2648. warn$1("<template> cannot be keyed. Place the key on real elements instead.");
  2649. }
  2650. el.key = exp;
  2651. }
  2652. }
  2653. function processRef (el) {
  2654. var ref = getBindingAttr(el, 'ref');
  2655. if (ref) {
  2656. el.ref = ref;
  2657. el.refInFor = checkInFor(el);
  2658. }
  2659. }
  2660. function processFor (el) {
  2661. var exp;
  2662. if ((exp = getAndRemoveAttr(el, 'v-for'))) {
  2663. var res = parseFor(exp);
  2664. if (res) {
  2665. extend(el, res);
  2666. } else {
  2667. warn$1(
  2668. ("Invalid v-for expression: " + exp)
  2669. );
  2670. }
  2671. }
  2672. }
  2673. function parseFor (exp) {
  2674. var inMatch = exp.match(forAliasRE);
  2675. if (!inMatch) { return }
  2676. var res = {};
  2677. res.for = inMatch[2].trim();
  2678. var alias = inMatch[1].trim().replace(stripParensRE, '');
  2679. var iteratorMatch = alias.match(forIteratorRE);
  2680. if (iteratorMatch) {
  2681. res.alias = alias.replace(forIteratorRE, '');
  2682. res.iterator1 = iteratorMatch[1].trim();
  2683. if (iteratorMatch[2]) {
  2684. res.iterator2 = iteratorMatch[2].trim();
  2685. }
  2686. } else {
  2687. res.alias = alias;
  2688. }
  2689. return res
  2690. }
  2691. function processIf (el) {
  2692. var exp = getAndRemoveAttr(el, 'v-if');
  2693. if (exp) {
  2694. el.if = exp;
  2695. addIfCondition(el, {
  2696. exp: exp,
  2697. block: el
  2698. });
  2699. } else {
  2700. if (getAndRemoveAttr(el, 'v-else') != null) {
  2701. el.else = true;
  2702. }
  2703. var elseif = getAndRemoveAttr(el, 'v-else-if');
  2704. if (elseif) {
  2705. el.elseif = elseif;
  2706. }
  2707. }
  2708. }
  2709. function processIfConditions (el, parent) {
  2710. var prev = findPrevElement(parent.children);
  2711. if (prev && prev.if) {
  2712. addIfCondition(prev, {
  2713. exp: el.elseif,
  2714. block: el
  2715. });
  2716. } else {
  2717. warn$1(
  2718. "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
  2719. "used on element <" + (el.tag) + "> without corresponding v-if."
  2720. );
  2721. }
  2722. }
  2723. function findPrevElement (children) {
  2724. var i = children.length;
  2725. while (i--) {
  2726. if (children[i].type === 1) {
  2727. return children[i]
  2728. } else {
  2729. if ("development" !== 'production' && children[i].text !== ' ') {
  2730. warn$1(
  2731. "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
  2732. "will be ignored."
  2733. );
  2734. }
  2735. children.pop();
  2736. }
  2737. }
  2738. }
  2739. function addIfCondition (el, condition) {
  2740. if (!el.ifConditions) {
  2741. el.ifConditions = [];
  2742. }
  2743. el.ifConditions.push(condition);
  2744. }
  2745. function processOnce (el) {
  2746. var once$$1 = getAndRemoveAttr(el, 'v-once');
  2747. if (once$$1 != null) {
  2748. el.once = true;
  2749. }
  2750. }
  2751. function processSlot (el) {
  2752. if (el.tag === 'slot') {
  2753. el.slotName = getBindingAttr(el, 'name');
  2754. if ("development" !== 'production' && el.key) {
  2755. warn$1(
  2756. "`key` does not work on <slot> because slots are abstract outlets " +
  2757. "and can possibly expand into multiple elements. " +
  2758. "Use the key on a wrapping element instead."
  2759. );
  2760. }
  2761. } else {
  2762. var slotScope;
  2763. if (el.tag === 'template') {
  2764. slotScope = getAndRemoveAttr(el, 'scope');
  2765. /* istanbul ignore if */
  2766. if ("development" !== 'production' && slotScope) {
  2767. warn$1(
  2768. "the \"scope\" attribute for scoped slots have been deprecated and " +
  2769. "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
  2770. "can also be used on plain elements in addition to <template> to " +
  2771. "denote scoped slots.",
  2772. true
  2773. );
  2774. }
  2775. el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
  2776. } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
  2777. /* istanbul ignore if */
  2778. if ("development" !== 'production' && el.attrsMap['v-for']) {
  2779. warn$1(
  2780. "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
  2781. "(v-for takes higher priority). Use a wrapper <template> for the " +
  2782. "scoped slot to make it clearer.",
  2783. true
  2784. );
  2785. }
  2786. el.slotScope = slotScope;
  2787. }
  2788. var slotTarget = getBindingAttr(el, 'slot');
  2789. if (slotTarget) {
  2790. el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
  2791. // preserve slot as an attribute for native shadow DOM compat
  2792. // only for non-scoped slots.
  2793. if (el.tag !== 'template' && !el.slotScope) {
  2794. addAttr(el, 'slot', slotTarget);
  2795. }
  2796. }
  2797. }
  2798. }
  2799. function processComponent (el) {
  2800. var binding;
  2801. if ((binding = getBindingAttr(el, 'is'))) {
  2802. el.component = binding;
  2803. }
  2804. if (getAndRemoveAttr(el, 'inline-template') != null) {
  2805. el.inlineTemplate = true;
  2806. }
  2807. }
  2808. function processAttrs (el) {
  2809. var list = el.attrsList;
  2810. var i, l, name, rawName, value, modifiers, isProp;
  2811. for (i = 0, l = list.length; i < l; i++) {
  2812. name = rawName = list[i].name;
  2813. value = list[i].value;
  2814. if (dirRE.test(name)) {
  2815. // mark element as dynamic
  2816. el.hasBindings = true;
  2817. // modifiers
  2818. modifiers = parseModifiers(name);
  2819. if (modifiers) {
  2820. name = name.replace(modifierRE, '');
  2821. }
  2822. if (bindRE.test(name)) { // v-bind
  2823. name = name.replace(bindRE, '');
  2824. value = parseFilters(value);
  2825. isProp = false;
  2826. if (modifiers) {
  2827. if (modifiers.prop) {
  2828. isProp = true;
  2829. name = camelize(name);
  2830. if (name === 'innerHtml') { name = 'innerHTML'; }
  2831. }
  2832. if (modifiers.camel) {
  2833. name = camelize(name);
  2834. }
  2835. if (modifiers.sync) {
  2836. addHandler(
  2837. el,
  2838. ("update:" + (camelize(name))),
  2839. genAssignmentCode(value, "$event")
  2840. );
  2841. }
  2842. }
  2843. if (isProp || (
  2844. !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
  2845. )) {
  2846. addProp(el, name, value);
  2847. } else {
  2848. addAttr(el, name, value);
  2849. }
  2850. } else if (onRE.test(name)) { // v-on
  2851. name = name.replace(onRE, '');
  2852. addHandler(el, name, value, modifiers, false, warn$1);
  2853. } else { // normal directives
  2854. name = name.replace(dirRE, '');
  2855. // parse arg
  2856. var argMatch = name.match(argRE);
  2857. var arg = argMatch && argMatch[1];
  2858. if (arg) {
  2859. name = name.slice(0, -(arg.length + 1));
  2860. }
  2861. addDirective(el, name, rawName, value, arg, modifiers);
  2862. if ("development" !== 'production' && name === 'model') {
  2863. checkForAliasModel(el, value);
  2864. }
  2865. }
  2866. } else {
  2867. // literal attribute
  2868. {
  2869. var res = parseText(value, delimiters);
  2870. if (res) {
  2871. warn$1(
  2872. name + "=\"" + value + "\": " +
  2873. 'Interpolation inside attributes has been removed. ' +
  2874. 'Use v-bind or the colon shorthand instead. For example, ' +
  2875. 'instead of <div id="{{ val }}">, use <div :id="val">.'
  2876. );
  2877. }
  2878. }
  2879. addAttr(el, name, JSON.stringify(value));
  2880. // #6887 firefox doesn't update muted state if set via attribute
  2881. // even immediately after element creation
  2882. if (!el.component &&
  2883. name === 'muted' &&
  2884. platformMustUseProp(el.tag, el.attrsMap.type, name)) {
  2885. addProp(el, name, 'true');
  2886. }
  2887. }
  2888. }
  2889. }
  2890. function checkInFor (el) {
  2891. var parent = el;
  2892. while (parent) {
  2893. if (parent.for !== undefined) {
  2894. return true
  2895. }
  2896. parent = parent.parent;
  2897. }
  2898. return false
  2899. }
  2900. function parseModifiers (name) {
  2901. var match = name.match(modifierRE);
  2902. if (match) {
  2903. var ret = {};
  2904. match.forEach(function (m) { ret[m.slice(1)] = true; });
  2905. return ret
  2906. }
  2907. }
  2908. function makeAttrsMap (attrs) {
  2909. var map = {};
  2910. for (var i = 0, l = attrs.length; i < l; i++) {
  2911. if (
  2912. "development" !== 'production' &&
  2913. map[attrs[i].name] && !isIE && !isEdge
  2914. ) {
  2915. warn$1('duplicate attribute: ' + attrs[i].name);
  2916. }
  2917. map[attrs[i].name] = attrs[i].value;
  2918. }
  2919. return map
  2920. }
  2921. // for script (e.g. type="x/template") or style, do not decode content
  2922. function isTextTag (el) {
  2923. return el.tag === 'script' || el.tag === 'style'
  2924. }
  2925. function isForbiddenTag (el) {
  2926. return (
  2927. el.tag === 'style' ||
  2928. (el.tag === 'script' && (
  2929. !el.attrsMap.type ||
  2930. el.attrsMap.type === 'text/javascript'
  2931. ))
  2932. )
  2933. }
  2934. var ieNSBug = /^xmlns:NS\d+/;
  2935. var ieNSPrefix = /^NS\d+:/;
  2936. /* istanbul ignore next */
  2937. function guardIESVGBug (attrs) {
  2938. var res = [];
  2939. for (var i = 0; i < attrs.length; i++) {
  2940. var attr = attrs[i];
  2941. if (!ieNSBug.test(attr.name)) {
  2942. attr.name = attr.name.replace(ieNSPrefix, '');
  2943. res.push(attr);
  2944. }
  2945. }
  2946. return res
  2947. }
  2948. function checkForAliasModel (el, value) {
  2949. var _el = el;
  2950. while (_el) {
  2951. if (_el.for && _el.alias === value) {
  2952. warn$1(
  2953. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  2954. "You are binding v-model directly to a v-for iteration alias. " +
  2955. "This will not be able to modify the v-for source array because " +
  2956. "writing to the alias is like modifying a function local variable. " +
  2957. "Consider using an array of objects and use v-model on an object property instead."
  2958. );
  2959. }
  2960. _el = _el.parent;
  2961. }
  2962. }
  2963. /* */
  2964. /**
  2965. * Expand input[v-model] with dyanmic type bindings into v-if-else chains
  2966. * Turn this:
  2967. * <input v-model="data[type]" :type="type">
  2968. * into this:
  2969. * <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]">
  2970. * <input v-else-if="type === 'radio'" type="radio" v-model="data[type]">
  2971. * <input v-else :type="type" v-model="data[type]">
  2972. */
  2973. function preTransformNode (el, options) {
  2974. if (el.tag === 'input') {
  2975. var map = el.attrsMap;
  2976. if (!map['v-model']) {
  2977. return
  2978. }
  2979. var typeBinding;
  2980. if (map[':type'] || map['v-bind:type']) {
  2981. typeBinding = getBindingAttr(el, 'type');
  2982. }
  2983. if (!map.type && !typeBinding && map['v-bind']) {
  2984. typeBinding = "(" + (map['v-bind']) + ").type";
  2985. }
  2986. if (typeBinding) {
  2987. var ifCondition = getAndRemoveAttr(el, 'v-if', true);
  2988. var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
  2989. var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
  2990. var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
  2991. // 1. checkbox
  2992. var branch0 = cloneASTElement(el);
  2993. // process for on the main node
  2994. processFor(branch0);
  2995. addRawAttr(branch0, 'type', 'checkbox');
  2996. processElement(branch0, options);
  2997. branch0.processed = true; // prevent it from double-processed
  2998. branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
  2999. addIfCondition(branch0, {
  3000. exp: branch0.if,
  3001. block: branch0
  3002. });
  3003. // 2. add radio else-if condition
  3004. var branch1 = cloneASTElement(el);
  3005. getAndRemoveAttr(branch1, 'v-for', true);
  3006. addRawAttr(branch1, 'type', 'radio');
  3007. processElement(branch1, options);
  3008. addIfCondition(branch0, {
  3009. exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
  3010. block: branch1
  3011. });
  3012. // 3. other
  3013. var branch2 = cloneASTElement(el);
  3014. getAndRemoveAttr(branch2, 'v-for', true);
  3015. addRawAttr(branch2, ':type', typeBinding);
  3016. processElement(branch2, options);
  3017. addIfCondition(branch0, {
  3018. exp: ifCondition,
  3019. block: branch2
  3020. });
  3021. if (hasElse) {
  3022. branch0.else = true;
  3023. } else if (elseIfCondition) {
  3024. branch0.elseif = elseIfCondition;
  3025. }
  3026. return branch0
  3027. }
  3028. }
  3029. }
  3030. function cloneASTElement (el) {
  3031. return createASTElement(el.tag, el.attrsList.slice(), el.parent)
  3032. }
  3033. var model = {
  3034. preTransformNode: preTransformNode
  3035. }
  3036. var modules = [
  3037. klass,
  3038. style,
  3039. model
  3040. ]
  3041. /* */
  3042. var warn$2;
  3043. // in some cases, the event used has to be determined at runtime
  3044. // so we used some reserved tokens during compile.
  3045. var RANGE_TOKEN = '__r';
  3046. function model$1 (
  3047. el,
  3048. dir,
  3049. _warn
  3050. ) {
  3051. warn$2 = _warn;
  3052. var value = dir.value;
  3053. var modifiers = dir.modifiers;
  3054. var tag = el.tag;
  3055. var type = el.attrsMap.type;
  3056. {
  3057. // inputs with type="file" are read only and setting the input's
  3058. // value will throw an error.
  3059. if (tag === 'input' && type === 'file') {
  3060. warn$2(
  3061. "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
  3062. "File inputs are read only. Use a v-on:change listener instead."
  3063. );
  3064. }
  3065. }
  3066. if (el.component) {
  3067. genComponentModel(el, value, modifiers);
  3068. // component v-model doesn't need extra runtime
  3069. return false
  3070. } else if (tag === 'select') {
  3071. genSelect(el, value, modifiers);
  3072. } else if (tag === 'input' && type === 'checkbox') {
  3073. genCheckboxModel(el, value, modifiers);
  3074. } else if (tag === 'input' && type === 'radio') {
  3075. genRadioModel(el, value, modifiers);
  3076. } else if (tag === 'input' || tag === 'textarea') {
  3077. genDefaultModel(el, value, modifiers);
  3078. } else if (!config.isReservedTag(tag)) {
  3079. genComponentModel(el, value, modifiers);
  3080. // component v-model doesn't need extra runtime
  3081. return false
  3082. } else {
  3083. warn$2(
  3084. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  3085. "v-model is not supported on this element type. " +
  3086. 'If you are working with contenteditable, it\'s recommended to ' +
  3087. 'wrap a library dedicated for that purpose inside a custom component.'
  3088. );
  3089. }
  3090. // ensure runtime directive metadata
  3091. return true
  3092. }
  3093. function genCheckboxModel (
  3094. el,
  3095. value,
  3096. modifiers
  3097. ) {
  3098. var number = modifiers && modifiers.number;
  3099. var valueBinding = getBindingAttr(el, 'value') || 'null';
  3100. var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
  3101. var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
  3102. addProp(el, 'checked',
  3103. "Array.isArray(" + value + ")" +
  3104. "?_i(" + value + "," + valueBinding + ")>-1" + (
  3105. trueValueBinding === 'true'
  3106. ? (":(" + value + ")")
  3107. : (":_q(" + value + "," + trueValueBinding + ")")
  3108. )
  3109. );
  3110. addHandler(el, 'change',
  3111. "var $$a=" + value + "," +
  3112. '$$el=$event.target,' +
  3113. "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
  3114. 'if(Array.isArray($$a)){' +
  3115. "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
  3116. '$$i=_i($$a,$$v);' +
  3117. "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" +
  3118. "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" +
  3119. "}else{" + (genAssignmentCode(value, '$$c')) + "}",
  3120. null, true
  3121. );
  3122. }
  3123. function genRadioModel (
  3124. el,
  3125. value,
  3126. modifiers
  3127. ) {
  3128. var number = modifiers && modifiers.number;
  3129. var valueBinding = getBindingAttr(el, 'value') || 'null';
  3130. valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
  3131. addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
  3132. addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
  3133. }
  3134. function genSelect (
  3135. el,
  3136. value,
  3137. modifiers
  3138. ) {
  3139. var number = modifiers && modifiers.number;
  3140. var selectedVal = "Array.prototype.filter" +
  3141. ".call($event.target.options,function(o){return o.selected})" +
  3142. ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
  3143. "return " + (number ? '_n(val)' : 'val') + "})";
  3144. var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
  3145. var code = "var $$selectedVal = " + selectedVal + ";";
  3146. code = code + " " + (genAssignmentCode(value, assignment));
  3147. addHandler(el, 'change', code, null, true);
  3148. }
  3149. function genDefaultModel (
  3150. el,
  3151. value,
  3152. modifiers
  3153. ) {
  3154. var type = el.attrsMap.type;
  3155. // warn if v-bind:value conflicts with v-model
  3156. // except for inputs with v-bind:type
  3157. {
  3158. var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
  3159. var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
  3160. if (value$1 && !typeBinding) {
  3161. var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
  3162. warn$2(
  3163. binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
  3164. 'because the latter already expands to a value binding internally'
  3165. );
  3166. }
  3167. }
  3168. var ref = modifiers || {};
  3169. var lazy = ref.lazy;
  3170. var number = ref.number;
  3171. var trim = ref.trim;
  3172. var needCompositionGuard = !lazy && type !== 'range';
  3173. var event = lazy
  3174. ? 'change'
  3175. : type === 'range'
  3176. ? RANGE_TOKEN
  3177. : 'input';
  3178. var valueExpression = '$event.target.value';
  3179. if (trim) {
  3180. valueExpression = "$event.target.value.trim()";
  3181. }
  3182. if (number) {
  3183. valueExpression = "_n(" + valueExpression + ")";
  3184. }
  3185. var code = genAssignmentCode(value, valueExpression);
  3186. if (needCompositionGuard) {
  3187. code = "if($event.target.composing)return;" + code;
  3188. }
  3189. addProp(el, 'value', ("(" + value + ")"));
  3190. addHandler(el, event, code, null, true);
  3191. if (trim || number) {
  3192. addHandler(el, 'blur', '$forceUpdate()');
  3193. }
  3194. }
  3195. /* */
  3196. function text (el, dir) {
  3197. if (dir.value) {
  3198. addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
  3199. }
  3200. }
  3201. /* */
  3202. function html (el, dir) {
  3203. if (dir.value) {
  3204. addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
  3205. }
  3206. }
  3207. var directives = {
  3208. model: model$1,
  3209. text: text,
  3210. html: html
  3211. }
  3212. /* */
  3213. var baseOptions = {
  3214. expectHTML: true,
  3215. modules: modules,
  3216. directives: directives,
  3217. isPreTag: isPreTag,
  3218. isUnaryTag: isUnaryTag,
  3219. mustUseProp: mustUseProp,
  3220. canBeLeftOpenTag: canBeLeftOpenTag,
  3221. isReservedTag: isReservedTag,
  3222. getTagNamespace: getTagNamespace,
  3223. staticKeys: genStaticKeys(modules)
  3224. };
  3225. /* */
  3226. var isStaticKey;
  3227. var isPlatformReservedTag;
  3228. var genStaticKeysCached = cached(genStaticKeys$1);
  3229. /**
  3230. * Goal of the optimizer: walk the generated template AST tree
  3231. * and detect sub-trees that are purely static, i.e. parts of
  3232. * the DOM that never needs to change.
  3233. *
  3234. * Once we detect these sub-trees, we can:
  3235. *
  3236. * 1. Hoist them into constants, so that we no longer need to
  3237. * create fresh nodes for them on each re-render;
  3238. * 2. Completely skip them in the patching process.
  3239. */
  3240. function optimize (root, options) {
  3241. if (!root) { return }
  3242. isStaticKey = genStaticKeysCached(options.staticKeys || '');
  3243. isPlatformReservedTag = options.isReservedTag || no;
  3244. // first pass: mark all non-static nodes.
  3245. markStatic(root);
  3246. // second pass: mark static roots.
  3247. markStaticRoots(root, false);
  3248. }
  3249. function genStaticKeys$1 (keys) {
  3250. return makeMap(
  3251. 'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +
  3252. (keys ? ',' + keys : '')
  3253. )
  3254. }
  3255. function markStatic (node) {
  3256. node.static = isStatic(node);
  3257. if (node.type === 1) {
  3258. // do not make component slot content static. this avoids
  3259. // 1. components not able to mutate slot nodes
  3260. // 2. static slot content fails for hot-reloading
  3261. if (
  3262. !isPlatformReservedTag(node.tag) &&
  3263. node.tag !== 'slot' &&
  3264. node.attrsMap['inline-template'] == null
  3265. ) {
  3266. return
  3267. }
  3268. for (var i = 0, l = node.children.length; i < l; i++) {
  3269. var child = node.children[i];
  3270. markStatic(child);
  3271. if (!child.static) {
  3272. node.static = false;
  3273. }
  3274. }
  3275. if (node.ifConditions) {
  3276. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  3277. var block = node.ifConditions[i$1].block;
  3278. markStatic(block);
  3279. if (!block.static) {
  3280. node.static = false;
  3281. }
  3282. }
  3283. }
  3284. }
  3285. }
  3286. function markStaticRoots (node, isInFor) {
  3287. if (node.type === 1) {
  3288. if (node.static || node.once) {
  3289. node.staticInFor = isInFor;
  3290. }
  3291. // For a node to qualify as a static root, it should have children that
  3292. // are not just static text. Otherwise the cost of hoisting out will
  3293. // outweigh the benefits and it's better off to just always render it fresh.
  3294. if (node.static && node.children.length && !(
  3295. node.children.length === 1 &&
  3296. node.children[0].type === 3
  3297. )) {
  3298. node.staticRoot = true;
  3299. return
  3300. } else {
  3301. node.staticRoot = false;
  3302. }
  3303. if (node.children) {
  3304. for (var i = 0, l = node.children.length; i < l; i++) {
  3305. markStaticRoots(node.children[i], isInFor || !!node.for);
  3306. }
  3307. }
  3308. if (node.ifConditions) {
  3309. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  3310. markStaticRoots(node.ifConditions[i$1].block, isInFor);
  3311. }
  3312. }
  3313. }
  3314. }
  3315. function isStatic (node) {
  3316. if (node.type === 2) { // expression
  3317. return false
  3318. }
  3319. if (node.type === 3) { // text
  3320. return true
  3321. }
  3322. return !!(node.pre || (
  3323. !node.hasBindings && // no dynamic bindings
  3324. !node.if && !node.for && // not v-if or v-for or v-else
  3325. !isBuiltInTag(node.tag) && // not a built-in
  3326. isPlatformReservedTag(node.tag) && // not a component
  3327. !isDirectChildOfTemplateFor(node) &&
  3328. Object.keys(node).every(isStaticKey)
  3329. ))
  3330. }
  3331. function isDirectChildOfTemplateFor (node) {
  3332. while (node.parent) {
  3333. node = node.parent;
  3334. if (node.tag !== 'template') {
  3335. return false
  3336. }
  3337. if (node.for) {
  3338. return true
  3339. }
  3340. }
  3341. return false
  3342. }
  3343. /* */
  3344. var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
  3345. var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
  3346. // KeyboardEvent.keyCode aliases
  3347. var keyCodes = {
  3348. esc: 27,
  3349. tab: 9,
  3350. enter: 13,
  3351. space: 32,
  3352. up: 38,
  3353. left: 37,
  3354. right: 39,
  3355. down: 40,
  3356. 'delete': [8, 46]
  3357. };
  3358. // KeyboardEvent.key aliases
  3359. var keyNames = {
  3360. esc: 'Escape',
  3361. tab: 'Tab',
  3362. enter: 'Enter',
  3363. space: ' ',
  3364. // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
  3365. up: ['Up', 'ArrowUp'],
  3366. left: ['Left', 'ArrowLeft'],
  3367. right: ['Right', 'ArrowRight'],
  3368. down: ['Down', 'ArrowDown'],
  3369. 'delete': ['Backspace', 'Delete']
  3370. };
  3371. // #4868: modifiers that prevent the execution of the listener
  3372. // need to explicitly return null so that we can determine whether to remove
  3373. // the listener for .once
  3374. var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
  3375. var modifierCode = {
  3376. stop: '$event.stopPropagation();',
  3377. prevent: '$event.preventDefault();',
  3378. self: genGuard("$event.target !== $event.currentTarget"),
  3379. ctrl: genGuard("!$event.ctrlKey"),
  3380. shift: genGuard("!$event.shiftKey"),
  3381. alt: genGuard("!$event.altKey"),
  3382. meta: genGuard("!$event.metaKey"),
  3383. left: genGuard("'button' in $event && $event.button !== 0"),
  3384. middle: genGuard("'button' in $event && $event.button !== 1"),
  3385. right: genGuard("'button' in $event && $event.button !== 2")
  3386. };
  3387. function genHandlers (
  3388. events,
  3389. isNative,
  3390. warn
  3391. ) {
  3392. var res = isNative ? 'nativeOn:{' : 'on:{';
  3393. for (var name in events) {
  3394. res += "\"" + name + "\":" + (genHandler(name, events[name])) + ",";
  3395. }
  3396. return res.slice(0, -1) + '}'
  3397. }
  3398. function genHandler (
  3399. name,
  3400. handler
  3401. ) {
  3402. if (!handler) {
  3403. return 'function(){}'
  3404. }
  3405. if (Array.isArray(handler)) {
  3406. return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]")
  3407. }
  3408. var isMethodPath = simplePathRE.test(handler.value);
  3409. var isFunctionExpression = fnExpRE.test(handler.value);
  3410. if (!handler.modifiers) {
  3411. if (isMethodPath || isFunctionExpression) {
  3412. return handler.value
  3413. }
  3414. /* istanbul ignore if */
  3415. return ("function($event){" + (handler.value) + "}") // inline statement
  3416. } else {
  3417. var code = '';
  3418. var genModifierCode = '';
  3419. var keys = [];
  3420. for (var key in handler.modifiers) {
  3421. if (modifierCode[key]) {
  3422. genModifierCode += modifierCode[key];
  3423. // left/right
  3424. if (keyCodes[key]) {
  3425. keys.push(key);
  3426. }
  3427. } else if (key === 'exact') {
  3428. var modifiers = (handler.modifiers);
  3429. genModifierCode += genGuard(
  3430. ['ctrl', 'shift', 'alt', 'meta']
  3431. .filter(function (keyModifier) { return !modifiers[keyModifier]; })
  3432. .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
  3433. .join('||')
  3434. );
  3435. } else {
  3436. keys.push(key);
  3437. }
  3438. }
  3439. if (keys.length) {
  3440. code += genKeyFilter(keys);
  3441. }
  3442. // Make sure modifiers like prevent and stop get executed after key filtering
  3443. if (genModifierCode) {
  3444. code += genModifierCode;
  3445. }
  3446. var handlerCode = isMethodPath
  3447. ? ("return " + (handler.value) + "($event)")
  3448. : isFunctionExpression
  3449. ? ("return (" + (handler.value) + ")($event)")
  3450. : handler.value;
  3451. /* istanbul ignore if */
  3452. return ("function($event){" + code + handlerCode + "}")
  3453. }
  3454. }
  3455. function genKeyFilter (keys) {
  3456. return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;")
  3457. }
  3458. function genFilterCode (key) {
  3459. var keyVal = parseInt(key, 10);
  3460. if (keyVal) {
  3461. return ("$event.keyCode!==" + keyVal)
  3462. }
  3463. var keyCode = keyCodes[key];
  3464. var keyName = keyNames[key];
  3465. return (
  3466. "_k($event.keyCode," +
  3467. (JSON.stringify(key)) + "," +
  3468. (JSON.stringify(keyCode)) + "," +
  3469. "$event.key," +
  3470. "" + (JSON.stringify(keyName)) +
  3471. ")"
  3472. )
  3473. }
  3474. /* */
  3475. function on (el, dir) {
  3476. if ("development" !== 'production' && dir.modifiers) {
  3477. warn("v-on without argument does not support modifiers.");
  3478. }
  3479. el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
  3480. }
  3481. /* */
  3482. function bind$1 (el, dir) {
  3483. el.wrapData = function (code) {
  3484. return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
  3485. };
  3486. }
  3487. /* */
  3488. var baseDirectives = {
  3489. on: on,
  3490. bind: bind$1,
  3491. cloak: noop
  3492. }
  3493. /* */
  3494. var CodegenState = function CodegenState (options) {
  3495. this.options = options;
  3496. this.warn = options.warn || baseWarn;
  3497. this.transforms = pluckModuleFunction(options.modules, 'transformCode');
  3498. this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
  3499. this.directives = extend(extend({}, baseDirectives), options.directives);
  3500. var isReservedTag = options.isReservedTag || no;
  3501. this.maybeComponent = function (el) { return !isReservedTag(el.tag); };
  3502. this.onceId = 0;
  3503. this.staticRenderFns = [];
  3504. };
  3505. function generate (
  3506. ast,
  3507. options
  3508. ) {
  3509. var state = new CodegenState(options);
  3510. var code = ast ? genElement(ast, state) : '_c("div")';
  3511. return {
  3512. render: ("with(this){return " + code + "}"),
  3513. staticRenderFns: state.staticRenderFns
  3514. }
  3515. }
  3516. function genElement (el, state) {
  3517. if (el.staticRoot && !el.staticProcessed) {
  3518. return genStatic(el, state)
  3519. } else if (el.once && !el.onceProcessed) {
  3520. return genOnce(el, state)
  3521. } else if (el.for && !el.forProcessed) {
  3522. return genFor(el, state)
  3523. } else if (el.if && !el.ifProcessed) {
  3524. return genIf(el, state)
  3525. } else if (el.tag === 'template' && !el.slotTarget) {
  3526. return genChildren(el, state) || 'void 0'
  3527. } else if (el.tag === 'slot') {
  3528. return genSlot(el, state)
  3529. } else {
  3530. // component or element
  3531. var code;
  3532. if (el.component) {
  3533. code = genComponent(el.component, el, state);
  3534. } else {
  3535. var data = el.plain ? undefined : genData$2(el, state);
  3536. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  3537. code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
  3538. }
  3539. // module transforms
  3540. for (var i = 0; i < state.transforms.length; i++) {
  3541. code = state.transforms[i](el, code);
  3542. }
  3543. return code
  3544. }
  3545. }
  3546. // hoist static sub-trees out
  3547. function genStatic (el, state) {
  3548. el.staticProcessed = true;
  3549. state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
  3550. return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
  3551. }
  3552. // v-once
  3553. function genOnce (el, state) {
  3554. el.onceProcessed = true;
  3555. if (el.if && !el.ifProcessed) {
  3556. return genIf(el, state)
  3557. } else if (el.staticInFor) {
  3558. var key = '';
  3559. var parent = el.parent;
  3560. while (parent) {
  3561. if (parent.for) {
  3562. key = parent.key;
  3563. break
  3564. }
  3565. parent = parent.parent;
  3566. }
  3567. if (!key) {
  3568. "development" !== 'production' && state.warn(
  3569. "v-once can only be used inside v-for that is keyed. "
  3570. );
  3571. return genElement(el, state)
  3572. }
  3573. return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
  3574. } else {
  3575. return genStatic(el, state)
  3576. }
  3577. }
  3578. function genIf (
  3579. el,
  3580. state,
  3581. altGen,
  3582. altEmpty
  3583. ) {
  3584. el.ifProcessed = true; // avoid recursion
  3585. return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
  3586. }
  3587. function genIfConditions (
  3588. conditions,
  3589. state,
  3590. altGen,
  3591. altEmpty
  3592. ) {
  3593. if (!conditions.length) {
  3594. return altEmpty || '_e()'
  3595. }
  3596. var condition = conditions.shift();
  3597. if (condition.exp) {
  3598. return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
  3599. } else {
  3600. return ("" + (genTernaryExp(condition.block)))
  3601. }
  3602. // v-if with v-once should generate code like (a)?_m(0):_m(1)
  3603. function genTernaryExp (el) {
  3604. return altGen
  3605. ? altGen(el, state)
  3606. : el.once
  3607. ? genOnce(el, state)
  3608. : genElement(el, state)
  3609. }
  3610. }
  3611. function genFor (
  3612. el,
  3613. state,
  3614. altGen,
  3615. altHelper
  3616. ) {
  3617. var exp = el.for;
  3618. var alias = el.alias;
  3619. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  3620. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  3621. if ("development" !== 'production' &&
  3622. state.maybeComponent(el) &&
  3623. el.tag !== 'slot' &&
  3624. el.tag !== 'template' &&
  3625. !el.key
  3626. ) {
  3627. state.warn(
  3628. "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
  3629. "v-for should have explicit keys. " +
  3630. "See https://vuejs.org/guide/list.html#key for more info.",
  3631. true /* tip */
  3632. );
  3633. }
  3634. el.forProcessed = true; // avoid recursion
  3635. return (altHelper || '_l') + "((" + exp + ")," +
  3636. "function(" + alias + iterator1 + iterator2 + "){" +
  3637. "return " + ((altGen || genElement)(el, state)) +
  3638. '})'
  3639. }
  3640. function genData$2 (el, state) {
  3641. var data = '{';
  3642. // directives first.
  3643. // directives may mutate the el's other properties before they are generated.
  3644. var dirs = genDirectives(el, state);
  3645. if (dirs) { data += dirs + ','; }
  3646. // key
  3647. if (el.key) {
  3648. data += "key:" + (el.key) + ",";
  3649. }
  3650. // ref
  3651. if (el.ref) {
  3652. data += "ref:" + (el.ref) + ",";
  3653. }
  3654. if (el.refInFor) {
  3655. data += "refInFor:true,";
  3656. }
  3657. // pre
  3658. if (el.pre) {
  3659. data += "pre:true,";
  3660. }
  3661. // record original tag name for components using "is" attribute
  3662. if (el.component) {
  3663. data += "tag:\"" + (el.tag) + "\",";
  3664. }
  3665. // module data generation functions
  3666. for (var i = 0; i < state.dataGenFns.length; i++) {
  3667. data += state.dataGenFns[i](el);
  3668. }
  3669. // attributes
  3670. if (el.attrs) {
  3671. data += "attrs:{" + (genProps(el.attrs)) + "},";
  3672. }
  3673. // DOM props
  3674. if (el.props) {
  3675. data += "domProps:{" + (genProps(el.props)) + "},";
  3676. }
  3677. // event handlers
  3678. if (el.events) {
  3679. data += (genHandlers(el.events, false, state.warn)) + ",";
  3680. }
  3681. if (el.nativeEvents) {
  3682. data += (genHandlers(el.nativeEvents, true, state.warn)) + ",";
  3683. }
  3684. // slot target
  3685. // only for non-scoped slots
  3686. if (el.slotTarget && !el.slotScope) {
  3687. data += "slot:" + (el.slotTarget) + ",";
  3688. }
  3689. // scoped slots
  3690. if (el.scopedSlots) {
  3691. data += (genScopedSlots(el.scopedSlots, state)) + ",";
  3692. }
  3693. // component v-model
  3694. if (el.model) {
  3695. data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
  3696. }
  3697. // inline-template
  3698. if (el.inlineTemplate) {
  3699. var inlineTemplate = genInlineTemplate(el, state);
  3700. if (inlineTemplate) {
  3701. data += inlineTemplate + ",";
  3702. }
  3703. }
  3704. data = data.replace(/,$/, '') + '}';
  3705. // v-bind data wrap
  3706. if (el.wrapData) {
  3707. data = el.wrapData(data);
  3708. }
  3709. // v-on data wrap
  3710. if (el.wrapListeners) {
  3711. data = el.wrapListeners(data);
  3712. }
  3713. return data
  3714. }
  3715. function genDirectives (el, state) {
  3716. var dirs = el.directives;
  3717. if (!dirs) { return }
  3718. var res = 'directives:[';
  3719. var hasRuntime = false;
  3720. var i, l, dir, needRuntime;
  3721. for (i = 0, l = dirs.length; i < l; i++) {
  3722. dir = dirs[i];
  3723. needRuntime = true;
  3724. var gen = state.directives[dir.name];
  3725. if (gen) {
  3726. // compile-time directive that manipulates AST.
  3727. // returns true if it also needs a runtime counterpart.
  3728. needRuntime = !!gen(el, dir, state.warn);
  3729. }
  3730. if (needRuntime) {
  3731. hasRuntime = true;
  3732. res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
  3733. }
  3734. }
  3735. if (hasRuntime) {
  3736. return res.slice(0, -1) + ']'
  3737. }
  3738. }
  3739. function genInlineTemplate (el, state) {
  3740. var ast = el.children[0];
  3741. if ("development" !== 'production' && (
  3742. el.children.length !== 1 || ast.type !== 1
  3743. )) {
  3744. state.warn('Inline-template components must have exactly one child element.');
  3745. }
  3746. if (ast.type === 1) {
  3747. var inlineRenderFns = generate(ast, state.options);
  3748. return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
  3749. }
  3750. }
  3751. function genScopedSlots (
  3752. slots,
  3753. state
  3754. ) {
  3755. return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
  3756. return genScopedSlot(key, slots[key], state)
  3757. }).join(',')) + "])")
  3758. }
  3759. function genScopedSlot (
  3760. key,
  3761. el,
  3762. state
  3763. ) {
  3764. if (el.for && !el.forProcessed) {
  3765. return genForScopedSlot(key, el, state)
  3766. }
  3767. var fn = "function(" + (String(el.slotScope)) + "){" +
  3768. "return " + (el.tag === 'template'
  3769. ? el.if
  3770. ? ((el.if) + "?" + (genChildren(el, state) || 'undefined') + ":undefined")
  3771. : genChildren(el, state) || 'undefined'
  3772. : genElement(el, state)) + "}";
  3773. return ("{key:" + key + ",fn:" + fn + "}")
  3774. }
  3775. function genForScopedSlot (
  3776. key,
  3777. el,
  3778. state
  3779. ) {
  3780. var exp = el.for;
  3781. var alias = el.alias;
  3782. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  3783. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  3784. el.forProcessed = true; // avoid recursion
  3785. return "_l((" + exp + ")," +
  3786. "function(" + alias + iterator1 + iterator2 + "){" +
  3787. "return " + (genScopedSlot(key, el, state)) +
  3788. '})'
  3789. }
  3790. function genChildren (
  3791. el,
  3792. state,
  3793. checkSkip,
  3794. altGenElement,
  3795. altGenNode
  3796. ) {
  3797. var children = el.children;
  3798. if (children.length) {
  3799. var el$1 = children[0];
  3800. // optimize single v-for
  3801. if (children.length === 1 &&
  3802. el$1.for &&
  3803. el$1.tag !== 'template' &&
  3804. el$1.tag !== 'slot'
  3805. ) {
  3806. return (altGenElement || genElement)(el$1, state)
  3807. }
  3808. var normalizationType = checkSkip
  3809. ? getNormalizationType(children, state.maybeComponent)
  3810. : 0;
  3811. var gen = altGenNode || genNode;
  3812. return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : ''))
  3813. }
  3814. }
  3815. // determine the normalization needed for the children array.
  3816. // 0: no normalization needed
  3817. // 1: simple normalization needed (possible 1-level deep nested array)
  3818. // 2: full normalization needed
  3819. function getNormalizationType (
  3820. children,
  3821. maybeComponent
  3822. ) {
  3823. var res = 0;
  3824. for (var i = 0; i < children.length; i++) {
  3825. var el = children[i];
  3826. if (el.type !== 1) {
  3827. continue
  3828. }
  3829. if (needsNormalization(el) ||
  3830. (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
  3831. res = 2;
  3832. break
  3833. }
  3834. if (maybeComponent(el) ||
  3835. (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
  3836. res = 1;
  3837. }
  3838. }
  3839. return res
  3840. }
  3841. function needsNormalization (el) {
  3842. return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
  3843. }
  3844. function genNode (node, state) {
  3845. if (node.type === 1) {
  3846. return genElement(node, state)
  3847. } if (node.type === 3 && node.isComment) {
  3848. return genComment(node)
  3849. } else {
  3850. return genText(node)
  3851. }
  3852. }
  3853. function genText (text) {
  3854. return ("_v(" + (text.type === 2
  3855. ? text.expression // no need for () because already wrapped in _s()
  3856. : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
  3857. }
  3858. function genComment (comment) {
  3859. return ("_e(" + (JSON.stringify(comment.text)) + ")")
  3860. }
  3861. function genSlot (el, state) {
  3862. var slotName = el.slotName || '"default"';
  3863. var children = genChildren(el, state);
  3864. var res = "_t(" + slotName + (children ? ("," + children) : '');
  3865. var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
  3866. var bind$$1 = el.attrsMap['v-bind'];
  3867. if ((attrs || bind$$1) && !children) {
  3868. res += ",null";
  3869. }
  3870. if (attrs) {
  3871. res += "," + attrs;
  3872. }
  3873. if (bind$$1) {
  3874. res += (attrs ? '' : ',null') + "," + bind$$1;
  3875. }
  3876. return res + ')'
  3877. }
  3878. // componentName is el.component, take it as argument to shun flow's pessimistic refinement
  3879. function genComponent (
  3880. componentName,
  3881. el,
  3882. state
  3883. ) {
  3884. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  3885. return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
  3886. }
  3887. function genProps (props) {
  3888. var res = '';
  3889. for (var i = 0; i < props.length; i++) {
  3890. var prop = props[i];
  3891. /* istanbul ignore if */
  3892. {
  3893. res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ",";
  3894. }
  3895. }
  3896. return res.slice(0, -1)
  3897. }
  3898. // #3895, #4268
  3899. function transformSpecialNewlines (text) {
  3900. return text
  3901. .replace(/\u2028/g, '\\u2028')
  3902. .replace(/\u2029/g, '\\u2029')
  3903. }
  3904. /* */
  3905. // these keywords should not appear inside expressions, but operators like
  3906. // typeof, instanceof and in are allowed
  3907. var prohibitedKeywordRE = new RegExp('\\b' + (
  3908. 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  3909. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  3910. 'extends,finally,continue,debugger,function,arguments'
  3911. ).split(',').join('\\b|\\b') + '\\b');
  3912. // these unary operators should not be used as property/method names
  3913. var unaryOperatorsRE = new RegExp('\\b' + (
  3914. 'delete,typeof,void'
  3915. ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
  3916. // strip strings in expressions
  3917. var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  3918. // detect problematic expressions in a template
  3919. function detectErrors (ast) {
  3920. var errors = [];
  3921. if (ast) {
  3922. checkNode(ast, errors);
  3923. }
  3924. return errors
  3925. }
  3926. function checkNode (node, errors) {
  3927. if (node.type === 1) {
  3928. for (var name in node.attrsMap) {
  3929. if (dirRE.test(name)) {
  3930. var value = node.attrsMap[name];
  3931. if (value) {
  3932. if (name === 'v-for') {
  3933. checkFor(node, ("v-for=\"" + value + "\""), errors);
  3934. } else if (onRE.test(name)) {
  3935. checkEvent(value, (name + "=\"" + value + "\""), errors);
  3936. } else {
  3937. checkExpression(value, (name + "=\"" + value + "\""), errors);
  3938. }
  3939. }
  3940. }
  3941. }
  3942. if (node.children) {
  3943. for (var i = 0; i < node.children.length; i++) {
  3944. checkNode(node.children[i], errors);
  3945. }
  3946. }
  3947. } else if (node.type === 2) {
  3948. checkExpression(node.expression, node.text, errors);
  3949. }
  3950. }
  3951. function checkEvent (exp, text, errors) {
  3952. var stipped = exp.replace(stripStringRE, '');
  3953. var keywordMatch = stipped.match(unaryOperatorsRE);
  3954. if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
  3955. errors.push(
  3956. "avoid using JavaScript unary operator as property name: " +
  3957. "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim())
  3958. );
  3959. }
  3960. checkExpression(exp, text, errors);
  3961. }
  3962. function checkFor (node, text, errors) {
  3963. checkExpression(node.for || '', text, errors);
  3964. checkIdentifier(node.alias, 'v-for alias', text, errors);
  3965. checkIdentifier(node.iterator1, 'v-for iterator', text, errors);
  3966. checkIdentifier(node.iterator2, 'v-for iterator', text, errors);
  3967. }
  3968. function checkIdentifier (
  3969. ident,
  3970. type,
  3971. text,
  3972. errors
  3973. ) {
  3974. if (typeof ident === 'string') {
  3975. try {
  3976. new Function(("var " + ident + "=_"));
  3977. } catch (e) {
  3978. errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())));
  3979. }
  3980. }
  3981. }
  3982. function checkExpression (exp, text, errors) {
  3983. try {
  3984. new Function(("return " + exp));
  3985. } catch (e) {
  3986. var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
  3987. if (keywordMatch) {
  3988. errors.push(
  3989. "avoid using JavaScript keyword as property name: " +
  3990. "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim())
  3991. );
  3992. } else {
  3993. errors.push(
  3994. "invalid expression: " + (e.message) + " in\n\n" +
  3995. " " + exp + "\n\n" +
  3996. " Raw expression: " + (text.trim()) + "\n"
  3997. );
  3998. }
  3999. }
  4000. }
  4001. /* */
  4002. function createFunction (code, errors) {
  4003. try {
  4004. return new Function(code)
  4005. } catch (err) {
  4006. errors.push({ err: err, code: code });
  4007. return noop
  4008. }
  4009. }
  4010. function createCompileToFunctionFn (compile) {
  4011. var cache = Object.create(null);
  4012. return function compileToFunctions (
  4013. template,
  4014. options,
  4015. vm
  4016. ) {
  4017. options = extend({}, options);
  4018. var warn$$1 = options.warn || warn;
  4019. delete options.warn;
  4020. /* istanbul ignore if */
  4021. {
  4022. // detect possible CSP restriction
  4023. try {
  4024. new Function('return 1');
  4025. } catch (e) {
  4026. if (e.toString().match(/unsafe-eval|CSP/)) {
  4027. warn$$1(
  4028. 'It seems you are using the standalone build of Vue.js in an ' +
  4029. 'environment with Content Security Policy that prohibits unsafe-eval. ' +
  4030. 'The template compiler cannot work in this environment. Consider ' +
  4031. 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
  4032. 'templates into render functions.'
  4033. );
  4034. }
  4035. }
  4036. }
  4037. // check cache
  4038. var key = options.delimiters
  4039. ? String(options.delimiters) + template
  4040. : template;
  4041. if (cache[key]) {
  4042. return cache[key]
  4043. }
  4044. // compile
  4045. var compiled = compile(template, options);
  4046. // check compilation errors/tips
  4047. {
  4048. if (compiled.errors && compiled.errors.length) {
  4049. warn$$1(
  4050. "Error compiling template:\n\n" + template + "\n\n" +
  4051. compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
  4052. vm
  4053. );
  4054. }
  4055. if (compiled.tips && compiled.tips.length) {
  4056. compiled.tips.forEach(function (msg) { return tip(msg, vm); });
  4057. }
  4058. }
  4059. // turn code into functions
  4060. var res = {};
  4061. var fnGenErrors = [];
  4062. res.render = createFunction(compiled.render, fnGenErrors);
  4063. res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
  4064. return createFunction(code, fnGenErrors)
  4065. });
  4066. // check function generation errors.
  4067. // this should only happen if there is a bug in the compiler itself.
  4068. // mostly for codegen development use
  4069. /* istanbul ignore if */
  4070. {
  4071. if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
  4072. warn$$1(
  4073. "Failed to generate render function:\n\n" +
  4074. fnGenErrors.map(function (ref) {
  4075. var err = ref.err;
  4076. var code = ref.code;
  4077. return ((err.toString()) + " in\n\n" + code + "\n");
  4078. }).join('\n'),
  4079. vm
  4080. );
  4081. }
  4082. }
  4083. return (cache[key] = res)
  4084. }
  4085. }
  4086. /* */
  4087. function createCompilerCreator (baseCompile) {
  4088. return function createCompiler (baseOptions) {
  4089. function compile (
  4090. template,
  4091. options
  4092. ) {
  4093. var finalOptions = Object.create(baseOptions);
  4094. var errors = [];
  4095. var tips = [];
  4096. finalOptions.warn = function (msg, tip) {
  4097. (tip ? tips : errors).push(msg);
  4098. };
  4099. if (options) {
  4100. // merge custom modules
  4101. if (options.modules) {
  4102. finalOptions.modules =
  4103. (baseOptions.modules || []).concat(options.modules);
  4104. }
  4105. // merge custom directives
  4106. if (options.directives) {
  4107. finalOptions.directives = extend(
  4108. Object.create(baseOptions.directives || null),
  4109. options.directives
  4110. );
  4111. }
  4112. // copy other options
  4113. for (var key in options) {
  4114. if (key !== 'modules' && key !== 'directives') {
  4115. finalOptions[key] = options[key];
  4116. }
  4117. }
  4118. }
  4119. var compiled = baseCompile(template, finalOptions);
  4120. {
  4121. errors.push.apply(errors, detectErrors(compiled.ast));
  4122. }
  4123. compiled.errors = errors;
  4124. compiled.tips = tips;
  4125. return compiled
  4126. }
  4127. return {
  4128. compile: compile,
  4129. compileToFunctions: createCompileToFunctionFn(compile)
  4130. }
  4131. }
  4132. }
  4133. /* */
  4134. // `createCompilerCreator` allows creating compilers that use alternative
  4135. // parser/optimizer/codegen, e.g the SSR optimizing compiler.
  4136. // Here we just export a default compiler using the default parts.
  4137. var createCompiler = createCompilerCreator(function baseCompile (
  4138. template,
  4139. options
  4140. ) {
  4141. var ast = parse(template.trim(), options);
  4142. if (options.optimize !== false) {
  4143. optimize(ast, options);
  4144. }
  4145. var code = generate(ast, options);
  4146. return {
  4147. ast: ast,
  4148. render: code.render,
  4149. staticRenderFns: code.staticRenderFns
  4150. }
  4151. });
  4152. /* */
  4153. var ref = createCompiler(baseOptions);
  4154. var compile = ref.compile;
  4155. var compileToFunctions = ref.compileToFunctions;
  4156. /* */
  4157. var isAttr = makeMap(
  4158. 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
  4159. 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
  4160. 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' +
  4161. 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' +
  4162. 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' +
  4163. 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' +
  4164. 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' +
  4165. 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' +
  4166. 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' +
  4167. 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' +
  4168. 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' +
  4169. 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' +
  4170. 'target,title,type,usemap,value,width,wrap'
  4171. );
  4172. /* istanbul ignore next */
  4173. var isRenderableAttr = function (name) {
  4174. return (
  4175. isAttr(name) ||
  4176. name.indexOf('data-') === 0 ||
  4177. name.indexOf('aria-') === 0
  4178. )
  4179. };
  4180. var propsToAttrMap = {
  4181. acceptCharset: 'accept-charset',
  4182. className: 'class',
  4183. htmlFor: 'for',
  4184. httpEquiv: 'http-equiv'
  4185. };
  4186. var ESC = {
  4187. '<': '&lt;',
  4188. '>': '&gt;',
  4189. '"': '&quot;',
  4190. '&': '&amp;'
  4191. };
  4192. function escape (s) {
  4193. return s.replace(/[<>"&]/g, escapeChar)
  4194. }
  4195. function escapeChar (a) {
  4196. return ESC[a] || a
  4197. }
  4198. /* */
  4199. var plainStringRE = /^"(?:[^"\\]|\\.)*"$|^'(?:[^'\\]|\\.)*'$/;
  4200. // let the model AST transform translate v-model into appropriate
  4201. // props bindings
  4202. function applyModelTransform (el, state) {
  4203. if (el.directives) {
  4204. for (var i = 0; i < el.directives.length; i++) {
  4205. var dir = el.directives[i];
  4206. if (dir.name === 'model') {
  4207. state.directives.model(el, dir, state.warn);
  4208. // remove value for textarea as its converted to text
  4209. if (el.tag === 'textarea' && el.props) {
  4210. el.props = el.props.filter(function (p) { return p.name !== 'value'; });
  4211. }
  4212. break
  4213. }
  4214. }
  4215. }
  4216. }
  4217. function genAttrSegments (
  4218. attrs
  4219. ) {
  4220. return attrs.map(function (ref) {
  4221. var name = ref.name;
  4222. var value = ref.value;
  4223. return genAttrSegment(name, value);
  4224. })
  4225. }
  4226. function genDOMPropSegments (
  4227. props,
  4228. attrs
  4229. ) {
  4230. var segments = [];
  4231. props.forEach(function (ref) {
  4232. var name = ref.name;
  4233. var value = ref.value;
  4234. name = propsToAttrMap[name] || name.toLowerCase();
  4235. if (isRenderableAttr(name) &&
  4236. !(attrs && attrs.some(function (a) { return a.name === name; }))
  4237. ) {
  4238. segments.push(genAttrSegment(name, value));
  4239. }
  4240. });
  4241. return segments
  4242. }
  4243. function genAttrSegment (name, value) {
  4244. if (plainStringRE.test(value)) {
  4245. // force double quote
  4246. value = value.replace(/^'|'$/g, '"');
  4247. // force enumerated attr to "true"
  4248. if (isEnumeratedAttr(name) && value !== "\"false\"") {
  4249. value = "\"true\"";
  4250. }
  4251. return {
  4252. type: RAW,
  4253. value: isBooleanAttr(name)
  4254. ? (" " + name + "=\"" + name + "\"")
  4255. : value === '""'
  4256. ? (" " + name)
  4257. : (" " + name + "=\"" + (JSON.parse(value)) + "\"")
  4258. }
  4259. } else {
  4260. return {
  4261. type: EXPRESSION,
  4262. value: ("_ssrAttr(" + (JSON.stringify(name)) + "," + value + ")")
  4263. }
  4264. }
  4265. }
  4266. function genClassSegments (
  4267. staticClass,
  4268. classBinding
  4269. ) {
  4270. if (staticClass && !classBinding) {
  4271. return [{ type: RAW, value: (" class=" + staticClass) }]
  4272. } else {
  4273. return [{
  4274. type: EXPRESSION,
  4275. value: ("_ssrClass(" + (staticClass || 'null') + "," + (classBinding || 'null') + ")")
  4276. }]
  4277. }
  4278. }
  4279. function genStyleSegments (
  4280. staticStyle,
  4281. parsedStaticStyle,
  4282. styleBinding,
  4283. vShowExpression
  4284. ) {
  4285. if (staticStyle && !styleBinding && !vShowExpression) {
  4286. return [{ type: RAW, value: (" style=" + (JSON.stringify(staticStyle))) }]
  4287. } else {
  4288. return [{
  4289. type: EXPRESSION,
  4290. value: ("_ssrStyle(" + (parsedStaticStyle || 'null') + "," + (styleBinding || 'null') + ", " + (vShowExpression
  4291. ? ("{ display: (" + vShowExpression + ") ? '' : 'none' }")
  4292. : 'null') + ")")
  4293. }]
  4294. }
  4295. }
  4296. /* */
  4297. /**
  4298. * In SSR, the vdom tree is generated only once and never patched, so
  4299. * we can optimize most element / trees into plain string render functions.
  4300. * The SSR optimizer walks the AST tree to detect optimizable elements and trees.
  4301. *
  4302. * The criteria for SSR optimizability is quite a bit looser than static tree
  4303. * detection (which is designed for client re-render). In SSR we bail only for
  4304. * components/slots/custom directives.
  4305. */
  4306. // optimizability constants
  4307. var optimizability = {
  4308. FALSE: 0, // whole sub tree un-optimizable
  4309. FULL: 1, // whole sub tree optimizable
  4310. SELF: 2, // self optimizable but has some un-optimizable children
  4311. CHILDREN: 3, // self un-optimizable but have fully optimizable children
  4312. PARTIAL: 4 // self un-optimizable with some un-optimizable children
  4313. };
  4314. var isPlatformReservedTag$1;
  4315. function optimize$1 (root, options) {
  4316. if (!root) { return }
  4317. isPlatformReservedTag$1 = options.isReservedTag || no;
  4318. walk(root, true);
  4319. }
  4320. function walk (node, isRoot) {
  4321. if (isUnOptimizableTree(node)) {
  4322. node.ssrOptimizability = optimizability.FALSE;
  4323. return
  4324. }
  4325. // root node or nodes with custom directives should always be a VNode
  4326. var selfUnoptimizable = isRoot || hasCustomDirective(node);
  4327. var check = function (child) {
  4328. if (child.ssrOptimizability !== optimizability.FULL) {
  4329. node.ssrOptimizability = selfUnoptimizable
  4330. ? optimizability.PARTIAL
  4331. : optimizability.SELF;
  4332. }
  4333. };
  4334. if (selfUnoptimizable) {
  4335. node.ssrOptimizability = optimizability.CHILDREN;
  4336. }
  4337. if (node.type === 1) {
  4338. for (var i = 0, l = node.children.length; i < l; i++) {
  4339. var child = node.children[i];
  4340. walk(child);
  4341. check(child);
  4342. }
  4343. if (node.ifConditions) {
  4344. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  4345. var block = node.ifConditions[i$1].block;
  4346. walk(block, isRoot);
  4347. check(block);
  4348. }
  4349. }
  4350. if (node.ssrOptimizability == null ||
  4351. (!isRoot && (node.attrsMap['v-html'] || node.attrsMap['v-text']))
  4352. ) {
  4353. node.ssrOptimizability = optimizability.FULL;
  4354. } else {
  4355. node.children = optimizeSiblings(node);
  4356. }
  4357. } else {
  4358. node.ssrOptimizability = optimizability.FULL;
  4359. }
  4360. }
  4361. function optimizeSiblings (el) {
  4362. var children = el.children;
  4363. var optimizedChildren = [];
  4364. var currentOptimizableGroup = [];
  4365. var pushGroup = function () {
  4366. if (currentOptimizableGroup.length) {
  4367. optimizedChildren.push({
  4368. type: 1,
  4369. parent: el,
  4370. tag: 'template',
  4371. attrsList: [],
  4372. attrsMap: {},
  4373. children: currentOptimizableGroup,
  4374. ssrOptimizability: optimizability.FULL
  4375. });
  4376. }
  4377. currentOptimizableGroup = [];
  4378. };
  4379. for (var i = 0; i < children.length; i++) {
  4380. var c = children[i];
  4381. if (c.ssrOptimizability === optimizability.FULL) {
  4382. currentOptimizableGroup.push(c);
  4383. } else {
  4384. // wrap fully-optimizable adjacent siblings inside a template tag
  4385. // so that they can be optimized into a single ssrNode by codegen
  4386. pushGroup();
  4387. optimizedChildren.push(c);
  4388. }
  4389. }
  4390. pushGroup();
  4391. return optimizedChildren
  4392. }
  4393. function isUnOptimizableTree (node) {
  4394. if (node.type === 2 || node.type === 3) { // text or expression
  4395. return false
  4396. }
  4397. return (
  4398. isBuiltInTag(node.tag) || // built-in (slot, component)
  4399. !isPlatformReservedTag$1(node.tag) || // custom component
  4400. !!node.component || // "is" component
  4401. isSelectWithModel(node) // <select v-model> requires runtime inspection
  4402. )
  4403. }
  4404. var isBuiltInDir = makeMap('text,html,show,on,bind,model,pre,cloak,once');
  4405. function hasCustomDirective (node) {
  4406. return (
  4407. node.type === 1 &&
  4408. node.directives &&
  4409. node.directives.some(function (d) { return !isBuiltInDir(d.name); })
  4410. )
  4411. }
  4412. // <select v-model> cannot be optimized because it requires a runtime check
  4413. // to determine proper selected option
  4414. function isSelectWithModel (node) {
  4415. return (
  4416. node.type === 1 &&
  4417. node.tag === 'select' &&
  4418. node.directives != null &&
  4419. node.directives.some(function (d) { return d.name === 'model'; })
  4420. )
  4421. }
  4422. /* */
  4423. // The SSR codegen is essentially extending the default codegen to handle
  4424. // SSR-optimizable nodes and turn them into string render fns. In cases where
  4425. // a node is not optimizable it simply falls back to the default codegen.
  4426. // segment types
  4427. var RAW = 0;
  4428. var INTERPOLATION = 1;
  4429. var EXPRESSION = 2;
  4430. function generate$1 (
  4431. ast,
  4432. options
  4433. ) {
  4434. var state = new CodegenState(options);
  4435. var code = ast ? genSSRElement(ast, state) : '_c("div")';
  4436. return {
  4437. render: ("with(this){return " + code + "}"),
  4438. staticRenderFns: state.staticRenderFns
  4439. }
  4440. }
  4441. function genSSRElement (el, state) {
  4442. if (el.for && !el.forProcessed) {
  4443. return genFor(el, state, genSSRElement)
  4444. } else if (el.if && !el.ifProcessed) {
  4445. return genIf(el, state, genSSRElement)
  4446. } else if (el.tag === 'template' && !el.slotTarget) {
  4447. return el.ssrOptimizability === optimizability.FULL
  4448. ? genChildrenAsStringNode(el, state)
  4449. : genSSRChildren(el, state) || 'void 0'
  4450. }
  4451. switch (el.ssrOptimizability) {
  4452. case optimizability.FULL:
  4453. // stringify whole tree
  4454. return genStringElement(el, state)
  4455. case optimizability.SELF:
  4456. // stringify self and check children
  4457. return genStringElementWithChildren(el, state)
  4458. case optimizability.CHILDREN:
  4459. // generate self as VNode and stringify children
  4460. return genNormalElement(el, state, true)
  4461. case optimizability.PARTIAL:
  4462. // generate self as VNode and check children
  4463. return genNormalElement(el, state, false)
  4464. default:
  4465. // bail whole tree
  4466. return genElement(el, state)
  4467. }
  4468. }
  4469. function genNormalElement (el, state, stringifyChildren) {
  4470. var data = el.plain ? undefined : genData$2(el, state);
  4471. var children = stringifyChildren
  4472. ? ("[" + (genChildrenAsStringNode(el, state)) + "]")
  4473. : genSSRChildren(el, state, true);
  4474. return ("_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")")
  4475. }
  4476. function genSSRChildren (el, state, checkSkip) {
  4477. return genChildren(el, state, checkSkip, genSSRElement, genSSRNode)
  4478. }
  4479. function genSSRNode (el, state) {
  4480. return el.type === 1
  4481. ? genSSRElement(el, state)
  4482. : genText(el)
  4483. }
  4484. function genChildrenAsStringNode (el, state) {
  4485. return el.children.length
  4486. ? ("_ssrNode(" + (flattenSegments(childrenToSegments(el, state))) + ")")
  4487. : ''
  4488. }
  4489. function genStringElement (el, state) {
  4490. return ("_ssrNode(" + (elementToString(el, state)) + ")")
  4491. }
  4492. function genStringElementWithChildren (el, state) {
  4493. var children = genSSRChildren(el, state, true);
  4494. return ("_ssrNode(" + (flattenSegments(elementToOpenTagSegments(el, state))) + ",\"</" + (el.tag) + ">\"" + (children ? ("," + children) : '') + ")")
  4495. }
  4496. function elementToString (el, state) {
  4497. return ("(" + (flattenSegments(elementToSegments(el, state))) + ")")
  4498. }
  4499. function elementToSegments (el, state) {
  4500. // v-for / v-if
  4501. if (el.for && !el.forProcessed) {
  4502. el.forProcessed = true;
  4503. return [{
  4504. type: EXPRESSION,
  4505. value: genFor(el, state, elementToString, '_ssrList')
  4506. }]
  4507. } else if (el.if && !el.ifProcessed) {
  4508. el.ifProcessed = true;
  4509. return [{
  4510. type: EXPRESSION,
  4511. value: genIf(el, state, elementToString, '"<!---->"')
  4512. }]
  4513. } else if (el.tag === 'template') {
  4514. return childrenToSegments(el, state)
  4515. }
  4516. var openSegments = elementToOpenTagSegments(el, state);
  4517. var childrenSegments = childrenToSegments(el, state);
  4518. var ref = state.options;
  4519. var isUnaryTag = ref.isUnaryTag;
  4520. var close = (isUnaryTag && isUnaryTag(el.tag))
  4521. ? []
  4522. : [{ type: RAW, value: ("</" + (el.tag) + ">") }];
  4523. return openSegments.concat(childrenSegments, close)
  4524. }
  4525. function elementToOpenTagSegments (el, state) {
  4526. applyModelTransform(el, state);
  4527. var binding;
  4528. var segments = [{ type: RAW, value: ("<" + (el.tag)) }];
  4529. // attrs
  4530. if (el.attrs) {
  4531. segments.push.apply(segments, genAttrSegments(el.attrs));
  4532. }
  4533. // domProps
  4534. if (el.props) {
  4535. segments.push.apply(segments, genDOMPropSegments(el.props, el.attrs));
  4536. }
  4537. // v-bind="object"
  4538. if ((binding = el.attrsMap['v-bind'])) {
  4539. segments.push({ type: EXPRESSION, value: ("_ssrAttrs(" + binding + ")") });
  4540. }
  4541. // v-bind.prop="object"
  4542. if ((binding = el.attrsMap['v-bind.prop'])) {
  4543. segments.push({ type: EXPRESSION, value: ("_ssrDOMProps(" + binding + ")") });
  4544. }
  4545. // class
  4546. if (el.staticClass || el.classBinding) {
  4547. segments.push.apply(
  4548. segments,
  4549. genClassSegments(el.staticClass, el.classBinding)
  4550. );
  4551. }
  4552. // style & v-show
  4553. if (el.staticStyle || el.styleBinding || el.attrsMap['v-show']) {
  4554. segments.push.apply(
  4555. segments,
  4556. genStyleSegments(
  4557. el.attrsMap.style,
  4558. el.staticStyle,
  4559. el.styleBinding,
  4560. el.attrsMap['v-show']
  4561. )
  4562. );
  4563. }
  4564. // _scopedId
  4565. if (state.options.scopeId) {
  4566. segments.push({ type: RAW, value: (" " + (state.options.scopeId)) });
  4567. }
  4568. segments.push({ type: RAW, value: ">" });
  4569. return segments
  4570. }
  4571. function childrenToSegments (el, state) {
  4572. var binding;
  4573. if ((binding = el.attrsMap['v-html'])) {
  4574. return [{ type: EXPRESSION, value: ("_s(" + binding + ")") }]
  4575. }
  4576. if ((binding = el.attrsMap['v-text'])) {
  4577. return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
  4578. }
  4579. if (el.tag === 'textarea' && (binding = el.attrsMap['v-model'])) {
  4580. return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
  4581. }
  4582. return el.children
  4583. ? nodesToSegments(el.children, state)
  4584. : []
  4585. }
  4586. function nodesToSegments (
  4587. children,
  4588. state
  4589. ) {
  4590. var segments = [];
  4591. for (var i = 0; i < children.length; i++) {
  4592. var c = children[i];
  4593. if (c.type === 1) {
  4594. segments.push.apply(segments, elementToSegments(c, state));
  4595. } else if (c.type === 2) {
  4596. segments.push({ type: INTERPOLATION, value: c.expression });
  4597. } else if (c.type === 3) {
  4598. segments.push({ type: RAW, value: escape(c.text) });
  4599. }
  4600. }
  4601. return segments
  4602. }
  4603. function flattenSegments (segments) {
  4604. var mergedSegments = [];
  4605. var textBuffer = '';
  4606. var pushBuffer = function () {
  4607. if (textBuffer) {
  4608. mergedSegments.push(JSON.stringify(textBuffer));
  4609. textBuffer = '';
  4610. }
  4611. };
  4612. for (var i = 0; i < segments.length; i++) {
  4613. var s = segments[i];
  4614. if (s.type === RAW) {
  4615. textBuffer += s.value;
  4616. } else if (s.type === INTERPOLATION) {
  4617. pushBuffer();
  4618. mergedSegments.push(("_ssrEscape(" + (s.value) + ")"));
  4619. } else if (s.type === EXPRESSION) {
  4620. pushBuffer();
  4621. mergedSegments.push(("(" + (s.value) + ")"));
  4622. }
  4623. }
  4624. pushBuffer();
  4625. return mergedSegments.join('+')
  4626. }
  4627. /* */
  4628. var createCompiler$1 = createCompilerCreator(function baseCompile (
  4629. template,
  4630. options
  4631. ) {
  4632. var ast = parse(template.trim(), options);
  4633. optimize$1(ast, options);
  4634. var code = generate$1(ast, options);
  4635. return {
  4636. ast: ast,
  4637. render: code.render,
  4638. staticRenderFns: code.staticRenderFns
  4639. }
  4640. });
  4641. /* */
  4642. var ref$1 = createCompiler$1(baseOptions);
  4643. var compile$1 = ref$1.compile;
  4644. var compileToFunctions$1 = ref$1.compileToFunctions;
  4645. /* */
  4646. exports.parseComponent = parseComponent;
  4647. exports.compile = compile;
  4648. exports.compileToFunctions = compileToFunctions;
  4649. exports.ssrCompile = compile$1;
  4650. exports.ssrCompileToFunctions = compileToFunctions$1;
  4651. Object.defineProperty(exports, '__esModule', { value: true });
  4652. })));