mirror of
https://gitee.com/vuejs/vue.git
synced 2024-11-29 18:47:39 +08:00
fix "he" dep thanks @sodatea
This commit is contained in:
parent
e643e44daf
commit
180474dc17
1217
dist/vue.common.dev.js
vendored
1217
dist/vue.common.dev.js
vendored
File diff suppressed because it is too large
Load Diff
2
dist/vue.common.prod.js
vendored
2
dist/vue.common.prod.js
vendored
File diff suppressed because one or more lines are too long
1217
dist/vue.esm.browser.js
vendored
1217
dist/vue.esm.browser.js
vendored
File diff suppressed because it is too large
Load Diff
2
dist/vue.esm.browser.min.js
vendored
2
dist/vue.esm.browser.min.js
vendored
File diff suppressed because one or more lines are too long
1220
dist/vue.esm.js
vendored
1220
dist/vue.esm.js
vendored
File diff suppressed because it is too large
Load Diff
1217
dist/vue.js
vendored
1217
dist/vue.js
vendored
File diff suppressed because it is too large
Load Diff
2
dist/vue.min.js
vendored
2
dist/vue.min.js
vendored
File diff suppressed because one or more lines are too long
778
dist/vue.runtime.common.dev.js
vendored
778
dist/vue.runtime.common.dev.js
vendored
@ -6343,6 +6343,624 @@ var style = {
|
||||
update: updateStyle,
|
||||
};
|
||||
|
||||
var whitespaceRE$1 = /\s+/;
|
||||
/**
|
||||
* Add class with compatibility for SVG since classList is not supported on
|
||||
* SVG elements in IE
|
||||
*/
|
||||
function addClass$1(el, cls) {
|
||||
/* istanbul ignore if */
|
||||
if (!cls || !(cls = cls.trim())) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (el.classList) {
|
||||
if (cls.indexOf(' ') > -1) {
|
||||
cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });
|
||||
}
|
||||
else {
|
||||
el.classList.add(cls);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var cur = " " + (el.getAttribute('class') || '') + " ";
|
||||
if (cur.indexOf(' ' + cls + ' ') < 0) {
|
||||
el.setAttribute('class', (cur + cls).trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Remove class with compatibility for SVG since classList is not supported on
|
||||
* SVG elements in IE
|
||||
*/
|
||||
function removeClass$1(el, cls) {
|
||||
/* istanbul ignore if */
|
||||
if (!cls || !(cls = cls.trim())) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (el.classList) {
|
||||
if (cls.indexOf(' ') > -1) {
|
||||
cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });
|
||||
}
|
||||
else {
|
||||
el.classList.remove(cls);
|
||||
}
|
||||
if (!el.classList.length) {
|
||||
el.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
else {
|
||||
var cur = " " + (el.getAttribute('class') || '') + " ";
|
||||
var tar = ' ' + cls + ' ';
|
||||
while (cur.indexOf(tar) >= 0) {
|
||||
cur = cur.replace(tar, ' ');
|
||||
}
|
||||
cur = cur.trim();
|
||||
if (cur) {
|
||||
el.setAttribute('class', cur);
|
||||
}
|
||||
else {
|
||||
el.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function resolveTransition$1(def) {
|
||||
if (!def) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (typeof def === 'object') {
|
||||
var res = {};
|
||||
if (def.css !== false) {
|
||||
extend(res, autoCssTransition$1(def.name || 'v'));
|
||||
}
|
||||
extend(res, def);
|
||||
return res;
|
||||
}
|
||||
else if (typeof def === 'string') {
|
||||
return autoCssTransition$1(def);
|
||||
}
|
||||
}
|
||||
var autoCssTransition$1 = cached(function (name) {
|
||||
return {
|
||||
enterClass: name + "-enter",
|
||||
enterToClass: name + "-enter-to",
|
||||
enterActiveClass: name + "-enter-active",
|
||||
leaveClass: name + "-leave",
|
||||
leaveToClass: name + "-leave-to",
|
||||
leaveActiveClass: name + "-leave-active",
|
||||
};
|
||||
});
|
||||
var hasTransition$1 = inBrowser && !isIE9;
|
||||
var TRANSITION$1 = 'transition';
|
||||
var ANIMATION$1 = 'animation';
|
||||
// Transition property/event sniffing
|
||||
var transitionProp$1 = 'transition';
|
||||
var transitionEndEvent$1 = 'transitionend';
|
||||
var animationProp$1 = 'animation';
|
||||
var animationEndEvent$1 = 'animationend';
|
||||
if (hasTransition$1) {
|
||||
/* istanbul ignore if */
|
||||
if (window.ontransitionend === undefined &&
|
||||
// @ts-expect-error
|
||||
window.onwebkittransitionend !== undefined) {
|
||||
transitionProp$1 = 'WebkitTransition';
|
||||
transitionEndEvent$1 = 'webkitTransitionEnd';
|
||||
}
|
||||
if (window.onanimationend === undefined &&
|
||||
// @ts-expect-error
|
||||
window.onwebkitanimationend !== undefined) {
|
||||
animationProp$1 = 'WebkitAnimation';
|
||||
animationEndEvent$1 = 'webkitAnimationEnd';
|
||||
}
|
||||
}
|
||||
// binding to window is necessary to make hot reload work in IE in strict mode
|
||||
var raf$1 = inBrowser
|
||||
? window.requestAnimationFrame
|
||||
? window.requestAnimationFrame.bind(window)
|
||||
: setTimeout
|
||||
: /* istanbul ignore next */ function (fn) { return fn(); };
|
||||
function nextFrame$1(fn) {
|
||||
raf$1(function () {
|
||||
// @ts-expect-error
|
||||
raf$1(fn);
|
||||
});
|
||||
}
|
||||
function addTransitionClass$1(el, cls) {
|
||||
var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
|
||||
if (transitionClasses.indexOf(cls) < 0) {
|
||||
transitionClasses.push(cls);
|
||||
addClass$1(el, cls);
|
||||
}
|
||||
}
|
||||
function removeTransitionClass$1(el, cls) {
|
||||
if (el._transitionClasses) {
|
||||
remove$2(el._transitionClasses, cls);
|
||||
}
|
||||
removeClass$1(el, cls);
|
||||
}
|
||||
function whenTransitionEnds$1(el, expectedType, cb) {
|
||||
var _a = getTransitionInfo$1(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;
|
||||
if (!type)
|
||||
{ return cb(); }
|
||||
var event = type === TRANSITION$1 ? transitionEndEvent$1 : animationEndEvent$1;
|
||||
var ended = 0;
|
||||
var end = function () {
|
||||
el.removeEventListener(event, onEnd);
|
||||
cb();
|
||||
};
|
||||
var onEnd = function (e) {
|
||||
if (e.target === el) {
|
||||
if (++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
}
|
||||
};
|
||||
setTimeout(function () {
|
||||
if (ended < propCount) {
|
||||
end();
|
||||
}
|
||||
}, timeout + 1);
|
||||
el.addEventListener(event, onEnd);
|
||||
}
|
||||
var transformRE$1 = /\b(transform|all)(,|$)/;
|
||||
function getTransitionInfo$1(el, expectedType) {
|
||||
var styles = window.getComputedStyle(el);
|
||||
// JSDOM may return undefined for transition properties
|
||||
var transitionDelays = (styles[transitionProp$1 + 'Delay'] || '').split(', ');
|
||||
var transitionDurations = (styles[transitionProp$1 + 'Duration'] || '').split(', ');
|
||||
var transitionTimeout = getTimeout$1(transitionDelays, transitionDurations);
|
||||
var animationDelays = (styles[animationProp$1 + 'Delay'] || '').split(', ');
|
||||
var animationDurations = (styles[animationProp$1 + 'Duration'] || '').split(', ');
|
||||
var animationTimeout = getTimeout$1(animationDelays, animationDurations);
|
||||
var type;
|
||||
var timeout = 0;
|
||||
var propCount = 0;
|
||||
/* istanbul ignore if */
|
||||
if (expectedType === TRANSITION$1) {
|
||||
if (transitionTimeout > 0) {
|
||||
type = TRANSITION$1;
|
||||
timeout = transitionTimeout;
|
||||
propCount = transitionDurations.length;
|
||||
}
|
||||
}
|
||||
else if (expectedType === ANIMATION$1) {
|
||||
if (animationTimeout > 0) {
|
||||
type = ANIMATION$1;
|
||||
timeout = animationTimeout;
|
||||
propCount = animationDurations.length;
|
||||
}
|
||||
}
|
||||
else {
|
||||
timeout = Math.max(transitionTimeout, animationTimeout);
|
||||
type =
|
||||
timeout > 0
|
||||
? transitionTimeout > animationTimeout
|
||||
? TRANSITION$1
|
||||
: ANIMATION$1
|
||||
: null;
|
||||
propCount = type
|
||||
? type === TRANSITION$1
|
||||
? transitionDurations.length
|
||||
: animationDurations.length
|
||||
: 0;
|
||||
}
|
||||
var hasTransform = type === TRANSITION$1 && transformRE$1.test(styles[transitionProp$1 + 'Property']);
|
||||
return {
|
||||
type: type,
|
||||
timeout: timeout,
|
||||
propCount: propCount,
|
||||
hasTransform: hasTransform,
|
||||
};
|
||||
}
|
||||
function getTimeout$1(delays, durations) {
|
||||
/* istanbul ignore next */
|
||||
while (delays.length < durations.length) {
|
||||
delays = delays.concat(delays);
|
||||
}
|
||||
return Math.max.apply(null, durations.map(function (d, i) {
|
||||
return toMs$1(d) + toMs$1(delays[i]);
|
||||
}));
|
||||
}
|
||||
// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
|
||||
// in a locale-dependent way, using a comma instead of a dot.
|
||||
// If comma is not replaced with a dot, the input will be rounded down (i.e. acting
|
||||
// as a floor function) causing unexpected behaviors
|
||||
function toMs$1(s) {
|
||||
return Number(s.slice(0, -1).replace(',', '.')) * 1000;
|
||||
}
|
||||
|
||||
function enter$1(vnode, toggleDisplay) {
|
||||
var el = vnode.elm;
|
||||
// call leave callback now
|
||||
if (isDef(el._leaveCb)) {
|
||||
el._leaveCb.cancelled = true;
|
||||
el._leaveCb();
|
||||
}
|
||||
var data = resolveTransition$1(vnode.data.transition);
|
||||
if (isUndef(data)) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore if */
|
||||
if (isDef(el._enterCb) || el.nodeType !== 1) {
|
||||
return;
|
||||
}
|
||||
var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;
|
||||
// activeInstance will always be the <transition> component managing this
|
||||
// transition. One edge case to check is when the <transition> is placed
|
||||
// as the root node of a child component. In that case we need to check
|
||||
// <transition>'s parent for appear check.
|
||||
var context = activeInstance;
|
||||
var transitionNode = activeInstance.$vnode;
|
||||
while (transitionNode && transitionNode.parent) {
|
||||
context = transitionNode.context;
|
||||
transitionNode = transitionNode.parent;
|
||||
}
|
||||
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
||||
if (isAppear && !appear && appear !== '') {
|
||||
return;
|
||||
}
|
||||
var startClass = isAppear && appearClass ? appearClass : enterClass;
|
||||
var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;
|
||||
var toClass = isAppear && appearToClass ? appearToClass : enterToClass;
|
||||
var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;
|
||||
var enterHook = isAppear
|
||||
? typeof appear === 'function'
|
||||
? appear
|
||||
: enter
|
||||
: enter;
|
||||
var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;
|
||||
var enterCancelledHook = isAppear
|
||||
? appearCancelled || enterCancelled
|
||||
: enterCancelled;
|
||||
var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);
|
||||
if (explicitEnterDuration != null) {
|
||||
checkDuration$1(explicitEnterDuration, 'enter', vnode);
|
||||
}
|
||||
var expectsCSS = css !== false && !isIE9;
|
||||
var userWantsControl = getHookArgumentsLength$1(enterHook);
|
||||
var cb = (el._enterCb = once(function () {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, toClass);
|
||||
removeTransitionClass$1(el, activeClass);
|
||||
}
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, startClass);
|
||||
}
|
||||
enterCancelledHook && enterCancelledHook(el);
|
||||
}
|
||||
else {
|
||||
afterEnterHook && afterEnterHook(el);
|
||||
}
|
||||
el._enterCb = null;
|
||||
}));
|
||||
if (!vnode.data.show) {
|
||||
// remove pending leave element on enter by injecting an insert hook
|
||||
mergeVNodeHook(vnode, 'insert', function () {
|
||||
var parent = el.parentNode;
|
||||
var pendingNode = parent && parent._pending && parent._pending[vnode.key];
|
||||
if (pendingNode &&
|
||||
pendingNode.tag === vnode.tag &&
|
||||
pendingNode.elm._leaveCb) {
|
||||
pendingNode.elm._leaveCb();
|
||||
}
|
||||
enterHook && enterHook(el, cb);
|
||||
});
|
||||
}
|
||||
// start enter transition
|
||||
beforeEnterHook && beforeEnterHook(el);
|
||||
if (expectsCSS) {
|
||||
addTransitionClass$1(el, startClass);
|
||||
addTransitionClass$1(el, activeClass);
|
||||
nextFrame$1(function () {
|
||||
removeTransitionClass$1(el, startClass);
|
||||
// @ts-expect-error
|
||||
if (!cb.cancelled) {
|
||||
addTransitionClass$1(el, toClass);
|
||||
if (!userWantsControl) {
|
||||
if (isValidDuration$1(explicitEnterDuration)) {
|
||||
setTimeout(cb, explicitEnterDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds$1(el, type, cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (vnode.data.show) {
|
||||
toggleDisplay && toggleDisplay();
|
||||
enterHook && enterHook(el, cb);
|
||||
}
|
||||
if (!expectsCSS && !userWantsControl) {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
function leave$1(vnode, rm) {
|
||||
var el = vnode.elm;
|
||||
// call enter callback now
|
||||
if (isDef(el._enterCb)) {
|
||||
el._enterCb.cancelled = true;
|
||||
el._enterCb();
|
||||
}
|
||||
var data = resolveTransition$1(vnode.data.transition);
|
||||
if (isUndef(data) || el.nodeType !== 1) {
|
||||
return rm();
|
||||
}
|
||||
/* istanbul ignore if */
|
||||
if (isDef(el._leaveCb)) {
|
||||
return;
|
||||
}
|
||||
var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;
|
||||
var expectsCSS = css !== false && !isIE9;
|
||||
var userWantsControl = getHookArgumentsLength$1(leave);
|
||||
var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);
|
||||
if (isDef(explicitLeaveDuration)) {
|
||||
checkDuration$1(explicitLeaveDuration, 'leave', vnode);
|
||||
}
|
||||
var cb = (el._leaveCb = once(function () {
|
||||
if (el.parentNode && el.parentNode._pending) {
|
||||
el.parentNode._pending[vnode.key] = null;
|
||||
}
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, leaveToClass);
|
||||
removeTransitionClass$1(el, leaveActiveClass);
|
||||
}
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, leaveClass);
|
||||
}
|
||||
leaveCancelled && leaveCancelled(el);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
afterLeave && afterLeave(el);
|
||||
}
|
||||
el._leaveCb = null;
|
||||
}));
|
||||
if (delayLeave) {
|
||||
delayLeave(performLeave);
|
||||
}
|
||||
else {
|
||||
performLeave();
|
||||
}
|
||||
function performLeave() {
|
||||
// the delayed leave may have already been cancelled
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
return;
|
||||
}
|
||||
// record leaving element
|
||||
if (!vnode.data.show && el.parentNode) {
|
||||
(el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;
|
||||
}
|
||||
beforeLeave && beforeLeave(el);
|
||||
if (expectsCSS) {
|
||||
addTransitionClass$1(el, leaveClass);
|
||||
addTransitionClass$1(el, leaveActiveClass);
|
||||
nextFrame$1(function () {
|
||||
removeTransitionClass$1(el, leaveClass);
|
||||
// @ts-expect-error
|
||||
if (!cb.cancelled) {
|
||||
addTransitionClass$1(el, leaveToClass);
|
||||
if (!userWantsControl) {
|
||||
if (isValidDuration$1(explicitLeaveDuration)) {
|
||||
setTimeout(cb, explicitLeaveDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds$1(el, type, cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
leave && leave(el, cb);
|
||||
if (!expectsCSS && !userWantsControl) {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
}
|
||||
// only used in dev mode
|
||||
function checkDuration$1(val, name, vnode) {
|
||||
if (typeof val !== 'number') {
|
||||
warn("<transition> explicit " + name + " duration is not a valid number - " +
|
||||
("got " + JSON.stringify(val) + "."), vnode.context);
|
||||
}
|
||||
else if (isNaN(val)) {
|
||||
warn("<transition> explicit " + name + " duration is NaN - " +
|
||||
'the duration expression might be incorrect.', vnode.context);
|
||||
}
|
||||
}
|
||||
function isValidDuration$1(val) {
|
||||
return typeof val === 'number' && !isNaN(val);
|
||||
}
|
||||
/**
|
||||
* Normalize a transition hook's argument length. The hook may be:
|
||||
* - a merged hook (invoker) with the original in .fns
|
||||
* - a wrapped component method (check ._length)
|
||||
* - a plain function (.length)
|
||||
*/
|
||||
function getHookArgumentsLength$1(fn) {
|
||||
if (isUndef(fn)) {
|
||||
return false;
|
||||
}
|
||||
// @ts-expect-error
|
||||
var invokerFns = fn.fns;
|
||||
if (isDef(invokerFns)) {
|
||||
// invoker
|
||||
return getHookArgumentsLength$1(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);
|
||||
}
|
||||
else {
|
||||
// @ts-expect-error
|
||||
return (fn._length || fn.length) > 1;
|
||||
}
|
||||
}
|
||||
function _enter(_, vnode) {
|
||||
if (vnode.data.show !== true) {
|
||||
enter$1(vnode);
|
||||
}
|
||||
}
|
||||
var transition = inBrowser
|
||||
? {
|
||||
create: _enter,
|
||||
activate: _enter,
|
||||
remove: function (vnode, rm) {
|
||||
/* istanbul ignore else */
|
||||
if (vnode.data.show !== true) {
|
||||
// @ts-expect-error
|
||||
leave$1(vnode, rm);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
}
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
var platformModules = [attrs, klass, events, domProps, style, transition];
|
||||
|
||||
// the directive module should be applied last, after all
|
||||
// built-in modules have been applied.
|
||||
var modules = platformModules.concat(baseModules);
|
||||
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
||||
|
||||
/**
|
||||
* Not type checking this file because flow doesn't like attaching
|
||||
* properties to Elements.
|
||||
*/
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
||||
document.addEventListener('selectionchange', function () {
|
||||
var el = document.activeElement;
|
||||
// @ts-expect-error
|
||||
if (el && el.vmodel) {
|
||||
trigger(el, 'input');
|
||||
}
|
||||
});
|
||||
}
|
||||
var directive = {
|
||||
inserted: function (el, binding, vnode, oldVnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
// #6903
|
||||
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
||||
mergeVNodeHook(vnode, 'postpatch', function () {
|
||||
directive.componentUpdated(el, binding, vnode);
|
||||
});
|
||||
}
|
||||
else {
|
||||
setSelected(el, binding, vnode.context);
|
||||
}
|
||||
el._vOptions = [].map.call(el.options, getValue);
|
||||
}
|
||||
else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
|
||||
el._vModifiers = binding.modifiers;
|
||||
if (!binding.modifiers.lazy) {
|
||||
el.addEventListener('compositionstart', onCompositionStart);
|
||||
el.addEventListener('compositionend', onCompositionEnd);
|
||||
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
||||
// switching focus before confirming composition choice
|
||||
// this also fixes the issue where some browsers e.g. iOS Chrome
|
||||
// fires "change" instead of "input" on autocomplete.
|
||||
el.addEventListener('change', onCompositionEnd);
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
el.vmodel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
componentUpdated: function (el, binding, vnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
setSelected(el, binding, vnode.context);
|
||||
// in case the options rendered by v-for have changed,
|
||||
// it's possible that the value is out-of-sync with the rendered options.
|
||||
// detect such cases and filter out values that no longer has a matching
|
||||
// option in the DOM.
|
||||
var prevOptions_1 = el._vOptions;
|
||||
var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
|
||||
if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
|
||||
// trigger change event if
|
||||
// no matching option found for at least one value
|
||||
var needReset = el.multiple
|
||||
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
|
||||
: binding.value !== binding.oldValue &&
|
||||
hasNoMatchingOption(binding.value, curOptions_1);
|
||||
if (needReset) {
|
||||
trigger(el, 'change');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
function setSelected(el, binding, vm) {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
/* istanbul ignore if */
|
||||
if (isIE || isEdge) {
|
||||
setTimeout(function () {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
function actuallySetSelected(el, binding, vm) {
|
||||
var value = binding.value;
|
||||
var isMultiple = el.multiple;
|
||||
if (isMultiple && !Array.isArray(value)) {
|
||||
warn("<select multiple v-model=\"" + binding.expression + "\"> " +
|
||||
("expects an Array value for its binding, but got " + Object.prototype.toString
|
||||
.call(value)
|
||||
.slice(8, -1)), vm);
|
||||
return;
|
||||
}
|
||||
var selected, option;
|
||||
for (var i = 0, l = el.options.length; i < l; i++) {
|
||||
option = el.options[i];
|
||||
if (isMultiple) {
|
||||
selected = looseIndexOf(value, getValue(option)) > -1;
|
||||
if (option.selected !== selected) {
|
||||
option.selected = selected;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (looseEqual(getValue(option), value)) {
|
||||
if (el.selectedIndex !== i) {
|
||||
el.selectedIndex = i;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMultiple) {
|
||||
el.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
function hasNoMatchingOption(value, options) {
|
||||
return options.every(function (o) { return !looseEqual(o, value); });
|
||||
}
|
||||
function getValue(option) {
|
||||
return '_value' in option ? option._value : option.value;
|
||||
}
|
||||
function onCompositionStart(e) {
|
||||
e.target.composing = true;
|
||||
}
|
||||
function onCompositionEnd(e) {
|
||||
// prevent triggering an input event for no reason
|
||||
if (!e.target.composing)
|
||||
{ return; }
|
||||
e.target.composing = false;
|
||||
trigger(e.target, 'input');
|
||||
}
|
||||
function trigger(el, type) {
|
||||
var e = document.createEvent('HTMLEvents');
|
||||
e.initEvent(type, true, true);
|
||||
el.dispatchEvent(e);
|
||||
}
|
||||
|
||||
var whitespaceRE = /\s+/;
|
||||
/**
|
||||
* Add class with compatibility for SVG since classList is not supported on
|
||||
@ -6800,166 +7418,6 @@ function getHookArgumentsLength(fn) {
|
||||
return (fn._length || fn.length) > 1;
|
||||
}
|
||||
}
|
||||
function _enter(_, vnode) {
|
||||
if (vnode.data.show !== true) {
|
||||
enter(vnode);
|
||||
}
|
||||
}
|
||||
var transition = inBrowser
|
||||
? {
|
||||
create: _enter,
|
||||
activate: _enter,
|
||||
remove: function (vnode, rm) {
|
||||
/* istanbul ignore else */
|
||||
if (vnode.data.show !== true) {
|
||||
// @ts-expect-error
|
||||
leave(vnode, rm);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
}
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
var platformModules = [attrs, klass, events, domProps, style, transition];
|
||||
|
||||
// the directive module should be applied last, after all
|
||||
// built-in modules have been applied.
|
||||
var modules = platformModules.concat(baseModules);
|
||||
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
||||
|
||||
/**
|
||||
* Not type checking this file because flow doesn't like attaching
|
||||
* properties to Elements.
|
||||
*/
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
||||
document.addEventListener('selectionchange', function () {
|
||||
var el = document.activeElement;
|
||||
// @ts-expect-error
|
||||
if (el && el.vmodel) {
|
||||
trigger(el, 'input');
|
||||
}
|
||||
});
|
||||
}
|
||||
var directive = {
|
||||
inserted: function (el, binding, vnode, oldVnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
// #6903
|
||||
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
||||
mergeVNodeHook(vnode, 'postpatch', function () {
|
||||
directive.componentUpdated(el, binding, vnode);
|
||||
});
|
||||
}
|
||||
else {
|
||||
setSelected(el, binding, vnode.context);
|
||||
}
|
||||
el._vOptions = [].map.call(el.options, getValue);
|
||||
}
|
||||
else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
|
||||
el._vModifiers = binding.modifiers;
|
||||
if (!binding.modifiers.lazy) {
|
||||
el.addEventListener('compositionstart', onCompositionStart);
|
||||
el.addEventListener('compositionend', onCompositionEnd);
|
||||
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
||||
// switching focus before confirming composition choice
|
||||
// this also fixes the issue where some browsers e.g. iOS Chrome
|
||||
// fires "change" instead of "input" on autocomplete.
|
||||
el.addEventListener('change', onCompositionEnd);
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
el.vmodel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
componentUpdated: function (el, binding, vnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
setSelected(el, binding, vnode.context);
|
||||
// in case the options rendered by v-for have changed,
|
||||
// it's possible that the value is out-of-sync with the rendered options.
|
||||
// detect such cases and filter out values that no longer has a matching
|
||||
// option in the DOM.
|
||||
var prevOptions_1 = el._vOptions;
|
||||
var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
|
||||
if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
|
||||
// trigger change event if
|
||||
// no matching option found for at least one value
|
||||
var needReset = el.multiple
|
||||
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
|
||||
: binding.value !== binding.oldValue &&
|
||||
hasNoMatchingOption(binding.value, curOptions_1);
|
||||
if (needReset) {
|
||||
trigger(el, 'change');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
function setSelected(el, binding, vm) {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
/* istanbul ignore if */
|
||||
if (isIE || isEdge) {
|
||||
setTimeout(function () {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
function actuallySetSelected(el, binding, vm) {
|
||||
var value = binding.value;
|
||||
var isMultiple = el.multiple;
|
||||
if (isMultiple && !Array.isArray(value)) {
|
||||
warn("<select multiple v-model=\"" + binding.expression + "\"> " +
|
||||
("expects an Array value for its binding, but got " + Object.prototype.toString
|
||||
.call(value)
|
||||
.slice(8, -1)), vm);
|
||||
return;
|
||||
}
|
||||
var selected, option;
|
||||
for (var i = 0, l = el.options.length; i < l; i++) {
|
||||
option = el.options[i];
|
||||
if (isMultiple) {
|
||||
selected = looseIndexOf(value, getValue(option)) > -1;
|
||||
if (option.selected !== selected) {
|
||||
option.selected = selected;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (looseEqual(getValue(option), value)) {
|
||||
if (el.selectedIndex !== i) {
|
||||
el.selectedIndex = i;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMultiple) {
|
||||
el.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
function hasNoMatchingOption(value, options) {
|
||||
return options.every(function (o) { return !looseEqual(o, value); });
|
||||
}
|
||||
function getValue(option) {
|
||||
return '_value' in option ? option._value : option.value;
|
||||
}
|
||||
function onCompositionStart(e) {
|
||||
e.target.composing = true;
|
||||
}
|
||||
function onCompositionEnd(e) {
|
||||
// prevent triggering an input event for no reason
|
||||
if (!e.target.composing)
|
||||
{ return; }
|
||||
e.target.composing = false;
|
||||
trigger(e.target, 'input');
|
||||
}
|
||||
function trigger(el, type) {
|
||||
var e = document.createEvent('HTMLEvents');
|
||||
e.initEvent(type, true, true);
|
||||
el.dispatchEvent(e);
|
||||
}
|
||||
|
||||
// recursively search for possible transition defined inside the component root
|
||||
function locateNode(vnode) {
|
||||
|
2
dist/vue.runtime.common.prod.js
vendored
2
dist/vue.runtime.common.prod.js
vendored
File diff suppressed because one or more lines are too long
780
dist/vue.runtime.esm.js
vendored
780
dist/vue.runtime.esm.js
vendored
@ -6377,6 +6377,625 @@ var style = {
|
||||
update: updateStyle,
|
||||
};
|
||||
|
||||
var whitespaceRE$1 = /\s+/;
|
||||
/**
|
||||
* Add class with compatibility for SVG since classList is not supported on
|
||||
* SVG elements in IE
|
||||
*/
|
||||
function addClass$1(el, cls) {
|
||||
/* istanbul ignore if */
|
||||
if (!cls || !(cls = cls.trim())) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (el.classList) {
|
||||
if (cls.indexOf(' ') > -1) {
|
||||
cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });
|
||||
}
|
||||
else {
|
||||
el.classList.add(cls);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var cur = " " + (el.getAttribute('class') || '') + " ";
|
||||
if (cur.indexOf(' ' + cls + ' ') < 0) {
|
||||
el.setAttribute('class', (cur + cls).trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Remove class with compatibility for SVG since classList is not supported on
|
||||
* SVG elements in IE
|
||||
*/
|
||||
function removeClass$1(el, cls) {
|
||||
/* istanbul ignore if */
|
||||
if (!cls || !(cls = cls.trim())) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (el.classList) {
|
||||
if (cls.indexOf(' ') > -1) {
|
||||
cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });
|
||||
}
|
||||
else {
|
||||
el.classList.remove(cls);
|
||||
}
|
||||
if (!el.classList.length) {
|
||||
el.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
else {
|
||||
var cur = " " + (el.getAttribute('class') || '') + " ";
|
||||
var tar = ' ' + cls + ' ';
|
||||
while (cur.indexOf(tar) >= 0) {
|
||||
cur = cur.replace(tar, ' ');
|
||||
}
|
||||
cur = cur.trim();
|
||||
if (cur) {
|
||||
el.setAttribute('class', cur);
|
||||
}
|
||||
else {
|
||||
el.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function resolveTransition$1(def) {
|
||||
if (!def) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (typeof def === 'object') {
|
||||
var res = {};
|
||||
if (def.css !== false) {
|
||||
extend(res, autoCssTransition$1(def.name || 'v'));
|
||||
}
|
||||
extend(res, def);
|
||||
return res;
|
||||
}
|
||||
else if (typeof def === 'string') {
|
||||
return autoCssTransition$1(def);
|
||||
}
|
||||
}
|
||||
var autoCssTransition$1 = cached(function (name) {
|
||||
return {
|
||||
enterClass: name + "-enter",
|
||||
enterToClass: name + "-enter-to",
|
||||
enterActiveClass: name + "-enter-active",
|
||||
leaveClass: name + "-leave",
|
||||
leaveToClass: name + "-leave-to",
|
||||
leaveActiveClass: name + "-leave-active",
|
||||
};
|
||||
});
|
||||
var hasTransition$1 = inBrowser && !isIE9;
|
||||
var TRANSITION$1 = 'transition';
|
||||
var ANIMATION$1 = 'animation';
|
||||
// Transition property/event sniffing
|
||||
var transitionProp$1 = 'transition';
|
||||
var transitionEndEvent$1 = 'transitionend';
|
||||
var animationProp$1 = 'animation';
|
||||
var animationEndEvent$1 = 'animationend';
|
||||
if (hasTransition$1) {
|
||||
/* istanbul ignore if */
|
||||
if (window.ontransitionend === undefined &&
|
||||
// @ts-expect-error
|
||||
window.onwebkittransitionend !== undefined) {
|
||||
transitionProp$1 = 'WebkitTransition';
|
||||
transitionEndEvent$1 = 'webkitTransitionEnd';
|
||||
}
|
||||
if (window.onanimationend === undefined &&
|
||||
// @ts-expect-error
|
||||
window.onwebkitanimationend !== undefined) {
|
||||
animationProp$1 = 'WebkitAnimation';
|
||||
animationEndEvent$1 = 'webkitAnimationEnd';
|
||||
}
|
||||
}
|
||||
// binding to window is necessary to make hot reload work in IE in strict mode
|
||||
var raf$1 = inBrowser
|
||||
? window.requestAnimationFrame
|
||||
? window.requestAnimationFrame.bind(window)
|
||||
: setTimeout
|
||||
: /* istanbul ignore next */ function (fn) { return fn(); };
|
||||
function nextFrame$1(fn) {
|
||||
raf$1(function () {
|
||||
// @ts-expect-error
|
||||
raf$1(fn);
|
||||
});
|
||||
}
|
||||
function addTransitionClass$1(el, cls) {
|
||||
var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
|
||||
if (transitionClasses.indexOf(cls) < 0) {
|
||||
transitionClasses.push(cls);
|
||||
addClass$1(el, cls);
|
||||
}
|
||||
}
|
||||
function removeTransitionClass$1(el, cls) {
|
||||
if (el._transitionClasses) {
|
||||
remove$2(el._transitionClasses, cls);
|
||||
}
|
||||
removeClass$1(el, cls);
|
||||
}
|
||||
function whenTransitionEnds$1(el, expectedType, cb) {
|
||||
var _a = getTransitionInfo$1(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;
|
||||
if (!type)
|
||||
{ return cb(); }
|
||||
var event = type === TRANSITION$1 ? transitionEndEvent$1 : animationEndEvent$1;
|
||||
var ended = 0;
|
||||
var end = function () {
|
||||
el.removeEventListener(event, onEnd);
|
||||
cb();
|
||||
};
|
||||
var onEnd = function (e) {
|
||||
if (e.target === el) {
|
||||
if (++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
}
|
||||
};
|
||||
setTimeout(function () {
|
||||
if (ended < propCount) {
|
||||
end();
|
||||
}
|
||||
}, timeout + 1);
|
||||
el.addEventListener(event, onEnd);
|
||||
}
|
||||
var transformRE$1 = /\b(transform|all)(,|$)/;
|
||||
function getTransitionInfo$1(el, expectedType) {
|
||||
var styles = window.getComputedStyle(el);
|
||||
// JSDOM may return undefined for transition properties
|
||||
var transitionDelays = (styles[transitionProp$1 + 'Delay'] || '').split(', ');
|
||||
var transitionDurations = (styles[transitionProp$1 + 'Duration'] || '').split(', ');
|
||||
var transitionTimeout = getTimeout$1(transitionDelays, transitionDurations);
|
||||
var animationDelays = (styles[animationProp$1 + 'Delay'] || '').split(', ');
|
||||
var animationDurations = (styles[animationProp$1 + 'Duration'] || '').split(', ');
|
||||
var animationTimeout = getTimeout$1(animationDelays, animationDurations);
|
||||
var type;
|
||||
var timeout = 0;
|
||||
var propCount = 0;
|
||||
/* istanbul ignore if */
|
||||
if (expectedType === TRANSITION$1) {
|
||||
if (transitionTimeout > 0) {
|
||||
type = TRANSITION$1;
|
||||
timeout = transitionTimeout;
|
||||
propCount = transitionDurations.length;
|
||||
}
|
||||
}
|
||||
else if (expectedType === ANIMATION$1) {
|
||||
if (animationTimeout > 0) {
|
||||
type = ANIMATION$1;
|
||||
timeout = animationTimeout;
|
||||
propCount = animationDurations.length;
|
||||
}
|
||||
}
|
||||
else {
|
||||
timeout = Math.max(transitionTimeout, animationTimeout);
|
||||
type =
|
||||
timeout > 0
|
||||
? transitionTimeout > animationTimeout
|
||||
? TRANSITION$1
|
||||
: ANIMATION$1
|
||||
: null;
|
||||
propCount = type
|
||||
? type === TRANSITION$1
|
||||
? transitionDurations.length
|
||||
: animationDurations.length
|
||||
: 0;
|
||||
}
|
||||
var hasTransform = type === TRANSITION$1 && transformRE$1.test(styles[transitionProp$1 + 'Property']);
|
||||
return {
|
||||
type: type,
|
||||
timeout: timeout,
|
||||
propCount: propCount,
|
||||
hasTransform: hasTransform,
|
||||
};
|
||||
}
|
||||
function getTimeout$1(delays, durations) {
|
||||
/* istanbul ignore next */
|
||||
while (delays.length < durations.length) {
|
||||
delays = delays.concat(delays);
|
||||
}
|
||||
return Math.max.apply(null, durations.map(function (d, i) {
|
||||
return toMs$1(d) + toMs$1(delays[i]);
|
||||
}));
|
||||
}
|
||||
// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
|
||||
// in a locale-dependent way, using a comma instead of a dot.
|
||||
// If comma is not replaced with a dot, the input will be rounded down (i.e. acting
|
||||
// as a floor function) causing unexpected behaviors
|
||||
function toMs$1(s) {
|
||||
return Number(s.slice(0, -1).replace(',', '.')) * 1000;
|
||||
}
|
||||
|
||||
function enter$1(vnode, toggleDisplay) {
|
||||
var el = vnode.elm;
|
||||
// call leave callback now
|
||||
if (isDef(el._leaveCb)) {
|
||||
el._leaveCb.cancelled = true;
|
||||
el._leaveCb();
|
||||
}
|
||||
var data = resolveTransition$1(vnode.data.transition);
|
||||
if (isUndef(data)) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore if */
|
||||
if (isDef(el._enterCb) || el.nodeType !== 1) {
|
||||
return;
|
||||
}
|
||||
var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;
|
||||
// activeInstance will always be the <transition> component managing this
|
||||
// transition. One edge case to check is when the <transition> is placed
|
||||
// as the root node of a child component. In that case we need to check
|
||||
// <transition>'s parent for appear check.
|
||||
var context = activeInstance;
|
||||
var transitionNode = activeInstance.$vnode;
|
||||
while (transitionNode && transitionNode.parent) {
|
||||
context = transitionNode.context;
|
||||
transitionNode = transitionNode.parent;
|
||||
}
|
||||
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
||||
if (isAppear && !appear && appear !== '') {
|
||||
return;
|
||||
}
|
||||
var startClass = isAppear && appearClass ? appearClass : enterClass;
|
||||
var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;
|
||||
var toClass = isAppear && appearToClass ? appearToClass : enterToClass;
|
||||
var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;
|
||||
var enterHook = isAppear
|
||||
? typeof appear === 'function'
|
||||
? appear
|
||||
: enter
|
||||
: enter;
|
||||
var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;
|
||||
var enterCancelledHook = isAppear
|
||||
? appearCancelled || enterCancelled
|
||||
: enterCancelled;
|
||||
var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);
|
||||
if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) {
|
||||
checkDuration$1(explicitEnterDuration, 'enter', vnode);
|
||||
}
|
||||
var expectsCSS = css !== false && !isIE9;
|
||||
var userWantsControl = getHookArgumentsLength$1(enterHook);
|
||||
var cb = (el._enterCb = once(function () {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, toClass);
|
||||
removeTransitionClass$1(el, activeClass);
|
||||
}
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, startClass);
|
||||
}
|
||||
enterCancelledHook && enterCancelledHook(el);
|
||||
}
|
||||
else {
|
||||
afterEnterHook && afterEnterHook(el);
|
||||
}
|
||||
el._enterCb = null;
|
||||
}));
|
||||
if (!vnode.data.show) {
|
||||
// remove pending leave element on enter by injecting an insert hook
|
||||
mergeVNodeHook(vnode, 'insert', function () {
|
||||
var parent = el.parentNode;
|
||||
var pendingNode = parent && parent._pending && parent._pending[vnode.key];
|
||||
if (pendingNode &&
|
||||
pendingNode.tag === vnode.tag &&
|
||||
pendingNode.elm._leaveCb) {
|
||||
pendingNode.elm._leaveCb();
|
||||
}
|
||||
enterHook && enterHook(el, cb);
|
||||
});
|
||||
}
|
||||
// start enter transition
|
||||
beforeEnterHook && beforeEnterHook(el);
|
||||
if (expectsCSS) {
|
||||
addTransitionClass$1(el, startClass);
|
||||
addTransitionClass$1(el, activeClass);
|
||||
nextFrame$1(function () {
|
||||
removeTransitionClass$1(el, startClass);
|
||||
// @ts-expect-error
|
||||
if (!cb.cancelled) {
|
||||
addTransitionClass$1(el, toClass);
|
||||
if (!userWantsControl) {
|
||||
if (isValidDuration$1(explicitEnterDuration)) {
|
||||
setTimeout(cb, explicitEnterDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds$1(el, type, cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (vnode.data.show) {
|
||||
toggleDisplay && toggleDisplay();
|
||||
enterHook && enterHook(el, cb);
|
||||
}
|
||||
if (!expectsCSS && !userWantsControl) {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
function leave$1(vnode, rm) {
|
||||
var el = vnode.elm;
|
||||
// call enter callback now
|
||||
if (isDef(el._enterCb)) {
|
||||
el._enterCb.cancelled = true;
|
||||
el._enterCb();
|
||||
}
|
||||
var data = resolveTransition$1(vnode.data.transition);
|
||||
if (isUndef(data) || el.nodeType !== 1) {
|
||||
return rm();
|
||||
}
|
||||
/* istanbul ignore if */
|
||||
if (isDef(el._leaveCb)) {
|
||||
return;
|
||||
}
|
||||
var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;
|
||||
var expectsCSS = css !== false && !isIE9;
|
||||
var userWantsControl = getHookArgumentsLength$1(leave);
|
||||
var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);
|
||||
if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) {
|
||||
checkDuration$1(explicitLeaveDuration, 'leave', vnode);
|
||||
}
|
||||
var cb = (el._leaveCb = once(function () {
|
||||
if (el.parentNode && el.parentNode._pending) {
|
||||
el.parentNode._pending[vnode.key] = null;
|
||||
}
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, leaveToClass);
|
||||
removeTransitionClass$1(el, leaveActiveClass);
|
||||
}
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, leaveClass);
|
||||
}
|
||||
leaveCancelled && leaveCancelled(el);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
afterLeave && afterLeave(el);
|
||||
}
|
||||
el._leaveCb = null;
|
||||
}));
|
||||
if (delayLeave) {
|
||||
delayLeave(performLeave);
|
||||
}
|
||||
else {
|
||||
performLeave();
|
||||
}
|
||||
function performLeave() {
|
||||
// the delayed leave may have already been cancelled
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
return;
|
||||
}
|
||||
// record leaving element
|
||||
if (!vnode.data.show && el.parentNode) {
|
||||
(el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;
|
||||
}
|
||||
beforeLeave && beforeLeave(el);
|
||||
if (expectsCSS) {
|
||||
addTransitionClass$1(el, leaveClass);
|
||||
addTransitionClass$1(el, leaveActiveClass);
|
||||
nextFrame$1(function () {
|
||||
removeTransitionClass$1(el, leaveClass);
|
||||
// @ts-expect-error
|
||||
if (!cb.cancelled) {
|
||||
addTransitionClass$1(el, leaveToClass);
|
||||
if (!userWantsControl) {
|
||||
if (isValidDuration$1(explicitLeaveDuration)) {
|
||||
setTimeout(cb, explicitLeaveDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds$1(el, type, cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
leave && leave(el, cb);
|
||||
if (!expectsCSS && !userWantsControl) {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
}
|
||||
// only used in dev mode
|
||||
function checkDuration$1(val, name, vnode) {
|
||||
if (typeof val !== 'number') {
|
||||
warn("<transition> explicit " + name + " duration is not a valid number - " +
|
||||
("got " + JSON.stringify(val) + "."), vnode.context);
|
||||
}
|
||||
else if (isNaN(val)) {
|
||||
warn("<transition> explicit " + name + " duration is NaN - " +
|
||||
'the duration expression might be incorrect.', vnode.context);
|
||||
}
|
||||
}
|
||||
function isValidDuration$1(val) {
|
||||
return typeof val === 'number' && !isNaN(val);
|
||||
}
|
||||
/**
|
||||
* Normalize a transition hook's argument length. The hook may be:
|
||||
* - a merged hook (invoker) with the original in .fns
|
||||
* - a wrapped component method (check ._length)
|
||||
* - a plain function (.length)
|
||||
*/
|
||||
function getHookArgumentsLength$1(fn) {
|
||||
if (isUndef(fn)) {
|
||||
return false;
|
||||
}
|
||||
// @ts-expect-error
|
||||
var invokerFns = fn.fns;
|
||||
if (isDef(invokerFns)) {
|
||||
// invoker
|
||||
return getHookArgumentsLength$1(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);
|
||||
}
|
||||
else {
|
||||
// @ts-expect-error
|
||||
return (fn._length || fn.length) > 1;
|
||||
}
|
||||
}
|
||||
function _enter(_, vnode) {
|
||||
if (vnode.data.show !== true) {
|
||||
enter$1(vnode);
|
||||
}
|
||||
}
|
||||
var transition = inBrowser
|
||||
? {
|
||||
create: _enter,
|
||||
activate: _enter,
|
||||
remove: function (vnode, rm) {
|
||||
/* istanbul ignore else */
|
||||
if (vnode.data.show !== true) {
|
||||
// @ts-expect-error
|
||||
leave$1(vnode, rm);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
}
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
var platformModules = [attrs, klass, events, domProps, style, transition];
|
||||
|
||||
// the directive module should be applied last, after all
|
||||
// built-in modules have been applied.
|
||||
var modules = platformModules.concat(baseModules);
|
||||
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
||||
|
||||
/**
|
||||
* Not type checking this file because flow doesn't like attaching
|
||||
* properties to Elements.
|
||||
*/
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
||||
document.addEventListener('selectionchange', function () {
|
||||
var el = document.activeElement;
|
||||
// @ts-expect-error
|
||||
if (el && el.vmodel) {
|
||||
trigger(el, 'input');
|
||||
}
|
||||
});
|
||||
}
|
||||
var directive = {
|
||||
inserted: function (el, binding, vnode, oldVnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
// #6903
|
||||
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
||||
mergeVNodeHook(vnode, 'postpatch', function () {
|
||||
directive.componentUpdated(el, binding, vnode);
|
||||
});
|
||||
}
|
||||
else {
|
||||
setSelected(el, binding, vnode.context);
|
||||
}
|
||||
el._vOptions = [].map.call(el.options, getValue);
|
||||
}
|
||||
else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
|
||||
el._vModifiers = binding.modifiers;
|
||||
if (!binding.modifiers.lazy) {
|
||||
el.addEventListener('compositionstart', onCompositionStart);
|
||||
el.addEventListener('compositionend', onCompositionEnd);
|
||||
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
||||
// switching focus before confirming composition choice
|
||||
// this also fixes the issue where some browsers e.g. iOS Chrome
|
||||
// fires "change" instead of "input" on autocomplete.
|
||||
el.addEventListener('change', onCompositionEnd);
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
el.vmodel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
componentUpdated: function (el, binding, vnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
setSelected(el, binding, vnode.context);
|
||||
// in case the options rendered by v-for have changed,
|
||||
// it's possible that the value is out-of-sync with the rendered options.
|
||||
// detect such cases and filter out values that no longer has a matching
|
||||
// option in the DOM.
|
||||
var prevOptions_1 = el._vOptions;
|
||||
var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
|
||||
if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
|
||||
// trigger change event if
|
||||
// no matching option found for at least one value
|
||||
var needReset = el.multiple
|
||||
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
|
||||
: binding.value !== binding.oldValue &&
|
||||
hasNoMatchingOption(binding.value, curOptions_1);
|
||||
if (needReset) {
|
||||
trigger(el, 'change');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
function setSelected(el, binding, vm) {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
/* istanbul ignore if */
|
||||
if (isIE || isEdge) {
|
||||
setTimeout(function () {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
function actuallySetSelected(el, binding, vm) {
|
||||
var value = binding.value;
|
||||
var isMultiple = el.multiple;
|
||||
if (isMultiple && !Array.isArray(value)) {
|
||||
process.env.NODE_ENV !== 'production' &&
|
||||
warn("<select multiple v-model=\"" + binding.expression + "\"> " +
|
||||
("expects an Array value for its binding, but got " + Object.prototype.toString
|
||||
.call(value)
|
||||
.slice(8, -1)), vm);
|
||||
return;
|
||||
}
|
||||
var selected, option;
|
||||
for (var i = 0, l = el.options.length; i < l; i++) {
|
||||
option = el.options[i];
|
||||
if (isMultiple) {
|
||||
selected = looseIndexOf(value, getValue(option)) > -1;
|
||||
if (option.selected !== selected) {
|
||||
option.selected = selected;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (looseEqual(getValue(option), value)) {
|
||||
if (el.selectedIndex !== i) {
|
||||
el.selectedIndex = i;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMultiple) {
|
||||
el.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
function hasNoMatchingOption(value, options) {
|
||||
return options.every(function (o) { return !looseEqual(o, value); });
|
||||
}
|
||||
function getValue(option) {
|
||||
return '_value' in option ? option._value : option.value;
|
||||
}
|
||||
function onCompositionStart(e) {
|
||||
e.target.composing = true;
|
||||
}
|
||||
function onCompositionEnd(e) {
|
||||
// prevent triggering an input event for no reason
|
||||
if (!e.target.composing)
|
||||
{ return; }
|
||||
e.target.composing = false;
|
||||
trigger(e.target, 'input');
|
||||
}
|
||||
function trigger(el, type) {
|
||||
var e = document.createEvent('HTMLEvents');
|
||||
e.initEvent(type, true, true);
|
||||
el.dispatchEvent(e);
|
||||
}
|
||||
|
||||
var whitespaceRE = /\s+/;
|
||||
/**
|
||||
* Add class with compatibility for SVG since classList is not supported on
|
||||
@ -6834,167 +7453,6 @@ function getHookArgumentsLength(fn) {
|
||||
return (fn._length || fn.length) > 1;
|
||||
}
|
||||
}
|
||||
function _enter(_, vnode) {
|
||||
if (vnode.data.show !== true) {
|
||||
enter(vnode);
|
||||
}
|
||||
}
|
||||
var transition = inBrowser
|
||||
? {
|
||||
create: _enter,
|
||||
activate: _enter,
|
||||
remove: function (vnode, rm) {
|
||||
/* istanbul ignore else */
|
||||
if (vnode.data.show !== true) {
|
||||
// @ts-expect-error
|
||||
leave(vnode, rm);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
}
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
var platformModules = [attrs, klass, events, domProps, style, transition];
|
||||
|
||||
// the directive module should be applied last, after all
|
||||
// built-in modules have been applied.
|
||||
var modules = platformModules.concat(baseModules);
|
||||
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
||||
|
||||
/**
|
||||
* Not type checking this file because flow doesn't like attaching
|
||||
* properties to Elements.
|
||||
*/
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
||||
document.addEventListener('selectionchange', function () {
|
||||
var el = document.activeElement;
|
||||
// @ts-expect-error
|
||||
if (el && el.vmodel) {
|
||||
trigger(el, 'input');
|
||||
}
|
||||
});
|
||||
}
|
||||
var directive = {
|
||||
inserted: function (el, binding, vnode, oldVnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
// #6903
|
||||
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
||||
mergeVNodeHook(vnode, 'postpatch', function () {
|
||||
directive.componentUpdated(el, binding, vnode);
|
||||
});
|
||||
}
|
||||
else {
|
||||
setSelected(el, binding, vnode.context);
|
||||
}
|
||||
el._vOptions = [].map.call(el.options, getValue);
|
||||
}
|
||||
else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
|
||||
el._vModifiers = binding.modifiers;
|
||||
if (!binding.modifiers.lazy) {
|
||||
el.addEventListener('compositionstart', onCompositionStart);
|
||||
el.addEventListener('compositionend', onCompositionEnd);
|
||||
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
||||
// switching focus before confirming composition choice
|
||||
// this also fixes the issue where some browsers e.g. iOS Chrome
|
||||
// fires "change" instead of "input" on autocomplete.
|
||||
el.addEventListener('change', onCompositionEnd);
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
el.vmodel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
componentUpdated: function (el, binding, vnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
setSelected(el, binding, vnode.context);
|
||||
// in case the options rendered by v-for have changed,
|
||||
// it's possible that the value is out-of-sync with the rendered options.
|
||||
// detect such cases and filter out values that no longer has a matching
|
||||
// option in the DOM.
|
||||
var prevOptions_1 = el._vOptions;
|
||||
var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
|
||||
if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
|
||||
// trigger change event if
|
||||
// no matching option found for at least one value
|
||||
var needReset = el.multiple
|
||||
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
|
||||
: binding.value !== binding.oldValue &&
|
||||
hasNoMatchingOption(binding.value, curOptions_1);
|
||||
if (needReset) {
|
||||
trigger(el, 'change');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
function setSelected(el, binding, vm) {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
/* istanbul ignore if */
|
||||
if (isIE || isEdge) {
|
||||
setTimeout(function () {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
function actuallySetSelected(el, binding, vm) {
|
||||
var value = binding.value;
|
||||
var isMultiple = el.multiple;
|
||||
if (isMultiple && !Array.isArray(value)) {
|
||||
process.env.NODE_ENV !== 'production' &&
|
||||
warn("<select multiple v-model=\"" + binding.expression + "\"> " +
|
||||
("expects an Array value for its binding, but got " + Object.prototype.toString
|
||||
.call(value)
|
||||
.slice(8, -1)), vm);
|
||||
return;
|
||||
}
|
||||
var selected, option;
|
||||
for (var i = 0, l = el.options.length; i < l; i++) {
|
||||
option = el.options[i];
|
||||
if (isMultiple) {
|
||||
selected = looseIndexOf(value, getValue(option)) > -1;
|
||||
if (option.selected !== selected) {
|
||||
option.selected = selected;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (looseEqual(getValue(option), value)) {
|
||||
if (el.selectedIndex !== i) {
|
||||
el.selectedIndex = i;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMultiple) {
|
||||
el.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
function hasNoMatchingOption(value, options) {
|
||||
return options.every(function (o) { return !looseEqual(o, value); });
|
||||
}
|
||||
function getValue(option) {
|
||||
return '_value' in option ? option._value : option.value;
|
||||
}
|
||||
function onCompositionStart(e) {
|
||||
e.target.composing = true;
|
||||
}
|
||||
function onCompositionEnd(e) {
|
||||
// prevent triggering an input event for no reason
|
||||
if (!e.target.composing)
|
||||
{ return; }
|
||||
e.target.composing = false;
|
||||
trigger(e.target, 'input');
|
||||
}
|
||||
function trigger(el, type) {
|
||||
var e = document.createEvent('HTMLEvents');
|
||||
e.initEvent(type, true, true);
|
||||
el.dispatchEvent(e);
|
||||
}
|
||||
|
||||
// recursively search for possible transition defined inside the component root
|
||||
function locateNode(vnode) {
|
||||
|
778
dist/vue.runtime.js
vendored
778
dist/vue.runtime.js
vendored
@ -6347,6 +6347,624 @@
|
||||
update: updateStyle,
|
||||
};
|
||||
|
||||
var whitespaceRE$1 = /\s+/;
|
||||
/**
|
||||
* Add class with compatibility for SVG since classList is not supported on
|
||||
* SVG elements in IE
|
||||
*/
|
||||
function addClass$1(el, cls) {
|
||||
/* istanbul ignore if */
|
||||
if (!cls || !(cls = cls.trim())) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (el.classList) {
|
||||
if (cls.indexOf(' ') > -1) {
|
||||
cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });
|
||||
}
|
||||
else {
|
||||
el.classList.add(cls);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var cur = " " + (el.getAttribute('class') || '') + " ";
|
||||
if (cur.indexOf(' ' + cls + ' ') < 0) {
|
||||
el.setAttribute('class', (cur + cls).trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Remove class with compatibility for SVG since classList is not supported on
|
||||
* SVG elements in IE
|
||||
*/
|
||||
function removeClass$1(el, cls) {
|
||||
/* istanbul ignore if */
|
||||
if (!cls || !(cls = cls.trim())) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (el.classList) {
|
||||
if (cls.indexOf(' ') > -1) {
|
||||
cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });
|
||||
}
|
||||
else {
|
||||
el.classList.remove(cls);
|
||||
}
|
||||
if (!el.classList.length) {
|
||||
el.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
else {
|
||||
var cur = " " + (el.getAttribute('class') || '') + " ";
|
||||
var tar = ' ' + cls + ' ';
|
||||
while (cur.indexOf(tar) >= 0) {
|
||||
cur = cur.replace(tar, ' ');
|
||||
}
|
||||
cur = cur.trim();
|
||||
if (cur) {
|
||||
el.setAttribute('class', cur);
|
||||
}
|
||||
else {
|
||||
el.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function resolveTransition$1(def) {
|
||||
if (!def) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (typeof def === 'object') {
|
||||
var res = {};
|
||||
if (def.css !== false) {
|
||||
extend(res, autoCssTransition$1(def.name || 'v'));
|
||||
}
|
||||
extend(res, def);
|
||||
return res;
|
||||
}
|
||||
else if (typeof def === 'string') {
|
||||
return autoCssTransition$1(def);
|
||||
}
|
||||
}
|
||||
var autoCssTransition$1 = cached(function (name) {
|
||||
return {
|
||||
enterClass: name + "-enter",
|
||||
enterToClass: name + "-enter-to",
|
||||
enterActiveClass: name + "-enter-active",
|
||||
leaveClass: name + "-leave",
|
||||
leaveToClass: name + "-leave-to",
|
||||
leaveActiveClass: name + "-leave-active",
|
||||
};
|
||||
});
|
||||
var hasTransition$1 = inBrowser && !isIE9;
|
||||
var TRANSITION$1 = 'transition';
|
||||
var ANIMATION$1 = 'animation';
|
||||
// Transition property/event sniffing
|
||||
var transitionProp$1 = 'transition';
|
||||
var transitionEndEvent$1 = 'transitionend';
|
||||
var animationProp$1 = 'animation';
|
||||
var animationEndEvent$1 = 'animationend';
|
||||
if (hasTransition$1) {
|
||||
/* istanbul ignore if */
|
||||
if (window.ontransitionend === undefined &&
|
||||
// @ts-expect-error
|
||||
window.onwebkittransitionend !== undefined) {
|
||||
transitionProp$1 = 'WebkitTransition';
|
||||
transitionEndEvent$1 = 'webkitTransitionEnd';
|
||||
}
|
||||
if (window.onanimationend === undefined &&
|
||||
// @ts-expect-error
|
||||
window.onwebkitanimationend !== undefined) {
|
||||
animationProp$1 = 'WebkitAnimation';
|
||||
animationEndEvent$1 = 'webkitAnimationEnd';
|
||||
}
|
||||
}
|
||||
// binding to window is necessary to make hot reload work in IE in strict mode
|
||||
var raf$1 = inBrowser
|
||||
? window.requestAnimationFrame
|
||||
? window.requestAnimationFrame.bind(window)
|
||||
: setTimeout
|
||||
: /* istanbul ignore next */ function (fn) { return fn(); };
|
||||
function nextFrame$1(fn) {
|
||||
raf$1(function () {
|
||||
// @ts-expect-error
|
||||
raf$1(fn);
|
||||
});
|
||||
}
|
||||
function addTransitionClass$1(el, cls) {
|
||||
var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
|
||||
if (transitionClasses.indexOf(cls) < 0) {
|
||||
transitionClasses.push(cls);
|
||||
addClass$1(el, cls);
|
||||
}
|
||||
}
|
||||
function removeTransitionClass$1(el, cls) {
|
||||
if (el._transitionClasses) {
|
||||
remove$2(el._transitionClasses, cls);
|
||||
}
|
||||
removeClass$1(el, cls);
|
||||
}
|
||||
function whenTransitionEnds$1(el, expectedType, cb) {
|
||||
var _a = getTransitionInfo$1(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;
|
||||
if (!type)
|
||||
{ return cb(); }
|
||||
var event = type === TRANSITION$1 ? transitionEndEvent$1 : animationEndEvent$1;
|
||||
var ended = 0;
|
||||
var end = function () {
|
||||
el.removeEventListener(event, onEnd);
|
||||
cb();
|
||||
};
|
||||
var onEnd = function (e) {
|
||||
if (e.target === el) {
|
||||
if (++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
}
|
||||
};
|
||||
setTimeout(function () {
|
||||
if (ended < propCount) {
|
||||
end();
|
||||
}
|
||||
}, timeout + 1);
|
||||
el.addEventListener(event, onEnd);
|
||||
}
|
||||
var transformRE$1 = /\b(transform|all)(,|$)/;
|
||||
function getTransitionInfo$1(el, expectedType) {
|
||||
var styles = window.getComputedStyle(el);
|
||||
// JSDOM may return undefined for transition properties
|
||||
var transitionDelays = (styles[transitionProp$1 + 'Delay'] || '').split(', ');
|
||||
var transitionDurations = (styles[transitionProp$1 + 'Duration'] || '').split(', ');
|
||||
var transitionTimeout = getTimeout$1(transitionDelays, transitionDurations);
|
||||
var animationDelays = (styles[animationProp$1 + 'Delay'] || '').split(', ');
|
||||
var animationDurations = (styles[animationProp$1 + 'Duration'] || '').split(', ');
|
||||
var animationTimeout = getTimeout$1(animationDelays, animationDurations);
|
||||
var type;
|
||||
var timeout = 0;
|
||||
var propCount = 0;
|
||||
/* istanbul ignore if */
|
||||
if (expectedType === TRANSITION$1) {
|
||||
if (transitionTimeout > 0) {
|
||||
type = TRANSITION$1;
|
||||
timeout = transitionTimeout;
|
||||
propCount = transitionDurations.length;
|
||||
}
|
||||
}
|
||||
else if (expectedType === ANIMATION$1) {
|
||||
if (animationTimeout > 0) {
|
||||
type = ANIMATION$1;
|
||||
timeout = animationTimeout;
|
||||
propCount = animationDurations.length;
|
||||
}
|
||||
}
|
||||
else {
|
||||
timeout = Math.max(transitionTimeout, animationTimeout);
|
||||
type =
|
||||
timeout > 0
|
||||
? transitionTimeout > animationTimeout
|
||||
? TRANSITION$1
|
||||
: ANIMATION$1
|
||||
: null;
|
||||
propCount = type
|
||||
? type === TRANSITION$1
|
||||
? transitionDurations.length
|
||||
: animationDurations.length
|
||||
: 0;
|
||||
}
|
||||
var hasTransform = type === TRANSITION$1 && transformRE$1.test(styles[transitionProp$1 + 'Property']);
|
||||
return {
|
||||
type: type,
|
||||
timeout: timeout,
|
||||
propCount: propCount,
|
||||
hasTransform: hasTransform,
|
||||
};
|
||||
}
|
||||
function getTimeout$1(delays, durations) {
|
||||
/* istanbul ignore next */
|
||||
while (delays.length < durations.length) {
|
||||
delays = delays.concat(delays);
|
||||
}
|
||||
return Math.max.apply(null, durations.map(function (d, i) {
|
||||
return toMs$1(d) + toMs$1(delays[i]);
|
||||
}));
|
||||
}
|
||||
// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
|
||||
// in a locale-dependent way, using a comma instead of a dot.
|
||||
// If comma is not replaced with a dot, the input will be rounded down (i.e. acting
|
||||
// as a floor function) causing unexpected behaviors
|
||||
function toMs$1(s) {
|
||||
return Number(s.slice(0, -1).replace(',', '.')) * 1000;
|
||||
}
|
||||
|
||||
function enter$1(vnode, toggleDisplay) {
|
||||
var el = vnode.elm;
|
||||
// call leave callback now
|
||||
if (isDef(el._leaveCb)) {
|
||||
el._leaveCb.cancelled = true;
|
||||
el._leaveCb();
|
||||
}
|
||||
var data = resolveTransition$1(vnode.data.transition);
|
||||
if (isUndef(data)) {
|
||||
return;
|
||||
}
|
||||
/* istanbul ignore if */
|
||||
if (isDef(el._enterCb) || el.nodeType !== 1) {
|
||||
return;
|
||||
}
|
||||
var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;
|
||||
// activeInstance will always be the <transition> component managing this
|
||||
// transition. One edge case to check is when the <transition> is placed
|
||||
// as the root node of a child component. In that case we need to check
|
||||
// <transition>'s parent for appear check.
|
||||
var context = activeInstance;
|
||||
var transitionNode = activeInstance.$vnode;
|
||||
while (transitionNode && transitionNode.parent) {
|
||||
context = transitionNode.context;
|
||||
transitionNode = transitionNode.parent;
|
||||
}
|
||||
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
||||
if (isAppear && !appear && appear !== '') {
|
||||
return;
|
||||
}
|
||||
var startClass = isAppear && appearClass ? appearClass : enterClass;
|
||||
var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;
|
||||
var toClass = isAppear && appearToClass ? appearToClass : enterToClass;
|
||||
var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;
|
||||
var enterHook = isAppear
|
||||
? typeof appear === 'function'
|
||||
? appear
|
||||
: enter
|
||||
: enter;
|
||||
var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;
|
||||
var enterCancelledHook = isAppear
|
||||
? appearCancelled || enterCancelled
|
||||
: enterCancelled;
|
||||
var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);
|
||||
if (explicitEnterDuration != null) {
|
||||
checkDuration$1(explicitEnterDuration, 'enter', vnode);
|
||||
}
|
||||
var expectsCSS = css !== false && !isIE9;
|
||||
var userWantsControl = getHookArgumentsLength$1(enterHook);
|
||||
var cb = (el._enterCb = once(function () {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, toClass);
|
||||
removeTransitionClass$1(el, activeClass);
|
||||
}
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, startClass);
|
||||
}
|
||||
enterCancelledHook && enterCancelledHook(el);
|
||||
}
|
||||
else {
|
||||
afterEnterHook && afterEnterHook(el);
|
||||
}
|
||||
el._enterCb = null;
|
||||
}));
|
||||
if (!vnode.data.show) {
|
||||
// remove pending leave element on enter by injecting an insert hook
|
||||
mergeVNodeHook(vnode, 'insert', function () {
|
||||
var parent = el.parentNode;
|
||||
var pendingNode = parent && parent._pending && parent._pending[vnode.key];
|
||||
if (pendingNode &&
|
||||
pendingNode.tag === vnode.tag &&
|
||||
pendingNode.elm._leaveCb) {
|
||||
pendingNode.elm._leaveCb();
|
||||
}
|
||||
enterHook && enterHook(el, cb);
|
||||
});
|
||||
}
|
||||
// start enter transition
|
||||
beforeEnterHook && beforeEnterHook(el);
|
||||
if (expectsCSS) {
|
||||
addTransitionClass$1(el, startClass);
|
||||
addTransitionClass$1(el, activeClass);
|
||||
nextFrame$1(function () {
|
||||
removeTransitionClass$1(el, startClass);
|
||||
// @ts-expect-error
|
||||
if (!cb.cancelled) {
|
||||
addTransitionClass$1(el, toClass);
|
||||
if (!userWantsControl) {
|
||||
if (isValidDuration$1(explicitEnterDuration)) {
|
||||
setTimeout(cb, explicitEnterDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds$1(el, type, cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (vnode.data.show) {
|
||||
toggleDisplay && toggleDisplay();
|
||||
enterHook && enterHook(el, cb);
|
||||
}
|
||||
if (!expectsCSS && !userWantsControl) {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
function leave$1(vnode, rm) {
|
||||
var el = vnode.elm;
|
||||
// call enter callback now
|
||||
if (isDef(el._enterCb)) {
|
||||
el._enterCb.cancelled = true;
|
||||
el._enterCb();
|
||||
}
|
||||
var data = resolveTransition$1(vnode.data.transition);
|
||||
if (isUndef(data) || el.nodeType !== 1) {
|
||||
return rm();
|
||||
}
|
||||
/* istanbul ignore if */
|
||||
if (isDef(el._leaveCb)) {
|
||||
return;
|
||||
}
|
||||
var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;
|
||||
var expectsCSS = css !== false && !isIE9;
|
||||
var userWantsControl = getHookArgumentsLength$1(leave);
|
||||
var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);
|
||||
if (isDef(explicitLeaveDuration)) {
|
||||
checkDuration$1(explicitLeaveDuration, 'leave', vnode);
|
||||
}
|
||||
var cb = (el._leaveCb = once(function () {
|
||||
if (el.parentNode && el.parentNode._pending) {
|
||||
el.parentNode._pending[vnode.key] = null;
|
||||
}
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, leaveToClass);
|
||||
removeTransitionClass$1(el, leaveActiveClass);
|
||||
}
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
if (expectsCSS) {
|
||||
removeTransitionClass$1(el, leaveClass);
|
||||
}
|
||||
leaveCancelled && leaveCancelled(el);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
afterLeave && afterLeave(el);
|
||||
}
|
||||
el._leaveCb = null;
|
||||
}));
|
||||
if (delayLeave) {
|
||||
delayLeave(performLeave);
|
||||
}
|
||||
else {
|
||||
performLeave();
|
||||
}
|
||||
function performLeave() {
|
||||
// the delayed leave may have already been cancelled
|
||||
// @ts-expect-error
|
||||
if (cb.cancelled) {
|
||||
return;
|
||||
}
|
||||
// record leaving element
|
||||
if (!vnode.data.show && el.parentNode) {
|
||||
(el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;
|
||||
}
|
||||
beforeLeave && beforeLeave(el);
|
||||
if (expectsCSS) {
|
||||
addTransitionClass$1(el, leaveClass);
|
||||
addTransitionClass$1(el, leaveActiveClass);
|
||||
nextFrame$1(function () {
|
||||
removeTransitionClass$1(el, leaveClass);
|
||||
// @ts-expect-error
|
||||
if (!cb.cancelled) {
|
||||
addTransitionClass$1(el, leaveToClass);
|
||||
if (!userWantsControl) {
|
||||
if (isValidDuration$1(explicitLeaveDuration)) {
|
||||
setTimeout(cb, explicitLeaveDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds$1(el, type, cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
leave && leave(el, cb);
|
||||
if (!expectsCSS && !userWantsControl) {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
}
|
||||
// only used in dev mode
|
||||
function checkDuration$1(val, name, vnode) {
|
||||
if (typeof val !== 'number') {
|
||||
warn("<transition> explicit " + name + " duration is not a valid number - " +
|
||||
("got " + JSON.stringify(val) + "."), vnode.context);
|
||||
}
|
||||
else if (isNaN(val)) {
|
||||
warn("<transition> explicit " + name + " duration is NaN - " +
|
||||
'the duration expression might be incorrect.', vnode.context);
|
||||
}
|
||||
}
|
||||
function isValidDuration$1(val) {
|
||||
return typeof val === 'number' && !isNaN(val);
|
||||
}
|
||||
/**
|
||||
* Normalize a transition hook's argument length. The hook may be:
|
||||
* - a merged hook (invoker) with the original in .fns
|
||||
* - a wrapped component method (check ._length)
|
||||
* - a plain function (.length)
|
||||
*/
|
||||
function getHookArgumentsLength$1(fn) {
|
||||
if (isUndef(fn)) {
|
||||
return false;
|
||||
}
|
||||
// @ts-expect-error
|
||||
var invokerFns = fn.fns;
|
||||
if (isDef(invokerFns)) {
|
||||
// invoker
|
||||
return getHookArgumentsLength$1(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);
|
||||
}
|
||||
else {
|
||||
// @ts-expect-error
|
||||
return (fn._length || fn.length) > 1;
|
||||
}
|
||||
}
|
||||
function _enter(_, vnode) {
|
||||
if (vnode.data.show !== true) {
|
||||
enter$1(vnode);
|
||||
}
|
||||
}
|
||||
var transition = inBrowser
|
||||
? {
|
||||
create: _enter,
|
||||
activate: _enter,
|
||||
remove: function (vnode, rm) {
|
||||
/* istanbul ignore else */
|
||||
if (vnode.data.show !== true) {
|
||||
// @ts-expect-error
|
||||
leave$1(vnode, rm);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
}
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
var platformModules = [attrs, klass, events, domProps, style, transition];
|
||||
|
||||
// the directive module should be applied last, after all
|
||||
// built-in modules have been applied.
|
||||
var modules = platformModules.concat(baseModules);
|
||||
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
||||
|
||||
/**
|
||||
* Not type checking this file because flow doesn't like attaching
|
||||
* properties to Elements.
|
||||
*/
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
||||
document.addEventListener('selectionchange', function () {
|
||||
var el = document.activeElement;
|
||||
// @ts-expect-error
|
||||
if (el && el.vmodel) {
|
||||
trigger(el, 'input');
|
||||
}
|
||||
});
|
||||
}
|
||||
var directive = {
|
||||
inserted: function (el, binding, vnode, oldVnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
// #6903
|
||||
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
||||
mergeVNodeHook(vnode, 'postpatch', function () {
|
||||
directive.componentUpdated(el, binding, vnode);
|
||||
});
|
||||
}
|
||||
else {
|
||||
setSelected(el, binding, vnode.context);
|
||||
}
|
||||
el._vOptions = [].map.call(el.options, getValue);
|
||||
}
|
||||
else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
|
||||
el._vModifiers = binding.modifiers;
|
||||
if (!binding.modifiers.lazy) {
|
||||
el.addEventListener('compositionstart', onCompositionStart);
|
||||
el.addEventListener('compositionend', onCompositionEnd);
|
||||
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
||||
// switching focus before confirming composition choice
|
||||
// this also fixes the issue where some browsers e.g. iOS Chrome
|
||||
// fires "change" instead of "input" on autocomplete.
|
||||
el.addEventListener('change', onCompositionEnd);
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
el.vmodel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
componentUpdated: function (el, binding, vnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
setSelected(el, binding, vnode.context);
|
||||
// in case the options rendered by v-for have changed,
|
||||
// it's possible that the value is out-of-sync with the rendered options.
|
||||
// detect such cases and filter out values that no longer has a matching
|
||||
// option in the DOM.
|
||||
var prevOptions_1 = el._vOptions;
|
||||
var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
|
||||
if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
|
||||
// trigger change event if
|
||||
// no matching option found for at least one value
|
||||
var needReset = el.multiple
|
||||
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
|
||||
: binding.value !== binding.oldValue &&
|
||||
hasNoMatchingOption(binding.value, curOptions_1);
|
||||
if (needReset) {
|
||||
trigger(el, 'change');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
function setSelected(el, binding, vm) {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
/* istanbul ignore if */
|
||||
if (isIE || isEdge) {
|
||||
setTimeout(function () {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
function actuallySetSelected(el, binding, vm) {
|
||||
var value = binding.value;
|
||||
var isMultiple = el.multiple;
|
||||
if (isMultiple && !Array.isArray(value)) {
|
||||
warn("<select multiple v-model=\"" + binding.expression + "\"> " +
|
||||
("expects an Array value for its binding, but got " + Object.prototype.toString
|
||||
.call(value)
|
||||
.slice(8, -1)), vm);
|
||||
return;
|
||||
}
|
||||
var selected, option;
|
||||
for (var i = 0, l = el.options.length; i < l; i++) {
|
||||
option = el.options[i];
|
||||
if (isMultiple) {
|
||||
selected = looseIndexOf(value, getValue(option)) > -1;
|
||||
if (option.selected !== selected) {
|
||||
option.selected = selected;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (looseEqual(getValue(option), value)) {
|
||||
if (el.selectedIndex !== i) {
|
||||
el.selectedIndex = i;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMultiple) {
|
||||
el.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
function hasNoMatchingOption(value, options) {
|
||||
return options.every(function (o) { return !looseEqual(o, value); });
|
||||
}
|
||||
function getValue(option) {
|
||||
return '_value' in option ? option._value : option.value;
|
||||
}
|
||||
function onCompositionStart(e) {
|
||||
e.target.composing = true;
|
||||
}
|
||||
function onCompositionEnd(e) {
|
||||
// prevent triggering an input event for no reason
|
||||
if (!e.target.composing)
|
||||
{ return; }
|
||||
e.target.composing = false;
|
||||
trigger(e.target, 'input');
|
||||
}
|
||||
function trigger(el, type) {
|
||||
var e = document.createEvent('HTMLEvents');
|
||||
e.initEvent(type, true, true);
|
||||
el.dispatchEvent(e);
|
||||
}
|
||||
|
||||
var whitespaceRE = /\s+/;
|
||||
/**
|
||||
* Add class with compatibility for SVG since classList is not supported on
|
||||
@ -6804,166 +7422,6 @@
|
||||
return (fn._length || fn.length) > 1;
|
||||
}
|
||||
}
|
||||
function _enter(_, vnode) {
|
||||
if (vnode.data.show !== true) {
|
||||
enter(vnode);
|
||||
}
|
||||
}
|
||||
var transition = inBrowser
|
||||
? {
|
||||
create: _enter,
|
||||
activate: _enter,
|
||||
remove: function (vnode, rm) {
|
||||
/* istanbul ignore else */
|
||||
if (vnode.data.show !== true) {
|
||||
// @ts-expect-error
|
||||
leave(vnode, rm);
|
||||
}
|
||||
else {
|
||||
rm();
|
||||
}
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
var platformModules = [attrs, klass, events, domProps, style, transition];
|
||||
|
||||
// the directive module should be applied last, after all
|
||||
// built-in modules have been applied.
|
||||
var modules = platformModules.concat(baseModules);
|
||||
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
||||
|
||||
/**
|
||||
* Not type checking this file because flow doesn't like attaching
|
||||
* properties to Elements.
|
||||
*/
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
||||
document.addEventListener('selectionchange', function () {
|
||||
var el = document.activeElement;
|
||||
// @ts-expect-error
|
||||
if (el && el.vmodel) {
|
||||
trigger(el, 'input');
|
||||
}
|
||||
});
|
||||
}
|
||||
var directive = {
|
||||
inserted: function (el, binding, vnode, oldVnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
// #6903
|
||||
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
||||
mergeVNodeHook(vnode, 'postpatch', function () {
|
||||
directive.componentUpdated(el, binding, vnode);
|
||||
});
|
||||
}
|
||||
else {
|
||||
setSelected(el, binding, vnode.context);
|
||||
}
|
||||
el._vOptions = [].map.call(el.options, getValue);
|
||||
}
|
||||
else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
|
||||
el._vModifiers = binding.modifiers;
|
||||
if (!binding.modifiers.lazy) {
|
||||
el.addEventListener('compositionstart', onCompositionStart);
|
||||
el.addEventListener('compositionend', onCompositionEnd);
|
||||
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
||||
// switching focus before confirming composition choice
|
||||
// this also fixes the issue where some browsers e.g. iOS Chrome
|
||||
// fires "change" instead of "input" on autocomplete.
|
||||
el.addEventListener('change', onCompositionEnd);
|
||||
/* istanbul ignore if */
|
||||
if (isIE9) {
|
||||
el.vmodel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
componentUpdated: function (el, binding, vnode) {
|
||||
if (vnode.tag === 'select') {
|
||||
setSelected(el, binding, vnode.context);
|
||||
// in case the options rendered by v-for have changed,
|
||||
// it's possible that the value is out-of-sync with the rendered options.
|
||||
// detect such cases and filter out values that no longer has a matching
|
||||
// option in the DOM.
|
||||
var prevOptions_1 = el._vOptions;
|
||||
var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));
|
||||
if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {
|
||||
// trigger change event if
|
||||
// no matching option found for at least one value
|
||||
var needReset = el.multiple
|
||||
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })
|
||||
: binding.value !== binding.oldValue &&
|
||||
hasNoMatchingOption(binding.value, curOptions_1);
|
||||
if (needReset) {
|
||||
trigger(el, 'change');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
function setSelected(el, binding, vm) {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
/* istanbul ignore if */
|
||||
if (isIE || isEdge) {
|
||||
setTimeout(function () {
|
||||
actuallySetSelected(el, binding, vm);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
function actuallySetSelected(el, binding, vm) {
|
||||
var value = binding.value;
|
||||
var isMultiple = el.multiple;
|
||||
if (isMultiple && !Array.isArray(value)) {
|
||||
warn("<select multiple v-model=\"" + binding.expression + "\"> " +
|
||||
("expects an Array value for its binding, but got " + Object.prototype.toString
|
||||
.call(value)
|
||||
.slice(8, -1)), vm);
|
||||
return;
|
||||
}
|
||||
var selected, option;
|
||||
for (var i = 0, l = el.options.length; i < l; i++) {
|
||||
option = el.options[i];
|
||||
if (isMultiple) {
|
||||
selected = looseIndexOf(value, getValue(option)) > -1;
|
||||
if (option.selected !== selected) {
|
||||
option.selected = selected;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (looseEqual(getValue(option), value)) {
|
||||
if (el.selectedIndex !== i) {
|
||||
el.selectedIndex = i;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMultiple) {
|
||||
el.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
function hasNoMatchingOption(value, options) {
|
||||
return options.every(function (o) { return !looseEqual(o, value); });
|
||||
}
|
||||
function getValue(option) {
|
||||
return '_value' in option ? option._value : option.value;
|
||||
}
|
||||
function onCompositionStart(e) {
|
||||
e.target.composing = true;
|
||||
}
|
||||
function onCompositionEnd(e) {
|
||||
// prevent triggering an input event for no reason
|
||||
if (!e.target.composing)
|
||||
{ return; }
|
||||
e.target.composing = false;
|
||||
trigger(e.target, 'input');
|
||||
}
|
||||
function trigger(el, type) {
|
||||
var e = document.createEvent('HTMLEvents');
|
||||
e.initEvent(type, true, true);
|
||||
el.dispatchEvent(e);
|
||||
}
|
||||
|
||||
// recursively search for possible transition defined inside the component root
|
||||
function locateNode(vnode) {
|
||||
|
2
dist/vue.runtime.min.js
vendored
2
dist/vue.runtime.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3,6 +3,11 @@
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var stream = require('stream');
|
||||
var he = require('he');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var he__default = /*#__PURE__*/_interopDefaultLegacy(he);
|
||||
|
||||
var emptyObject = Object.freeze({});
|
||||
// These helpers produce better VM code in JS engines due to their
|
||||
@ -256,6 +261,117 @@ function looseIndexOf(arr, val) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
var isAttr$1 = makeMap('accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
|
||||
'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
|
||||
'checked,cite,class,code,codebase,color,cols,colspan,content,' +
|
||||
'contenteditable,contextmenu,controls,coords,data,datetime,default,' +
|
||||
'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,for,' +
|
||||
'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' +
|
||||
'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' +
|
||||
'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' +
|
||||
'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' +
|
||||
'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' +
|
||||
'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' +
|
||||
'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' +
|
||||
'target,title,usemap,value,width,wrap');
|
||||
/* istanbul ignore next */
|
||||
var isRenderableAttr$1 = function (name) {
|
||||
return (isAttr$1(name) || name.indexOf('data-') === 0 || name.indexOf('aria-') === 0);
|
||||
};
|
||||
var propsToAttrMap$1 = {
|
||||
acceptCharset: 'accept-charset',
|
||||
className: 'class',
|
||||
htmlFor: 'for',
|
||||
httpEquiv: 'http-equiv',
|
||||
};
|
||||
var ESC$1 = {
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
'&': '&',
|
||||
};
|
||||
function escape$1(s) {
|
||||
return s.replace(/[<>"&]/g, escapeChar$1);
|
||||
}
|
||||
function escapeChar$1(a) {
|
||||
return ESC$1[a] || a;
|
||||
}
|
||||
var noUnitNumericStyleProps$1 = {
|
||||
'animation-iteration-count': true,
|
||||
'border-image-outset': true,
|
||||
'border-image-slice': true,
|
||||
'border-image-width': true,
|
||||
'box-flex': true,
|
||||
'box-flex-group': true,
|
||||
'box-ordinal-group': true,
|
||||
'column-count': true,
|
||||
columns: true,
|
||||
flex: true,
|
||||
'flex-grow': true,
|
||||
'flex-positive': true,
|
||||
'flex-shrink': true,
|
||||
'flex-negative': true,
|
||||
'flex-order': true,
|
||||
'grid-row': true,
|
||||
'grid-row-end': true,
|
||||
'grid-row-span': true,
|
||||
'grid-row-start': true,
|
||||
'grid-column': true,
|
||||
'grid-column-end': true,
|
||||
'grid-column-span': true,
|
||||
'grid-column-start': true,
|
||||
'font-weight': true,
|
||||
'line-clamp': true,
|
||||
'line-height': true,
|
||||
opacity: true,
|
||||
order: true,
|
||||
orphans: true,
|
||||
'tab-size': true,
|
||||
widows: true,
|
||||
'z-index': true,
|
||||
zoom: true,
|
||||
// SVG
|
||||
'fill-opacity': true,
|
||||
'flood-opacity': true,
|
||||
'stop-opacity': true,
|
||||
'stroke-dasharray': true,
|
||||
'stroke-dashoffset': true,
|
||||
'stroke-miterlimit': true,
|
||||
'stroke-opacity': true,
|
||||
'stroke-width': true,
|
||||
};
|
||||
|
||||
// these are reserved for web because they are directly compiled away
|
||||
// during template compilation
|
||||
makeMap('style,class');
|
||||
// attributes that should be using props for binding
|
||||
var acceptValue = makeMap('input,textarea,option,select,progress');
|
||||
var mustUseProp = function (tag, type, attr) {
|
||||
return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||
|
||||
(attr === 'selected' && tag === 'option') ||
|
||||
(attr === 'checked' && tag === 'input') ||
|
||||
(attr === 'muted' && tag === 'video'));
|
||||
};
|
||||
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
|
||||
var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
|
||||
var convertEnumeratedValue = function (key, value) {
|
||||
return isFalsyAttrValue(value) || value === 'false'
|
||||
? 'false'
|
||||
: // allow arbitrary string value for contenteditable
|
||||
key === 'contenteditable' && isValidContentEditableValue(value)
|
||||
? value
|
||||
: 'true';
|
||||
};
|
||||
var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
|
||||
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
|
||||
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
|
||||
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
|
||||
'required,reversed,scoped,seamless,selected,sortable,' +
|
||||
'truespeed,typemustmatch,visible');
|
||||
var isFalsyAttrValue = function (val) {
|
||||
return val == null || val === false;
|
||||
};
|
||||
|
||||
var isAttr = makeMap('accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
|
||||
'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
|
||||
'checked,cite,class,code,codebase,color,cols,colspan,content,' +
|
||||
@ -340,37 +456,6 @@ var noUnitNumericStyleProps = {
|
||||
'stroke-width': true,
|
||||
};
|
||||
|
||||
// these are reserved for web because they are directly compiled away
|
||||
// during template compilation
|
||||
makeMap('style,class');
|
||||
// attributes that should be using props for binding
|
||||
var acceptValue = makeMap('input,textarea,option,select,progress');
|
||||
var mustUseProp = function (tag, type, attr) {
|
||||
return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||
|
||||
(attr === 'selected' && tag === 'option') ||
|
||||
(attr === 'checked' && tag === 'input') ||
|
||||
(attr === 'muted' && tag === 'video'));
|
||||
};
|
||||
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
|
||||
var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
|
||||
var convertEnumeratedValue = function (key, value) {
|
||||
return isFalsyAttrValue(value) || value === 'false'
|
||||
? 'false'
|
||||
: // allow arbitrary string value for contenteditable
|
||||
key === 'contenteditable' && isValidContentEditableValue(value)
|
||||
? value
|
||||
: 'true';
|
||||
};
|
||||
var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
|
||||
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
|
||||
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
|
||||
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
|
||||
'required,reversed,scoped,seamless,selected,sortable,' +
|
||||
'truespeed,typemustmatch,visible');
|
||||
var isFalsyAttrValue = function (val) {
|
||||
return val == null || val === false;
|
||||
};
|
||||
|
||||
function renderAttrs$1(node) {
|
||||
var attrs = node.data.attrs;
|
||||
var res = '';
|
||||
@ -400,21 +485,21 @@ function renderAttrs$1(node) {
|
||||
// leave it to the style module
|
||||
continue;
|
||||
}
|
||||
res += renderAttr(key, attrs[key]);
|
||||
res += renderAttr$1(key, attrs[key]);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
function renderAttr(key, value) {
|
||||
function renderAttr$1(key, value) {
|
||||
if (isBooleanAttr(key)) {
|
||||
if (!isFalsyAttrValue(value)) {
|
||||
return " " + key + "=\"" + key + "\"";
|
||||
}
|
||||
}
|
||||
else if (isEnumeratedAttr(key)) {
|
||||
return " " + key + "=\"" + escape(convertEnumeratedValue(key, value)) + "\"";
|
||||
return " " + key + "=\"" + escape$1(convertEnumeratedValue(key, value)) + "\"";
|
||||
}
|
||||
else if (!isFalsyAttrValue(value)) {
|
||||
return " " + key + "=\"" + escape(String(value)) + "\"";
|
||||
return " " + key + "=\"" + escape$1(String(value)) + "\"";
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@ -516,11 +601,11 @@ function renderDOMProps$1(node) {
|
||||
}
|
||||
else {
|
||||
// $flow-disable-line (WTF?)
|
||||
var attr = propsToAttrMap[key] || key.toLowerCase();
|
||||
if (isRenderableAttr(attr) &&
|
||||
var attr = propsToAttrMap$1[key] || key.toLowerCase();
|
||||
if (isRenderableAttr$1(attr) &&
|
||||
// avoid rendering double-bound props/attrs twice
|
||||
!(isDef(attrs) && isDef(attrs[attr]))) {
|
||||
res += renderAttr(attr, props[key]);
|
||||
res += renderAttr$1(attr, props[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1897,7 +1982,7 @@ makeMap('text,number,password,search,email,tel,url');
|
||||
function renderClass(node) {
|
||||
var classList = genClassForVnode(node);
|
||||
if (classList !== '') {
|
||||
return " class=\"" + escape(classList) + "\"";
|
||||
return " class=\"" + escape$1(classList) + "\"";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1960,25 +2045,25 @@ function getStyle(vnode, checkChild) {
|
||||
return res;
|
||||
}
|
||||
|
||||
function genStyle(style) {
|
||||
function genStyle$1(style) {
|
||||
var styleText = '';
|
||||
for (var key in style) {
|
||||
var value = style[key];
|
||||
var hyphenatedKey = hyphenate(key);
|
||||
if (Array.isArray(value)) {
|
||||
for (var i = 0, len = value.length; i < len; i++) {
|
||||
styleText += normalizeValue(hyphenatedKey, value[i]);
|
||||
styleText += normalizeValue$1(hyphenatedKey, value[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
styleText += normalizeValue(hyphenatedKey, value);
|
||||
styleText += normalizeValue$1(hyphenatedKey, value);
|
||||
}
|
||||
}
|
||||
return styleText;
|
||||
}
|
||||
function normalizeValue(key, value) {
|
||||
function normalizeValue$1(key, value) {
|
||||
if (typeof value === 'string' ||
|
||||
(typeof value === 'number' && noUnitNumericStyleProps[key]) ||
|
||||
(typeof value === 'number' && noUnitNumericStyleProps$1[key]) ||
|
||||
value === 0) {
|
||||
return key + ":" + value + ";";
|
||||
}
|
||||
@ -1988,9 +2073,9 @@ function normalizeValue(key, value) {
|
||||
}
|
||||
}
|
||||
function renderStyle(vnode) {
|
||||
var styleText = genStyle(getStyle(vnode, false));
|
||||
var styleText = genStyle$1(getStyle(vnode, false));
|
||||
if (styleText !== '') {
|
||||
return " style=" + JSON.stringify(escape(styleText));
|
||||
return " style=" + JSON.stringify(escape$1(styleText));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2050,14 +2135,14 @@ var baseDirectives$1 = {
|
||||
model: model$2,
|
||||
};
|
||||
|
||||
var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
||||
var isUnaryTag$1 = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
||||
'link,meta,param,source,track,wbr');
|
||||
// Elements that you can, intentionally, leave open
|
||||
// (and which close themselves)
|
||||
var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
|
||||
var canBeLeftOpenTag$1 = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
|
||||
// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
|
||||
// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
|
||||
var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
|
||||
makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
|
||||
'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
|
||||
'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
|
||||
'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
|
||||
@ -2719,6 +2804,19 @@ var style = {
|
||||
genData: genData$1,
|
||||
};
|
||||
|
||||
var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
||||
'link,meta,param,source,track,wbr');
|
||||
// Elements that you can, intentionally, leave open
|
||||
// (and which close themselves)
|
||||
var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
|
||||
// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
|
||||
// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
|
||||
var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
|
||||
'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
|
||||
'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
|
||||
'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
|
||||
'title,tr,track');
|
||||
|
||||
/**
|
||||
* Not type-checking this file because it's mostly vendor code.
|
||||
*/
|
||||
@ -3131,7 +3229,7 @@ function parseString(chr) {
|
||||
}
|
||||
}
|
||||
|
||||
var he = require('he');
|
||||
// const he = require('he')
|
||||
var onRE = /^@|^v-on:/;
|
||||
var dirRE = /^v-|^@|^:|^#/;
|
||||
var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
||||
@ -3145,7 +3243,7 @@ var slotRE = /^v-slot(:|$)|^#/;
|
||||
var lineBreakRE = /[\r\n]/;
|
||||
var whitespaceRE = /[ \f\t\r\n]+/g;
|
||||
var invalidAttributeRE = /[\s"'<>\/=]/;
|
||||
var decodeHTMLCached = cached(he.decode);
|
||||
var decodeHTMLCached = cached(he__default['default'].decode);
|
||||
var emptySlotScopeToken = "_empty_";
|
||||
// configurable state
|
||||
var warn$1;
|
||||
@ -5355,6 +5453,7 @@ function generateCodeFrame(source, start, end) {
|
||||
function repeat(str, n) {
|
||||
var result = '';
|
||||
if (n > 0) {
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
// eslint-disable-line
|
||||
if (n & 1)
|
||||
@ -5528,6 +5627,49 @@ var createCompiler = createCompilerCreator(function baseCompile(template, option
|
||||
|
||||
var _a = createCompiler(baseOptions), compileToFunctions = _a.compileToFunctions;
|
||||
|
||||
function renderAttr(key, value) {
|
||||
if (isBooleanAttr(key)) {
|
||||
if (!isFalsyAttrValue(value)) {
|
||||
return " " + key + "=\"" + key + "\"";
|
||||
}
|
||||
}
|
||||
else if (isEnumeratedAttr(key)) {
|
||||
return " " + key + "=\"" + escape(convertEnumeratedValue(key, value)) + "\"";
|
||||
}
|
||||
else if (!isFalsyAttrValue(value)) {
|
||||
return " " + key + "=\"" + escape(String(value)) + "\"";
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function genStyle(style) {
|
||||
var styleText = '';
|
||||
for (var key in style) {
|
||||
var value = style[key];
|
||||
var hyphenatedKey = hyphenate(key);
|
||||
if (Array.isArray(value)) {
|
||||
for (var i = 0, len = value.length; i < len; i++) {
|
||||
styleText += normalizeValue(hyphenatedKey, value[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
styleText += normalizeValue(hyphenatedKey, value);
|
||||
}
|
||||
}
|
||||
return styleText;
|
||||
}
|
||||
function normalizeValue(key, value) {
|
||||
if (typeof value === 'string' ||
|
||||
(typeof value === 'number' && noUnitNumericStyleProps[key]) ||
|
||||
value === 0) {
|
||||
return key + ":" + value + ";";
|
||||
}
|
||||
else {
|
||||
// invalid values
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// The template compiler attempts to minimize the need for normalization by
|
||||
// statically analyzing the template at compile time.
|
||||
//
|
||||
@ -8179,8 +8321,8 @@ process.env.VUE_ENV = 'server';
|
||||
function createRenderer(options) {
|
||||
if (options === void 0) { options = {}; }
|
||||
return createRenderer$1(extend(extend({}, options), {
|
||||
isUnaryTag: isUnaryTag,
|
||||
canBeLeftOpenTag: canBeLeftOpenTag,
|
||||
isUnaryTag: isUnaryTag$1,
|
||||
canBeLeftOpenTag: canBeLeftOpenTag$1,
|
||||
modules: modules$1,
|
||||
// user can provide server-side implementations for custom directives
|
||||
// when creating the renderer.
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3,10 +3,12 @@
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var deindent = require('de-indent');
|
||||
var he = require('he');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var deindent__default = /*#__PURE__*/_interopDefaultLegacy(deindent);
|
||||
var he__default = /*#__PURE__*/_interopDefaultLegacy(he);
|
||||
|
||||
var emptyObject = Object.freeze({});
|
||||
// These helpers produce better VM code in JS engines due to their
|
||||
@ -151,11 +153,11 @@ function genStaticKeys$1(modules) {
|
||||
.join(',');
|
||||
}
|
||||
|
||||
var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
||||
makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
||||
'link,meta,param,source,track,wbr');
|
||||
// Elements that you can, intentionally, leave open
|
||||
// (and which close themselves)
|
||||
var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
|
||||
makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
|
||||
// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
|
||||
// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
|
||||
var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
|
||||
@ -1432,9 +1434,9 @@ var mustUseProp = function (tag, type, attr) {
|
||||
(attr === 'checked' && tag === 'input') ||
|
||||
(attr === 'muted' && tag === 'video'));
|
||||
};
|
||||
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
|
||||
makeMap('contenteditable,draggable,spellcheck');
|
||||
makeMap('events,caret,typing,plaintext-only');
|
||||
var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
|
||||
makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
|
||||
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
|
||||
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
|
||||
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
|
||||
@ -2014,7 +2016,7 @@ function parseString(chr) {
|
||||
}
|
||||
}
|
||||
|
||||
var he = require('he');
|
||||
// const he = require('he')
|
||||
var onRE = /^@|^v-on:/;
|
||||
var dirRE = /^v-|^@|^:|^#/;
|
||||
var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
||||
@ -2028,7 +2030,7 @@ var slotRE = /^v-slot(:|$)|^#/;
|
||||
var lineBreakRE = /[\r\n]/;
|
||||
var whitespaceRE = /[ \f\t\r\n]+/g;
|
||||
var invalidAttributeRE = /[\s"'<>\/=]/;
|
||||
var decodeHTMLCached = cached(he.decode);
|
||||
var decodeHTMLCached = cached(he__default['default'].decode);
|
||||
var emptySlotScopeToken = "_empty_";
|
||||
// configurable state
|
||||
var warn$1;
|
||||
@ -3026,6 +3028,19 @@ var directives = {
|
||||
html: html,
|
||||
};
|
||||
|
||||
var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
||||
'link,meta,param,source,track,wbr');
|
||||
// Elements that you can, intentionally, leave open
|
||||
// (and which close themselves)
|
||||
var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');
|
||||
// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
|
||||
// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
|
||||
makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
|
||||
'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
|
||||
'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
|
||||
'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
|
||||
'title,tr,track');
|
||||
|
||||
var baseOptions = {
|
||||
expectHTML: true,
|
||||
modules: modules,
|
||||
@ -3955,6 +3970,7 @@ function generateCodeFrame(source, start, end) {
|
||||
function repeat(str, n) {
|
||||
var result = '';
|
||||
if (n > 0) {
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
// eslint-disable-line
|
||||
if (n & 1)
|
||||
@ -4170,6 +4186,20 @@ function escapeChar(a) {
|
||||
return ESC[a] || a;
|
||||
}
|
||||
|
||||
// these are reserved for web because they are directly compiled away
|
||||
// during template compilation
|
||||
makeMap('style,class');
|
||||
// attributes that should be using props for binding
|
||||
makeMap('input,textarea,option,select,progress');
|
||||
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
|
||||
makeMap('events,caret,typing,plaintext-only');
|
||||
var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
|
||||
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
|
||||
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
|
||||
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
|
||||
'required,reversed,scoped,seamless,selected,sortable,' +
|
||||
'truespeed,typemustmatch,visible');
|
||||
|
||||
var plainStringRE = /^"(?:[^"\\]|\\.)*"$|^'(?:[^'\\]|\\.)*'$/;
|
||||
// let the model AST transform translate v-model into appropriate
|
||||
// props bindings
|
||||
|
@ -219,10 +219,14 @@ function genConfig (name) {
|
||||
const opts = builds[name]
|
||||
|
||||
// console.log('__dir', __dirname)
|
||||
// console.log('doing alisas', Object.assign({}, aliases, opts.alias))
|
||||
const config = {
|
||||
input: opts.entry,
|
||||
external: opts.external,
|
||||
plugins: [
|
||||
alias({
|
||||
entries: Object.assign({}, aliases, opts.alias)
|
||||
}),
|
||||
// flow(),
|
||||
ts({
|
||||
tsconfig: path.resolve(__dirname, '../', 'tsconfig.json'),
|
||||
@ -239,7 +243,6 @@ function genConfig (name) {
|
||||
// babel({
|
||||
// extensions: ['.js', '.jsx', '.ts', '.tsx']
|
||||
// }),
|
||||
alias(Object.assign({}, aliases, opts.alias))
|
||||
].concat(opts.plugins || []),
|
||||
output: {
|
||||
file: opts.dest,
|
||||
@ -255,6 +258,8 @@ function genConfig (name) {
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('pluging', config.plugins)
|
||||
|
||||
// built-in vars
|
||||
const vars = {
|
||||
__WEEX__: !!opts.weex,
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
const he = require('he')
|
||||
// import * as he from 'he'
|
||||
// const he = require('he')
|
||||
import he from 'he'
|
||||
import { parseHTML } from './html-parser'
|
||||
import { parseText } from './text-parser'
|
||||
import { parseFilters } from './filter-parser'
|
||||
|
Loading…
Reference in New Issue
Block a user