(function(factory) { typeof define === "function" && define.amd ? define(factory) : factory(); })(function() { "use strict"; var base = "* {\n margin: 0;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-tap-highlight-color: transparent;\n}\n\nhtml,\nbody {\n -webkit-user-select: none;\n user-select: none;\n width: 100%;\n}\n\nhtml {\n height: 100%;\n height: 100vh;\n width: 100%;\n width: 100vw;\n}\n\nbody {\n overflow-x: hidden;\n background-color: white;\n}\n\ninput[type='search']::-webkit-search-cancel-button {\n display: none;\n}\n\n.uni-loading,\nuni-button[loading]:before {\n background: transparent\n url('data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=')\n no-repeat;\n}\n\n.uni-loading {\n width: 20px;\n height: 20px;\n display: inline-block;\n vertical-align: middle;\n animation: uni-loading 1s steps(12, end) infinite;\n background-size: 100%;\n}\n\n@keyframes uni-loading {\n 0% {\n transform: rotate3d(0, 0, 1, 0deg);\n }\n\n 100% {\n transform: rotate3d(0, 0, 1, 360deg);\n }\n}\n"; var nvue = "[nvue] uni-view,\n[nvue] uni-label,\n[nvue] uni-swiper-item,\n[nvue] uni-scroll-view {\n display: flex;\n flex-shrink: 0;\n flex-grow: 0;\n flex-basis: auto;\n align-items: stretch;\n align-content: flex-start;\n}\n\n[nvue] uni-button {\n margin: 0;\n}\n\n[nvue-dir-row] uni-view,\n[nvue-dir-row] uni-label,\n[nvue-dir-row] uni-swiper-item {\n flex-direction: row;\n}\n\n[nvue-dir-column] uni-view,\n[nvue-dir-column] uni-label,\n[nvue-dir-column] uni-swiper-item {\n flex-direction: column;\n}\n\n[nvue-dir-row-reverse] uni-view,\n[nvue-dir-row-reverse] uni-label,\n[nvue-dir-row-reverse] uni-swiper-item {\n flex-direction: row-reverse;\n}\n\n[nvue-dir-column-reverse] uni-view,\n[nvue-dir-column-reverse] uni-label,\n[nvue-dir-column-reverse] uni-swiper-item {\n flex-direction: column-reverse;\n}\n\n[nvue] uni-view,\n[nvue] uni-image,\n[nvue] uni-input,\n[nvue] uni-scroll-view,\n[nvue] uni-swiper,\n[nvue] uni-swiper-item,\n[nvue] uni-text,\n[nvue] uni-textarea,\n[nvue] uni-video {\n position: relative;\n border: 0px solid #000000;\n box-sizing: border-box;\n}\n\n[nvue] uni-swiper-item {\n position: absolute;\n}\n"; const VD_SYNC = "vdSync"; const ON_WEBVIEW_READY = "onWebviewReady"; function makeMap(str, expectsLowerCase) { const map = Object.create(null); const list = str.split(","); for (let i = 0; i < list.length; i++) { map[list[i]] = true; } return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; } const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"; const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED); const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); function normalizeStyle(value) { if (isArray(value)) { const res = {}; for (let i = 0; i < value.length; i++) { const item = value[i]; const normalized = normalizeStyle(isString(item) ? parseStringStyle(item) : item); if (normalized) { for (const key in normalized) { res[key] = normalized[key]; } } } return res; } else if (isObject$1(value)) { return value; } } const listDelimiterRE = /;(?![^(]*\))/g; const propertyDelimiterRE = /:(.+)/; function parseStringStyle(cssText) { const ret = {}; cssText.split(listDelimiterRE).forEach((item) => { if (item) { const tmp = item.split(propertyDelimiterRE); tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); } }); return ret; } function normalizeClass(value) { let res = ""; if (isString(value)) { res = value; } else if (isArray(value)) { for (let i = 0; i < value.length; i++) { const normalized = normalizeClass(value[i]); if (normalized) { res += normalized + " "; } } } else if (isObject$1(value)) { for (const name in value) { if (value[name]) { res += name + " "; } } } return res.trim(); } const EMPTY_OBJ = {}; const EMPTY_ARR = []; const NOOP = () => { }; const NO = () => false; const onRE = /^on[^a-z]/; const isOn = (key) => onRE.test(key); const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { const i = arr.indexOf(el); if (i > -1) { arr.splice(i, 1); } }; const hasOwnProperty$1 = Object.prototype.hasOwnProperty; const hasOwn$1 = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; const isMap = (val) => toTypeString(val) === "[object Map]"; const isSet = (val) => toTypeString(val) === "[object Set]"; const isFunction = (val) => typeof val === "function"; const isString = (val) => typeof val === "string"; const isSymbol = (val) => typeof val === "symbol"; const isObject$1 = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { return isObject$1(val) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { return toTypeString(value).slice(8, -1); }; const isPlainObject = (val) => toTypeString(val) === "[object Object]"; const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"); const cacheStringFunction = (fn) => { const cache = Object.create(null); return (str) => { const hit = cache[str]; return hit || (cache[str] = fn(str)); }; }; const camelizeRE = /-(\w)/g; const camelize = cacheStringFunction((str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); const hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue); const invokeArrayFns = (fns, arg) => { for (let i = 0; i < fns.length; i++) { fns[i](arg); } }; const def = (obj, key, value) => { Object.defineProperty(obj, key, { configurable: true, enumerable: false, value }); }; const toNumber = (val) => { const n = parseFloat(val); return isNaN(n) ? val : n; }; function formatLog(module, ...args) { return `[${Date.now()}][${module}]\uFF1A${args.map((arg) => JSON.stringify(arg)).join(" ")}`; } function getCustomDataset(el) { return extend({}, el.dataset, el.__uniDataset); } function normalizeTarget(el) { const { id, offsetTop, offsetLeft } = el; return { id, dataset: getCustomDataset(el), offsetTop, offsetLeft }; } function plusReady(callback) { if (typeof callback !== "function") { return; } if (window.plus) { return callback(); } document.addEventListener("plusready", callback); } function normalizeEventType(type, options) { if (options) { if (options.capture) { type += "Capture"; } if (options.once) { type += "Once"; } if (options.passive) { type += "Passive"; } } return `on${capitalize(camelize(type))}`; } const optionsModifierRE$1 = /(?:Once|Passive|Capture)$/; function parseEventName(name) { let options; if (optionsModifierRE$1.test(name)) { options = {}; let m; while (m = name.match(optionsModifierRE$1)) { name = name.slice(0, name.length - m[0].length); options[m[0].toLowerCase()] = true; } } return [hyphenate(name.slice(2)), options]; } const EventModifierFlags = { stop: 1, prevent: 1 << 1, self: 1 << 2 }; const EVENT_MAP = { onClick: ".e0", onChange: ".e1", onInput: ".e2", onLoad: ".e3", onError: ".e4", onTouchstart: ".e5", onTouchmove: ".e6", onTouchcancel: ".e7", onTouchend: ".e8", onLongpress: ".e9", onTransitionend: ".ea", onAnimationstart: ".eb", onAnimationiteration: ".ec", onAnimationend: ".ed", onTouchforcechange: ".ee" }; const OPTIONS = [ "Capture", "CaptureOnce", "CapturePassive", "CaptureOncePassive", "Once", "OncePassive", "Passive" ]; const BASE_ATTR_MAP = { class: ".c", style: ".s", "hover-class": ".h0", "hover-stop-propagation": ".h1", "hover-start-time": ".h2", "hover-stay-time": ".h3" }; const ATTR_MAP = /* @__PURE__ */ (() => { return Object.assign(BASE_ATTR_MAP, Object.keys(EVENT_MAP).reduce((res, name) => { const value = EVENT_MAP[name]; res[name] = value; OPTIONS.forEach((v, i) => { res[name + v] = value + i; }); return res; }, Object.create(null))); })(); function decodeObjMap(objMap) { return Object.keys(objMap).reduce((map, name) => { map[objMap[name]] = name; return map; }, Object.create(null)); } const DECODED_ATTR_MAP = /* @__PURE__ */ decodeObjMap(ATTR_MAP); function decodeAttr(name) { return DECODED_ATTR_MAP[name] || name; } function once(fn, ctx = null) { let res; return (...args) => { if (fn) { res = fn.apply(ctx, args); fn = null; } return res; }; } const PRIMARY_COLOR = "#007aff"; const isObject = (val) => val !== null && typeof val === "object"; class BaseFormatter { constructor() { this._caches = Object.create(null); } interpolate(message, values) { if (!values) { return [message]; } let tokens = this._caches[message]; if (!tokens) { tokens = parse(message); this._caches[message] = tokens; } return compile(tokens, values); } } const RE_TOKEN_LIST_VALUE = /^(?:\d)+/; const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; function parse(format) { const tokens = []; let position = 0; let text = ""; while (position < format.length) { let char = format[position++]; if (char === "{") { if (text) { tokens.push({ type: "text", value: text }); } text = ""; let sub = ""; char = format[position++]; while (char !== void 0 && char !== "}") { sub += char; char = format[position++]; } const isClosed = char === "}"; const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown"; tokens.push({ value: sub, type }); } else if (char === "%") { if (format[position] !== "{") { text += char; } } else { text += char; } } text && tokens.push({ type: "text", value: text }); return tokens; } function compile(tokens, values) { const compiled = []; let index = 0; const mode = Array.isArray(values) ? "list" : isObject(values) ? "named" : "unknown"; if (mode === "unknown") { return compiled; } while (index < tokens.length) { const token = tokens[index]; switch (token.type) { case "text": compiled.push(token.value); break; case "list": compiled.push(values[parseInt(token.value, 10)]); break; case "named": if (mode === "named") { compiled.push(values[token.value]); } break; } index++; } return compiled; } const LOCALE_ZH_HANS = "zh-Hans"; const LOCALE_ZH_HANT = "zh-Hant"; const LOCALE_EN = "en"; const LOCALE_FR = "fr"; const LOCALE_ES = "es"; const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty.call(val, key); const defaultFormatter = new BaseFormatter(); function include(str, parts) { return !!parts.find((part) => str.indexOf(part) !== -1); } function startsWith(str, parts) { return parts.find((part) => str.indexOf(part) === 0); } function normalizeLocale(locale, messages) { if (!locale) { return; } locale = locale.trim().replace(/_/g, "-"); if (messages[locale]) { return locale; } locale = locale.toLowerCase(); if (locale.indexOf("zh") === 0) { if (locale.indexOf("-hans") !== -1) { return LOCALE_ZH_HANS; } if (locale.indexOf("-hant") !== -1) { return LOCALE_ZH_HANT; } if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) { return LOCALE_ZH_HANT; } return LOCALE_ZH_HANS; } const lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]); if (lang) { return lang; } } class I18n { constructor({ locale, fallbackLocale, messages, watcher, formater }) { this.locale = LOCALE_EN; this.fallbackLocale = LOCALE_EN; this.message = {}; this.messages = {}; this.watchers = []; if (fallbackLocale) { this.fallbackLocale = fallbackLocale; } this.formater = formater || defaultFormatter; this.messages = messages || {}; this.setLocale(locale); if (watcher) { this.watchLocale(watcher); } } setLocale(locale) { const oldLocale = this.locale; this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale; if (!this.messages[this.locale]) { this.messages[this.locale] = {}; } this.message = this.messages[this.locale]; this.watchers.forEach((watcher) => { watcher(this.locale, oldLocale); }); } getLocale() { return this.locale; } watchLocale(fn) { const index = this.watchers.push(fn) - 1; return () => { this.watchers.splice(index, 1); }; } add(locale, message) { if (this.messages[locale]) { Object.assign(this.messages[locale], message); } else { this.messages[locale] = message; } } t(key, locale, values) { let message = this.message; if (typeof locale === "string") { locale = normalizeLocale(locale, this.messages); locale && (message = this.messages[locale]); } else { values = locale; } if (!hasOwn(message, key)) { console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`); return key; } return this.formater.interpolate(message[key], values).join(""); } } function initLocaleWatcher(appVm, i18n2) { appVm.$i18n && appVm.$i18n.vm.$watch("locale", (newLocale) => { i18n2.setLocale(newLocale); }, { immediate: true }); } function initVueI18n(locale = LOCALE_EN, messages = {}, fallbackLocale = LOCALE_EN) { if (typeof locale !== "string") { [locale, messages] = [messages, locale]; } if (typeof locale !== "string") { locale = fallbackLocale; } const i18n2 = new I18n({ locale: locale || fallbackLocale, fallbackLocale, messages }); let t = (key, values) => { if (typeof getApp !== "function") { t = function(key2, values2) { return i18n2.t(key2, values2); }; } else { const appVm = getApp().$vm; if (!appVm.$t || !appVm.$i18n) { t = function(key2, values2) { return i18n2.t(key2, values2); }; } else { initLocaleWatcher(appVm, i18n2); t = function(key2, values2) { const $i18n = appVm.$i18n; const silentTranslationWarn = $i18n.silentTranslationWarn; $i18n.silentTranslationWarn = true; const msg = appVm.$t(key2, values2); $i18n.silentTranslationWarn = silentTranslationWarn; if (msg !== key2) { return msg; } return i18n2.t(key2, $i18n.locale, values2); }; } } return t(key, values); }; return { i18n: i18n2, t(key, values) { return t(key, values); }, add(locale2, message) { return i18n2.add(locale2, message); }, getLocale() { return i18n2.getLocale(); }, setLocale(newLocale) { return i18n2.setLocale(newLocale); } }; } let i18n; function useI18n() { if (!i18n) { let language; { language = plus.os.language; } i18n = initVueI18n(language); } return i18n; } function normalizeMessages(namespace, messages) { return Object.keys(messages).reduce((res, name) => { res[namespace + name] = messages[name]; return res; }, {}); } const initI18nButtonMsgsOnce = /* @__PURE__ */ once(() => { const name = "uni.button."; { useI18n().add(LOCALE_EN, normalizeMessages(name, { "feedback.title": "feedback", "feedback.send": "send" })); } { useI18n().add(LOCALE_ES, normalizeMessages(name, { "feedback.title": "realimentaci\xF3n", "feedback.send": "enviar" })); } { useI18n().add(LOCALE_FR, normalizeMessages(name, { "feedback.title": "retour d'information", "feedback.send": "envoyer" })); } { useI18n().add(LOCALE_ZH_HANS, normalizeMessages(name, { "feedback.title": "\u95EE\u9898\u53CD\u9988", "feedback.send": "\u53D1\u9001" })); } { useI18n().add(LOCALE_ZH_HANT, normalizeMessages(name, { "feedback.title": "\u554F\u984C\u53CD\u994B", "feedback.send": "\u767C\u9001" })); } }); const E = function() { }; E.prototype = { on: function(name, callback, ctx) { var e = this.e || (this.e = {}); (e[name] || (e[name] = [])).push({ fn: callback, ctx }); return this; }, once: function(name, callback, ctx) { var self = this; function listener() { self.off(name, listener); callback.apply(ctx, arguments); } listener._ = callback; return this.on(name, listener, ctx); }, emit: function(name) { var data = [].slice.call(arguments, 1); var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); var i = 0; var len = evtArr.length; for (i; i < len; i++) { evtArr[i].fn.apply(evtArr[i].ctx, data); } return this; }, off: function(name, callback) { var e = this.e || (this.e = {}); var evts = e[name]; var liveEvents = []; if (evts && callback) { for (var i = 0, len = evts.length; i < len; i++) { if (evts[i].fn !== callback && evts[i].fn._ !== callback) liveEvents.push(evts[i]); } } liveEvents.length ? e[name] = liveEvents : delete e[name]; return this; } }; function initBridge(subscribeNamespace) { const emitter = new E(); return { on(event, callback) { return emitter.on(event, callback); }, once(event, callback) { return emitter.once(event, callback); }, off(event, callback) { return emitter.off(event, callback); }, emit(event, ...args) { return emitter.emit(event, ...args); }, subscribe(event, callback, once2 = false) { emitter[once2 ? "once" : "on"](`${subscribeNamespace}.${event}`, callback); }, unsubscribe(event, callback) { emitter.off(`${subscribeNamespace}.${event}`, callback); }, subscribeHandler(event, args, pageId2) { { console.log(formatLog(subscribeNamespace, "subscribeHandler", pageId2, event, args)); } emitter.emit(`${subscribeNamespace}.${event}`, args, pageId2); } }; } const ViewJSBridge = /* @__PURE__ */ initBridge("service"); const targetMap = new WeakMap(); const effectStack = []; let activeEffect; const ITERATE_KEY = Symbol(""); const MAP_KEY_ITERATE_KEY = Symbol(""); function isEffect(fn) { return fn && fn._isEffect === true; } function effect(fn, options = EMPTY_OBJ) { if (isEffect(fn)) { fn = fn.raw; } const effect2 = createReactiveEffect(fn, options); if (!options.lazy) { effect2(); } return effect2; } function stop(effect2) { if (effect2.active) { cleanup(effect2); if (effect2.options.onStop) { effect2.options.onStop(); } effect2.active = false; } } let uid = 0; function createReactiveEffect(fn, options) { const effect2 = function reactiveEffect() { if (!effect2.active) { return fn(); } if (!effectStack.includes(effect2)) { cleanup(effect2); try { enableTracking(); effectStack.push(effect2); activeEffect = effect2; return fn(); } finally { effectStack.pop(); resetTracking(); activeEffect = effectStack[effectStack.length - 1]; } } }; effect2.id = uid++; effect2.allowRecurse = !!options.allowRecurse; effect2._isEffect = true; effect2.active = true; effect2.raw = fn; effect2.deps = []; effect2.options = options; return effect2; } function cleanup(effect2) { const { deps } = effect2; if (deps.length) { for (let i = 0; i < deps.length; i++) { deps[i].delete(effect2); } deps.length = 0; } } let shouldTrack = true; const trackStack = []; function pauseTracking() { trackStack.push(shouldTrack); shouldTrack = false; } function enableTracking() { trackStack.push(shouldTrack); shouldTrack = true; } function resetTracking() { const last = trackStack.pop(); shouldTrack = last === void 0 ? true : last; } function track(target, type, key) { if (!shouldTrack || activeEffect === void 0) { return; } let depsMap = targetMap.get(target); if (!depsMap) { targetMap.set(target, depsMap = new Map()); } let dep = depsMap.get(key); if (!dep) { depsMap.set(key, dep = new Set()); } if (!dep.has(activeEffect)) { dep.add(activeEffect); activeEffect.deps.push(dep); } } function trigger(target, type, key, newValue, oldValue, oldTarget) { const depsMap = targetMap.get(target); if (!depsMap) { return; } const effects = new Set(); const add2 = (effectsToAdd) => { if (effectsToAdd) { effectsToAdd.forEach((effect2) => { if (effect2 !== activeEffect || effect2.allowRecurse) { effects.add(effect2); } }); } }; if (type === "clear") { depsMap.forEach(add2); } else if (key === "length" && isArray(target)) { depsMap.forEach((dep, key2) => { if (key2 === "length" || key2 >= newValue) { add2(dep); } }); } else { if (key !== void 0) { add2(depsMap.get(key)); } switch (type) { case "add": if (!isArray(target)) { add2(depsMap.get(ITERATE_KEY)); if (isMap(target)) { add2(depsMap.get(MAP_KEY_ITERATE_KEY)); } } else if (isIntegerKey(key)) { add2(depsMap.get("length")); } break; case "delete": if (!isArray(target)) { add2(depsMap.get(ITERATE_KEY)); if (isMap(target)) { add2(depsMap.get(MAP_KEY_ITERATE_KEY)); } } break; case "set": if (isMap(target)) { add2(depsMap.get(ITERATE_KEY)); } break; } } const run = (effect2) => { if (effect2.options.scheduler) { effect2.options.scheduler(effect2); } else { effect2(); } }; effects.forEach(run); } const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol)); const get = /* @__PURE__ */ createGetter(); const shallowGet = /* @__PURE__ */ createGetter(false, true); const readonlyGet = /* @__PURE__ */ createGetter(true); const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { const instrumentations = {}; ["includes", "indexOf", "lastIndexOf"].forEach((key) => { const method = Array.prototype[key]; instrumentations[key] = function(...args) { const arr = toRaw(this); for (let i = 0, l = this.length; i < l; i++) { track(arr, "get", i + ""); } const res = method.apply(arr, args); if (res === -1 || res === false) { return method.apply(arr, args.map(toRaw)); } else { return res; } }; }); ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { const method = Array.prototype[key]; instrumentations[key] = function(...args) { pauseTracking(); const res = method.apply(this, args); resetTracking(); return res; }; }); return instrumentations; } function createGetter(isReadonly2 = false, shallow = false) { return function get2(target, key, receiver) { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { return target; } const targetIsArray = isArray(target); if (!isReadonly2 && targetIsArray && hasOwn$1(arrayInstrumentations, key)) { return Reflect.get(arrayInstrumentations, key, receiver); } const res = Reflect.get(target, key, receiver); if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { return res; } if (!isReadonly2) { track(target, "get", key); } if (shallow) { return res; } if (isRef(res)) { const shouldUnwrap = !targetIsArray || !isIntegerKey(key); return shouldUnwrap ? res.value : res; } if (isObject$1(res)) { return isReadonly2 ? readonly(res) : reactive(res); } return res; }; } const set = /* @__PURE__ */ createSetter(); const shallowSet = /* @__PURE__ */ createSetter(true); function createSetter(shallow = false) { return function set2(target, key, value, receiver) { let oldValue = target[key]; if (!shallow) { value = toRaw(value); oldValue = toRaw(oldValue); if (!isArray(target) && isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } } const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn$1(target, key); const result = Reflect.set(target, key, value, receiver); if (target === toRaw(receiver)) { if (!hadKey) { trigger(target, "add", key, value); } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value); } } return result; }; } function deleteProperty(target, key) { const hadKey = hasOwn$1(target, key); target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { trigger(target, "delete", key, void 0); } return result; } function has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { track(target, "has", key); } return result; } function ownKeys(target) { track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY); return Reflect.ownKeys(target); } const mutableHandlers = { get, set, deleteProperty, has, ownKeys }; const readonlyHandlers = { get: readonlyGet, set(target, key) { return true; }, deleteProperty(target, key) { return true; } }; const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, { get: shallowGet, set: shallowSet }); const toReactive = (value) => isObject$1(value) ? reactive(value) : value; const toReadonly = (value) => isObject$1(value) ? readonly(value) : value; const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); function get$1(target, key, isReadonly2 = false, isShallow = false) { target = target["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); if (key !== rawKey) { !isReadonly2 && track(rawTarget, "get", key); } !isReadonly2 && track(rawTarget, "get", rawKey); const { has: has2 } = getProto(rawTarget); const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; if (has2.call(rawTarget, key)) { return wrap(target.get(key)); } else if (has2.call(rawTarget, rawKey)) { return wrap(target.get(rawKey)); } else if (target !== rawTarget) { target.get(key); } } function has$1(key, isReadonly2 = false) { const target = this["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); if (key !== rawKey) { !isReadonly2 && track(rawTarget, "has", key); } !isReadonly2 && track(rawTarget, "has", rawKey); return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly2 = false) { target = target["__v_raw"]; !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); return Reflect.get(target, "size", target); } function add(value) { value = toRaw(value); const target = toRaw(this); const proto = getProto(target); const hadKey = proto.has.call(target, value); if (!hadKey) { target.add(value); trigger(target, "add", value, value); } return this; } function set$1(key, value) { value = toRaw(value); const target = toRaw(this); const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target, key); } const oldValue = get2.call(target, key); target.set(key, value); if (!hadKey) { trigger(target, "add", key, value); } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value); } return this; } function deleteEntry(key) { const target = toRaw(this); const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target, key); } get2 ? get2.call(target, key) : void 0; const result = target.delete(key); if (hadKey) { trigger(target, "delete", key, void 0); } return result; } function clear() { const target = toRaw(this); const hadItems = target.size !== 0; const result = target.clear(); if (hadItems) { trigger(target, "clear", void 0, void 0); } return result; } function createForEach(isReadonly2, isShallow) { return function forEach(callback, thisArg) { const observed = this; const target = observed["__v_raw"]; const rawTarget = toRaw(target); const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); return target.forEach((value, key) => { return callback.call(thisArg, wrap(value), wrap(key), observed); }); }; } function createIterableMethod(method, isReadonly2, isShallow) { return function(...args) { const target = this["__v_raw"]; const rawTarget = toRaw(target); const targetIsMap = isMap(rawTarget); const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; const innerIterator = target[method](...args); const wrap = isShallow ? toShallow : isReadonly2 ? toReadonly : toReactive; !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); return { next() { const { value, done } = innerIterator.next(); return done ? { value, done } : { value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), done }; }, [Symbol.iterator]() { return this; } }; }; } function createReadonlyMethod(type) { return function(...args) { return type === "delete" ? false : this; }; } function createInstrumentations() { const mutableInstrumentations2 = { get(key) { return get$1(this, key); }, get size() { return size(this); }, has: has$1, add, set: set$1, delete: deleteEntry, clear, forEach: createForEach(false, false) }; const shallowInstrumentations2 = { get(key) { return get$1(this, key, false, true); }, get size() { return size(this); }, has: has$1, add, set: set$1, delete: deleteEntry, clear, forEach: createForEach(false, true) }; const readonlyInstrumentations2 = { get(key) { return get$1(this, key, true); }, get size() { return size(this, true); }, has(key) { return has$1.call(this, key, true); }, add: createReadonlyMethod("add"), set: createReadonlyMethod("set"), delete: createReadonlyMethod("delete"), clear: createReadonlyMethod("clear"), forEach: createForEach(true, false) }; const shallowReadonlyInstrumentations2 = { get(key) { return get$1(this, key, true, true); }, get size() { return size(this, true); }, has(key) { return has$1.call(this, key, true); }, add: createReadonlyMethod("add"), set: createReadonlyMethod("set"), delete: createReadonlyMethod("delete"), clear: createReadonlyMethod("clear"), forEach: createForEach(true, true) }; const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; iteratorMethods.forEach((method) => { mutableInstrumentations2[method] = createIterableMethod(method, false, false); readonlyInstrumentations2[method] = createIterableMethod(method, true, false); shallowInstrumentations2[method] = createIterableMethod(method, false, true); shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true); }); return [ mutableInstrumentations2, readonlyInstrumentations2, shallowInstrumentations2, shallowReadonlyInstrumentations2 ]; } const [ mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations ] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly2, shallow) { const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; return (target, key, receiver) => { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_raw") { return target; } return Reflect.get(hasOwn$1(instrumentations, key) && key in target ? instrumentations : target, key, receiver); }; } const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const reactiveMap = new WeakMap(); const shallowReactiveMap = new WeakMap(); const readonlyMap = new WeakMap(); const shallowReadonlyMap = new WeakMap(); function targetTypeMap(rawType) { switch (rawType) { case "Object": case "Array": return 1; case "Map": case "Set": case "WeakMap": case "WeakSet": return 2; default: return 0; } } function getTargetType(value) { return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); } function reactive(target) { if (target && target["__v_isReadonly"]) { return target; } return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); } function shallowReactive(target) { return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); } function readonly(target) { return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); } function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { if (!isObject$1(target)) { return target; } if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { return target; } const existingProxy = proxyMap.get(target); if (existingProxy) { return existingProxy; } const targetType = getTargetType(target); if (targetType === 0) { return target; } const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers); proxyMap.set(target, proxy); return proxy; } function isReactive(value) { if (isReadonly(value)) { return isReactive(value["__v_raw"]); } return !!(value && value["__v_isReactive"]); } function isReadonly(value) { return !!(value && value["__v_isReadonly"]); } function isProxy(value) { return isReactive(value) || isReadonly(value); } function toRaw(observed) { return observed && toRaw(observed["__v_raw"]) || observed; } function markRaw(value) { def(value, "__v_skip", true); return value; } const convert = (val) => isObject$1(val) ? reactive(val) : val; function isRef(r) { return Boolean(r && r.__v_isRef === true); } function ref(value) { return createRef(value); } class RefImpl { constructor(_rawValue, _shallow) { this._rawValue = _rawValue; this._shallow = _shallow; this.__v_isRef = true; this._value = _shallow ? _rawValue : convert(_rawValue); } get value() { track(toRaw(this), "get", "value"); return this._value; } set value(newVal) { if (hasChanged(toRaw(newVal), this._rawValue)) { this._rawValue = newVal; this._value = this._shallow ? newVal : convert(newVal); trigger(toRaw(this), "set", "value", newVal); } } } function createRef(rawValue, shallow = false) { if (isRef(rawValue)) { return rawValue; } return new RefImpl(rawValue, shallow); } function unref(ref2) { return isRef(ref2) ? ref2.value : ref2; } const shallowUnwrapHandlers = { get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), set: (target, key, value, receiver) => { const oldValue = target[key]; if (isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } else { return Reflect.set(target, key, value, receiver); } } }; function proxyRefs(objectWithRefs) { return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); } class ComputedRefImpl { constructor(getter, _setter, isReadonly2) { this._setter = _setter; this._dirty = true; this.__v_isRef = true; this.effect = effect(getter, { lazy: true, scheduler: () => { if (!this._dirty) { this._dirty = true; trigger(toRaw(this), "set", "value"); } } }); this["__v_isReadonly"] = isReadonly2; } get value() { const self = toRaw(this); if (self._dirty) { self._value = this.effect(); self._dirty = false; } track(self, "get", "value"); return self._value; } set value(newValue) { this._setter(newValue); } } function computed(getterOrOptions) { let getter; let setter; if (isFunction(getterOrOptions)) { getter = getterOrOptions; setter = NOOP; } else { getter = getterOrOptions.get; setter = getterOrOptions.set; } return new ComputedRefImpl(getter, setter, isFunction(getterOrOptions) || !getterOrOptions.set); } const stack = []; function warn(msg, ...args) { pauseTracking(); const instance = stack.length ? stack[stack.length - 1].component : null; const appWarnHandler = instance && instance.appContext.config.warnHandler; const trace = getComponentTrace(); if (appWarnHandler) { callWithErrorHandling(appWarnHandler, instance, 11, [ msg + args.join(""), instance && instance.proxy, trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"), trace ]); } else { const warnArgs = [`[Vue warn]: ${msg}`, ...args]; if (trace.length && true) { warnArgs.push(` `, ...formatTrace(trace)); } console.warn(...warnArgs); } resetTracking(); } function getComponentTrace() { let currentVNode = stack[stack.length - 1]; if (!currentVNode) { return []; } const normalizedStack = []; while (currentVNode) { const last = normalizedStack[0]; if (last && last.vnode === currentVNode) { last.recurseCount++; } else { normalizedStack.push({ vnode: currentVNode, recurseCount: 0 }); } const parentInstance = currentVNode.component && currentVNode.component.parent; currentVNode = parentInstance && parentInstance.vnode; } return normalizedStack; } function formatTrace(trace) { const logs = []; trace.forEach((entry, i) => { logs.push(...i === 0 ? [] : [` `], ...formatTraceEntry(entry)); }); return logs; } function formatTraceEntry({ vnode, recurseCount }) { const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; const isRoot = vnode.component ? vnode.component.parent == null : false; const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; const close = `>` + postfix; return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } function formatProps(props) { const res = []; const keys = Object.keys(props); keys.slice(0, 3).forEach((key) => { res.push(...formatProp(key, props[key])); }); if (keys.length > 3) { res.push(` ...`); } return res; } function formatProp(key, value, raw) { if (isString(value)) { value = JSON.stringify(value); return raw ? value : [`${key}=${value}`]; } else if (typeof value === "number" || typeof value === "boolean" || value == null) { return raw ? value : [`${key}=${value}`]; } else if (isRef(value)) { value = formatProp(key, toRaw(value.value), true); return raw ? value : [`${key}=Ref<`, value, `>`]; } else if (isFunction(value)) { return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; } else { value = toRaw(value); return raw ? value : [`${key}=`, value]; } } function callWithErrorHandling(fn, instance, type, args) { let res; try { res = args ? fn(...args) : fn(); } catch (err) { handleError(err, instance, type); } return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { if (isFunction(fn)) { const res = callWithErrorHandling(fn, instance, type, args); if (res && isPromise(res)) { res.catch((err) => { handleError(err, instance, type); }); } return res; } const values = []; for (let i = 0; i < fn.length; i++) { values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); } return values; } function handleError(err, instance, type, throwInDev = true) { const contextVNode = instance ? instance.vnode : null; if (instance) { let cur = instance.parent; const exposedInstance = instance.proxy; const errorInfo = type; while (cur) { const errorCapturedHooks = cur.ec; if (errorCapturedHooks) { for (let i = 0; i < errorCapturedHooks.length; i++) { if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; } } } cur = cur.parent; } const appErrorHandler = instance.appContext.config.errorHandler; if (appErrorHandler) { callWithErrorHandling(appErrorHandler, null, 10, [ err, exposedInstance, errorInfo ]); return; } } logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { { console.error(err); } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; const pendingPreFlushCbs = []; let activePreFlushCbs = null; let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; const resolvedPromise = Promise.resolve(); let currentFlushPromise = null; let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { const p2 = currentFlushPromise || resolvedPromise; return fn ? p2.then(this ? fn.bind(this) : fn) : p2; } function findInsertionIndex(job) { let start = flushIndex + 1; let end = queue.length; const jobId = getId(job); while (start < end) { const middle = start + end >>> 1; const middleJobId = getId(queue[middle]); middleJobId < jobId ? start = middle + 1 : end = middle; } return start; } function queueJob(job) { if ((!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && job !== currentPreFlushParentJob) { const pos = findInsertionIndex(job); if (pos > -1) { queue.splice(pos, 0, job); } else { queue.push(job); } queueFlush(); } } function queueFlush() { if (!isFlushing && !isFlushPending) { isFlushPending = true; currentFlushPromise = resolvedPromise.then(flushJobs); } } function invalidateJob(job) { const i = queue.indexOf(job); if (i > flushIndex) { queue.splice(i, 1); } } function queueCb(cb, activeQueue, pendingQueue, index) { if (!isArray(cb)) { if (!activeQueue || !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { pendingQueue.push(cb); } } else { pendingQueue.push(...cb); } queueFlush(); } function queuePreFlushCb(cb) { queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); } function queuePostFlushCb(cb) { queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); } function flushPreFlushCbs(seen, parentJob = null) { if (pendingPreFlushCbs.length) { currentPreFlushParentJob = parentJob; activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; pendingPreFlushCbs.length = 0; for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { activePreFlushCbs[preFlushIndex](); } activePreFlushCbs = null; preFlushIndex = 0; currentPreFlushParentJob = null; flushPreFlushCbs(seen, parentJob); } } function flushPostFlushCbs(seen) { if (pendingPostFlushCbs.length) { const deduped = [...new Set(pendingPostFlushCbs)]; pendingPostFlushCbs.length = 0; if (activePostFlushCbs) { activePostFlushCbs.push(...deduped); return; } activePostFlushCbs = deduped; activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { activePostFlushCbs[postFlushIndex](); } activePostFlushCbs = null; postFlushIndex = 0; } } const getId = (job) => job.id == null ? Infinity : job.id; function flushJobs(seen) { isFlushPending = false; isFlushing = true; flushPreFlushCbs(seen); queue.sort((a, b) => getId(a) - getId(b)); try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; if (job && job.active !== false) { if (false) ; callWithErrorHandling(job, null, 14); } } } finally { flushIndex = 0; queue.length = 0; flushPostFlushCbs(); isFlushing = false; currentFlushPromise = null; if (queue.length || pendingPreFlushCbs.length || pendingPostFlushCbs.length) { flushJobs(seen); } } } function checkRecursiveUpdates(seen, fn) { if (!seen.has(fn)) { seen.set(fn, 1); } else { const count = seen.get(fn); if (count > RECURSION_LIMIT) { const instance = fn.ownerInstance; const componentName = instance && getComponentName(instance.type); warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`); return true; } else { seen.set(fn, count + 1); } } } const globalCompatConfig = { MODE: 2 }; function getCompatConfigForKey(key, instance) { const instanceConfig = instance && instance.type.compatConfig; if (instanceConfig && key in instanceConfig) { return instanceConfig[key]; } return globalCompatConfig[key]; } function isCompatEnabled(key, instance, enableForBuiltIn = false) { if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) { return false; } const rawMode = getCompatConfigForKey("MODE", instance) || 2; const val = getCompatConfigForKey(key, instance); const mode = isFunction(rawMode) ? rawMode(instance && instance.type) : rawMode; if (mode === 2) { return val !== false; } else { return val === true || val === "suppress-warning"; } } function emit(instance, event, ...rawArgs) { const props = instance.vnode.props || EMPTY_OBJ; let args = rawArgs; const isModelListener2 = event.startsWith("update:"); const modelArg = isModelListener2 && event.slice(7); if (modelArg && modelArg in props) { const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; const { number, trim } = props[modifiersKey] || EMPTY_OBJ; if (trim) { args = rawArgs.map((a) => a.trim()); } else if (number) { args = rawArgs.map(toNumber); } } let handlerName; let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))]; if (!handler && isModelListener2) { handler = props[handlerName = toHandlerKey(hyphenate(event))]; } if (handler) { callWithAsyncErrorHandling(handler, instance, 6, args); } const onceHandler = props[handlerName + `Once`]; if (onceHandler) { if (!instance.emitted) { instance.emitted = {}; } else if (instance.emitted[handlerName]) { return; } instance.emitted[handlerName] = true; callWithAsyncErrorHandling(onceHandler, instance, 6, args); } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { const cache = appContext.emitsCache; const cached = cache.get(comp); if (cached !== void 0) { return cached; } const raw = comp.emits; let normalized = {}; let hasExtends = false; if (!isFunction(comp)) { const extendEmits = (raw2) => { const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); if (normalizedFromExtend) { hasExtends = true; extend(normalized, normalizedFromExtend); } }; if (!asMixin && appContext.mixins.length) { appContext.mixins.forEach(extendEmits); } if (comp.extends) { extendEmits(comp.extends); } if (comp.mixins) { comp.mixins.forEach(extendEmits); } } if (!raw && !hasExtends) { cache.set(comp, null); return null; } if (isArray(raw)) { raw.forEach((key) => normalized[key] = null); } else { extend(normalized, raw); } cache.set(comp, normalized); return normalized; } function isEmitListener(options, key) { if (!options || !isOn(key)) { return false; } key = key.slice(2).replace(/Once$/, ""); return hasOwn$1(options, key[0].toLowerCase() + key.slice(1)) || hasOwn$1(options, hyphenate(key)) || hasOwn$1(options, key); } let currentRenderingInstance = null; let currentScopeId = null; function setCurrentRenderingInstance(instance) { const prev = currentRenderingInstance; currentRenderingInstance = instance; currentScopeId = instance && instance.type.__scopeId || null; return prev; } function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { if (!ctx) return fn; if (fn._n) { return fn; } const renderFnWithContext = (...args) => { if (renderFnWithContext._d) { setBlockTracking(-1); } const prevInstance = setCurrentRenderingInstance(ctx); const res = fn(...args); setCurrentRenderingInstance(prevInstance); if (renderFnWithContext._d) { setBlockTracking(1); } return res; }; renderFnWithContext._n = true; renderFnWithContext._c = true; renderFnWithContext._d = true; return renderFnWithContext; } let accessedAttrs = false; function markAttrsAccessed() { accessedAttrs = true; } function renderComponentRoot(instance) { const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs: attrs2, emit: emit2, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; let result; const prev = setCurrentRenderingInstance(instance); try { let fallthroughAttrs; if (vnode.shapeFlag & 4) { const proxyToUse = withProxy || proxy; result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); fallthroughAttrs = attrs2; } else { const render2 = Component; if (false) ; result = normalizeVNode(render2.length > 1 ? render2(props, false ? { get attrs() { markAttrsAccessed(); return attrs2; }, slots, emit: emit2 } : { attrs: attrs2, slots, emit: emit2 }) : render2(props, null)); fallthroughAttrs = Component.props ? attrs2 : getFunctionalFallthrough(attrs2); } let root = result; let setRoot = void 0; if (false) ; if (fallthroughAttrs && inheritAttrs !== false) { const keys = Object.keys(fallthroughAttrs); const { shapeFlag } = root; if (keys.length) { if (shapeFlag & 1 || shapeFlag & 6) { if (propsOptions && keys.some(isModelListener)) { fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); } root = cloneVNode(root, fallthroughAttrs); } else if (false) ; } } if (false) ; if (vnode.dirs) { if (false) ; root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; } if (vnode.transition) { if (false) ; root.transition = vnode.transition; } if (false) ; else { result = root; } } catch (err) { handleError(err, instance, 1); result = createVNode(Comment$1); } setCurrentRenderingInstance(prev); return result; } const getChildRoot = (vnode) => { const rawChildren = vnode.children; const dynamicChildren = vnode.dynamicChildren; const childRoot = filterSingleRoot(rawChildren); if (!childRoot) { return [vnode, void 0]; } const index = rawChildren.indexOf(childRoot); const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; const setRoot = (updatedRoot) => { rawChildren[index] = updatedRoot; if (dynamicChildren) { if (dynamicIndex > -1) { dynamicChildren[dynamicIndex] = updatedRoot; } else if (updatedRoot.patchFlag > 0) { vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; } } }; return [normalizeVNode(childRoot), setRoot]; }; function filterSingleRoot(children) { let singleRoot; for (let i = 0; i < children.length; i++) { const child = children[i]; if (isVNode(child)) { if (child.type !== Comment$1 || child.children === "v-if") { if (singleRoot) { return; } else { singleRoot = child; } } } else { return; } } return singleRoot; } const getFunctionalFallthrough = (attrs2) => { let res; for (const key in attrs2) { if (key === "class" || key === "style" || isOn(key)) { (res || (res = {}))[key] = attrs2[key]; } } return res; }; const filterModelListeners = (attrs2, props) => { const res = {}; for (const key in attrs2) { if (!isModelListener(key) || !(key.slice(9) in props)) { res[key] = attrs2[key]; } } return res; }; const isElementRoot = (vnode) => { return vnode.shapeFlag & 6 || vnode.shapeFlag & 1 || vnode.type === Comment$1; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { const { props: prevProps, children: prevChildren, component } = prevVNode; const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; const emits = component.emitsOptions; if (nextVNode.dirs || nextVNode.transition) { return true; } if (optimized && patchFlag >= 0) { if (patchFlag & 1024) { return true; } if (patchFlag & 16) { if (!prevProps) { return !!nextProps; } return hasPropsChanged(prevProps, nextProps, emits); } else if (patchFlag & 8) { const dynamicProps = nextVNode.dynamicProps; for (let i = 0; i < dynamicProps.length; i++) { const key = dynamicProps[i]; if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { return true; } } } } else { if (prevChildren || nextChildren) { if (!nextChildren || !nextChildren.$stable) { return true; } } if (prevProps === nextProps) { return false; } if (!prevProps) { return !!nextProps; } if (!nextProps) { return true; } return hasPropsChanged(prevProps, nextProps, emits); } return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { const nextKeys = Object.keys(nextProps); if (nextKeys.length !== Object.keys(prevProps).length) { return true; } for (let i = 0; i < nextKeys.length; i++) { const key = nextKeys[i]; if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { return true; } } return false; } function updateHOCHostEl({ vnode, parent }, el) { while (parent && parent.subTree === vnode) { (vnode = parent.vnode).el = el; parent = parent.parent; } } const isSuspense = (type) => type.__isSuspense; function queueEffectWithSuspense(fn, suspense) { if (suspense && suspense.pendingBranch) { if (isArray(fn)) { suspense.effects.push(...fn); } else { suspense.effects.push(fn); } } else { queuePostFlushCb(fn); } } function provide(key, value) { if (!currentInstance) ; else { let provides = currentInstance.provides; const parentProvides = currentInstance.parent && currentInstance.parent.provides; if (parentProvides === provides) { provides = currentInstance.provides = Object.create(parentProvides); } provides[key] = value; } } function inject(key, defaultValue, treatDefaultAsFactory = false) { const instance = currentInstance || currentRenderingInstance; if (instance) { const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides; if (provides && key in provides) { return provides[key]; } else if (arguments.length > 1) { return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue; } else ; } } const INITIAL_WATCHER_VALUE = {}; function watch(source, cb, options) { return doWatch(source, cb, options); } function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ, instance = currentInstance) { let getter; let forceTrigger = false; let isMultiSource = false; if (isRef(source)) { getter = () => source.value; forceTrigger = !!source._shallow; } else if (isReactive(source)) { getter = () => source; deep = true; } else if (isArray(source)) { isMultiSource = true; forceTrigger = source.some(isReactive); getter = () => source.map((s) => { if (isRef(s)) { return s.value; } else if (isReactive(s)) { return traverse(s); } else if (isFunction(s)) { return callWithErrorHandling(s, instance, 2); } else ; }); } else if (isFunction(source)) { if (cb) { getter = () => callWithErrorHandling(source, instance, 2); } else { getter = () => { if (instance && instance.isUnmounted) { return; } if (cleanup2) { cleanup2(); } return callWithAsyncErrorHandling(source, instance, 3, [onInvalidate]); }; } } else { getter = NOOP; } if (cb && deep) { const baseGetter = getter; getter = () => traverse(baseGetter()); } let cleanup2; let onInvalidate = (fn) => { cleanup2 = runner.options.onStop = () => { callWithErrorHandling(fn, instance, 4); }; }; let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; const job = () => { if (!runner.active) { return; } if (cb) { const newValue = runner(); if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { if (cleanup2) { cleanup2(); } callWithAsyncErrorHandling(cb, instance, 3, [ newValue, oldValue === INITIAL_WATCHER_VALUE ? void 0 : oldValue, onInvalidate ]); oldValue = newValue; } } else { runner(); } }; job.allowRecurse = !!cb; let scheduler; if (flush === "sync") { scheduler = job; } else if (flush === "post") { scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); } else { scheduler = () => { if (!instance || instance.isMounted) { queuePreFlushCb(job); } else { job(); } }; } const runner = effect(getter, { lazy: true, onTrack, onTrigger, scheduler }); recordInstanceBoundEffect(runner, instance); if (cb) { if (immediate) { job(); } else { oldValue = runner(); } } else if (flush === "post") { queuePostRenderEffect(runner, instance && instance.suspense); } else { runner(); } return () => { stop(runner); if (instance) { remove(instance.effects, runner); } }; } function instanceWatch(source, value, options) { const publicThis = this.proxy; const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); let cb; if (isFunction(value)) { cb = value; } else { cb = value.handler; options = value; } return doWatch(getter, cb.bind(publicThis), options, this); } function createPathGetter(ctx, path) { const segments = path.split("."); return () => { let cur = ctx; for (let i = 0; i < segments.length && cur; i++) { cur = cur[segments[i]]; } return cur; }; } function traverse(value, seen = new Set()) { if (!isObject$1(value) || seen.has(value) || value["__v_skip"]) { return value; } seen.add(value); if (isRef(value)) { traverse(value.value, seen); } else if (isArray(value)) { for (let i = 0; i < value.length; i++) { traverse(value[i], seen); } } else if (isSet(value) || isMap(value)) { value.forEach((v) => { traverse(v, seen); }); } else if (isPlainObject(value)) { for (const key in value) { traverse(value[key], seen); } } return value; } function defineComponent(options) { return isFunction(options) ? { setup: options, name: options.name } : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; function onActivated(hook, target) { registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { const wrappedHook = hook.__wdc || (hook.__wdc = () => { let current = target; while (current) { if (current.isDeactivated) { return; } current = current.parent; } hook(); }); injectHook(type, wrappedHook, target); if (target) { let current = target.parent; while (current && current.parent) { if (isKeepAlive(current.parent.vnode)) { injectToKeepAliveRoot(wrappedHook, type, target, current); } current = current.parent; } } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { const injected = injectHook(type, hook, keepAliveRoot, true); onUnmounted(() => { remove(keepAliveRoot[type], injected); }, target); } function injectHook(type, hook, target = currentInstance, prepend = false) { if (target) { const hooks = target[type] || (target[type] = []); const wrappedHook = hook.__weh || (hook.__weh = (...args) => { if (target.isUnmounted) { return; } pauseTracking(); setCurrentInstance(target); const res = callWithAsyncErrorHandling(hook, target, type, args); setCurrentInstance(null); resetTracking(); return res; }); if (prepend) { hooks.unshift(wrappedHook); } else { hooks.push(wrappedHook); } return wrappedHook; } } const createHook = (lifecycle) => (hook, target = currentInstance) => (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, hook, target); const onBeforeMount = createHook("bm"); const onMounted = createHook("m"); const onBeforeUpdate = createHook("bu"); const onUpdated = createHook("u"); const onBeforeUnmount = createHook("bum"); const onUnmounted = createHook("um"); const onServerPrefetch = createHook("sp"); const onRenderTriggered = createHook("rtg"); const onRenderTracked = createHook("rtc"); function onErrorCaptured(hook, target = currentInstance) { injectHook("ec", hook, target); } let shouldCacheAccess = true; function applyOptions(instance) { const options = resolveMergedOptions(instance); const publicThis = instance.proxy; const ctx = instance.ctx; shouldCacheAccess = false; if (options.beforeCreate) { callHook(options.beforeCreate, instance, "bc"); } const { data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, expose, inheritAttrs, components, directives, filters } = options; const checkDuplicateProperties = null; if (injectOptions) { resolveInjections(injectOptions, ctx, checkDuplicateProperties); } if (methods) { for (const key in methods) { const methodHandler = methods[key]; if (isFunction(methodHandler)) { { ctx[key] = methodHandler.bind(publicThis); } } } } if (dataOptions) { const data = dataOptions.call(publicThis, publicThis); if (!isObject$1(data)) ; else { instance.data = reactive(data); } } shouldCacheAccess = true; if (computedOptions) { for (const key in computedOptions) { const opt = computedOptions[key]; const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP; const c = computed$1({ get: get2, set: set2 }); Object.defineProperty(ctx, key, { enumerable: true, configurable: true, get: () => c.value, set: (v) => c.value = v }); } } if (watchOptions) { for (const key in watchOptions) { createWatcher(watchOptions[key], ctx, publicThis, key); } } if (provideOptions) { const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; Reflect.ownKeys(provides).forEach((key) => { provide(key, provides[key]); }); } if (created) { callHook(created, instance, "c"); } function registerLifecycleHook(register, hook) { if (isArray(hook)) { hook.forEach((_hook) => register(_hook.bind(publicThis))); } else if (hook) { register(hook.bind(publicThis)); } } registerLifecycleHook(onBeforeMount, beforeMount); registerLifecycleHook(onMounted, mounted); registerLifecycleHook(onBeforeUpdate, beforeUpdate); registerLifecycleHook(onUpdated, updated); registerLifecycleHook(onActivated, activated); registerLifecycleHook(onDeactivated, deactivated); registerLifecycleHook(onErrorCaptured, errorCaptured); registerLifecycleHook(onRenderTracked, renderTracked); registerLifecycleHook(onRenderTriggered, renderTriggered); registerLifecycleHook(onBeforeUnmount, beforeUnmount); registerLifecycleHook(onUnmounted, unmounted); registerLifecycleHook(onServerPrefetch, serverPrefetch); if (isArray(expose)) { if (expose.length) { const exposed = instance.exposed || (instance.exposed = {}); expose.forEach((key) => { Object.defineProperty(exposed, key, { get: () => publicThis[key], set: (val) => publicThis[key] = val }); }); } else if (!instance.exposed) { instance.exposed = {}; } } if (render && instance.render === NOOP) { instance.render = render; } if (inheritAttrs != null) { instance.inheritAttrs = inheritAttrs; } if (components) instance.components = components; if (directives) instance.directives = directives; } function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { if (isArray(injectOptions)) { injectOptions = normalizeInject(injectOptions); } for (const key in injectOptions) { const opt = injectOptions[key]; if (isObject$1(opt)) { if ("default" in opt) { ctx[key] = inject(opt.from || key, opt.default, true); } else { ctx[key] = inject(opt.from || key); } } else { ctx[key] = inject(opt); } } } function callHook(hook, instance, type) { callWithAsyncErrorHandling(isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type); } function createWatcher(raw, ctx, publicThis, key) { const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; if (isString(raw)) { const handler = ctx[raw]; if (isFunction(handler)) { watch(getter, handler); } } else if (isFunction(raw)) { watch(getter, raw.bind(publicThis)); } else if (isObject$1(raw)) { if (isArray(raw)) { raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); } else { const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; if (isFunction(handler)) { watch(getter, handler, raw); } } } else ; } function resolveMergedOptions(instance) { const base2 = instance.type; const { mixins, extends: extendsOptions } = base2; const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; const cached = cache.get(base2); let resolved; if (cached) { resolved = cached; } else if (!globalMixins.length && !mixins && !extendsOptions) { { resolved = base2; } } else { resolved = {}; if (globalMixins.length) { globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true)); } mergeOptions(resolved, base2, optionMergeStrategies); } cache.set(base2, resolved); return resolved; } function mergeOptions(to, from, strats, asMixin = false) { const { mixins, extends: extendsOptions } = from; if (extendsOptions) { mergeOptions(to, extendsOptions, strats, true); } if (mixins) { mixins.forEach((m) => mergeOptions(to, m, strats, true)); } for (const key in from) { if (asMixin && key === "expose") ; else { const strat = internalOptionMergeStrats[key] || strats && strats[key]; to[key] = strat ? strat(to[key], from[key]) : from[key]; } } return to; } const internalOptionMergeStrats = { data: mergeDataFn, props: mergeObjectOptions, emits: mergeObjectOptions, methods: mergeObjectOptions, computed: mergeObjectOptions, beforeCreate: mergeAsArray, created: mergeAsArray, beforeMount: mergeAsArray, mounted: mergeAsArray, beforeUpdate: mergeAsArray, updated: mergeAsArray, beforeDestroy: mergeAsArray, destroyed: mergeAsArray, activated: mergeAsArray, deactivated: mergeAsArray, errorCaptured: mergeAsArray, serverPrefetch: mergeAsArray, components: mergeObjectOptions, directives: mergeObjectOptions, watch: mergeWatchOptions, provide: mergeDataFn, inject: mergeInject }; function mergeDataFn(to, from) { if (!from) { return to; } if (!to) { return from; } return function mergedDataFn() { return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); }; } function mergeInject(to, from) { return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { if (isArray(raw)) { const res = {}; for (let i = 0; i < raw.length; i++) { res[raw[i]] = raw[i]; } return res; } return raw; } function mergeAsArray(to, from) { return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { return to ? extend(extend(Object.create(null), to), from) : from; } function mergeWatchOptions(to, from) { if (!to) return from; if (!from) return to; const merged = extend(Object.create(null), to); for (const key in from) { merged[key] = mergeAsArray(to[key], from[key]); } return merged; } function initProps(instance, rawProps, isStateful, isSSR = false) { const props = {}; const attrs2 = {}; def(attrs2, InternalObjectKey, 1); instance.propsDefaults = Object.create(null); setFullProps(instance, rawProps, props, attrs2); for (const key in instance.propsOptions[0]) { if (!(key in props)) { props[key] = void 0; } } if (isStateful) { instance.props = isSSR ? props : shallowReactive(props); } else { if (!instance.type.props) { instance.props = attrs2; } else { instance.props = props; } } instance.attrs = attrs2; } function updateProps(instance, rawProps, rawPrevProps, optimized) { const { props, attrs: attrs2, vnode: { patchFlag } } = instance; const rawCurrentProps = toRaw(props); const [options] = instance.propsOptions; let hasAttrsChanged = false; if ((optimized || patchFlag > 0) && !(patchFlag & 16)) { if (patchFlag & 8) { const propsToUpdate = instance.vnode.dynamicProps; for (let i = 0; i < propsToUpdate.length; i++) { let key = propsToUpdate[i]; const value = rawProps[key]; if (options) { if (hasOwn$1(attrs2, key)) { if (value !== attrs2[key]) { attrs2[key] = value; hasAttrsChanged = true; } } else { const camelizedKey = camelize(key); props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false); } } else { if (value !== attrs2[key]) { attrs2[key] = value; hasAttrsChanged = true; } } } } } else { if (setFullProps(instance, rawProps, props, attrs2)) { hasAttrsChanged = true; } let kebabKey; for (const key in rawCurrentProps) { if (!rawProps || !hasOwn$1(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn$1(rawProps, kebabKey))) { if (options) { if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) { props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true); } } else { delete props[key]; } } } if (attrs2 !== rawCurrentProps) { for (const key in attrs2) { if (!rawProps || !hasOwn$1(rawProps, key)) { delete attrs2[key]; hasAttrsChanged = true; } } } } if (hasAttrsChanged) { trigger(instance, "set", "$attrs"); } } function setFullProps(instance, rawProps, props, attrs2) { const [options, needCastKeys] = instance.propsOptions; let hasAttrsChanged = false; let rawCastValues; if (rawProps) { for (let key in rawProps) { if (isReservedProp(key)) { continue; } const value = rawProps[key]; let camelKey; if (options && hasOwn$1(options, camelKey = camelize(key))) { if (!needCastKeys || !needCastKeys.includes(camelKey)) { props[camelKey] = value; } else { (rawCastValues || (rawCastValues = {}))[camelKey] = value; } } else if (!isEmitListener(instance.emitsOptions, key)) { if (value !== attrs2[key]) { attrs2[key] = value; hasAttrsChanged = true; } } } } if (needCastKeys) { const rawCurrentProps = toRaw(props); const castValues = rawCastValues || EMPTY_OBJ; for (let i = 0; i < needCastKeys.length; i++) { const key = needCastKeys[i]; props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn$1(castValues, key)); } } return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { const opt = options[key]; if (opt != null) { const hasDefault = hasOwn$1(opt, "default"); if (hasDefault && value === void 0) { const defaultValue = opt.default; if (opt.type !== Function && isFunction(defaultValue)) { const { propsDefaults } = instance; if (key in propsDefaults) { value = propsDefaults[key]; } else { setCurrentInstance(instance); value = propsDefaults[key] = defaultValue.call(null, props); setCurrentInstance(null); } } else { value = defaultValue; } } if (opt[0]) { if (isAbsent && !hasDefault) { value = false; } else if (opt[1] && (value === "" || value === hyphenate(key))) { value = true; } } } return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { const cache = appContext.propsCache; const cached = cache.get(comp); if (cached) { return cached; } const raw = comp.props; const normalized = {}; const needCastKeys = []; let hasExtends = false; if (!isFunction(comp)) { const extendProps = (raw2) => { hasExtends = true; const [props, keys] = normalizePropsOptions(raw2, appContext, true); extend(normalized, props); if (keys) needCastKeys.push(...keys); }; if (!asMixin && appContext.mixins.length) { appContext.mixins.forEach(extendProps); } if (comp.extends) { extendProps(comp.extends); } if (comp.mixins) { comp.mixins.forEach(extendProps); } } if (!raw && !hasExtends) { cache.set(comp, EMPTY_ARR); return EMPTY_ARR; } if (isArray(raw)) { for (let i = 0; i < raw.length; i++) { const normalizedKey = camelize(raw[i]); if (validatePropName(normalizedKey)) { normalized[normalizedKey] = EMPTY_OBJ; } } } else if (raw) { for (const key in raw) { const normalizedKey = camelize(key); if (validatePropName(normalizedKey)) { const opt = raw[key]; const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : opt; if (prop) { const booleanIndex = getTypeIndex(Boolean, prop.type); const stringIndex = getTypeIndex(String, prop.type); prop[0] = booleanIndex > -1; prop[1] = stringIndex < 0 || booleanIndex < stringIndex; if (booleanIndex > -1 || hasOwn$1(prop, "default")) { needCastKeys.push(normalizedKey); } } } } } const res = [normalized, needCastKeys]; cache.set(comp, res); return res; } function validatePropName(key) { if (key[0] !== "$") { return true; } return false; } function getType(ctor) { const match = ctor && ctor.toString().match(/^\s*function (\w+)/); return match ? match[1] : ""; } function isSameType(a, b) { return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { if (isArray(expectedTypes)) { return expectedTypes.findIndex((t) => isSameType(t, type)); } else if (isFunction(expectedTypes)) { return isSameType(expectedTypes, type) ? 0 : -1; } return -1; } const isInternalKey = (key) => key[0] === "_" || key === "$stable"; const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { const normalized = withCtx((props) => { return normalizeSlotValue(rawSlot(props)); }, ctx); normalized._c = false; return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { const ctx = rawSlots._ctx; for (const key in rawSlots) { if (isInternalKey(key)) continue; const value = rawSlots[key]; if (isFunction(value)) { slots[key] = normalizeSlot(key, value, ctx); } else if (value != null) { const normalized = normalizeSlotValue(value); slots[key] = () => normalized; } } }; const normalizeVNodeSlots = (instance, children) => { const normalized = normalizeSlotValue(children); instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { if (instance.vnode.shapeFlag & 32) { const type = children._; if (type) { instance.slots = toRaw(children); def(children, "_", type); } else { normalizeObjectSlots(children, instance.slots = {}); } } else { instance.slots = {}; if (children) { normalizeVNodeSlots(instance, children); } } def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { const { vnode, slots } = instance; let needDeletionCheck = true; let deletionComparisonTarget = EMPTY_OBJ; if (vnode.shapeFlag & 32) { const type = children._; if (type) { if (optimized && type === 1) { needDeletionCheck = false; } else { extend(slots, children); if (!optimized && type === 1) { delete slots._; } } } else { needDeletionCheck = !children.$stable; normalizeObjectSlots(children, slots); } deletionComparisonTarget = children; } else if (children) { normalizeVNodeSlots(instance, children); deletionComparisonTarget = { default: 1 }; } if (needDeletionCheck) { for (const key in slots) { if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { delete slots[key]; } } } }; function invokeDirectiveHook(vnode, prevVNode, instance, name) { const bindings = vnode.dirs; const oldBindings = prevVNode && prevVNode.dirs; for (let i = 0; i < bindings.length; i++) { const binding = bindings[i]; if (oldBindings) { binding.oldValue = oldBindings[i].value; } let hook = binding.dir[name]; if (hook) { pauseTracking(); callWithAsyncErrorHandling(hook, instance, 8, [ vnode.el, binding, vnode, prevVNode ]); resetTracking(); } } } function createAppContext() { return { app: null, config: { isNativeTag: NO, performance: false, globalProperties: {}, optionMergeStrategies: {}, errorHandler: void 0, warnHandler: void 0, compilerOptions: {} }, mixins: [], components: {}, directives: {}, provides: Object.create(null), optionsCache: new WeakMap(), propsCache: new WeakMap(), emitsCache: new WeakMap() }; } let uid$1 = 0; function createAppAPI(render, hydrate) { return function createApp2(rootComponent, rootProps = null) { if (rootProps != null && !isObject$1(rootProps)) { rootProps = null; } const context = createAppContext(); const installedPlugins = new Set(); let isMounted = false; const app = context.app = { _uid: uid$1++, _component: rootComponent, _props: rootProps, _container: null, _context: context, _instance: null, version, get config() { return context.config; }, set config(v) { }, use(plugin, ...options) { if (installedPlugins.has(plugin)) ; else if (plugin && isFunction(plugin.install)) { installedPlugins.add(plugin); plugin.install(app, ...options); } else if (isFunction(plugin)) { installedPlugins.add(plugin); plugin(app, ...options); } else ; return app; }, mixin(mixin) { { if (!context.mixins.includes(mixin)) { context.mixins.push(mixin); } } return app; }, component(name, component) { if (!component) { return context.components[name]; } context.components[name] = component; return app; }, directive(name, directive) { if (!directive) { return context.directives[name]; } context.directives[name] = directive; return app; }, mount(rootContainer, isHydrate, isSVG) { if (!isMounted) { const vnode = createVNode(rootComponent, rootProps); vnode.appContext = context; if (isHydrate && hydrate) { hydrate(vnode, rootContainer); } else { render(vnode, rootContainer, isSVG); } isMounted = true; app._container = rootContainer; rootContainer.__vue_app__ = app; return vnode.component.proxy; } }, unmount() { if (isMounted) { render(null, app._container); delete app._container.__vue_app__; } }, provide(key, value) { context.provides[key] = value; return app; } }; return app; }; } const prodEffectOptions = { scheduler: queueJob, allowRecurse: true }; const queuePostRenderEffect = queueEffectWithSuspense; const setRef = (rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) => { if (isArray(rawRef)) { rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); return; } if (isAsyncWrapper(vnode) && !isUnmount) { return; } const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; const value = isUnmount ? null : refValue; const { i: owner, r: ref2 } = rawRef; const oldRef = oldRawRef && oldRawRef.r; const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; const setupState = owner.setupState; if (oldRef != null && oldRef !== ref2) { if (isString(oldRef)) { refs[oldRef] = null; if (hasOwn$1(setupState, oldRef)) { setupState[oldRef] = null; } } else if (isRef(oldRef)) { oldRef.value = null; } } if (isString(ref2)) { const doSet = () => { { refs[ref2] = value; } if (hasOwn$1(setupState, ref2)) { setupState[ref2] = value; } }; if (value) { doSet.id = -1; queuePostRenderEffect(doSet, parentSuspense); } else { doSet(); } } else if (isRef(ref2)) { const doSet = () => { ref2.value = value; }; if (value) { doSet.id = -1; queuePostRenderEffect(doSet, parentSuspense); } else { doSet(); } } else if (isFunction(ref2)) { callWithErrorHandling(ref2, owner, 12, [value, refs]); } else ; }; function createRenderer(options) { return baseCreateRenderer(options); } function baseCreateRenderer(options, createHydrationFns) { const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, forcePatchProp: hostForcePatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = false) => { if (n1 && !isSameVNodeType(n1, n2)) { anchor = getNextHostNode(n1); unmount(n1, parentComponent, parentSuspense, true); n1 = null; } if (n2.patchFlag === -2) { optimized = false; n2.dynamicChildren = null; } const { type, ref: ref2, shapeFlag } = n2; switch (type) { case Text: processText(n1, n2, container, anchor); break; case Comment$1: processCommentNode(n1, n2, container, anchor); break; case Static: if (n1 == null) { mountStaticNode(n2, container, anchor, isSVG); } break; case Fragment: processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); break; default: if (shapeFlag & 1) { processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else if (shapeFlag & 6) { processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else if (shapeFlag & 64) { type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); } else if (shapeFlag & 128) { type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); } else ; } if (ref2 != null && parentComponent) { setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2); } }; const processText = (n1, n2, container, anchor) => { if (n1 == null) { hostInsert(n2.el = hostCreateText(n2.children), container, anchor); } else { const el = n2.el = n1.el; if (n2.children !== n1.children) { hostSetText(el, n2.children); } } }; const processCommentNode = (n1, n2, container, anchor) => { if (n1 == null) { hostInsert(n2.el = hostCreateComment(n2.children || ""), container, anchor); } else { n2.el = n1.el; } }; const mountStaticNode = (n2, container, anchor, isSVG) => { const nodes = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.staticCache); if (!n2.el) { n2.staticCache = nodes; } n2.el = nodes[0]; n2.anchor = nodes[nodes.length - 1]; }; const moveStaticNode = ({ el, anchor }, container, nextSibling) => { let next; while (el && el !== anchor) { next = hostNextSibling(el); hostInsert(el, container, nextSibling); el = next; } hostInsert(anchor, container, nextSibling); }; const removeStaticNode = ({ el, anchor }) => { let next; while (el && el !== anchor) { next = hostNextSibling(el); hostRemove(el); el = next; } hostRemove(anchor); }; const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { isSVG = isSVG || n2.type === "svg"; if (n1 == null) { mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } }; const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { let el; let vnodeHook; const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; if (vnode.el && hostCloneNode !== void 0 && patchFlag === -1) { el = vnode.el = hostCloneNode(vnode.el); } else { el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); if (shapeFlag & 8) { hostSetElementText(el, vnode.children); } else if (shapeFlag & 16) { mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== "foreignObject", slotScopeIds, optimized || !!vnode.dynamicChildren); } if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "created"); } if (props) { for (const key in props) { if (!isReservedProp(key)) { hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } if (vnodeHook = props.onVnodeBeforeMount) { invokeVNodeHook(vnodeHook, parentComponent, vnode); } } setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); } if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); } const needCallTransitionHooks = (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; if (needCallTransitionHooks) { transition.beforeEnter(el); } hostInsert(el, container, anchor); if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { queuePostRenderEffect(() => { vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); needCallTransitionHooks && transition.enter(el); dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); }, parentSuspense); } }; const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { if (scopeId) { hostSetScopeId(el, scopeId); } if (slotScopeIds) { for (let i = 0; i < slotScopeIds.length; i++) { hostSetScopeId(el, slotScopeIds[i]); } } if (parentComponent) { let subTree = parentComponent.subTree; if (vnode === subTree) { const parentVNode = parentComponent.vnode; setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); } } }; const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { for (let i = start; i < children.length; i++) { const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } }; const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { const el = n2.el = n1.el; let { patchFlag, dynamicChildren, dirs } = n2; patchFlag |= n1.patchFlag & 16; const oldProps = n1.props || EMPTY_OBJ; const newProps = n2.props || EMPTY_OBJ; let vnodeHook; if (vnodeHook = newProps.onVnodeBeforeUpdate) { invokeVNodeHook(vnodeHook, parentComponent, n2, n1); } if (dirs) { invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); } if (patchFlag > 0) { if (patchFlag & 16) { patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); } else { if (patchFlag & 2) { if (oldProps.class !== newProps.class) { hostPatchProp(el, "class", null, newProps.class, isSVG); } } if (patchFlag & 4) { hostPatchProp(el, "style", oldProps.style, newProps.style, isSVG); } if (patchFlag & 8) { const propsToUpdate = n2.dynamicProps; for (let i = 0; i < propsToUpdate.length; i++) { const key = propsToUpdate[i]; const prev = oldProps[key]; const next = newProps[key]; if (next !== prev || hostForcePatchProp && hostForcePatchProp(el, key)) { hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); } } } } if (patchFlag & 1) { if (n1.children !== n2.children) { hostSetElementText(el, n2.children); } } } else if (!optimized && dynamicChildren == null) { patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); } const areChildrenSVG = isSVG && n2.type !== "foreignObject"; if (dynamicChildren) { patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); } else if (!optimized) { patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); } if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { queuePostRenderEffect(() => { vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); }, parentSuspense); } }; const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { for (let i = 0; i < newChildren.length; i++) { const oldVNode = oldChildren[i]; const newVNode = newChildren[i]; const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 6 || oldVNode.shapeFlag & 64) ? hostParentNode(oldVNode.el) : fallbackContainer; patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); } }; const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { if (oldProps !== newProps) { for (const key in newProps) { if (isReservedProp(key)) continue; const next = newProps[key]; const prev = oldProps[key]; if (next !== prev || hostForcePatchProp && hostForcePatchProp(el, key)) { hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } if (oldProps !== EMPTY_OBJ) { for (const key in oldProps) { if (!isReservedProp(key) && !(key in newProps)) { hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); } } } } }; const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; if (dynamicChildren) { optimized = true; } if (fragmentSlotScopeIds) { slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; } if (n1 == null) { hostInsert(fragmentStartAnchor, container, anchor); hostInsert(fragmentEndAnchor, container, anchor); mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && n1.dynamicChildren) { patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); if (n2.key != null || parentComponent && n2 === parentComponent.subTree) { traverseStaticChildren(n1, n2, true); } } else { patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } } }; const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { n2.slotScopeIds = slotScopeIds; if (n1 == null) { if (n2.shapeFlag & 512) { parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); } else { mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); } } else { updateComponent(n1, n2, optimized); } }; const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense); if (isKeepAlive(initialVNode)) { instance.ctx.renderer = internals; } { setupComponent(instance); } if (instance.asyncDep) { parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); if (!initialVNode.el) { const placeholder = instance.subTree = createVNode(Comment$1); processCommentNode(null, placeholder, container, anchor); } return; } setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); }; const updateComponent = (n1, n2, optimized) => { const instance = n2.component = n1.component; if (shouldUpdateComponent(n1, n2, optimized)) { if (instance.asyncDep && !instance.asyncResolved) { updateComponentPreRender(instance, n2, optimized); return; } else { instance.next = n2; invalidateJob(instance.update); instance.update(); } } else { n2.component = n1.component; n2.el = n1.el; instance.vnode = n2; } }; const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { instance.update = effect(function componentEffect() { if (!instance.isMounted) { let vnodeHook; const { el, props } = initialVNode; const { bm, m, parent } = instance; if (bm) { invokeArrayFns(bm); } if (vnodeHook = props && props.onVnodeBeforeMount) { invokeVNodeHook(vnodeHook, parent, initialVNode); } if (el && hydrateNode) { const hydrateSubTree = () => { instance.subTree = renderComponentRoot(instance); hydrateNode(el, instance.subTree, instance, parentSuspense, null); }; if (isAsyncWrapper(initialVNode)) { initialVNode.type.__asyncLoader().then(() => !instance.isUnmounted && hydrateSubTree()); } else { hydrateSubTree(); } } else { const subTree = instance.subTree = renderComponentRoot(instance); patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); initialVNode.el = subTree.el; } if (m) { queuePostRenderEffect(m, parentSuspense); } if (vnodeHook = props && props.onVnodeMounted) { const scopedInitialVNode = initialVNode; queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); } if (initialVNode.shapeFlag & 256) { instance.a && queuePostRenderEffect(instance.a, parentSuspense); } instance.isMounted = true; initialVNode = container = anchor = null; } else { let { next, bu, u, parent, vnode } = instance; let originNext = next; let vnodeHook; if (next) { next.el = vnode.el; updateComponentPreRender(instance, next, optimized); } else { next = vnode; } if (bu) { invokeArrayFns(bu); } if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { invokeVNodeHook(vnodeHook, parent, next, vnode); } const nextTree = renderComponentRoot(instance); const prevTree = instance.subTree; instance.subTree = nextTree; patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, isSVG); next.el = nextTree.el; if (originNext === null) { updateHOCHostEl(instance, nextTree.el); } if (u) { queuePostRenderEffect(u, parentSuspense); } if (vnodeHook = next.props && next.props.onVnodeUpdated) { queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); } } }, prodEffectOptions); }; const updateComponentPreRender = (instance, nextVNode, optimized) => { nextVNode.component = instance; const prevProps = instance.vnode.props; instance.vnode = nextVNode; instance.next = null; updateProps(instance, nextVNode.props, prevProps, optimized); updateSlots(instance, nextVNode.children, optimized); pauseTracking(); flushPreFlushCbs(void 0, instance.update); resetTracking(); }; const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { const c1 = n1 && n1.children; const prevShapeFlag = n1 ? n1.shapeFlag : 0; const c2 = n2.children; const { patchFlag, shapeFlag } = n2; if (patchFlag > 0) { if (patchFlag & 128) { patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); return; } else if (patchFlag & 256) { patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); return; } } if (shapeFlag & 8) { if (prevShapeFlag & 16) { unmountChildren(c1, parentComponent, parentSuspense); } if (c2 !== c1) { hostSetElementText(container, c2); } } else { if (prevShapeFlag & 16) { if (shapeFlag & 16) { patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { unmountChildren(c1, parentComponent, parentSuspense, true); } } else { if (prevShapeFlag & 8) { hostSetElementText(container, ""); } if (shapeFlag & 16) { mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } } } }; const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { c1 = c1 || EMPTY_ARR; c2 = c2 || EMPTY_ARR; const oldLength = c1.length; const newLength = c2.length; const commonLength = Math.min(oldLength, newLength); let i; for (i = 0; i < commonLength; i++) { const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } if (oldLength > newLength) { unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); } else { mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); } }; const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { let i = 0; const l2 = c2.length; let e1 = c1.length - 1; let e2 = l2 - 1; while (i <= e1 && i <= e2) { const n1 = c1[i]; const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); if (isSameVNodeType(n1, n2)) { patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { break; } i++; } while (i <= e1 && i <= e2) { const n1 = c1[e1]; const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); if (isSameVNodeType(n1, n2)) { patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else { break; } e1--; e2--; } if (i > e1) { if (i <= e2) { const nextPos = e2 + 1; const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; while (i <= e2) { patch(null, c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); i++; } } } else if (i > e2) { while (i <= e1) { unmount(c1[i], parentComponent, parentSuspense, true); i++; } } else { const s1 = i; const s2 = i; const keyToNewIndexMap = new Map(); for (i = s2; i <= e2; i++) { const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); if (nextChild.key != null) { keyToNewIndexMap.set(nextChild.key, i); } } let j; let patched = 0; const toBePatched = e2 - s2 + 1; let moved = false; let maxNewIndexSoFar = 0; const newIndexToOldIndexMap = new Array(toBePatched); for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; for (i = s1; i <= e1; i++) { const prevChild = c1[i]; if (patched >= toBePatched) { unmount(prevChild, parentComponent, parentSuspense, true); continue; } let newIndex; if (prevChild.key != null) { newIndex = keyToNewIndexMap.get(prevChild.key); } else { for (j = s2; j <= e2; j++) { if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { newIndex = j; break; } } } if (newIndex === void 0) { unmount(prevChild, parentComponent, parentSuspense, true); } else { newIndexToOldIndexMap[newIndex - s2] = i + 1; if (newIndex >= maxNewIndexSoFar) { maxNewIndexSoFar = newIndex; } else { moved = true; } patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); patched++; } } const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; j = increasingNewIndexSequence.length - 1; for (i = toBePatched - 1; i >= 0; i--) { const nextIndex = s2 + i; const nextChild = c2[nextIndex]; const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; if (newIndexToOldIndexMap[i] === 0) { patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); } else if (moved) { if (j < 0 || i !== increasingNewIndexSequence[j]) { move(nextChild, container, anchor, 2); } else { j--; } } } } }; const move = (vnode, container, anchor, moveType, parentSuspense = null) => { const { el, type, transition, children, shapeFlag } = vnode; if (shapeFlag & 6) { move(vnode.component.subTree, container, anchor, moveType); return; } if (shapeFlag & 128) { vnode.suspense.move(container, anchor, moveType); return; } if (shapeFlag & 64) { type.move(vnode, container, anchor, internals); return; } if (type === Fragment) { hostInsert(el, container, anchor); for (let i = 0; i < children.length; i++) { move(children[i], container, anchor, moveType); } hostInsert(vnode.anchor, container, anchor); return; } if (type === Static) { moveStaticNode(vnode, container, anchor); return; } const needTransition = moveType !== 2 && shapeFlag & 1 && transition; if (needTransition) { if (moveType === 0) { transition.beforeEnter(el); hostInsert(el, container, anchor); queuePostRenderEffect(() => transition.enter(el), parentSuspense); } else { const { leave, delayLeave, afterLeave } = transition; const remove3 = () => hostInsert(el, container, anchor); const performLeave = () => { leave(el, () => { remove3(); afterLeave && afterLeave(); }); }; if (delayLeave) { delayLeave(el, remove3, performLeave); } else { performLeave(); } } } else { hostInsert(el, container, anchor); } }; const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { const { type, props, ref: ref2, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; if (ref2 != null) { setRef(ref2, null, parentSuspense, vnode, true); } if (shapeFlag & 256) { parentComponent.ctx.deactivate(vnode); return; } const shouldInvokeDirs = shapeFlag & 1 && dirs; let vnodeHook; if (vnodeHook = props && props.onVnodeBeforeUnmount) { invokeVNodeHook(vnodeHook, parentComponent, vnode); } if (shapeFlag & 6) { unmountComponent(vnode.component, parentSuspense, doRemove); } else { if (shapeFlag & 128) { vnode.suspense.unmount(parentSuspense, doRemove); return; } if (shouldInvokeDirs) { invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); } if (shapeFlag & 64) { vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); } else if (dynamicChildren && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); } else if (type === Fragment && (patchFlag & 128 || patchFlag & 256) || !optimized && shapeFlag & 16) { unmountChildren(children, parentComponent, parentSuspense); } if (doRemove) { remove2(vnode); } } if ((vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { queuePostRenderEffect(() => { vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); }, parentSuspense); } }; const remove2 = (vnode) => { const { type, el, anchor, transition } = vnode; if (type === Fragment) { removeFragment(el, anchor); return; } if (type === Static) { removeStaticNode(vnode); return; } const performRemove = () => { hostRemove(el); if (transition && !transition.persisted && transition.afterLeave) { transition.afterLeave(); } }; if (vnode.shapeFlag & 1 && transition && !transition.persisted) { const { leave, delayLeave } = transition; const performLeave = () => leave(el, performRemove); if (delayLeave) { delayLeave(vnode.el, performRemove, performLeave); } else { performLeave(); } } else { performRemove(); } }; const removeFragment = (cur, end) => { let next; while (cur !== end) { next = hostNextSibling(cur); hostRemove(cur); cur = next; } hostRemove(end); }; const unmountComponent = (instance, parentSuspense, doRemove) => { const { bum, effects, update, subTree, um } = instance; if (bum) { invokeArrayFns(bum); } if (effects) { for (let i = 0; i < effects.length; i++) { stop(effects[i]); } } if (update) { stop(update); unmount(subTree, instance, parentSuspense, doRemove); } if (um) { queuePostRenderEffect(um, parentSuspense); } queuePostRenderEffect(() => { instance.isUnmounted = true; }, parentSuspense); if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { parentSuspense.deps--; if (parentSuspense.deps === 0) { parentSuspense.resolve(); } } }; const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { for (let i = start; i < children.length; i++) { unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); } }; const getNextHostNode = (vnode) => { if (vnode.shapeFlag & 6) { return getNextHostNode(vnode.component.subTree); } if (vnode.shapeFlag & 128) { return vnode.suspense.next(); } return hostNextSibling(vnode.anchor || vnode.el); }; const render = (vnode, container, isSVG) => { if (vnode == null) { if (container._vnode) { unmount(container._vnode, null, null, true); } } else { patch(container._vnode || null, vnode, container, null, null, null, isSVG); } flushPostFlushCbs(); container._vnode = vnode; }; const internals = { p: patch, um: unmount, m: move, r: remove2, mt: mountComponent, mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, n: getNextHostNode, o: options }; let hydrate; let hydrateNode; if (createHydrationFns) { [hydrate, hydrateNode] = createHydrationFns(internals); } return { render, hydrate, createApp: createAppAPI(render, hydrate) }; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { callWithAsyncErrorHandling(hook, instance, 7, [ vnode, prevVNode ]); } function traverseStaticChildren(n1, n2, shallow = false) { const ch1 = n1.children; const ch2 = n2.children; if (isArray(ch1) && isArray(ch2)) { for (let i = 0; i < ch1.length; i++) { const c1 = ch1[i]; let c2 = ch2[i]; if (c2.shapeFlag & 1 && !c2.dynamicChildren) { if (c2.patchFlag <= 0 || c2.patchFlag === 32) { c2 = ch2[i] = cloneIfMounted(ch2[i]); c2.el = c1.el; } if (!shallow) traverseStaticChildren(c1, c2); } } } } function getSequence(arr) { const p2 = arr.slice(); const result = [0]; let i, j, u, v, c; const len = arr.length; for (i = 0; i < len; i++) { const arrI = arr[i]; if (arrI !== 0) { j = result[result.length - 1]; if (arr[j] < arrI) { p2[i] = j; result.push(i); continue; } u = 0; v = result.length - 1; while (u < v) { c = (u + v) / 2 | 0; if (arr[result[c]] < arrI) { u = c + 1; } else { v = c; } } if (arrI < arr[result[u]]) { if (u > 0) { p2[i] = result[u - 1]; } result[u] = i; } } } u = result.length; v = result[u - 1]; while (u-- > 0) { result[u] = v; v = p2[v]; } return result; } const isTeleport = (type) => type.__isTeleport; const NULL_DYNAMIC_COMPONENT = Symbol(); const Fragment = Symbol(void 0); const Text = Symbol(void 0); const Comment$1 = Symbol(void 0); const Static = Symbol(void 0); let currentBlock = null; let isBlockTreeEnabled = 1; function setBlockTracking(value) { isBlockTreeEnabled += value; } function isVNode(value) { return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { return n1.type === n2.type && n1.key === n2.key; } const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; const normalizeRef = ({ ref: ref2 }) => { return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2 } : ref2 : null; }; const createVNode = _createVNode; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { if (!type || type === NULL_DYNAMIC_COMPONENT) { type = Comment$1; } if (isVNode(type)) { const cloned = cloneVNode(type, props, true); if (children) { normalizeChildren(cloned, children); } return cloned; } if (isClassComponent(type)) { type = type.__vccOpts; } if (props) { if (isProxy(props) || InternalObjectKey in props) { props = extend({}, props); } let { class: klass, style } = props; if (klass && !isString(klass)) { props.class = normalizeClass(klass); } if (isObject$1(style)) { if (isProxy(style) && !isArray(style)) { style = extend({}, style); } props.style = normalizeStyle(style); } } const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$1(type) ? 4 : isFunction(type) ? 2 : 0; const vnode = { __v_isVNode: true, __v_skip: true, type, props, key: props && normalizeKey(props), ref: props && normalizeRef(props), scopeId: currentScopeId, slotScopeIds: null, children: null, component: null, suspense: null, ssContent: null, ssFallback: null, dirs: null, transition: null, el: null, anchor: null, target: null, targetAnchor: null, shapeFlag, patchFlag, dynamicProps, dynamicChildren: null, appContext: null }; normalizeChildren(vnode, children); if (shapeFlag & 128) { type.normalize(vnode); } if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (patchFlag > 0 || shapeFlag & 6) && patchFlag !== 32) { currentBlock.push(vnode); } return vnode; } function cloneVNode(vnode, extraProps, mergeRef = false) { const { props, ref: ref2, patchFlag, children } = vnode; const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; const cloned = { __v_isVNode: true, __v_skip: true, type: vnode.type, props: mergedProps, key: mergedProps && normalizeKey(mergedProps), ref: extraProps && extraProps.ref ? mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref2, scopeId: vnode.scopeId, slotScopeIds: vnode.slotScopeIds, children, target: vnode.target, targetAnchor: vnode.targetAnchor, staticCount: vnode.staticCount, staticCache: vnode.staticCache, shapeFlag: vnode.shapeFlag, patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, dynamicProps: vnode.dynamicProps, dynamicChildren: vnode.dynamicChildren, appContext: vnode.appContext, dirs: vnode.dirs, transition: vnode.transition, component: vnode.component, suspense: vnode.suspense, ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), el: vnode.el, anchor: vnode.anchor }; return cloned; } function createTextVNode(text = " ", flag = 0) { return createVNode(Text, null, text, flag); } function normalizeVNode(child) { if (child == null || typeof child === "boolean") { return createVNode(Comment$1); } else if (isArray(child)) { return createVNode(Fragment, null, child.slice()); } else if (typeof child === "object") { return cloneIfMounted(child); } else { return createVNode(Text, null, String(child)); } } function cloneIfMounted(child) { return child.el === null ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { let type = 0; const { shapeFlag } = vnode; if (children == null) { children = null; } else if (isArray(children)) { type = 16; } else if (typeof children === "object") { if (shapeFlag & 1 || shapeFlag & 64) { const slot = children.default; if (slot) { slot._c && (slot._d = false); normalizeChildren(vnode, slot()); slot._c && (slot._d = true); } return; } else { type = 32; const slotFlag = children._; if (!slotFlag && !(InternalObjectKey in children)) { children._ctx = currentRenderingInstance; } else if (slotFlag === 3 && currentRenderingInstance) { if (currentRenderingInstance.slots._ === 1) { children._ = 1; } else { children._ = 2; vnode.patchFlag |= 1024; } } } } else if (isFunction(children)) { children = { default: children, _ctx: currentRenderingInstance }; type = 32; } else { children = String(children); if (shapeFlag & 64) { type = 16; children = [createTextVNode(children)]; } else { type = 8; } } vnode.children = children; vnode.shapeFlag |= type; } function mergeProps(...args) { const ret = extend({}, args[0]); for (let i = 1; i < args.length; i++) { const toMerge = args[i]; for (const key in toMerge) { if (key === "class") { if (ret.class !== toMerge.class) { ret.class = normalizeClass([ret.class, toMerge.class]); } } else if (key === "style") { ret.style = normalizeStyle([ret.style, toMerge.style]); } else if (isOn(key)) { const existing = ret[key]; const incoming = toMerge[key]; if (existing !== incoming) { ret[key] = existing ? [].concat(existing, incoming) : incoming; } } else if (key !== "") { ret[key] = toMerge[key]; } } } return ret; } const getPublicInstance = (i) => { if (!i) return null; if (isStatefulComponent(i)) return getExposeProxy(i) || i.proxy; return getPublicInstance(i.parent); }; const publicPropertiesMap = extend(Object.create(null), { $: (i) => i, $el: (i) => i.vnode.el, $data: (i) => i.data, $props: (i) => i.props, $attrs: (i) => i.attrs, $slots: (i) => i.slots, $refs: (i) => i.refs, $parent: (i) => getPublicInstance(i.parent), $root: (i) => getPublicInstance(i.root), $emit: (i) => i.emit, $options: (i) => resolveMergedOptions(i), $forceUpdate: (i) => () => queueJob(i.update), $nextTick: (i) => nextTick.bind(i.proxy), $watch: (i) => instanceWatch.bind(i) }); const PublicInstanceProxyHandlers = { get({ _: instance }, key) { const { ctx, setupState, data, props, accessCache, type, appContext } = instance; let normalizedProps; if (key[0] !== "$") { const n = accessCache[key]; if (n !== void 0) { switch (n) { case 0: return setupState[key]; case 1: return data[key]; case 3: return ctx[key]; case 2: return props[key]; } } else if (setupState !== EMPTY_OBJ && hasOwn$1(setupState, key)) { accessCache[key] = 0; return setupState[key]; } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) { accessCache[key] = 1; return data[key]; } else if ((normalizedProps = instance.propsOptions[0]) && hasOwn$1(normalizedProps, key)) { accessCache[key] = 2; return props[key]; } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) { accessCache[key] = 3; return ctx[key]; } else if (shouldCacheAccess) { accessCache[key] = 4; } } const publicGetter = publicPropertiesMap[key]; let cssModule, globalProperties; if (publicGetter) { if (key === "$attrs") { track(instance, "get", key); } return publicGetter(instance); } else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) { return cssModule; } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) { accessCache[key] = 3; return ctx[key]; } else if (globalProperties = appContext.config.globalProperties, hasOwn$1(globalProperties, key)) { { return globalProperties[key]; } } else ; }, set({ _: instance }, key, value) { const { data, setupState, ctx } = instance; if (setupState !== EMPTY_OBJ && hasOwn$1(setupState, key)) { setupState[key] = value; } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) { data[key] = value; } else if (hasOwn$1(instance.props, key)) { return false; } if (key[0] === "$" && key.slice(1) in instance) { return false; } else { { ctx[key] = value; } } return true; }, has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { let normalizedProps; return accessCache[key] !== void 0 || data !== EMPTY_OBJ && hasOwn$1(data, key) || setupState !== EMPTY_OBJ && hasOwn$1(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key); } }; const RuntimeCompiledPublicInstanceProxyHandlers = extend({}, PublicInstanceProxyHandlers, { get(target, key) { if (key === Symbol.unscopables) { return; } return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { const has2 = key[0] !== "_" && !isGloballyWhitelisted(key); return has2; } }); const emptyAppContext = createAppContext(); let uid$2 = 0; function createComponentInstance(vnode, parent, suspense) { const type = vnode.type; const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; const instance = { uid: uid$2++, vnode, type, parent, appContext, root: null, next: null, subTree: null, update: null, render: null, proxy: null, exposed: null, exposeProxy: null, withProxy: null, effects: null, provides: parent ? parent.provides : Object.create(appContext.provides), accessCache: null, renderCache: [], components: null, directives: null, propsOptions: normalizePropsOptions(type, appContext), emitsOptions: normalizeEmitsOptions(type, appContext), emit: null, emitted: null, propsDefaults: EMPTY_OBJ, inheritAttrs: type.inheritAttrs, ctx: EMPTY_OBJ, data: EMPTY_OBJ, props: EMPTY_OBJ, attrs: EMPTY_OBJ, slots: EMPTY_OBJ, refs: EMPTY_OBJ, setupState: EMPTY_OBJ, setupContext: null, suspense, suspenseId: suspense ? suspense.pendingId : 0, asyncDep: null, asyncResolved: false, isMounted: false, isUnmounted: false, isDeactivated: false, bc: null, c: null, bm: null, m: null, bu: null, u: null, um: null, bum: null, da: null, a: null, rtg: null, rtc: null, ec: null, sp: null }; { instance.ctx = { _: instance }; } instance.root = parent ? parent.root : instance; instance.emit = emit.bind(null, instance); return instance; } let currentInstance = null; const setCurrentInstance = (instance) => { currentInstance = instance; }; function isStatefulComponent(instance) { return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { isInSSRComponentSetup = isSSR; const { props, children } = instance.vnode; const isStateful = isStatefulComponent(instance); initProps(instance, props, isStateful, isSSR); initSlots(instance, children); const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; isInSSRComponentSetup = false; return setupResult; } function setupStatefulComponent(instance, isSSR) { const Component = instance.type; instance.accessCache = Object.create(null); instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); const { setup } = Component; if (setup) { const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; currentInstance = instance; pauseTracking(); const setupResult = callWithErrorHandling(setup, instance, 0, [ instance.props, setupContext ]); resetTracking(); currentInstance = null; if (isPromise(setupResult)) { const unsetInstance = () => { currentInstance = null; }; setupResult.then(unsetInstance, unsetInstance); if (isSSR) { return setupResult.then((resolvedResult) => { handleSetupResult(instance, resolvedResult); }).catch((e) => { handleError(e, instance, 0); }); } else { instance.asyncDep = setupResult; } } else { handleSetupResult(instance, setupResult); } } else { finishComponentSetup(instance); } } function handleSetupResult(instance, setupResult, isSSR) { if (isFunction(setupResult)) { { instance.render = setupResult; } } else if (isObject$1(setupResult)) { instance.setupState = proxyRefs(setupResult); } else ; finishComponentSetup(instance); } function finishComponentSetup(instance, isSSR, skipOptions) { const Component = instance.type; if (!instance.render) { instance.render = Component.render || NOOP; if (instance.render._rc) { instance.withProxy = new Proxy(instance.ctx, RuntimeCompiledPublicInstanceProxyHandlers); } } { currentInstance = instance; pauseTracking(); applyOptions(instance); resetTracking(); currentInstance = null; } } function createSetupContext(instance) { const expose = (exposed) => { instance.exposed = exposed || {}; }; { return { attrs: instance.attrs, slots: instance.slots, emit: instance.emit, expose }; } } function getExposeProxy(instance) { if (instance.exposed) { return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { get(target, key) { if (key in target) { return target[key]; } else if (key in publicPropertiesMap) { return publicPropertiesMap[key](instance); } } })); } } function recordInstanceBoundEffect(effect2, instance = currentInstance) { if (instance) { (instance.effects || (instance.effects = [])).push(effect2); } } const classifyRE = /(?:^|[-_])(\w)/g; const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); function getComponentName(Component) { return isFunction(Component) ? Component.displayName || Component.name : Component.name; } function formatComponentName(instance, Component, isRoot = false) { let name = getComponentName(Component); if (!name && Component.__file) { const match = Component.__file.match(/([^/\\]+)\.\w+$/); if (match) { name = match[1]; } } if (!name && instance && instance.parent) { const inferFromRegistry = (registry) => { for (const key in registry) { if (registry[key] === Component) { return key; } } }; name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components); } return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { return isFunction(value) && "__vccOpts" in value; } function computed$1(getterOrOptions) { const c = computed(getterOrOptions); recordInstanceBoundEffect(c.effect); return c; } function h(type, propsOrChildren, children) { const l = arguments.length; if (l === 2) { if (isObject$1(propsOrChildren) && !isArray(propsOrChildren)) { if (isVNode(propsOrChildren)) { return createVNode(type, null, [propsOrChildren]); } return createVNode(type, propsOrChildren); } else { return createVNode(type, null, propsOrChildren); } } else { if (l > 3) { children = Array.prototype.slice.call(arguments, 2); } else if (l === 3 && isVNode(children)) { children = [children]; } return createVNode(type, propsOrChildren, children); } } const version = "3.1.4"; const svgNS = "http://www.w3.org/2000/svg"; const doc = typeof document !== "undefined" ? document : null; const nodeOps = { insert: (child, parent, anchor) => { parent.insertBefore(child, anchor || null); }, remove: (child) => { const parent = child.parentNode; if (parent) { parent.removeChild(child); } }, createElement: (tag, isSVG, is, props) => { const el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is ? { is } : void 0); if (tag === "select" && props && props.multiple != null) { el.setAttribute("multiple", props.multiple); } return el; }, createText: (text) => doc.createTextNode(text), createComment: (text) => doc.createComment(text), setText: (node, text) => { node.nodeValue = text; }, setElementText: (el, text) => { el.textContent = text; }, parentNode: (node) => node.parentNode, nextSibling: (node) => node.nextSibling, querySelector: (selector) => doc.querySelector(selector), setScopeId(el, id) { el.setAttribute(id, ""); }, cloneNode(el) { const cloned = el.cloneNode(true); if (`_value` in el) { cloned._value = el._value; } return cloned; }, insertStaticContent(content, parent, anchor, isSVG, cached) { if (cached) { let first2; let last2; let i = 0; let l = cached.length; for (; i < l; i++) { const node = cached[i].cloneNode(true); if (i === 0) first2 = node; if (i === l - 1) last2 = node; parent.insertBefore(node, anchor); } return [first2, last2]; } const before = anchor ? anchor.previousSibling : parent.lastChild; if (anchor) { let insertionPoint; let usingTempInsertionPoint = false; if (anchor instanceof Element) { insertionPoint = anchor; } else { usingTempInsertionPoint = true; insertionPoint = isSVG ? doc.createElementNS(svgNS, "g") : doc.createElement("div"); parent.insertBefore(insertionPoint, anchor); } insertionPoint.insertAdjacentHTML("beforebegin", content); if (usingTempInsertionPoint) { parent.removeChild(insertionPoint); } } else { parent.insertAdjacentHTML("beforeend", content); } let first = before ? before.nextSibling : parent.firstChild; const last = anchor ? anchor.previousSibling : parent.lastChild; const ret = []; while (first) { ret.push(first); if (first === last) break; first = first.nextSibling; } return ret; } }; function patchClass$1(el, value, isSVG) { if (value == null) { value = ""; } if (isSVG) { el.setAttribute("class", value); } else { const transitionClasses = el._vtc; if (transitionClasses) { value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); } el.className = value; } } function patchStyle$1(el, prev, next) { const style = el.style; if (!next) { el.removeAttribute("style"); } else if (isString(next)) { if (prev !== next) { const current = style.display; style.cssText = next; if ("_vod" in el) { style.display = current; } } } else { for (const key in next) { setStyle$1(style, key, next[key]); } if (prev && !isString(prev)) { for (const key in prev) { if (next[key] == null) { setStyle$1(style, key, ""); } } } } } const importantRE$1 = /\s*!important$/; function setStyle$1(style, name, val) { if (isArray(val)) { val.forEach((v) => setStyle$1(style, name, v)); } else { if (name.startsWith("--")) { style.setProperty(name, val); } else { const prefixed = autoPrefix$1(style, name); if (importantRE$1.test(val)) { style.setProperty(hyphenate(prefixed), val.replace(importantRE$1, ""), "important"); } else { style[prefixed] = val; } } } } const prefixes$1 = ["Webkit", "Moz", "ms"]; const prefixCache$1 = {}; function autoPrefix$1(style, rawName) { const cached = prefixCache$1[rawName]; if (cached) { return cached; } let name = camelize(rawName); if (name !== "filter" && name in style) { return prefixCache$1[rawName] = name; } name = capitalize(name); for (let i = 0; i < prefixes$1.length; i++) { const prefixed = prefixes$1[i] + name; if (prefixed in style) { return prefixCache$1[rawName] = prefixed; } } return rawName; } const xlinkNS = "http://www.w3.org/1999/xlink"; function patchAttr(el, key, value, isSVG, instance) { if (isSVG && key.startsWith("xlink:")) { if (value == null) { el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); } else { el.setAttributeNS(xlinkNS, key, value); } } else { const isBoolean = isSpecialBooleanAttr(key); if (value == null || isBoolean && value === false) { el.removeAttribute(key); } else { el.setAttribute(key, isBoolean ? "" : value); } } } function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { if (key === "innerHTML" || key === "textContent") { if (prevChildren) { unmountChildren(prevChildren, parentComponent, parentSuspense); } el[key] = value == null ? "" : value; return; } if (key === "value" && el.tagName !== "PROGRESS") { el._value = value; const newValue = value == null ? "" : value; if (el.value !== newValue) { el.value = newValue; } if (value == null) { el.removeAttribute(key); } return; } if (value === "" || value == null) { const type = typeof el[key]; if (value === "" && type === "boolean") { el[key] = true; return; } else if (value == null && type === "string") { el[key] = ""; el.removeAttribute(key); return; } else if (type === "number") { el[key] = 0; el.removeAttribute(key); return; } } try { el[key] = value; } catch (e) { } } let _getNow = Date.now; let skipTimestampCheck = false; if (typeof window !== "undefined") { if (_getNow() > document.createEvent("Event").timeStamp) { _getNow = () => performance.now(); } const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); } let cachedNow = 0; const p = Promise.resolve(); const reset = () => { cachedNow = 0; }; const getNow = () => cachedNow || (p.then(reset), cachedNow = _getNow()); function addEventListener(el, event, handler, options) { el.addEventListener(event, handler, options); } function removeEventListener(el, event, handler, options) { el.removeEventListener(event, handler, options); } function patchEvent$1(el, rawName, prevValue, nextValue, instance = null) { const invokers = el._vei || (el._vei = {}); const existingInvoker = invokers[rawName]; if (nextValue && existingInvoker) { existingInvoker.value = nextValue; } else { const [name, options] = parseName(rawName); if (nextValue) { const invoker = invokers[rawName] = createInvoker$1(nextValue, instance); addEventListener(el, name, invoker, options); } else if (existingInvoker) { removeEventListener(el, name, existingInvoker, options); invokers[rawName] = void 0; } } } const optionsModifierRE = /(?:Once|Passive|Capture)$/; function parseName(name) { let options; if (optionsModifierRE.test(name)) { options = {}; let m; while (m = name.match(optionsModifierRE)) { name = name.slice(0, name.length - m[0].length); options[m[0].toLowerCase()] = true; } } return [hyphenate(name.slice(2)), options]; } function createInvoker$1(initialValue, instance) { const invoker = (e) => { const timeStamp = e.timeStamp || _getNow(); if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]); } }; invoker.value = initialValue; invoker.attached = getNow(); return invoker; } function patchStopImmediatePropagation(e, value) { if (isArray(value)) { const originalStop = e.stopImmediatePropagation; e.stopImmediatePropagation = () => { originalStop.call(e); e._stopped = true; }; return value.map((fn) => (e2) => !e2._stopped && fn(e2)); } else { return value; } } const nativeOnRE = /^on[a-z]/; const forcePatchProp = (_, key) => key === "value"; const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { switch (key) { case "class": patchClass$1(el, nextValue, isSVG); break; case "style": patchStyle$1(el, prevValue, nextValue); break; default: if (isOn(key)) { if (!isModelListener(key)) { patchEvent$1(el, key, prevValue, nextValue, parentComponent); } } else if (shouldSetAsProp(el, key, nextValue, isSVG)) { patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); } else { if (key === "true-value") { el._trueValue = nextValue; } else if (key === "false-value") { el._falseValue = nextValue; } patchAttr(el, key, nextValue, isSVG); } break; } }; function shouldSetAsProp(el, key, value, isSVG) { if (isSVG) { if (key === "innerHTML") { return true; } if (key in el && nativeOnRE.test(key) && isFunction(value)) { return true; } return false; } if (key === "spellcheck" || key === "draggable") { return false; } if (key === "form") { return false; } if (key === "list" && el.tagName === "INPUT") { return false; } if (key === "type" && el.tagName === "TEXTAREA") { return false; } if (nativeOnRE.test(key) && isString(value)) { return false; } return key in el; } const systemModifiers = ["ctrl", "shift", "alt", "meta"]; const modifierGuards = { stop: (e) => e.stopPropagation(), prevent: (e) => e.preventDefault(), self: (e) => e.target !== e.currentTarget, ctrl: (e) => !e.ctrlKey, shift: (e) => !e.shiftKey, alt: (e) => !e.altKey, meta: (e) => !e.metaKey, left: (e) => "button" in e && e.button !== 0, middle: (e) => "button" in e && e.button !== 1, right: (e) => "button" in e && e.button !== 2, exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) }; const withModifiers = (fn, modifiers) => { return (event, ...args) => { for (let i = 0; i < modifiers.length; i++) { const guard = modifierGuards[modifiers[i]]; if (guard && guard(event, modifiers)) return; } return fn(event, ...args); }; }; const rendererOptions = extend({ patchProp, forcePatchProp }, nodeOps); let renderer; function ensureRenderer() { return renderer || (renderer = createRenderer(rendererOptions)); } const createApp = (...args) => { const app = ensureRenderer().createApp(...args); const { mount } = app; app.mount = (containerOrSelector) => { const container = normalizeContainer(containerOrSelector); if (!container) return; const component = app._component; if (!isFunction(component) && !component.render && !component.template) { component.template = container.innerHTML; } container.innerHTML = ""; const proxy = mount(container, false, container instanceof SVGElement); if (container instanceof Element) { container.removeAttribute("v-cloak"); container.setAttribute("data-v-app", ""); } return proxy; }; return app; }; function normalizeContainer(container) { if (isString(container)) { const res = document.querySelector(container); return res; } return container; } var attrs = ["top", "left", "right", "bottom"]; var inited; var elementComputedStyle = {}; var support; function getSupport() { if (!("CSS" in window) || typeof CSS.supports != "function") { support = ""; } else if (CSS.supports("top: env(safe-area-inset-top)")) { support = "env"; } else if (CSS.supports("top: constant(safe-area-inset-top)")) { support = "constant"; } else { support = ""; } return support; } function init() { support = typeof support === "string" ? support : getSupport(); if (!support) { attrs.forEach(function(attr) { elementComputedStyle[attr] = 0; }); return; } function setStyle2(el, style) { var elStyle = el.style; Object.keys(style).forEach(function(key) { var val = style[key]; elStyle[key] = val; }); } var cbs = []; function parentReady(callback) { if (callback) { cbs.push(callback); } else { cbs.forEach(function(cb) { cb(); }); } } var passiveEvents = false; try { var opts = Object.defineProperty({}, "passive", { get: function() { passiveEvents = { passive: true }; } }); window.addEventListener("test", null, opts); } catch (e) { } function addChild(parent, attr) { var a1 = document.createElement("div"); var a2 = document.createElement("div"); var a1Children = document.createElement("div"); var a2Children = document.createElement("div"); var W = 100; var MAX = 1e4; var aStyle = { position: "absolute", width: W + "px", height: "200px", boxSizing: "border-box", overflow: "hidden", paddingBottom: support + "(safe-area-inset-" + attr + ")" }; setStyle2(a1, aStyle); setStyle2(a2, aStyle); setStyle2(a1Children, { transition: "0s", animation: "none", width: "400px", height: "400px" }); setStyle2(a2Children, { transition: "0s", animation: "none", width: "250%", height: "250%" }); a1.appendChild(a1Children); a2.appendChild(a2Children); parent.appendChild(a1); parent.appendChild(a2); parentReady(function() { a1.scrollTop = a2.scrollTop = MAX; var a1LastScrollTop = a1.scrollTop; var a2LastScrollTop = a2.scrollTop; function onScroll() { if (this.scrollTop === (this === a1 ? a1LastScrollTop : a2LastScrollTop)) { return; } a1.scrollTop = a2.scrollTop = MAX; a1LastScrollTop = a1.scrollTop; a2LastScrollTop = a2.scrollTop; attrChange(attr); } a1.addEventListener("scroll", onScroll, passiveEvents); a2.addEventListener("scroll", onScroll, passiveEvents); }); var computedStyle = getComputedStyle(a1); Object.defineProperty(elementComputedStyle, attr, { configurable: true, get: function() { return parseFloat(computedStyle.paddingBottom); } }); } var parentDiv = document.createElement("div"); setStyle2(parentDiv, { position: "absolute", left: "0", top: "0", width: "0", height: "0", zIndex: "-1", overflow: "hidden", visibility: "hidden" }); attrs.forEach(function(key) { addChild(parentDiv, key); }); document.body.appendChild(parentDiv); parentReady(); inited = true; } function getAttr(attr) { if (!inited) { init(); } return elementComputedStyle[attr]; } var changeAttrs = []; function attrChange(attr) { if (!changeAttrs.length) { setTimeout(function() { var style = {}; changeAttrs.forEach(function(attr2) { style[attr2] = elementComputedStyle[attr2]; }); changeAttrs.length = 0; callbacks.forEach(function(callback) { callback(style); }); }, 0); } changeAttrs.push(attr); } var callbacks = []; function onChange(callback) { if (!getSupport()) { return; } if (!inited) { init(); } if (typeof callback === "function") { callbacks.push(callback); } } function offChange(callback) { var index = callbacks.indexOf(callback); if (index >= 0) { callbacks.splice(index, 1); } } var safeAreaInsets = { get support() { return (typeof support === "string" ? support : getSupport()).length != 0; }, get top() { return getAttr("top"); }, get left() { return getAttr("left"); }, get right() { return getAttr("right"); }, get bottom() { return getAttr("bottom"); }, onChange, offChange }; var out = safeAreaInsets; function getWindowOffset() { const style = document.documentElement.style; const top = parseInt(style.getPropertyValue("--window-top")); const bottom = parseInt(style.getPropertyValue("--window-bottom")); const left = parseInt(style.getPropertyValue("--window-left")); const right = parseInt(style.getPropertyValue("--window-right")); return { top: top ? top + out.top : 0, bottom: bottom ? bottom + out.bottom : 0, left: left ? left + out.left : 0, right: right ? right + out.right : 0 }; } function updateCssVar(cssVars) { const style = document.documentElement.style; Object.keys(cssVars).forEach((name) => { style.setProperty(name, cssVars[name]); }); } function PolySymbol(name) { return Symbol("[uni-app]: " + name); } const ICON_PATH_CANCEL = "M20.928 10.176l-4.928 4.928-4.928-4.928-0.896 0.896 4.928 4.928-4.928 4.928 0.896 0.896 4.928-4.928 4.928 4.928 0.896-0.896-4.928-4.928 4.928-4.928-0.896-0.896zM16 2.080q-3.776 0-7.040 1.888-3.136 1.856-4.992 4.992-1.888 3.264-1.888 7.040t1.888 7.040q1.856 3.136 4.992 4.992 3.264 1.888 7.040 1.888t7.040-1.888q3.136-1.856 4.992-4.992 1.888-3.264 1.888-7.040t-1.888-7.040q-1.856-3.136-4.992-4.992-3.264-1.888-7.040-1.888zM16 28.64q-3.424 0-6.4-1.728-2.848-1.664-4.512-4.512-1.728-2.976-1.728-6.4t1.728-6.4q1.664-2.848 4.512-4.512 2.976-1.728 6.4-1.728t6.4 1.728q2.848 1.664 4.512 4.512 1.728 2.976 1.728 6.4t-1.728 6.4q-1.664 2.848-4.512 4.512-2.976 1.728-6.4 1.728z"; const ICON_PATH_CLEAR = "M16 0q-4.352 0-8.064 2.176-3.616 2.144-5.76 5.76-2.176 3.712-2.176 8.064t2.176 8.064q2.144 3.616 5.76 5.76 3.712 2.176 8.064 2.176t8.064-2.176q3.616-2.144 5.76-5.76 2.176-3.712 2.176-8.064t-2.176-8.064q-2.144-3.616-5.76-5.76-3.712-2.176-8.064-2.176zM22.688 21.408q0.32 0.32 0.304 0.752t-0.336 0.736-0.752 0.304-0.752-0.32l-5.184-5.376-5.376 5.184q-0.32 0.32-0.752 0.304t-0.736-0.336-0.304-0.752 0.32-0.752l5.376-5.184-5.184-5.376q-0.32-0.32-0.304-0.752t0.336-0.752 0.752-0.304 0.752 0.336l5.184 5.376 5.376-5.184q0.32-0.32 0.752-0.304t0.752 0.336 0.304 0.752-0.336 0.752l-5.376 5.184 5.184 5.376z"; const ICON_PATH_DOWNLOAD = "M15.808 1.696q-3.776 0-7.072 1.984-3.2 1.888-5.088 5.152-1.952 3.392-1.952 7.36 0 3.776 1.952 7.072 1.888 3.2 5.088 5.088 3.296 1.952 7.072 1.952 3.968 0 7.36-1.952 3.264-1.888 5.152-5.088 1.984-3.296 1.984-7.072 0-4-1.984-7.36-1.888-3.264-5.152-5.152-3.36-1.984-7.36-1.984zM20.864 18.592l-3.776 4.928q-0.448 0.576-1.088 0.576t-1.088-0.576l-3.776-4.928q-0.448-0.576-0.24-0.992t0.944-0.416h2.976v-8.928q0-0.256 0.176-0.432t0.4-0.176h1.216q0.224 0 0.4 0.176t0.176 0.432v8.928h2.976q0.736 0 0.944 0.416t-0.24 0.992z"; const ICON_PATH_INFO = "M15.808 0.128q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.176 3.776-2.176 8.16 0 4.224 2.176 7.872 2.080 3.552 5.632 5.632 3.648 2.176 7.872 2.176 4.384 0 8.16-2.176 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.416-2.176-8.16-2.112-3.616-5.728-5.728-3.744-2.176-8.16-2.176zM16.864 23.776q0 0.064-0.064 0.064h-1.568q-0.096 0-0.096-0.064l-0.256-11.328q0-0.064 0.064-0.064h2.112q0.096 0 0.064 0.064l-0.256 11.328zM16 10.88q-0.576 0-0.976-0.4t-0.4-0.96 0.4-0.96 0.976-0.4 0.976 0.4 0.4 0.96-0.4 0.96-0.976 0.4z"; const ICON_PATH_SEARCH = "M20.928 22.688q-1.696 1.376-3.744 2.112-2.112 0.768-4.384 0.768-3.488 0-6.464-1.728-2.88-1.696-4.576-4.608-1.76-2.976-1.76-6.464t1.76-6.464q1.696-2.88 4.576-4.576 2.976-1.76 6.464-1.76t6.464 1.76q2.912 1.696 4.608 4.576 1.728 2.976 1.728 6.464 0 2.272-0.768 4.384-0.736 2.048-2.112 3.744l9.312 9.28-1.824 1.824-9.28-9.312zM12.8 23.008q2.784 0 5.184-1.376 2.304-1.376 3.68-3.68 1.376-2.4 1.376-5.184t-1.376-5.152q-1.376-2.336-3.68-3.68-2.4-1.408-5.184-1.408t-5.152 1.408q-2.336 1.344-3.68 3.68-1.408 2.368-1.408 5.152t1.408 5.184q1.344 2.304 3.68 3.68 2.368 1.376 5.152 1.376zM12.8 23.008v0z"; const ICON_PATH_SUCCESS_NO_CIRCLE = "M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z"; const ICON_PATH_SUCCESS = "M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM24.832 11.328l-11.264 11.104q-0.032 0.032-0.112 0.032t-0.112-0.032l-5.216-5.376q-0.096-0.128 0-0.288l0.704-0.96q0.032-0.064 0.112-0.064t0.112 0.032l4.256 3.264q0.064 0.032 0.144 0.032t0.112-0.032l10.336-8.608q0.064-0.064 0.144-0.064t0.112 0.064l0.672 0.672q0.128 0.128 0 0.224z"; const ICON_PATH_WAITING = "M15.84 0.096q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM23.008 21.92l-0.512 0.896q-0.096 0.128-0.224 0.064l-8-3.808q-0.096-0.064-0.16-0.128-0.128-0.096-0.128-0.288l0.512-12.096q0-0.064 0.048-0.112t0.112-0.048h1.376q0.064 0 0.112 0.048t0.048 0.112l0.448 10.848 6.304 4.256q0.064 0.064 0.080 0.128t-0.016 0.128z"; const ICON_PATH_WARN = "M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z"; function useCurrentPageId() { { return parseInt(window.__id__); } } function disableScrollListener(evt) { evt.preventDefault(); } let testReachBottomTimer; let lastScrollHeight = 0; function createScrollListener({ onPageScroll, onReachBottom, onReachBottomDistance }) { let ticking = false; let hasReachBottom = false; let reachBottomLocking = true; const isReachBottom = () => { const { scrollHeight } = document.documentElement; const windowHeight = window.innerHeight; const scrollY = window.scrollY; const isBottom = scrollY > 0 && scrollHeight > windowHeight && scrollY + windowHeight + onReachBottomDistance >= scrollHeight; const heightChanged = Math.abs(scrollHeight - lastScrollHeight) > onReachBottomDistance; if (isBottom && (!hasReachBottom || heightChanged)) { lastScrollHeight = scrollHeight; hasReachBottom = true; return true; } if (!isBottom && hasReachBottom) { hasReachBottom = false; } return false; }; const trigger2 = () => { onPageScroll && onPageScroll(window.pageYOffset); function testReachBottom() { if (isReachBottom()) { onReachBottom && onReachBottom(); reachBottomLocking = false; setTimeout(function() { reachBottomLocking = true; }, 350); return true; } } if (onReachBottom && reachBottomLocking) { if (testReachBottom()) ; else { testReachBottomTimer = setTimeout(testReachBottom, 300); } } ticking = false; }; return function onScroll() { clearTimeout(testReachBottomTimer); if (!ticking) { requestAnimationFrame(trigger2); } ticking = true; }; } const isClickEvent = (val) => val.type === "click"; function $nne(evt) { const { currentTarget } = evt; if (!(evt instanceof Event) || !(currentTarget instanceof HTMLElement)) { return evt; } if (currentTarget.tagName.indexOf("UNI-") !== 0) { return evt; } const res = createNativeEvent(evt); if (isClickEvent(evt)) { normalizeClickEvent(res, evt); } else if (evt instanceof TouchEvent) { const { top } = getWindowOffset(); res.touches = normalizeTouchEvent(evt.touches, top); res.changedTouches = normalizeTouchEvent(evt.changedTouches, top); } return res; } function findUniTarget(target) { while (target && target.tagName.indexOf("UNI-") !== 0) { target = target.parentElement; } return target; } function createNativeEvent(evt) { const { type, timeStamp, target, currentTarget } = evt; const event = { type, timeStamp, target: normalizeTarget(findUniTarget(target)), detail: {}, currentTarget: normalizeTarget(currentTarget) }; if (evt._stopped) { event._stopped = true; } if (evt.type.startsWith("touch")) { event.touches = evt.touches; event.changedTouches = evt.changedTouches; } return event; } function normalizeClickEvent(evt, mouseEvt) { const { x, y } = mouseEvt; const { top } = getWindowOffset(); evt.detail = { x, y: y - top }; evt.touches = evt.changedTouches = [createTouchEvent(mouseEvt)]; } function createTouchEvent(evt) { return { force: 1, identifier: 0, clientX: evt.clientX, clientY: evt.clientY, pageX: evt.pageX, pageY: evt.pageY }; } function normalizeTouchEvent(touches, top) { const res = []; for (let i = 0; i < touches.length; i++) { const { identifier, pageX, pageY, clientX, clientY, force } = touches[i]; res.push({ identifier, pageX, pageY: pageY - top, clientX, clientY: clientY - top, force: force || 0 }); } return res; } const APP_SERVICE_ID = "__uniapp__service"; const UniViewJSBridge$1 = /* @__PURE__ */ extend(ViewJSBridge, { publishHandler }); let pageId; function publishHandler(event, args = {}) { if (!pageId) { pageId = plus.webview.currentWebview().id; } { console.log(`[${Date.now()}][View]: ` + pageId + " " + event + " " + JSON.stringify(args)); } plus.webview.postMessageToUniNView({ type: "subscribeHandler", args: { type: event, data: args, pageId } }, APP_SERVICE_ID); } const ACTION_TYPE_PAGE_CREATE = 1; const ACTION_TYPE_PAGE_CREATED = 2; const ACTION_TYPE_CREATE = 3; const ACTION_TYPE_INSERT = 4; const ACTION_TYPE_REMOVE = 5; const ACTION_TYPE_SET_ATTRIBUTE = 6; const ACTION_TYPE_REMOVE_ATTRIBUTE = 7; const ACTION_TYPE_SET_TEXT = 8; const ACTION_TYPE_EVENT = 20; class UniNode { constructor(id, tag) { this.id = id; this.tag = tag; } init(nodeJson) { if (hasOwn$1(nodeJson, "t")) { this.$.textContent = nodeJson.t || ""; } } setText(text) { this.$.textContent = text; } insert(parentNodeId, refNodeId, nodeJson) { this.init(nodeJson); const node = this.$; const parentNode = $(parentNodeId).$; if (refNodeId === -1) { parentNode.appendChild(node); } else { parentNode.insertBefore(node, $(refNodeId).$); } } remove() { const { $: $2 } = this; $2.parentNode.removeChild($2); } } class UniComment extends UniNode { constructor(id) { super(id, "#comment"); this.$ = document.createComment(""); } } class UniText extends UniNode { constructor(id) { super(id, "#text"); this.$ = document.createTextNode(""); } } var view = "uni-view {\n display: block;\n}\nuni-view[hidden] {\n display: none;\n}\n"; function patchClass(el, clazz) { el.className = clazz; } function patchStyle(el, value) { const style = el.style; if (isString(value)) { if (value === "") { el.removeAttribute("style"); } else { style.cssText = value; } } else { for (const key in value) { setStyle(style, key, value[key]); } } } const importantRE = /\s*!important$/; function setStyle(style, name, val) { if (isArray(val)) { val.forEach((v) => setStyle(style, name, v)); } else { if (name.startsWith("--")) { style.setProperty(name, val); } else { const prefixed = autoPrefix(style, name); if (importantRE.test(val)) { style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important"); } else { style[prefixed] = val; } } } } const prefixes = ["Webkit"]; const prefixCache = {}; function autoPrefix(style, rawName) { const cached = prefixCache[rawName]; if (cached) { return cached; } let name = camelize(rawName); if (name !== "filter" && name in style) { return prefixCache[rawName] = name; } name = capitalize(name); for (let i = 0; i < prefixes.length; i++) { const prefixed = prefixes[i] + name; if (prefixed in style) { return prefixCache[rawName] = prefixed; } } return rawName; } function patchEvent(el, name, flag) { const [type, options] = parseEventName(decodeAttr(name)); if (flag === -1) { const listener = el.__listeners[type]; if (listener) { el.removeEventListener(type, listener); } else { console.error(formatLog(`tag`, el.tagName, el.__id, "event[" + type + "] not found")); } } else { if (el.__listeners[type]) { { console.error(formatLog(`tag`, el.tagName, el.__id, "event[" + type + "] already registered")); } return; } el.__listeners[type] = createInvoker(el.__id, flag, options); el.addEventListener(type, el.__listeners[type], options); } } function createInvoker(id, flag, options) { const invoker = (evt) => { const event = $nne(evt); event.type = normalizeEventType(evt.type, options); UniViewJSBridge.publishHandler(VD_SYNC, [[ACTION_TYPE_EVENT, id, event]]); }; if (!flag) { return invoker; } return withModifiers(invoker, resolveModifier(flag)); } function resolveModifier(flag) { const modifiers = []; if (flag & EventModifierFlags.prevent) { modifiers.push("prevent"); } if (flag & EventModifierFlags.self) { modifiers.push("self"); } if (flag & EventModifierFlags.stop) { modifiers.push("stop"); } return modifiers; } class UniElement extends UniNode { constructor(id, element) { super(id, element.tagName); this.$ = element; this.$.__id = id; this.$.__listeners = Object.create(null); } init(nodeJson) { super.init(nodeJson); if (hasOwn$1(nodeJson, "a")) { this.setAttrs(nodeJson.a); } } setAttrs(attrs2) { Object.keys(attrs2).forEach((name) => { this.setAttr(name, attrs2[name]); }); } setAttr(name, value) { if (name === ".c") { patchClass(this.$, value); } else if (name === ".s") { patchStyle(this.$, value); } else if (name.indexOf(".e") === 0) { patchEvent(this.$, name, value); } else { this.$.setAttribute(decodeAttr(name), value); } } removeAttr(name) { if (name === ".c") { patchClass(this.$, ""); } else if (name === ".s") { patchStyle(this.$, ""); } else if (name.indexOf(".e") === 0) { patchEvent(this.$, name, -1); } else { this.$.removeAttribute(decodeAttr(name)); } } } function isHoverAttr(name) { return name.indexOf(".h") === 0; } class UniHoverElement extends UniElement { setAttr(name, value) { if (!isHoverAttr(name)) { return super.setAttr(name, value); } name = camelize(decodeAttr(name)); if (!this._hover) { this._hover = new Hover(this.$); } const { _hover } = this; _hover[name] = value; if (name !== "hoverClass") { return; } if (_hover.hoverClass && _hover.hoverClass !== "none") { _hover.addEvent(); } else { _hover.removeEvent(); } } removeAttr(name) { if (!isHoverAttr(name)) { return super.removeAttr(name); } } } class Hover { constructor($2) { this.hoverClass = "none"; this.hoverStopPropagation = false; this.hoverStartTime = 50; this.hoverStayTime = 400; this._listening = false; this._hovering = false; this._hoverTouch = false; this._hoverStartTimer = 0; this._hoverStayTimer = 0; this.$ = $2; this.__hoverTouchStart = this._hoverTouchStart.bind(this); this.__hoverTouchEnd = this._hoverTouchEnd.bind(this); this.__hoverTouchCancel = this._hoverTouchCancel.bind(this); } get hovering() { return this._hovering; } set hovering(hovering) { this._hovering = hovering; if (hovering) { this.$.classList.add(this.hoverClass); } else { this.$.classList.remove(this.hoverClass); } } addEvent() { if (this._listening) { return; } { console.log(formatLog(this.$.tagName, "Hover", "addEventListener", this.hoverClass)); } this._listening = true; this.$.addEventListener("touchstart", this.__hoverTouchStart); this.$.addEventListener("touchend", this.__hoverTouchEnd); this.$.addEventListener("touchcancel", this.__hoverTouchCancel); } removeEvent() { if (!this._listening) { return; } { console.log(formatLog(this.$.tagName, "Hover", "removeEventListener")); } this._listening = false; this.$.removeEventListener("touchstart", this.__hoverTouchStart); this.$.removeEventListener("touchend", this.__hoverTouchEnd); this.$.removeEventListener("touchcancel", this.__hoverTouchCancel); } _hoverTouchStart(evt) { if (evt._hoverPropagationStopped) { return; } if (!this.hoverClass || this.hoverClass === "none" || this.$.disabled) { return; } if (evt.touches.length > 1) { return; } if (this.hoverStopPropagation) { evt._hoverPropagationStopped = true; } this._hoverTouch = true; this._hoverStartTimer = setTimeout(() => { this.hovering = true; if (!this._hoverTouch) { this._hoverReset(); } }, this.hoverStartTime); } _hoverTouchEnd() { this._hoverTouch = false; if (this.hovering) { this._hoverReset(); } } _hoverReset() { requestAnimationFrame(() => { clearTimeout(this._hoverStayTimer); this._hoverStayTimer = setTimeout(() => { this.hovering = false; }, this.hoverStayTime); }); } _hoverTouchCancel() { this._hoverTouch = false; this.hovering = false; clearTimeout(this._hoverStartTimer); } } class UniViewElement extends UniHoverElement { constructor(id) { super(id, document.createElement("uni-view")); } } var button = "uni-button {\n position: relative;\n display: block;\n margin-left: auto;\n margin-right: auto;\n padding-left: 14px;\n padding-right: 14px;\n box-sizing: border-box;\n font-size: 18px;\n text-align: center;\n text-decoration: none;\n line-height: 2.55555556;\n border-radius: 5px;\n -webkit-tap-highlight-color: transparent;\n overflow: hidden;\n color: #000000;\n background-color: #f8f8f8;\n cursor: pointer;\n}\n\nuni-button[hidden] {\n display: none !important;\n}\n\nuni-button:after {\n content: ' ';\n width: 200%;\n height: 200%;\n position: absolute;\n top: 0;\n left: 0;\n border: 1px solid rgba(0, 0, 0, 0.2);\n transform: scale(0.5);\n transform-origin: 0 0;\n box-sizing: border-box;\n border-radius: 10px;\n}\n\nuni-button[native] {\n padding-left: 0;\n padding-right: 0;\n}\n\nuni-button[native] .uni-button-cover-view-wrapper {\n border: inherit;\n border-color: inherit;\n border-radius: inherit;\n background-color: inherit;\n}\n\nuni-button[native] .uni-button-cover-view-inner {\n padding-left: 14px;\n padding-right: 14px;\n}\n\nuni-button uni-cover-view {\n line-height: inherit;\n white-space: inherit;\n}\n\nuni-button[type='default'] {\n color: #000000;\n background-color: #f8f8f8;\n}\n\nuni-button[type='primary'] {\n color: #ffffff;\n background-color: #007aff;\n}\n\nuni-button[type='warn'] {\n color: #ffffff;\n background-color: #e64340;\n}\n\nuni-button[disabled] {\n color: rgba(255, 255, 255, 0.6);\n cursor: not-allowed;\n}\n\nuni-button[disabled][type='default'],\nuni-button[disabled]:not([type]) {\n color: rgba(0, 0, 0, 0.3);\n background-color: #f7f7f7;\n}\n\nuni-button[disabled][type='primary'] {\n background-color: rgba(0, 122, 255, 0.6);\n}\n\nuni-button[disabled][type='warn'] {\n background-color: #ec8b89;\n}\n\nuni-button[type='primary'][plain] {\n color: #007aff;\n border: 1px solid #007aff;\n background-color: transparent;\n}\n\nuni-button[type='primary'][plain][disabled] {\n color: rgba(0, 0, 0, 0.2);\n border-color: rgba(0, 0, 0, 0.2);\n}\n\nuni-button[type='primary'][plain]:after {\n border-width: 0;\n}\n\nuni-button[type='default'][plain] {\n color: #353535;\n border: 1px solid #353535;\n background-color: transparent;\n}\n\nuni-button[type='default'][plain][disabled] {\n color: rgba(0, 0, 0, 0.2);\n border-color: rgba(0, 0, 0, 0.2);\n}\n\nuni-button[type='default'][plain]:after {\n border-width: 0;\n}\n\nuni-button[plain] {\n color: #353535;\n border: 1px solid #353535;\n background-color: transparent;\n}\n\nuni-button[plain][disabled] {\n color: rgba(0, 0, 0, 0.2);\n border-color: rgba(0, 0, 0, 0.2);\n}\n\nuni-button[plain]:after {\n border-width: 0;\n}\n\nuni-button[plain][native] .uni-button-cover-view-inner {\n padding: 0;\n}\n\nuni-button[type='warn'][plain] {\n color: #e64340;\n border: 1px solid #e64340;\n background-color: transparent;\n}\n\nuni-button[type='warn'][plain][disabled] {\n color: rgba(0, 0, 0, 0.2);\n border-color: rgba(0, 0, 0, 0.2);\n}\n\nuni-button[type='warn'][plain]:after {\n border-width: 0;\n}\n\nuni-button[size='mini'] {\n display: inline-block;\n line-height: 2.3;\n font-size: 13px;\n padding: 0 1.34em;\n}\n\nuni-button[size='mini'][native] {\n padding: 0;\n}\n\nuni-button[size='mini'][native] .uni-button-cover-view-inner {\n padding: 0 1.34em;\n}\n\nuni-button[loading]:not([disabled]) {\n cursor: progress;\n}\n\nuni-button[loading]:before {\n content: ' ';\n display: inline-block;\n width: 18px;\n height: 18px;\n vertical-align: middle;\n animation: uni-loading 1s steps(12, end) infinite;\n background-size: 100%;\n}\n\nuni-button[loading][type='primary'] {\n color: rgba(255, 255, 255, 0.6);\n background-color: #0062cc;\n}\n\nuni-button[loading][type='primary'][plain] {\n color: #007aff;\n background-color: transparent;\n}\n\nuni-button[loading][type='default'] {\n color: rgba(0, 0, 0, 0.6);\n background-color: #dedede;\n}\n\nuni-button[loading][type='default'][plain] {\n color: #353535;\n background-color: transparent;\n}\n\nuni-button[loading][type='warn'] {\n color: rgba(255, 255, 255, 0.6);\n background-color: #ce3c39;\n}\n\nuni-button[loading][type='warn'][plain] {\n color: #e64340;\n background-color: transparent;\n}\n\nuni-button[loading][native]:before {\n content: none;\n}\n\n.button-hover {\n color: rgba(0, 0, 0, 0.6);\n background-color: #dedede;\n}\n\n.button-hover[plain] {\n color: rgba(53, 53, 53, 0.6);\n border-color: rgba(53, 53, 53, 0.6);\n background-color: transparent;\n}\n\n.button-hover[type='primary'] {\n color: rgba(255, 255, 255, 0.6);\n background-color: #0062cc;\n}\n\n.button-hover[type='primary'][plain] {\n color: rgba(26, 173, 25, 0.6);\n border-color: rgba(26, 173, 25, 0.6);\n background-color: transparent;\n}\n\n.button-hover[type='default'] {\n color: rgba(0, 0, 0, 0.6);\n background-color: #dedede;\n}\n\n.button-hover[type='default'][plain] {\n color: rgba(53, 53, 53, 0.6);\n border-color: rgba(53, 53, 53, 0.6);\n background-color: transparent;\n}\n\n.button-hover[type='warn'] {\n color: rgba(255, 255, 255, 0.6);\n background-color: #ce3c39;\n}\n\n.button-hover[type='warn'][plain] {\n color: rgba(230, 67, 64, 0.6);\n border-color: rgba(230, 67, 64, 0.6);\n background-color: transparent;\n}\n"; function converPx(value) { if (/^-?\d+[ur]px$/i.test(value)) { return value.replace(/(^-?\d+)[ur]px$/i, (text, num) => { return `${uni.upx2px(parseFloat(num))}px`; }); } else if (/^-?[\d\.]+$/.test(value)) { return `${value}px`; } return value || ""; } function converType(type) { return type.replace(/[A-Z]/g, (text) => { return `-${text.toLowerCase()}`; }).replace("webkit", "-webkit"); } function getStyle(action) { const animateTypes1 = [ "matrix", "matrix3d", "scale", "scale3d", "rotate3d", "skew", "translate", "translate3d" ]; const animateTypes2 = [ "scaleX", "scaleY", "scaleZ", "rotate", "rotateX", "rotateY", "rotateZ", "skewX", "skewY", "translateX", "translateY", "translateZ" ]; const animateTypes3 = ["opacity", "background-color"]; const animateTypes4 = ["width", "height", "left", "right", "top", "bottom"]; const animates = action.animates; const option = action.option; const transition = option.transition; const style = {}; const transform = []; animates.forEach((animate) => { let type = animate.type; let args = [...animate.args]; if (animateTypes1.concat(animateTypes2).includes(type)) { if (type.startsWith("rotate") || type.startsWith("skew")) { args = args.map((value) => parseFloat(value) + "deg"); } else if (type.startsWith("translate")) { args = args.map(converPx); } if (animateTypes2.indexOf(type) >= 0) { args.length = 1; } transform.push(`${type}(${args.join(",")})`); } else if (animateTypes3.concat(animateTypes4).includes(args[0])) { type = args[0]; const value = args[1]; style[type] = animateTypes4.includes(type) ? converPx(value) : value; } }); style.transform = style.webkitTransform = transform.join(" "); style.transition = style.webkitTransition = Object.keys(style).map((type) => `${converType(type)} ${transition.duration}ms ${transition.timingFunction} ${transition.delay}ms`).join(","); style.transformOrigin = style.webkitTransformOrigin = option.transformOrigin; return style; } function startAnimation(context) { const animation2 = context.animation; if (!animation2 || !animation2.actions || !animation2.actions.length) { return; } let index = 0; const actions = animation2.actions; const length = animation2.actions.length; function animate() { const action = actions[index]; const transition = action.option.transition; const style = getStyle(action); Object.keys(style).forEach((key) => { context.$el.style[key] = style[key]; }); index += 1; if (index < length) { setTimeout(animate, transition.duration + transition.delay); } } setTimeout(() => { animate(); }, 0); } var animation = { props: ["animation"], watch: { animation: { deep: true, handler() { startAnimation(this); } } }, mounted() { startAnimation(this); } }; const defineBuiltInComponent = (options) => { const { props, mixins } = options; if (!props || !props.animation) { (mixins || (options.mixins = [])).push(animation); } return defineSystemComponent(options); }; const defineSystemComponent = (options) => { options.compatConfig = { MODE: 3 }; return defineComponent(options); }; const hoverProps = { hoverClass: { type: String, default: "none" }, hoverStopPropagation: { type: Boolean, default: false }, hoverStartTime: { type: [Number, String], default: 50 }, hoverStayTime: { type: [Number, String], default: 400 } }; function useHover(props) { const hovering = ref(false); let hoverTouch = false; let hoverStartTimer; let hoverStayTimer; function hoverReset() { requestAnimationFrame(() => { clearTimeout(hoverStayTimer); hoverStayTimer = setTimeout(() => { hovering.value = false; }, parseInt(props.hoverStayTime)); }); } function onTouchstartPassive(evt) { if (evt._hoverPropagationStopped) { return; } if (!props.hoverClass || props.hoverClass === "none" || props.disabled) { return; } if (evt.touches.length > 1) { return; } if (props.hoverStopPropagation) { evt._hoverPropagationStopped = true; } hoverTouch = true; hoverStartTimer = setTimeout(() => { hovering.value = true; if (!hoverTouch) { hoverReset(); } }, parseInt(props.hoverStartTime)); } function onTouchend() { hoverTouch = false; if (hovering.value) { hoverReset(); } } function onTouchcancel() { hoverTouch = false; hovering.value = false; clearTimeout(hoverStartTimer); } return { hovering, binding: { onTouchstartPassive, onTouchend, onTouchcancel } }; } function useBooleanAttr(props, keys) { if (isString(keys)) { keys = [keys]; } return keys.reduce((res, key) => { if (props[key]) { res[key] = true; } return res; }, Object.create(null)); } function withWebEvent(fn) { return fn.__wwe = true, fn; } const uniFormKey = PolySymbol("uniForm"); const uniLabelKey = PolySymbol("uniLabel"); function useListeners(props, listeners) { _addListeners(props.id, listeners); watch(() => props.id, (newId, oldId) => { _removeListeners(oldId, listeners, true); _addListeners(newId, listeners, true); }); onUnmounted(() => { _removeListeners(props.id, listeners); }); } function _addListeners(id, listeners, watch2) { const pageId2 = useCurrentPageId(); if (watch2 && !id) { return; } if (!isPlainObject(listeners)) { return; } Object.keys(listeners).forEach((name) => { if (watch2) { if (name.indexOf("@") !== 0 && name.indexOf("uni-") !== 0) { UniViewJSBridge.on(`uni-${name}-${pageId2}-${id}`, listeners[name]); } } else { if (name.indexOf("uni-") === 0) { UniViewJSBridge.on(name, listeners[name]); } else if (id) { UniViewJSBridge.on(`uni-${name}-${pageId2}-${id}`, listeners[name]); } } }); } function _removeListeners(id, listeners, watch2) { const pageId2 = useCurrentPageId(); if (watch2 && !id) { return; } if (!isPlainObject(listeners)) { return; } Object.keys(listeners).forEach((name) => { if (watch2) { if (name.indexOf("@") !== 0 && name.indexOf("uni-") !== 0) { UniViewJSBridge.off(`uni-${name}-${pageId2}-${id}`, listeners[name]); } } else { if (name.indexOf("uni-") === 0) { UniViewJSBridge.off(name, listeners[name]); } else if (id) { UniViewJSBridge.off(`uni-${name}-${pageId2}-${id}`, listeners[name]); } } }); } var Button = /* @__PURE__ */ defineBuiltInComponent({ name: "Button", props: { id: { type: String, default: "" }, hoverClass: { type: String, default: "button-hover" }, hoverStartTime: { type: [Number, String], default: 20 }, hoverStayTime: { type: [Number, String], default: 70 }, hoverStopPropagation: { type: Boolean, default: false }, disabled: { type: [Boolean, String], default: false }, formType: { type: String, default: "" }, openType: { type: String, default: "" }, loading: { type: [Boolean, String], default: false } }, setup(props, { slots }) { const rootRef = ref(null); { initI18nButtonMsgsOnce(); } const uniForm = inject(uniFormKey, false); const { hovering, binding } = useHover(props); const { t } = useI18n(); const onClick = withWebEvent((e, isLabelClick) => { if (props.disabled) { return e.stopImmediatePropagation(); } if (isLabelClick) { rootRef.value.click(); } const formType = props.formType; if (formType) { if (!uniForm) { return; } if (formType === "submit") { uniForm.submit(); } else if (formType === "reset") { uniForm.reset(); } return; } if (props.openType === "feedback") { openFeedback(t("uni.button.feedback.title"), t("uni.button.feedback.send")); } }); const uniLabel = inject(uniLabelKey, false); if (uniLabel) { uniLabel.addHandler(onClick); onBeforeUnmount(() => { uniLabel.removeHandler(onClick); }); } useListeners(props, { "label-click": onClick }); return () => { const hoverClass = props.hoverClass; const booleanAttrs = useBooleanAttr(props, "disabled"); const loadingAttrs = useBooleanAttr(props, "loading"); const hasHoverClass = hoverClass && hoverClass !== "none"; return createVNode("uni-button", mergeProps({ "ref": rootRef, "onClick": onClick, "class": hasHoverClass && hovering.value ? hoverClass : "" }, hasHoverClass && binding, booleanAttrs, loadingAttrs), { default: () => [slots.default && slots.default()] }, 16, ["onClick", "class"]); }; } }); function openFeedback(titleText, sendText) { const feedback = plus.webview.create("https://service.dcloud.net.cn/uniapp/feedback.html", "feedback", { titleNView: { titleText, autoBackButton: true, backgroundColor: "#F7F7F7", titleColor: "#007aff", buttons: [{ text: sendText, color: "#007aff", fontSize: "16px", fontWeight: "bold", onclick: function() { feedback.evalJS('typeof mui !== "undefined" && mui.trigger(document.getElementById("submit"),"tap")'); } }] } }); feedback.show("slide-in-right"); } { plusReady(() => { plus.os.name === "Android"; plus.os.version || ""; }); document.addEventListener("keyboardchange", function(event) { }, false); } const INFO_COLOR = "#10aeff"; const WARN_COLOR = "#f76260"; const GREY_COLOR = "#b2b2b2"; const CANCEL_COLOR = "#f43530"; ({ success: { d: ICON_PATH_SUCCESS, c: PRIMARY_COLOR }, success_no_circle: { d: ICON_PATH_SUCCESS_NO_CIRCLE, c: PRIMARY_COLOR }, info: { d: ICON_PATH_INFO, c: INFO_COLOR }, warn: { d: ICON_PATH_WARN, c: WARN_COLOR }, waiting: { d: ICON_PATH_WAITING, c: INFO_COLOR }, cancel: { d: ICON_PATH_CANCEL, c: CANCEL_COLOR }, download: { d: ICON_PATH_DOWNLOAD, c: PRIMARY_COLOR }, search: { d: ICON_PATH_SEARCH, c: GREY_COLOR }, clear: { d: ICON_PATH_CLEAR, c: GREY_COLOR } }); ({ activeColor: PRIMARY_COLOR, backgroundColor: "#EBEBEB", activeMode: "backwards" }); /* @__PURE__ */ defineBuiltInComponent({ name: "View", props: extend({}, hoverProps), setup(props, { slots }) { const { hovering, binding } = useHover(props); return () => { const hoverClass = props.hoverClass; if (hoverClass && hoverClass !== "none") { return createVNode("uni-view", mergeProps({ "class": hovering.value ? hoverClass : "" }, binding), { default: () => [slots.default && slots.default()] }, 16, ["class"]); } return createVNode("uni-view", null, { default: () => [slots.default && slots.default()] }); }; } }); const UniButton = createWrapper(Button); class UniButtonElement extends UniNode { constructor(id) { super(id, "uni-button"); } init(nodeJson) { const container = document.createElement("div"); this.$props = reactive({}); const { a } = nodeJson; if (a) { Object.keys(a).forEach((n) => { this.setAttr(n, a[n]); }); } const vm = createApp(UniButton, { attrs: this.$props }).mount(container); this.$ = container.firstElementChild; if (hasOwn$1(nodeJson, "t")) { this.$.textContent = nodeJson.t || ""; } watch(this.$props, () => { { console.log(formatLog(this.tag, "props", "forceUpdate")); } vm.$forceUpdate(); }); } setAttr(name, value) { const decoded = decodeAttr(name); if (name.indexOf(".e") === 0) { this.$props[decoded] = createInvoker(this.id, value, parseEventName(decoded)[1]); } else { this.$props[decoded] = value; } } removeAttr(name) { this.$props[decodeAttr(name)] = null; } } const BuiltInComponents = [ , UniViewElement, , , UniText, UniComment, , , UniButtonElement ]; function createBuiltInComponent(type, id) { return new BuiltInComponents[type](id); } function createWrapper(component) { return defineComponent({ props: ["attrs"], data() { return { props: this.attrs }; }, render() { return h(component, this.props); } }); } const elements = new Map(); function $(id) { return elements.get(id); } function createElement(id, tag) { let element; if (isString(tag)) { element = new UniElement(id, document.createElement(tag)); } else { element = createBuiltInComponent(tag, id); } elements.set(id, element); return element; } function onPageCreated() { } function onPageCreate({ css, route, disableScroll, onPageScroll, onPageReachBottom, onReachBottomDistance, statusbarHeight, windowTop, windowBottom }) { initPageElement(); if (css) { initPageCss(route); } const pageId2 = plus.webview.currentWebview().id; window.__id__ = pageId2; document.title = `${route}[${pageId2}]`; initCssVar(statusbarHeight, windowTop, windowBottom); if (disableScroll) { document.addEventListener("touchmove", disableScrollListener); } else if (onPageScroll || onPageReachBottom) { initPageScroll(onPageScroll, onPageReachBottom, onReachBottomDistance); } } function initPageElement() { createElement(0, "div").$ = document.getElementById("app"); } function initPageCss(route) { const element = document.createElement("link"); element.type = "text/css"; element.rel = "stylesheet"; element.href = route + ".css"; document.head.appendChild(element); } function initCssVar(statusbarHeight, windowTop, windowBottom) { const cssVars = { "--window-left": "0px", "--window-right": "0px", "--window-top": windowTop + "px", "--window-bottom": windowBottom + "px", "--status-bar-height": statusbarHeight + "px" }; { console.log(formatLog("initCssVar", cssVars)); } updateCssVar(cssVars); } function initPageScroll(onPageScroll, onPageReachBottom, onReachBottomDistance) { const opts = {}; if (onPageScroll) { opts.onPageScroll = (scrollTop) => { UniViewJSBridge.publishHandler("onPageScroll", { scrollTop }); }; } if (onPageReachBottom) { opts.onReachBottomDistance = onReachBottomDistance; opts.onReachBottom = () => UniViewJSBridge.publishHandler("onReachBottom"); } requestAnimationFrame(() => document.addEventListener("scroll", createScrollListener(opts))); } function onVdSync(actions) { actions.forEach((action) => { switch (action[0]) { case ACTION_TYPE_PAGE_CREATE: return onPageCreate(action[1]); case ACTION_TYPE_PAGE_CREATED: return onPageCreated(); case ACTION_TYPE_CREATE: return createElement(action[1], action[2]); case ACTION_TYPE_INSERT: return $(action[1]).insert(action[2], action[3], action[4]); case ACTION_TYPE_REMOVE: return $(action[1]).remove(); case ACTION_TYPE_SET_ATTRIBUTE: return $(action[1]).setAttr(action[2], action[3]); case ACTION_TYPE_REMOVE_ATTRIBUTE: return $(action[1]).removeAttr(action[2]); case ACTION_TYPE_SET_TEXT: return $(action[1]).setText(action[2]); } }); } function initSubscribeHandlers() { const { subscribe } = UniViewJSBridge; subscribe(VD_SYNC, onVdSync); } function preventDoubleTap() { if (String(navigator.vendor).indexOf("Apple") === 0) { let firstEvent = null; let timeout; document.documentElement.addEventListener("click", (event) => { const TIME_MAX = 450; const PAGE_MAX = 44; clearTimeout(timeout); if (firstEvent && Math.abs(event.pageX - firstEvent.pageX) <= PAGE_MAX && Math.abs(event.pageY - firstEvent.pageY) <= PAGE_MAX && event.timeStamp - firstEvent.timeStamp <= TIME_MAX) { event.preventDefault(); } firstEvent = event; timeout = setTimeout(() => { firstEvent = null; }, TIME_MAX); }); } } function initView() { initSubscribeHandlers(); preventDoubleTap(); } window.UniViewJSBridge = UniViewJSBridge$1; function onWebviewReady() { initView(); UniViewJSBridge$1.publishHandler(ON_WEBVIEW_READY); } if (typeof plus !== "undefined") { onWebviewReady(); } else { document.addEventListener("plusready", onWebviewReady); } });