vue-simple-range-slider
Version:
Change Your numeric value or numeric range value with dragging handles
1,789 lines (1,788 loc) • 205 kB
JavaScript
import "./chunk-RSJERJUL.js";
// src/vue2/node_modules/vue/dist/vue.runtime.esm.js
var emptyObject = Object.freeze({});
var isArray = Array.isArray;
function isUndef(v) {
return v === void 0 || v === null;
}
function isDef(v) {
return v !== void 0 && v !== null;
}
function isTrue(v) {
return v === true;
}
function isFalse(v) {
return v === false;
}
function isPrimitive(value) {
return typeof value === "string" || typeof value === "number" || typeof value === "symbol" || typeof value === "boolean";
}
function isFunction(value) {
return typeof value === "function";
}
function isObject(obj) {
return obj !== null && typeof obj === "object";
}
var _toString = Object.prototype.toString;
function toRawType(value) {
return _toString.call(value).slice(8, -1);
}
function isPlainObject(obj) {
return _toString.call(obj) === "[object Object]";
}
function isRegExp(v) {
return _toString.call(v) === "[object RegExp]";
}
function isValidArrayIndex(val) {
var n = parseFloat(String(val));
return n >= 0 && Math.floor(n) === n && isFinite(val);
}
function isPromise(val) {
return isDef(val) && typeof val.then === "function" && typeof val.catch === "function";
}
function toString(val) {
return val == null ? "" : Array.isArray(val) || isPlainObject(val) && val.toString === _toString ? JSON.stringify(val, null, 2) : String(val);
}
function toNumber(val) {
var n = parseFloat(val);
return isNaN(n) ? val : n;
}
function makeMap(str, expectsLowerCase) {
var map = /* @__PURE__ */ Object.create(null);
var list = str.split(",");
for (var i = 0; i < list.length; i++) {
map[list[i]] = true;
}
return expectsLowerCase ? function(val) {
return map[val.toLowerCase()];
} : function(val) {
return map[val];
};
}
var isBuiltInTag = makeMap("slot,component", true);
var isReservedAttribute = makeMap("key,ref,slot,slot-scope,is");
function remove$2(arr, item) {
if (arr.length) {
var index2 = arr.indexOf(item);
if (index2 > -1) {
return arr.splice(index2, 1);
}
}
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
function hasOwn(obj, key) {
return hasOwnProperty.call(obj, key);
}
function cached(fn) {
var cache = /* @__PURE__ */ Object.create(null);
return function cachedFn(str) {
var hit = cache[str];
return hit || (cache[str] = fn(str));
};
}
var camelizeRE = /-(\w)/g;
var camelize = cached(function(str) {
return str.replace(camelizeRE, function(_, c) {
return c ? c.toUpperCase() : "";
});
});
var capitalize = cached(function(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
});
var hyphenateRE = /\B([A-Z])/g;
var hyphenate = cached(function(str) {
return str.replace(hyphenateRE, "-$1").toLowerCase();
});
function polyfillBind(fn, ctx) {
function boundFn(a) {
var l = arguments.length;
return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx);
}
boundFn._length = fn.length;
return boundFn;
}
function nativeBind(fn, ctx) {
return fn.bind(ctx);
}
var bind = Function.prototype.bind ? nativeBind : polyfillBind;
function toArray(list, start) {
start = start || 0;
var i = list.length - start;
var ret = new Array(i);
while (i--) {
ret[i] = list[i + start];
}
return ret;
}
function extend(to, _from) {
for (var key in _from) {
to[key] = _from[key];
}
return to;
}
function toObject(arr) {
var res = {};
for (var i = 0; i < arr.length; i++) {
if (arr[i]) {
extend(res, arr[i]);
}
}
return res;
}
function noop(a, b, c) {
}
var no = function(a, b, c) {
return false;
};
var identity = function(_) {
return _;
};
function looseEqual(a, b) {
if (a === b)
return true;
var isObjectA = isObject(a);
var isObjectB = isObject(b);
if (isObjectA && isObjectB) {
try {
var isArrayA = Array.isArray(a);
var isArrayB = Array.isArray(b);
if (isArrayA && isArrayB) {
return a.length === b.length && a.every(function(e, i) {
return looseEqual(e, b[i]);
});
} else if (a instanceof Date && b instanceof Date) {
return a.getTime() === b.getTime();
} else if (!isArrayA && !isArrayB) {
var keysA = Object.keys(a);
var keysB = Object.keys(b);
return keysA.length === keysB.length && keysA.every(function(key) {
return looseEqual(a[key], b[key]);
});
} else {
return false;
}
} catch (e) {
return false;
}
} else if (!isObjectA && !isObjectB) {
return String(a) === String(b);
} else {
return false;
}
}
function looseIndexOf(arr, val) {
for (var i = 0; i < arr.length; i++) {
if (looseEqual(arr[i], val))
return i;
}
return -1;
}
function once(fn) {
var called = false;
return function() {
if (!called) {
called = true;
fn.apply(this, arguments);
}
};
}
function hasChanged(x, y) {
if (x === y) {
return x === 0 && 1 / x !== 1 / y;
} else {
return x === x || y === y;
}
}
var SSR_ATTR = "data-server-rendered";
var ASSET_TYPES = ["component", "directive", "filter"];
var LIFECYCLE_HOOKS = [
"beforeCreate",
"created",
"beforeMount",
"mounted",
"beforeUpdate",
"updated",
"beforeDestroy",
"destroyed",
"activated",
"deactivated",
"errorCaptured",
"serverPrefetch",
"renderTracked",
"renderTriggered"
];
var config = {
optionMergeStrategies: /* @__PURE__ */ Object.create(null),
silent: false,
productionTip: true,
devtools: true,
performance: false,
errorHandler: null,
warnHandler: null,
ignoredElements: [],
keyCodes: /* @__PURE__ */ Object.create(null),
isReservedTag: no,
isReservedAttr: no,
isUnknownElement: no,
getTagNamespace: noop,
parsePlatformTagName: identity,
mustUseProp: no,
async: true,
_lifecycleHooks: LIFECYCLE_HOOKS
};
var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
function isReserved(str) {
var c = (str + "").charCodeAt(0);
return c === 36 || c === 95;
}
function def(obj, key, val, enumerable) {
Object.defineProperty(obj, key, {
value: val,
enumerable: !!enumerable,
writable: true,
configurable: true
});
}
var bailRE = new RegExp("[^".concat(unicodeRegExp.source, ".$_\\d]"));
function parsePath(path) {
if (bailRE.test(path)) {
return;
}
var segments = path.split(".");
return function(obj) {
for (var i = 0; i < segments.length; i++) {
if (!obj)
return;
obj = obj[segments[i]];
}
return obj;
};
}
var hasProto = "__proto__" in {};
var inBrowser = typeof window !== "undefined";
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
var isIE = UA && /msie|trident/.test(UA);
var isIE9 = UA && UA.indexOf("msie 9.0") > 0;
var isEdge = UA && UA.indexOf("edge/") > 0;
UA && UA.indexOf("android") > 0;
var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
UA && /chrome\/\d+/.test(UA) && !isEdge;
UA && /phantomjs/.test(UA);
var isFF = UA && UA.match(/firefox\/(\d+)/);
var nativeWatch = {}.watch;
var supportsPassive = false;
if (inBrowser) {
try {
opts = {};
Object.defineProperty(opts, "passive", {
get: function() {
supportsPassive = true;
}
});
window.addEventListener("test-passive", null, opts);
} catch (e) {
}
}
var opts;
var _isServer;
var isServerRendering = function() {
if (_isServer === void 0) {
if (!inBrowser && typeof global !== "undefined") {
_isServer = global["process"] && global["process"].env.VUE_ENV === "server";
} else {
_isServer = false;
}
}
return _isServer;
};
var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
function isNative(Ctor) {
return typeof Ctor === "function" && /native code/.test(Ctor.toString());
}
var hasSymbol = typeof Symbol !== "undefined" && isNative(Symbol) && typeof Reflect !== "undefined" && isNative(Reflect.ownKeys);
var _Set;
if (typeof Set !== "undefined" && isNative(Set)) {
_Set = Set;
} else {
_Set = function() {
function Set2() {
this.set = /* @__PURE__ */ Object.create(null);
}
Set2.prototype.has = function(key) {
return this.set[key] === true;
};
Set2.prototype.add = function(key) {
this.set[key] = true;
};
Set2.prototype.clear = function() {
this.set = /* @__PURE__ */ Object.create(null);
};
return Set2;
}();
}
var currentInstance = null;
function getCurrentInstance() {
return currentInstance && { proxy: currentInstance };
}
function setCurrentInstance(vm) {
if (vm === void 0) {
vm = null;
}
if (!vm)
currentInstance && currentInstance._scope.off();
currentInstance = vm;
vm && vm._scope.on();
}
var VNode = function() {
function VNode2(tag, data, children, text, elm, context, componentOptions, asyncFactory) {
this.tag = tag;
this.data = data;
this.children = children;
this.text = text;
this.elm = elm;
this.ns = void 0;
this.context = context;
this.fnContext = void 0;
this.fnOptions = void 0;
this.fnScopeId = void 0;
this.key = data && data.key;
this.componentOptions = componentOptions;
this.componentInstance = void 0;
this.parent = void 0;
this.raw = false;
this.isStatic = false;
this.isRootInsert = true;
this.isComment = false;
this.isCloned = false;
this.isOnce = false;
this.asyncFactory = asyncFactory;
this.asyncMeta = void 0;
this.isAsyncPlaceholder = false;
}
Object.defineProperty(VNode2.prototype, "child", {
get: function() {
return this.componentInstance;
},
enumerable: false,
configurable: true
});
return VNode2;
}();
var createEmptyVNode = function(text) {
if (text === void 0) {
text = "";
}
var node = new VNode();
node.text = text;
node.isComment = true;
return node;
};
function createTextVNode(val) {
return new VNode(void 0, void 0, void 0, String(val));
}
function cloneVNode(vnode) {
var cloned = new VNode(vnode.tag, vnode.data, vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);
cloned.ns = vnode.ns;
cloned.isStatic = vnode.isStatic;
cloned.key = vnode.key;
cloned.isComment = vnode.isComment;
cloned.fnContext = vnode.fnContext;
cloned.fnOptions = vnode.fnOptions;
cloned.fnScopeId = vnode.fnScopeId;
cloned.asyncMeta = vnode.asyncMeta;
cloned.isCloned = true;
return cloned;
}
var __assign = function() {
__assign = Object.assign || function __assign2(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var uid$2 = 0;
var Dep = function() {
function Dep2() {
this.id = uid$2++;
this.subs = [];
}
Dep2.prototype.addSub = function(sub) {
this.subs.push(sub);
};
Dep2.prototype.removeSub = function(sub) {
remove$2(this.subs, sub);
};
Dep2.prototype.depend = function(info) {
if (Dep2.target) {
Dep2.target.addDep(this);
if (info && Dep2.target.onTrack) {
Dep2.target.onTrack(__assign({ effect: Dep2.target }, info));
}
}
};
Dep2.prototype.notify = function(info) {
var subs = this.subs.slice();
if (!config.async) {
subs.sort(function(a, b) {
return a.id - b.id;
});
}
for (var i = 0, l = subs.length; i < l; i++) {
if (info) {
var sub = subs[i];
sub.onTrigger && sub.onTrigger(__assign({ effect: subs[i] }, info));
}
subs[i].update();
}
};
return Dep2;
}();
Dep.target = null;
var targetStack = [];
function pushTarget(target2) {
targetStack.push(target2);
Dep.target = target2;
}
function popTarget() {
targetStack.pop();
Dep.target = targetStack[targetStack.length - 1];
}
var arrayProto = Array.prototype;
var arrayMethods = Object.create(arrayProto);
var methodsToPatch = [
"push",
"pop",
"shift",
"unshift",
"splice",
"sort",
"reverse"
];
methodsToPatch.forEach(function(method) {
var original = arrayProto[method];
def(arrayMethods, method, function mutator() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var result = original.apply(this, args);
var ob = this.__ob__;
var inserted;
switch (method) {
case "push":
case "unshift":
inserted = args;
break;
case "splice":
inserted = args.slice(2);
break;
}
if (inserted)
ob.observeArray(inserted);
if (true) {
ob.dep.notify({
type: "array mutation",
target: this,
key: method
});
} else {
ob.dep.notify();
}
return result;
});
});
var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
var NO_INIITIAL_VALUE = {};
var shouldObserve = true;
function toggleObserving(value) {
shouldObserve = value;
}
var mockDep = {
notify: noop,
depend: noop,
addSub: noop,
removeSub: noop
};
var Observer = function() {
function Observer2(value, shallow, mock) {
if (shallow === void 0) {
shallow = false;
}
if (mock === void 0) {
mock = false;
}
this.value = value;
this.shallow = shallow;
this.mock = mock;
this.dep = mock ? mockDep : new Dep();
this.vmCount = 0;
def(value, "__ob__", this);
if (isArray(value)) {
if (!mock) {
if (hasProto) {
value.__proto__ = arrayMethods;
} else {
for (var i = 0, l = arrayKeys.length; i < l; i++) {
var key = arrayKeys[i];
def(value, key, arrayMethods[key]);
}
}
}
if (!shallow) {
this.observeArray(value);
}
} else {
var keys = Object.keys(value);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
defineReactive(value, key, NO_INIITIAL_VALUE, void 0, shallow, mock);
}
}
}
Observer2.prototype.observeArray = function(value) {
for (var i = 0, l = value.length; i < l; i++) {
observe(value[i], false, this.mock);
}
};
return Observer2;
}();
function observe(value, shallow, ssrMockReactivity) {
if (!isObject(value) || isRef(value) || value instanceof VNode) {
return;
}
var ob;
if (hasOwn(value, "__ob__") && value.__ob__ instanceof Observer) {
ob = value.__ob__;
} else if (shouldObserve && (ssrMockReactivity || !isServerRendering()) && (isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value.__v_skip) {
ob = new Observer(value, shallow, ssrMockReactivity);
}
return ob;
}
function defineReactive(obj, key, val, customSetter, shallow, mock) {
var dep = new Dep();
var property = Object.getOwnPropertyDescriptor(obj, key);
if (property && property.configurable === false) {
return;
}
var getter = property && property.get;
var setter = property && property.set;
if ((!getter || setter) && (val === NO_INIITIAL_VALUE || arguments.length === 2)) {
val = obj[key];
}
var childOb = !shallow && observe(val, false, mock);
Object.defineProperty(obj, key, {
enumerable: true,
configurable: true,
get: function reactiveGetter() {
var value = getter ? getter.call(obj) : val;
if (Dep.target) {
if (true) {
dep.depend({
target: obj,
type: "get",
key
});
} else {
dep.depend();
}
if (childOb) {
childOb.dep.depend();
if (isArray(value)) {
dependArray(value);
}
}
}
return isRef(value) && !shallow ? value.value : value;
},
set: function reactiveSetter(newVal) {
var value = getter ? getter.call(obj) : val;
if (!hasChanged(value, newVal)) {
return;
}
if (customSetter) {
customSetter();
}
if (setter) {
setter.call(obj, newVal);
} else if (getter) {
return;
} else if (isRef(value) && !isRef(newVal)) {
value.value = newVal;
return;
} else {
val = newVal;
}
childOb = !shallow && observe(newVal, false, mock);
if (true) {
dep.notify({
type: "set",
target: obj,
key,
newValue: newVal,
oldValue: value
});
} else {
dep.notify();
}
}
});
return dep;
}
function set(target2, key, val) {
if (isUndef(target2) || isPrimitive(target2)) {
warn("Cannot set reactive property on undefined, null, or primitive value: ".concat(target2));
}
if (isReadonly(target2)) {
warn('Set operation on key "'.concat(key, '" failed: target is readonly.'));
return;
}
var ob = target2.__ob__;
if (isArray(target2) && isValidArrayIndex(key)) {
target2.length = Math.max(target2.length, key);
target2.splice(key, 1, val);
if (ob && !ob.shallow && ob.mock) {
observe(val, false, true);
}
return val;
}
if (key in target2 && !(key in Object.prototype)) {
target2[key] = val;
return val;
}
if (target2._isVue || ob && ob.vmCount) {
warn("Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option.");
return val;
}
if (!ob) {
target2[key] = val;
return val;
}
defineReactive(ob.value, key, val, void 0, ob.shallow, ob.mock);
if (true) {
ob.dep.notify({
type: "add",
target: target2,
key,
newValue: val,
oldValue: void 0
});
} else {
ob.dep.notify();
}
return val;
}
function del(target2, key) {
if (isUndef(target2) || isPrimitive(target2)) {
warn("Cannot delete reactive property on undefined, null, or primitive value: ".concat(target2));
}
if (isArray(target2) && isValidArrayIndex(key)) {
target2.splice(key, 1);
return;
}
var ob = target2.__ob__;
if (target2._isVue || ob && ob.vmCount) {
warn("Avoid deleting properties on a Vue instance or its root $data - just set it to null.");
return;
}
if (isReadonly(target2)) {
warn('Delete operation on key "'.concat(key, '" failed: target is readonly.'));
return;
}
if (!hasOwn(target2, key)) {
return;
}
delete target2[key];
if (!ob) {
return;
}
if (true) {
ob.dep.notify({
type: "delete",
target: target2,
key
});
} else {
ob.dep.notify();
}
}
function dependArray(value) {
for (var e = void 0, i = 0, l = value.length; i < l; i++) {
e = value[i];
if (e && e.__ob__) {
e.__ob__.dep.depend();
}
if (isArray(e)) {
dependArray(e);
}
}
}
function reactive(target2) {
makeReactive(target2, false);
return target2;
}
function shallowReactive(target2) {
makeReactive(target2, true);
def(target2, "__v_isShallow", true);
return target2;
}
function makeReactive(target2, shallow) {
if (!isReadonly(target2)) {
if (true) {
if (isArray(target2)) {
warn("Avoid using Array as root value for ".concat(shallow ? "shallowReactive()" : "reactive()", " as it cannot be tracked in watch() or watchEffect(). Use ").concat(shallow ? "shallowRef()" : "ref()", " instead. This is a Vue-2-only limitation."));
}
var existingOb = target2 && target2.__ob__;
if (existingOb && existingOb.shallow !== shallow) {
warn("Target is already a ".concat(existingOb.shallow ? "" : "non-", "shallow reactive object, and cannot be converted to ").concat(shallow ? "" : "non-", "shallow."));
}
}
var ob = observe(target2, shallow, isServerRendering());
if (!ob) {
if (target2 == null || isPrimitive(target2)) {
warn("value cannot be made reactive: ".concat(String(target2)));
}
if (isCollectionType(target2)) {
warn("Vue 2 does not support reactive collection types such as Map or Set.");
}
}
}
}
function isReactive(value) {
if (isReadonly(value)) {
return isReactive(value["__v_raw"]);
}
return !!(value && value.__ob__);
}
function isShallow(value) {
return !!(value && value.__v_isShallow);
}
function isReadonly(value) {
return !!(value && value.__v_isReadonly);
}
function isProxy(value) {
return isReactive(value) || isReadonly(value);
}
function toRaw(observed) {
var raw = observed && observed["__v_raw"];
return raw ? toRaw(raw) : observed;
}
function markRaw(value) {
def(value, "__v_skip", true);
return value;
}
function isCollectionType(value) {
var type = toRawType(value);
return type === "Map" || type === "WeakMap" || type === "Set" || type === "WeakSet";
}
var RefFlag = "__v_isRef";
function isRef(r) {
return !!(r && r.__v_isRef === true);
}
function ref$1(value) {
return createRef(value, false);
}
function shallowRef(value) {
return createRef(value, true);
}
function createRef(rawValue, shallow) {
if (isRef(rawValue)) {
return rawValue;
}
var ref2 = {};
def(ref2, RefFlag, true);
def(ref2, "__v_isShallow", shallow);
def(ref2, "dep", defineReactive(ref2, "value", rawValue, null, shallow, isServerRendering()));
return ref2;
}
function triggerRef(ref2) {
if (!ref2.dep) {
warn("received object is not a triggerable ref.");
}
if (true) {
ref2.dep && ref2.dep.notify({
type: "set",
target: ref2,
key: "value"
});
} else {
ref2.dep && ref2.dep.notify();
}
}
function unref(ref2) {
return isRef(ref2) ? ref2.value : ref2;
}
function proxyRefs(objectWithRefs) {
if (isReactive(objectWithRefs)) {
return objectWithRefs;
}
var proxy2 = {};
var keys = Object.keys(objectWithRefs);
for (var i = 0; i < keys.length; i++) {
proxyWithRefUnwrap(proxy2, objectWithRefs, keys[i]);
}
return proxy2;
}
function proxyWithRefUnwrap(target2, source, key) {
Object.defineProperty(target2, key, {
enumerable: true,
configurable: true,
get: function() {
var val = source[key];
if (isRef(val)) {
return val.value;
} else {
var ob = val && val.__ob__;
if (ob)
ob.dep.depend();
return val;
}
},
set: function(value) {
var oldValue = source[key];
if (isRef(oldValue) && !isRef(value)) {
oldValue.value = value;
} else {
source[key] = value;
}
}
});
}
function customRef(factory) {
var dep = new Dep();
var _a = factory(function() {
if (true) {
dep.depend({
target: ref2,
type: "get",
key: "value"
});
} else {
dep.depend();
}
}, function() {
if (true) {
dep.notify({
target: ref2,
type: "set",
key: "value"
});
} else {
dep.notify();
}
}), get = _a.get, set2 = _a.set;
var ref2 = {
get value() {
return get();
},
set value(newVal) {
set2(newVal);
}
};
def(ref2, RefFlag, true);
return ref2;
}
function toRefs(object) {
if (!isReactive(object)) {
warn("toRefs() expects a reactive object but received a plain one.");
}
var ret = isArray(object) ? new Array(object.length) : {};
for (var key in object) {
ret[key] = toRef(object, key);
}
return ret;
}
function toRef(object, key, defaultValue) {
var val = object[key];
if (isRef(val)) {
return val;
}
var ref2 = {
get value() {
var val2 = object[key];
return val2 === void 0 ? defaultValue : val2;
},
set value(newVal) {
object[key] = newVal;
}
};
def(ref2, RefFlag, true);
return ref2;
}
var rawToReadonlyFlag = "__v_rawToReadonly";
var rawToShallowReadonlyFlag = "__v_rawToShallowReadonly";
function readonly(target2) {
return createReadonly(target2, false);
}
function createReadonly(target2, shallow) {
if (!isPlainObject(target2)) {
if (true) {
if (isArray(target2)) {
warn("Vue 2 does not support readonly arrays.");
} else if (isCollectionType(target2)) {
warn("Vue 2 does not support readonly collection types such as Map or Set.");
} else {
warn("value cannot be made readonly: ".concat(typeof target2));
}
}
return target2;
}
if (isReadonly(target2)) {
return target2;
}
var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;
var existingProxy = target2[existingFlag];
if (existingProxy) {
return existingProxy;
}
var proxy2 = Object.create(Object.getPrototypeOf(target2));
def(target2, existingFlag, proxy2);
def(proxy2, "__v_isReadonly", true);
def(proxy2, "__v_raw", target2);
if (isRef(target2)) {
def(proxy2, RefFlag, true);
}
if (shallow || isShallow(target2)) {
def(proxy2, "__v_isShallow", true);
}
var keys = Object.keys(target2);
for (var i = 0; i < keys.length; i++) {
defineReadonlyProperty(proxy2, target2, keys[i], shallow);
}
return proxy2;
}
function defineReadonlyProperty(proxy2, target2, key, shallow) {
Object.defineProperty(proxy2, key, {
enumerable: true,
configurable: true,
get: function() {
var val = target2[key];
return shallow || !isPlainObject(val) ? val : readonly(val);
},
set: function() {
warn('Set operation on key "'.concat(key, '" failed: target is readonly.'));
}
});
}
function shallowReadonly(target2) {
return createReadonly(target2, true);
}
function computed(getterOrOptions, debugOptions) {
var getter;
var setter;
var onlyGetter = isFunction(getterOrOptions);
if (onlyGetter) {
getter = getterOrOptions;
setter = true ? function() {
warn("Write operation failed: computed value is readonly");
} : noop;
} else {
getter = getterOrOptions.get;
setter = getterOrOptions.set;
}
var watcher = isServerRendering() ? null : new Watcher(currentInstance, getter, noop, { lazy: true });
if (watcher && debugOptions) {
watcher.onTrack = debugOptions.onTrack;
watcher.onTrigger = debugOptions.onTrigger;
}
var ref2 = {
effect: watcher,
get value() {
if (watcher) {
if (watcher.dirty) {
watcher.evaluate();
}
if (Dep.target) {
if (Dep.target.onTrack) {
Dep.target.onTrack({
effect: Dep.target,
target: ref2,
type: "get",
key: "value"
});
}
watcher.depend();
}
return watcher.value;
} else {
return getter();
}
},
set value(newVal) {
setter(newVal);
}
};
def(ref2, RefFlag, true);
def(ref2, "__v_isReadonly", onlyGetter);
return ref2;
}
var WATCHER = "watcher";
var WATCHER_CB = "".concat(WATCHER, " callback");
var WATCHER_GETTER = "".concat(WATCHER, " getter");
var WATCHER_CLEANUP = "".concat(WATCHER, " cleanup");
function watchEffect(effect, options) {
return doWatch(effect, null, options);
}
function watchPostEffect(effect, options) {
return doWatch(effect, null, true ? __assign(__assign({}, options), { flush: "post" }) : { flush: "post" });
}
function watchSyncEffect(effect, options) {
return doWatch(effect, null, true ? __assign(__assign({}, options), { flush: "sync" }) : { flush: "sync" });
}
var INITIAL_WATCHER_VALUE = {};
function watch(source, cb, options) {
if (typeof cb !== "function") {
warn("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature.");
}
return doWatch(source, cb, options);
}
function doWatch(source, cb, _a) {
var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? "pre" : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;
if (!cb) {
if (immediate !== void 0) {
warn('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.');
}
if (deep !== void 0) {
warn('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.');
}
}
var warnInvalidSource = function(s) {
warn("Invalid watch source: ".concat(s, ". A watch source can only be a getter/effect ") + "function, a ref, a reactive object, or an array of these types.");
};
var instance = currentInstance;
var call = function(fn, type, args) {
if (args === void 0) {
args = null;
}
return invokeWithErrorHandling(fn, null, args, instance, type);
};
var getter;
var forceTrigger = false;
var isMultiSource = false;
if (isRef(source)) {
getter = function() {
return source.value;
};
forceTrigger = isShallow(source);
} else if (isReactive(source)) {
getter = function() {
source.__ob__.dep.depend();
return source;
};
deep = true;
} else if (isArray(source)) {
isMultiSource = true;
forceTrigger = source.some(function(s) {
return isReactive(s) || isShallow(s);
});
getter = function() {
return source.map(function(s) {
if (isRef(s)) {
return s.value;
} else if (isReactive(s)) {
return traverse(s);
} else if (isFunction(s)) {
return call(s, WATCHER_GETTER);
} else {
warnInvalidSource(s);
}
});
};
} else if (isFunction(source)) {
if (cb) {
getter = function() {
return call(source, WATCHER_GETTER);
};
} else {
getter = function() {
if (instance && instance._isDestroyed) {
return;
}
if (cleanup) {
cleanup();
}
return call(source, WATCHER, [onCleanup]);
};
}
} else {
getter = noop;
warnInvalidSource(source);
}
if (cb && deep) {
var baseGetter_1 = getter;
getter = function() {
return traverse(baseGetter_1());
};
}
var cleanup;
var onCleanup = function(fn) {
cleanup = watcher.onStop = function() {
call(fn, WATCHER_CLEANUP);
};
};
if (isServerRendering()) {
onCleanup = noop;
if (!cb) {
getter();
} else if (immediate) {
call(cb, WATCHER_CB, [
getter(),
isMultiSource ? [] : void 0,
onCleanup
]);
}
return noop;
}
var watcher = new Watcher(currentInstance, getter, noop, {
lazy: true
});
watcher.noRecurse = !cb;
var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
watcher.run = function() {
if (!watcher.active && !(flush === "pre" && instance && instance._isBeingDestroyed)) {
return;
}
if (cb) {
var newValue = watcher.get();
if (deep || forceTrigger || (isMultiSource ? newValue.some(function(v, i) {
return hasChanged(v, oldValue[i]);
}) : hasChanged(newValue, oldValue))) {
if (cleanup) {
cleanup();
}
call(cb, WATCHER_CB, [
newValue,
oldValue === INITIAL_WATCHER_VALUE ? void 0 : oldValue,
onCleanup
]);
oldValue = newValue;
}
} else {
watcher.get();
}
};
if (flush === "sync") {
watcher.update = watcher.run;
} else if (flush === "post") {
watcher.post = true;
watcher.update = function() {
return queueWatcher(watcher);
};
} else {
watcher.update = function() {
if (instance && instance === currentInstance && !instance._isMounted) {
var buffer = instance._preWatchers || (instance._preWatchers = []);
if (buffer.indexOf(watcher) < 0)
buffer.push(watcher);
} else {
queueWatcher(watcher);
}
};
}
if (true) {
watcher.onTrack = onTrack;
watcher.onTrigger = onTrigger;
}
if (cb) {
if (immediate) {
watcher.run();
} else {
oldValue = watcher.get();
}
} else if (flush === "post" && instance) {
instance.$once("hook:mounted", function() {
return watcher.get();
});
} else {
watcher.get();
}
return function() {
watcher.teardown();
};
}
var activeEffectScope;
var EffectScope = function() {
function EffectScope2(detached) {
if (detached === void 0) {
detached = false;
}
this.active = true;
this.effects = [];
this.cleanups = [];
if (!detached && activeEffectScope) {
this.parent = activeEffectScope;
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
}
}
EffectScope2.prototype.run = function(fn) {
if (this.active) {
var currentEffectScope = activeEffectScope;
try {
activeEffectScope = this;
return fn();
} finally {
activeEffectScope = currentEffectScope;
}
} else if (true) {
warn("cannot run an inactive effect scope.");
}
};
EffectScope2.prototype.on = function() {
activeEffectScope = this;
};
EffectScope2.prototype.off = function() {
activeEffectScope = this.parent;
};
EffectScope2.prototype.stop = function(fromParent) {
if (this.active) {
var i = void 0, l = void 0;
for (i = 0, l = this.effects.length; i < l; i++) {
this.effects[i].teardown();
}
for (i = 0, l = this.cleanups.length; i < l; i++) {
this.cleanups[i]();
}
if (this.scopes) {
for (i = 0, l = this.scopes.length; i < l; i++) {
this.scopes[i].stop(true);
}
}
if (this.parent && !fromParent) {
var last = this.parent.scopes.pop();
if (last && last !== this) {
this.parent.scopes[this.index] = last;
last.index = this.index;
}
}
this.active = false;
}
};
return EffectScope2;
}();
function effectScope(detached) {
return new EffectScope(detached);
}
function recordEffectScope(effect, scope) {
if (scope === void 0) {
scope = activeEffectScope;
}
if (scope && scope.active) {
scope.effects.push(effect);
}
}
function getCurrentScope() {
return activeEffectScope;
}
function onScopeDispose(fn) {
if (activeEffectScope) {
activeEffectScope.cleanups.push(fn);
} else if (true) {
warn("onScopeDispose() is called when there is no active effect scope to be associated with.");
}
}
function provide(key, value) {
if (!currentInstance) {
if (true) {
warn("provide() can only be used inside setup().");
}
} else {
resolveProvided(currentInstance)[key] = value;
}
}
function resolveProvided(vm) {
var existing = vm._provided;
var parentProvides = vm.$parent && vm.$parent._provided;
if (parentProvides === existing) {
return vm._provided = Object.create(parentProvides);
} else {
return existing;
}
}
function inject(key, defaultValue, treatDefaultAsFactory) {
if (treatDefaultAsFactory === void 0) {
treatDefaultAsFactory = false;
}
var instance = currentInstance;
if (instance) {
var provides = instance.$parent && instance.$parent._provided;
if (provides && key in provides) {
return provides[key];
} else if (arguments.length > 1) {
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance) : defaultValue;
} else if (true) {
warn('injection "'.concat(String(key), '" not found.'));
}
} else if (true) {
warn("inject() can only be used inside setup() or functional components.");
}
}
var normalizeEvent = cached(function(name) {
var passive = name.charAt(0) === "&";
name = passive ? name.slice(1) : name;
var once2 = name.charAt(0) === "~";
name = once2 ? name.slice(1) : name;
var capture = name.charAt(0) === "!";
name = capture ? name.slice(1) : name;
return {
name,
once: once2,
capture,
passive
};
});
function createFnInvoker(fns, vm) {
function invoker() {
var fns2 = invoker.fns;
if (isArray(fns2)) {
var cloned = fns2.slice();
for (var i = 0; i < cloned.length; i++) {
invokeWithErrorHandling(cloned[i], null, arguments, vm, "v-on handler");
}
} else {
return invokeWithErrorHandling(fns2, null, arguments, vm, "v-on handler");
}
}
invoker.fns = fns;
return invoker;
}
function updateListeners(on, oldOn, add2, remove2, createOnceHandler2, vm) {
var name, cur, old, event;
for (name in on) {
cur = on[name];
old = oldOn[name];
event = normalizeEvent(name);
if (isUndef(cur)) {
warn('Invalid handler for event "'.concat(event.name, '": got ') + String(cur), vm);
} else if (isUndef(old)) {
if (isUndef(cur.fns)) {
cur = on[name] = createFnInvoker(cur, vm);
}
if (isTrue(event.once)) {
cur = on[name] = createOnceHandler2(event.name, cur, event.capture);
}
add2(event.name, cur, event.capture, event.passive, event.params);
} else if (cur !== old) {
old.fns = cur;
on[name] = old;
}
}
for (name in oldOn) {
if (isUndef(on[name])) {
event = normalizeEvent(name);
remove2(event.name, oldOn[name], event.capture);
}
}
}
function mergeVNodeHook(def2, hookKey, hook) {
if (def2 instanceof VNode) {
def2 = def2.data.hook || (def2.data.hook = {});
}
var invoker;
var oldHook = def2[hookKey];
function wrappedHook() {
hook.apply(this, arguments);
remove$2(invoker.fns, wrappedHook);
}
if (isUndef(oldHook)) {
invoker = createFnInvoker([wrappedHook]);
} else {
if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
invoker = oldHook;
invoker.fns.push(wrappedHook);
} else {
invoker = createFnInvoker([oldHook, wrappedHook]);
}
}
invoker.merged = true;
def2[hookKey] = invoker;
}
function extractPropsFromVNodeData(data, Ctor, tag) {
var propOptions = Ctor.options.props;
if (isUndef(propOptions)) {
return;
}
var res = {};
var attrs2 = data.attrs, props2 = data.props;
if (isDef(attrs2) || isDef(props2)) {
for (var key in propOptions) {
var altKey = hyphenate(key);
if (true) {
var keyInLowerCase = key.toLowerCase();
if (key !== keyInLowerCase && attrs2 && hasOwn(attrs2, keyInLowerCase)) {
tip('Prop "'.concat(keyInLowerCase, '" is passed to component ') + "".concat(formatComponentName(tag || Ctor), ", but the declared prop name is") + ' "'.concat(key, '". ') + "Note that HTML attributes are case-insensitive and camelCased props need to use their kebab-case equivalents when using in-DOM " + 'templates. You should probably use "'.concat(altKey, '" instead of "').concat(key, '".'));
}
}
checkProp(res, props2, key, altKey, true) || checkProp(res, attrs2, key, altKey, false);
}
}
return res;
}
function checkProp(res, hash, key, altKey, preserve) {
if (isDef(hash)) {
if (hasOwn(hash, key)) {
res[key] = hash[key];
if (!preserve) {
delete hash[key];
}
return true;
} else if (hasOwn(hash, altKey)) {
res[key] = hash[altKey];
if (!preserve) {
delete hash[altKey];
}
return true;
}
}
return false;
}
function simpleNormalizeChildren(children) {
for (var i = 0; i < children.length; i++) {
if (isArray(children[i])) {
return Array.prototype.concat.apply([], children);
}
}
return children;
}
function normalizeChildren(children) {
return isPrimitive(children) ? [createTextVNode(children)] : isArray(children) ? normalizeArrayChildren(children) : void 0;
}
function isTextNode(node) {
return isDef(node) && isDef(node.text) && isFalse(node.isComment);
}
function normalizeArrayChildren(children, nestedIndex) {
var res = [];
var i, c, lastIndex, last;
for (i = 0; i < children.length; i++) {
c = children[i];
if (isUndef(c) || typeof c === "boolean")
continue;
lastIndex = res.length - 1;
last = res[lastIndex];
if (isArray(c)) {
if (c.length > 0) {
c = normalizeArrayChildren(c, "".concat(nestedIndex || "", "_").concat(i));
if (isTextNode(c[0]) && isTextNode(last)) {
res[lastIndex] = createTextVNode(last.text + c[0].text);
c.shift();
}
res.push.apply(res, c);
}
} else if (isPrimitive(c)) {
if (isTextNode(last)) {
res[lastIndex] = createTextVNode(last.text + c);
} else if (c !== "") {
res.push(createTextVNode(c));
}
} else {
if (isTextNode(c) && isTextNode(last)) {
res[lastIndex] = createTextVNode(last.text + c.text);
} else {
if (isTrue(children._isVList) && isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex)) {
c.key = "__vlist".concat(nestedIndex, "_").concat(i, "__");
}
res.push(c);
}
}
}
return res;
}
function renderList(val, render) {
var ret = null, i, l, keys, key;
if (isArray(val) || typeof val === "string") {
ret = new Array(val.length);
for (i = 0, l = val.length; i < l; i++) {
ret[i] = render(val[i], i);
}
} else if (typeof val === "number") {
ret = new Array(val);
for (i = 0; i < val; i++) {
ret[i] = render(i + 1, i);
}
} else if (isObject(val)) {
if (hasSymbol && val[Symbol.iterator]) {
ret = [];
var iterator = val[Symbol.iterator]();
var result = iterator.next();
while (!result.done) {
ret.push(render(result.value, ret.length));
result = iterator.next();
}
} else {
keys = Object.keys(val);
ret = new Array(keys.length);
for (i = 0, l = keys.length; i < l; i++) {
key = keys[i];
ret[i] = render(val[key], key, i);
}
}
}
if (!isDef(ret)) {
ret = [];
}
ret._isVList = true;
return ret;
}
function renderSlot(name, fallbackRender, props2, bindObject) {
var scopedSlotFn = this.$scopedSlots[name];
var nodes;
if (scopedSlotFn) {
props2 = props2 || {};
if (bindObject) {
if (!isObject(bindObject)) {
warn("slot v-bind without argument expects an Object", this);
}
props2 = extend(extend({}, bindObject), props2);
}
nodes = scopedSlotFn(props2) || (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
} else {
nodes = this.$slots[name] || (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
}
var target2 = props2 && props2.slot;
if (target2) {
return this.$createElement("template", { slot: target2 }, nodes);
} else {
return nodes;
}
}
function resolveFilter(id) {
return resolveAsset(this.$options, "filters", id, true) || identity;
}
function isKeyNotMatch(expect, actual) {
if (isArray(expect)) {
return expect.indexOf(actual) === -1;
} else {
return expect !== actual;
}
}
function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {
var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
return isKeyNotMatch(builtInKeyName, eventKeyName);
} else if (mappedKeyCode) {
return isKeyNotMatch(mappedKeyCode, eventKeyCode);
} else if (eventKeyName) {
return hyphenate(eventKeyName) !== key;
}
return eventKeyCode === void 0;
}
function bindObjectProps(data, tag, value, asProp, isSync) {
if (value) {
if (!isObject(value)) {
warn("v-bind without argument expects an Object or Array value", this);
} else {
if (isArray(value)) {
value = toObject(value);
}
var hash = void 0;
var _loop_1 = function(key2) {
if (key2 === "class" || key2 === "style" || isReservedAttribute(key2)) {
hash = data;
} else {
var type = data.attrs && data.attrs.type;
hash = asProp || config.mustUseProp(tag, type, key2) ? data.domProps || (data.domProps = {}) : data.attrs || (data.attrs = {});
}
var camelizedKey = camelize(key2);
var hyphenatedKey = hyphenate(key2);
if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
hash[key2] = value[key2];
if (isSync) {
var on = data.on || (data.on = {});
on["update:".concat(key2)] = function($event) {
value[key2] = $event;
};
}
}
};
for (var key in value) {
_loop_1(key);
}
}
}
return data;
}
function renderStatic(index2, isInFor) {
var cached2 = this._staticTrees || (this._staticTrees = []);
var tree = cached2[index2];
if (tree && !isInFor) {
return tree;
}
tree = cached2[index2] = this.$options.staticRenderFns[index2].call(this._renderProxy, this._c, this);
markStatic(tree, "__static__".concat(index2), false);
return tree;
}
function markOnce(tree, index2, key) {
markStatic(tree, "__once__".concat(index2).concat(key ? "_".concat(key) : ""), true);
return tree;
}
function markStatic(tree, key, isOnce) {
if (isArray(tree)) {
for (var i = 0; i < tree.length; i++) {
if (tree[i] && typeof tree[i] !== "string") {
markStaticNode(tree[i], "".concat(key, "_").concat(i), isOnce);
}
}
} else {
markStaticNode(tree, key, isOnce);
}
}
function markStaticNode(node, key, isOnce) {
node.isStatic = true;
node.key = key;
node.isOnce = isOnce;
}
function bindObjectListeners(data, value) {
if (value) {
if (!isPlainObject(value)) {
warn("v-on without argument expects an Object value", this);
} else {
var on = data.on = data.on ? extend({}, data.on) : {};
for (var key in value) {
var existing = on[key];
var ours = value[key];
on[key] = existing ? [].concat(existing, ours) : ours;
}
}
}
return data;
}
function resolveScopedSlots(fns, res, hasDynamicKeys, contentHashKey) {
res = res || { $stable: !hasDynamicKeys };
for (var i = 0; i < fns.length; i++) {
var slot = fns[i];
if (isArray(slot)) {
resolveScopedSlots(slot, res, hasDynamicKeys);
} else if (slot) {
if (slot.proxy) {
slot.fn.proxy = true;
}
res[slot.key] = slot.fn;
}
}
if (contentHashKey) {
res.$key = contentHashKey;
}
return res;
}
function bindDynamicKeys(baseObj, values) {
for (var i = 0; i < values.length; i += 2) {
var key = values[i];
if (typeof key === "string" && key) {
baseObj[values[i]] = values[i + 1];
} else if (key !== "" && key !== null) {
warn("Invalid value for dynamic directive argument (expected string or null): ".concat(key), this);
}
}
return baseObj;
}
function prependModifier(value, symbol) {
return typeof value === "string" ? symbol + value : value;
}
function installRenderHelpers(target2) {
target2._o = markOnce;
target2._n = toNumber;
target2._s = toString;
target2._l = renderList;
target2._t = renderSlot;
target2._q = looseEqual;
target2._i = looseIndexOf;
target2._m = renderStatic;
target2._f = resolveFilter;
target2._k = checkKeyCodes;
target2._b = bindObjectProps;
target2._v = createTextVNode;
target2._e = createEmptyVNode;
target2._u = resolveScopedSlots;
target2._g = bindObjectListeners;
target2._d = bindDynamicKeys;
target2._p = prependModifier;
}
function resolveSlots(children, context) {
if (!children || !children.length) {
return {};
}
var slots = {};
for (var i = 0, l = children.length; i < l; i++) {
var child = children[i];
var data = child.data;
if (data && data.attrs && data.attrs.slot) {
delete data.attrs.slot;
}
if ((child.context === context || child.fnContext === context) && data && data.slot != null) {
var name_1 = data.slot;
var slot = slots[name_1] || (slots[name_1] = []);
if (child.tag === "template") {
slot.push.apply(slot, child.children || []);
} else {
slot.push(child);
}
} else {
(slots.default || (slots.default = [])).push(child);
}
}
for (var name_2 in slots) {
if (slots[name_2].every(isWhitespace)) {
delete slots[name_2];
}
}
return slots;
}
function isWhitespace(node) {
return node.isComment && !node.asyncFactory || node.text === " ";
}
function isAsyncPlaceholder(node) {
return node.isComment && node.asyncFactory;
}
function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {
var res;
var hasNormalSlots = Object.keys(normalSlots).length > 0;
var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;
var key = scopedSlots && scopedSlots.$key;
if (!scopedSlots) {
res = {};
} else if (scopedSlots._normalized) {
return scopedSlots._normalized;
} else if (isStable && prevScopedSlots && prevScopedSlots !== emptyObject && key === prevScopedSlots.$key && !hasNormalSlots && !prevScopedSlots.$hasNormal) {
return prevScopedSlots;
} else {
res = {};
for (var key_1 in scopedSlots) {
if (scopedSlots[key_1] && key_1[0] !== "$") {
res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);
}
}
}
for (var key_2 in normalSlots) {
if (!(key_2 in res)) {
res[key_2] = proxyNormalSlot(normalSlots, key_2);
}
}
if (scopedSlots && Object.isExtensible(scopedSlots)) {
scopedSlots._normalized = res;
}
def(res, "$stable", isStable);
def(res, "$key", key);
def(res, "$hasNormal", hasNormalSlots);
return res;
}
function normalizeScopedSlot(vm, normalSlots, key, fn) {
var normalized = function() {
var cur = currentInstance;
setCurrentInstance(vm);
var res = arguments.length ? fn.apply(null, arguments) : fn({});
res = res && typeof res === "object" && !isArray(res) ? [res] : normalizeChildren(res);
var vnode = res && res[0];
setCurrentInstance(cur);
return res && (!vnode || res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode)) ? void 0 : res;
};
if (fn.proxy) {
Object.defineProperty(normalSlots, key, {
get: normalized,
enumerable: true,
configurable: true
});
}
return normalize