11/*!
2- * Vue.js v2.3.2
2+ * Vue.js v2.3.3
33 * (c) 2014-2017 Evan You
44 * Released under the MIT License.
55 */
@@ -21,6 +21,9 @@ function isTrue (v) {
2121 return v === true
2222}
2323
24+ function isFalse ( v ) {
25+ return v === false
26+ }
2427/**
2528 * Check if value is primitive
2629 */
@@ -1412,7 +1415,8 @@ function getPropDefaultValue (vm, prop, key) {
14121415 // return previous default value to avoid unnecessary watcher trigger
14131416 if ( vm && vm . $options . propsData &&
14141417 vm . $options . propsData [ key ] === undefined &&
1415- vm . _props [ key ] !== undefined ) {
1418+ vm . _props [ key ] !== undefined
1419+ ) {
14161420 return vm . _props [ key ]
14171421 }
14181422 // call factory function for non-Function types
@@ -1686,6 +1690,7 @@ function cloneVNode (vnode) {
16861690 cloned . ns = vnode . ns ;
16871691 cloned . isStatic = vnode . isStatic ;
16881692 cloned . key = vnode . key ;
1693+ cloned . isComment = vnode . isComment ;
16891694 cloned . isCloned = true ;
16901695 return cloned
16911696}
@@ -1904,6 +1909,10 @@ function normalizeChildren (children) {
19041909 : undefined
19051910}
19061911
1912+ function isTextNode ( node ) {
1913+ return isDef ( node ) && isDef ( node . text ) && isFalse ( node . isComment )
1914+ }
1915+
19071916function normalizeArrayChildren ( children , nestedIndex ) {
19081917 var res = [ ] ;
19091918 var i , c , last ;
@@ -1915,18 +1924,25 @@ function normalizeArrayChildren (children, nestedIndex) {
19151924 if ( Array . isArray ( c ) ) {
19161925 res . push . apply ( res , normalizeArrayChildren ( c , ( ( nestedIndex || '' ) + "_" + i ) ) ) ;
19171926 } else if ( isPrimitive ( c ) ) {
1918- if ( isDef ( last ) && isDef ( last . text ) ) {
1919- last . text += String ( c ) ;
1927+ if ( isTextNode ( last ) ) {
1928+ // merge adjacent text nodes
1929+ // this is necessary for SSR hydration because text nodes are
1930+ // essentially merged when rendered to HTML strings
1931+ ( last ) . text += String ( c ) ;
19201932 } else if ( c !== '' ) {
19211933 // convert primitive to vnode
19221934 res . push ( createTextVNode ( c ) ) ;
19231935 }
19241936 } else {
1925- if ( isDef ( c . text ) && isDef ( last ) && isDef ( last . text ) ) {
1937+ if ( isTextNode ( c ) && isTextNode ( last ) ) {
1938+ // merge adjacent text nodes
19261939 res [ res . length - 1 ] = createTextVNode ( last . text + c . text ) ;
19271940 } else {
19281941 // default key for nested array children (likely generated by v-for)
1929- if ( isDef ( c . tag ) && isUndef ( c . key ) && isDef ( nestedIndex ) ) {
1942+ if ( isTrue ( children . _isVList ) &&
1943+ isDef ( c . tag ) &&
1944+ isUndef ( c . key ) &&
1945+ isDef ( nestedIndex ) ) {
19301946 c . key = "__vlist" + nestedIndex + "_" + i + "__" ;
19311947 }
19321948 res . push ( c ) ;
@@ -2026,11 +2042,13 @@ function resolveAsyncComponent (
20262042
20272043 if ( isDef ( res . timeout ) ) {
20282044 setTimeout ( function ( ) {
2029- reject (
2030- process . env . NODE_ENV !== 'production'
2031- ? ( "timeout (" + ( res . timeout ) + "ms)" )
2032- : null
2033- ) ;
2045+ if ( isUndef ( factory . resolved ) ) {
2046+ reject (
2047+ process . env . NODE_ENV !== 'production'
2048+ ? ( "timeout (" + ( res . timeout ) + "ms)" )
2049+ : null
2050+ ) ;
2051+ }
20342052 } , res . timeout ) ;
20352053 }
20362054 }
@@ -2209,7 +2227,8 @@ function resolveSlots (
22092227 // named slots should only be respected if the vnode was rendered in the
22102228 // same context.
22112229 if ( ( child . context === context || child . functionalContext === context ) &&
2212- child . data && child . data . slot != null ) {
2230+ child . data && child . data . slot != null
2231+ ) {
22132232 var name = child . data . slot ;
22142233 var slot = ( slots [ name ] || ( slots [ name ] = [ ] ) ) ;
22152234 if ( child . tag === 'template' ) {
@@ -2233,11 +2252,16 @@ function isWhitespace (node) {
22332252}
22342253
22352254function resolveScopedSlots (
2236- fns
2255+ fns , // see flow/vnode
2256+ res
22372257) {
2238- var res = { } ;
2258+ res = res || { } ;
22392259 for ( var i = 0 ; i < fns . length ; i ++ ) {
2240- res [ fns [ i ] [ 0 ] ] = fns [ i ] [ 1 ] ;
2260+ if ( Array . isArray ( fns [ i ] ) ) {
2261+ resolveScopedSlots ( fns [ i ] , res ) ;
2262+ } else {
2263+ res [ fns [ i ] . key ] = fns [ i ] . fn ;
2264+ }
22412265 }
22422266 return res
22432267}
@@ -2555,7 +2579,7 @@ var index = 0;
25552579 * Reset the scheduler's state.
25562580 */
25572581function resetSchedulerState ( ) {
2558- queue . length = activatedChildren . length = 0 ;
2582+ index = queue . length = activatedChildren . length = 0 ;
25592583 has = { } ;
25602584 if ( process . env . NODE_ENV !== 'production' ) {
25612585 circular = { } ;
@@ -2665,10 +2689,10 @@ function queueWatcher (watcher) {
26652689 // if already flushing, splice the watcher based on its id
26662690 // if already past its id, it will be run next immediately.
26672691 var i = queue . length - 1 ;
2668- while ( i >= 0 && queue [ i ] . id > watcher . id ) {
2692+ while ( i > index && queue [ i ] . id > watcher . id ) {
26692693 i -- ;
26702694 }
2671- queue . splice ( Math . max ( i , index ) + 1 , 0 , watcher ) ;
2695+ queue . splice ( i + 1 , 0 , watcher ) ;
26722696 }
26732697 // queue the flush
26742698 if ( ! waiting ) {
@@ -3571,7 +3595,8 @@ function _createElement (
35713595 }
35723596 // support single function children as default scoped slot
35733597 if ( Array . isArray ( children ) &&
3574- typeof children [ 0 ] === 'function' ) {
3598+ typeof children [ 0 ] === 'function'
3599+ ) {
35753600 data = data || { } ;
35763601 data . scopedSlots = { default : children [ 0 ] } ;
35773602 children . length = 0 ;
@@ -3659,6 +3684,9 @@ function renderList (
36593684 ret [ i ] = render ( val [ key ] , key , i ) ;
36603685 }
36613686 }
3687+ if ( isDef ( ret ) ) {
3688+ ( ret ) . _isVList = true ;
3689+ }
36623690 return ret
36633691}
36643692
@@ -4058,7 +4086,8 @@ function dedupe (latest, extended, sealed) {
40584086
40594087function Vue$3 ( options ) {
40604088 if ( process . env . NODE_ENV !== 'production' &&
4061- ! ( this instanceof Vue$3 ) ) {
4089+ ! ( this instanceof Vue$3 )
4090+ ) {
40624091 warn ( 'Vue is a constructor and should be called with the `new` keyword' ) ;
40634092 }
40644093 this . _init ( options ) ;
@@ -4076,7 +4105,7 @@ function initUse (Vue) {
40764105 Vue . use = function ( plugin ) {
40774106 /* istanbul ignore if */
40784107 if ( plugin . installed ) {
4079- return
4108+ return this
40804109 }
40814110 // additional parameters
40824111 var args = toArray ( arguments , 1 ) ;
@@ -4096,6 +4125,7 @@ function initUse (Vue) {
40964125function initMixin$1 ( Vue ) {
40974126 Vue . mixin = function ( mixin ) {
40984127 this . options = mergeOptions ( this . options , mixin ) ;
4128+ return this
40994129 } ;
41004130}
41014131
@@ -4389,11 +4419,12 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
43894419
43904420Object . defineProperty ( Vue$3 . prototype , '$ssrContext' , {
43914421 get : function get ( ) {
4422+ /* istanbul ignore next */
43924423 return this . $vnode . ssrContext
43934424 }
43944425} ) ;
43954426
4396- Vue$3 . version = '2.3.2 ' ;
4427+ Vue$3 . version = '2.3.3 ' ;
43974428
43984429/* */
43994430
@@ -4974,8 +5005,9 @@ function createPatchFunction (backend) {
49745005 }
49755006 // for slot content they should also get the scopeId from the host instance.
49765007 if ( isDef ( i = activeInstance ) &&
4977- i !== vnode . context &&
4978- isDef ( i = i . $options . _scopeId ) ) {
5008+ i !== vnode . context &&
5009+ isDef ( i = i . $options . _scopeId )
5010+ ) {
49795011 nodeOps . setAttribute ( vnode . elm , i , '' ) ;
49805012 }
49815013 }
@@ -5127,9 +5159,10 @@ function createPatchFunction (backend) {
51275159 // if the new node is not cloned it means the render functions have been
51285160 // reset by the hot-reload-api and we need to do a proper re-render.
51295161 if ( isTrue ( vnode . isStatic ) &&
5130- isTrue ( oldVnode . isStatic ) &&
5131- vnode . key === oldVnode . key &&
5132- ( isTrue ( vnode . isCloned ) || isTrue ( vnode . isOnce ) ) ) {
5162+ isTrue ( oldVnode . isStatic ) &&
5163+ vnode . key === oldVnode . key &&
5164+ ( isTrue ( vnode . isCloned ) || isTrue ( vnode . isOnce ) )
5165+ ) {
51335166 vnode . elm = oldVnode . elm ;
51345167 vnode . componentInstance = oldVnode . componentInstance ;
51355168 return
@@ -5220,8 +5253,9 @@ function createPatchFunction (backend) {
52205253 // longer than the virtual children list.
52215254 if ( ! childrenMatch || childNode ) {
52225255 if ( process . env . NODE_ENV !== 'production' &&
5223- typeof console !== 'undefined' &&
5224- ! bailed ) {
5256+ typeof console !== 'undefined' &&
5257+ ! bailed
5258+ ) {
52255259 bailed = true ;
52265260 console . warn ( 'Parent: ' , elm ) ;
52275261 console . warn ( 'Mismatching childNodes vs. VNodes: ' , elm . childNodes , children ) ;
@@ -5897,7 +5931,8 @@ function updateStyle (oldVnode, vnode) {
58975931 var oldData = oldVnode . data ;
58985932
58995933 if ( isUndef ( data . staticStyle ) && isUndef ( data . style ) &&
5900- isUndef ( oldData . staticStyle ) && isUndef ( oldData . style ) ) {
5934+ isUndef ( oldData . staticStyle ) && isUndef ( oldData . style )
5935+ ) {
59015936 return
59025937 }
59035938
@@ -6035,12 +6070,14 @@ var animationEndEvent = 'animationend';
60356070if ( hasTransition ) {
60366071 /* istanbul ignore if */
60376072 if ( window . ontransitionend === undefined &&
6038- window . onwebkittransitionend !== undefined ) {
6073+ window . onwebkittransitionend !== undefined
6074+ ) {
60396075 transitionProp = 'WebkitTransition' ;
60406076 transitionEndEvent = 'webkitTransitionEnd' ;
60416077 }
60426078 if ( window . onanimationend === undefined &&
6043- window . onwebkitanimationend !== undefined ) {
6079+ window . onwebkitanimationend !== undefined
6080+ ) {
60446081 animationProp = 'WebkitAnimation' ;
60456082 animationEndEvent = 'webkitAnimationEnd' ;
60466083 }
@@ -6280,8 +6317,9 @@ function enter (vnode, toggleDisplay) {
62806317 var parent = el . parentNode ;
62816318 var pendingNode = parent && parent . _pending && parent . _pending [ vnode . key ] ;
62826319 if ( pendingNode &&
6283- pendingNode . tag === vnode . tag &&
6284- pendingNode . elm . _leaveCb ) {
6320+ pendingNode . tag === vnode . tag &&
6321+ pendingNode . elm . _leaveCb
6322+ ) {
62856323 pendingNode . elm . _leaveCb ( ) ;
62866324 }
62876325 enterHook && enterHook ( el , cb ) ;
@@ -6614,6 +6652,8 @@ function onCompositionStart (e) {
66146652}
66156653
66166654function onCompositionEnd ( e ) {
6655+ // prevent triggering an input event for no reason
6656+ if ( ! e . target . composing ) { return }
66176657 e . target . composing = false ;
66186658 trigger ( e . target , 'input' ) ;
66196659}
@@ -6796,7 +6836,8 @@ var Transition = {
67966836
67976837 // warn invalid mode
67986838 if ( process . env . NODE_ENV !== 'production' &&
6799- mode && mode !== 'in-out' && mode !== 'out-in' ) {
6839+ mode && mode !== 'in-out' && mode !== 'out-in'
6840+ ) {
68006841 warn (
68016842 'invalid <transition> mode: ' + mode ,
68026843 this . $parent
@@ -7080,8 +7121,9 @@ setTimeout(function () {
70807121 }
70817122 }
70827123 if ( process . env . NODE_ENV !== 'production' &&
7083- config . productionTip !== false &&
7084- inBrowser && typeof console !== 'undefined' ) {
7124+ config . productionTip !== false &&
7125+ inBrowser && typeof console !== 'undefined'
7126+ ) {
70857127 console [ console . info ? 'info' : 'log' ] (
70867128 "You are running Vue in development mode.\n" +
70877129 "Make sure to turn on production mode when deploying for production.\n" +
0 commit comments