diff --git a/laravel_server/public/js/vueapp.js b/laravel_server/public/js/vueapp.js index 39d7fbe..2c6cc72 100644 --- a/laravel_server/public/js/vueapp.js +++ b/laravel_server/public/js/vueapp.js @@ -1374,8 +1374,7 @@ module.exports = Cancel; /* 12 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(13); -module.exports = __webpack_require__(85); +module.exports = __webpack_require__(13); /***/ }), @@ -1409,14 +1408,12 @@ Vue.use(__WEBPACK_IMPORTED_MODULE_1_vue_socket_io___default.a, 'http://192.168.1 var user = Vue.component('user', __webpack_require__(43)); var login = Vue.component('login', __webpack_require__(59)); -// const logout = Vue.component('logout', require('./components/logout.vue')); -var register = Vue.component('register', __webpack_require__(62)); -var singleplayer_game = Vue.component('singlegame', __webpack_require__(65)); -var multiplayerGame = Vue.component('multiplayergame', __webpack_require__(70)); +var logout = Vue.component('logout', __webpack_require__(62)); +var register = Vue.component('register', __webpack_require__(65)); +var singleplayer_game = Vue.component('singlegame', __webpack_require__(68)); +var multiplayerGame = Vue.component('multiplayergame', __webpack_require__(73)); -var routes = [{ path: '/', redirect: '/users' }, { path: '/users', component: user }, { path: '/login', component: login }, -// { path: '/logout', component: logout }, -{ path: '/register', component: register }, { path: '/singletictactoe', component: singleplayer_game }, { path: '/multitictactoe', component: multiplayerGame }]; +var routes = [{ path: '/', redirect: '/users' }, { path: '/users', component: user }, { path: '/login', component: login }, { path: '/logout', component: logout }, { path: '/register', component: register }, { path: '/singletictactoe', component: singleplayer_game }, { path: '/multitictactoe', component: multiplayerGame }]; var router = new __WEBPACK_IMPORTED_MODULE_0_vue_router__["a" /* default */]({ routes: routes @@ -18557,9 +18554,9 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. - !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return _; - }.call(exports, __webpack_require__, exports, module), + }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // Check for `exports` after `define` in case a build optimizer adds it. @@ -28822,9 +28819,9 @@ jQuery.nodeName = nodeName; // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon if ( true ) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { return jQuery; - }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } @@ -32128,7 +32125,7 @@ module.exports = function spread(callback) { "use strict"; /* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*! - * Vue.js v2.5.2 + * Vue.js v2.5.13 * (c) 2014-2017 Evan You * Released under the MIT License. */ @@ -32136,6 +32133,8 @@ module.exports = function spread(callback) { /* */ +var emptyObject = Object.freeze({}); + // these helpers produces better vm code in JS engines due to their // explicitness and function inlining function isUndef (v) { @@ -32161,6 +32160,8 @@ function isPrimitive (value) { return ( typeof value === 'string' || typeof value === 'number' || + // $flow-disable-line + typeof value === 'symbol' || typeof value === 'boolean' ) } @@ -32469,6 +32470,7 @@ var config = ({ /** * Option merge strategies (used in core/util/options) */ + // $flow-disable-line optionMergeStrategies: Object.create(null), /** @@ -32509,6 +32511,7 @@ var config = ({ /** * Custom user key aliases for v-on */ + // $flow-disable-line keyCodes: Object.create(null), /** @@ -32553,8 +32556,6 @@ var config = ({ /* */ -var emptyObject = Object.freeze({}); - /** * Check if a string starts with $ or _ */ @@ -32595,17 +32596,20 @@ function parsePath (path) { /* */ + // can we use __proto__? var hasProto = '__proto__' in {}; // Browser environment sniffing var inBrowser = typeof window !== 'undefined'; +var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; +var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); var UA = inBrowser && window.navigator.userAgent.toLowerCase(); var isIE = UA && /msie|trident/.test(UA); var isIE9 = UA && UA.indexOf('msie 9.0') > 0; var isEdge = UA && UA.indexOf('edge/') > 0; -var isAndroid = UA && UA.indexOf('android') > 0; -var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA); +var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); +var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; // Firefox has a "watch" function on Object.prototype... @@ -32843,9 +32847,9 @@ var VNode = function VNode ( this.elm = elm; this.ns = undefined; this.context = context; - this.functionalContext = undefined; - this.functionalOptions = undefined; - this.functionalScopeId = undefined; + this.fnContext = undefined; + this.fnOptions = undefined; + this.fnScopeId = undefined; this.key = data && data.key; this.componentOptions = componentOptions; this.componentInstance = undefined; @@ -32889,6 +32893,7 @@ function createTextVNode (val) { // multiple renders, cloning them avoids errors when DOM manipulations rely // on their elm reference. function cloneVNode (vnode, deep) { + var componentOptions = vnode.componentOptions; var cloned = new VNode( vnode.tag, vnode.data, @@ -32896,16 +32901,24 @@ function cloneVNode (vnode, deep) { vnode.text, vnode.elm, vnode.context, - vnode.componentOptions, + componentOptions, vnode.asyncFactory ); cloned.ns = vnode.ns; cloned.isStatic = vnode.isStatic; cloned.key = vnode.key; cloned.isComment = vnode.isComment; + cloned.fnContext = vnode.fnContext; + cloned.fnOptions = vnode.fnOptions; + cloned.fnScopeId = vnode.fnScopeId; cloned.isCloned = true; - if (deep && vnode.children) { - cloned.children = cloneVNodes(vnode.children); + if (deep) { + if (vnode.children) { + cloned.children = cloneVNodes(vnode.children, true); + } + if (componentOptions && componentOptions.children) { + componentOptions.children = cloneVNodes(componentOptions.children, true); + } } return cloned } @@ -32933,8 +32946,7 @@ var arrayMethods = Object.create(arrayProto);[ 'splice', 'sort', 'reverse' -] -.forEach(function (method) { +].forEach(function (method) { // cache original method var original = arrayProto[method]; def(arrayMethods, method, function mutator () { @@ -33138,7 +33150,7 @@ function set (target, key, val) { target.splice(key, 1, val); return val } - if (hasOwn(target, key)) { + if (key in target && !(key in Object.prototype)) { target[key] = val; return val } @@ -33266,18 +33278,18 @@ function mergeDataOrFn ( // it has to be a function to pass previous merges. return function mergedDataFn () { return mergeData( - typeof childVal === 'function' ? childVal.call(this) : childVal, - typeof parentVal === 'function' ? parentVal.call(this) : parentVal + typeof childVal === 'function' ? childVal.call(this, this) : childVal, + typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal ) } - } else if (parentVal || childVal) { + } else { return function mergedInstanceDataFn () { // instance merge var instanceData = typeof childVal === 'function' - ? childVal.call(vm) + ? childVal.call(vm, vm) : childVal; var defaultData = typeof parentVal === 'function' - ? parentVal.call(vm) + ? parentVal.call(vm, vm) : parentVal; if (instanceData) { return mergeData(instanceData, defaultData) @@ -33304,7 +33316,7 @@ strats.data = function ( return parentVal } - return mergeDataOrFn.call(this, parentVal, childVal) + return mergeDataOrFn(parentVal, childVal) } return mergeDataOrFn(parentVal, childVal, vm) @@ -33429,13 +33441,23 @@ var defaultStrat = function (parentVal, childVal) { */ function checkComponents (options) { for (var key in options.components) { - var lower = key.toLowerCase(); - if (isBuiltInTag(lower) || config.isReservedTag(lower)) { - warn( - 'Do not use built-in or reserved HTML elements as component ' + - 'id: ' + key - ); - } + validateComponentName(key); + } +} + +function validateComponentName (name) { + if (!/^[a-zA-Z][\w-]*$/.test(name)) { + warn( + 'Invalid component name: "' + name + '". Component names ' + + 'can only contain alphanumeric characters and the hyphen, ' + + 'and must start with a letter.' + ); + } + if (isBuiltInTag(name) || config.isReservedTag(name)) { + warn( + 'Do not use built-in or reserved HTML elements as component ' + + 'id: ' + name + ); } } @@ -33482,6 +33504,7 @@ function normalizeProps (options, vm) { */ function normalizeInject (options, vm) { var inject = options.inject; + if (!inject) { return } var normalized = options.inject = {}; if (Array.isArray(inject)) { for (var i = 0; i < inject.length; i++) { @@ -33494,7 +33517,7 @@ function normalizeInject (options, vm) { ? extend({ from: key }, val) : { from: val }; } - } else if ("development" !== 'production' && inject) { + } else if (true) { warn( "Invalid value for option \"inject\": expected an Array or an Object, " + "but got " + (toRawType(inject)) + ".", @@ -33636,7 +33659,9 @@ function validateProp ( observe(value); observerState.shouldConvert = prevShouldConvert; } - if (true) { + if ( + true + ) { assertProp(prop, key, value, vm, absent); } return value @@ -33814,7 +33839,7 @@ function logError (err, vm, info) { warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); } /* istanbul ignore else */ - if (inBrowser && typeof console !== 'undefined') { + if ((inBrowser || inWeex) && typeof console !== 'undefined') { console.error(err); } else { throw err @@ -34038,6 +34063,43 @@ if (true) { /* */ +var seenObjects = new _Set(); + +/** + * Recursively traverse an object to evoke all converted + * getters, so that every nested property inside the object + * is collected as a "deep" dependency. + */ +function traverse (val) { + _traverse(val, seenObjects); + seenObjects.clear(); +} + +function _traverse (val, seen) { + var i, keys; + var isA = Array.isArray(val); + if ((!isA && !isObject(val)) || Object.isFrozen(val)) { + return + } + if (val.__ob__) { + var depId = val.__ob__.dep.id; + if (seen.has(depId)) { + return + } + seen.add(depId); + } + if (isA) { + i = val.length; + while (i--) { _traverse(val[i], seen); } + } else { + keys = Object.keys(val); + i = keys.length; + while (i--) { _traverse(val[keys[i]], seen); } + } +} + +/* */ + var normalizeEvent = cached(function (name) { var passive = name.charAt(0) === '&'; name = passive ? name.slice(1) : name; @@ -34079,11 +34141,12 @@ function updateListeners ( remove$$1, vm ) { - var name, cur, old, event; + var name, def, cur, old, event; for (name in on) { - cur = on[name]; + def = cur = on[name]; old = oldOn[name]; event = normalizeEvent(name); + /* istanbul ignore if */ if (isUndef(cur)) { "development" !== 'production' && warn( "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), @@ -34093,7 +34156,7 @@ function updateListeners ( if (isUndef(cur.fns)) { cur = on[name] = createFnInvoker(cur); } - add(event.name, cur, event.once, event.capture, event.passive); + add(event.name, cur, event.once, event.capture, event.passive, event.params); } else if (cur !== old) { old.fns = cur; on[name] = old; @@ -34110,6 +34173,9 @@ function updateListeners ( /* */ function mergeVNodeHook (def, hookKey, hook) { + if (def instanceof VNode) { + def = def.data.hook || (def.data.hook = {}); + } var invoker; var oldHook = def[hookKey]; @@ -34477,6 +34543,7 @@ function updateComponentListeners ( ) { target = vm; updateListeners(listeners, oldListeners || {}, add, remove$1, vm); + target = undefined; } function eventsMixin (Vue) { @@ -34532,7 +34599,7 @@ function eventsMixin (Vue) { if (!cbs) { return vm } - if (arguments.length === 1) { + if (!fn) { vm._events[event] = null; return vm } @@ -34583,6 +34650,8 @@ function eventsMixin (Vue) { /* */ + + /** * Runtime helper for resolving raw children VNodes into a slot object. */ @@ -34594,7 +34663,6 @@ function resolveSlots ( if (!children) { return slots } - var defaultSlot = []; for (var i = 0, l = children.length; i < l; i++) { var child = children[i]; var data = child.data; @@ -34604,29 +34672,31 @@ function resolveSlots ( } // named slots should only be respected if the vnode was rendered in the // same context. - if ((child.context === context || child.functionalContext === context) && + if ((child.context === context || child.fnContext === context) && data && data.slot != null ) { - var name = child.data.slot; + var name = data.slot; var slot = (slots[name] || (slots[name] = [])); if (child.tag === 'template') { - slot.push.apply(slot, child.children); + slot.push.apply(slot, child.children || []); } else { slot.push(child); } } else { - defaultSlot.push(child); + (slots.default || (slots.default = [])).push(child); } } - // ignore whitespace - if (!defaultSlot.every(isWhitespace)) { - slots.default = defaultSlot; + // ignore slots that contains only whitespace + for (var name$1 in slots) { + if (slots[name$1].every(isWhitespace)) { + delete slots[name$1]; + } } return slots } function isWhitespace (node) { - return node.isComment || node.text === ' ' + return (node.isComment && !node.asyncFactory) || node.text === ' ' } function resolveScopedSlots ( @@ -34822,7 +34892,10 @@ function mountComponent ( }; } - vm._watcher = new Watcher(vm, updateComponent, noop); + // we set this to vm._watcher inside the watcher's constructor + // since the watcher's initial patch may call $forceUpdate (e.g. inside child + // component's mounted hook), which relies on vm._watcher being already defined + new Watcher(vm, updateComponent, noop, null, true /* isRenderWatcher */); hydrating = false; // manually mounted instance, call mounted on self @@ -35109,9 +35182,13 @@ var Watcher = function Watcher ( vm, expOrFn, cb, - options + options, + isRenderWatcher ) { this.vm = vm; + if (isRenderWatcher) { + vm._watcher = this; + } vm._watchers.push(this); // options if (options) { @@ -35305,40 +35382,6 @@ Watcher.prototype.teardown = function teardown () { } }; -/** - * Recursively traverse an object to evoke all converted - * getters, so that every nested property inside the object - * is collected as a "deep" dependency. - */ -var seenObjects = new _Set(); -function traverse (val) { - seenObjects.clear(); - _traverse(val, seenObjects); -} - -function _traverse (val, seen) { - var i, keys; - var isA = Array.isArray(val); - if ((!isA && !isObject(val)) || !Object.isExtensible(val)) { - return - } - if (val.__ob__) { - var depId = val.__ob__.dep.id; - if (seen.has(depId)) { - return - } - seen.add(depId); - } - if (isA) { - i = val.length; - while (i--) { _traverse(val[i], seen); } - } else { - keys = Object.keys(val); - i = keys.length; - while (i--) { _traverse(val[keys[i]], seen); } - } -} - /* */ var sharedPropertyDefinition = { @@ -35476,6 +35519,7 @@ function getData (data, vm) { var computedWatcherOptions = { lazy: true }; function initComputed (vm, computed) { + // $flow-disable-line var watchers = vm._computedWatchers = Object.create(null); // computed properties are just getters during SSR var isSSR = isServerRendering(); @@ -35706,11 +35750,11 @@ function resolveInject (inject, vm) { // inject is :any because flow is not smart enough to figure out cached var result = Object.create(null); var keys = hasSymbol - ? Reflect.ownKeys(inject).filter(function (key) { - /* istanbul ignore next */ - return Object.getOwnPropertyDescriptor(inject, key).enumerable - }) - : Object.keys(inject); + ? Reflect.ownKeys(inject).filter(function (key) { + /* istanbul ignore next */ + return Object.getOwnPropertyDescriptor(inject, key).enumerable + }) + : Object.keys(inject); for (var i = 0; i < keys.length; i++) { var key = keys[i]; @@ -35784,6 +35828,7 @@ function renderSlot ( bindObject ) { var scopedSlotFn = this.$scopedSlots[name]; + var nodes; if (scopedSlotFn) { // scoped slot props = props || {}; if (bindObject) { @@ -35795,19 +35840,28 @@ function renderSlot ( } props = extend(extend({}, bindObject), props); } - return scopedSlotFn(props) || fallback + nodes = scopedSlotFn(props) || fallback; } else { var slotNodes = this.$slots[name]; // warn duplicate slot usage - if (slotNodes && "development" !== 'production') { - slotNodes._rendered && warn( - "Duplicate presence of slot \"" + name + "\" found in the same render tree " + - "- this will likely cause render errors.", - this - ); + if (slotNodes) { + if ("development" !== 'production' && slotNodes._rendered) { + warn( + "Duplicate presence of slot \"" + name + "\" found in the same render tree " + + "- this will likely cause render errors.", + this + ); + } slotNodes._rendered = true; } - return slotNodes || fallback + nodes = slotNodes || fallback; + } + + var target = props && props.slot; + if (target) { + return this.$createElement('template', { slot: target }, nodes) + } else { + return nodes } } @@ -35908,10 +35962,7 @@ function renderStatic ( index, isInFor ) { - // static trees can be rendered once and cached on the contructor options - // so every instance shares the same cached trees - var renderFns = this.$options.staticRenderFns; - var cached = renderFns.cached || (renderFns.cached = []); + var cached = this._staticTrees || (this._staticTrees = []); var tree = cached[index]; // if has already-rendered static tree and not inside v-for, // we can reuse the same tree by doing a shallow clone. @@ -35921,7 +35972,11 @@ function renderStatic ( : cloneVNode(tree) } // otherwise, render a fresh tree. - tree = cached[index] = renderFns[index].call(this._renderProxy, null, this); + tree = cached[index] = this.$options.staticRenderFns[index].call( + this._renderProxy, + null, + this // for render fns generated for functional component templates + ); markStatic(tree, ("__static__" + index), false); return tree } @@ -36039,8 +36094,8 @@ function FunctionalRenderContext ( this._c = function (a, b, c, d) { var vnode = createElement(contextVm, a, b, c, d, needNormalization); if (vnode) { - vnode.functionalScopeId = options._scopeId; - vnode.functionalContext = parent; + vnode.fnScopeId = options._scopeId; + vnode.fnContext = parent; } return vnode }; @@ -36081,8 +36136,8 @@ function createFunctionalComponent ( var vnode = options.render.call(null, renderContext._c, renderContext); if (vnode instanceof VNode) { - vnode.functionalContext = contextVm; - vnode.functionalOptions = options; + vnode.fnContext = contextVm; + vnode.fnOptions = options; if (data.slot) { (vnode.data || (vnode.data = {})).slot = data.slot; } @@ -36099,6 +36154,25 @@ function mergeProps (to, from) { /* */ + + + +// Register the component hook to weex native render engine. +// The hook will be triggered by native, not javascript. + + +// Updates the state of the component to weex native render engine. + +/* */ + +// https://github.com/Hanks10100/weex-native-directive/tree/master/component + +// listening on native callback + +/* */ + +/* */ + // hooks to be invoked on component VNodes during patch var componentVNodeHooks = { init: function init ( @@ -36264,6 +36338,11 @@ function createComponent ( { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory ); + + // Weex specific: invoke recycle-list optimized @render function for + // extracting cell-slot template. + // https://github.com/Hanks10100/weex-native-directive/tree/master/component + /* istanbul ignore if */ return vnode } @@ -36273,15 +36352,10 @@ function createComponentInstanceForVnode ( parentElm, refElm ) { - var vnodeComponentOptions = vnode.componentOptions; var options = { _isComponent: true, parent: parent, - propsData: vnodeComponentOptions.propsData, - _componentTag: vnodeComponentOptions.tag, _parentVnode: vnode, - _parentListeners: vnodeComponentOptions.listeners, - _renderChildren: vnodeComponentOptions.children, _parentElm: parentElm || null, _refElm: refElm || null }; @@ -36291,7 +36365,7 @@ function createComponentInstanceForVnode ( options.render = inlineTemplate.render; options.staticRenderFns = inlineTemplate.staticRenderFns; } - return new vnodeComponentOptions.Ctor(options) + return new vnode.componentOptions.Ctor(options) } function mergeHooks (data) { @@ -36379,11 +36453,13 @@ function _createElement ( if ("development" !== 'production' && isDef(data) && isDef(data.key) && !isPrimitive(data.key) ) { - warn( - 'Avoid using non-primitive value as key, ' + - 'use string/number value instead.', - context - ); + { + warn( + 'Avoid using non-primitive value as key, ' + + 'use string/number value instead.', + context + ); + } } // support single function children as default scoped slot if (Array.isArray(children) && @@ -36453,6 +36529,7 @@ function applyNS (vnode, ns, force) { function initRender (vm) { vm._vnode = null; // the root of the child tree + vm._staticTrees = null; // v-once cached trees var options = vm.$options; var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree var renderContext = parentVnode && parentVnode.context; @@ -36504,7 +36581,9 @@ function renderMixin (Vue) { // last render. They need to be cloned to ensure "freshness" for this render. for (var key in vm.$slots) { var slot = vm.$slots[key]; - if (slot._rendered) { + // _rendered is a flag added by renderSlot, but may not be present + // if the slot is passed from manually written render functions + if (slot._rendered || (slot[0] && slot[0].elm)) { vm.$slots[key] = cloneVNodes(slot, true /* deep */); } } @@ -36622,14 +36701,18 @@ function initMixin (Vue) { function initInternalComponent (vm, options) { var opts = vm.$options = Object.create(vm.constructor.options); // doing this because it's faster than dynamic enumeration. + var parentVnode = options._parentVnode; opts.parent = options.parent; - opts.propsData = options.propsData; - opts._parentVnode = options._parentVnode; - opts._parentListeners = options._parentListeners; - opts._renderChildren = options._renderChildren; - opts._componentTag = options._componentTag; + opts._parentVnode = parentVnode; opts._parentElm = options._parentElm; opts._refElm = options._refElm; + + var vnodeComponentOptions = parentVnode.componentOptions; + opts.propsData = vnodeComponentOptions.propsData; + opts._parentListeners = vnodeComponentOptions.listeners; + opts._renderChildren = vnodeComponentOptions.children; + opts._componentTag = vnodeComponentOptions.tag; + if (options.render) { opts.render = options.render; opts.staticRenderFns = options.staticRenderFns; @@ -36763,14 +36846,8 @@ function initExtend (Vue) { } var name = extendOptions.name || Super.options.name; - if (true) { - if (!/^[a-zA-Z][\w-]*$/.test(name)) { - warn( - 'Invalid component name: "' + name + '". Component names ' + - 'can only contain alphanumeric characters and the hyphen, ' + - 'and must start with a letter.' - ); - } + if ("development" !== 'production' && name) { + validateComponentName(name); } var Sub = function VueComponent (options) { @@ -36852,13 +36929,8 @@ function initAssetRegisters (Vue) { return this.options[type + 's'][id] } else { /* istanbul ignore if */ - if (true) { - if (type === 'component' && config.isReservedTag(id)) { - warn( - 'Do not use built-in or reserved HTML elements as component ' + - 'id: ' + id - ); - } + if ("development" !== 'production' && type === 'component') { + validateComponentName(id); } if (type === 'component' && isPlainObject(definition)) { definition.name = definition.name || id; @@ -36914,7 +36986,7 @@ function pruneCacheEntry ( current ) { var cached$$1 = cache[key]; - if (cached$$1 && cached$$1 !== current) { + if (cached$$1 && (!current || cached$$1.tag !== current.tag)) { cached$$1.componentInstance.$destroy(); } cache[key] = null; @@ -36956,21 +37028,27 @@ var KeepAlive = { }, render: function render () { - var vnode = getFirstComponentChild(this.$slots.default); + var slot = this.$slots.default; + var vnode = getFirstComponentChild(slot); var componentOptions = vnode && vnode.componentOptions; if (componentOptions) { // check pattern var name = getComponentName(componentOptions); - if (name && ( - (this.include && !matches(this.include, name)) || - (this.exclude && matches(this.exclude, name)) - )) { + var ref = this; + var include = ref.include; + var exclude = ref.exclude; + if ( + // not included + (include && (!name || !matches(include, name))) || + // excluded + (exclude && name && matches(exclude, name)) + ) { return vnode } - var ref = this; - var cache = ref.cache; - var keys = ref.keys; + var ref$1 = this; + var cache = ref$1.cache; + var keys = ref$1.keys; var key = vnode.key == null // same constructor may get registered as different local components // so cid alone is not enough (#3269) @@ -36992,7 +37070,7 @@ var KeepAlive = { vnode.data.keepAlive = true; } - return vnode + return vnode || (slot && slot[0]) } }; @@ -37059,7 +37137,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', { } }); -Vue$3.version = '2.5.2'; +Vue$3.version = '2.5.13'; /* */ @@ -37111,12 +37189,12 @@ function genClassForVnode (vnode) { var childNode = vnode; while (isDef(childNode.componentInstance)) { childNode = childNode.componentInstance._vnode; - if (childNode.data) { + if (childNode && childNode.data) { data = mergeClassData(childNode.data, data); } } while (isDef(parentNode = parentNode.parent)) { - if (parentNode.data) { + if (parentNode && parentNode.data) { data = mergeClassData(data, parentNode.data); } } @@ -37486,7 +37564,23 @@ function createPatchFunction (backend) { } } - var inPre = 0; + function isUnknownElement$$1 (vnode, inVPre) { + return ( + !inVPre && + !vnode.ns && + !( + config.ignoredElements.length && + config.ignoredElements.some(function (ignore) { + return isRegExp(ignore) + ? ignore.test(vnode.tag) + : ignore === vnode.tag + }) + ) && + config.isUnknownElement(vnode.tag) + ) + } + + var creatingElmInVPre = 0; function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) { vnode.isRootInsert = !nested; // for transition enter check if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) { @@ -37499,21 +37593,9 @@ function createPatchFunction (backend) { if (isDef(tag)) { if (true) { if (data && data.pre) { - inPre++; + creatingElmInVPre++; } - if ( - !inPre && - !vnode.ns && - !( - config.ignoredElements.length && - config.ignoredElements.some(function (ignore) { - return isRegExp(ignore) - ? ignore.test(tag) - : ignore === tag - }) - ) && - config.isUnknownElement(tag) - ) { + if (isUnknownElement$$1(vnode, creatingElmInVPre)) { warn( 'Unknown custom element: <' + tag + '> - did you ' + 'register the component correctly? For recursive components, ' + @@ -37537,7 +37619,7 @@ function createPatchFunction (backend) { } if ("development" !== 'production' && data && data.pre) { - inPre--; + creatingElmInVPre--; } } else if (isTrue(vnode.isComment)) { vnode.elm = nodeOps.createComment(vnode.text); @@ -37623,11 +37705,14 @@ function createPatchFunction (backend) { function createChildren (vnode, children, insertedVnodeQueue) { if (Array.isArray(children)) { + if (true) { + checkDuplicateKeys(children); + } for (var i = 0; i < children.length; ++i) { createElm(children[i], insertedVnodeQueue, vnode.elm, null, true); } } else if (isPrimitive(vnode.text)) { - nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text)); + nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text))); } } @@ -37654,7 +37739,7 @@ function createPatchFunction (backend) { // of going through the normal attribute patching process. function setScope (vnode) { var i; - if (isDef(i = vnode.functionalScopeId)) { + if (isDef(i = vnode.fnScopeId)) { nodeOps.setAttribute(vnode.elm, i, ''); } else { var ancestor = vnode; @@ -37668,7 +37753,7 @@ function createPatchFunction (backend) { // for slot content they should also get the scopeId from the host instance. if (isDef(i = activeInstance) && i !== vnode.context && - i !== vnode.functionalContext && + i !== vnode.fnContext && isDef(i = i.$options._scopeId) ) { nodeOps.setAttribute(vnode.elm, i, ''); @@ -37754,6 +37839,10 @@ function createPatchFunction (backend) { // during leaving transitions var canMove = !removeOnly; + if (true) { + checkDuplicateKeys(newCh); + } + while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { if (isUndef(oldStartVnode)) { oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left @@ -37786,13 +37875,6 @@ function createPatchFunction (backend) { createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm); } else { vnodeToMove = oldCh[idxInOld]; - /* istanbul ignore if */ - if ("development" !== 'production' && !vnodeToMove) { - warn( - 'It seems there are duplicate keys that is causing an update error. ' + - 'Make sure each v-for item has a unique key.' - ); - } if (sameVnode(vnodeToMove, newStartVnode)) { patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue); oldCh[idxInOld] = undefined; @@ -37813,6 +37895,24 @@ function createPatchFunction (backend) { } } + function checkDuplicateKeys (children) { + var seenKeys = {}; + for (var i = 0; i < children.length; i++) { + var vnode = children[i]; + var key = vnode.key; + if (isDef(key)) { + if (seenKeys[key]) { + warn( + ("Duplicate keys detected: '" + key + "'. This may cause an update error."), + vnode.context + ); + } else { + seenKeys[key] = true; + } + } + } + } + function findIdxInOld (node, oldCh, start, end) { for (var i = start; i < end; i++) { var c = oldCh[i]; @@ -37892,27 +37992,32 @@ function createPatchFunction (backend) { } } - var bailed = false; + var hydrationBailed = false; // list of modules that can skip create hook during hydration because they // are already rendered on the client or has no need for initialization - var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key'); + // Note: style is excluded because it relies on initial clone for future + // deep updates (#7063). + var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key'); // Note: this is a browser-only function so we can assume elms are DOM nodes. - function hydrate (elm, vnode, insertedVnodeQueue) { - if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) { - vnode.elm = elm; - vnode.isAsyncPlaceholder = true; - return true - } - if (true) { - if (!assertNodeMatch(elm, vnode)) { - return false - } - } - vnode.elm = elm; + function hydrate (elm, vnode, insertedVnodeQueue, inVPre) { + var i; var tag = vnode.tag; var data = vnode.data; var children = vnode.children; + inVPre = inVPre || (data && data.pre); + vnode.elm = elm; + + if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) { + vnode.isAsyncPlaceholder = true; + return true + } + // assert node match + if (true) { + if (!assertNodeMatch(elm, vnode, inVPre)) { + return false + } + } if (isDef(data)) { if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); } if (isDef(i = vnode.componentInstance)) { @@ -37933,9 +38038,9 @@ function createPatchFunction (backend) { /* istanbul ignore if */ if ("development" !== 'production' && typeof console !== 'undefined' && - !bailed + !hydrationBailed ) { - bailed = true; + hydrationBailed = true; console.warn('Parent: ', elm); console.warn('server innerHTML: ', i); console.warn('client innerHTML: ', elm.innerHTML); @@ -37947,7 +38052,7 @@ function createPatchFunction (backend) { var childrenMatch = true; var childNode = elm.firstChild; for (var i$1 = 0; i$1 < children.length; i$1++) { - if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) { + if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) { childrenMatch = false; break } @@ -37959,9 +38064,9 @@ function createPatchFunction (backend) { /* istanbul ignore if */ if ("development" !== 'production' && typeof console !== 'undefined' && - !bailed + !hydrationBailed ) { - bailed = true; + hydrationBailed = true; console.warn('Parent: ', elm); console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children); } @@ -37971,12 +38076,18 @@ function createPatchFunction (backend) { } } if (isDef(data)) { + var fullInvoke = false; for (var key in data) { if (!isRenderedModule(key)) { + fullInvoke = true; invokeCreateHooks(vnode, insertedVnodeQueue); break } } + if (!fullInvoke && data['class']) { + // ensure collecting deps for deep class bindings for future updates + traverse(data['class']); + } } } else if (elm.data !== vnode.text) { elm.data = vnode.text; @@ -37984,10 +38095,10 @@ function createPatchFunction (backend) { return true } - function assertNodeMatch (node, vnode) { + function assertNodeMatch (node, vnode, inVPre) { if (isDef(vnode.tag)) { - return ( - vnode.tag.indexOf('vue-component') === 0 || + return vnode.tag.indexOf('vue-component') === 0 || ( + !isUnknownElement$$1(vnode, inVPre) && vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase()) ) } else { @@ -38040,9 +38151,12 @@ function createPatchFunction (backend) { // create an empty node and replace it oldVnode = emptyNodeAt(oldVnode); } + // replacing existing element var oldElm = oldVnode.elm; var parentElm$1 = nodeOps.parentNode(oldElm); + + // create new node createElm( vnode, insertedVnodeQueue, @@ -38053,9 +38167,8 @@ function createPatchFunction (backend) { nodeOps.nextSibling(oldElm) ); + // update parent placeholder node element, recursively if (isDef(vnode.parent)) { - // component root element replaced. - // update parent placeholder node element, recursively var ancestor = vnode.parent; var patchable = isPatchable(vnode); while (ancestor) { @@ -38084,6 +38197,7 @@ function createPatchFunction (backend) { } } + // destroy old node if (isDef(parentElm$1)) { removeVnodes(parentElm$1, [oldVnode], 0, 0); } else if (isDef(oldVnode.tag)) { @@ -38149,14 +38263,14 @@ function _update (oldVnode, vnode) { } }; if (isCreate) { - mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert); + mergeVNodeHook(vnode, 'insert', callInsert); } else { callInsert(); } } if (dirsWithPostpatch.length) { - mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () { + mergeVNodeHook(vnode, 'postpatch', function () { for (var i = 0; i < dirsWithPostpatch.length; i++) { callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode); } @@ -38181,17 +38295,20 @@ function normalizeDirectives$1 ( ) { var res = Object.create(null); if (!dirs) { + // $flow-disable-line return res } var i, dir; for (i = 0; i < dirs.length; i++) { dir = dirs[i]; if (!dir.modifiers) { + // $flow-disable-line dir.modifiers = emptyModifiers; } res[getRawDirName(dir)] = dir; dir.def = resolveAsset(vm.$options, 'directives', dir.name, true); } + // $flow-disable-line return res } @@ -38244,7 +38361,7 @@ function updateAttrs (oldVnode, vnode) { // #4391: in IE9, setting type can reset value for input[type=radio] // #6666: IE/Edge forces progress value down to 1 before setting a max /* istanbul ignore if */ - if ((isIE9 || isEdge) && attrs.value !== oldAttrs.value) { + if ((isIE || isEdge) && attrs.value !== oldAttrs.value) { setAttr(elm, 'value', attrs.value); } for (key in oldAttrs) { @@ -38284,6 +38401,23 @@ function setAttr (el, key, value) { if (isFalsyAttrValue(value)) { el.removeAttribute(key); } else { + // #7138: IE10 & 11 fires input event when setting placeholder on + //