UNPKG

313 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3 typeof define === 'function' && define.amd ? define(factory) :
4 (global.renderVueComponentToString = factory());
5}(this, (function () { 'use strict';
6
7 /* */
8
9 var emptyObject = Object.freeze({});
10
11 // These helpers produce better VM code in JS engines due to their
12 // explicitness and function inlining.
13 function isUndef (v) {
14 return v === undefined || v === null
15 }
16
17 function isDef (v) {
18 return v !== undefined && v !== null
19 }
20
21 function isTrue (v) {
22 return v === true
23 }
24
25 function isFalse (v) {
26 return v === false
27 }
28
29 /**
30 * Check if value is primitive.
31 */
32 function isPrimitive (value) {
33 return (
34 typeof value === 'string' ||
35 typeof value === 'number' ||
36 // $flow-disable-line
37 typeof value === 'symbol' ||
38 typeof value === 'boolean'
39 )
40 }
41
42 /**
43 * Quick object check - this is primarily used to tell
44 * Objects from primitive values when we know the value
45 * is a JSON-compliant type.
46 */
47 function isObject (obj) {
48 return obj !== null && typeof obj === 'object'
49 }
50
51 /**
52 * Get the raw type string of a value, e.g., [object Object].
53 */
54 var _toString = Object.prototype.toString;
55
56 function toRawType (value) {
57 return _toString.call(value).slice(8, -1)
58 }
59
60 /**
61 * Strict object type check. Only returns true
62 * for plain JavaScript objects.
63 */
64 function isPlainObject (obj) {
65 return _toString.call(obj) === '[object Object]'
66 }
67
68 /**
69 * Check if val is a valid array index.
70 */
71 function isValidArrayIndex (val) {
72 var n = parseFloat(String(val));
73 return n >= 0 && Math.floor(n) === n && isFinite(val)
74 }
75
76 /**
77 * Convert a value to a string that is actually rendered.
78 */
79 function toString (val) {
80 return val == null
81 ? ''
82 : typeof val === 'object'
83 ? JSON.stringify(val, null, 2)
84 : String(val)
85 }
86
87 /**
88 * Convert an input value to a number for persistence.
89 * If the conversion fails, return original string.
90 */
91 function toNumber (val) {
92 var n = parseFloat(val);
93 return isNaN(n) ? val : n
94 }
95
96 /**
97 * Make a map and return a function for checking if a key
98 * is in that map.
99 */
100 function makeMap (
101 str,
102 expectsLowerCase
103 ) {
104 var map = Object.create(null);
105 var list = str.split(',');
106 for (var i = 0; i < list.length; i++) {
107 map[list[i]] = true;
108 }
109 return expectsLowerCase
110 ? function (val) { return map[val.toLowerCase()]; }
111 : function (val) { return map[val]; }
112 }
113
114 /**
115 * Check if a tag is a built-in tag.
116 */
117 var isBuiltInTag = makeMap('slot,component', true);
118
119 /**
120 * Check if an attribute is a reserved attribute.
121 */
122 var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
123
124 /**
125 * Remove an item from an array.
126 */
127 function remove (arr, item) {
128 if (arr.length) {
129 var index = arr.indexOf(item);
130 if (index > -1) {
131 return arr.splice(index, 1)
132 }
133 }
134 }
135
136 /**
137 * Check whether an object has the property.
138 */
139 var hasOwnProperty = Object.prototype.hasOwnProperty;
140 function hasOwn (obj, key) {
141 return hasOwnProperty.call(obj, key)
142 }
143
144 /**
145 * Create a cached version of a pure function.
146 */
147 function cached (fn) {
148 var cache = Object.create(null);
149 return (function cachedFn (str) {
150 var hit = cache[str];
151 return hit || (cache[str] = fn(str))
152 })
153 }
154
155 /**
156 * Camelize a hyphen-delimited string.
157 */
158 var camelizeRE = /-(\w)/g;
159 var camelize = cached(function (str) {
160 return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
161 });
162
163 /**
164 * Capitalize a string.
165 */
166 var capitalize = cached(function (str) {
167 return str.charAt(0).toUpperCase() + str.slice(1)
168 });
169
170 /**
171 * Hyphenate a camelCase string.
172 */
173 var hyphenateRE = /\B([A-Z])/g;
174 var hyphenate = cached(function (str) {
175 return str.replace(hyphenateRE, '-$1').toLowerCase()
176 });
177
178 /**
179 * Simple bind polyfill for environments that do not support it,
180 * e.g., PhantomJS 1.x. Technically, we don't need this anymore
181 * since native bind is now performant enough in most browsers.
182 * But removing it would mean breaking code that was able to run in
183 * PhantomJS 1.x, so this must be kept for backward compatibility.
184 */
185
186 /* istanbul ignore next */
187 function polyfillBind (fn, ctx) {
188 function boundFn (a) {
189 var l = arguments.length;
190 return l
191 ? l > 1
192 ? fn.apply(ctx, arguments)
193 : fn.call(ctx, a)
194 : fn.call(ctx)
195 }
196
197 boundFn._length = fn.length;
198 return boundFn
199 }
200
201 function nativeBind (fn, ctx) {
202 return fn.bind(ctx)
203 }
204
205 var bind = Function.prototype.bind
206 ? nativeBind
207 : polyfillBind;
208
209 /**
210 * Mix properties into target object.
211 */
212 function extend (to, _from) {
213 for (var key in _from) {
214 to[key] = _from[key];
215 }
216 return to
217 }
218
219 /**
220 * Merge an Array of Objects into a single Object.
221 */
222 function toObject (arr) {
223 var res = {};
224 for (var i = 0; i < arr.length; i++) {
225 if (arr[i]) {
226 extend(res, arr[i]);
227 }
228 }
229 return res
230 }
231
232 /* eslint-disable no-unused-vars */
233
234 /**
235 * Perform no operation.
236 * Stubbing args to make Flow happy without leaving useless transpiled code
237 * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
238 */
239 function noop (a, b, c) {}
240
241 /**
242 * Always return false.
243 */
244 var no = function (a, b, c) { return false; };
245
246 /* eslint-enable no-unused-vars */
247
248 /**
249 * Return the same value.
250 */
251 var identity = function (_) { return _; };
252
253 /**
254 * Generate a string containing static keys from compiler modules.
255 */
256 function genStaticKeys (modules) {
257 return modules.reduce(function (keys, m) {
258 return keys.concat(m.staticKeys || [])
259 }, []).join(',')
260 }
261
262 /**
263 * Check if two values are loosely equal - that is,
264 * if they are plain objects, do they have the same shape?
265 */
266 function looseEqual (a, b) {
267 if (a === b) { return true }
268 var isObjectA = isObject(a);
269 var isObjectB = isObject(b);
270 if (isObjectA && isObjectB) {
271 try {
272 var isArrayA = Array.isArray(a);
273 var isArrayB = Array.isArray(b);
274 if (isArrayA && isArrayB) {
275 return a.length === b.length && a.every(function (e, i) {
276 return looseEqual(e, b[i])
277 })
278 } else if (a instanceof Date && b instanceof Date) {
279 return a.getTime() === b.getTime()
280 } else if (!isArrayA && !isArrayB) {
281 var keysA = Object.keys(a);
282 var keysB = Object.keys(b);
283 return keysA.length === keysB.length && keysA.every(function (key) {
284 return looseEqual(a[key], b[key])
285 })
286 } else {
287 /* istanbul ignore next */
288 return false
289 }
290 } catch (e) {
291 /* istanbul ignore next */
292 return false
293 }
294 } else if (!isObjectA && !isObjectB) {
295 return String(a) === String(b)
296 } else {
297 return false
298 }
299 }
300
301 /**
302 * Return the first index at which a loosely equal value can be
303 * found in the array (if value is a plain object, the array must
304 * contain an object of the same shape), or -1 if it is not present.
305 */
306 function looseIndexOf (arr, val) {
307 for (var i = 0; i < arr.length; i++) {
308 if (looseEqual(arr[i], val)) { return i }
309 }
310 return -1
311 }
312
313 /**
314 * Ensure a function is called only once.
315 */
316 function once (fn) {
317 var called = false;
318 return function () {
319 if (!called) {
320 called = true;
321 fn.apply(this, arguments);
322 }
323 }
324 }
325
326 /* */
327
328 var isAttr = makeMap(
329 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
330 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
331 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' +
332 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' +
333 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' +
334 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' +
335 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' +
336 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' +
337 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' +
338 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' +
339 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' +
340 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' +
341 'target,title,type,usemap,value,width,wrap'
342 );
343
344 var unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; // eslint-disable-line no-control-regex
345 var isSSRUnsafeAttr = function (name) {
346 return unsafeAttrCharRE.test(name)
347 };
348
349 /* istanbul ignore next */
350 var isRenderableAttr = function (name) {
351 return (
352 isAttr(name) ||
353 name.indexOf('data-') === 0 ||
354 name.indexOf('aria-') === 0
355 )
356 };
357
358 var propsToAttrMap = {
359 acceptCharset: 'accept-charset',
360 className: 'class',
361 htmlFor: 'for',
362 httpEquiv: 'http-equiv'
363 };
364
365 var ESC = {
366 '<': '&lt;',
367 '>': '&gt;',
368 '"': '&quot;',
369 '&': '&amp;'
370 };
371
372 function escape (s) {
373 return s.replace(/[<>"&]/g, escapeChar)
374 }
375
376 function escapeChar (a) {
377 return ESC[a] || a
378 }
379
380 /* */
381
382 // these are reserved for web because they are directly compiled away
383 // during template compilation
384 var isReservedAttr = makeMap('style,class');
385
386 // attributes that should be using props for binding
387 var acceptValue = makeMap('input,textarea,option,select,progress');
388 var mustUseProp = function (tag, type, attr) {
389 return (
390 (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
391 (attr === 'selected' && tag === 'option') ||
392 (attr === 'checked' && tag === 'input') ||
393 (attr === 'muted' && tag === 'video')
394 )
395 };
396
397 var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
398
399 var isBooleanAttr = makeMap(
400 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
401 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
402 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
403 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
404 'required,reversed,scoped,seamless,selected,sortable,translate,' +
405 'truespeed,typemustmatch,visible'
406 );
407
408 var isFalsyAttrValue = function (val) {
409 return val == null || val === false
410 };
411
412 /* */
413
414 function renderAttrs (node) {
415 var attrs = node.data.attrs;
416 var res = '';
417
418 var opts = node.parent && node.parent.componentOptions;
419 if (isUndef(opts) || opts.Ctor.options.inheritAttrs !== false) {
420 var parent = node.parent;
421 while (isDef(parent)) {
422 if (isDef(parent.data) && isDef(parent.data.attrs)) {
423 attrs = extend(extend({}, attrs), parent.data.attrs);
424 }
425 parent = parent.parent;
426 }
427 }
428
429 if (isUndef(attrs)) {
430 return res
431 }
432
433 for (var key in attrs) {
434 if (isSSRUnsafeAttr(key)) {
435 continue
436 }
437 if (key === 'style') {
438 // leave it to the style module
439 continue
440 }
441 res += renderAttr(key, attrs[key]);
442 }
443 return res
444 }
445
446 function renderAttr (key, value) {
447 if (isBooleanAttr(key)) {
448 if (!isFalsyAttrValue(value)) {
449 return (" " + key + "=\"" + key + "\"")
450 }
451 } else if (isEnumeratedAttr(key)) {
452 return (" " + key + "=\"" + (isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true') + "\"")
453 } else if (!isFalsyAttrValue(value)) {
454 return (" " + key + "=\"" + (escape(String(value))) + "\"")
455 }
456 return ''
457 }
458
459 /* */
460
461 var VNode = function VNode (
462 tag,
463 data,
464 children,
465 text,
466 elm,
467 context,
468 componentOptions,
469 asyncFactory
470 ) {
471 this.tag = tag;
472 this.data = data;
473 this.children = children;
474 this.text = text;
475 this.elm = elm;
476 this.ns = undefined;
477 this.context = context;
478 this.fnContext = undefined;
479 this.fnOptions = undefined;
480 this.fnScopeId = undefined;
481 this.key = data && data.key;
482 this.componentOptions = componentOptions;
483 this.componentInstance = undefined;
484 this.parent = undefined;
485 this.raw = false;
486 this.isStatic = false;
487 this.isRootInsert = true;
488 this.isComment = false;
489 this.isCloned = false;
490 this.isOnce = false;
491 this.asyncFactory = asyncFactory;
492 this.asyncMeta = undefined;
493 this.isAsyncPlaceholder = false;
494 };
495
496 var prototypeAccessors = { child: { configurable: true } };
497
498 // DEPRECATED: alias for componentInstance for backwards compat.
499 /* istanbul ignore next */
500 prototypeAccessors.child.get = function () {
501 return this.componentInstance
502 };
503
504 Object.defineProperties( VNode.prototype, prototypeAccessors );
505
506 var createEmptyVNode = function (text) {
507 if ( text === void 0 ) text = '';
508
509 var node = new VNode();
510 node.text = text;
511 node.isComment = true;
512 return node
513 };
514
515 function createTextVNode (val) {
516 return new VNode(undefined, undefined, undefined, String(val))
517 }
518
519 // optimized shallow clone
520 // used for static nodes and slot nodes because they may be reused across
521 // multiple renders, cloning them avoids errors when DOM manipulations rely
522 // on their elm reference.
523 function cloneVNode (vnode) {
524 var cloned = new VNode(
525 vnode.tag,
526 vnode.data,
527 // #7975
528 // clone children array to avoid mutating original in case of cloning
529 // a child.
530 vnode.children && vnode.children.slice(),
531 vnode.text,
532 vnode.elm,
533 vnode.context,
534 vnode.componentOptions,
535 vnode.asyncFactory
536 );
537 cloned.ns = vnode.ns;
538 cloned.isStatic = vnode.isStatic;
539 cloned.key = vnode.key;
540 cloned.isComment = vnode.isComment;
541 cloned.fnContext = vnode.fnContext;
542 cloned.fnOptions = vnode.fnOptions;
543 cloned.fnScopeId = vnode.fnScopeId;
544 cloned.asyncMeta = vnode.asyncMeta;
545 cloned.isCloned = true;
546 return cloned
547 }
548
549 /* */
550
551 function renderDOMProps (node) {
552 var props = node.data.domProps;
553 var res = '';
554
555 var parent = node.parent;
556 while (isDef(parent)) {
557 if (parent.data && parent.data.domProps) {
558 props = extend(extend({}, props), parent.data.domProps);
559 }
560 parent = parent.parent;
561 }
562
563 if (isUndef(props)) {
564 return res
565 }
566
567 var attrs = node.data.attrs;
568 for (var key in props) {
569 if (key === 'innerHTML') {
570 setText(node, props[key], true);
571 } else if (key === 'textContent') {
572 setText(node, props[key], false);
573 } else if (key === 'value' && node.tag === 'textarea') {
574 setText(node, props[key], false);
575 } else {
576 // $flow-disable-line (WTF?)
577 var attr = propsToAttrMap[key] || key.toLowerCase();
578 if (isRenderableAttr(attr) &&
579 // avoid rendering double-bound props/attrs twice
580 !(isDef(attrs) && isDef(attrs[attr]))
581 ) {
582 res += renderAttr(attr, props[key]);
583 }
584 }
585 }
586 return res
587 }
588
589 function setText (node, text, raw) {
590 var child = new VNode(undefined, undefined, undefined, text);
591 child.raw = raw;
592 node.children = [child];
593 }
594
595 /* */
596
597 /**
598 * Define a property.
599 */
600 function def (obj, key, val, enumerable) {
601 Object.defineProperty(obj, key, {
602 value: val,
603 enumerable: !!enumerable,
604 writable: true,
605 configurable: true
606 });
607 }
608
609 /* */
610
611 // can we use __proto__?
612 var hasProto = '__proto__' in {};
613
614 // Browser environment sniffing
615 var inBrowser = typeof window !== 'undefined';
616 var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
617 var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
618 var UA = inBrowser && window.navigator.userAgent.toLowerCase();
619 var isIE = UA && /msie|trident/.test(UA);
620 var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
621 var isEdge = UA && UA.indexOf('edge/') > 0;
622 var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
623 var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
624 var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
625
626 // Firefox has a "watch" function on Object.prototype...
627 var nativeWatch = ({}).watch;
628 if (inBrowser) {
629 try {
630 var opts = {};
631 Object.defineProperty(opts, 'passive', ({
632 get: function get () {
633 }
634 })); // https://github.com/facebook/flow/issues/285
635 window.addEventListener('test-passive', null, opts);
636 } catch (e) {}
637 }
638
639 // this needs to be lazy-evaled because vue may be required before
640 // vue-server-renderer can set VUE_ENV
641 var _isServer;
642 var isServerRendering = function () {
643 if (_isServer === undefined) {
644 /* istanbul ignore if */
645 if (!inBrowser && !inWeex && typeof global !== 'undefined') {
646 // detect presence of vue-server-renderer and avoid
647 // Webpack shimming the process
648 _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
649 } else {
650 _isServer = false;
651 }
652 }
653 return _isServer
654 };
655
656 // detect devtools
657 var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
658
659 /* istanbul ignore next */
660 function isNative (Ctor) {
661 return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
662 }
663
664 var hasSymbol =
665 typeof Symbol !== 'undefined' && isNative(Symbol) &&
666 typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
667
668 var _Set;
669 /* istanbul ignore if */ // $flow-disable-line
670 if (typeof Set !== 'undefined' && isNative(Set)) {
671 // use native Set when available.
672 _Set = Set;
673 } else {
674 // a non-standard Set polyfill that only works with primitive keys.
675 _Set = /*@__PURE__*/(function () {
676 function Set () {
677 this.set = Object.create(null);
678 }
679 Set.prototype.has = function has (key) {
680 return this.set[key] === true
681 };
682 Set.prototype.add = function add (key) {
683 this.set[key] = true;
684 };
685 Set.prototype.clear = function clear () {
686 this.set = Object.create(null);
687 };
688
689 return Set;
690 }());
691 }
692
693 var SSR_ATTR = 'data-server-rendered';
694
695 var ASSET_TYPES = [
696 'component',
697 'directive',
698 'filter'
699 ];
700
701 var LIFECYCLE_HOOKS = [
702 'beforeCreate',
703 'created',
704 'beforeMount',
705 'mounted',
706 'beforeUpdate',
707 'updated',
708 'beforeDestroy',
709 'destroyed',
710 'activated',
711 'deactivated',
712 'errorCaptured'
713 ];
714
715 /* */
716
717
718
719 var config = ({
720 /**
721 * Option merge strategies (used in core/util/options)
722 */
723 // $flow-disable-line
724 optionMergeStrategies: Object.create(null),
725
726 /**
727 * Whether to suppress warnings.
728 */
729 silent: false,
730
731 /**
732 * Show production mode tip message on boot?
733 */
734 productionTip: "development" !== 'production',
735
736 /**
737 * Whether to enable devtools
738 */
739 devtools: "development" !== 'production',
740
741 /**
742 * Whether to record perf
743 */
744 performance: false,
745
746 /**
747 * Error handler for watcher errors
748 */
749 errorHandler: null,
750
751 /**
752 * Warn handler for watcher warns
753 */
754 warnHandler: null,
755
756 /**
757 * Ignore certain custom elements
758 */
759 ignoredElements: [],
760
761 /**
762 * Custom user key aliases for v-on
763 */
764 // $flow-disable-line
765 keyCodes: Object.create(null),
766
767 /**
768 * Check if a tag is reserved so that it cannot be registered as a
769 * component. This is platform-dependent and may be overwritten.
770 */
771 isReservedTag: no,
772
773 /**
774 * Check if an attribute is reserved so that it cannot be used as a component
775 * prop. This is platform-dependent and may be overwritten.
776 */
777 isReservedAttr: no,
778
779 /**
780 * Check if a tag is an unknown element.
781 * Platform-dependent.
782 */
783 isUnknownElement: no,
784
785 /**
786 * Get the namespace of an element
787 */
788 getTagNamespace: noop,
789
790 /**
791 * Parse the real tag name for the specific platform.
792 */
793 parsePlatformTagName: identity,
794
795 /**
796 * Check if an attribute must be bound using property, e.g. value
797 * Platform-dependent.
798 */
799 mustUseProp: no,
800
801 /**
802 * Perform updates asynchronously. Intended to be used by Vue Test Utils
803 * This will significantly reduce performance if set to false.
804 */
805 async: true,
806
807 /**
808 * Exposed for legacy reasons
809 */
810 _lifecycleHooks: LIFECYCLE_HOOKS
811 });
812
813 /* */
814
815 var warn = noop;
816 var tip = noop;
817 var generateComponentTrace = (noop); // work around flow check
818 var formatComponentName = (noop);
819
820 {
821 var hasConsole = typeof console !== 'undefined';
822 var classifyRE = /(?:^|[-_])(\w)/g;
823 var classify = function (str) { return str
824 .replace(classifyRE, function (c) { return c.toUpperCase(); })
825 .replace(/[-_]/g, ''); };
826
827 warn = function (msg, vm) {
828 var trace = vm ? generateComponentTrace(vm) : '';
829
830 if (hasConsole && (!config.silent)) {
831 console.error(("[Vue warn]: " + msg + trace));
832 }
833 };
834
835 tip = function (msg, vm) {
836 if (hasConsole && (!config.silent)) {
837 console.warn("[Vue tip]: " + msg + (
838 vm ? generateComponentTrace(vm) : ''
839 ));
840 }
841 };
842
843 formatComponentName = function (vm, includeFile) {
844 if (vm.$root === vm) {
845 return '<Root>'
846 }
847 var options = typeof vm === 'function' && vm.cid != null
848 ? vm.options
849 : vm._isVue
850 ? vm.$options || vm.constructor.options
851 : vm || {};
852 var name = options.name || options._componentTag;
853 var file = options.__file;
854 if (!name && file) {
855 var match = file.match(/([^/\\]+)\.vue$/);
856 name = match && match[1];
857 }
858
859 return (
860 (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
861 (file && includeFile !== false ? (" at " + file) : '')
862 )
863 };
864
865 var repeat = function (str, n) {
866 var res = '';
867 while (n) {
868 if (n % 2 === 1) { res += str; }
869 if (n > 1) { str += str; }
870 n >>= 1;
871 }
872 return res
873 };
874
875 generateComponentTrace = function (vm) {
876 if (vm._isVue && vm.$parent) {
877 var tree = [];
878 var currentRecursiveSequence = 0;
879 while (vm) {
880 if (tree.length > 0) {
881 var last = tree[tree.length - 1];
882 if (last.constructor === vm.constructor) {
883 currentRecursiveSequence++;
884 vm = vm.$parent;
885 continue
886 } else if (currentRecursiveSequence > 0) {
887 tree[tree.length - 1] = [last, currentRecursiveSequence];
888 currentRecursiveSequence = 0;
889 }
890 }
891 tree.push(vm);
892 vm = vm.$parent;
893 }
894 return '\n\nfound in\n\n' + tree
895 .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
896 ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
897 : formatComponentName(vm))); })
898 .join('\n')
899 } else {
900 return ("\n\n(found in " + (formatComponentName(vm)) + ")")
901 }
902 };
903 }
904
905 /* */
906
907 var uid = 0;
908
909 /**
910 * A dep is an observable that can have multiple
911 * directives subscribing to it.
912 */
913 var Dep = function Dep () {
914 this.id = uid++;
915 this.subs = [];
916 };
917
918 Dep.prototype.addSub = function addSub (sub) {
919 this.subs.push(sub);
920 };
921
922 Dep.prototype.removeSub = function removeSub (sub) {
923 remove(this.subs, sub);
924 };
925
926 Dep.prototype.depend = function depend () {
927 if (Dep.target) {
928 Dep.target.addDep(this);
929 }
930 };
931
932 Dep.prototype.notify = function notify () {
933 // stabilize the subscriber list first
934 var subs = this.subs.slice();
935 for (var i = 0, l = subs.length; i < l; i++) {
936 subs[i].update();
937 }
938 };
939
940 // the current target watcher being evaluated.
941 // this is globally unique because there could be only one
942 // watcher being evaluated at any time.
943 Dep.target = null;
944 var targetStack = [];
945
946 function pushTarget (target) {
947 targetStack.push(target);
948 Dep.target = target;
949 }
950
951 function popTarget () {
952 targetStack.pop();
953 Dep.target = targetStack[targetStack.length - 1];
954 }
955
956 /*
957 * not type checking this file because flow doesn't play well with
958 * dynamically accessing methods on Array prototype
959 */
960
961 var arrayProto = Array.prototype;
962 var arrayMethods = Object.create(arrayProto);
963
964 var methodsToPatch = [
965 'push',
966 'pop',
967 'shift',
968 'unshift',
969 'splice',
970 'sort',
971 'reverse'
972 ];
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
984 var result = original.apply(this, args);
985 var ob = this.__ob__;
986 var inserted;
987 switch (method) {
988 case 'push':
989 case 'unshift':
990 inserted = args;
991 break
992 case 'splice':
993 inserted = args.slice(2);
994 break
995 }
996 if (inserted) { ob.observeArray(inserted); }
997 // notify change
998 ob.dep.notify();
999 return result
1000 });
1001 });
1002
1003 /* */
1004
1005 var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
1006
1007 /**
1008 * In some cases we may want to disable observation inside a component's
1009 * update computation.
1010 */
1011 var shouldObserve = true;
1012
1013 function toggleObserving (value) {
1014 shouldObserve = value;
1015 }
1016
1017 /**
1018 * Observer class that is attached to each observed
1019 * object. Once attached, the observer converts the target
1020 * object's property keys into getter/setters that
1021 * collect dependencies and dispatch updates.
1022 */
1023 var Observer = function Observer (value) {
1024 this.value = value;
1025 this.dep = new Dep();
1026 this.vmCount = 0;
1027 def(value, '__ob__', this);
1028 if (Array.isArray(value)) {
1029 if (hasProto) {
1030 protoAugment(value, arrayMethods);
1031 } else {
1032 copyAugment(value, arrayMethods, arrayKeys);
1033 }
1034 this.observeArray(value);
1035 } else {
1036 this.walk(value);
1037 }
1038 };
1039
1040 /**
1041 * Walk through all properties and convert them into
1042 * getter/setters. This method should only be called when
1043 * value type is Object.
1044 */
1045 Observer.prototype.walk = function walk (obj) {
1046 var keys = Object.keys(obj);
1047 for (var i = 0; i < keys.length; i++) {
1048 defineReactive$$1(obj, keys[i]);
1049 }
1050 };
1051
1052 /**
1053 * Observe a list of Array items.
1054 */
1055 Observer.prototype.observeArray = function observeArray (items) {
1056 for (var i = 0, l = items.length; i < l; i++) {
1057 observe(items[i]);
1058 }
1059 };
1060
1061 // helpers
1062
1063 /**
1064 * Augment a target Object or Array by intercepting
1065 * the prototype chain using __proto__
1066 */
1067 function protoAugment (target, src) {
1068 /* eslint-disable no-proto */
1069 target.__proto__ = src;
1070 /* eslint-enable no-proto */
1071 }
1072
1073 /**
1074 * Augment a target Object or Array by defining
1075 * hidden properties.
1076 */
1077 /* istanbul ignore next */
1078 function copyAugment (target, src, keys) {
1079 for (var i = 0, l = keys.length; i < l; i++) {
1080 var key = keys[i];
1081 def(target, key, src[key]);
1082 }
1083 }
1084
1085 /**
1086 * Attempt to create an observer instance for a value,
1087 * returns the new observer if successfully observed,
1088 * or the existing observer if the value already has one.
1089 */
1090 function observe (value, asRootData) {
1091 if (!isObject(value) || value instanceof VNode) {
1092 return
1093 }
1094 var ob;
1095 if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
1096 ob = value.__ob__;
1097 } else if (
1098 shouldObserve &&
1099 !isServerRendering() &&
1100 (Array.isArray(value) || isPlainObject(value)) &&
1101 Object.isExtensible(value) &&
1102 !value._isVue
1103 ) {
1104 ob = new Observer(value);
1105 }
1106 if (asRootData && ob) {
1107 ob.vmCount++;
1108 }
1109 return ob
1110 }
1111
1112 /**
1113 * Define a reactive property on an Object.
1114 */
1115 function defineReactive$$1 (
1116 obj,
1117 key,
1118 val,
1119 customSetter,
1120 shallow
1121 ) {
1122 var dep = new Dep();
1123
1124 var property = Object.getOwnPropertyDescriptor(obj, key);
1125 if (property && property.configurable === false) {
1126 return
1127 }
1128
1129 // cater for pre-defined getter/setters
1130 var getter = property && property.get;
1131 var setter = property && property.set;
1132 if ((!getter || setter) && arguments.length === 2) {
1133 val = obj[key];
1134 }
1135
1136 var childOb = !shallow && observe(val);
1137 Object.defineProperty(obj, key, {
1138 enumerable: true,
1139 configurable: true,
1140 get: function reactiveGetter () {
1141 var value = getter ? getter.call(obj) : val;
1142 if (Dep.target) {
1143 dep.depend();
1144 if (childOb) {
1145 childOb.dep.depend();
1146 if (Array.isArray(value)) {
1147 dependArray(value);
1148 }
1149 }
1150 }
1151 return value
1152 },
1153 set: function reactiveSetter (newVal) {
1154 var value = getter ? getter.call(obj) : val;
1155 /* eslint-disable no-self-compare */
1156 if (newVal === value || (newVal !== newVal && value !== value)) {
1157 return
1158 }
1159 /* eslint-enable no-self-compare */
1160 if (customSetter) {
1161 customSetter();
1162 }
1163 // #7981: for accessor properties without setter
1164 if (getter && !setter) { return }
1165 if (setter) {
1166 setter.call(obj, newVal);
1167 } else {
1168 val = newVal;
1169 }
1170 childOb = !shallow && observe(newVal);
1171 dep.notify();
1172 }
1173 });
1174 }
1175
1176 /**
1177 * Set a property on an object. Adds the new property and
1178 * triggers change notification if the property doesn't
1179 * already exist.
1180 */
1181 function set (target, key, val) {
1182 if (isUndef(target) || isPrimitive(target)
1183 ) {
1184 warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
1185 }
1186 if (Array.isArray(target) && isValidArrayIndex(key)) {
1187 target.length = Math.max(target.length, key);
1188 target.splice(key, 1, val);
1189 return val
1190 }
1191 if (key in target && !(key in Object.prototype)) {
1192 target[key] = val;
1193 return val
1194 }
1195 var ob = (target).__ob__;
1196 if (target._isVue || (ob && ob.vmCount)) {
1197 warn(
1198 'Avoid adding reactive properties to a Vue instance or its root $data ' +
1199 'at runtime - declare it upfront in the data option.'
1200 );
1201 return val
1202 }
1203 if (!ob) {
1204 target[key] = val;
1205 return val
1206 }
1207 defineReactive$$1(ob.value, key, val);
1208 ob.dep.notify();
1209 return val
1210 }
1211
1212 /**
1213 * Collect dependencies on array elements when the array is touched, since
1214 * we cannot intercept array element access like property getters.
1215 */
1216 function dependArray (value) {
1217 for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
1218 e = value[i];
1219 e && e.__ob__ && e.__ob__.dep.depend();
1220 if (Array.isArray(e)) {
1221 dependArray(e);
1222 }
1223 }
1224 }
1225
1226 /* */
1227
1228 /**
1229 * Option overwriting strategies are functions that handle
1230 * how to merge a parent option value and a child option
1231 * value into the final value.
1232 */
1233 var strats = config.optionMergeStrategies;
1234
1235 /**
1236 * Options with restrictions
1237 */
1238 {
1239 strats.el = strats.propsData = function (parent, child, vm, key) {
1240 if (!vm) {
1241 warn(
1242 "option \"" + key + "\" can only be used during instance " +
1243 'creation with the `new` keyword.'
1244 );
1245 }
1246 return defaultStrat(parent, child)
1247 };
1248 }
1249
1250 /**
1251 * Helper that recursively merges two data objects together.
1252 */
1253 function mergeData (to, from) {
1254 if (!from) { return to }
1255 var key, toVal, fromVal;
1256 var keys = Object.keys(from);
1257 for (var i = 0; i < keys.length; i++) {
1258 key = keys[i];
1259 toVal = to[key];
1260 fromVal = from[key];
1261 if (!hasOwn(to, key)) {
1262 set(to, key, fromVal);
1263 } else if (
1264 toVal !== fromVal &&
1265 isPlainObject(toVal) &&
1266 isPlainObject(fromVal)
1267 ) {
1268 mergeData(toVal, fromVal);
1269 }
1270 }
1271 return to
1272 }
1273
1274 /**
1275 * Data
1276 */
1277 function mergeDataOrFn (
1278 parentVal,
1279 childVal,
1280 vm
1281 ) {
1282 if (!vm) {
1283 // in a Vue.extend merge, both should be functions
1284 if (!childVal) {
1285 return parentVal
1286 }
1287 if (!parentVal) {
1288 return childVal
1289 }
1290 // when parentVal & childVal are both present,
1291 // we need to return a function that returns the
1292 // merged result of both functions... no need to
1293 // check if parentVal is a function here because
1294 // it has to be a function to pass previous merges.
1295 return function mergedDataFn () {
1296 return mergeData(
1297 typeof childVal === 'function' ? childVal.call(this, this) : childVal,
1298 typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
1299 )
1300 }
1301 } else {
1302 return function mergedInstanceDataFn () {
1303 // instance merge
1304 var instanceData = typeof childVal === 'function'
1305 ? childVal.call(vm, vm)
1306 : childVal;
1307 var defaultData = typeof parentVal === 'function'
1308 ? parentVal.call(vm, vm)
1309 : parentVal;
1310 if (instanceData) {
1311 return mergeData(instanceData, defaultData)
1312 } else {
1313 return defaultData
1314 }
1315 }
1316 }
1317 }
1318
1319 strats.data = function (
1320 parentVal,
1321 childVal,
1322 vm
1323 ) {
1324 if (!vm) {
1325 if (childVal && typeof childVal !== 'function') {
1326 warn(
1327 'The "data" option should be a function ' +
1328 'that returns a per-instance value in component ' +
1329 'definitions.',
1330 vm
1331 );
1332
1333 return parentVal
1334 }
1335 return mergeDataOrFn(parentVal, childVal)
1336 }
1337
1338 return mergeDataOrFn(parentVal, childVal, vm)
1339 };
1340
1341 /**
1342 * Hooks and props are merged as arrays.
1343 */
1344 function mergeHook (
1345 parentVal,
1346 childVal
1347 ) {
1348 return childVal
1349 ? parentVal
1350 ? parentVal.concat(childVal)
1351 : Array.isArray(childVal)
1352 ? childVal
1353 : [childVal]
1354 : parentVal
1355 }
1356
1357 LIFECYCLE_HOOKS.forEach(function (hook) {
1358 strats[hook] = mergeHook;
1359 });
1360
1361 /**
1362 * Assets
1363 *
1364 * When a vm is present (instance creation), we need to do
1365 * a three-way merge between constructor options, instance
1366 * options and parent options.
1367 */
1368 function mergeAssets (
1369 parentVal,
1370 childVal,
1371 vm,
1372 key
1373 ) {
1374 var res = Object.create(parentVal || null);
1375 if (childVal) {
1376 assertObjectType(key, childVal, vm);
1377 return extend(res, childVal)
1378 } else {
1379 return res
1380 }
1381 }
1382
1383 ASSET_TYPES.forEach(function (type) {
1384 strats[type + 's'] = mergeAssets;
1385 });
1386
1387 /**
1388 * Watchers.
1389 *
1390 * Watchers hashes should not overwrite one
1391 * another, so we merge them as arrays.
1392 */
1393 strats.watch = function (
1394 parentVal,
1395 childVal,
1396 vm,
1397 key
1398 ) {
1399 // work around Firefox's Object.prototype.watch...
1400 if (parentVal === nativeWatch) { parentVal = undefined; }
1401 if (childVal === nativeWatch) { childVal = undefined; }
1402 /* istanbul ignore if */
1403 if (!childVal) { return Object.create(parentVal || null) }
1404 {
1405 assertObjectType(key, childVal, vm);
1406 }
1407 if (!parentVal) { return childVal }
1408 var ret = {};
1409 extend(ret, parentVal);
1410 for (var key$1 in childVal) {
1411 var parent = ret[key$1];
1412 var child = childVal[key$1];
1413 if (parent && !Array.isArray(parent)) {
1414 parent = [parent];
1415 }
1416 ret[key$1] = parent
1417 ? parent.concat(child)
1418 : Array.isArray(child) ? child : [child];
1419 }
1420 return ret
1421 };
1422
1423 /**
1424 * Other object hashes.
1425 */
1426 strats.props =
1427 strats.methods =
1428 strats.inject =
1429 strats.computed = function (
1430 parentVal,
1431 childVal,
1432 vm,
1433 key
1434 ) {
1435 if (childVal && "development" !== 'production') {
1436 assertObjectType(key, childVal, vm);
1437 }
1438 if (!parentVal) { return childVal }
1439 var ret = Object.create(null);
1440 extend(ret, parentVal);
1441 if (childVal) { extend(ret, childVal); }
1442 return ret
1443 };
1444 strats.provide = mergeDataOrFn;
1445
1446 /**
1447 * Default strategy.
1448 */
1449 var defaultStrat = function (parentVal, childVal) {
1450 return childVal === undefined
1451 ? parentVal
1452 : childVal
1453 };
1454
1455 /**
1456 * Validate component names
1457 */
1458 function checkComponents (options) {
1459 for (var key in options.components) {
1460 validateComponentName(key);
1461 }
1462 }
1463
1464 function validateComponentName (name) {
1465 if (!/^[a-zA-Z][\w-]*$/.test(name)) {
1466 warn(
1467 'Invalid component name: "' + name + '". Component names ' +
1468 'can only contain alphanumeric characters and the hyphen, ' +
1469 'and must start with a letter.'
1470 );
1471 }
1472 if (isBuiltInTag(name) || config.isReservedTag(name)) {
1473 warn(
1474 'Do not use built-in or reserved HTML elements as component ' +
1475 'id: ' + name
1476 );
1477 }
1478 }
1479
1480 /**
1481 * Ensure all props option syntax are normalized into the
1482 * Object-based format.
1483 */
1484 function normalizeProps (options, vm) {
1485 var props = options.props;
1486 if (!props) { return }
1487 var res = {};
1488 var i, val, name;
1489 if (Array.isArray(props)) {
1490 i = props.length;
1491 while (i--) {
1492 val = props[i];
1493 if (typeof val === 'string') {
1494 name = camelize(val);
1495 res[name] = { type: null };
1496 } else {
1497 warn('props must be strings when using array syntax.');
1498 }
1499 }
1500 } else if (isPlainObject(props)) {
1501 for (var key in props) {
1502 val = props[key];
1503 name = camelize(key);
1504 res[name] = isPlainObject(val)
1505 ? val
1506 : { type: val };
1507 }
1508 } else {
1509 warn(
1510 "Invalid value for option \"props\": expected an Array or an Object, " +
1511 "but got " + (toRawType(props)) + ".",
1512 vm
1513 );
1514 }
1515 options.props = res;
1516 }
1517
1518 /**
1519 * Normalize all injections into Object-based format
1520 */
1521 function normalizeInject (options, vm) {
1522 var inject = options.inject;
1523 if (!inject) { return }
1524 var normalized = options.inject = {};
1525 if (Array.isArray(inject)) {
1526 for (var i = 0; i < inject.length; i++) {
1527 normalized[inject[i]] = { from: inject[i] };
1528 }
1529 } else if (isPlainObject(inject)) {
1530 for (var key in inject) {
1531 var val = inject[key];
1532 normalized[key] = isPlainObject(val)
1533 ? extend({ from: key }, val)
1534 : { from: val };
1535 }
1536 } else {
1537 warn(
1538 "Invalid value for option \"inject\": expected an Array or an Object, " +
1539 "but got " + (toRawType(inject)) + ".",
1540 vm
1541 );
1542 }
1543 }
1544
1545 /**
1546 * Normalize raw function directives into object format.
1547 */
1548 function normalizeDirectives (options) {
1549 var dirs = options.directives;
1550 if (dirs) {
1551 for (var key in dirs) {
1552 var def = dirs[key];
1553 if (typeof def === 'function') {
1554 dirs[key] = { bind: def, update: def };
1555 }
1556 }
1557 }
1558 }
1559
1560 function assertObjectType (name, value, vm) {
1561 if (!isPlainObject(value)) {
1562 warn(
1563 "Invalid value for option \"" + name + "\": expected an Object, " +
1564 "but got " + (toRawType(value)) + ".",
1565 vm
1566 );
1567 }
1568 }
1569
1570 /**
1571 * Merge two option objects into a new one.
1572 * Core utility used in both instantiation and inheritance.
1573 */
1574 function mergeOptions (
1575 parent,
1576 child,
1577 vm
1578 ) {
1579 {
1580 checkComponents(child);
1581 }
1582
1583 if (typeof child === 'function') {
1584 child = child.options;
1585 }
1586
1587 normalizeProps(child, vm);
1588 normalizeInject(child, vm);
1589 normalizeDirectives(child);
1590
1591 // Apply extends and mixins on the child options,
1592 // but only if it is a raw options object that isn't
1593 // the result of another mergeOptions call.
1594 // Only merged options has the _base property.
1595 if (!child._base) {
1596 if (child.extends) {
1597 parent = mergeOptions(parent, child.extends, vm);
1598 }
1599 if (child.mixins) {
1600 for (var i = 0, l = child.mixins.length; i < l; i++) {
1601 parent = mergeOptions(parent, child.mixins[i], vm);
1602 }
1603 }
1604 }
1605
1606 var options = {};
1607 var key;
1608 for (key in parent) {
1609 mergeField(key);
1610 }
1611 for (key in child) {
1612 if (!hasOwn(parent, key)) {
1613 mergeField(key);
1614 }
1615 }
1616 function mergeField (key) {
1617 var strat = strats[key] || defaultStrat;
1618 options[key] = strat(parent[key], child[key], vm, key);
1619 }
1620 return options
1621 }
1622
1623 /**
1624 * Resolve an asset.
1625 * This function is used because child instances need access
1626 * to assets defined in its ancestor chain.
1627 */
1628 function resolveAsset (
1629 options,
1630 type,
1631 id,
1632 warnMissing
1633 ) {
1634 /* istanbul ignore if */
1635 if (typeof id !== 'string') {
1636 return
1637 }
1638 var assets = options[type];
1639 // check local registration variations first
1640 if (hasOwn(assets, id)) { return assets[id] }
1641 var camelizedId = camelize(id);
1642 if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
1643 var PascalCaseId = capitalize(camelizedId);
1644 if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
1645 // fallback to prototype chain
1646 var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
1647 if (warnMissing && !res) {
1648 warn(
1649 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
1650 options
1651 );
1652 }
1653 return res
1654 }
1655
1656 /* */
1657
1658
1659
1660 function validateProp (
1661 key,
1662 propOptions,
1663 propsData,
1664 vm
1665 ) {
1666 var prop = propOptions[key];
1667 var absent = !hasOwn(propsData, key);
1668 var value = propsData[key];
1669 // boolean casting
1670 var booleanIndex = getTypeIndex(Boolean, prop.type);
1671 if (booleanIndex > -1) {
1672 if (absent && !hasOwn(prop, 'default')) {
1673 value = false;
1674 } else if (value === '' || value === hyphenate(key)) {
1675 // only cast empty string / same name to boolean if
1676 // boolean has higher priority
1677 var stringIndex = getTypeIndex(String, prop.type);
1678 if (stringIndex < 0 || booleanIndex < stringIndex) {
1679 value = true;
1680 }
1681 }
1682 }
1683 // check default value
1684 if (value === undefined) {
1685 value = getPropDefaultValue(vm, prop, key);
1686 // since the default value is a fresh copy,
1687 // make sure to observe it.
1688 var prevShouldObserve = shouldObserve;
1689 toggleObserving(true);
1690 observe(value);
1691 toggleObserving(prevShouldObserve);
1692 }
1693 {
1694 assertProp(prop, key, value, vm, absent);
1695 }
1696 return value
1697 }
1698
1699 /**
1700 * Get the default value of a prop.
1701 */
1702 function getPropDefaultValue (vm, prop, key) {
1703 // no default, return undefined
1704 if (!hasOwn(prop, 'default')) {
1705 return undefined
1706 }
1707 var def = prop.default;
1708 // warn against non-factory defaults for Object & Array
1709 if (isObject(def)) {
1710 warn(
1711 'Invalid default value for prop "' + key + '": ' +
1712 'Props with type Object/Array must use a factory function ' +
1713 'to return the default value.',
1714 vm
1715 );
1716 }
1717 // the raw prop value was also undefined from previous render,
1718 // return previous default value to avoid unnecessary watcher trigger
1719 if (vm && vm.$options.propsData &&
1720 vm.$options.propsData[key] === undefined &&
1721 vm._props[key] !== undefined
1722 ) {
1723 return vm._props[key]
1724 }
1725 // call factory function for non-Function types
1726 // a value is Function if its prototype is function even across different execution context
1727 return typeof def === 'function' && getType(prop.type) !== 'Function'
1728 ? def.call(vm)
1729 : def
1730 }
1731
1732 /**
1733 * Assert whether a prop is valid.
1734 */
1735 function assertProp (
1736 prop,
1737 name,
1738 value,
1739 vm,
1740 absent
1741 ) {
1742 if (prop.required && absent) {
1743 warn(
1744 'Missing required prop: "' + name + '"',
1745 vm
1746 );
1747 return
1748 }
1749 if (value == null && !prop.required) {
1750 return
1751 }
1752 var type = prop.type;
1753 var valid = !type || type === true;
1754 var expectedTypes = [];
1755 if (type) {
1756 if (!Array.isArray(type)) {
1757 type = [type];
1758 }
1759 for (var i = 0; i < type.length && !valid; i++) {
1760 var assertedType = assertType(value, type[i]);
1761 expectedTypes.push(assertedType.expectedType || '');
1762 valid = assertedType.valid;
1763 }
1764 }
1765
1766 if (!valid) {
1767 warn(
1768 getInvalidTypeMessage(name, value, expectedTypes),
1769 vm
1770 );
1771 return
1772 }
1773 var validator = prop.validator;
1774 if (validator) {
1775 if (!validator(value)) {
1776 warn(
1777 'Invalid prop: custom validator check failed for prop "' + name + '".',
1778 vm
1779 );
1780 }
1781 }
1782 }
1783
1784 var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
1785
1786 function assertType (value, type) {
1787 var valid;
1788 var expectedType = getType(type);
1789 if (simpleCheckRE.test(expectedType)) {
1790 var t = typeof value;
1791 valid = t === expectedType.toLowerCase();
1792 // for primitive wrapper objects
1793 if (!valid && t === 'object') {
1794 valid = value instanceof type;
1795 }
1796 } else if (expectedType === 'Object') {
1797 valid = isPlainObject(value);
1798 } else if (expectedType === 'Array') {
1799 valid = Array.isArray(value);
1800 } else {
1801 valid = value instanceof type;
1802 }
1803 return {
1804 valid: valid,
1805 expectedType: expectedType
1806 }
1807 }
1808
1809 /**
1810 * Use function string name to check built-in types,
1811 * because a simple equality check will fail when running
1812 * across different vms / iframes.
1813 */
1814 function getType (fn) {
1815 var match = fn && fn.toString().match(/^\s*function (\w+)/);
1816 return match ? match[1] : ''
1817 }
1818
1819 function isSameType (a, b) {
1820 return getType(a) === getType(b)
1821 }
1822
1823 function getTypeIndex (type, expectedTypes) {
1824 if (!Array.isArray(expectedTypes)) {
1825 return isSameType(expectedTypes, type) ? 0 : -1
1826 }
1827 for (var i = 0, len = expectedTypes.length; i < len; i++) {
1828 if (isSameType(expectedTypes[i], type)) {
1829 return i
1830 }
1831 }
1832 return -1
1833 }
1834
1835 function getInvalidTypeMessage (name, value, expectedTypes) {
1836 var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
1837 " Expected " + (expectedTypes.map(capitalize).join(', '));
1838 var expectedType = expectedTypes[0];
1839 var receivedType = toRawType(value);
1840 var expectedValue = styleValue(value, expectedType);
1841 var receivedValue = styleValue(value, receivedType);
1842 // check if we need to specify expected value
1843 if (expectedTypes.length === 1 &&
1844 isExplicable(expectedType) &&
1845 !isBoolean(expectedType, receivedType)) {
1846 message += " with value " + expectedValue;
1847 }
1848 message += ", got " + receivedType + " ";
1849 // check if we need to specify received value
1850 if (isExplicable(receivedType)) {
1851 message += "with value " + receivedValue + ".";
1852 }
1853 return message
1854 }
1855
1856 function styleValue (value, type) {
1857 if (type === 'String') {
1858 return ("\"" + value + "\"")
1859 } else if (type === 'Number') {
1860 return ("" + (Number(value)))
1861 } else {
1862 return ("" + value)
1863 }
1864 }
1865
1866 function isExplicable (value) {
1867 var explicitTypes = ['string', 'number', 'boolean'];
1868 return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
1869 }
1870
1871 function isBoolean () {
1872 var args = [], len = arguments.length;
1873 while ( len-- ) args[ len ] = arguments[ len ];
1874
1875 return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
1876 }
1877
1878 /* */
1879
1880 function handleError (err, vm, info) {
1881 if (vm) {
1882 var cur = vm;
1883 while ((cur = cur.$parent)) {
1884 var hooks = cur.$options.errorCaptured;
1885 if (hooks) {
1886 for (var i = 0; i < hooks.length; i++) {
1887 try {
1888 var capture = hooks[i].call(cur, err, vm, info) === false;
1889 if (capture) { return }
1890 } catch (e) {
1891 globalHandleError(e, cur, 'errorCaptured hook');
1892 }
1893 }
1894 }
1895 }
1896 }
1897 globalHandleError(err, vm, info);
1898 }
1899
1900 function globalHandleError (err, vm, info) {
1901 logError(err, vm, info);
1902 }
1903
1904 function logError (err, vm, info) {
1905 {
1906 warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
1907 }
1908 /* istanbul ignore else */
1909 if ((inBrowser || inWeex) && typeof console !== 'undefined') {
1910 console.error(err);
1911 } else {
1912 throw err
1913 }
1914 }
1915
1916 /* */
1917
1918 var callbacks = [];
1919
1920 function flushCallbacks () {
1921 var copies = callbacks.slice(0);
1922 callbacks.length = 0;
1923 for (var i = 0; i < copies.length; i++) {
1924 copies[i]();
1925 }
1926 }
1927
1928 // Determine (macro) task defer implementation.
1929 // Technically setImmediate should be the ideal choice, but it's only available
1930 // in IE. The only polyfill that consistently queues the callback after all DOM
1931 // events triggered in the same loop is by using MessageChannel.
1932 /* istanbul ignore if */
1933 if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) ; else if (typeof MessageChannel !== 'undefined' && (
1934 isNative(MessageChannel) ||
1935 // PhantomJS
1936 MessageChannel.toString() === '[object MessageChannelConstructor]'
1937 )) {
1938 var channel = new MessageChannel();
1939 channel.port1.onmessage = flushCallbacks;
1940 }
1941
1942 // Determine microtask defer implementation.
1943 /* istanbul ignore next, $flow-disable-line */
1944 if (typeof Promise !== 'undefined' && isNative(Promise)) ;
1945
1946 /* */
1947
1948 /* */
1949
1950 function genClassForVnode (vnode) {
1951 var data = vnode.data;
1952 var parentNode = vnode;
1953 var childNode = vnode;
1954 while (isDef(childNode.componentInstance)) {
1955 childNode = childNode.componentInstance._vnode;
1956 if (childNode && childNode.data) {
1957 data = mergeClassData(childNode.data, data);
1958 }
1959 }
1960 while (isDef(parentNode = parentNode.parent)) {
1961 if (parentNode && parentNode.data) {
1962 data = mergeClassData(data, parentNode.data);
1963 }
1964 }
1965 return renderClass(data.staticClass, data.class)
1966 }
1967
1968 function mergeClassData (child, parent) {
1969 return {
1970 staticClass: concat(child.staticClass, parent.staticClass),
1971 class: isDef(child.class)
1972 ? [child.class, parent.class]
1973 : parent.class
1974 }
1975 }
1976
1977 function renderClass (
1978 staticClass,
1979 dynamicClass
1980 ) {
1981 if (isDef(staticClass) || isDef(dynamicClass)) {
1982 return concat(staticClass, stringifyClass(dynamicClass))
1983 }
1984 /* istanbul ignore next */
1985 return ''
1986 }
1987
1988 function concat (a, b) {
1989 return a ? b ? (a + ' ' + b) : a : (b || '')
1990 }
1991
1992 function stringifyClass (value) {
1993 if (Array.isArray(value)) {
1994 return stringifyArray(value)
1995 }
1996 if (isObject(value)) {
1997 return stringifyObject(value)
1998 }
1999 if (typeof value === 'string') {
2000 return value
2001 }
2002 /* istanbul ignore next */
2003 return ''
2004 }
2005
2006 function stringifyArray (value) {
2007 var res = '';
2008 var stringified;
2009 for (var i = 0, l = value.length; i < l; i++) {
2010 if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
2011 if (res) { res += ' '; }
2012 res += stringified;
2013 }
2014 }
2015 return res
2016 }
2017
2018 function stringifyObject (value) {
2019 var res = '';
2020 for (var key in value) {
2021 if (value[key]) {
2022 if (res) { res += ' '; }
2023 res += key;
2024 }
2025 }
2026 return res
2027 }
2028
2029 /* */
2030
2031 var isHTMLTag = makeMap(
2032 'html,body,base,head,link,meta,style,title,' +
2033 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
2034 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
2035 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
2036 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
2037 'embed,object,param,source,canvas,script,noscript,del,ins,' +
2038 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
2039 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
2040 'output,progress,select,textarea,' +
2041 'details,dialog,menu,menuitem,summary,' +
2042 'content,element,shadow,template,blockquote,iframe,tfoot'
2043 );
2044
2045 // this map is intentionally selective, only covering SVG elements that may
2046 // contain child elements.
2047 var isSVG = makeMap(
2048 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
2049 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
2050 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
2051 true
2052 );
2053
2054 var isPreTag = function (tag) { return tag === 'pre'; };
2055
2056 var isReservedTag = function (tag) {
2057 return isHTMLTag(tag) || isSVG(tag)
2058 };
2059
2060 function getTagNamespace (tag) {
2061 if (isSVG(tag)) {
2062 return 'svg'
2063 }
2064 // basic support for MathML
2065 // note it doesn't support other MathML elements being component roots
2066 if (tag === 'math') {
2067 return 'math'
2068 }
2069 }
2070
2071 var isTextInputType = makeMap('text,number,password,search,email,tel,url');
2072
2073 /* */
2074
2075 /* */
2076
2077 function renderClass$1 (node) {
2078 var classList = genClassForVnode(node);
2079 if (classList !== '') {
2080 return (" class=\"" + (escape(classList)) + "\"")
2081 }
2082 }
2083
2084 /* */
2085
2086 var parseStyleText = cached(function (cssText) {
2087 var res = {};
2088 var listDelimiter = /;(?![^(]*\))/g;
2089 var propertyDelimiter = /:(.+)/;
2090 cssText.split(listDelimiter).forEach(function (item) {
2091 if (item) {
2092 var tmp = item.split(propertyDelimiter);
2093 tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
2094 }
2095 });
2096 return res
2097 });
2098
2099 // merge static and dynamic style data on the same vnode
2100 function normalizeStyleData (data) {
2101 var style = normalizeStyleBinding(data.style);
2102 // static style is pre-processed into an object during compilation
2103 // and is always a fresh object, so it's safe to merge into it
2104 return data.staticStyle
2105 ? extend(data.staticStyle, style)
2106 : style
2107 }
2108
2109 // normalize possible array / string values into Object
2110 function normalizeStyleBinding (bindingStyle) {
2111 if (Array.isArray(bindingStyle)) {
2112 return toObject(bindingStyle)
2113 }
2114 if (typeof bindingStyle === 'string') {
2115 return parseStyleText(bindingStyle)
2116 }
2117 return bindingStyle
2118 }
2119
2120 /**
2121 * parent component style should be after child's
2122 * so that parent component's style could override it
2123 */
2124 function getStyle (vnode, checkChild) {
2125 var res = {};
2126 var styleData;
2127
2128 if (checkChild) {
2129 var childNode = vnode;
2130 while (childNode.componentInstance) {
2131 childNode = childNode.componentInstance._vnode;
2132 if (
2133 childNode && childNode.data &&
2134 (styleData = normalizeStyleData(childNode.data))
2135 ) {
2136 extend(res, styleData);
2137 }
2138 }
2139 }
2140
2141 if ((styleData = normalizeStyleData(vnode.data))) {
2142 extend(res, styleData);
2143 }
2144
2145 var parentNode = vnode;
2146 while ((parentNode = parentNode.parent)) {
2147 if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
2148 extend(res, styleData);
2149 }
2150 }
2151 return res
2152 }
2153
2154 /* */
2155
2156 function genStyle (style) {
2157 var styleText = '';
2158 for (var key in style) {
2159 var value = style[key];
2160 var hyphenatedKey = hyphenate(key);
2161 if (Array.isArray(value)) {
2162 for (var i = 0, len = value.length; i < len; i++) {
2163 styleText += hyphenatedKey + ":" + (value[i]) + ";";
2164 }
2165 } else {
2166 styleText += hyphenatedKey + ":" + value + ";";
2167 }
2168 }
2169 return styleText
2170 }
2171
2172 function renderStyle (vnode) {
2173 var styleText = genStyle(getStyle(vnode, false));
2174 if (styleText !== '') {
2175 return (" style=" + (JSON.stringify(escape(styleText))))
2176 }
2177 }
2178
2179 var modules = [
2180 renderAttrs,
2181 renderDOMProps,
2182 renderClass$1,
2183 renderStyle
2184 ];
2185
2186 /* */
2187
2188 function show (node, dir) {
2189 if (!dir.value) {
2190 var style = node.data.style || (node.data.style = {});
2191 if (Array.isArray(style)) {
2192 style.push({ display: 'none' });
2193 } else {
2194 style.display = 'none';
2195 }
2196 }
2197 }
2198
2199 /* */
2200
2201 // this is only applied for <select v-model> because it is the only edge case
2202 // that must be done at runtime instead of compile time.
2203 function model (node, dir) {
2204 if (!node.children) { return }
2205 var value = dir.value;
2206 var isMultiple = node.data.attrs && node.data.attrs.multiple;
2207 for (var i = 0, l = node.children.length; i < l; i++) {
2208 var option = node.children[i];
2209 if (option.tag === 'option') {
2210 if (isMultiple) {
2211 var selected =
2212 Array.isArray(value) &&
2213 (looseIndexOf(value, getValue(option)) > -1);
2214 if (selected) {
2215 setSelected(option);
2216 }
2217 } else {
2218 if (looseEqual(value, getValue(option))) {
2219 setSelected(option);
2220 return
2221 }
2222 }
2223 }
2224 }
2225 }
2226
2227 function getValue (option) {
2228 var data = option.data || {};
2229 return (
2230 (data.attrs && data.attrs.value) ||
2231 (data.domProps && data.domProps.value) ||
2232 (option.children && option.children[0] && option.children[0].text)
2233 )
2234 }
2235
2236 function setSelected (option) {
2237 var data = option.data || (option.data = {});
2238 var attrs = data.attrs || (data.attrs = {});
2239 attrs.selected = '';
2240 }
2241
2242 var directives = {
2243 show: show,
2244 model: model
2245 };
2246
2247 /* */
2248
2249 var isUnaryTag = makeMap(
2250 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
2251 'link,meta,param,source,track,wbr'
2252 );
2253
2254 // Elements that you can, intentionally, leave open
2255 // (and which close themselves)
2256 var canBeLeftOpenTag = makeMap(
2257 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
2258 );
2259
2260 // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
2261 // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
2262 var isNonPhrasingTag = makeMap(
2263 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
2264 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
2265 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
2266 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
2267 'title,tr,track'
2268 );
2269
2270 /* */
2271
2272 var MAX_STACK_DEPTH = 900;
2273 var noop$1 = function (_) { return _; };
2274
2275 var defer = typeof process !== 'undefined' && process.nextTick
2276 ? process.nextTick
2277 : typeof Promise !== 'undefined'
2278 ? function (fn) { return Promise.resolve().then(fn); }
2279 : typeof setTimeout !== 'undefined'
2280 ? setTimeout
2281 : noop$1;
2282
2283 if (defer === noop$1) {
2284 throw new Error(
2285 'Your JavaScript runtime does not support any asynchronous primitives ' +
2286 'that are required by vue-server-renderer. Please use a polyfill for ' +
2287 'either Promise or setTimeout.'
2288 )
2289 }
2290
2291 function createWriteFunction (
2292 write,
2293 onError
2294 ) {
2295 var stackDepth = 0;
2296 var cachedWrite = function (text, next) {
2297 if (text && cachedWrite.caching) {
2298 cachedWrite.cacheBuffer[cachedWrite.cacheBuffer.length - 1] += text;
2299 }
2300 var waitForNext = write(text, next);
2301 if (waitForNext !== true) {
2302 if (stackDepth >= MAX_STACK_DEPTH) {
2303 defer(function () {
2304 try { next(); } catch (e) {
2305 onError(e);
2306 }
2307 });
2308 } else {
2309 stackDepth++;
2310 next();
2311 stackDepth--;
2312 }
2313 }
2314 };
2315 cachedWrite.caching = false;
2316 cachedWrite.cacheBuffer = [];
2317 cachedWrite.componentBuffer = [];
2318 return cachedWrite
2319 }
2320
2321 /* */
2322
2323
2324
2325 var RenderContext = function RenderContext (options) {
2326 this.userContext = options.userContext;
2327 this.activeInstance = options.activeInstance;
2328 this.renderStates = [];
2329
2330 this.write = options.write;
2331 this.done = options.done;
2332 this.renderNode = options.renderNode;
2333
2334 this.isUnaryTag = options.isUnaryTag;
2335 this.modules = options.modules;
2336 this.directives = options.directives;
2337
2338 var cache = options.cache;
2339 if (cache && (!cache.get || !cache.set)) {
2340 throw new Error('renderer cache must implement at least get & set.')
2341 }
2342 this.cache = cache;
2343 this.get = cache && normalizeAsync(cache, 'get');
2344 this.has = cache && normalizeAsync(cache, 'has');
2345
2346 this.next = this.next.bind(this);
2347 };
2348
2349 RenderContext.prototype.next = function next () {
2350 // eslint-disable-next-line
2351 while (true) {
2352 var lastState = this.renderStates[this.renderStates.length - 1];
2353 if (isUndef(lastState)) {
2354 return this.done()
2355 }
2356 /* eslint-disable no-case-declarations */
2357 switch (lastState.type) {
2358 case 'Element':
2359 case 'Fragment':
2360 var children = lastState.children;
2361 var total = lastState.total;
2362 var rendered = lastState.rendered++;
2363 if (rendered < total) {
2364 return this.renderNode(children[rendered], false, this)
2365 } else {
2366 this.renderStates.pop();
2367 if (lastState.type === 'Element') {
2368 return this.write(lastState.endTag, this.next)
2369 }
2370 }
2371 break
2372 case 'Component':
2373 this.renderStates.pop();
2374 this.activeInstance = lastState.prevActive;
2375 break
2376 case 'ComponentWithCache':
2377 this.renderStates.pop();
2378 var buffer = lastState.buffer;
2379 var bufferIndex = lastState.bufferIndex;
2380 var componentBuffer = lastState.componentBuffer;
2381 var key = lastState.key;
2382 var result = {
2383 html: buffer[bufferIndex],
2384 components: componentBuffer[bufferIndex]
2385 };
2386 this.cache.set(key, result);
2387 if (bufferIndex === 0) {
2388 // this is a top-level cached component,
2389 // exit caching mode.
2390 this.write.caching = false;
2391 } else {
2392 // parent component is also being cached,
2393 // merge self into parent's result
2394 buffer[bufferIndex - 1] += result.html;
2395 var prev = componentBuffer[bufferIndex - 1];
2396 result.components.forEach(function (c) { return prev.add(c); });
2397 }
2398 buffer.length = bufferIndex;
2399 componentBuffer.length = bufferIndex;
2400 break
2401 }
2402 }
2403 };
2404
2405 function normalizeAsync (cache, method) {
2406 var fn = cache[method];
2407 if (isUndef(fn)) {
2408 return
2409 } else if (fn.length > 1) {
2410 return function (key, cb) { return fn.call(cache, key, cb); }
2411 } else {
2412 return function (key, cb) { return cb(fn.call(cache, key)); }
2413 }
2414 }
2415
2416 /* */
2417
2418 var validDivisionCharRE = /[\w).+\-_$\]]/;
2419
2420 function parseFilters (exp) {
2421 var inSingle = false;
2422 var inDouble = false;
2423 var inTemplateString = false;
2424 var inRegex = false;
2425 var curly = 0;
2426 var square = 0;
2427 var paren = 0;
2428 var lastFilterIndex = 0;
2429 var c, prev, i, expression, filters;
2430
2431 for (i = 0; i < exp.length; i++) {
2432 prev = c;
2433 c = exp.charCodeAt(i);
2434 if (inSingle) {
2435 if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
2436 } else if (inDouble) {
2437 if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
2438 } else if (inTemplateString) {
2439 if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
2440 } else if (inRegex) {
2441 if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
2442 } else if (
2443 c === 0x7C && // pipe
2444 exp.charCodeAt(i + 1) !== 0x7C &&
2445 exp.charCodeAt(i - 1) !== 0x7C &&
2446 !curly && !square && !paren
2447 ) {
2448 if (expression === undefined) {
2449 // first filter, end of expression
2450 lastFilterIndex = i + 1;
2451 expression = exp.slice(0, i).trim();
2452 } else {
2453 pushFilter();
2454 }
2455 } else {
2456 switch (c) {
2457 case 0x22: inDouble = true; break // "
2458 case 0x27: inSingle = true; break // '
2459 case 0x60: inTemplateString = true; break // `
2460 case 0x28: paren++; break // (
2461 case 0x29: paren--; break // )
2462 case 0x5B: square++; break // [
2463 case 0x5D: square--; break // ]
2464 case 0x7B: curly++; break // {
2465 case 0x7D: curly--; break // }
2466 }
2467 if (c === 0x2f) { // /
2468 var j = i - 1;
2469 var p = (void 0);
2470 // find first non-whitespace prev char
2471 for (; j >= 0; j--) {
2472 p = exp.charAt(j);
2473 if (p !== ' ') { break }
2474 }
2475 if (!p || !validDivisionCharRE.test(p)) {
2476 inRegex = true;
2477 }
2478 }
2479 }
2480 }
2481
2482 if (expression === undefined) {
2483 expression = exp.slice(0, i).trim();
2484 } else if (lastFilterIndex !== 0) {
2485 pushFilter();
2486 }
2487
2488 function pushFilter () {
2489 (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
2490 lastFilterIndex = i + 1;
2491 }
2492
2493 if (filters) {
2494 for (i = 0; i < filters.length; i++) {
2495 expression = wrapFilter(expression, filters[i]);
2496 }
2497 }
2498
2499 return expression
2500 }
2501
2502 function wrapFilter (exp, filter) {
2503 var i = filter.indexOf('(');
2504 if (i < 0) {
2505 // _f: resolveFilter
2506 return ("_f(\"" + filter + "\")(" + exp + ")")
2507 } else {
2508 var name = filter.slice(0, i);
2509 var args = filter.slice(i + 1);
2510 return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args))
2511 }
2512 }
2513
2514 /* */
2515
2516 var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
2517 var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
2518
2519 var buildRegex = cached(function (delimiters) {
2520 var open = delimiters[0].replace(regexEscapeRE, '\\$&');
2521 var close = delimiters[1].replace(regexEscapeRE, '\\$&');
2522 return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
2523 });
2524
2525
2526
2527 function parseText (
2528 text,
2529 delimiters
2530 ) {
2531 var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
2532 if (!tagRE.test(text)) {
2533 return
2534 }
2535 var tokens = [];
2536 var rawTokens = [];
2537 var lastIndex = tagRE.lastIndex = 0;
2538 var match, index, tokenValue;
2539 while ((match = tagRE.exec(text))) {
2540 index = match.index;
2541 // push text token
2542 if (index > lastIndex) {
2543 rawTokens.push(tokenValue = text.slice(lastIndex, index));
2544 tokens.push(JSON.stringify(tokenValue));
2545 }
2546 // tag token
2547 var exp = parseFilters(match[1].trim());
2548 tokens.push(("_s(" + exp + ")"));
2549 rawTokens.push({ '@binding': exp });
2550 lastIndex = index + match[0].length;
2551 }
2552 if (lastIndex < text.length) {
2553 rawTokens.push(tokenValue = text.slice(lastIndex));
2554 tokens.push(JSON.stringify(tokenValue));
2555 }
2556 return {
2557 expression: tokens.join('+'),
2558 tokens: rawTokens
2559 }
2560 }
2561
2562 /* */
2563
2564 function baseWarn (msg) {
2565 console.error(("[Vue compiler]: " + msg));
2566 }
2567
2568 function pluckModuleFunction (
2569 modules,
2570 key
2571 ) {
2572 return modules
2573 ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
2574 : []
2575 }
2576
2577 function addProp (el, name, value) {
2578 (el.props || (el.props = [])).push({ name: name, value: value });
2579 el.plain = false;
2580 }
2581
2582 function addAttr (el, name, value) {
2583 (el.attrs || (el.attrs = [])).push({ name: name, value: value });
2584 el.plain = false;
2585 }
2586
2587 // add a raw attr (use this in preTransforms)
2588 function addRawAttr (el, name, value) {
2589 el.attrsMap[name] = value;
2590 el.attrsList.push({ name: name, value: value });
2591 }
2592
2593 function addDirective (
2594 el,
2595 name,
2596 rawName,
2597 value,
2598 arg,
2599 modifiers
2600 ) {
2601 (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });
2602 el.plain = false;
2603 }
2604
2605 function addHandler (
2606 el,
2607 name,
2608 value,
2609 modifiers,
2610 important,
2611 warn
2612 ) {
2613 modifiers = modifiers || emptyObject;
2614 // warn prevent and passive modifier
2615 /* istanbul ignore if */
2616 if (
2617 warn &&
2618 modifiers.prevent && modifiers.passive
2619 ) {
2620 warn(
2621 'passive and prevent can\'t be used together. ' +
2622 'Passive handler can\'t prevent default event.'
2623 );
2624 }
2625
2626 // normalize click.right and click.middle since they don't actually fire
2627 // this is technically browser-specific, but at least for now browsers are
2628 // the only target envs that have right/middle clicks.
2629 if (name === 'click') {
2630 if (modifiers.right) {
2631 name = 'contextmenu';
2632 delete modifiers.right;
2633 } else if (modifiers.middle) {
2634 name = 'mouseup';
2635 }
2636 }
2637
2638 // check capture modifier
2639 if (modifiers.capture) {
2640 delete modifiers.capture;
2641 name = '!' + name; // mark the event as captured
2642 }
2643 if (modifiers.once) {
2644 delete modifiers.once;
2645 name = '~' + name; // mark the event as once
2646 }
2647 /* istanbul ignore if */
2648 if (modifiers.passive) {
2649 delete modifiers.passive;
2650 name = '&' + name; // mark the event as passive
2651 }
2652
2653 var events;
2654 if (modifiers.native) {
2655 delete modifiers.native;
2656 events = el.nativeEvents || (el.nativeEvents = {});
2657 } else {
2658 events = el.events || (el.events = {});
2659 }
2660
2661 var newHandler = {
2662 value: value.trim()
2663 };
2664 if (modifiers !== emptyObject) {
2665 newHandler.modifiers = modifiers;
2666 }
2667
2668 var handlers = events[name];
2669 /* istanbul ignore if */
2670 if (Array.isArray(handlers)) {
2671 important ? handlers.unshift(newHandler) : handlers.push(newHandler);
2672 } else if (handlers) {
2673 events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
2674 } else {
2675 events[name] = newHandler;
2676 }
2677
2678 el.plain = false;
2679 }
2680
2681 function getBindingAttr (
2682 el,
2683 name,
2684 getStatic
2685 ) {
2686 var dynamicValue =
2687 getAndRemoveAttr(el, ':' + name) ||
2688 getAndRemoveAttr(el, 'v-bind:' + name);
2689 if (dynamicValue != null) {
2690 return parseFilters(dynamicValue)
2691 } else if (getStatic !== false) {
2692 var staticValue = getAndRemoveAttr(el, name);
2693 if (staticValue != null) {
2694 return JSON.stringify(staticValue)
2695 }
2696 }
2697 }
2698
2699 // note: this only removes the attr from the Array (attrsList) so that it
2700 // doesn't get processed by processAttrs.
2701 // By default it does NOT remove it from the map (attrsMap) because the map is
2702 // needed during codegen.
2703 function getAndRemoveAttr (
2704 el,
2705 name,
2706 removeFromMap
2707 ) {
2708 var val;
2709 if ((val = el.attrsMap[name]) != null) {
2710 var list = el.attrsList;
2711 for (var i = 0, l = list.length; i < l; i++) {
2712 if (list[i].name === name) {
2713 list.splice(i, 1);
2714 break
2715 }
2716 }
2717 }
2718 if (removeFromMap) {
2719 delete el.attrsMap[name];
2720 }
2721 return val
2722 }
2723
2724 /* */
2725
2726 function transformNode (el, options) {
2727 var warn = options.warn || baseWarn;
2728 var staticClass = getAndRemoveAttr(el, 'class');
2729 if (staticClass) {
2730 var res = parseText(staticClass, options.delimiters);
2731 if (res) {
2732 warn(
2733 "class=\"" + staticClass + "\": " +
2734 'Interpolation inside attributes has been removed. ' +
2735 'Use v-bind or the colon shorthand instead. For example, ' +
2736 'instead of <div class="{{ val }}">, use <div :class="val">.'
2737 );
2738 }
2739 }
2740 if (staticClass) {
2741 el.staticClass = JSON.stringify(staticClass);
2742 }
2743 var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
2744 if (classBinding) {
2745 el.classBinding = classBinding;
2746 }
2747 }
2748
2749 function genData (el) {
2750 var data = '';
2751 if (el.staticClass) {
2752 data += "staticClass:" + (el.staticClass) + ",";
2753 }
2754 if (el.classBinding) {
2755 data += "class:" + (el.classBinding) + ",";
2756 }
2757 return data
2758 }
2759
2760 var klass = {
2761 staticKeys: ['staticClass'],
2762 transformNode: transformNode,
2763 genData: genData
2764 };
2765
2766 /* */
2767
2768 function transformNode$1 (el, options) {
2769 var warn = options.warn || baseWarn;
2770 var staticStyle = getAndRemoveAttr(el, 'style');
2771 if (staticStyle) {
2772 /* istanbul ignore if */
2773 {
2774 var res = parseText(staticStyle, options.delimiters);
2775 if (res) {
2776 warn(
2777 "style=\"" + staticStyle + "\": " +
2778 'Interpolation inside attributes has been removed. ' +
2779 'Use v-bind or the colon shorthand instead. For example, ' +
2780 'instead of <div style="{{ val }}">, use <div :style="val">.'
2781 );
2782 }
2783 }
2784 el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
2785 }
2786
2787 var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
2788 if (styleBinding) {
2789 el.styleBinding = styleBinding;
2790 }
2791 }
2792
2793 function genData$1 (el) {
2794 var data = '';
2795 if (el.staticStyle) {
2796 data += "staticStyle:" + (el.staticStyle) + ",";
2797 }
2798 if (el.styleBinding) {
2799 data += "style:(" + (el.styleBinding) + "),";
2800 }
2801 return data
2802 }
2803
2804 var style = {
2805 staticKeys: ['staticStyle'],
2806 transformNode: transformNode$1,
2807 genData: genData$1
2808 };
2809
2810 var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2811
2812 function createCommonjsModule(fn, module) {
2813 return module = { exports: {} }, fn(module, module.exports), module.exports;
2814 }
2815
2816 var he = createCommonjsModule(function (module, exports) {
2817 (function(root) {
2818
2819 // Detect free variables `exports`.
2820 var freeExports = exports;
2821
2822 // Detect free variable `module`.
2823 var freeModule = module &&
2824 module.exports == freeExports && module;
2825
2826 // Detect free variable `global`, from Node.js or Browserified code,
2827 // and use it as `root`.
2828 var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
2829 if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
2830 root = freeGlobal;
2831 }
2832
2833 /*--------------------------------------------------------------------------*/
2834
2835 // All astral symbols.
2836 var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
2837 // All ASCII symbols (not just printable ASCII) except those listed in the
2838 // first column of the overrides table.
2839 // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides
2840 var regexAsciiWhitelist = /[\x01-\x7F]/g;
2841 // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
2842 // code points listed in the first column of the overrides table on
2843 // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.
2844 var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
2845
2846 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;
2847 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'};
2848
2849 var regexEscape = /["&'<>`]/g;
2850 var escapeMap = {
2851 '"': '&quot;',
2852 '&': '&amp;',
2853 '\'': '&#x27;',
2854 '<': '&lt;',
2855 // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
2856 // following is not strictly necessary unless it’s part of a tag or an
2857 // unquoted attribute value. We’re only escaping it to support those
2858 // situations, and for XML support.
2859 '>': '&gt;',
2860 // In Internet Explorer ≤ 8, the backtick character can be used
2861 // to break out of (un)quoted attribute values or HTML comments.
2862 // See http://html5sec.org/#102, http://html5sec.org/#108, and
2863 // http://html5sec.org/#133.
2864 '`': '&#x60;'
2865 };
2866
2867 var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
2868 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]/;
2869 var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;
2870 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'};
2871 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'};
2872 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'};
2873 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];
2874
2875 /*--------------------------------------------------------------------------*/
2876
2877 var stringFromCharCode = String.fromCharCode;
2878
2879 var object = {};
2880 var hasOwnProperty = object.hasOwnProperty;
2881 var has = function(object, propertyName) {
2882 return hasOwnProperty.call(object, propertyName);
2883 };
2884
2885 var contains = function(array, value) {
2886 var index = -1;
2887 var length = array.length;
2888 while (++index < length) {
2889 if (array[index] == value) {
2890 return true;
2891 }
2892 }
2893 return false;
2894 };
2895
2896 var merge = function(options, defaults) {
2897 if (!options) {
2898 return defaults;
2899 }
2900 var result = {};
2901 var key;
2902 for (key in defaults) {
2903 // A `hasOwnProperty` check is not needed here, since only recognized
2904 // option names are used anyway. Any others are ignored.
2905 result[key] = has(options, key) ? options[key] : defaults[key];
2906 }
2907 return result;
2908 };
2909
2910 // Modified version of `ucs2encode`; see https://mths.be/punycode.
2911 var codePointToSymbol = function(codePoint, strict) {
2912 var output = '';
2913 if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {
2914 // See issue #4:
2915 // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
2916 // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
2917 // REPLACEMENT CHARACTER.”
2918 if (strict) {
2919 parseError('character reference outside the permissible Unicode range');
2920 }
2921 return '\uFFFD';
2922 }
2923 if (has(decodeMapNumeric, codePoint)) {
2924 if (strict) {
2925 parseError('disallowed character reference');
2926 }
2927 return decodeMapNumeric[codePoint];
2928 }
2929 if (strict && contains(invalidReferenceCodePoints, codePoint)) {
2930 parseError('disallowed character reference');
2931 }
2932 if (codePoint > 0xFFFF) {
2933 codePoint -= 0x10000;
2934 output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
2935 codePoint = 0xDC00 | codePoint & 0x3FF;
2936 }
2937 output += stringFromCharCode(codePoint);
2938 return output;
2939 };
2940
2941 var hexEscape = function(codePoint) {
2942 return '&#x' + codePoint.toString(16).toUpperCase() + ';';
2943 };
2944
2945 var decEscape = function(codePoint) {
2946 return '&#' + codePoint + ';';
2947 };
2948
2949 var parseError = function(message) {
2950 throw Error('Parse error: ' + message);
2951 };
2952
2953 /*--------------------------------------------------------------------------*/
2954
2955 var encode = function(string, options) {
2956 options = merge(options, encode.options);
2957 var strict = options.strict;
2958 if (strict && regexInvalidRawCodePoint.test(string)) {
2959 parseError('forbidden code point');
2960 }
2961 var encodeEverything = options.encodeEverything;
2962 var useNamedReferences = options.useNamedReferences;
2963 var allowUnsafeSymbols = options.allowUnsafeSymbols;
2964 var escapeCodePoint = options.decimal ? decEscape : hexEscape;
2965
2966 var escapeBmpSymbol = function(symbol) {
2967 return escapeCodePoint(symbol.charCodeAt(0));
2968 };
2969
2970 if (encodeEverything) {
2971 // Encode ASCII symbols.
2972 string = string.replace(regexAsciiWhitelist, function(symbol) {
2973 // Use named references if requested & possible.
2974 if (useNamedReferences && has(encodeMap, symbol)) {
2975 return '&' + encodeMap[symbol] + ';';
2976 }
2977 return escapeBmpSymbol(symbol);
2978 });
2979 // Shorten a few escapes that represent two symbols, of which at least one
2980 // is within the ASCII range.
2981 if (useNamedReferences) {
2982 string = string
2983 .replace(/&gt;\u20D2/g, '&nvgt;')
2984 .replace(/&lt;\u20D2/g, '&nvlt;')
2985 .replace(/&#x66;&#x6A;/g, '&fjlig;');
2986 }
2987 // Encode non-ASCII symbols.
2988 if (useNamedReferences) {
2989 // Encode non-ASCII symbols that can be replaced with a named reference.
2990 string = string.replace(regexEncodeNonAscii, function(string) {
2991 // Note: there is no need to check `has(encodeMap, string)` here.
2992 return '&' + encodeMap[string] + ';';
2993 });
2994 }
2995 // Note: any remaining non-ASCII symbols are handled outside of the `if`.
2996 } else if (useNamedReferences) {
2997 // Apply named character references.
2998 // Encode `<>"'&` using named character references.
2999 if (!allowUnsafeSymbols) {
3000 string = string.replace(regexEscape, function(string) {
3001 return '&' + encodeMap[string] + ';'; // no need to check `has()` here
3002 });
3003 }
3004 // Shorten escapes that represent two symbols, of which at least one is
3005 // `<>"'&`.
3006 string = string
3007 .replace(/&gt;\u20D2/g, '&nvgt;')
3008 .replace(/&lt;\u20D2/g, '&nvlt;');
3009 // Encode non-ASCII symbols that can be replaced with a named reference.
3010 string = string.replace(regexEncodeNonAscii, function(string) {
3011 // Note: there is no need to check `has(encodeMap, string)` here.
3012 return '&' + encodeMap[string] + ';';
3013 });
3014 } else if (!allowUnsafeSymbols) {
3015 // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
3016 // using named character references.
3017 string = string.replace(regexEscape, escapeBmpSymbol);
3018 }
3019 return string
3020 // Encode astral symbols.
3021 .replace(regexAstralSymbols, function($0) {
3022 // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
3023 var high = $0.charCodeAt(0);
3024 var low = $0.charCodeAt(1);
3025 var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
3026 return escapeCodePoint(codePoint);
3027 })
3028 // Encode any remaining BMP symbols that are not printable ASCII symbols
3029 // using a hexadecimal escape.
3030 .replace(regexBmpWhitelist, escapeBmpSymbol);
3031 };
3032 // Expose default options (so they can be overridden globally).
3033 encode.options = {
3034 'allowUnsafeSymbols': false,
3035 'encodeEverything': false,
3036 'strict': false,
3037 'useNamedReferences': false,
3038 'decimal' : false
3039 };
3040
3041 var decode = function(html, options) {
3042 options = merge(options, decode.options);
3043 var strict = options.strict;
3044 if (strict && regexInvalidEntity.test(html)) {
3045 parseError('malformed character reference');
3046 }
3047 return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {
3048 var codePoint;
3049 var semicolon;
3050 var decDigits;
3051 var hexDigits;
3052 var reference;
3053 var next;
3054
3055 if ($1) {
3056 reference = $1;
3057 // Note: there is no need to check `has(decodeMap, reference)`.
3058 return decodeMap[reference];
3059 }
3060
3061 if ($2) {
3062 // Decode named character references without trailing `;`, e.g. `&amp`.
3063 // This is only a parse error if it gets converted to `&`, or if it is
3064 // followed by `=` in an attribute context.
3065 reference = $2;
3066 next = $3;
3067 if (next && options.isAttributeValue) {
3068 if (strict && next == '=') {
3069 parseError('`&` did not start a character reference');
3070 }
3071 return $0;
3072 } else {
3073 if (strict) {
3074 parseError(
3075 'named character reference was not terminated by a semicolon'
3076 );
3077 }
3078 // Note: there is no need to check `has(decodeMapLegacy, reference)`.
3079 return decodeMapLegacy[reference] + (next || '');
3080 }
3081 }
3082
3083 if ($4) {
3084 // Decode decimal escapes, e.g. `&#119558;`.
3085 decDigits = $4;
3086 semicolon = $5;
3087 if (strict && !semicolon) {
3088 parseError('character reference was not terminated by a semicolon');
3089 }
3090 codePoint = parseInt(decDigits, 10);
3091 return codePointToSymbol(codePoint, strict);
3092 }
3093
3094 if ($6) {
3095 // Decode hexadecimal escapes, e.g. `&#x1D306;`.
3096 hexDigits = $6;
3097 semicolon = $7;
3098 if (strict && !semicolon) {
3099 parseError('character reference was not terminated by a semicolon');
3100 }
3101 codePoint = parseInt(hexDigits, 16);
3102 return codePointToSymbol(codePoint, strict);
3103 }
3104
3105 // If we’re still here, `if ($7)` is implied; it’s an ambiguous
3106 // ampersand for sure. https://mths.be/notes/ambiguous-ampersands
3107 if (strict) {
3108 parseError(
3109 'named character reference was not terminated by a semicolon'
3110 );
3111 }
3112 return $0;
3113 });
3114 };
3115 // Expose default options (so they can be overridden globally).
3116 decode.options = {
3117 'isAttributeValue': false,
3118 'strict': false
3119 };
3120
3121 var escape = function(string) {
3122 return string.replace(regexEscape, function($0) {
3123 // Note: there is no need to check `has(escapeMap, $0)` here.
3124 return escapeMap[$0];
3125 });
3126 };
3127
3128 /*--------------------------------------------------------------------------*/
3129
3130 var he = {
3131 'version': '1.2.0',
3132 'encode': encode,
3133 'decode': decode,
3134 'escape': escape,
3135 'unescape': decode
3136 };
3137
3138 // Some AMD build optimizers, like r.js, check for specific condition patterns
3139 // like the following:
3140 if (freeExports && !freeExports.nodeType) {
3141 if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+
3142 freeModule.exports = he;
3143 } else { // in Narwhal or RingoJS v0.7.0-
3144 for (var key in he) {
3145 has(he, key) && (freeExports[key] = he[key]);
3146 }
3147 }
3148 } else { // in Rhino or a web browser
3149 root.he = he;
3150 }
3151
3152 }(commonjsGlobal));
3153 });
3154
3155 /**
3156 * Not type-checking this file because it's mostly vendor code.
3157 */
3158
3159 // Regular Expressions for parsing tags and attributes
3160 var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
3161 // could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName
3162 // but for Vue templates we can enforce a simple charset
3163 var ncname = '[a-zA-Z_][\\w\\-\\.]*';
3164 var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
3165 var startTagOpen = new RegExp(("^<" + qnameCapture));
3166 var startTagClose = /^\s*(\/?)>/;
3167 var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
3168 var doctype = /^<!DOCTYPE [^>]+>/i;
3169 // #7298: escape - to avoid being pased as HTML comment when inlined in page
3170 var comment = /^<!\--/;
3171 var conditionalComment = /^<!\[/;
3172
3173 // Special Elements (can contain anything)
3174 var isPlainTextElement = makeMap('script,style,textarea', true);
3175 var reCache = {};
3176
3177 var decodingMap = {
3178 '&lt;': '<',
3179 '&gt;': '>',
3180 '&quot;': '"',
3181 '&amp;': '&',
3182 '&#10;': '\n',
3183 '&#9;': '\t'
3184 };
3185 var encodedAttr = /&(?:lt|gt|quot|amp);/g;
3186 var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;
3187
3188 // #5992
3189 var isIgnoreNewlineTag = makeMap('pre,textarea', true);
3190 var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
3191
3192 function decodeAttr (value, shouldDecodeNewlines) {
3193 var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
3194 return value.replace(re, function (match) { return decodingMap[match]; })
3195 }
3196
3197 function parseHTML (html, options) {
3198 var stack = [];
3199 var expectHTML = options.expectHTML;
3200 var isUnaryTag$$1 = options.isUnaryTag || no;
3201 var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
3202 var index = 0;
3203 var last, lastTag;
3204 while (html) {
3205 last = html;
3206 // Make sure we're not in a plaintext content element like script/style
3207 if (!lastTag || !isPlainTextElement(lastTag)) {
3208 var textEnd = html.indexOf('<');
3209 if (textEnd === 0) {
3210 // Comment:
3211 if (comment.test(html)) {
3212 var commentEnd = html.indexOf('-->');
3213
3214 if (commentEnd >= 0) {
3215 if (options.shouldKeepComment) {
3216 options.comment(html.substring(4, commentEnd));
3217 }
3218 advance(commentEnd + 3);
3219 continue
3220 }
3221 }
3222
3223 // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
3224 if (conditionalComment.test(html)) {
3225 var conditionalEnd = html.indexOf(']>');
3226
3227 if (conditionalEnd >= 0) {
3228 advance(conditionalEnd + 2);
3229 continue
3230 }
3231 }
3232
3233 // Doctype:
3234 var doctypeMatch = html.match(doctype);
3235 if (doctypeMatch) {
3236 advance(doctypeMatch[0].length);
3237 continue
3238 }
3239
3240 // End tag:
3241 var endTagMatch = html.match(endTag);
3242 if (endTagMatch) {
3243 var curIndex = index;
3244 advance(endTagMatch[0].length);
3245 parseEndTag(endTagMatch[1], curIndex, index);
3246 continue
3247 }
3248
3249 // Start tag:
3250 var startTagMatch = parseStartTag();
3251 if (startTagMatch) {
3252 handleStartTag(startTagMatch);
3253 if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
3254 advance(1);
3255 }
3256 continue
3257 }
3258 }
3259
3260 var text = (void 0), rest = (void 0), next = (void 0);
3261 if (textEnd >= 0) {
3262 rest = html.slice(textEnd);
3263 while (
3264 !endTag.test(rest) &&
3265 !startTagOpen.test(rest) &&
3266 !comment.test(rest) &&
3267 !conditionalComment.test(rest)
3268 ) {
3269 // < in plain text, be forgiving and treat it as text
3270 next = rest.indexOf('<', 1);
3271 if (next < 0) { break }
3272 textEnd += next;
3273 rest = html.slice(textEnd);
3274 }
3275 text = html.substring(0, textEnd);
3276 advance(textEnd);
3277 }
3278
3279 if (textEnd < 0) {
3280 text = html;
3281 html = '';
3282 }
3283
3284 if (options.chars && text) {
3285 options.chars(text);
3286 }
3287 } else {
3288 var endTagLength = 0;
3289 var stackedTag = lastTag.toLowerCase();
3290 var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
3291 var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
3292 endTagLength = endTag.length;
3293 if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
3294 text = text
3295 .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
3296 .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
3297 }
3298 if (shouldIgnoreFirstNewline(stackedTag, text)) {
3299 text = text.slice(1);
3300 }
3301 if (options.chars) {
3302 options.chars(text);
3303 }
3304 return ''
3305 });
3306 index += html.length - rest$1.length;
3307 html = rest$1;
3308 parseEndTag(stackedTag, index - endTagLength, index);
3309 }
3310
3311 if (html === last) {
3312 options.chars && options.chars(html);
3313 if (!stack.length && options.warn) {
3314 options.warn(("Mal-formatted tag at end of template: \"" + html + "\""));
3315 }
3316 break
3317 }
3318 }
3319
3320 // Clean up any remaining tags
3321 parseEndTag();
3322
3323 function advance (n) {
3324 index += n;
3325 html = html.substring(n);
3326 }
3327
3328 function parseStartTag () {
3329 var start = html.match(startTagOpen);
3330 if (start) {
3331 var match = {
3332 tagName: start[1],
3333 attrs: [],
3334 start: index
3335 };
3336 advance(start[0].length);
3337 var end, attr;
3338 while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {
3339 advance(attr[0].length);
3340 match.attrs.push(attr);
3341 }
3342 if (end) {
3343 match.unarySlash = end[1];
3344 advance(end[0].length);
3345 match.end = index;
3346 return match
3347 }
3348 }
3349 }
3350
3351 function handleStartTag (match) {
3352 var tagName = match.tagName;
3353 var unarySlash = match.unarySlash;
3354
3355 if (expectHTML) {
3356 if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
3357 parseEndTag(lastTag);
3358 }
3359 if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
3360 parseEndTag(tagName);
3361 }
3362 }
3363
3364 var unary = isUnaryTag$$1(tagName) || !!unarySlash;
3365
3366 var l = match.attrs.length;
3367 var attrs = new Array(l);
3368 for (var i = 0; i < l; i++) {
3369 var args = match.attrs[i];
3370 var value = args[3] || args[4] || args[5] || '';
3371 var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
3372 ? options.shouldDecodeNewlinesForHref
3373 : options.shouldDecodeNewlines;
3374 attrs[i] = {
3375 name: args[1],
3376 value: decodeAttr(value, shouldDecodeNewlines)
3377 };
3378 }
3379
3380 if (!unary) {
3381 stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });
3382 lastTag = tagName;
3383 }
3384
3385 if (options.start) {
3386 options.start(tagName, attrs, unary, match.start, match.end);
3387 }
3388 }
3389
3390 function parseEndTag (tagName, start, end) {
3391 var pos, lowerCasedTagName;
3392 if (start == null) { start = index; }
3393 if (end == null) { end = index; }
3394
3395 // Find the closest opened tag of the same type
3396 if (tagName) {
3397 lowerCasedTagName = tagName.toLowerCase();
3398 for (pos = stack.length - 1; pos >= 0; pos--) {
3399 if (stack[pos].lowerCasedTag === lowerCasedTagName) {
3400 break
3401 }
3402 }
3403 } else {
3404 // If no tag name is provided, clean shop
3405 pos = 0;
3406 }
3407
3408 if (pos >= 0) {
3409 // Close all the open elements, up the stack
3410 for (var i = stack.length - 1; i >= pos; i--) {
3411 if (i > pos || !tagName &&
3412 options.warn
3413 ) {
3414 options.warn(
3415 ("tag <" + (stack[i].tag) + "> has no matching end tag.")
3416 );
3417 }
3418 if (options.end) {
3419 options.end(stack[i].tag, start, end);
3420 }
3421 }
3422
3423 // Remove the open elements from the stack
3424 stack.length = pos;
3425 lastTag = pos && stack[pos - 1].tag;
3426 } else if (lowerCasedTagName === 'br') {
3427 if (options.start) {
3428 options.start(tagName, [], true, start, end);
3429 }
3430 } else if (lowerCasedTagName === 'p') {
3431 if (options.start) {
3432 options.start(tagName, [], false, start, end);
3433 }
3434 if (options.end) {
3435 options.end(tagName, start, end);
3436 }
3437 }
3438 }
3439 }
3440
3441 /* */
3442
3443 /**
3444 * Cross-platform code generation for component v-model
3445 */
3446 function genComponentModel (
3447 el,
3448 value,
3449 modifiers
3450 ) {
3451 var ref = modifiers || {};
3452 var number = ref.number;
3453 var trim = ref.trim;
3454
3455 var baseValueExpression = '$$v';
3456 var valueExpression = baseValueExpression;
3457 if (trim) {
3458 valueExpression =
3459 "(typeof " + baseValueExpression + " === 'string'" +
3460 "? " + baseValueExpression + ".trim()" +
3461 ": " + baseValueExpression + ")";
3462 }
3463 if (number) {
3464 valueExpression = "_n(" + valueExpression + ")";
3465 }
3466 var assignment = genAssignmentCode(value, valueExpression);
3467
3468 el.model = {
3469 value: ("(" + value + ")"),
3470 expression: ("\"" + value + "\""),
3471 callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
3472 };
3473 }
3474
3475 /**
3476 * Cross-platform codegen helper for generating v-model value assignment code.
3477 */
3478 function genAssignmentCode (
3479 value,
3480 assignment
3481 ) {
3482 var res = parseModel(value);
3483 if (res.key === null) {
3484 return (value + "=" + assignment)
3485 } else {
3486 return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
3487 }
3488 }
3489
3490 /**
3491 * Parse a v-model expression into a base path and a final key segment.
3492 * Handles both dot-path and possible square brackets.
3493 *
3494 * Possible cases:
3495 *
3496 * - test
3497 * - test[key]
3498 * - test[test1[key]]
3499 * - test["a"][key]
3500 * - xxx.test[a[a].test1[key]]
3501 * - test.xxx.a["asa"][test1[key]]
3502 *
3503 */
3504
3505 var len, str, chr, index, expressionPos, expressionEndPos;
3506
3507
3508
3509 function parseModel (val) {
3510 // Fix https://github.com/vuejs/vue/pull/7730
3511 // allow v-model="obj.val " (trailing whitespace)
3512 val = val.trim();
3513 len = val.length;
3514
3515 if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
3516 index = val.lastIndexOf('.');
3517 if (index > -1) {
3518 return {
3519 exp: val.slice(0, index),
3520 key: '"' + val.slice(index + 1) + '"'
3521 }
3522 } else {
3523 return {
3524 exp: val,
3525 key: null
3526 }
3527 }
3528 }
3529
3530 str = val;
3531 index = expressionPos = expressionEndPos = 0;
3532
3533 while (!eof()) {
3534 chr = next();
3535 /* istanbul ignore if */
3536 if (isStringStart(chr)) {
3537 parseString(chr);
3538 } else if (chr === 0x5B) {
3539 parseBracket(chr);
3540 }
3541 }
3542
3543 return {
3544 exp: val.slice(0, expressionPos),
3545 key: val.slice(expressionPos + 1, expressionEndPos)
3546 }
3547 }
3548
3549 function next () {
3550 return str.charCodeAt(++index)
3551 }
3552
3553 function eof () {
3554 return index >= len
3555 }
3556
3557 function isStringStart (chr) {
3558 return chr === 0x22 || chr === 0x27
3559 }
3560
3561 function parseBracket (chr) {
3562 var inBracket = 1;
3563 expressionPos = index;
3564 while (!eof()) {
3565 chr = next();
3566 if (isStringStart(chr)) {
3567 parseString(chr);
3568 continue
3569 }
3570 if (chr === 0x5B) { inBracket++; }
3571 if (chr === 0x5D) { inBracket--; }
3572 if (inBracket === 0) {
3573 expressionEndPos = index;
3574 break
3575 }
3576 }
3577 }
3578
3579 function parseString (chr) {
3580 var stringQuote = chr;
3581 while (!eof()) {
3582 chr = next();
3583 if (chr === stringQuote) {
3584 break
3585 }
3586 }
3587 }
3588
3589 /* */
3590
3591 var onRE = /^@|^v-on:/;
3592 var dirRE = /^v-|^@|^:/;
3593 var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
3594 var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
3595 var stripParensRE = /^\(|\)$/g;
3596
3597 var argRE = /:(.*)$/;
3598 var bindRE = /^:|^v-bind:/;
3599 var modifierRE = /\.[^.]+/g;
3600
3601 var decodeHTMLCached = cached(he.decode);
3602
3603 // configurable state
3604 var warn$1;
3605 var delimiters;
3606 var transforms;
3607 var preTransforms;
3608 var postTransforms;
3609 var platformIsPreTag;
3610 var platformMustUseProp;
3611 var platformGetTagNamespace;
3612
3613
3614
3615 function createASTElement (
3616 tag,
3617 attrs,
3618 parent
3619 ) {
3620 return {
3621 type: 1,
3622 tag: tag,
3623 attrsList: attrs,
3624 attrsMap: makeAttrsMap(attrs),
3625 parent: parent,
3626 children: []
3627 }
3628 }
3629
3630 /**
3631 * Convert HTML string to AST.
3632 */
3633 function parse (
3634 template,
3635 options
3636 ) {
3637 warn$1 = options.warn || baseWarn;
3638
3639 platformIsPreTag = options.isPreTag || no;
3640 platformMustUseProp = options.mustUseProp || no;
3641 platformGetTagNamespace = options.getTagNamespace || no;
3642
3643 transforms = pluckModuleFunction(options.modules, 'transformNode');
3644 preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
3645 postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
3646
3647 delimiters = options.delimiters;
3648
3649 var stack = [];
3650 var preserveWhitespace = options.preserveWhitespace !== false;
3651 var root;
3652 var currentParent;
3653 var inVPre = false;
3654 var inPre = false;
3655 var warned = false;
3656
3657 function warnOnce (msg) {
3658 if (!warned) {
3659 warned = true;
3660 warn$1(msg);
3661 }
3662 }
3663
3664 function closeElement (element) {
3665 // check pre state
3666 if (element.pre) {
3667 inVPre = false;
3668 }
3669 if (platformIsPreTag(element.tag)) {
3670 inPre = false;
3671 }
3672 // apply post-transforms
3673 for (var i = 0; i < postTransforms.length; i++) {
3674 postTransforms[i](element, options);
3675 }
3676 }
3677
3678 parseHTML(template, {
3679 warn: warn$1,
3680 expectHTML: options.expectHTML,
3681 isUnaryTag: options.isUnaryTag,
3682 canBeLeftOpenTag: options.canBeLeftOpenTag,
3683 shouldDecodeNewlines: options.shouldDecodeNewlines,
3684 shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
3685 shouldKeepComment: options.comments,
3686 start: function start (tag, attrs, unary) {
3687 // check namespace.
3688 // inherit parent ns if there is one
3689 var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
3690
3691 // handle IE svg bug
3692 /* istanbul ignore if */
3693 if (isIE && ns === 'svg') {
3694 attrs = guardIESVGBug(attrs);
3695 }
3696
3697 var element = createASTElement(tag, attrs, currentParent);
3698 if (ns) {
3699 element.ns = ns;
3700 }
3701
3702 if (isForbiddenTag(element) && !isServerRendering()) {
3703 element.forbidden = true;
3704 warn$1(
3705 'Templates should only be responsible for mapping the state to the ' +
3706 'UI. Avoid placing tags with side-effects in your templates, such as ' +
3707 "<" + tag + ">" + ', as they will not be parsed.'
3708 );
3709 }
3710
3711 // apply pre-transforms
3712 for (var i = 0; i < preTransforms.length; i++) {
3713 element = preTransforms[i](element, options) || element;
3714 }
3715
3716 if (!inVPre) {
3717 processPre(element);
3718 if (element.pre) {
3719 inVPre = true;
3720 }
3721 }
3722 if (platformIsPreTag(element.tag)) {
3723 inPre = true;
3724 }
3725 if (inVPre) {
3726 processRawAttrs(element);
3727 } else if (!element.processed) {
3728 // structural directives
3729 processFor(element);
3730 processIf(element);
3731 processOnce(element);
3732 // element-scope stuff
3733 processElement(element, options);
3734 }
3735
3736 function checkRootConstraints (el) {
3737 {
3738 if (el.tag === 'slot' || el.tag === 'template') {
3739 warnOnce(
3740 "Cannot use <" + (el.tag) + "> as component root element because it may " +
3741 'contain multiple nodes.'
3742 );
3743 }
3744 if (el.attrsMap.hasOwnProperty('v-for')) {
3745 warnOnce(
3746 'Cannot use v-for on stateful component root element because ' +
3747 'it renders multiple elements.'
3748 );
3749 }
3750 }
3751 }
3752
3753 // tree management
3754 if (!root) {
3755 root = element;
3756 checkRootConstraints(root);
3757 } else if (!stack.length) {
3758 // allow root elements with v-if, v-else-if and v-else
3759 if (root.if && (element.elseif || element.else)) {
3760 checkRootConstraints(element);
3761 addIfCondition(root, {
3762 exp: element.elseif,
3763 block: element
3764 });
3765 } else {
3766 warnOnce(
3767 "Component template should contain exactly one root element. " +
3768 "If you are using v-if on multiple elements, " +
3769 "use v-else-if to chain them instead."
3770 );
3771 }
3772 }
3773 if (currentParent && !element.forbidden) {
3774 if (element.elseif || element.else) {
3775 processIfConditions(element, currentParent);
3776 } else if (element.slotScope) { // scoped slot
3777 currentParent.plain = false;
3778 var name = element.slotTarget || '"default"'
3779 ;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
3780 } else {
3781 currentParent.children.push(element);
3782 element.parent = currentParent;
3783 }
3784 }
3785 if (!unary) {
3786 currentParent = element;
3787 stack.push(element);
3788 } else {
3789 closeElement(element);
3790 }
3791 },
3792
3793 end: function end () {
3794 // remove trailing whitespace
3795 var element = stack[stack.length - 1];
3796 var lastNode = element.children[element.children.length - 1];
3797 if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
3798 element.children.pop();
3799 }
3800 // pop stack
3801 stack.length -= 1;
3802 currentParent = stack[stack.length - 1];
3803 closeElement(element);
3804 },
3805
3806 chars: function chars (text) {
3807 if (!currentParent) {
3808 {
3809 if (text === template) {
3810 warnOnce(
3811 'Component template requires a root element, rather than just text.'
3812 );
3813 } else if ((text = text.trim())) {
3814 warnOnce(
3815 ("text \"" + text + "\" outside root element will be ignored.")
3816 );
3817 }
3818 }
3819 return
3820 }
3821 // IE textarea placeholder bug
3822 /* istanbul ignore if */
3823 if (isIE &&
3824 currentParent.tag === 'textarea' &&
3825 currentParent.attrsMap.placeholder === text
3826 ) {
3827 return
3828 }
3829 var children = currentParent.children;
3830 text = inPre || text.trim()
3831 ? isTextTag(currentParent) ? text : decodeHTMLCached(text)
3832 // only preserve whitespace if its not right after a starting tag
3833 : preserveWhitespace && children.length ? ' ' : '';
3834 if (text) {
3835 var res;
3836 if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
3837 children.push({
3838 type: 2,
3839 expression: res.expression,
3840 tokens: res.tokens,
3841 text: text
3842 });
3843 } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
3844 children.push({
3845 type: 3,
3846 text: text
3847 });
3848 }
3849 }
3850 },
3851 comment: function comment (text) {
3852 currentParent.children.push({
3853 type: 3,
3854 text: text,
3855 isComment: true
3856 });
3857 }
3858 });
3859 return root
3860 }
3861
3862 function processPre (el) {
3863 if (getAndRemoveAttr(el, 'v-pre') != null) {
3864 el.pre = true;
3865 }
3866 }
3867
3868 function processRawAttrs (el) {
3869 var l = el.attrsList.length;
3870 if (l) {
3871 var attrs = el.attrs = new Array(l);
3872 for (var i = 0; i < l; i++) {
3873 attrs[i] = {
3874 name: el.attrsList[i].name,
3875 value: JSON.stringify(el.attrsList[i].value)
3876 };
3877 }
3878 } else if (!el.pre) {
3879 // non root node in pre blocks with no attributes
3880 el.plain = true;
3881 }
3882 }
3883
3884 function processElement (element, options) {
3885 processKey(element);
3886
3887 // determine whether this is a plain element after
3888 // removing structural attributes
3889 element.plain = !element.key && !element.attrsList.length;
3890
3891 processRef(element);
3892 processSlot(element);
3893 processComponent(element);
3894 for (var i = 0; i < transforms.length; i++) {
3895 element = transforms[i](element, options) || element;
3896 }
3897 processAttrs(element);
3898 }
3899
3900 function processKey (el) {
3901 var exp = getBindingAttr(el, 'key');
3902 if (exp) {
3903 {
3904 if (el.tag === 'template') {
3905 warn$1("<template> cannot be keyed. Place the key on real elements instead.");
3906 }
3907 if (el.for) {
3908 var iterator = el.iterator2 || el.iterator1;
3909 var parent = el.parent;
3910 if (iterator && iterator === exp && parent && parent.tag === 'transition-group') {
3911 warn$1(
3912 "Do not use v-for index as key on <transtion-group> children, " +
3913 "this is the same as not using keys."
3914 );
3915 }
3916 }
3917 }
3918 el.key = exp;
3919 }
3920 }
3921
3922 function processRef (el) {
3923 var ref = getBindingAttr(el, 'ref');
3924 if (ref) {
3925 el.ref = ref;
3926 el.refInFor = checkInFor(el);
3927 }
3928 }
3929
3930 function processFor (el) {
3931 var exp;
3932 if ((exp = getAndRemoveAttr(el, 'v-for'))) {
3933 var res = parseFor(exp);
3934 if (res) {
3935 extend(el, res);
3936 } else {
3937 warn$1(
3938 ("Invalid v-for expression: " + exp)
3939 );
3940 }
3941 }
3942 }
3943
3944
3945
3946 function parseFor (exp) {
3947 var inMatch = exp.match(forAliasRE);
3948 if (!inMatch) { return }
3949 var res = {};
3950 res.for = inMatch[2].trim();
3951 var alias = inMatch[1].trim().replace(stripParensRE, '');
3952 var iteratorMatch = alias.match(forIteratorRE);
3953 if (iteratorMatch) {
3954 res.alias = alias.replace(forIteratorRE, '').trim();
3955 res.iterator1 = iteratorMatch[1].trim();
3956 if (iteratorMatch[2]) {
3957 res.iterator2 = iteratorMatch[2].trim();
3958 }
3959 } else {
3960 res.alias = alias;
3961 }
3962 return res
3963 }
3964
3965 function processIf (el) {
3966 var exp = getAndRemoveAttr(el, 'v-if');
3967 if (exp) {
3968 el.if = exp;
3969 addIfCondition(el, {
3970 exp: exp,
3971 block: el
3972 });
3973 } else {
3974 if (getAndRemoveAttr(el, 'v-else') != null) {
3975 el.else = true;
3976 }
3977 var elseif = getAndRemoveAttr(el, 'v-else-if');
3978 if (elseif) {
3979 el.elseif = elseif;
3980 }
3981 }
3982 }
3983
3984 function processIfConditions (el, parent) {
3985 var prev = findPrevElement(parent.children);
3986 if (prev && prev.if) {
3987 addIfCondition(prev, {
3988 exp: el.elseif,
3989 block: el
3990 });
3991 } else {
3992 warn$1(
3993 "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
3994 "used on element <" + (el.tag) + "> without corresponding v-if."
3995 );
3996 }
3997 }
3998
3999 function findPrevElement (children) {
4000 var i = children.length;
4001 while (i--) {
4002 if (children[i].type === 1) {
4003 return children[i]
4004 } else {
4005 if (children[i].text !== ' ') {
4006 warn$1(
4007 "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
4008 "will be ignored."
4009 );
4010 }
4011 children.pop();
4012 }
4013 }
4014 }
4015
4016 function addIfCondition (el, condition) {
4017 if (!el.ifConditions) {
4018 el.ifConditions = [];
4019 }
4020 el.ifConditions.push(condition);
4021 }
4022
4023 function processOnce (el) {
4024 var once$$1 = getAndRemoveAttr(el, 'v-once');
4025 if (once$$1 != null) {
4026 el.once = true;
4027 }
4028 }
4029
4030 function processSlot (el) {
4031 if (el.tag === 'slot') {
4032 el.slotName = getBindingAttr(el, 'name');
4033 if (el.key) {
4034 warn$1(
4035 "`key` does not work on <slot> because slots are abstract outlets " +
4036 "and can possibly expand into multiple elements. " +
4037 "Use the key on a wrapping element instead."
4038 );
4039 }
4040 } else {
4041 var slotScope;
4042 if (el.tag === 'template') {
4043 slotScope = getAndRemoveAttr(el, 'scope');
4044 /* istanbul ignore if */
4045 if (slotScope) {
4046 warn$1(
4047 "the \"scope\" attribute for scoped slots have been deprecated and " +
4048 "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
4049 "can also be used on plain elements in addition to <template> to " +
4050 "denote scoped slots.",
4051 true
4052 );
4053 }
4054 el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
4055 } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
4056 /* istanbul ignore if */
4057 if (el.attrsMap['v-for']) {
4058 warn$1(
4059 "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
4060 "(v-for takes higher priority). Use a wrapper <template> for the " +
4061 "scoped slot to make it clearer.",
4062 true
4063 );
4064 }
4065 el.slotScope = slotScope;
4066 }
4067 var slotTarget = getBindingAttr(el, 'slot');
4068 if (slotTarget) {
4069 el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
4070 // preserve slot as an attribute for native shadow DOM compat
4071 // only for non-scoped slots.
4072 if (el.tag !== 'template' && !el.slotScope) {
4073 addAttr(el, 'slot', slotTarget);
4074 }
4075 }
4076 }
4077 }
4078
4079 function processComponent (el) {
4080 var binding;
4081 if ((binding = getBindingAttr(el, 'is'))) {
4082 el.component = binding;
4083 }
4084 if (getAndRemoveAttr(el, 'inline-template') != null) {
4085 el.inlineTemplate = true;
4086 }
4087 }
4088
4089 function processAttrs (el) {
4090 var list = el.attrsList;
4091 var i, l, name, rawName, value, modifiers, isProp;
4092 for (i = 0, l = list.length; i < l; i++) {
4093 name = rawName = list[i].name;
4094 value = list[i].value;
4095 if (dirRE.test(name)) {
4096 // mark element as dynamic
4097 el.hasBindings = true;
4098 // modifiers
4099 modifiers = parseModifiers(name);
4100 if (modifiers) {
4101 name = name.replace(modifierRE, '');
4102 }
4103 if (bindRE.test(name)) { // v-bind
4104 name = name.replace(bindRE, '');
4105 value = parseFilters(value);
4106 isProp = false;
4107 if (
4108 value.trim().length === 0
4109 ) {
4110 warn$1(
4111 ("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"")
4112 );
4113 }
4114 if (modifiers) {
4115 if (modifiers.prop) {
4116 isProp = true;
4117 name = camelize(name);
4118 if (name === 'innerHtml') { name = 'innerHTML'; }
4119 }
4120 if (modifiers.camel) {
4121 name = camelize(name);
4122 }
4123 if (modifiers.sync) {
4124 addHandler(
4125 el,
4126 ("update:" + (camelize(name))),
4127 genAssignmentCode(value, "$event")
4128 );
4129 }
4130 }
4131 if (isProp || (
4132 !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
4133 )) {
4134 addProp(el, name, value);
4135 } else {
4136 addAttr(el, name, value);
4137 }
4138 } else if (onRE.test(name)) { // v-on
4139 name = name.replace(onRE, '');
4140 addHandler(el, name, value, modifiers, false, warn$1);
4141 } else { // normal directives
4142 name = name.replace(dirRE, '');
4143 // parse arg
4144 var argMatch = name.match(argRE);
4145 var arg = argMatch && argMatch[1];
4146 if (arg) {
4147 name = name.slice(0, -(arg.length + 1));
4148 }
4149 addDirective(el, name, rawName, value, arg, modifiers);
4150 if (name === 'model') {
4151 checkForAliasModel(el, value);
4152 }
4153 }
4154 } else {
4155 // literal attribute
4156 {
4157 var res = parseText(value, delimiters);
4158 if (res) {
4159 warn$1(
4160 name + "=\"" + value + "\": " +
4161 'Interpolation inside attributes has been removed. ' +
4162 'Use v-bind or the colon shorthand instead. For example, ' +
4163 'instead of <div id="{{ val }}">, use <div :id="val">.'
4164 );
4165 }
4166 }
4167 addAttr(el, name, JSON.stringify(value));
4168 // #6887 firefox doesn't update muted state if set via attribute
4169 // even immediately after element creation
4170 if (!el.component &&
4171 name === 'muted' &&
4172 platformMustUseProp(el.tag, el.attrsMap.type, name)) {
4173 addProp(el, name, 'true');
4174 }
4175 }
4176 }
4177 }
4178
4179 function checkInFor (el) {
4180 var parent = el;
4181 while (parent) {
4182 if (parent.for !== undefined) {
4183 return true
4184 }
4185 parent = parent.parent;
4186 }
4187 return false
4188 }
4189
4190 function parseModifiers (name) {
4191 var match = name.match(modifierRE);
4192 if (match) {
4193 var ret = {};
4194 match.forEach(function (m) { ret[m.slice(1)] = true; });
4195 return ret
4196 }
4197 }
4198
4199 function makeAttrsMap (attrs) {
4200 var map = {};
4201 for (var i = 0, l = attrs.length; i < l; i++) {
4202 if (
4203 map[attrs[i].name] && !isIE && !isEdge
4204 ) {
4205 warn$1('duplicate attribute: ' + attrs[i].name);
4206 }
4207 map[attrs[i].name] = attrs[i].value;
4208 }
4209 return map
4210 }
4211
4212 // for script (e.g. type="x/template") or style, do not decode content
4213 function isTextTag (el) {
4214 return el.tag === 'script' || el.tag === 'style'
4215 }
4216
4217 function isForbiddenTag (el) {
4218 return (
4219 el.tag === 'style' ||
4220 (el.tag === 'script' && (
4221 !el.attrsMap.type ||
4222 el.attrsMap.type === 'text/javascript'
4223 ))
4224 )
4225 }
4226
4227 var ieNSBug = /^xmlns:NS\d+/;
4228 var ieNSPrefix = /^NS\d+:/;
4229
4230 /* istanbul ignore next */
4231 function guardIESVGBug (attrs) {
4232 var res = [];
4233 for (var i = 0; i < attrs.length; i++) {
4234 var attr = attrs[i];
4235 if (!ieNSBug.test(attr.name)) {
4236 attr.name = attr.name.replace(ieNSPrefix, '');
4237 res.push(attr);
4238 }
4239 }
4240 return res
4241 }
4242
4243 function checkForAliasModel (el, value) {
4244 var _el = el;
4245 while (_el) {
4246 if (_el.for && _el.alias === value) {
4247 warn$1(
4248 "<" + (el.tag) + " v-model=\"" + value + "\">: " +
4249 "You are binding v-model directly to a v-for iteration alias. " +
4250 "This will not be able to modify the v-for source array because " +
4251 "writing to the alias is like modifying a function local variable. " +
4252 "Consider using an array of objects and use v-model on an object property instead."
4253 );
4254 }
4255 _el = _el.parent;
4256 }
4257 }
4258
4259 /* */
4260
4261 function preTransformNode (el, options) {
4262 if (el.tag === 'input') {
4263 var map = el.attrsMap;
4264 if (!map['v-model']) {
4265 return
4266 }
4267
4268 var typeBinding;
4269 if (map[':type'] || map['v-bind:type']) {
4270 typeBinding = getBindingAttr(el, 'type');
4271 }
4272 if (!map.type && !typeBinding && map['v-bind']) {
4273 typeBinding = "(" + (map['v-bind']) + ").type";
4274 }
4275
4276 if (typeBinding) {
4277 var ifCondition = getAndRemoveAttr(el, 'v-if', true);
4278 var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
4279 var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
4280 var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
4281 // 1. checkbox
4282 var branch0 = cloneASTElement(el);
4283 // process for on the main node
4284 processFor(branch0);
4285 addRawAttr(branch0, 'type', 'checkbox');
4286 processElement(branch0, options);
4287 branch0.processed = true; // prevent it from double-processed
4288 branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
4289 addIfCondition(branch0, {
4290 exp: branch0.if,
4291 block: branch0
4292 });
4293 // 2. add radio else-if condition
4294 var branch1 = cloneASTElement(el);
4295 getAndRemoveAttr(branch1, 'v-for', true);
4296 addRawAttr(branch1, 'type', 'radio');
4297 processElement(branch1, options);
4298 addIfCondition(branch0, {
4299 exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
4300 block: branch1
4301 });
4302 // 3. other
4303 var branch2 = cloneASTElement(el);
4304 getAndRemoveAttr(branch2, 'v-for', true);
4305 addRawAttr(branch2, ':type', typeBinding);
4306 processElement(branch2, options);
4307 addIfCondition(branch0, {
4308 exp: ifCondition,
4309 block: branch2
4310 });
4311
4312 if (hasElse) {
4313 branch0.else = true;
4314 } else if (elseIfCondition) {
4315 branch0.elseif = elseIfCondition;
4316 }
4317
4318 return branch0
4319 }
4320 }
4321 }
4322
4323 function cloneASTElement (el) {
4324 return createASTElement(el.tag, el.attrsList.slice(), el.parent)
4325 }
4326
4327 var model$1 = {
4328 preTransformNode: preTransformNode
4329 };
4330
4331 var modules$1 = [
4332 klass,
4333 style,
4334 model$1
4335 ];
4336
4337 /* */
4338
4339 var warn$2;
4340
4341 // in some cases, the event used has to be determined at runtime
4342 // so we used some reserved tokens during compile.
4343 var RANGE_TOKEN = '__r';
4344
4345 function model$2 (
4346 el,
4347 dir,
4348 _warn
4349 ) {
4350 warn$2 = _warn;
4351 var value = dir.value;
4352 var modifiers = dir.modifiers;
4353 var tag = el.tag;
4354 var type = el.attrsMap.type;
4355
4356 {
4357 // inputs with type="file" are read only and setting the input's
4358 // value will throw an error.
4359 if (tag === 'input' && type === 'file') {
4360 warn$2(
4361 "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
4362 "File inputs are read only. Use a v-on:change listener instead."
4363 );
4364 }
4365 }
4366
4367 if (el.component) {
4368 genComponentModel(el, value, modifiers);
4369 // component v-model doesn't need extra runtime
4370 return false
4371 } else if (tag === 'select') {
4372 genSelect(el, value, modifiers);
4373 } else if (tag === 'input' && type === 'checkbox') {
4374 genCheckboxModel(el, value, modifiers);
4375 } else if (tag === 'input' && type === 'radio') {
4376 genRadioModel(el, value, modifiers);
4377 } else if (tag === 'input' || tag === 'textarea') {
4378 genDefaultModel(el, value, modifiers);
4379 } else {
4380 genComponentModel(el, value, modifiers);
4381 // component v-model doesn't need extra runtime
4382 return false
4383 }
4384
4385 // ensure runtime directive metadata
4386 return true
4387 }
4388
4389 function genCheckboxModel (
4390 el,
4391 value,
4392 modifiers
4393 ) {
4394 var number = modifiers && modifiers.number;
4395 var valueBinding = getBindingAttr(el, 'value') || 'null';
4396 var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
4397 var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
4398 addProp(el, 'checked',
4399 "Array.isArray(" + value + ")" +
4400 "?_i(" + value + "," + valueBinding + ")>-1" + (
4401 trueValueBinding === 'true'
4402 ? (":(" + value + ")")
4403 : (":_q(" + value + "," + trueValueBinding + ")")
4404 )
4405 );
4406 addHandler(el, 'change',
4407 "var $$a=" + value + "," +
4408 '$$el=$event.target,' +
4409 "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
4410 'if(Array.isArray($$a)){' +
4411 "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
4412 '$$i=_i($$a,$$v);' +
4413 "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" +
4414 "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" +
4415 "}else{" + (genAssignmentCode(value, '$$c')) + "}",
4416 null, true
4417 );
4418 }
4419
4420 function genRadioModel (
4421 el,
4422 value,
4423 modifiers
4424 ) {
4425 var number = modifiers && modifiers.number;
4426 var valueBinding = getBindingAttr(el, 'value') || 'null';
4427 valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
4428 addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
4429 addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
4430 }
4431
4432 function genSelect (
4433 el,
4434 value,
4435 modifiers
4436 ) {
4437 var number = modifiers && modifiers.number;
4438 var selectedVal = "Array.prototype.filter" +
4439 ".call($event.target.options,function(o){return o.selected})" +
4440 ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
4441 "return " + (number ? '_n(val)' : 'val') + "})";
4442
4443 var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
4444 var code = "var $$selectedVal = " + selectedVal + ";";
4445 code = code + " " + (genAssignmentCode(value, assignment));
4446 addHandler(el, 'change', code, null, true);
4447 }
4448
4449 function genDefaultModel (
4450 el,
4451 value,
4452 modifiers
4453 ) {
4454 var type = el.attrsMap.type;
4455
4456 // warn if v-bind:value conflicts with v-model
4457 // except for inputs with v-bind:type
4458 {
4459 var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
4460 var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
4461 if (value$1 && !typeBinding) {
4462 var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
4463 warn$2(
4464 binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
4465 'because the latter already expands to a value binding internally'
4466 );
4467 }
4468 }
4469
4470 var ref = modifiers || {};
4471 var lazy = ref.lazy;
4472 var number = ref.number;
4473 var trim = ref.trim;
4474 var needCompositionGuard = !lazy && type !== 'range';
4475 var event = lazy
4476 ? 'change'
4477 : type === 'range'
4478 ? RANGE_TOKEN
4479 : 'input';
4480
4481 var valueExpression = '$event.target.value';
4482 if (trim) {
4483 valueExpression = "$event.target.value.trim()";
4484 }
4485 if (number) {
4486 valueExpression = "_n(" + valueExpression + ")";
4487 }
4488
4489 var code = genAssignmentCode(value, valueExpression);
4490 if (needCompositionGuard) {
4491 code = "if($event.target.composing)return;" + code;
4492 }
4493
4494 addProp(el, 'value', ("(" + value + ")"));
4495 addHandler(el, event, code, null, true);
4496 if (trim || number) {
4497 addHandler(el, 'blur', '$forceUpdate()');
4498 }
4499 }
4500
4501 /* */
4502
4503 function text (el, dir) {
4504 if (dir.value) {
4505 addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
4506 }
4507 }
4508
4509 /* */
4510
4511 function html (el, dir) {
4512 if (dir.value) {
4513 addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
4514 }
4515 }
4516
4517 var directives$1 = {
4518 model: model$2,
4519 text: text,
4520 html: html
4521 };
4522
4523 /* */
4524
4525 var baseOptions = {
4526 expectHTML: true,
4527 modules: modules$1,
4528 directives: directives$1,
4529 isPreTag: isPreTag,
4530 isUnaryTag: isUnaryTag,
4531 mustUseProp: mustUseProp,
4532 canBeLeftOpenTag: canBeLeftOpenTag,
4533 isReservedTag: isReservedTag,
4534 getTagNamespace: getTagNamespace,
4535 staticKeys: genStaticKeys(modules$1)
4536 };
4537
4538 /* */
4539
4540 var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
4541 var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
4542
4543 // KeyboardEvent.keyCode aliases
4544 var keyCodes = {
4545 esc: 27,
4546 tab: 9,
4547 enter: 13,
4548 space: 32,
4549 up: 38,
4550 left: 37,
4551 right: 39,
4552 down: 40,
4553 'delete': [8, 46]
4554 };
4555
4556 // KeyboardEvent.key aliases
4557 var keyNames = {
4558 // #7880: IE11 and Edge use `Esc` for Escape key name.
4559 esc: ['Esc', 'Escape'],
4560 tab: 'Tab',
4561 enter: 'Enter',
4562 // #9112: IE11 uses `Spacebar` for Space key name.
4563 space: [' ', 'Spacebar'],
4564 // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
4565 up: ['Up', 'ArrowUp'],
4566 left: ['Left', 'ArrowLeft'],
4567 right: ['Right', 'ArrowRight'],
4568 down: ['Down', 'ArrowDown'],
4569 // #9112: IE11 uses `Del` for Delete key name.
4570 'delete': ['Backspace', 'Delete', 'Del']
4571 };
4572
4573 // #4868: modifiers that prevent the execution of the listener
4574 // need to explicitly return null so that we can determine whether to remove
4575 // the listener for .once
4576 var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
4577
4578 var modifierCode = {
4579 stop: '$event.stopPropagation();',
4580 prevent: '$event.preventDefault();',
4581 self: genGuard("$event.target !== $event.currentTarget"),
4582 ctrl: genGuard("!$event.ctrlKey"),
4583 shift: genGuard("!$event.shiftKey"),
4584 alt: genGuard("!$event.altKey"),
4585 meta: genGuard("!$event.metaKey"),
4586 left: genGuard("'button' in $event && $event.button !== 0"),
4587 middle: genGuard("'button' in $event && $event.button !== 1"),
4588 right: genGuard("'button' in $event && $event.button !== 2")
4589 };
4590
4591 function genHandlers (
4592 events,
4593 isNative
4594 ) {
4595 var res = isNative ? 'nativeOn:{' : 'on:{';
4596 for (var name in events) {
4597 res += "\"" + name + "\":" + (genHandler(name, events[name])) + ",";
4598 }
4599 return res.slice(0, -1) + '}'
4600 }
4601
4602 function genHandler (
4603 name,
4604 handler
4605 ) {
4606 if (!handler) {
4607 return 'function(){}'
4608 }
4609
4610 if (Array.isArray(handler)) {
4611 return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]")
4612 }
4613
4614 var isMethodPath = simplePathRE.test(handler.value);
4615 var isFunctionExpression = fnExpRE.test(handler.value);
4616
4617 if (!handler.modifiers) {
4618 if (isMethodPath || isFunctionExpression) {
4619 return handler.value
4620 }
4621 return ("function($event){" + (handler.value) + "}") // inline statement
4622 } else {
4623 var code = '';
4624 var genModifierCode = '';
4625 var keys = [];
4626 for (var key in handler.modifiers) {
4627 if (modifierCode[key]) {
4628 genModifierCode += modifierCode[key];
4629 // left/right
4630 if (keyCodes[key]) {
4631 keys.push(key);
4632 }
4633 } else if (key === 'exact') {
4634 var modifiers = (handler.modifiers);
4635 genModifierCode += genGuard(
4636 ['ctrl', 'shift', 'alt', 'meta']
4637 .filter(function (keyModifier) { return !modifiers[keyModifier]; })
4638 .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
4639 .join('||')
4640 );
4641 } else {
4642 keys.push(key);
4643 }
4644 }
4645 if (keys.length) {
4646 code += genKeyFilter(keys);
4647 }
4648 // Make sure modifiers like prevent and stop get executed after key filtering
4649 if (genModifierCode) {
4650 code += genModifierCode;
4651 }
4652 var handlerCode = isMethodPath
4653 ? ("return " + (handler.value) + "($event)")
4654 : isFunctionExpression
4655 ? ("return (" + (handler.value) + ")($event)")
4656 : handler.value;
4657 return ("function($event){" + code + handlerCode + "}")
4658 }
4659 }
4660
4661 function genKeyFilter (keys) {
4662 return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;")
4663 }
4664
4665 function genFilterCode (key) {
4666 var keyVal = parseInt(key, 10);
4667 if (keyVal) {
4668 return ("$event.keyCode!==" + keyVal)
4669 }
4670 var keyCode = keyCodes[key];
4671 var keyName = keyNames[key];
4672 return (
4673 "_k($event.keyCode," +
4674 (JSON.stringify(key)) + "," +
4675 (JSON.stringify(keyCode)) + "," +
4676 "$event.key," +
4677 "" + (JSON.stringify(keyName)) +
4678 ")"
4679 )
4680 }
4681
4682 /* */
4683
4684 function on (el, dir) {
4685 if (dir.modifiers) {
4686 warn("v-on without argument does not support modifiers.");
4687 }
4688 el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
4689 }
4690
4691 /* */
4692
4693 function bind$1 (el, dir) {
4694 el.wrapData = function (code) {
4695 return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
4696 };
4697 }
4698
4699 /* */
4700
4701 var baseDirectives = {
4702 on: on,
4703 bind: bind$1,
4704 cloak: noop
4705 };
4706
4707 /* */
4708
4709
4710
4711
4712
4713 var CodegenState = function CodegenState (options) {
4714 this.options = options;
4715 this.warn = options.warn || baseWarn;
4716 this.transforms = pluckModuleFunction(options.modules, 'transformCode');
4717 this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
4718 this.directives = extend(extend({}, baseDirectives), options.directives);
4719 var isReservedTag = options.isReservedTag || no;
4720 this.maybeComponent = function (el) { return !(isReservedTag(el.tag) && !el.component); };
4721 this.onceId = 0;
4722 this.staticRenderFns = [];
4723 this.pre = false;
4724 };
4725
4726
4727
4728 function generate (
4729 ast,
4730 options
4731 ) {
4732 var state = new CodegenState(options);
4733 var code = ast ? genElement(ast, state) : '_c("div")';
4734 return {
4735 render: ("with(this){return " + code + "}"),
4736 staticRenderFns: state.staticRenderFns
4737 }
4738 }
4739
4740 function genElement (el, state) {
4741 if (el.parent) {
4742 el.pre = el.pre || el.parent.pre;
4743 }
4744
4745 if (el.staticRoot && !el.staticProcessed) {
4746 return genStatic(el, state)
4747 } else if (el.once && !el.onceProcessed) {
4748 return genOnce(el, state)
4749 } else if (el.for && !el.forProcessed) {
4750 return genFor(el, state)
4751 } else if (el.if && !el.ifProcessed) {
4752 return genIf(el, state)
4753 } else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
4754 return genChildren(el, state) || 'void 0'
4755 } else if (el.tag === 'slot') {
4756 return genSlot(el, state)
4757 } else {
4758 // component or element
4759 var code;
4760 if (el.component) {
4761 code = genComponent(el.component, el, state);
4762 } else {
4763 var data;
4764 if (!el.plain || (el.pre && state.maybeComponent(el))) {
4765 data = genData$2(el, state);
4766 }
4767
4768 var children = el.inlineTemplate ? null : genChildren(el, state, true);
4769 code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
4770 }
4771 // module transforms
4772 for (var i = 0; i < state.transforms.length; i++) {
4773 code = state.transforms[i](el, code);
4774 }
4775 return code
4776 }
4777 }
4778
4779 // hoist static sub-trees out
4780 function genStatic (el, state) {
4781 el.staticProcessed = true;
4782 // Some elements (templates) need to behave differently inside of a v-pre
4783 // node. All pre nodes are static roots, so we can use this as a location to
4784 // wrap a state change and reset it upon exiting the pre node.
4785 var originalPreState = state.pre;
4786 if (el.pre) {
4787 state.pre = el.pre;
4788 }
4789 state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
4790 state.pre = originalPreState;
4791 return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
4792 }
4793
4794 // v-once
4795 function genOnce (el, state) {
4796 el.onceProcessed = true;
4797 if (el.if && !el.ifProcessed) {
4798 return genIf(el, state)
4799 } else if (el.staticInFor) {
4800 var key = '';
4801 var parent = el.parent;
4802 while (parent) {
4803 if (parent.for) {
4804 key = parent.key;
4805 break
4806 }
4807 parent = parent.parent;
4808 }
4809 if (!key) {
4810 state.warn(
4811 "v-once can only be used inside v-for that is keyed. "
4812 );
4813 return genElement(el, state)
4814 }
4815 return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
4816 } else {
4817 return genStatic(el, state)
4818 }
4819 }
4820
4821 function genIf (
4822 el,
4823 state,
4824 altGen,
4825 altEmpty
4826 ) {
4827 el.ifProcessed = true; // avoid recursion
4828 return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
4829 }
4830
4831 function genIfConditions (
4832 conditions,
4833 state,
4834 altGen,
4835 altEmpty
4836 ) {
4837 if (!conditions.length) {
4838 return altEmpty || '_e()'
4839 }
4840
4841 var condition = conditions.shift();
4842 if (condition.exp) {
4843 return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
4844 } else {
4845 return ("" + (genTernaryExp(condition.block)))
4846 }
4847
4848 // v-if with v-once should generate code like (a)?_m(0):_m(1)
4849 function genTernaryExp (el) {
4850 return altGen
4851 ? altGen(el, state)
4852 : el.once
4853 ? genOnce(el, state)
4854 : genElement(el, state)
4855 }
4856 }
4857
4858 function genFor (
4859 el,
4860 state,
4861 altGen,
4862 altHelper
4863 ) {
4864 var exp = el.for;
4865 var alias = el.alias;
4866 var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
4867 var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
4868
4869 if (state.maybeComponent(el) &&
4870 el.tag !== 'slot' &&
4871 el.tag !== 'template' &&
4872 !el.key
4873 ) {
4874 state.warn(
4875 "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
4876 "v-for should have explicit keys. " +
4877 "See https://vuejs.org/guide/list.html#key for more info.",
4878 true /* tip */
4879 );
4880 }
4881
4882 el.forProcessed = true; // avoid recursion
4883 return (altHelper || '_l') + "((" + exp + ")," +
4884 "function(" + alias + iterator1 + iterator2 + "){" +
4885 "return " + ((altGen || genElement)(el, state)) +
4886 '})'
4887 }
4888
4889 function genData$2 (el, state) {
4890 var data = '{';
4891
4892 // directives first.
4893 // directives may mutate the el's other properties before they are generated.
4894 var dirs = genDirectives(el, state);
4895 if (dirs) { data += dirs + ','; }
4896
4897 // key
4898 if (el.key) {
4899 data += "key:" + (el.key) + ",";
4900 }
4901 // ref
4902 if (el.ref) {
4903 data += "ref:" + (el.ref) + ",";
4904 }
4905 if (el.refInFor) {
4906 data += "refInFor:true,";
4907 }
4908 // pre
4909 if (el.pre) {
4910 data += "pre:true,";
4911 }
4912 // record original tag name for components using "is" attribute
4913 if (el.component) {
4914 data += "tag:\"" + (el.tag) + "\",";
4915 }
4916 // module data generation functions
4917 for (var i = 0; i < state.dataGenFns.length; i++) {
4918 data += state.dataGenFns[i](el);
4919 }
4920 // attributes
4921 if (el.attrs) {
4922 data += "attrs:{" + (genProps(el.attrs)) + "},";
4923 }
4924 // DOM props
4925 if (el.props) {
4926 data += "domProps:{" + (genProps(el.props)) + "},";
4927 }
4928 // event handlers
4929 if (el.events) {
4930 data += (genHandlers(el.events, false)) + ",";
4931 }
4932 if (el.nativeEvents) {
4933 data += (genHandlers(el.nativeEvents, true)) + ",";
4934 }
4935 // slot target
4936 // only for non-scoped slots
4937 if (el.slotTarget && !el.slotScope) {
4938 data += "slot:" + (el.slotTarget) + ",";
4939 }
4940 // scoped slots
4941 if (el.scopedSlots) {
4942 data += (genScopedSlots(el.scopedSlots, state)) + ",";
4943 }
4944 // component v-model
4945 if (el.model) {
4946 data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
4947 }
4948 // inline-template
4949 if (el.inlineTemplate) {
4950 var inlineTemplate = genInlineTemplate(el, state);
4951 if (inlineTemplate) {
4952 data += inlineTemplate + ",";
4953 }
4954 }
4955 data = data.replace(/,$/, '') + '}';
4956 // v-bind data wrap
4957 if (el.wrapData) {
4958 data = el.wrapData(data);
4959 }
4960 // v-on data wrap
4961 if (el.wrapListeners) {
4962 data = el.wrapListeners(data);
4963 }
4964 return data
4965 }
4966
4967 function genDirectives (el, state) {
4968 var dirs = el.directives;
4969 if (!dirs) { return }
4970 var res = 'directives:[';
4971 var hasRuntime = false;
4972 var i, l, dir, needRuntime;
4973 for (i = 0, l = dirs.length; i < l; i++) {
4974 dir = dirs[i];
4975 needRuntime = true;
4976 var gen = state.directives[dir.name];
4977 if (gen) {
4978 // compile-time directive that manipulates AST.
4979 // returns true if it also needs a runtime counterpart.
4980 needRuntime = !!gen(el, dir, state.warn);
4981 }
4982 if (needRuntime) {
4983 hasRuntime = true;
4984 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))) : '') + "},";
4985 }
4986 }
4987 if (hasRuntime) {
4988 return res.slice(0, -1) + ']'
4989 }
4990 }
4991
4992 function genInlineTemplate (el, state) {
4993 var ast = el.children[0];
4994 if (el.children.length !== 1 || ast.type !== 1) {
4995 state.warn('Inline-template components must have exactly one child element.');
4996 }
4997 if (ast.type === 1) {
4998 var inlineRenderFns = generate(ast, state.options);
4999 return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
5000 }
5001 }
5002
5003 function genScopedSlots (
5004 slots,
5005 state
5006 ) {
5007 return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
5008 return genScopedSlot(key, slots[key], state)
5009 }).join(',')) + "])")
5010 }
5011
5012 function genScopedSlot (
5013 key,
5014 el,
5015 state
5016 ) {
5017 if (el.for && !el.forProcessed) {
5018 return genForScopedSlot(key, el, state)
5019 }
5020 var fn = "function(" + (String(el.slotScope)) + "){" +
5021 "return " + (el.tag === 'template'
5022 ? el.if
5023 ? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined")
5024 : genChildren(el, state) || 'undefined'
5025 : genElement(el, state)) + "}";
5026 return ("{key:" + key + ",fn:" + fn + "}")
5027 }
5028
5029 function genForScopedSlot (
5030 key,
5031 el,
5032 state
5033 ) {
5034 var exp = el.for;
5035 var alias = el.alias;
5036 var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
5037 var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
5038 el.forProcessed = true; // avoid recursion
5039 return "_l((" + exp + ")," +
5040 "function(" + alias + iterator1 + iterator2 + "){" +
5041 "return " + (genScopedSlot(key, el, state)) +
5042 '})'
5043 }
5044
5045 function genChildren (
5046 el,
5047 state,
5048 checkSkip,
5049 altGenElement,
5050 altGenNode
5051 ) {
5052 var children = el.children;
5053 if (children.length) {
5054 var el$1 = children[0];
5055 // optimize single v-for
5056 if (children.length === 1 &&
5057 el$1.for &&
5058 el$1.tag !== 'template' &&
5059 el$1.tag !== 'slot'
5060 ) {
5061 var normalizationType = checkSkip && state.maybeComponent(el$1) ? ",1" : "";
5062 return ("" + ((altGenElement || genElement)(el$1, state)) + normalizationType)
5063 }
5064 var normalizationType$1 = checkSkip
5065 ? getNormalizationType(children, state.maybeComponent)
5066 : 0;
5067 var gen = altGenNode || genNode;
5068 return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType$1 ? ("," + normalizationType$1) : ''))
5069 }
5070 }
5071
5072 // determine the normalization needed for the children array.
5073 // 0: no normalization needed
5074 // 1: simple normalization needed (possible 1-level deep nested array)
5075 // 2: full normalization needed
5076 function getNormalizationType (
5077 children,
5078 maybeComponent
5079 ) {
5080 var res = 0;
5081 for (var i = 0; i < children.length; i++) {
5082 var el = children[i];
5083 if (el.type !== 1) {
5084 continue
5085 }
5086 if (needsNormalization(el) ||
5087 (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
5088 res = 2;
5089 break
5090 }
5091 if (maybeComponent(el) ||
5092 (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
5093 res = 1;
5094 }
5095 }
5096 return res
5097 }
5098
5099 function needsNormalization (el) {
5100 return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
5101 }
5102
5103 function genNode (node, state) {
5104 if (node.type === 1) {
5105 return genElement(node, state)
5106 } else if (node.type === 3 && node.isComment) {
5107 return genComment(node)
5108 } else {
5109 return genText(node)
5110 }
5111 }
5112
5113 function genText (text) {
5114 return ("_v(" + (text.type === 2
5115 ? text.expression // no need for () because already wrapped in _s()
5116 : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
5117 }
5118
5119 function genComment (comment) {
5120 return ("_e(" + (JSON.stringify(comment.text)) + ")")
5121 }
5122
5123 function genSlot (el, state) {
5124 var slotName = el.slotName || '"default"';
5125 var children = genChildren(el, state);
5126 var res = "_t(" + slotName + (children ? ("," + children) : '');
5127 var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
5128 var bind$$1 = el.attrsMap['v-bind'];
5129 if ((attrs || bind$$1) && !children) {
5130 res += ",null";
5131 }
5132 if (attrs) {
5133 res += "," + attrs;
5134 }
5135 if (bind$$1) {
5136 res += (attrs ? '' : ',null') + "," + bind$$1;
5137 }
5138 return res + ')'
5139 }
5140
5141 // componentName is el.component, take it as argument to shun flow's pessimistic refinement
5142 function genComponent (
5143 componentName,
5144 el,
5145 state
5146 ) {
5147 var children = el.inlineTemplate ? null : genChildren(el, state, true);
5148 return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
5149 }
5150
5151 function genProps (props) {
5152 var res = '';
5153 for (var i = 0; i < props.length; i++) {
5154 var prop = props[i];
5155 /* istanbul ignore if */
5156 {
5157 res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ",";
5158 }
5159 }
5160 return res.slice(0, -1)
5161 }
5162
5163 // #3895, #4268
5164 function transformSpecialNewlines (text) {
5165 return text
5166 .replace(/\u2028/g, '\\u2028')
5167 .replace(/\u2029/g, '\\u2029')
5168 }
5169
5170 /* */
5171
5172
5173
5174
5175
5176
5177 var plainStringRE = /^"(?:[^"\\]|\\.)*"$|^'(?:[^'\\]|\\.)*'$/;
5178
5179 // let the model AST transform translate v-model into appropriate
5180 // props bindings
5181 function applyModelTransform (el, state) {
5182 if (el.directives) {
5183 for (var i = 0; i < el.directives.length; i++) {
5184 var dir = el.directives[i];
5185 if (dir.name === 'model') {
5186 state.directives.model(el, dir, state.warn);
5187 // remove value for textarea as its converted to text
5188 if (el.tag === 'textarea' && el.props) {
5189 el.props = el.props.filter(function (p) { return p.name !== 'value'; });
5190 }
5191 break
5192 }
5193 }
5194 }
5195 }
5196
5197 function genAttrSegments (
5198 attrs
5199 ) {
5200 return attrs.map(function (ref) {
5201 var name = ref.name;
5202 var value = ref.value;
5203
5204 return genAttrSegment(name, value);
5205 })
5206 }
5207
5208 function genDOMPropSegments (
5209 props,
5210 attrs
5211 ) {
5212 var segments = [];
5213 props.forEach(function (ref) {
5214 var name = ref.name;
5215 var value = ref.value;
5216
5217 name = propsToAttrMap[name] || name.toLowerCase();
5218 if (isRenderableAttr(name) &&
5219 !(attrs && attrs.some(function (a) { return a.name === name; }))
5220 ) {
5221 segments.push(genAttrSegment(name, value));
5222 }
5223 });
5224 return segments
5225 }
5226
5227 function genAttrSegment (name, value) {
5228 if (plainStringRE.test(value)) {
5229 // force double quote
5230 value = value.replace(/^'|'$/g, '"');
5231 // force enumerated attr to "true"
5232 if (isEnumeratedAttr(name) && value !== "\"false\"") {
5233 value = "\"true\"";
5234 }
5235 return {
5236 type: RAW,
5237 value: isBooleanAttr(name)
5238 ? (" " + name + "=\"" + name + "\"")
5239 : value === '""'
5240 ? (" " + name)
5241 : (" " + name + "=\"" + (JSON.parse(value)) + "\"")
5242 }
5243 } else {
5244 return {
5245 type: EXPRESSION,
5246 value: ("_ssrAttr(" + (JSON.stringify(name)) + "," + value + ")")
5247 }
5248 }
5249 }
5250
5251 function genClassSegments (
5252 staticClass,
5253 classBinding
5254 ) {
5255 if (staticClass && !classBinding) {
5256 return [{ type: RAW, value: (" class=\"" + (JSON.parse(staticClass)) + "\"") }]
5257 } else {
5258 return [{
5259 type: EXPRESSION,
5260 value: ("_ssrClass(" + (staticClass || 'null') + "," + (classBinding || 'null') + ")")
5261 }]
5262 }
5263 }
5264
5265 function genStyleSegments (
5266 staticStyle,
5267 parsedStaticStyle,
5268 styleBinding,
5269 vShowExpression
5270 ) {
5271 if (staticStyle && !styleBinding && !vShowExpression) {
5272 return [{ type: RAW, value: (" style=" + (JSON.stringify(staticStyle))) }]
5273 } else {
5274 return [{
5275 type: EXPRESSION,
5276 value: ("_ssrStyle(" + (parsedStaticStyle || 'null') + "," + (styleBinding || 'null') + ", " + (vShowExpression
5277 ? ("{ display: (" + vShowExpression + ") ? '' : 'none' }")
5278 : 'null') + ")")
5279 }]
5280 }
5281 }
5282
5283 /* */
5284
5285 // optimizability constants
5286 var optimizability = {
5287 FALSE: 0, // whole sub tree un-optimizable
5288 FULL: 1, // whole sub tree optimizable
5289 SELF: 2, // self optimizable but has some un-optimizable children
5290 CHILDREN: 3, // self un-optimizable but have fully optimizable children
5291 PARTIAL: 4 // self un-optimizable with some un-optimizable children
5292 };
5293
5294 var isPlatformReservedTag;
5295
5296 function optimize (root, options) {
5297 if (!root) { return }
5298 isPlatformReservedTag = options.isReservedTag || no;
5299 walk(root, true);
5300 }
5301
5302 function walk (node, isRoot) {
5303 if (isUnOptimizableTree(node)) {
5304 node.ssrOptimizability = optimizability.FALSE;
5305 return
5306 }
5307 // root node or nodes with custom directives should always be a VNode
5308 var selfUnoptimizable = isRoot || hasCustomDirective(node);
5309 var check = function (child) {
5310 if (child.ssrOptimizability !== optimizability.FULL) {
5311 node.ssrOptimizability = selfUnoptimizable
5312 ? optimizability.PARTIAL
5313 : optimizability.SELF;
5314 }
5315 };
5316 if (selfUnoptimizable) {
5317 node.ssrOptimizability = optimizability.CHILDREN;
5318 }
5319 if (node.type === 1) {
5320 for (var i = 0, l = node.children.length; i < l; i++) {
5321 var child = node.children[i];
5322 walk(child);
5323 check(child);
5324 }
5325 if (node.ifConditions) {
5326 for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
5327 var block = node.ifConditions[i$1].block;
5328 walk(block, isRoot);
5329 check(block);
5330 }
5331 }
5332 if (node.ssrOptimizability == null ||
5333 (!isRoot && (node.attrsMap['v-html'] || node.attrsMap['v-text']))
5334 ) {
5335 node.ssrOptimizability = optimizability.FULL;
5336 } else {
5337 node.children = optimizeSiblings(node);
5338 }
5339 } else {
5340 node.ssrOptimizability = optimizability.FULL;
5341 }
5342 }
5343
5344 function optimizeSiblings (el) {
5345 var children = el.children;
5346 var optimizedChildren = [];
5347
5348 var currentOptimizableGroup = [];
5349 var pushGroup = function () {
5350 if (currentOptimizableGroup.length) {
5351 optimizedChildren.push({
5352 type: 1,
5353 parent: el,
5354 tag: 'template',
5355 attrsList: [],
5356 attrsMap: {},
5357 children: currentOptimizableGroup,
5358 ssrOptimizability: optimizability.FULL
5359 });
5360 }
5361 currentOptimizableGroup = [];
5362 };
5363
5364 for (var i = 0; i < children.length; i++) {
5365 var c = children[i];
5366 if (c.ssrOptimizability === optimizability.FULL) {
5367 currentOptimizableGroup.push(c);
5368 } else {
5369 // wrap fully-optimizable adjacent siblings inside a template tag
5370 // so that they can be optimized into a single ssrNode by codegen
5371 pushGroup();
5372 optimizedChildren.push(c);
5373 }
5374 }
5375 pushGroup();
5376 return optimizedChildren
5377 }
5378
5379 function isUnOptimizableTree (node) {
5380 if (node.type === 2 || node.type === 3) { // text or expression
5381 return false
5382 }
5383 return (
5384 isBuiltInTag(node.tag) || // built-in (slot, component)
5385 !isPlatformReservedTag(node.tag) || // custom component
5386 !!node.component || // "is" component
5387 isSelectWithModel(node) // <select v-model> requires runtime inspection
5388 )
5389 }
5390
5391 var isBuiltInDir = makeMap('text,html,show,on,bind,model,pre,cloak,once');
5392
5393 function hasCustomDirective (node) {
5394 return (
5395 node.type === 1 &&
5396 node.directives &&
5397 node.directives.some(function (d) { return !isBuiltInDir(d.name); })
5398 )
5399 }
5400
5401 // <select v-model> cannot be optimized because it requires a runtime check
5402 // to determine proper selected option
5403 function isSelectWithModel (node) {
5404 return (
5405 node.type === 1 &&
5406 node.tag === 'select' &&
5407 node.directives != null &&
5408 node.directives.some(function (d) { return d.name === 'model'; })
5409 )
5410 }
5411
5412 /* */
5413
5414
5415
5416
5417 // segment types
5418 var RAW = 0;
5419 var INTERPOLATION = 1;
5420 var EXPRESSION = 2;
5421
5422 function generate$1 (
5423 ast,
5424 options
5425 ) {
5426 var state = new CodegenState(options);
5427 var code = ast ? genSSRElement(ast, state) : '_c("div")';
5428 return {
5429 render: ("with(this){return " + code + "}"),
5430 staticRenderFns: state.staticRenderFns
5431 }
5432 }
5433
5434 function genSSRElement (el, state) {
5435 if (el.for && !el.forProcessed) {
5436 return genFor(el, state, genSSRElement)
5437 } else if (el.if && !el.ifProcessed) {
5438 return genIf(el, state, genSSRElement)
5439 } else if (el.tag === 'template' && !el.slotTarget) {
5440 return el.ssrOptimizability === optimizability.FULL
5441 ? genChildrenAsStringNode(el, state)
5442 : genSSRChildren(el, state) || 'void 0'
5443 }
5444
5445 switch (el.ssrOptimizability) {
5446 case optimizability.FULL:
5447 // stringify whole tree
5448 return genStringElement(el, state)
5449 case optimizability.SELF:
5450 // stringify self and check children
5451 return genStringElementWithChildren(el, state)
5452 case optimizability.CHILDREN:
5453 // generate self as VNode and stringify children
5454 return genNormalElement(el, state, true)
5455 case optimizability.PARTIAL:
5456 // generate self as VNode and check children
5457 return genNormalElement(el, state, false)
5458 default:
5459 // bail whole tree
5460 return genElement(el, state)
5461 }
5462 }
5463
5464 function genNormalElement (el, state, stringifyChildren) {
5465 var data = el.plain ? undefined : genData$2(el, state);
5466 var children = stringifyChildren
5467 ? ("[" + (genChildrenAsStringNode(el, state)) + "]")
5468 : genSSRChildren(el, state, true);
5469 return ("_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")")
5470 }
5471
5472 function genSSRChildren (el, state, checkSkip) {
5473 return genChildren(el, state, checkSkip, genSSRElement, genSSRNode)
5474 }
5475
5476 function genSSRNode (el, state) {
5477 return el.type === 1
5478 ? genSSRElement(el, state)
5479 : genText(el)
5480 }
5481
5482 function genChildrenAsStringNode (el, state) {
5483 return el.children.length
5484 ? ("_ssrNode(" + (flattenSegments(childrenToSegments(el, state))) + ")")
5485 : ''
5486 }
5487
5488 function genStringElement (el, state) {
5489 return ("_ssrNode(" + (elementToString(el, state)) + ")")
5490 }
5491
5492 function genStringElementWithChildren (el, state) {
5493 var children = genSSRChildren(el, state, true);
5494 return ("_ssrNode(" + (flattenSegments(elementToOpenTagSegments(el, state))) + ",\"</" + (el.tag) + ">\"" + (children ? ("," + children) : '') + ")")
5495 }
5496
5497 function elementToString (el, state) {
5498 return ("(" + (flattenSegments(elementToSegments(el, state))) + ")")
5499 }
5500
5501 function elementToSegments (el, state) {
5502 // v-for / v-if
5503 if (el.for && !el.forProcessed) {
5504 el.forProcessed = true;
5505 return [{
5506 type: EXPRESSION,
5507 value: genFor(el, state, elementToString, '_ssrList')
5508 }]
5509 } else if (el.if && !el.ifProcessed) {
5510 el.ifProcessed = true;
5511 return [{
5512 type: EXPRESSION,
5513 value: genIf(el, state, elementToString, '"<!---->"')
5514 }]
5515 } else if (el.tag === 'template') {
5516 return childrenToSegments(el, state)
5517 }
5518
5519 var openSegments = elementToOpenTagSegments(el, state);
5520 var childrenSegments = childrenToSegments(el, state);
5521 var ref = state.options;
5522 var isUnaryTag = ref.isUnaryTag;
5523 var close = (isUnaryTag && isUnaryTag(el.tag))
5524 ? []
5525 : [{ type: RAW, value: ("</" + (el.tag) + ">") }];
5526 return openSegments.concat(childrenSegments, close)
5527 }
5528
5529 function elementToOpenTagSegments (el, state) {
5530 applyModelTransform(el, state);
5531 var binding;
5532 var segments = [{ type: RAW, value: ("<" + (el.tag)) }];
5533 // attrs
5534 if (el.attrs) {
5535 segments.push.apply(segments, genAttrSegments(el.attrs));
5536 }
5537 // domProps
5538 if (el.props) {
5539 segments.push.apply(segments, genDOMPropSegments(el.props, el.attrs));
5540 }
5541 // v-bind="object"
5542 if ((binding = el.attrsMap['v-bind'])) {
5543 segments.push({ type: EXPRESSION, value: ("_ssrAttrs(" + binding + ")") });
5544 }
5545 // v-bind.prop="object"
5546 if ((binding = el.attrsMap['v-bind.prop'])) {
5547 segments.push({ type: EXPRESSION, value: ("_ssrDOMProps(" + binding + ")") });
5548 }
5549 // class
5550 if (el.staticClass || el.classBinding) {
5551 segments.push.apply(
5552 segments,
5553 genClassSegments(el.staticClass, el.classBinding)
5554 );
5555 }
5556 // style & v-show
5557 if (el.staticStyle || el.styleBinding || el.attrsMap['v-show']) {
5558 segments.push.apply(
5559 segments,
5560 genStyleSegments(
5561 el.attrsMap.style,
5562 el.staticStyle,
5563 el.styleBinding,
5564 el.attrsMap['v-show']
5565 )
5566 );
5567 }
5568 // _scopedId
5569 if (state.options.scopeId) {
5570 segments.push({ type: RAW, value: (" " + (state.options.scopeId)) });
5571 }
5572 segments.push({ type: RAW, value: ">" });
5573 return segments
5574 }
5575
5576 function childrenToSegments (el, state) {
5577 var binding;
5578 if ((binding = el.attrsMap['v-html'])) {
5579 return [{ type: EXPRESSION, value: ("_s(" + binding + ")") }]
5580 }
5581 if ((binding = el.attrsMap['v-text'])) {
5582 return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
5583 }
5584 if (el.tag === 'textarea' && (binding = el.attrsMap['v-model'])) {
5585 return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
5586 }
5587 return el.children
5588 ? nodesToSegments(el.children, state)
5589 : []
5590 }
5591
5592 function nodesToSegments (
5593 children,
5594 state
5595 ) {
5596 var segments = [];
5597 for (var i = 0; i < children.length; i++) {
5598 var c = children[i];
5599 if (c.type === 1) {
5600 segments.push.apply(segments, elementToSegments(c, state));
5601 } else if (c.type === 2) {
5602 segments.push({ type: INTERPOLATION, value: c.expression });
5603 } else if (c.type === 3) {
5604 segments.push({ type: RAW, value: escape(c.text) });
5605 }
5606 }
5607 return segments
5608 }
5609
5610 function flattenSegments (segments) {
5611 var mergedSegments = [];
5612 var textBuffer = '';
5613
5614 var pushBuffer = function () {
5615 if (textBuffer) {
5616 mergedSegments.push(JSON.stringify(textBuffer));
5617 textBuffer = '';
5618 }
5619 };
5620
5621 for (var i = 0; i < segments.length; i++) {
5622 var s = segments[i];
5623 if (s.type === RAW) {
5624 textBuffer += s.value;
5625 } else if (s.type === INTERPOLATION) {
5626 pushBuffer();
5627 mergedSegments.push(("_ssrEscape(" + (s.value) + ")"));
5628 } else if (s.type === EXPRESSION) {
5629 pushBuffer();
5630 mergedSegments.push(("(" + (s.value) + ")"));
5631 }
5632 }
5633 pushBuffer();
5634
5635 return mergedSegments.join('+')
5636 }
5637
5638 /* */
5639
5640 // these keywords should not appear inside expressions, but operators like
5641 // typeof, instanceof and in are allowed
5642 var prohibitedKeywordRE = new RegExp('\\b' + (
5643 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
5644 'super,throw,while,yield,delete,export,import,return,switch,default,' +
5645 'extends,finally,continue,debugger,function,arguments'
5646 ).split(',').join('\\b|\\b') + '\\b');
5647
5648 // these unary operators should not be used as property/method names
5649 var unaryOperatorsRE = new RegExp('\\b' + (
5650 'delete,typeof,void'
5651 ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
5652
5653 // strip strings in expressions
5654 var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
5655
5656 // detect problematic expressions in a template
5657 function detectErrors (ast) {
5658 var errors = [];
5659 if (ast) {
5660 checkNode(ast, errors);
5661 }
5662 return errors
5663 }
5664
5665 function checkNode (node, errors) {
5666 if (node.type === 1) {
5667 for (var name in node.attrsMap) {
5668 if (dirRE.test(name)) {
5669 var value = node.attrsMap[name];
5670 if (value) {
5671 if (name === 'v-for') {
5672 checkFor(node, ("v-for=\"" + value + "\""), errors);
5673 } else if (onRE.test(name)) {
5674 checkEvent(value, (name + "=\"" + value + "\""), errors);
5675 } else {
5676 checkExpression(value, (name + "=\"" + value + "\""), errors);
5677 }
5678 }
5679 }
5680 }
5681 if (node.children) {
5682 for (var i = 0; i < node.children.length; i++) {
5683 checkNode(node.children[i], errors);
5684 }
5685 }
5686 } else if (node.type === 2) {
5687 checkExpression(node.expression, node.text, errors);
5688 }
5689 }
5690
5691 function checkEvent (exp, text, errors) {
5692 var stipped = exp.replace(stripStringRE, '');
5693 var keywordMatch = stipped.match(unaryOperatorsRE);
5694 if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
5695 errors.push(
5696 "avoid using JavaScript unary operator as property name: " +
5697 "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim())
5698 );
5699 }
5700 checkExpression(exp, text, errors);
5701 }
5702
5703 function checkFor (node, text, errors) {
5704 checkExpression(node.for || '', text, errors);
5705 checkIdentifier(node.alias, 'v-for alias', text, errors);
5706 checkIdentifier(node.iterator1, 'v-for iterator', text, errors);
5707 checkIdentifier(node.iterator2, 'v-for iterator', text, errors);
5708 }
5709
5710 function checkIdentifier (
5711 ident,
5712 type,
5713 text,
5714 errors
5715 ) {
5716 if (typeof ident === 'string') {
5717 try {
5718 new Function(("var " + ident + "=_"));
5719 } catch (e) {
5720 errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())));
5721 }
5722 }
5723 }
5724
5725 function checkExpression (exp, text, errors) {
5726 try {
5727 new Function(("return " + exp));
5728 } catch (e) {
5729 var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
5730 if (keywordMatch) {
5731 errors.push(
5732 "avoid using JavaScript keyword as property name: " +
5733 "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim())
5734 );
5735 } else {
5736 errors.push(
5737 "invalid expression: " + (e.message) + " in\n\n" +
5738 " " + exp + "\n\n" +
5739 " Raw expression: " + (text.trim()) + "\n"
5740 );
5741 }
5742 }
5743 }
5744
5745 /* */
5746
5747
5748
5749 function createFunction (code, errors) {
5750 try {
5751 return new Function(code)
5752 } catch (err) {
5753 errors.push({ err: err, code: code });
5754 return noop
5755 }
5756 }
5757
5758 function createCompileToFunctionFn (compile) {
5759 var cache = Object.create(null);
5760
5761 return function compileToFunctions (
5762 template,
5763 options,
5764 vm
5765 ) {
5766 options = extend({}, options);
5767 var warn$$1 = options.warn || warn;
5768 delete options.warn;
5769
5770 /* istanbul ignore if */
5771 {
5772 // detect possible CSP restriction
5773 try {
5774 new Function('return 1');
5775 } catch (e) {
5776 if (e.toString().match(/unsafe-eval|CSP/)) {
5777 warn$$1(
5778 'It seems you are using the standalone build of Vue.js in an ' +
5779 'environment with Content Security Policy that prohibits unsafe-eval. ' +
5780 'The template compiler cannot work in this environment. Consider ' +
5781 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
5782 'templates into render functions.'
5783 );
5784 }
5785 }
5786 }
5787
5788 // check cache
5789 var key = options.delimiters
5790 ? String(options.delimiters) + template
5791 : template;
5792 if (cache[key]) {
5793 return cache[key]
5794 }
5795
5796 // compile
5797 var compiled = compile(template, options);
5798
5799 // check compilation errors/tips
5800 {
5801 if (compiled.errors && compiled.errors.length) {
5802 warn$$1(
5803 "Error compiling template:\n\n" + template + "\n\n" +
5804 compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
5805 vm
5806 );
5807 }
5808 if (compiled.tips && compiled.tips.length) {
5809 compiled.tips.forEach(function (msg) { return tip(msg, vm); });
5810 }
5811 }
5812
5813 // turn code into functions
5814 var res = {};
5815 var fnGenErrors = [];
5816 res.render = createFunction(compiled.render, fnGenErrors);
5817 res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
5818 return createFunction(code, fnGenErrors)
5819 });
5820
5821 // check function generation errors.
5822 // this should only happen if there is a bug in the compiler itself.
5823 // mostly for codegen development use
5824 /* istanbul ignore if */
5825 {
5826 if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
5827 warn$$1(
5828 "Failed to generate render function:\n\n" +
5829 fnGenErrors.map(function (ref) {
5830 var err = ref.err;
5831 var code = ref.code;
5832
5833 return ((err.toString()) + " in\n\n" + code + "\n");
5834 }).join('\n'),
5835 vm
5836 );
5837 }
5838 }
5839
5840 return (cache[key] = res)
5841 }
5842 }
5843
5844 /* */
5845
5846 function createCompilerCreator (baseCompile) {
5847 return function createCompiler (baseOptions) {
5848 function compile (
5849 template,
5850 options
5851 ) {
5852 var finalOptions = Object.create(baseOptions);
5853 var errors = [];
5854 var tips = [];
5855 finalOptions.warn = function (msg, tip) {
5856 (tip ? tips : errors).push(msg);
5857 };
5858
5859 if (options) {
5860 // merge custom modules
5861 if (options.modules) {
5862 finalOptions.modules =
5863 (baseOptions.modules || []).concat(options.modules);
5864 }
5865 // merge custom directives
5866 if (options.directives) {
5867 finalOptions.directives = extend(
5868 Object.create(baseOptions.directives || null),
5869 options.directives
5870 );
5871 }
5872 // copy other options
5873 for (var key in options) {
5874 if (key !== 'modules' && key !== 'directives') {
5875 finalOptions[key] = options[key];
5876 }
5877 }
5878 }
5879
5880 var compiled = baseCompile(template, finalOptions);
5881 {
5882 errors.push.apply(errors, detectErrors(compiled.ast));
5883 }
5884 compiled.errors = errors;
5885 compiled.tips = tips;
5886 return compiled
5887 }
5888
5889 return {
5890 compile: compile,
5891 compileToFunctions: createCompileToFunctionFn(compile)
5892 }
5893 }
5894 }
5895
5896 /* */
5897
5898 var createCompiler = createCompilerCreator(function baseCompile (
5899 template,
5900 options
5901 ) {
5902 var ast = parse(template.trim(), options);
5903 optimize(ast, options);
5904 var code = generate$1(ast, options);
5905 return {
5906 ast: ast,
5907 render: code.render,
5908 staticRenderFns: code.staticRenderFns
5909 }
5910 });
5911
5912 /* */
5913
5914 var ref = createCompiler(baseOptions);
5915 var compile = ref.compile;
5916 var compileToFunctions = ref.compileToFunctions;
5917
5918 /* */
5919
5920 // The template compiler attempts to minimize the need for normalization by
5921 // statically analyzing the template at compile time.
5922 //
5923 // For plain HTML markup, normalization can be completely skipped because the
5924 // generated render function is guaranteed to return Array<VNode>. There are
5925 // two cases where extra normalization is needed:
5926
5927 // 1. When the children contains components - because a functional component
5928 // may return an Array instead of a single root. In this case, just a simple
5929 // normalization is needed - if any child is an Array, we flatten the whole
5930 // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
5931 // because functional components already normalize their own children.
5932 function simpleNormalizeChildren (children) {
5933 for (var i = 0; i < children.length; i++) {
5934 if (Array.isArray(children[i])) {
5935 return Array.prototype.concat.apply([], children)
5936 }
5937 }
5938 return children
5939 }
5940
5941 // 2. When the children contains constructs that always generated nested Arrays,
5942 // e.g. <template>, <slot>, v-for, or when the children is provided by user
5943 // with hand-written render functions / JSX. In such cases a full normalization
5944 // is needed to cater to all possible types of children values.
5945 function normalizeChildren (children) {
5946 return isPrimitive(children)
5947 ? [createTextVNode(children)]
5948 : Array.isArray(children)
5949 ? normalizeArrayChildren(children)
5950 : undefined
5951 }
5952
5953 function isTextNode (node) {
5954 return isDef(node) && isDef(node.text) && isFalse(node.isComment)
5955 }
5956
5957 function normalizeArrayChildren (children, nestedIndex) {
5958 var res = [];
5959 var i, c, lastIndex, last;
5960 for (i = 0; i < children.length; i++) {
5961 c = children[i];
5962 if (isUndef(c) || typeof c === 'boolean') { continue }
5963 lastIndex = res.length - 1;
5964 last = res[lastIndex];
5965 // nested
5966 if (Array.isArray(c)) {
5967 if (c.length > 0) {
5968 c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
5969 // merge adjacent text nodes
5970 if (isTextNode(c[0]) && isTextNode(last)) {
5971 res[lastIndex] = createTextVNode(last.text + (c[0]).text);
5972 c.shift();
5973 }
5974 res.push.apply(res, c);
5975 }
5976 } else if (isPrimitive(c)) {
5977 if (isTextNode(last)) {
5978 // merge adjacent text nodes
5979 // this is necessary for SSR hydration because text nodes are
5980 // essentially merged when rendered to HTML strings
5981 res[lastIndex] = createTextVNode(last.text + c);
5982 } else if (c !== '') {
5983 // convert primitive to vnode
5984 res.push(createTextVNode(c));
5985 }
5986 } else {
5987 if (isTextNode(c) && isTextNode(last)) {
5988 // merge adjacent text nodes
5989 res[lastIndex] = createTextVNode(last.text + c.text);
5990 } else {
5991 // default key for nested array children (likely generated by v-for)
5992 if (isTrue(children._isVList) &&
5993 isDef(c.tag) &&
5994 isUndef(c.key) &&
5995 isDef(nestedIndex)) {
5996 c.key = "__vlist" + nestedIndex + "_" + i + "__";
5997 }
5998 res.push(c);
5999 }
6000 }
6001 }
6002 return res
6003 }
6004
6005 /* */
6006
6007 var ssrHelpers = {
6008 _ssrEscape: escape,
6009 _ssrNode: renderStringNode,
6010 _ssrList: renderStringList,
6011 _ssrAttr: renderAttr,
6012 _ssrAttrs: renderAttrs$1,
6013 _ssrDOMProps: renderDOMProps$1,
6014 _ssrClass: renderSSRClass,
6015 _ssrStyle: renderSSRStyle
6016 };
6017
6018 function installSSRHelpers (vm) {
6019 if (vm._ssrNode) {
6020 return
6021 }
6022 var Vue = vm.constructor;
6023 while (Vue.super) {
6024 Vue = Vue.super;
6025 }
6026 extend(Vue.prototype, ssrHelpers);
6027 if (Vue.FunctionalRenderContext) {
6028 extend(Vue.FunctionalRenderContext.prototype, ssrHelpers);
6029 }
6030 }
6031
6032 var StringNode = function StringNode (
6033 open,
6034 close,
6035 children,
6036 normalizationType
6037 ) {
6038 this.isString = true;
6039 this.open = open;
6040 this.close = close;
6041 if (children) {
6042 this.children = normalizationType === 1
6043 ? simpleNormalizeChildren(children)
6044 : normalizationType === 2
6045 ? normalizeChildren(children)
6046 : children;
6047 } else {
6048 this.children = void 0;
6049 }
6050 };
6051
6052 function renderStringNode (
6053 open,
6054 close,
6055 children,
6056 normalizationType
6057 ) {
6058 return new StringNode(open, close, children, normalizationType)
6059 }
6060
6061 function renderStringList (
6062 val,
6063 render
6064 ) {
6065 var ret = '';
6066 var i, l, keys, key;
6067 if (Array.isArray(val) || typeof val === 'string') {
6068 for (i = 0, l = val.length; i < l; i++) {
6069 ret += render(val[i], i);
6070 }
6071 } else if (typeof val === 'number') {
6072 for (i = 0; i < val; i++) {
6073 ret += render(i + 1, i);
6074 }
6075 } else if (isObject(val)) {
6076 keys = Object.keys(val);
6077 for (i = 0, l = keys.length; i < l; i++) {
6078 key = keys[i];
6079 ret += render(val[key], key, i);
6080 }
6081 }
6082 return ret
6083 }
6084
6085 function renderAttrs$1 (obj) {
6086 var res = '';
6087 for (var key in obj) {
6088 if (isSSRUnsafeAttr(key)) {
6089 continue
6090 }
6091 res += renderAttr(key, obj[key]);
6092 }
6093 return res
6094 }
6095
6096 function renderDOMProps$1 (obj) {
6097 var res = '';
6098 for (var key in obj) {
6099 var attr = propsToAttrMap[key] || key.toLowerCase();
6100 if (isRenderableAttr(attr)) {
6101 res += renderAttr(attr, obj[key]);
6102 }
6103 }
6104 return res
6105 }
6106
6107 function renderSSRClass (
6108 staticClass,
6109 dynamic
6110 ) {
6111 var res = renderClass(staticClass, dynamic);
6112 return res === '' ? res : (" class=\"" + (escape(res)) + "\"")
6113 }
6114
6115 function renderSSRStyle (
6116 staticStyle,
6117 dynamic,
6118 extra
6119 ) {
6120 var style = {};
6121 if (staticStyle) { extend(style, staticStyle); }
6122 if (dynamic) { extend(style, normalizeStyleBinding(dynamic)); }
6123 if (extra) { extend(style, extra); }
6124 var res = genStyle(style);
6125 return res === '' ? res : (" style=" + (JSON.stringify(escape(res))))
6126 }
6127
6128 /* not type checking this file because flow doesn't play well with Proxy */
6129
6130 {
6131 var allowedGlobals = makeMap(
6132 'Infinity,undefined,NaN,isFinite,isNaN,' +
6133 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
6134 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
6135 'require' // for Webpack/Browserify
6136 );
6137
6138 var hasProxy =
6139 typeof Proxy !== 'undefined' && isNative(Proxy);
6140
6141 if (hasProxy) {
6142 var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
6143 config.keyCodes = new Proxy(config.keyCodes, {
6144 set: function set (target, key, value) {
6145 if (isBuiltInModifier(key)) {
6146 warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
6147 return false
6148 } else {
6149 target[key] = value;
6150 return true
6151 }
6152 }
6153 });
6154 }
6155 }
6156
6157 /* */
6158
6159 var seenObjects = new _Set();
6160
6161 /**
6162 * Recursively traverse an object to evoke all converted
6163 * getters, so that every nested property inside the object
6164 * is collected as a "deep" dependency.
6165 */
6166 function traverse (val) {
6167 _traverse(val, seenObjects);
6168 seenObjects.clear();
6169 }
6170
6171 function _traverse (val, seen) {
6172 var i, keys;
6173 var isA = Array.isArray(val);
6174 if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
6175 return
6176 }
6177 if (val.__ob__) {
6178 var depId = val.__ob__.dep.id;
6179 if (seen.has(depId)) {
6180 return
6181 }
6182 seen.add(depId);
6183 }
6184 if (isA) {
6185 i = val.length;
6186 while (i--) { _traverse(val[i], seen); }
6187 } else {
6188 keys = Object.keys(val);
6189 i = keys.length;
6190 while (i--) { _traverse(val[keys[i]], seen); }
6191 }
6192 }
6193
6194 {
6195 var perf = inBrowser && window.performance;
6196 /* istanbul ignore if */
6197 if (
6198 perf &&
6199 perf.mark &&
6200 perf.measure &&
6201 perf.clearMarks &&
6202 perf.clearMeasures
6203 ) ;
6204 }
6205
6206 /* */
6207
6208 var normalizeEvent = cached(function (name) {
6209 var passive = name.charAt(0) === '&';
6210 name = passive ? name.slice(1) : name;
6211 var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
6212 name = once$$1 ? name.slice(1) : name;
6213 var capture = name.charAt(0) === '!';
6214 name = capture ? name.slice(1) : name;
6215 return {
6216 name: name,
6217 once: once$$1,
6218 capture: capture,
6219 passive: passive
6220 }
6221 });
6222
6223 function createFnInvoker (fns) {
6224 function invoker () {
6225 var arguments$1 = arguments;
6226
6227 var fns = invoker.fns;
6228 if (Array.isArray(fns)) {
6229 var cloned = fns.slice();
6230 for (var i = 0; i < cloned.length; i++) {
6231 cloned[i].apply(null, arguments$1);
6232 }
6233 } else {
6234 // return handler return value for single handlers
6235 return fns.apply(null, arguments)
6236 }
6237 }
6238 invoker.fns = fns;
6239 return invoker
6240 }
6241
6242 function updateListeners (
6243 on,
6244 oldOn,
6245 add,
6246 remove$$1,
6247 createOnceHandler,
6248 vm
6249 ) {
6250 var name, def$$1, cur, old, event;
6251 for (name in on) {
6252 def$$1 = cur = on[name];
6253 old = oldOn[name];
6254 event = normalizeEvent(name);
6255 if (isUndef(cur)) {
6256 warn(
6257 "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
6258 vm
6259 );
6260 } else if (isUndef(old)) {
6261 if (isUndef(cur.fns)) {
6262 cur = on[name] = createFnInvoker(cur);
6263 }
6264 if (isTrue(event.once)) {
6265 cur = on[name] = createOnceHandler(event.name, cur, event.capture);
6266 }
6267 add(event.name, cur, event.capture, event.passive, event.params);
6268 } else if (cur !== old) {
6269 old.fns = cur;
6270 on[name] = old;
6271 }
6272 }
6273 for (name in oldOn) {
6274 if (isUndef(on[name])) {
6275 event = normalizeEvent(name);
6276 remove$$1(event.name, oldOn[name], event.capture);
6277 }
6278 }
6279 }
6280
6281 /* */
6282
6283 /* */
6284
6285 function extractPropsFromVNodeData (
6286 data,
6287 Ctor,
6288 tag
6289 ) {
6290 // we are only extracting raw values here.
6291 // validation and default values are handled in the child
6292 // component itself.
6293 var propOptions = Ctor.options.props;
6294 if (isUndef(propOptions)) {
6295 return
6296 }
6297 var res = {};
6298 var attrs = data.attrs;
6299 var props = data.props;
6300 if (isDef(attrs) || isDef(props)) {
6301 for (var key in propOptions) {
6302 var altKey = hyphenate(key);
6303 {
6304 var keyInLowerCase = key.toLowerCase();
6305 if (
6306 key !== keyInLowerCase &&
6307 attrs && hasOwn(attrs, keyInLowerCase)
6308 ) {
6309 tip(
6310 "Prop \"" + keyInLowerCase + "\" is passed to component " +
6311 (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
6312 " \"" + key + "\". " +
6313 "Note that HTML attributes are case-insensitive and camelCased " +
6314 "props need to use their kebab-case equivalents when using in-DOM " +
6315 "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
6316 );
6317 }
6318 }
6319 checkProp(res, props, key, altKey, true) ||
6320 checkProp(res, attrs, key, altKey, false);
6321 }
6322 }
6323 return res
6324 }
6325
6326 function checkProp (
6327 res,
6328 hash,
6329 key,
6330 altKey,
6331 preserve
6332 ) {
6333 if (isDef(hash)) {
6334 if (hasOwn(hash, key)) {
6335 res[key] = hash[key];
6336 if (!preserve) {
6337 delete hash[key];
6338 }
6339 return true
6340 } else if (hasOwn(hash, altKey)) {
6341 res[key] = hash[altKey];
6342 if (!preserve) {
6343 delete hash[altKey];
6344 }
6345 return true
6346 }
6347 }
6348 return false
6349 }
6350
6351 /* */
6352
6353 function ensureCtor (comp, base) {
6354 if (
6355 comp.__esModule ||
6356 (hasSymbol && comp[Symbol.toStringTag] === 'Module')
6357 ) {
6358 comp = comp.default;
6359 }
6360 return isObject(comp)
6361 ? base.extend(comp)
6362 : comp
6363 }
6364
6365 function createAsyncPlaceholder (
6366 factory,
6367 data,
6368 context,
6369 children,
6370 tag
6371 ) {
6372 var node = createEmptyVNode();
6373 node.asyncFactory = factory;
6374 node.asyncMeta = { data: data, context: context, children: children, tag: tag };
6375 return node
6376 }
6377
6378 function resolveAsyncComponent (
6379 factory,
6380 baseCtor,
6381 context
6382 ) {
6383 if (isTrue(factory.error) && isDef(factory.errorComp)) {
6384 return factory.errorComp
6385 }
6386
6387 if (isDef(factory.resolved)) {
6388 return factory.resolved
6389 }
6390
6391 if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
6392 return factory.loadingComp
6393 }
6394
6395 if (isDef(factory.contexts)) {
6396 // already pending
6397 factory.contexts.push(context);
6398 } else {
6399 var contexts = factory.contexts = [context];
6400 var sync = true;
6401
6402 var forceRender = function (renderCompleted) {
6403 for (var i = 0, l = contexts.length; i < l; i++) {
6404 contexts[i].$forceUpdate();
6405 }
6406
6407 if (renderCompleted) {
6408 contexts.length = 0;
6409 }
6410 };
6411
6412 var resolve = once(function (res) {
6413 // cache resolved
6414 factory.resolved = ensureCtor(res, baseCtor);
6415 // invoke callbacks only if this is not a synchronous resolve
6416 // (async resolves are shimmed as synchronous during SSR)
6417 if (!sync) {
6418 forceRender(true);
6419 }
6420 });
6421
6422 var reject = once(function (reason) {
6423 warn(
6424 "Failed to resolve async component: " + (String(factory)) +
6425 (reason ? ("\nReason: " + reason) : '')
6426 );
6427 if (isDef(factory.errorComp)) {
6428 factory.error = true;
6429 forceRender(true);
6430 }
6431 });
6432
6433 var res = factory(resolve, reject);
6434
6435 if (isObject(res)) {
6436 if (typeof res.then === 'function') {
6437 // () => Promise
6438 if (isUndef(factory.resolved)) {
6439 res.then(resolve, reject);
6440 }
6441 } else if (isDef(res.component) && typeof res.component.then === 'function') {
6442 res.component.then(resolve, reject);
6443
6444 if (isDef(res.error)) {
6445 factory.errorComp = ensureCtor(res.error, baseCtor);
6446 }
6447
6448 if (isDef(res.loading)) {
6449 factory.loadingComp = ensureCtor(res.loading, baseCtor);
6450 if (res.delay === 0) {
6451 factory.loading = true;
6452 } else {
6453 setTimeout(function () {
6454 if (isUndef(factory.resolved) && isUndef(factory.error)) {
6455 factory.loading = true;
6456 forceRender(false);
6457 }
6458 }, res.delay || 200);
6459 }
6460 }
6461
6462 if (isDef(res.timeout)) {
6463 setTimeout(function () {
6464 if (isUndef(factory.resolved)) {
6465 reject(
6466 "timeout (" + (res.timeout) + "ms)"
6467 );
6468 }
6469 }, res.timeout);
6470 }
6471 }
6472 }
6473
6474 sync = false;
6475 // return in case resolved synchronously
6476 return factory.loading
6477 ? factory.loadingComp
6478 : factory.resolved
6479 }
6480 }
6481
6482 /* */
6483
6484 /* */
6485
6486 /* */
6487
6488 /* */
6489
6490 var target;
6491
6492 function add (event, fn) {
6493 target.$on(event, fn);
6494 }
6495
6496 function remove$1 (event, fn) {
6497 target.$off(event, fn);
6498 }
6499
6500 function createOnceHandler (event, fn) {
6501 var _target = target;
6502 return function onceHandler () {
6503 var res = fn.apply(null, arguments);
6504 if (res !== null) {
6505 _target.$off(event, onceHandler);
6506 }
6507 }
6508 }
6509
6510 function updateComponentListeners (
6511 vm,
6512 listeners,
6513 oldListeners
6514 ) {
6515 target = vm;
6516 updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
6517 target = undefined;
6518 }
6519
6520 /* */
6521
6522
6523
6524 /**
6525 * Runtime helper for resolving raw children VNodes into a slot object.
6526 */
6527 function resolveSlots (
6528 children,
6529 context
6530 ) {
6531 var slots = {};
6532 if (!children) {
6533 return slots
6534 }
6535 for (var i = 0, l = children.length; i < l; i++) {
6536 var child = children[i];
6537 var data = child.data;
6538 // remove slot attribute if the node is resolved as a Vue slot node
6539 if (data && data.attrs && data.attrs.slot) {
6540 delete data.attrs.slot;
6541 }
6542 // named slots should only be respected if the vnode was rendered in the
6543 // same context.
6544 if ((child.context === context || child.fnContext === context) &&
6545 data && data.slot != null
6546 ) {
6547 var name = data.slot;
6548 var slot = (slots[name] || (slots[name] = []));
6549 if (child.tag === 'template') {
6550 slot.push.apply(slot, child.children || []);
6551 } else {
6552 slot.push(child);
6553 }
6554 } else {
6555 (slots.default || (slots.default = [])).push(child);
6556 }
6557 }
6558 // ignore slots that contains only whitespace
6559 for (var name$1 in slots) {
6560 if (slots[name$1].every(isWhitespace)) {
6561 delete slots[name$1];
6562 }
6563 }
6564 return slots
6565 }
6566
6567 function isWhitespace (node) {
6568 return (node.isComment && !node.asyncFactory) || node.text === ' '
6569 }
6570
6571 function resolveScopedSlots (
6572 fns, // see flow/vnode
6573 res
6574 ) {
6575 res = res || {};
6576 for (var i = 0; i < fns.length; i++) {
6577 if (Array.isArray(fns[i])) {
6578 resolveScopedSlots(fns[i], res);
6579 } else {
6580 res[fns[i].key] = fns[i].fn;
6581 }
6582 }
6583 return res
6584 }
6585
6586 /* */
6587
6588 var activeInstance = null;
6589
6590 function updateChildComponent (
6591 vm,
6592 propsData,
6593 listeners,
6594 parentVnode,
6595 renderChildren
6596 ) {
6597
6598 // determine whether component has slot children
6599 // we need to do this before overwriting $options._renderChildren
6600 var hasChildren = !!(
6601 renderChildren || // has new static slots
6602 vm.$options._renderChildren || // has old static slots
6603 parentVnode.data.scopedSlots || // has new scoped slots
6604 vm.$scopedSlots !== emptyObject // has old scoped slots
6605 );
6606
6607 vm.$options._parentVnode = parentVnode;
6608 vm.$vnode = parentVnode; // update vm's placeholder node without re-render
6609
6610 if (vm._vnode) { // update child tree's parent
6611 vm._vnode.parent = parentVnode;
6612 }
6613 vm.$options._renderChildren = renderChildren;
6614
6615 // update $attrs and $listeners hash
6616 // these are also reactive so they may trigger child update if the child
6617 // used them during render
6618 vm.$attrs = parentVnode.data.attrs || emptyObject;
6619 vm.$listeners = listeners || emptyObject;
6620
6621 // update props
6622 if (propsData && vm.$options.props) {
6623 toggleObserving(false);
6624 var props = vm._props;
6625 var propKeys = vm.$options._propKeys || [];
6626 for (var i = 0; i < propKeys.length; i++) {
6627 var key = propKeys[i];
6628 var propOptions = vm.$options.props; // wtf flow?
6629 props[key] = validateProp(key, propOptions, propsData, vm);
6630 }
6631 toggleObserving(true);
6632 // keep a copy of raw propsData
6633 vm.$options.propsData = propsData;
6634 }
6635
6636 // update listeners
6637 listeners = listeners || emptyObject;
6638 var oldListeners = vm.$options._parentListeners;
6639 vm.$options._parentListeners = listeners;
6640 updateComponentListeners(vm, listeners, oldListeners);
6641
6642 // resolve slots + force update if has children
6643 if (hasChildren) {
6644 vm.$slots = resolveSlots(renderChildren, parentVnode.context);
6645 vm.$forceUpdate();
6646 }
6647 }
6648
6649 function isInInactiveTree (vm) {
6650 while (vm && (vm = vm.$parent)) {
6651 if (vm._inactive) { return true }
6652 }
6653 return false
6654 }
6655
6656 function activateChildComponent (vm, direct) {
6657 if (direct) {
6658 vm._directInactive = false;
6659 if (isInInactiveTree(vm)) {
6660 return
6661 }
6662 } else if (vm._directInactive) {
6663 return
6664 }
6665 if (vm._inactive || vm._inactive === null) {
6666 vm._inactive = false;
6667 for (var i = 0; i < vm.$children.length; i++) {
6668 activateChildComponent(vm.$children[i]);
6669 }
6670 callHook(vm, 'activated');
6671 }
6672 }
6673
6674 function deactivateChildComponent (vm, direct) {
6675 if (direct) {
6676 vm._directInactive = true;
6677 if (isInInactiveTree(vm)) {
6678 return
6679 }
6680 }
6681 if (!vm._inactive) {
6682 vm._inactive = true;
6683 for (var i = 0; i < vm.$children.length; i++) {
6684 deactivateChildComponent(vm.$children[i]);
6685 }
6686 callHook(vm, 'deactivated');
6687 }
6688 }
6689
6690 function callHook (vm, hook) {
6691 // #7573 disable dep collection when invoking lifecycle hooks
6692 pushTarget();
6693 var handlers = vm.$options[hook];
6694 if (handlers) {
6695 for (var i = 0, j = handlers.length; i < j; i++) {
6696 try {
6697 handlers[i].call(vm);
6698 } catch (e) {
6699 handleError(e, vm, (hook + " hook"));
6700 }
6701 }
6702 }
6703 if (vm._hasHookEvent) {
6704 vm.$emit('hook:' + hook);
6705 }
6706 popTarget();
6707 }
6708
6709 /* */
6710
6711 /**
6712 * Queue a kept-alive component that was activated during patch.
6713 * The queue will be processed after the entire tree has been patched.
6714 */
6715 function queueActivatedComponent (vm) {
6716 // setting _inactive to false here so that a render function can
6717 // rely on checking whether it's in an inactive tree (e.g. router-view)
6718 vm._inactive = false;
6719 }
6720
6721 /* */
6722
6723 /* */
6724
6725 /* */
6726
6727 var SIMPLE_NORMALIZE = 1;
6728 var ALWAYS_NORMALIZE = 2;
6729
6730 // wrapper function for providing a more flexible interface
6731 // without getting yelled at by flow
6732 function createElement (
6733 context,
6734 tag,
6735 data,
6736 children,
6737 normalizationType,
6738 alwaysNormalize
6739 ) {
6740 if (Array.isArray(data) || isPrimitive(data)) {
6741 normalizationType = children;
6742 children = data;
6743 data = undefined;
6744 }
6745 if (isTrue(alwaysNormalize)) {
6746 normalizationType = ALWAYS_NORMALIZE;
6747 }
6748 return _createElement(context, tag, data, children, normalizationType)
6749 }
6750
6751 function _createElement (
6752 context,
6753 tag,
6754 data,
6755 children,
6756 normalizationType
6757 ) {
6758 if (isDef(data) && isDef((data).__ob__)) {
6759 warn(
6760 "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
6761 'Always create fresh vnode data objects in each render!',
6762 context
6763 );
6764 return createEmptyVNode()
6765 }
6766 // object syntax in v-bind
6767 if (isDef(data) && isDef(data.is)) {
6768 tag = data.is;
6769 }
6770 if (!tag) {
6771 // in case of component :is set to falsy value
6772 return createEmptyVNode()
6773 }
6774 // warn against non-primitive key
6775 if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)
6776 ) {
6777 {
6778 warn(
6779 'Avoid using non-primitive value as key, ' +
6780 'use string/number value instead.',
6781 context
6782 );
6783 }
6784 }
6785 // support single function children as default scoped slot
6786 if (Array.isArray(children) &&
6787 typeof children[0] === 'function'
6788 ) {
6789 data = data || {};
6790 data.scopedSlots = { default: children[0] };
6791 children.length = 0;
6792 }
6793 if (normalizationType === ALWAYS_NORMALIZE) {
6794 children = normalizeChildren(children);
6795 } else if (normalizationType === SIMPLE_NORMALIZE) {
6796 children = simpleNormalizeChildren(children);
6797 }
6798 var vnode, ns;
6799 if (typeof tag === 'string') {
6800 var Ctor;
6801 ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
6802 if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
6803 // component
6804 vnode = createComponent(Ctor, data, context, children, tag);
6805 } else {
6806 // unknown or unlisted namespaced elements
6807 // check at runtime because it may get assigned a namespace when its
6808 // parent normalizes children
6809 vnode = new VNode(
6810 tag, data, children,
6811 undefined, undefined, context
6812 );
6813 }
6814 } else {
6815 // direct component options / constructor
6816 vnode = createComponent(tag, data, context, children);
6817 }
6818 if (Array.isArray(vnode)) {
6819 return vnode
6820 } else if (isDef(vnode)) {
6821 if (isDef(ns)) { applyNS(vnode, ns); }
6822 if (isDef(data)) { registerDeepBindings(data); }
6823 return vnode
6824 } else {
6825 return createEmptyVNode()
6826 }
6827 }
6828
6829 function applyNS (vnode, ns, force) {
6830 vnode.ns = ns;
6831 if (vnode.tag === 'foreignObject') {
6832 // use default namespace inside foreignObject
6833 ns = undefined;
6834 force = true;
6835 }
6836 if (isDef(vnode.children)) {
6837 for (var i = 0, l = vnode.children.length; i < l; i++) {
6838 var child = vnode.children[i];
6839 if (isDef(child.tag) && (
6840 isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
6841 applyNS(child, ns, force);
6842 }
6843 }
6844 }
6845 }
6846
6847 // ref #5318
6848 // necessary to ensure parent re-render when deep bindings like :style and
6849 // :class are used on slot nodes
6850 function registerDeepBindings (data) {
6851 if (isObject(data.style)) {
6852 traverse(data.style);
6853 }
6854 if (isObject(data.class)) {
6855 traverse(data.class);
6856 }
6857 }
6858
6859 /* */
6860
6861 /**
6862 * Runtime helper for rendering v-for lists.
6863 */
6864 function renderList (
6865 val,
6866 render
6867 ) {
6868 var ret, i, l, keys, key;
6869 if (Array.isArray(val) || typeof val === 'string') {
6870 ret = new Array(val.length);
6871 for (i = 0, l = val.length; i < l; i++) {
6872 ret[i] = render(val[i], i);
6873 }
6874 } else if (typeof val === 'number') {
6875 ret = new Array(val);
6876 for (i = 0; i < val; i++) {
6877 ret[i] = render(i + 1, i);
6878 }
6879 } else if (isObject(val)) {
6880 keys = Object.keys(val);
6881 ret = new Array(keys.length);
6882 for (i = 0, l = keys.length; i < l; i++) {
6883 key = keys[i];
6884 ret[i] = render(val[key], key, i);
6885 }
6886 }
6887 if (isDef(ret)) {
6888 (ret)._isVList = true;
6889 }
6890 return ret
6891 }
6892
6893 /* */
6894
6895 /**
6896 * Runtime helper for rendering <slot>
6897 */
6898 function renderSlot (
6899 name,
6900 fallback,
6901 props,
6902 bindObject
6903 ) {
6904 var scopedSlotFn = this.$scopedSlots[name];
6905 var nodes;
6906 if (scopedSlotFn) { // scoped slot
6907 props = props || {};
6908 if (bindObject) {
6909 if (!isObject(bindObject)) {
6910 warn(
6911 'slot v-bind without argument expects an Object',
6912 this
6913 );
6914 }
6915 props = extend(extend({}, bindObject), props);
6916 }
6917 nodes = scopedSlotFn(props) || fallback;
6918 } else {
6919 nodes = this.$slots[name] || fallback;
6920 }
6921
6922 var target = props && props.slot;
6923 if (target) {
6924 return this.$createElement('template', { slot: target }, nodes)
6925 } else {
6926 return nodes
6927 }
6928 }
6929
6930 /* */
6931
6932 /**
6933 * Runtime helper for resolving filters
6934 */
6935 function resolveFilter (id) {
6936 return resolveAsset(this.$options, 'filters', id, true) || identity
6937 }
6938
6939 /* */
6940
6941 function isKeyNotMatch (expect, actual) {
6942 if (Array.isArray(expect)) {
6943 return expect.indexOf(actual) === -1
6944 } else {
6945 return expect !== actual
6946 }
6947 }
6948
6949 /**
6950 * Runtime helper for checking keyCodes from config.
6951 * exposed as Vue.prototype._k
6952 * passing in eventKeyName as last argument separately for backwards compat
6953 */
6954 function checkKeyCodes (
6955 eventKeyCode,
6956 key,
6957 builtInKeyCode,
6958 eventKeyName,
6959 builtInKeyName
6960 ) {
6961 var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
6962 if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
6963 return isKeyNotMatch(builtInKeyName, eventKeyName)
6964 } else if (mappedKeyCode) {
6965 return isKeyNotMatch(mappedKeyCode, eventKeyCode)
6966 } else if (eventKeyName) {
6967 return hyphenate(eventKeyName) !== key
6968 }
6969 }
6970
6971 /* */
6972
6973 /**
6974 * Runtime helper for merging v-bind="object" into a VNode's data.
6975 */
6976 function bindObjectProps (
6977 data,
6978 tag,
6979 value,
6980 asProp,
6981 isSync
6982 ) {
6983 if (value) {
6984 if (!isObject(value)) {
6985 warn(
6986 'v-bind without argument expects an Object or Array value',
6987 this
6988 );
6989 } else {
6990 if (Array.isArray(value)) {
6991 value = toObject(value);
6992 }
6993 var hash;
6994 var loop = function ( key ) {
6995 if (
6996 key === 'class' ||
6997 key === 'style' ||
6998 isReservedAttribute(key)
6999 ) {
7000 hash = data;
7001 } else {
7002 var type = data.attrs && data.attrs.type;
7003 hash = asProp || config.mustUseProp(tag, type, key)
7004 ? data.domProps || (data.domProps = {})
7005 : data.attrs || (data.attrs = {});
7006 }
7007 var camelizedKey = camelize(key);
7008 if (!(key in hash) && !(camelizedKey in hash)) {
7009 hash[key] = value[key];
7010
7011 if (isSync) {
7012 var on = data.on || (data.on = {});
7013 on[("update:" + camelizedKey)] = function ($event) {
7014 value[key] = $event;
7015 };
7016 }
7017 }
7018 };
7019
7020 for (var key in value) loop( key );
7021 }
7022 }
7023 return data
7024 }
7025
7026 /* */
7027
7028 /**
7029 * Runtime helper for rendering static trees.
7030 */
7031 function renderStatic (
7032 index,
7033 isInFor
7034 ) {
7035 var cached = this._staticTrees || (this._staticTrees = []);
7036 var tree = cached[index];
7037 // if has already-rendered static tree and not inside v-for,
7038 // we can reuse the same tree.
7039 if (tree && !isInFor) {
7040 return tree
7041 }
7042 // otherwise, render a fresh tree.
7043 tree = cached[index] = this.$options.staticRenderFns[index].call(
7044 this._renderProxy,
7045 null,
7046 this // for render fns generated for functional component templates
7047 );
7048 markStatic(tree, ("__static__" + index), false);
7049 return tree
7050 }
7051
7052 /**
7053 * Runtime helper for v-once.
7054 * Effectively it means marking the node as static with a unique key.
7055 */
7056 function markOnce (
7057 tree,
7058 index,
7059 key
7060 ) {
7061 markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
7062 return tree
7063 }
7064
7065 function markStatic (
7066 tree,
7067 key,
7068 isOnce
7069 ) {
7070 if (Array.isArray(tree)) {
7071 for (var i = 0; i < tree.length; i++) {
7072 if (tree[i] && typeof tree[i] !== 'string') {
7073 markStaticNode(tree[i], (key + "_" + i), isOnce);
7074 }
7075 }
7076 } else {
7077 markStaticNode(tree, key, isOnce);
7078 }
7079 }
7080
7081 function markStaticNode (node, key, isOnce) {
7082 node.isStatic = true;
7083 node.key = key;
7084 node.isOnce = isOnce;
7085 }
7086
7087 /* */
7088
7089 function bindObjectListeners (data, value) {
7090 if (value) {
7091 if (!isPlainObject(value)) {
7092 warn(
7093 'v-on without argument expects an Object value',
7094 this
7095 );
7096 } else {
7097 var on = data.on = data.on ? extend({}, data.on) : {};
7098 for (var key in value) {
7099 var existing = on[key];
7100 var ours = value[key];
7101 on[key] = existing ? [].concat(existing, ours) : ours;
7102 }
7103 }
7104 }
7105 return data
7106 }
7107
7108 /* */
7109
7110 function installRenderHelpers (target) {
7111 target._o = markOnce;
7112 target._n = toNumber;
7113 target._s = toString;
7114 target._l = renderList;
7115 target._t = renderSlot;
7116 target._q = looseEqual;
7117 target._i = looseIndexOf;
7118 target._m = renderStatic;
7119 target._f = resolveFilter;
7120 target._k = checkKeyCodes;
7121 target._b = bindObjectProps;
7122 target._v = createTextVNode;
7123 target._e = createEmptyVNode;
7124 target._u = resolveScopedSlots;
7125 target._g = bindObjectListeners;
7126 }
7127
7128 /* */
7129
7130 /* */
7131
7132 function resolveInject (inject, vm) {
7133 if (inject) {
7134 // inject is :any because flow is not smart enough to figure out cached
7135 var result = Object.create(null);
7136 var keys = hasSymbol
7137 ? Reflect.ownKeys(inject).filter(function (key) {
7138 /* istanbul ignore next */
7139 return Object.getOwnPropertyDescriptor(inject, key).enumerable
7140 })
7141 : Object.keys(inject);
7142
7143 for (var i = 0; i < keys.length; i++) {
7144 var key = keys[i];
7145 var provideKey = inject[key].from;
7146 var source = vm;
7147 while (source) {
7148 if (source._provided && hasOwn(source._provided, provideKey)) {
7149 result[key] = source._provided[provideKey];
7150 break
7151 }
7152 source = source.$parent;
7153 }
7154 if (!source) {
7155 if ('default' in inject[key]) {
7156 var provideDefault = inject[key].default;
7157 result[key] = typeof provideDefault === 'function'
7158 ? provideDefault.call(vm)
7159 : provideDefault;
7160 } else {
7161 warn(("Injection \"" + key + "\" not found"), vm);
7162 }
7163 }
7164 }
7165 return result
7166 }
7167 }
7168
7169 /* */
7170
7171 function resolveConstructorOptions (Ctor) {
7172 var options = Ctor.options;
7173 if (Ctor.super) {
7174 var superOptions = resolveConstructorOptions(Ctor.super);
7175 var cachedSuperOptions = Ctor.superOptions;
7176 if (superOptions !== cachedSuperOptions) {
7177 // super option changed,
7178 // need to resolve new options.
7179 Ctor.superOptions = superOptions;
7180 // check if there are any late-modified/attached options (#4976)
7181 var modifiedOptions = resolveModifiedOptions(Ctor);
7182 // update base extend options
7183 if (modifiedOptions) {
7184 extend(Ctor.extendOptions, modifiedOptions);
7185 }
7186 options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
7187 if (options.name) {
7188 options.components[options.name] = Ctor;
7189 }
7190 }
7191 }
7192 return options
7193 }
7194
7195 function resolveModifiedOptions (Ctor) {
7196 var modified;
7197 var latest = Ctor.options;
7198 var extended = Ctor.extendOptions;
7199 var sealed = Ctor.sealedOptions;
7200 for (var key in latest) {
7201 if (latest[key] !== sealed[key]) {
7202 if (!modified) { modified = {}; }
7203 modified[key] = dedupe(latest[key], extended[key], sealed[key]);
7204 }
7205 }
7206 return modified
7207 }
7208
7209 function dedupe (latest, extended, sealed) {
7210 // compare latest and sealed to ensure lifecycle hooks won't be duplicated
7211 // between merges
7212 if (Array.isArray(latest)) {
7213 var res = [];
7214 sealed = Array.isArray(sealed) ? sealed : [sealed];
7215 extended = Array.isArray(extended) ? extended : [extended];
7216 for (var i = 0; i < latest.length; i++) {
7217 // push original options and not sealed options to exclude duplicated options
7218 if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
7219 res.push(latest[i]);
7220 }
7221 }
7222 return res
7223 } else {
7224 return latest
7225 }
7226 }
7227
7228 /* */
7229
7230 function FunctionalRenderContext (
7231 data,
7232 props,
7233 children,
7234 parent,
7235 Ctor
7236 ) {
7237 var options = Ctor.options;
7238 // ensure the createElement function in functional components
7239 // gets a unique context - this is necessary for correct named slot check
7240 var contextVm;
7241 if (hasOwn(parent, '_uid')) {
7242 contextVm = Object.create(parent);
7243 // $flow-disable-line
7244 contextVm._original = parent;
7245 } else {
7246 // the context vm passed in is a functional context as well.
7247 // in this case we want to make sure we are able to get a hold to the
7248 // real context instance.
7249 contextVm = parent;
7250 // $flow-disable-line
7251 parent = parent._original;
7252 }
7253 var isCompiled = isTrue(options._compiled);
7254 var needNormalization = !isCompiled;
7255
7256 this.data = data;
7257 this.props = props;
7258 this.children = children;
7259 this.parent = parent;
7260 this.listeners = data.on || emptyObject;
7261 this.injections = resolveInject(options.inject, parent);
7262 this.slots = function () { return resolveSlots(children, parent); };
7263
7264 // support for compiled functional template
7265 if (isCompiled) {
7266 // exposing $options for renderStatic()
7267 this.$options = options;
7268 // pre-resolve slots for renderSlot()
7269 this.$slots = this.slots();
7270 this.$scopedSlots = data.scopedSlots || emptyObject;
7271 }
7272
7273 if (options._scopeId) {
7274 this._c = function (a, b, c, d) {
7275 var vnode = createElement(contextVm, a, b, c, d, needNormalization);
7276 if (vnode && !Array.isArray(vnode)) {
7277 vnode.fnScopeId = options._scopeId;
7278 vnode.fnContext = parent;
7279 }
7280 return vnode
7281 };
7282 } else {
7283 this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
7284 }
7285 }
7286
7287 installRenderHelpers(FunctionalRenderContext.prototype);
7288
7289 function createFunctionalComponent (
7290 Ctor,
7291 propsData,
7292 data,
7293 contextVm,
7294 children
7295 ) {
7296 var options = Ctor.options;
7297 var props = {};
7298 var propOptions = options.props;
7299 if (isDef(propOptions)) {
7300 for (var key in propOptions) {
7301 props[key] = validateProp(key, propOptions, propsData || emptyObject);
7302 }
7303 } else {
7304 if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
7305 if (isDef(data.props)) { mergeProps(props, data.props); }
7306 }
7307
7308 var renderContext = new FunctionalRenderContext(
7309 data,
7310 props,
7311 children,
7312 contextVm,
7313 Ctor
7314 );
7315
7316 var vnode = options.render.call(null, renderContext._c, renderContext);
7317
7318 if (vnode instanceof VNode) {
7319 return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
7320 } else if (Array.isArray(vnode)) {
7321 var vnodes = normalizeChildren(vnode) || [];
7322 var res = new Array(vnodes.length);
7323 for (var i = 0; i < vnodes.length; i++) {
7324 res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
7325 }
7326 return res
7327 }
7328 }
7329
7330 function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
7331 // #7817 clone node before setting fnContext, otherwise if the node is reused
7332 // (e.g. it was from a cached normal slot) the fnContext causes named slots
7333 // that should not be matched to match.
7334 var clone = cloneVNode(vnode);
7335 clone.fnContext = contextVm;
7336 clone.fnOptions = options;
7337 {
7338 (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
7339 }
7340 if (data.slot) {
7341 (clone.data || (clone.data = {})).slot = data.slot;
7342 }
7343 return clone
7344 }
7345
7346 function mergeProps (to, from) {
7347 for (var key in from) {
7348 to[camelize(key)] = from[key];
7349 }
7350 }
7351
7352 /* */
7353
7354 /* */
7355
7356 /* */
7357
7358 /* */
7359
7360 // inline hooks to be invoked on component VNodes during patch
7361 var componentVNodeHooks = {
7362 init: function init (vnode, hydrating) {
7363 if (
7364 vnode.componentInstance &&
7365 !vnode.componentInstance._isDestroyed &&
7366 vnode.data.keepAlive
7367 ) {
7368 // kept-alive components, treat as a patch
7369 var mountedNode = vnode; // work around flow
7370 componentVNodeHooks.prepatch(mountedNode, mountedNode);
7371 } else {
7372 var child = vnode.componentInstance = createComponentInstanceForVnode(
7373 vnode,
7374 activeInstance
7375 );
7376 child.$mount(hydrating ? vnode.elm : undefined, hydrating);
7377 }
7378 },
7379
7380 prepatch: function prepatch (oldVnode, vnode) {
7381 var options = vnode.componentOptions;
7382 var child = vnode.componentInstance = oldVnode.componentInstance;
7383 updateChildComponent(
7384 child,
7385 options.propsData, // updated props
7386 options.listeners, // updated listeners
7387 vnode, // new parent vnode
7388 options.children // new children
7389 );
7390 },
7391
7392 insert: function insert (vnode) {
7393 var context = vnode.context;
7394 var componentInstance = vnode.componentInstance;
7395 if (!componentInstance._isMounted) {
7396 componentInstance._isMounted = true;
7397 callHook(componentInstance, 'mounted');
7398 }
7399 if (vnode.data.keepAlive) {
7400 if (context._isMounted) {
7401 // vue-router#1212
7402 // During updates, a kept-alive component's child components may
7403 // change, so directly walking the tree here may call activated hooks
7404 // on incorrect children. Instead we push them into a queue which will
7405 // be processed after the whole patch process ended.
7406 queueActivatedComponent(componentInstance);
7407 } else {
7408 activateChildComponent(componentInstance, true /* direct */);
7409 }
7410 }
7411 },
7412
7413 destroy: function destroy (vnode) {
7414 var componentInstance = vnode.componentInstance;
7415 if (!componentInstance._isDestroyed) {
7416 if (!vnode.data.keepAlive) {
7417 componentInstance.$destroy();
7418 } else {
7419 deactivateChildComponent(componentInstance, true /* direct */);
7420 }
7421 }
7422 }
7423 };
7424
7425 var hooksToMerge = Object.keys(componentVNodeHooks);
7426
7427 function createComponent (
7428 Ctor,
7429 data,
7430 context,
7431 children,
7432 tag
7433 ) {
7434 if (isUndef(Ctor)) {
7435 return
7436 }
7437
7438 var baseCtor = context.$options._base;
7439
7440 // plain options object: turn it into a constructor
7441 if (isObject(Ctor)) {
7442 Ctor = baseCtor.extend(Ctor);
7443 }
7444
7445 // if at this stage it's not a constructor or an async component factory,
7446 // reject.
7447 if (typeof Ctor !== 'function') {
7448 {
7449 warn(("Invalid Component definition: " + (String(Ctor))), context);
7450 }
7451 return
7452 }
7453
7454 // async component
7455 var asyncFactory;
7456 if (isUndef(Ctor.cid)) {
7457 asyncFactory = Ctor;
7458 Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context);
7459 if (Ctor === undefined) {
7460 // return a placeholder node for async component, which is rendered
7461 // as a comment node but preserves all the raw information for the node.
7462 // the information will be used for async server-rendering and hydration.
7463 return createAsyncPlaceholder(
7464 asyncFactory,
7465 data,
7466 context,
7467 children,
7468 tag
7469 )
7470 }
7471 }
7472
7473 data = data || {};
7474
7475 // resolve constructor options in case global mixins are applied after
7476 // component constructor creation
7477 resolveConstructorOptions(Ctor);
7478
7479 // transform component v-model data into props & events
7480 if (isDef(data.model)) {
7481 transformModel(Ctor.options, data);
7482 }
7483
7484 // extract props
7485 var propsData = extractPropsFromVNodeData(data, Ctor, tag);
7486
7487 // functional component
7488 if (isTrue(Ctor.options.functional)) {
7489 return createFunctionalComponent(Ctor, propsData, data, context, children)
7490 }
7491
7492 // extract listeners, since these needs to be treated as
7493 // child component listeners instead of DOM listeners
7494 var listeners = data.on;
7495 // replace with listeners with .native modifier
7496 // so it gets processed during parent component patch.
7497 data.on = data.nativeOn;
7498
7499 if (isTrue(Ctor.options.abstract)) {
7500 // abstract components do not keep anything
7501 // other than props & listeners & slot
7502
7503 // work around flow
7504 var slot = data.slot;
7505 data = {};
7506 if (slot) {
7507 data.slot = slot;
7508 }
7509 }
7510
7511 // install component management hooks onto the placeholder node
7512 installComponentHooks(data);
7513
7514 // return a placeholder vnode
7515 var name = Ctor.options.name || tag;
7516 var vnode = new VNode(
7517 ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
7518 data, undefined, undefined, undefined, context,
7519 { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
7520 asyncFactory
7521 );
7522
7523 return vnode
7524 }
7525
7526 function createComponentInstanceForVnode (
7527 vnode, // we know it's MountedComponentVNode but flow doesn't
7528 parent // activeInstance in lifecycle state
7529 ) {
7530 var options = {
7531 _isComponent: true,
7532 _parentVnode: vnode,
7533 parent: parent
7534 };
7535 // check inline-template render functions
7536 var inlineTemplate = vnode.data.inlineTemplate;
7537 if (isDef(inlineTemplate)) {
7538 options.render = inlineTemplate.render;
7539 options.staticRenderFns = inlineTemplate.staticRenderFns;
7540 }
7541 return new vnode.componentOptions.Ctor(options)
7542 }
7543
7544 function installComponentHooks (data) {
7545 var hooks = data.hook || (data.hook = {});
7546 for (var i = 0; i < hooksToMerge.length; i++) {
7547 var key = hooksToMerge[i];
7548 var existing = hooks[key];
7549 var toMerge = componentVNodeHooks[key];
7550 if (existing !== toMerge && !(existing && existing._merged)) {
7551 hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
7552 }
7553 }
7554 }
7555
7556 function mergeHook$1 (f1, f2) {
7557 var merged = function (a, b) {
7558 // flow complains about extra args which is why we use any
7559 f1(a, b);
7560 f2(a, b);
7561 };
7562 merged._merged = true;
7563 return merged
7564 }
7565
7566 // transform component v-model info (value and callback) into
7567 // prop and event handler respectively.
7568 function transformModel (options, data) {
7569 var prop = (options.model && options.model.prop) || 'value';
7570 var event = (options.model && options.model.event) || 'input'
7571 ;(data.props || (data.props = {}))[prop] = data.model.value;
7572 var on = data.on || (data.on = {});
7573 var existing = on[event];
7574 var callback = data.model.callback;
7575 if (isDef(existing)) {
7576 if (
7577 Array.isArray(existing)
7578 ? existing.indexOf(callback) === -1
7579 : existing !== callback
7580 ) {
7581 on[event] = [callback].concat(existing);
7582 }
7583 } else {
7584 on[event] = callback;
7585 }
7586 }
7587
7588 /* */
7589
7590 var warned = Object.create(null);
7591 var warnOnce = function (msg) {
7592 if (!warned[msg]) {
7593 warned[msg] = true;
7594 console.warn(("\n\u001b[31m" + msg + "\u001b[39m\n"));
7595 }
7596 };
7597
7598 var onCompilationError = function (err, vm) {
7599 var trace = vm ? generateComponentTrace(vm) : '';
7600 throw new Error(("\n\u001b[31m" + err + trace + "\u001b[39m\n"))
7601 };
7602
7603 var normalizeRender = function (vm) {
7604 var ref = vm.$options;
7605 var render = ref.render;
7606 var template = ref.template;
7607 var _scopeId = ref._scopeId;
7608 if (isUndef(render)) {
7609 if (template) {
7610 var compiled = compileToFunctions(template, {
7611 scopeId: _scopeId,
7612 warn: onCompilationError
7613 }, vm);
7614
7615 vm.$options.render = compiled.render;
7616 vm.$options.staticRenderFns = compiled.staticRenderFns;
7617 } else {
7618 throw new Error(
7619 ("render function or template not defined in component: " + (vm.$options.name || vm.$options._componentTag || 'anonymous'))
7620 )
7621 }
7622 }
7623 };
7624
7625 function renderNode (node, isRoot, context) {
7626 if (node.isString) {
7627 renderStringNode$1(node, context);
7628 } else if (isDef(node.componentOptions)) {
7629 renderComponent(node, isRoot, context);
7630 } else if (isDef(node.tag)) {
7631 renderElement(node, isRoot, context);
7632 } else if (isTrue(node.isComment)) {
7633 if (isDef(node.asyncFactory)) {
7634 // async component
7635 renderAsyncComponent(node, isRoot, context);
7636 } else {
7637 context.write(("<!--" + (node.text) + "-->"), context.next);
7638 }
7639 } else {
7640 context.write(
7641 node.raw ? node.text : escape(String(node.text)),
7642 context.next
7643 );
7644 }
7645 }
7646
7647 function registerComponentForCache (options, write) {
7648 // exposed by vue-loader, need to call this if cache hit because
7649 // component lifecycle hooks will not be called.
7650 var register = options._ssrRegister;
7651 if (write.caching && isDef(register)) {
7652 write.componentBuffer[write.componentBuffer.length - 1].add(register);
7653 }
7654 return register
7655 }
7656
7657 function renderComponent (node, isRoot, context) {
7658 var write = context.write;
7659 var next = context.next;
7660 var userContext = context.userContext;
7661
7662 // check cache hit
7663 var Ctor = node.componentOptions.Ctor;
7664 var getKey = Ctor.options.serverCacheKey;
7665 var name = Ctor.options.name;
7666 var cache = context.cache;
7667 var registerComponent = registerComponentForCache(Ctor.options, write);
7668
7669 if (isDef(getKey) && isDef(cache) && isDef(name)) {
7670 var key = name + '::' + getKey(node.componentOptions.propsData);
7671 var has = context.has;
7672 var get = context.get;
7673 if (isDef(has)) {
7674 has(key, function (hit) {
7675 if (hit === true && isDef(get)) {
7676 get(key, function (res) {
7677 if (isDef(registerComponent)) {
7678 registerComponent(userContext);
7679 }
7680 res.components.forEach(function (register) { return register(userContext); });
7681 write(res.html, next);
7682 });
7683 } else {
7684 renderComponentWithCache(node, isRoot, key, context);
7685 }
7686 });
7687 } else if (isDef(get)) {
7688 get(key, function (res) {
7689 if (isDef(res)) {
7690 if (isDef(registerComponent)) {
7691 registerComponent(userContext);
7692 }
7693 res.components.forEach(function (register) { return register(userContext); });
7694 write(res.html, next);
7695 } else {
7696 renderComponentWithCache(node, isRoot, key, context);
7697 }
7698 });
7699 }
7700 } else {
7701 if (isDef(getKey) && isUndef(cache)) {
7702 warnOnce(
7703 "[vue-server-renderer] Component " + (Ctor.options.name || '(anonymous)') + " implemented serverCacheKey, " +
7704 'but no cache was provided to the renderer.'
7705 );
7706 }
7707 if (isDef(getKey) && isUndef(name)) {
7708 warnOnce(
7709 "[vue-server-renderer] Components that implement \"serverCacheKey\" " +
7710 "must also define a unique \"name\" option."
7711 );
7712 }
7713 renderComponentInner(node, isRoot, context);
7714 }
7715 }
7716
7717 function renderComponentWithCache (node, isRoot, key, context) {
7718 var write = context.write;
7719 write.caching = true;
7720 var buffer = write.cacheBuffer;
7721 var bufferIndex = buffer.push('') - 1;
7722 var componentBuffer = write.componentBuffer;
7723 componentBuffer.push(new Set());
7724 context.renderStates.push({
7725 type: 'ComponentWithCache',
7726 key: key,
7727 buffer: buffer,
7728 bufferIndex: bufferIndex,
7729 componentBuffer: componentBuffer
7730 });
7731 renderComponentInner(node, isRoot, context);
7732 }
7733
7734 function renderComponentInner (node, isRoot, context) {
7735 var prevActive = context.activeInstance;
7736 // expose userContext on vnode
7737 node.ssrContext = context.userContext;
7738 var child = context.activeInstance = createComponentInstanceForVnode(
7739 node,
7740 context.activeInstance
7741 );
7742 normalizeRender(child);
7743 var childNode = child._render();
7744 childNode.parent = node;
7745 context.renderStates.push({
7746 type: 'Component',
7747 prevActive: prevActive
7748 });
7749 renderNode(childNode, isRoot, context);
7750 }
7751
7752 function renderAsyncComponent (node, isRoot, context) {
7753 var factory = node.asyncFactory;
7754
7755 var resolve = function (comp) {
7756 if (comp.__esModule && comp.default) {
7757 comp = comp.default;
7758 }
7759 var ref = node.asyncMeta;
7760 var data = ref.data;
7761 var children = ref.children;
7762 var tag = ref.tag;
7763 var nodeContext = node.asyncMeta.context;
7764 var resolvedNode = createComponent(
7765 comp,
7766 data,
7767 nodeContext,
7768 children,
7769 tag
7770 );
7771 if (resolvedNode) {
7772 if (resolvedNode.componentOptions) {
7773 // normal component
7774 renderComponent(resolvedNode, isRoot, context);
7775 } else if (!Array.isArray(resolvedNode)) {
7776 // single return node from functional component
7777 renderNode(resolvedNode, isRoot, context);
7778 } else {
7779 // multiple return nodes from functional component
7780 context.renderStates.push({
7781 type: 'Fragment',
7782 children: resolvedNode,
7783 rendered: 0,
7784 total: resolvedNode.length
7785 });
7786 context.next();
7787 }
7788 } else {
7789 // invalid component, but this does not throw on the client
7790 // so render empty comment node
7791 context.write("<!---->", context.next);
7792 }
7793 };
7794
7795 if (factory.resolved) {
7796 resolve(factory.resolved);
7797 return
7798 }
7799
7800 var reject = context.done;
7801 var res;
7802 try {
7803 res = factory(resolve, reject);
7804 } catch (e) {
7805 reject(e);
7806 }
7807 if (res) {
7808 if (typeof res.then === 'function') {
7809 res.then(resolve, reject).catch(reject);
7810 } else {
7811 // new syntax in 2.3
7812 var comp = res.component;
7813 if (comp && typeof comp.then === 'function') {
7814 comp.then(resolve, reject).catch(reject);
7815 }
7816 }
7817 }
7818 }
7819
7820 function renderStringNode$1 (el, context) {
7821 var write = context.write;
7822 var next = context.next;
7823 if (isUndef(el.children) || el.children.length === 0) {
7824 write(el.open + (el.close || ''), next);
7825 } else {
7826 var children = el.children;
7827 context.renderStates.push({
7828 type: 'Element',
7829 children: children,
7830 rendered: 0,
7831 total: children.length,
7832 endTag: el.close
7833 });
7834 write(el.open, next);
7835 }
7836 }
7837
7838 function renderElement (el, isRoot, context) {
7839 var write = context.write;
7840 var next = context.next;
7841
7842 if (isTrue(isRoot)) {
7843 if (!el.data) { el.data = {}; }
7844 if (!el.data.attrs) { el.data.attrs = {}; }
7845 el.data.attrs[SSR_ATTR] = 'true';
7846 }
7847
7848 if (el.fnOptions) {
7849 registerComponentForCache(el.fnOptions, write);
7850 }
7851
7852 var startTag = renderStartingTag(el, context);
7853 var endTag = "</" + (el.tag) + ">";
7854 if (context.isUnaryTag(el.tag)) {
7855 write(startTag, next);
7856 } else if (isUndef(el.children) || el.children.length === 0) {
7857 write(startTag + endTag, next);
7858 } else {
7859 var children = el.children;
7860 context.renderStates.push({
7861 type: 'Element',
7862 children: children,
7863 rendered: 0,
7864 total: children.length,
7865 endTag: endTag
7866 });
7867 write(startTag, next);
7868 }
7869 }
7870
7871 function hasAncestorData (node) {
7872 var parentNode = node.parent;
7873 return isDef(parentNode) && (isDef(parentNode.data) || hasAncestorData(parentNode))
7874 }
7875
7876 function getVShowDirectiveInfo (node) {
7877 var dir;
7878 var tmp;
7879
7880 while (isDef(node)) {
7881 if (node.data && node.data.directives) {
7882 tmp = node.data.directives.find(function (dir) { return dir.name === 'show'; });
7883 if (tmp) {
7884 dir = tmp;
7885 }
7886 }
7887 node = node.parent;
7888 }
7889 return dir
7890 }
7891
7892 function renderStartingTag (node, context) {
7893 var markup = "<" + (node.tag);
7894 var directives = context.directives;
7895 var modules = context.modules;
7896
7897 // construct synthetic data for module processing
7898 // because modules like style also produce code by parent VNode data
7899 if (isUndef(node.data) && hasAncestorData(node)) {
7900 node.data = {};
7901 }
7902 if (isDef(node.data)) {
7903 // check directives
7904 var dirs = node.data.directives;
7905 if (dirs) {
7906 for (var i = 0; i < dirs.length; i++) {
7907 var name = dirs[i].name;
7908 if (name !== 'show') {
7909 var dirRenderer = resolveAsset(context, 'directives', name);
7910 if (dirRenderer) {
7911 // directives mutate the node's data
7912 // which then gets rendered by modules
7913 dirRenderer(node, dirs[i]);
7914 }
7915 }
7916 }
7917 }
7918
7919 // v-show directive needs to be merged from parent to child
7920 var vshowDirectiveInfo = getVShowDirectiveInfo(node);
7921 if (vshowDirectiveInfo) {
7922 directives.show(node, vshowDirectiveInfo);
7923 }
7924
7925 // apply other modules
7926 for (var i$1 = 0; i$1 < modules.length; i$1++) {
7927 var res = modules[i$1](node);
7928 if (res) {
7929 markup += res;
7930 }
7931 }
7932 }
7933 // attach scoped CSS ID
7934 var scopeId;
7935 var activeInstance = context.activeInstance;
7936 if (isDef(activeInstance) &&
7937 activeInstance !== node.context &&
7938 isDef(scopeId = activeInstance.$options._scopeId)
7939 ) {
7940 markup += " " + ((scopeId));
7941 }
7942 if (isDef(node.fnScopeId)) {
7943 markup += " " + (node.fnScopeId);
7944 } else {
7945 while (isDef(node)) {
7946 if (isDef(scopeId = node.context.$options._scopeId)) {
7947 markup += " " + scopeId;
7948 }
7949 node = node.parent;
7950 }
7951 }
7952 return markup + '>'
7953 }
7954
7955 function createRenderFunction (
7956 modules,
7957 directives,
7958 isUnaryTag,
7959 cache
7960 ) {
7961 return function render (
7962 component,
7963 write,
7964 userContext,
7965 done
7966 ) {
7967 warned = Object.create(null);
7968 var context = new RenderContext({
7969 activeInstance: component,
7970 userContext: userContext,
7971 write: write, done: done, renderNode: renderNode,
7972 isUnaryTag: isUnaryTag, modules: modules, directives: directives,
7973 cache: cache
7974 });
7975 installSSRHelpers(component);
7976 normalizeRender(component);
7977 renderNode(component._render(), true, context);
7978 }
7979 }
7980
7981 /* */
7982
7983
7984 function createBasicRenderer (ref) {
7985 if ( ref === void 0 ) ref = {};
7986 var modules = ref.modules; if ( modules === void 0 ) modules = [];
7987 var directives = ref.directives; if ( directives === void 0 ) directives = {};
7988 var isUnaryTag = ref.isUnaryTag; if ( isUnaryTag === void 0 ) isUnaryTag = (function () { return false; });
7989 var cache = ref.cache;
7990
7991 var render = createRenderFunction(modules, directives, isUnaryTag, cache);
7992
7993 return function renderToString (
7994 component,
7995 context,
7996 done
7997 ) {
7998 if (typeof context === 'function') {
7999 done = context;
8000 context = {};
8001 }
8002 var result = '';
8003 var write = createWriteFunction(function (text) {
8004 result += text;
8005 return false
8006 }, done);
8007 try {
8008 render(component, write, context, function () {
8009 done(null, result);
8010 });
8011 } catch (e) {
8012 done(e);
8013 }
8014 }
8015 }
8016
8017 /* */
8018
8019 var entryServerBasicRenderer = createBasicRenderer({
8020 modules: modules,
8021 directives: directives,
8022 isUnaryTag: isUnaryTag,
8023 canBeLeftOpenTag: canBeLeftOpenTag
8024 });
8025
8026 return entryServerBasicRenderer;
8027
8028})));