diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..74e0df2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +##ignore this file## +/unpackage/ \ No newline at end of file diff --git a/common/js/api/manifest/cabinQuery.js b/common/js/api/manifest/cabinQuery.js index 3db997d..71c571d 100644 --- a/common/js/api/manifest/cabinQuery.js +++ b/common/js/api/manifest/cabinQuery.js @@ -2,17 +2,17 @@ import http from '@/common/js/request/request.js' // 运价综合查询 export const realQuery = (data) => { - return http.post('/yunjia_demo/v1/real/query', data, 'json') + return http.post('/test_yunjia/v1/real/query', data, 'json') } // 港口模糊查询 export const realGk = (data) => { - return http.post('/yunjia_demo/v1/real/gk', data, 'json') + return http.post('/test_yunjia/v1/real/gk', data, 'json') } // 箱型模糊查询 export const realBox = (data) => { - return http.post('/yunjia_demo/v1/real/box', data, 'json') + return http.post('/test_yunjia/v1/real/box', data, 'json') } diff --git a/pages/manifest/cabinQuery/components/history.vue b/pages/manifest/cabinQuery/components/history.vue index af9d73a..79bcd2c 100644 --- a/pages/manifest/cabinQuery/components/history.vue +++ b/pages/manifest/cabinQuery/components/history.vue @@ -28,29 +28,29 @@ ETD - 06-27 + {{ship.departure_date}} ETA - 06-28 + {{ship.arrival_date}} - 船名: CSCL GLOBE CSCL GLOBE + 船名:{{ ship.vessel }} - 航次: 0FAC9W1MA - 航程: 46 + 航次: {{ ship.voyage }} + 航程: {{ ship.transit_time }} O/F: - 10400 USD + {{ship.ocean_freight}} {{ship.ocean_currency}} ALL IN: - 10400 USD + {{ship.total_freight}} {{ship.total_currency}} @@ -151,6 +151,9 @@ box_num: 1, start_time: this.fromData.startTime, end_time: this.fromData.endTime, + // from_mode:'CY', + // to_mode:'CY', + // product_name: '', } Object.keys(this.webCode).map((item,index)=>{ let _data = data; @@ -162,6 +165,7 @@ realQuery(data, type){ realQuery(data).then(res =>{ console.log(res) + this.webCode[type].list = res.data; this.webCode[type].status = 'over'; }).catch(err =>{ this.webCode[type].status = 'noData'; diff --git a/pages/manifest/cabinQuery/components/query.vue b/pages/manifest/cabinQuery/components/query.vue index a3fab0e..e666c63 100644 --- a/pages/manifest/cabinQuery/components/query.vue +++ b/pages/manifest/cabinQuery/components/query.vue @@ -54,50 +54,56 @@ 历史记录 - - - 出发地 - {{fromData.portDeparture}} - - - - 目的地 - {{fromData.portArrival}} + + + + 出发地 + {{fromData.portDeparture}} + + + + 目的地 + {{fromData.portArrival}} + + + + + + + - - - - - - - 出发地 - {{fromData.portDeparture}} - - - - 目的地 - {{fromData.portArrival}} + + + 出发地 + {{fromData.portDeparture}} + + + + 目的地 + {{fromData.portArrival}} + + + + - - - - - - - 出发地 - {{fromData.portDeparture}} - - - - 目的地 - {{fromData.portArrival}} + + + 出发地 + {{fromData.portDeparture}} + + + + 目的地 + {{fromData.portArrival}} + + + + - - - + > 16 & 255)\r\n : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255)\r\n : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);\r\n }\r\n return result\r\n };\r\n} else {\r\n // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法\r\n realAtob = atob;\r\n}\r\n\r\nfunction b64DecodeUnicode (str) {\r\n return decodeURIComponent(realAtob(str).split('').map(function (c) {\r\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\r\n }).join(''))\r\n}\r\n\r\nfunction getCurrentUserInfo () {\r\n const token = ( wx).getStorageSync('uni_id_token') || '';\r\n const tokenArr = token.split('.');\r\n if (!token || tokenArr.length !== 3) {\r\n return {\r\n uid: null,\r\n role: [],\r\n permission: [],\r\n tokenExpired: 0\r\n }\r\n }\r\n let userInfo;\r\n try {\r\n userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));\r\n } catch (error) {\r\n throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message)\r\n }\r\n userInfo.tokenExpired = userInfo.exp * 1000;\r\n delete userInfo.exp;\r\n delete userInfo.iat;\r\n return userInfo\r\n}\r\n\r\nfunction uniIdMixin (Vue) {\r\n Vue.prototype.uniIDHasRole = function (roleId) {\r\n const {\r\n role\r\n } = getCurrentUserInfo();\r\n return role.indexOf(roleId) > -1\r\n };\r\n Vue.prototype.uniIDHasPermission = function (permissionId) {\r\n const {\r\n permission\r\n } = getCurrentUserInfo();\r\n return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1\r\n };\r\n Vue.prototype.uniIDTokenValid = function () {\r\n const {\r\n tokenExpired\r\n } = getCurrentUserInfo();\r\n return tokenExpired > Date.now()\r\n };\r\n}\r\n\r\nconst _toString = Object.prototype.toString;\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\n\r\nfunction isFn (fn) {\r\n return typeof fn === 'function'\r\n}\r\n\r\nfunction isStr (str) {\r\n return typeof str === 'string'\r\n}\r\n\r\nfunction isPlainObject (obj) {\r\n return _toString.call(obj) === '[object Object]'\r\n}\r\n\r\nfunction hasOwn (obj, key) {\r\n return hasOwnProperty.call(obj, key)\r\n}\r\n\r\nfunction noop () { }\r\n\r\n/**\r\n * Create a cached version of a pure function.\r\n */\r\nfunction cached (fn) {\r\n const cache = Object.create(null);\r\n return function cachedFn (str) {\r\n const hit = cache[str];\r\n return hit || (cache[str] = fn(str))\r\n }\r\n}\r\n\r\n/**\r\n * Camelize a hyphen-delimited string.\r\n */\r\nconst camelizeRE = /-(\\w)/g;\r\nconst camelize = cached((str) => {\r\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : '')\r\n});\r\n\r\nfunction sortObject (obj) {\r\n const sortObj = {};\r\n if (isPlainObject(obj)) {\r\n Object.keys(obj).sort().forEach(key => {\r\n sortObj[key] = obj[key];\r\n });\r\n }\r\n return !Object.keys(sortObj) ? obj : sortObj\r\n}\r\n\r\nconst HOOKS = [\r\n 'invoke',\r\n 'success',\r\n 'fail',\r\n 'complete',\r\n 'returnValue'\r\n];\r\n\r\nconst globalInterceptors = {};\r\nconst scopedInterceptors = {};\r\n\r\nfunction mergeHook (parentVal, childVal) {\r\n const res = childVal\r\n ? parentVal\r\n ? parentVal.concat(childVal)\r\n : Array.isArray(childVal)\r\n ? childVal : [childVal]\r\n : parentVal;\r\n return res\r\n ? dedupeHooks(res)\r\n : res\r\n}\r\n\r\nfunction dedupeHooks (hooks) {\r\n const res = [];\r\n for (let i = 0; i < hooks.length; i++) {\r\n if (res.indexOf(hooks[i]) === -1) {\r\n res.push(hooks[i]);\r\n }\r\n }\r\n return res\r\n}\r\n\r\nfunction removeHook (hooks, hook) {\r\n const index = hooks.indexOf(hook);\r\n if (index !== -1) {\r\n hooks.splice(index, 1);\r\n }\r\n}\r\n\r\nfunction mergeInterceptorHook (interceptor, option) {\r\n Object.keys(option).forEach(hook => {\r\n if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {\r\n interceptor[hook] = mergeHook(interceptor[hook], option[hook]);\r\n }\r\n });\r\n}\r\n\r\nfunction removeInterceptorHook (interceptor, option) {\r\n if (!interceptor || !option) {\r\n return\r\n }\r\n Object.keys(option).forEach(hook => {\r\n if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {\r\n removeHook(interceptor[hook], option[hook]);\r\n }\r\n });\r\n}\r\n\r\nfunction addInterceptor (method, option) {\r\n if (typeof method === 'string' && isPlainObject(option)) {\r\n mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);\r\n } else if (isPlainObject(method)) {\r\n mergeInterceptorHook(globalInterceptors, method);\r\n }\r\n}\r\n\r\nfunction removeInterceptor (method, option) {\r\n if (typeof method === 'string') {\r\n if (isPlainObject(option)) {\r\n removeInterceptorHook(scopedInterceptors[method], option);\r\n } else {\r\n delete scopedInterceptors[method];\r\n }\r\n } else if (isPlainObject(method)) {\r\n removeInterceptorHook(globalInterceptors, method);\r\n }\r\n}\r\n\r\nfunction wrapperHook (hook) {\r\n return function (data) {\r\n return hook(data) || data\r\n }\r\n}\r\n\r\nfunction isPromise (obj) {\r\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'\r\n}\r\n\r\nfunction queue (hooks, data) {\r\n let promise = false;\r\n for (let i = 0; i < hooks.length; i++) {\r\n const hook = hooks[i];\r\n if (promise) {\r\n promise = Promise.resolve(wrapperHook(hook));\r\n } else {\r\n const res = hook(data);\r\n if (isPromise(res)) {\r\n promise = Promise.resolve(res);\r\n }\r\n if (res === false) {\r\n return {\r\n then () { }\r\n }\r\n }\r\n }\r\n }\r\n return promise || {\r\n then (callback) {\r\n return callback(data)\r\n }\r\n }\r\n}\r\n\r\nfunction wrapperOptions (interceptor, options = {}) {\r\n ['success', 'fail', 'complete'].forEach(name => {\r\n if (Array.isArray(interceptor[name])) {\r\n const oldCallback = options[name];\r\n options[name] = function callbackInterceptor (res) {\r\n queue(interceptor[name], res).then((res) => {\r\n /* eslint-disable no-mixed-operators */\r\n return isFn(oldCallback) && oldCallback(res) || res\r\n });\r\n };\r\n }\r\n });\r\n return options\r\n}\r\n\r\nfunction wrapperReturnValue (method, returnValue) {\r\n const returnValueHooks = [];\r\n if (Array.isArray(globalInterceptors.returnValue)) {\r\n returnValueHooks.push(...globalInterceptors.returnValue);\r\n }\r\n const interceptor = scopedInterceptors[method];\r\n if (interceptor && Array.isArray(interceptor.returnValue)) {\r\n returnValueHooks.push(...interceptor.returnValue);\r\n }\r\n returnValueHooks.forEach(hook => {\r\n returnValue = hook(returnValue) || returnValue;\r\n });\r\n return returnValue\r\n}\r\n\r\nfunction getApiInterceptorHooks (method) {\r\n const interceptor = Object.create(null);\r\n Object.keys(globalInterceptors).forEach(hook => {\r\n if (hook !== 'returnValue') {\r\n interceptor[hook] = globalInterceptors[hook].slice();\r\n }\r\n });\r\n const scopedInterceptor = scopedInterceptors[method];\r\n if (scopedInterceptor) {\r\n Object.keys(scopedInterceptor).forEach(hook => {\r\n if (hook !== 'returnValue') {\r\n interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);\r\n }\r\n });\r\n }\r\n return interceptor\r\n}\r\n\r\nfunction invokeApi (method, api, options, ...params) {\r\n const interceptor = getApiInterceptorHooks(method);\r\n if (interceptor && Object.keys(interceptor).length) {\r\n if (Array.isArray(interceptor.invoke)) {\r\n const res = queue(interceptor.invoke, options);\r\n return res.then((options) => {\r\n return api(wrapperOptions(interceptor, options), ...params)\r\n })\r\n } else {\r\n return api(wrapperOptions(interceptor, options), ...params)\r\n }\r\n }\r\n return api(options, ...params)\r\n}\r\n\r\nconst promiseInterceptor = {\r\n returnValue (res) {\r\n if (!isPromise(res)) {\r\n return res\r\n }\r\n return new Promise((resolve, reject) => {\r\n res.then(res => {\r\n if (res[0]) {\r\n reject(res[0]);\r\n } else {\r\n resolve(res[1]);\r\n }\r\n });\r\n })\r\n }\r\n};\r\n\r\nconst SYNC_API_RE =\r\n /^\\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo/;\r\n\r\nconst CONTEXT_API_RE = /^create|Manager$/;\r\n\r\n// Context例外情况\r\nconst CONTEXT_API_RE_EXC = ['createBLEConnection'];\r\n\r\n// 同步例外情况\r\nconst ASYNC_API = ['createBLEConnection'];\r\n\r\nconst CALLBACK_API_RE = /^on|^off/;\r\n\r\nfunction isContextApi (name) {\r\n return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1\r\n}\r\nfunction isSyncApi (name) {\r\n return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1\r\n}\r\n\r\nfunction isCallbackApi (name) {\r\n return CALLBACK_API_RE.test(name) && name !== 'onPush'\r\n}\r\n\r\nfunction handlePromise (promise) {\r\n return promise.then(data => {\r\n return [null, data]\r\n })\r\n .catch(err => [err])\r\n}\r\n\r\nfunction shouldPromise (name) {\r\n if (\r\n isContextApi(name) ||\r\n isSyncApi(name) ||\r\n isCallbackApi(name)\r\n ) {\r\n return false\r\n }\r\n return true\r\n}\r\n\r\n/* eslint-disable no-extend-native */\r\nif (!Promise.prototype.finally) {\r\n Promise.prototype.finally = function (callback) {\r\n const promise = this.constructor;\r\n return this.then(\r\n value => promise.resolve(callback()).then(() => value),\r\n reason => promise.resolve(callback()).then(() => {\r\n throw reason\r\n })\r\n )\r\n };\r\n}\r\n\r\nfunction promisify (name, api) {\r\n if (!shouldPromise(name)) {\r\n return api\r\n }\r\n return function promiseApi (options = {}, ...params) {\r\n if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {\r\n return wrapperReturnValue(name, invokeApi(name, api, options, ...params))\r\n }\r\n return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {\r\n invokeApi(name, api, Object.assign({}, options, {\r\n success: resolve,\r\n fail: reject\r\n }), ...params);\r\n })))\r\n }\r\n}\r\n\r\nconst EPS = 1e-4;\r\nconst BASE_DEVICE_WIDTH = 750;\r\nlet isIOS = false;\r\nlet deviceWidth = 0;\r\nlet deviceDPR = 0;\r\n\r\nfunction checkDeviceWidth () {\r\n const {\r\n platform,\r\n pixelRatio,\r\n windowWidth\r\n } = wx.getSystemInfoSync(); // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni\r\n\r\n deviceWidth = windowWidth;\r\n deviceDPR = pixelRatio;\r\n isIOS = platform === 'ios';\r\n}\r\n\r\nfunction upx2px (number, newDeviceWidth) {\r\n if (deviceWidth === 0) {\r\n checkDeviceWidth();\r\n }\r\n\r\n number = Number(number);\r\n if (number === 0) {\r\n return 0\r\n }\r\n let result = (number / BASE_DEVICE_WIDTH) * (newDeviceWidth || deviceWidth);\r\n if (result < 0) {\r\n result = -result;\r\n }\r\n result = Math.floor(result + EPS);\r\n if (result === 0) {\r\n if (deviceDPR === 1 || !isIOS) {\r\n result = 1;\r\n } else {\r\n result = 0.5;\r\n }\r\n }\r\n return number < 0 ? -result : result\r\n}\r\n\r\nconst LOCALE_ZH_HANS = 'zh-Hans';\r\nconst LOCALE_ZH_HANT = 'zh-Hant';\r\nconst LOCALE_EN = 'en';\r\nconst LOCALE_FR = 'fr';\r\nconst LOCALE_ES = 'es';\r\n\r\nconst messages = {};\r\n\r\nlet locale;\r\n\r\n{\r\n locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;\r\n}\r\n\r\nfunction initI18nMessages () {\r\n if (!isEnableLocale()) {\r\n return\r\n }\r\n const localeKeys = Object.keys(__uniConfig.locales);\r\n if (localeKeys.length) {\r\n localeKeys.forEach((locale) => {\r\n const curMessages = messages[locale];\r\n const userMessages = __uniConfig.locales[locale];\r\n if (curMessages) {\r\n Object.assign(curMessages, userMessages);\r\n } else {\r\n messages[locale] = userMessages;\r\n }\r\n });\r\n }\r\n}\r\n\r\ninitI18nMessages();\r\n\r\nconst i18n = initVueI18n(\r\n locale,\r\n {}\r\n);\r\nconst t = i18n.t;\r\nconst i18nMixin = (i18n.mixin = {\r\n beforeCreate () {\r\n const unwatch = i18n.i18n.watchLocale(() => {\r\n this.$forceUpdate();\r\n });\r\n this.$once('hook:beforeDestroy', function () {\r\n unwatch();\r\n });\r\n },\r\n methods: {\r\n $$t (key, values) {\r\n return t(key, values)\r\n }\r\n }\r\n});\r\nconst setLocale = i18n.setLocale;\r\nconst getLocale = i18n.getLocale;\r\n\r\nfunction initAppLocale (Vue, appVm, locale) {\r\n const state = Vue.observable({\r\n locale: locale || i18n.getLocale()\r\n });\r\n const localeWatchers = [];\r\n appVm.$watchLocale = fn => {\r\n localeWatchers.push(fn);\r\n };\r\n Object.defineProperty(appVm, '$locale', {\r\n get () {\r\n return state.locale\r\n },\r\n set (v) {\r\n state.locale = v;\r\n localeWatchers.forEach(watch => watch(v));\r\n }\r\n });\r\n}\r\n\r\nfunction isEnableLocale () {\r\n return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length\r\n}\r\n\r\nfunction include (str, parts) {\r\n return !!parts.find((part) => str.indexOf(part) !== -1)\r\n}\r\n\r\nfunction startsWith (str, parts) {\r\n return parts.find((part) => str.indexOf(part) === 0)\r\n}\r\n\r\nfunction normalizeLocale (locale, messages) {\r\n if (!locale) {\r\n return\r\n }\r\n locale = locale.trim().replace(/_/g, '-');\r\n if (messages && messages[locale]) {\r\n return locale\r\n }\r\n locale = locale.toLowerCase();\r\n if (locale === 'chinese') {\r\n // 支付宝\r\n return LOCALE_ZH_HANS\r\n }\r\n if (locale.indexOf('zh') === 0) {\r\n if (locale.indexOf('-hans') > -1) {\r\n return LOCALE_ZH_HANS\r\n }\r\n if (locale.indexOf('-hant') > -1) {\r\n return LOCALE_ZH_HANT\r\n }\r\n if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {\r\n return LOCALE_ZH_HANT\r\n }\r\n return LOCALE_ZH_HANS\r\n }\r\n const lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);\r\n if (lang) {\r\n return lang\r\n }\r\n}\r\n// export function initI18n() {\r\n// const localeKeys = Object.keys(__uniConfig.locales || {})\r\n// if (localeKeys.length) {\r\n// localeKeys.forEach((locale) =>\r\n// i18n.add(locale, __uniConfig.locales[locale])\r\n// )\r\n// }\r\n// }\r\n\r\nfunction getLocale$1 () {\r\n // 优先使用 $locale\r\n const app = getApp({\r\n allowDefault: true\r\n });\r\n if (app && app.$vm) {\r\n return app.$vm.$locale\r\n }\r\n return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN\r\n}\r\n\r\nfunction setLocale$1 (locale) {\r\n const app = getApp();\r\n if (!app) {\r\n return false\r\n }\r\n const oldLocale = app.$vm.$locale;\r\n if (oldLocale !== locale) {\r\n app.$vm.$locale = locale;\r\n onLocaleChangeCallbacks.forEach((fn) => fn({\r\n locale\r\n }));\r\n return true\r\n }\r\n return false\r\n}\r\n\r\nconst onLocaleChangeCallbacks = [];\r\nfunction onLocaleChange (fn) {\r\n if (onLocaleChangeCallbacks.indexOf(fn) === -1) {\r\n onLocaleChangeCallbacks.push(fn);\r\n }\r\n}\r\n\r\nif (typeof global !== 'undefined') {\r\n global.getLocale = getLocale$1;\r\n}\r\n\r\nconst interceptors = {\r\n promiseInterceptor\r\n};\r\n\r\nvar baseApi = /*#__PURE__*/Object.freeze({\r\n __proto__: null,\r\n upx2px: upx2px,\r\n getLocale: getLocale$1,\r\n setLocale: setLocale$1,\r\n onLocaleChange: onLocaleChange,\r\n addInterceptor: addInterceptor,\r\n removeInterceptor: removeInterceptor,\r\n interceptors: interceptors\r\n});\r\n\r\nfunction findExistsPageIndex (url) {\r\n const pages = getCurrentPages();\r\n let len = pages.length;\r\n while (len--) {\r\n const page = pages[len];\r\n if (page.$page && page.$page.fullPath === url) {\r\n return len\r\n }\r\n }\r\n return -1\r\n}\r\n\r\nvar redirectTo = {\r\n name (fromArgs) {\r\n if (fromArgs.exists === 'back' && fromArgs.delta) {\r\n return 'navigateBack'\r\n }\r\n return 'redirectTo'\r\n },\r\n args (fromArgs) {\r\n if (fromArgs.exists === 'back' && fromArgs.url) {\r\n const existsPageIndex = findExistsPageIndex(fromArgs.url);\r\n if (existsPageIndex !== -1) {\r\n const delta = getCurrentPages().length - 1 - existsPageIndex;\r\n if (delta > 0) {\r\n fromArgs.delta = delta;\r\n }\r\n }\r\n }\r\n }\r\n};\r\n\r\nvar previewImage = {\r\n args (fromArgs) {\r\n let currentIndex = parseInt(fromArgs.current);\r\n if (isNaN(currentIndex)) {\r\n return\r\n }\r\n const urls = fromArgs.urls;\r\n if (!Array.isArray(urls)) {\r\n return\r\n }\r\n const len = urls.length;\r\n if (!len) {\r\n return\r\n }\r\n if (currentIndex < 0) {\r\n currentIndex = 0;\r\n } else if (currentIndex >= len) {\r\n currentIndex = len - 1;\r\n }\r\n if (currentIndex > 0) {\r\n fromArgs.current = urls[currentIndex];\r\n fromArgs.urls = urls.filter(\r\n (item, index) => index < currentIndex ? item !== urls[currentIndex] : true\r\n );\r\n } else {\r\n fromArgs.current = urls[0];\r\n }\r\n return {\r\n indicator: false,\r\n loop: false\r\n }\r\n }\r\n};\r\n\r\nconst UUID_KEY = '__DC_STAT_UUID';\r\nlet deviceId;\r\nfunction useDeviceId (result) {\r\n deviceId = deviceId || wx.getStorageSync(UUID_KEY);\r\n if (!deviceId) {\r\n deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);\r\n wx.setStorage({\r\n key: UUID_KEY,\r\n data: deviceId\r\n });\r\n }\r\n result.deviceId = deviceId;\r\n}\r\n\r\nfunction addSafeAreaInsets (result) {\r\n if (result.safeArea) {\r\n const safeArea = result.safeArea;\r\n result.safeAreaInsets = {\r\n top: safeArea.top,\r\n left: safeArea.left,\r\n right: result.windowWidth - safeArea.right,\r\n bottom: result.screenHeight - safeArea.bottom\r\n };\r\n }\r\n}\r\n\r\nfunction populateParameters (result) {\r\n const {\r\n brand = '', model = '', system = '',\r\n language = '', theme, version,\r\n platform, fontSizeSetting,\r\n SDKVersion, pixelRatio, deviceOrientation\r\n } = result;\r\n // const isQuickApp = \"mp-weixin\".indexOf('quickapp-webview') !== -1\r\n\r\n // osName osVersion\r\n let osName = '';\r\n let osVersion = '';\r\n {\r\n osName = system.split(' ')[0] || '';\r\n osVersion = system.split(' ')[1] || '';\r\n }\r\n let hostVersion = version;\r\n\r\n // deviceType\r\n const deviceType = getGetDeviceType(result, model);\r\n\r\n // deviceModel\r\n const deviceBrand = getDeviceBrand(brand);\r\n\r\n // hostName\r\n const _hostName = getHostName(result);\r\n\r\n // deviceOrientation\r\n let _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持\r\n\r\n // devicePixelRatio\r\n let _devicePixelRatio = pixelRatio;\r\n\r\n // SDKVersion\r\n let _SDKVersion = SDKVersion;\r\n\r\n // hostLanguage\r\n const hostLanguage = language.replace(/_/g, '-');\r\n\r\n // wx.getAccountInfoSync\r\n\r\n const parameters = {\r\n appId: process.env.UNI_APP_ID,\r\n appName: process.env.UNI_APP_NAME,\r\n appVersion: process.env.UNI_APP_VERSION_NAME,\r\n appVersionCode: process.env.UNI_APP_VERSION_CODE,\r\n appLanguage: getAppLanguage(hostLanguage),\r\n uniCompileVersion: process.env.UNI_COMPILER_VERSION,\r\n uniRuntimeVersion: process.env.UNI_COMPILER_VERSION,\r\n uniPlatform: process.env.UNI_SUB_PLATFORM || process.env.UNI_PLATFORM,\r\n deviceBrand,\r\n deviceModel: model,\r\n deviceType,\r\n devicePixelRatio: _devicePixelRatio,\r\n deviceOrientation: _deviceOrientation,\r\n osName: osName.toLocaleLowerCase(),\r\n osVersion,\r\n hostTheme: theme,\r\n hostVersion,\r\n hostLanguage,\r\n hostName: _hostName,\r\n hostSDKVersion: _SDKVersion,\r\n hostFontSizeSetting: fontSizeSetting,\r\n windowTop: 0,\r\n windowBottom: 0,\r\n // TODO\r\n osLanguage: undefined,\r\n osTheme: undefined,\r\n ua: undefined,\r\n hostPackageName: undefined,\r\n browserName: undefined,\r\n browserVersion: undefined\r\n };\r\n\r\n Object.assign(result, parameters);\r\n}\r\n\r\nfunction getGetDeviceType (result, model) {\r\n let deviceType = result.deviceType || 'phone';\r\n {\r\n const deviceTypeMaps = {\r\n ipad: 'pad',\r\n windows: 'pc',\r\n mac: 'pc'\r\n };\r\n const deviceTypeMapsKeys = Object.keys(deviceTypeMaps);\r\n const _model = model.toLocaleLowerCase();\r\n for (let index = 0; index < deviceTypeMapsKeys.length; index++) {\r\n const _m = deviceTypeMapsKeys[index];\r\n if (_model.indexOf(_m) !== -1) {\r\n deviceType = deviceTypeMaps[_m];\r\n break\r\n }\r\n }\r\n }\r\n return deviceType\r\n}\r\n\r\nfunction getDeviceBrand (brand) {\r\n let deviceBrand = brand;\r\n if (deviceBrand) {\r\n deviceBrand = brand.toLocaleLowerCase();\r\n }\r\n return deviceBrand\r\n}\r\n\r\nfunction getAppLanguage (defaultLanguage) {\r\n return getLocale$1\r\n ? getLocale$1()\r\n : defaultLanguage\r\n}\r\n\r\nfunction getHostName (result) {\r\n const _platform = 'WeChat' ;\r\n let _hostName = result.hostName || _platform; // mp-jd\r\n {\r\n if (result.environment) {\r\n _hostName = result.environment;\r\n } else if (result.host && result.host.env) {\r\n _hostName = result.host.env;\r\n }\r\n }\r\n\r\n return _hostName\r\n}\r\n\r\nvar getSystemInfo = {\r\n returnValue: function (result) {\r\n useDeviceId(result);\r\n addSafeAreaInsets(result);\r\n populateParameters(result);\r\n }\r\n};\r\n\r\nvar showActionSheet = {\r\n args (fromArgs) {\r\n if (typeof fromArgs === 'object') {\r\n fromArgs.alertText = fromArgs.title;\r\n }\r\n }\r\n};\r\n\r\nvar getAppBaseInfo = {\r\n returnValue: function (result) {\r\n const { version, language, SDKVersion, theme } = result;\r\n\r\n const _hostName = getHostName(result);\r\n\r\n const hostLanguage = language.replace('_', '-');\r\n\r\n result = sortObject(Object.assign(result, {\r\n appId: process.env.UNI_APP_ID,\r\n appName: process.env.UNI_APP_NAME,\r\n appVersion: process.env.UNI_APP_VERSION_NAME,\r\n appVersionCode: process.env.UNI_APP_VERSION_CODE,\r\n appLanguage: getAppLanguage(hostLanguage),\r\n hostVersion: version,\r\n hostLanguage,\r\n hostName: _hostName,\r\n hostSDKVersion: SDKVersion,\r\n hostTheme: theme\r\n }));\r\n }\r\n};\r\n\r\nvar getDeviceInfo = {\r\n returnValue: function (result) {\r\n const { brand, model } = result;\r\n const deviceType = getGetDeviceType(result, model);\r\n const deviceBrand = getDeviceBrand(brand);\r\n useDeviceId(result);\r\n\r\n result = sortObject(Object.assign(result, {\r\n deviceType,\r\n deviceBrand,\r\n deviceModel: model\r\n }));\r\n }\r\n};\r\n\r\nvar getWindowInfo = {\r\n returnValue: function (result) {\r\n addSafeAreaInsets(result);\r\n\r\n result = sortObject(Object.assign(result, {\r\n windowTop: 0,\r\n windowBottom: 0\r\n }));\r\n }\r\n};\r\n\r\n// import navigateTo from 'uni-helpers/navigate-to'\r\n\r\nconst protocols = {\r\n redirectTo,\r\n // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP\r\n previewImage,\r\n getSystemInfo,\r\n getSystemInfoSync: getSystemInfo,\r\n showActionSheet,\r\n getAppBaseInfo,\r\n getDeviceInfo,\r\n getWindowInfo\r\n};\r\nconst todos = [\r\n 'vibrate',\r\n 'preloadPage',\r\n 'unPreloadPage',\r\n 'loadSubPackage'\r\n];\r\nconst canIUses = [];\r\n\r\nconst CALLBACKS = ['success', 'fail', 'cancel', 'complete'];\r\n\r\nfunction processCallback (methodName, method, returnValue) {\r\n return function (res) {\r\n return method(processReturnValue(methodName, res, returnValue))\r\n }\r\n}\r\n\r\nfunction processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, keepFromArgs = false) {\r\n if (isPlainObject(fromArgs)) { // 一般 api 的参数解析\r\n const toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值\r\n if (isFn(argsOption)) {\r\n argsOption = argsOption(fromArgs, toArgs) || {};\r\n }\r\n for (const key in fromArgs) {\r\n if (hasOwn(argsOption, key)) {\r\n let keyOption = argsOption[key];\r\n if (isFn(keyOption)) {\r\n keyOption = keyOption(fromArgs[key], fromArgs, toArgs);\r\n }\r\n if (!keyOption) { // 不支持的参数\r\n console.warn(`The '${methodName}' method of platform '微信小程序' does not support option '${key}'`);\r\n } else if (isStr(keyOption)) { // 重写参数 key\r\n toArgs[keyOption] = fromArgs[key];\r\n } else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value\r\n toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;\r\n }\r\n } else if (CALLBACKS.indexOf(key) !== -1) {\r\n if (isFn(fromArgs[key])) {\r\n toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);\r\n }\r\n } else {\r\n if (!keepFromArgs) {\r\n toArgs[key] = fromArgs[key];\r\n }\r\n }\r\n }\r\n return toArgs\r\n } else if (isFn(fromArgs)) {\r\n fromArgs = processCallback(methodName, fromArgs, returnValue);\r\n }\r\n return fromArgs\r\n}\r\n\r\nfunction processReturnValue (methodName, res, returnValue, keepReturnValue = false) {\r\n if (isFn(protocols.returnValue)) { // 处理通用 returnValue\r\n res = protocols.returnValue(methodName, res);\r\n }\r\n return processArgs(methodName, res, returnValue, {}, keepReturnValue)\r\n}\r\n\r\nfunction wrapper (methodName, method) {\r\n if (hasOwn(protocols, methodName)) {\r\n const protocol = protocols[methodName];\r\n if (!protocol) { // 暂不支持的 api\r\n return function () {\r\n console.error(`Platform '微信小程序' does not support '${methodName}'.`);\r\n }\r\n }\r\n return function (arg1, arg2) { // 目前 api 最多两个参数\r\n let options = protocol;\r\n if (isFn(protocol)) {\r\n options = protocol(arg1);\r\n }\r\n\r\n arg1 = processArgs(methodName, arg1, options.args, options.returnValue);\r\n\r\n const args = [arg1];\r\n if (typeof arg2 !== 'undefined') {\r\n args.push(arg2);\r\n }\r\n if (isFn(options.name)) {\r\n methodName = options.name(arg1);\r\n } else if (isStr(options.name)) {\r\n methodName = options.name;\r\n }\r\n const returnValue = wx[methodName].apply(wx, args);\r\n if (isSyncApi(methodName)) { // 同步 api\r\n return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName))\r\n }\r\n return returnValue\r\n }\r\n }\r\n return method\r\n}\r\n\r\nconst todoApis = Object.create(null);\r\n\r\nconst TODOS = [\r\n 'onTabBarMidButtonTap',\r\n 'subscribePush',\r\n 'unsubscribePush',\r\n 'onPush',\r\n 'offPush',\r\n 'share'\r\n];\r\n\r\nfunction createTodoApi (name) {\r\n return function todoApi ({\r\n fail,\r\n complete\r\n }) {\r\n const res = {\r\n errMsg: `${name}:fail method '${name}' not supported`\r\n };\r\n isFn(fail) && fail(res);\r\n isFn(complete) && complete(res);\r\n }\r\n}\r\n\r\nTODOS.forEach(function (name) {\r\n todoApis[name] = createTodoApi(name);\r\n});\r\n\r\nvar providers = {\r\n oauth: ['weixin'],\r\n share: ['weixin'],\r\n payment: ['wxpay'],\r\n push: ['weixin']\r\n};\r\n\r\nfunction getProvider ({\r\n service,\r\n success,\r\n fail,\r\n complete\r\n}) {\r\n let res = false;\r\n if (providers[service]) {\r\n res = {\r\n errMsg: 'getProvider:ok',\r\n service,\r\n provider: providers[service]\r\n };\r\n isFn(success) && success(res);\r\n } else {\r\n res = {\r\n errMsg: 'getProvider:fail service not found'\r\n };\r\n isFn(fail) && fail(res);\r\n }\r\n isFn(complete) && complete(res);\r\n}\r\n\r\nvar extraApi = /*#__PURE__*/Object.freeze({\r\n __proto__: null,\r\n getProvider: getProvider\r\n});\r\n\r\nconst getEmitter = (function () {\r\n let Emitter;\r\n return function getUniEmitter () {\r\n if (!Emitter) {\r\n Emitter = new Vue();\r\n }\r\n return Emitter\r\n }\r\n})();\r\n\r\nfunction apply (ctx, method, args) {\r\n return ctx[method].apply(ctx, args)\r\n}\r\n\r\nfunction $on () {\r\n return apply(getEmitter(), '$on', [...arguments])\r\n}\r\nfunction $off () {\r\n return apply(getEmitter(), '$off', [...arguments])\r\n}\r\nfunction $once () {\r\n return apply(getEmitter(), '$once', [...arguments])\r\n}\r\nfunction $emit () {\r\n return apply(getEmitter(), '$emit', [...arguments])\r\n}\r\n\r\nvar eventApi = /*#__PURE__*/Object.freeze({\r\n __proto__: null,\r\n $on: $on,\r\n $off: $off,\r\n $once: $once,\r\n $emit: $emit\r\n});\r\n\r\n/**\r\n * 框架内 try-catch\r\n */\r\n/**\r\n * 开发者 try-catch\r\n */\r\nfunction tryCatch (fn) {\r\n return function () {\r\n try {\r\n return fn.apply(fn, arguments)\r\n } catch (e) {\r\n // TODO\r\n console.error(e);\r\n }\r\n }\r\n}\r\n\r\nfunction getApiCallbacks (params) {\r\n const apiCallbacks = {};\r\n for (const name in params) {\r\n const param = params[name];\r\n if (isFn(param)) {\r\n apiCallbacks[name] = tryCatch(param);\r\n delete params[name];\r\n }\r\n }\r\n return apiCallbacks\r\n}\r\n\r\nlet cid;\r\nlet cidErrMsg;\r\n\r\nfunction normalizePushMessage (message) {\r\n try {\r\n return JSON.parse(message)\r\n } catch (e) {}\r\n return message\r\n}\r\n\r\nfunction invokePushCallback (\r\n args\r\n) {\r\n if (args.type === 'clientId') {\r\n cid = args.cid;\r\n cidErrMsg = args.errMsg;\r\n invokeGetPushCidCallbacks(cid, args.errMsg);\r\n } else if (args.type === 'pushMsg') {\r\n onPushMessageCallbacks.forEach((callback) => {\r\n callback({\r\n type: 'receive',\r\n data: normalizePushMessage(args.message)\r\n });\r\n });\r\n } else if (args.type === 'click') {\r\n onPushMessageCallbacks.forEach((callback) => {\r\n callback({\r\n type: 'click',\r\n data: normalizePushMessage(args.message)\r\n });\r\n });\r\n }\r\n}\r\n\r\nconst getPushCidCallbacks = [];\r\n\r\nfunction invokeGetPushCidCallbacks (cid, errMsg) {\r\n getPushCidCallbacks.forEach((callback) => {\r\n callback(cid, errMsg);\r\n });\r\n getPushCidCallbacks.length = 0;\r\n}\r\n\r\nfunction getPushClientid (args) {\r\n if (!isPlainObject(args)) {\r\n args = {};\r\n }\r\n const {\r\n success,\r\n fail,\r\n complete\r\n } = getApiCallbacks(args);\r\n const hasSuccess = isFn(success);\r\n const hasFail = isFn(fail);\r\n const hasComplete = isFn(complete);\r\n getPushCidCallbacks.push((cid, errMsg) => {\r\n let res;\r\n if (cid) {\r\n res = {\r\n errMsg: 'getPushClientid:ok',\r\n cid\r\n };\r\n hasSuccess && success(res);\r\n } else {\r\n res = {\r\n errMsg: 'getPushClientid:fail' + (errMsg ? ' ' + errMsg : '')\r\n };\r\n hasFail && fail(res);\r\n }\r\n hasComplete && complete(res);\r\n });\r\n if (typeof cid !== 'undefined') {\r\n Promise.resolve().then(() => invokeGetPushCidCallbacks(cid, cidErrMsg));\r\n }\r\n}\r\n\r\nconst onPushMessageCallbacks = [];\r\n// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现\r\nconst onPushMessage = (fn) => {\r\n if (onPushMessageCallbacks.indexOf(fn) === -1) {\r\n onPushMessageCallbacks.push(fn);\r\n }\r\n};\r\n\r\nconst offPushMessage = (fn) => {\r\n if (!fn) {\r\n onPushMessageCallbacks.length = 0;\r\n } else {\r\n const index = onPushMessageCallbacks.indexOf(fn);\r\n if (index > -1) {\r\n onPushMessageCallbacks.splice(index, 1);\r\n }\r\n }\r\n};\r\n\r\nvar api = /*#__PURE__*/Object.freeze({\r\n __proto__: null,\r\n getPushClientid: getPushClientid,\r\n onPushMessage: onPushMessage,\r\n offPushMessage: offPushMessage,\r\n invokePushCallback: invokePushCallback\r\n});\r\n\r\nconst MPPage = Page;\r\nconst MPComponent = Component;\r\n\r\nconst customizeRE = /:/g;\r\n\r\nconst customize = cached((str) => {\r\n return camelize(str.replace(customizeRE, '-'))\r\n});\r\n\r\nfunction initTriggerEvent (mpInstance) {\r\n const oldTriggerEvent = mpInstance.triggerEvent;\r\n const newTriggerEvent = function (event, ...args) {\r\n return oldTriggerEvent.apply(mpInstance, [customize(event), ...args])\r\n };\r\n try {\r\n // 京东小程序 triggerEvent 为只读\r\n mpInstance.triggerEvent = newTriggerEvent;\r\n } catch (error) {\r\n mpInstance._triggerEvent = newTriggerEvent;\r\n }\r\n}\r\n\r\nfunction initHook (name, options, isComponent) {\r\n const oldHook = options[name];\r\n if (!oldHook) {\r\n options[name] = function () {\r\n initTriggerEvent(this);\r\n };\r\n } else {\r\n options[name] = function (...args) {\r\n initTriggerEvent(this);\r\n return oldHook.apply(this, args)\r\n };\r\n }\r\n}\r\nif (!MPPage.__$wrappered) {\r\n MPPage.__$wrappered = true;\r\n Page = function (options = {}) {\r\n initHook('onLoad', options);\r\n return MPPage(options)\r\n };\r\n Page.after = MPPage.after;\r\n\r\n Component = function (options = {}) {\r\n initHook('created', options);\r\n return MPComponent(options)\r\n };\r\n}\r\n\r\nconst PAGE_EVENT_HOOKS = [\r\n 'onPullDownRefresh',\r\n 'onReachBottom',\r\n 'onAddToFavorites',\r\n 'onShareTimeline',\r\n 'onShareAppMessage',\r\n 'onPageScroll',\r\n 'onResize',\r\n 'onTabItemTap'\r\n];\r\n\r\nfunction initMocks (vm, mocks) {\r\n const mpInstance = vm.$mp[vm.mpType];\r\n mocks.forEach(mock => {\r\n if (hasOwn(mpInstance, mock)) {\r\n vm[mock] = mpInstance[mock];\r\n }\r\n });\r\n}\r\n\r\nfunction hasHook (hook, vueOptions) {\r\n if (!vueOptions) {\r\n return true\r\n }\r\n\r\n if (Vue.options && Array.isArray(Vue.options[hook])) {\r\n return true\r\n }\r\n\r\n vueOptions = vueOptions.default || vueOptions;\r\n\r\n if (isFn(vueOptions)) {\r\n if (isFn(vueOptions.extendOptions[hook])) {\r\n return true\r\n }\r\n if (vueOptions.super &&\r\n vueOptions.super.options &&\r\n Array.isArray(vueOptions.super.options[hook])) {\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n if (isFn(vueOptions[hook])) {\r\n return true\r\n }\r\n const mixins = vueOptions.mixins;\r\n if (Array.isArray(mixins)) {\r\n return !!mixins.find(mixin => hasHook(hook, mixin))\r\n }\r\n}\r\n\r\nfunction initHooks (mpOptions, hooks, vueOptions) {\r\n hooks.forEach(hook => {\r\n if (hasHook(hook, vueOptions)) {\r\n mpOptions[hook] = function (args) {\r\n return this.$vm && this.$vm.__call_hook(hook, args)\r\n };\r\n }\r\n });\r\n}\r\n\r\nfunction initVueComponent (Vue, vueOptions) {\r\n vueOptions = vueOptions.default || vueOptions;\r\n let VueComponent;\r\n if (isFn(vueOptions)) {\r\n VueComponent = vueOptions;\r\n } else {\r\n VueComponent = Vue.extend(vueOptions);\r\n }\r\n vueOptions = VueComponent.options;\r\n return [VueComponent, vueOptions]\r\n}\r\n\r\nfunction initSlots (vm, vueSlots) {\r\n if (Array.isArray(vueSlots) && vueSlots.length) {\r\n const $slots = Object.create(null);\r\n vueSlots.forEach(slotName => {\r\n $slots[slotName] = true;\r\n });\r\n vm.$scopedSlots = vm.$slots = $slots;\r\n }\r\n}\r\n\r\nfunction initVueIds (vueIds, mpInstance) {\r\n vueIds = (vueIds || '').split(',');\r\n const len = vueIds.length;\r\n\r\n if (len === 1) {\r\n mpInstance._$vueId = vueIds[0];\r\n } else if (len === 2) {\r\n mpInstance._$vueId = vueIds[0];\r\n mpInstance._$vuePid = vueIds[1];\r\n }\r\n}\r\n\r\nfunction initData (vueOptions, context) {\r\n let data = vueOptions.data || {};\r\n const methods = vueOptions.methods || {};\r\n\r\n if (typeof data === 'function') {\r\n try {\r\n data = data.call(context); // 支持 Vue.prototype 上挂的数据\r\n } catch (e) {\r\n if (process.env.VUE_APP_DEBUG) {\r\n console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);\r\n }\r\n }\r\n } else {\r\n try {\r\n // 对 data 格式化\r\n data = JSON.parse(JSON.stringify(data));\r\n } catch (e) {}\r\n }\r\n\r\n if (!isPlainObject(data)) {\r\n data = {};\r\n }\r\n\r\n Object.keys(methods).forEach(methodName => {\r\n if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {\r\n data[methodName] = methods[methodName];\r\n }\r\n });\r\n\r\n return data\r\n}\r\n\r\nconst PROP_TYPES = [String, Number, Boolean, Object, Array, null];\r\n\r\nfunction createObserver (name) {\r\n return function observer (newVal, oldVal) {\r\n if (this.$vm) {\r\n this.$vm[name] = newVal; // 为了触发其他非 render watcher\r\n }\r\n }\r\n}\r\n\r\nfunction initBehaviors (vueOptions, initBehavior) {\r\n const vueBehaviors = vueOptions.behaviors;\r\n const vueExtends = vueOptions.extends;\r\n const vueMixins = vueOptions.mixins;\r\n\r\n let vueProps = vueOptions.props;\r\n\r\n if (!vueProps) {\r\n vueOptions.props = vueProps = [];\r\n }\r\n\r\n const behaviors = [];\r\n if (Array.isArray(vueBehaviors)) {\r\n vueBehaviors.forEach(behavior => {\r\n behaviors.push(behavior.replace('uni://', `${\"wx\"}://`));\r\n if (behavior === 'uni://form-field') {\r\n if (Array.isArray(vueProps)) {\r\n vueProps.push('name');\r\n vueProps.push('value');\r\n } else {\r\n vueProps.name = {\r\n type: String,\r\n default: ''\r\n };\r\n vueProps.value = {\r\n type: [String, Number, Boolean, Array, Object, Date],\r\n default: ''\r\n };\r\n }\r\n }\r\n });\r\n }\r\n if (isPlainObject(vueExtends) && vueExtends.props) {\r\n behaviors.push(\r\n initBehavior({\r\n properties: initProperties(vueExtends.props, true)\r\n })\r\n );\r\n }\r\n if (Array.isArray(vueMixins)) {\r\n vueMixins.forEach(vueMixin => {\r\n if (isPlainObject(vueMixin) && vueMixin.props) {\r\n behaviors.push(\r\n initBehavior({\r\n properties: initProperties(vueMixin.props, true)\r\n })\r\n );\r\n }\r\n });\r\n }\r\n return behaviors\r\n}\r\n\r\nfunction parsePropType (key, type, defaultValue, file) {\r\n // [String]=>String\r\n if (Array.isArray(type) && type.length === 1) {\r\n return type[0]\r\n }\r\n return type\r\n}\r\n\r\nfunction initProperties (props, isBehavior = false, file = '') {\r\n const properties = {};\r\n if (!isBehavior) {\r\n properties.vueId = {\r\n type: String,\r\n value: ''\r\n };\r\n // 用于字节跳动小程序模拟抽象节点\r\n properties.generic = {\r\n type: Object,\r\n value: null\r\n };\r\n // scopedSlotsCompiler auto\r\n properties.scopedSlotsCompiler = {\r\n type: String,\r\n value: ''\r\n };\r\n properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots\r\n type: null,\r\n value: [],\r\n observer: function (newVal, oldVal) {\r\n const $slots = Object.create(null);\r\n newVal.forEach(slotName => {\r\n $slots[slotName] = true;\r\n });\r\n this.setData({\r\n $slots\r\n });\r\n }\r\n };\r\n }\r\n if (Array.isArray(props)) { // ['title']\r\n props.forEach(key => {\r\n properties[key] = {\r\n type: null,\r\n observer: createObserver(key)\r\n };\r\n });\r\n } else if (isPlainObject(props)) { // {title:{type:String,default:''},content:String}\r\n Object.keys(props).forEach(key => {\r\n const opts = props[key];\r\n if (isPlainObject(opts)) { // title:{type:String,default:''}\r\n let value = opts.default;\r\n if (isFn(value)) {\r\n value = value();\r\n }\r\n\r\n opts.type = parsePropType(key, opts.type);\r\n\r\n properties[key] = {\r\n type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,\r\n value,\r\n observer: createObserver(key)\r\n };\r\n } else { // content:String\r\n const type = parsePropType(key, opts);\r\n properties[key] = {\r\n type: PROP_TYPES.indexOf(type) !== -1 ? type : null,\r\n observer: createObserver(key)\r\n };\r\n }\r\n });\r\n }\r\n return properties\r\n}\r\n\r\nfunction wrapper$1 (event) {\r\n // TODO 又得兼容 mpvue 的 mp 对象\r\n try {\r\n event.mp = JSON.parse(JSON.stringify(event));\r\n } catch (e) {}\r\n\r\n event.stopPropagation = noop;\r\n event.preventDefault = noop;\r\n\r\n event.target = event.target || {};\r\n\r\n if (!hasOwn(event, 'detail')) {\r\n event.detail = {};\r\n }\r\n\r\n if (hasOwn(event, 'markerId')) {\r\n event.detail = typeof event.detail === 'object' ? event.detail : {};\r\n event.detail.markerId = event.markerId;\r\n }\r\n\r\n if (isPlainObject(event.detail)) {\r\n event.target = Object.assign({}, event.target, event.detail);\r\n }\r\n\r\n return event\r\n}\r\n\r\nfunction getExtraValue (vm, dataPathsArray) {\r\n let context = vm;\r\n dataPathsArray.forEach(dataPathArray => {\r\n const dataPath = dataPathArray[0];\r\n const value = dataPathArray[2];\r\n if (dataPath || typeof value !== 'undefined') { // ['','',index,'disable']\r\n const propPath = dataPathArray[1];\r\n const valuePath = dataPathArray[3];\r\n\r\n let vFor;\r\n if (Number.isInteger(dataPath)) {\r\n vFor = dataPath;\r\n } else if (!dataPath) {\r\n vFor = context;\r\n } else if (typeof dataPath === 'string' && dataPath) {\r\n if (dataPath.indexOf('#s#') === 0) {\r\n vFor = dataPath.substr(3);\r\n } else {\r\n vFor = vm.__get_value(dataPath, context);\r\n }\r\n }\r\n\r\n if (Number.isInteger(vFor)) {\r\n context = value;\r\n } else if (!propPath) {\r\n context = vFor[value];\r\n } else {\r\n if (Array.isArray(vFor)) {\r\n context = vFor.find(vForItem => {\r\n return vm.__get_value(propPath, vForItem) === value\r\n });\r\n } else if (isPlainObject(vFor)) {\r\n context = Object.keys(vFor).find(vForKey => {\r\n return vm.__get_value(propPath, vFor[vForKey]) === value\r\n });\r\n } else {\r\n console.error('v-for 暂不支持循环数据:', vFor);\r\n }\r\n }\r\n\r\n if (valuePath) {\r\n context = vm.__get_value(valuePath, context);\r\n }\r\n }\r\n });\r\n return context\r\n}\r\n\r\nfunction processEventExtra (vm, extra, event) {\r\n const extraObj = {};\r\n\r\n if (Array.isArray(extra) && extra.length) {\r\n /**\r\n *[\r\n * ['data.items', 'data.id', item.data.id],\r\n * ['metas', 'id', meta.id]\r\n *],\r\n *[\r\n * ['data.items', 'data.id', item.data.id],\r\n * ['metas', 'id', meta.id]\r\n *],\r\n *'test'\r\n */\r\n extra.forEach((dataPath, index) => {\r\n if (typeof dataPath === 'string') {\r\n if (!dataPath) { // model,prop.sync\r\n extraObj['$' + index] = vm;\r\n } else {\r\n if (dataPath === '$event') { // $event\r\n extraObj['$' + index] = event;\r\n } else if (dataPath === 'arguments') {\r\n if (event.detail && event.detail.__args__) {\r\n extraObj['$' + index] = event.detail.__args__;\r\n } else {\r\n extraObj['$' + index] = [event];\r\n }\r\n } else if (dataPath.indexOf('$event.') === 0) { // $event.target.value\r\n extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);\r\n } else {\r\n extraObj['$' + index] = vm.__get_value(dataPath);\r\n }\r\n }\r\n } else {\r\n extraObj['$' + index] = getExtraValue(vm, dataPath);\r\n }\r\n });\r\n }\r\n\r\n return extraObj\r\n}\r\n\r\nfunction getObjByArray (arr) {\r\n const obj = {};\r\n for (let i = 1; i < arr.length; i++) {\r\n const element = arr[i];\r\n obj[element[0]] = element[1];\r\n }\r\n return obj\r\n}\r\n\r\nfunction processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) {\r\n let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象\r\n if (isCustom) { // 自定义事件\r\n isCustomMPEvent = event.currentTarget &&\r\n event.currentTarget.dataset &&\r\n event.currentTarget.dataset.comType === 'wx';\r\n if (!args.length) { // 无参数,直接传入 event 或 detail 数组\r\n if (isCustomMPEvent) {\r\n return [event]\r\n }\r\n return event.detail.__args__ || event.detail\r\n }\r\n }\r\n\r\n const extraObj = processEventExtra(vm, extra, event);\r\n\r\n const ret = [];\r\n args.forEach(arg => {\r\n if (arg === '$event') {\r\n if (methodName === '__set_model' && !isCustom) { // input v-model value\r\n ret.push(event.target.value);\r\n } else {\r\n if (isCustom && !isCustomMPEvent) {\r\n ret.push(event.detail.__args__[0]);\r\n } else { // wxcomponent 组件或内置组件\r\n ret.push(event);\r\n }\r\n }\r\n } else {\r\n if (Array.isArray(arg) && arg[0] === 'o') {\r\n ret.push(getObjByArray(arg));\r\n } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {\r\n ret.push(extraObj[arg]);\r\n } else {\r\n ret.push(arg);\r\n }\r\n }\r\n });\r\n\r\n return ret\r\n}\r\n\r\nconst ONCE = '~';\r\nconst CUSTOM = '^';\r\n\r\nfunction isMatchEventType (eventType, optType) {\r\n return (eventType === optType) ||\r\n (\r\n optType === 'regionchange' &&\r\n (\r\n eventType === 'begin' ||\r\n eventType === 'end'\r\n )\r\n )\r\n}\r\n\r\nfunction getContextVm (vm) {\r\n let $parent = vm.$parent;\r\n // 父组件是 scoped slots 或者其他自定义组件时继续查找\r\n while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {\r\n $parent = $parent.$parent;\r\n }\r\n return $parent && $parent.$parent\r\n}\r\n\r\nfunction handleEvent (event) {\r\n event = wrapper$1(event);\r\n\r\n // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]\r\n const dataset = (event.currentTarget || event.target).dataset;\r\n if (!dataset) {\r\n return console.warn('事件信息不存在')\r\n }\r\n const eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰\r\n if (!eventOpts) {\r\n return console.warn('事件信息不存在')\r\n }\r\n\r\n // [['handle',[1,2,a]],['handle1',[1,2,a]]]\r\n const eventType = event.type;\r\n\r\n const ret = [];\r\n\r\n eventOpts.forEach(eventOpt => {\r\n let type = eventOpt[0];\r\n const eventsArray = eventOpt[1];\r\n\r\n const isCustom = type.charAt(0) === CUSTOM;\r\n type = isCustom ? type.slice(1) : type;\r\n const isOnce = type.charAt(0) === ONCE;\r\n type = isOnce ? type.slice(1) : type;\r\n\r\n if (eventsArray && isMatchEventType(eventType, type)) {\r\n eventsArray.forEach(eventArray => {\r\n const methodName = eventArray[0];\r\n if (methodName) {\r\n let handlerCtx = this.$vm;\r\n if (handlerCtx.$options.generic) { // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots\r\n handlerCtx = getContextVm(handlerCtx) || handlerCtx;\r\n }\r\n if (methodName === '$emit') {\r\n handlerCtx.$emit.apply(handlerCtx,\r\n processEventArgs(\r\n this.$vm,\r\n event,\r\n eventArray[1],\r\n eventArray[2],\r\n isCustom,\r\n methodName\r\n ));\r\n return\r\n }\r\n const handler = handlerCtx[methodName];\r\n if (!isFn(handler)) {\r\n throw new Error(` _vm.${methodName} is not a function`)\r\n }\r\n if (isOnce) {\r\n if (handler.once) {\r\n return\r\n }\r\n handler.once = true;\r\n }\r\n let params = processEventArgs(\r\n this.$vm,\r\n event,\r\n eventArray[1],\r\n eventArray[2],\r\n isCustom,\r\n methodName\r\n );\r\n params = Array.isArray(params) ? params : [];\r\n // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据\r\n if (/=\\s*\\S+\\.eventParams\\s*\\|\\|\\s*\\S+\\[['\"]event-params['\"]\\]/.test(handler.toString())) {\r\n // eslint-disable-next-line no-sparse-arrays\r\n params = params.concat([, , , , , , , , , , event]);\r\n }\r\n ret.push(handler.apply(handlerCtx, params));\r\n }\r\n });\r\n }\r\n });\r\n\r\n if (\r\n eventType === 'input' &&\r\n ret.length === 1 &&\r\n typeof ret[0] !== 'undefined'\r\n ) {\r\n return ret[0]\r\n }\r\n}\r\n\r\nconst eventChannels = {};\r\n\r\nconst eventChannelStack = [];\r\n\r\nfunction getEventChannel (id) {\r\n if (id) {\r\n const eventChannel = eventChannels[id];\r\n delete eventChannels[id];\r\n return eventChannel\r\n }\r\n return eventChannelStack.shift()\r\n}\r\n\r\nconst hooks = [\r\n 'onShow',\r\n 'onHide',\r\n 'onError',\r\n 'onPageNotFound',\r\n 'onThemeChange',\r\n 'onUnhandledRejection'\r\n];\r\n\r\nfunction initEventChannel () {\r\n Vue.prototype.getOpenerEventChannel = function () {\r\n // 微信小程序使用自身getOpenerEventChannel\r\n {\r\n return this.$scope.getOpenerEventChannel()\r\n }\r\n };\r\n const callHook = Vue.prototype.__call_hook;\r\n Vue.prototype.__call_hook = function (hook, args) {\r\n if (hook === 'onLoad' && args && args.__id__) {\r\n this.__eventChannel__ = getEventChannel(args.__id__);\r\n delete args.__id__;\r\n }\r\n return callHook.call(this, hook, args)\r\n };\r\n}\r\n\r\nfunction initScopedSlotsParams () {\r\n const center = {};\r\n const parents = {};\r\n\r\n Vue.prototype.$hasScopedSlotsParams = function (vueId) {\r\n const has = center[vueId];\r\n if (!has) {\r\n parents[vueId] = this;\r\n this.$on('hook:destroyed', () => {\r\n delete parents[vueId];\r\n });\r\n }\r\n return has\r\n };\r\n\r\n Vue.prototype.$getScopedSlotsParams = function (vueId, name, key) {\r\n const data = center[vueId];\r\n if (data) {\r\n const object = data[name] || {};\r\n return key ? object[key] : object\r\n } else {\r\n parents[vueId] = this;\r\n this.$on('hook:destroyed', () => {\r\n delete parents[vueId];\r\n });\r\n }\r\n };\r\n\r\n Vue.prototype.$setScopedSlotsParams = function (name, value) {\r\n const vueIds = this.$options.propsData.vueId;\r\n if (vueIds) {\r\n const vueId = vueIds.split(',')[0];\r\n const object = center[vueId] = center[vueId] || {};\r\n object[name] = value;\r\n if (parents[vueId]) {\r\n parents[vueId].$forceUpdate();\r\n }\r\n }\r\n };\r\n\r\n Vue.mixin({\r\n destroyed () {\r\n const propsData = this.$options.propsData;\r\n const vueId = propsData && propsData.vueId;\r\n if (vueId) {\r\n delete center[vueId];\r\n delete parents[vueId];\r\n }\r\n }\r\n });\r\n}\r\n\r\nfunction parseBaseApp (vm, {\r\n mocks,\r\n initRefs\r\n}) {\r\n initEventChannel();\r\n {\r\n initScopedSlotsParams();\r\n }\r\n if (vm.$options.store) {\r\n Vue.prototype.$store = vm.$options.store;\r\n }\r\n uniIdMixin(Vue);\r\n\r\n Vue.prototype.mpHost = \"mp-weixin\";\r\n\r\n Vue.mixin({\r\n beforeCreate () {\r\n if (!this.$options.mpType) {\r\n return\r\n }\r\n\r\n this.mpType = this.$options.mpType;\r\n\r\n this.$mp = {\r\n data: {},\r\n [this.mpType]: this.$options.mpInstance\r\n };\r\n\r\n this.$scope = this.$options.mpInstance;\r\n\r\n delete this.$options.mpType;\r\n delete this.$options.mpInstance;\r\n if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n\r\n const app = getApp();\r\n if (app.$vm && app.$vm.$i18n) {\r\n this._i18n = app.$vm.$i18n;\r\n }\r\n }\r\n if (this.mpType !== 'app') {\r\n initRefs(this);\r\n initMocks(this, mocks);\r\n }\r\n }\r\n });\r\n\r\n const appOptions = {\r\n onLaunch (args) {\r\n if (this.$vm) { // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前\r\n return\r\n }\r\n {\r\n if (wx.canIUse && !wx.canIUse('nextTick')) { // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断\r\n console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');\r\n }\r\n }\r\n\r\n this.$vm = vm;\r\n\r\n this.$vm.$mp = {\r\n app: this\r\n };\r\n\r\n this.$vm.$scope = this;\r\n // vm 上也挂载 globalData\r\n this.$vm.globalData = this.globalData;\r\n\r\n this.$vm._isMounted = true;\r\n this.$vm.__call_hook('mounted', args);\r\n\r\n this.$vm.__call_hook('onLaunch', args);\r\n }\r\n };\r\n\r\n // 兼容旧版本 globalData\r\n appOptions.globalData = vm.$options.globalData || {};\r\n // 将 methods 中的方法挂在 getApp() 中\r\n const methods = vm.$options.methods;\r\n if (methods) {\r\n Object.keys(methods).forEach(name => {\r\n appOptions[name] = methods[name];\r\n });\r\n }\r\n\r\n initAppLocale(Vue, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);\r\n\r\n initHooks(appOptions, hooks);\r\n\r\n return appOptions\r\n}\r\n\r\nconst mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];\r\n\r\nfunction findVmByVueId (vm, vuePid) {\r\n const $children = vm.$children;\r\n // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)\r\n for (let i = $children.length - 1; i >= 0; i--) {\r\n const childVm = $children[i];\r\n if (childVm.$scope._$vueId === vuePid) {\r\n return childVm\r\n }\r\n }\r\n // 反向递归查找\r\n let parentVm;\r\n for (let i = $children.length - 1; i >= 0; i--) {\r\n parentVm = findVmByVueId($children[i], vuePid);\r\n if (parentVm) {\r\n return parentVm\r\n }\r\n }\r\n}\r\n\r\nfunction initBehavior (options) {\r\n return Behavior(options)\r\n}\r\n\r\nfunction isPage () {\r\n return !!this.route\r\n}\r\n\r\nfunction initRelation (detail) {\r\n this.triggerEvent('__l', detail);\r\n}\r\n\r\nfunction selectAllComponents (mpInstance, selector, $refs) {\r\n const components = mpInstance.selectAllComponents(selector);\r\n components.forEach(component => {\r\n const ref = component.dataset.ref;\r\n $refs[ref] = component.$vm || component;\r\n {\r\n if (component.dataset.vueGeneric === 'scoped') {\r\n component.selectAllComponents('.scoped-ref').forEach(scopedComponent => {\r\n selectAllComponents(scopedComponent, selector, $refs);\r\n });\r\n }\r\n }\r\n });\r\n}\r\n\r\nfunction initRefs (vm) {\r\n const mpInstance = vm.$scope;\r\n Object.defineProperty(vm, '$refs', {\r\n get () {\r\n const $refs = {};\r\n selectAllComponents(mpInstance, '.vue-ref', $refs);\r\n // TODO 暂不考虑 for 中的 scoped\r\n const forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');\r\n forComponents.forEach(component => {\r\n const ref = component.dataset.ref;\r\n if (!$refs[ref]) {\r\n $refs[ref] = [];\r\n }\r\n $refs[ref].push(component.$vm || component);\r\n });\r\n return $refs\r\n }\r\n });\r\n}\r\n\r\nfunction handleLink (event) {\r\n const {\r\n vuePid,\r\n vueOptions\r\n } = event.detail || event.value; // detail 是微信,value 是百度(dipatch)\r\n\r\n let parentVm;\r\n\r\n if (vuePid) {\r\n parentVm = findVmByVueId(this.$vm, vuePid);\r\n }\r\n\r\n if (!parentVm) {\r\n parentVm = this.$vm;\r\n }\r\n\r\n vueOptions.parent = parentVm;\r\n}\r\n\r\nfunction parseApp (vm) {\r\n return parseBaseApp(vm, {\r\n mocks,\r\n initRefs\r\n })\r\n}\r\n\r\nfunction createApp (vm) {\r\n App(parseApp(vm));\r\n return vm\r\n}\r\n\r\nconst encodeReserveRE = /[!'()*]/g;\r\nconst encodeReserveReplacer = c => '%' + c.charCodeAt(0).toString(16);\r\nconst commaRE = /%2C/g;\r\n\r\n// fixed encodeURIComponent which is more conformant to RFC3986:\r\n// - escapes [!'()*]\r\n// - preserve commas\r\nconst encode = str => encodeURIComponent(str)\r\n .replace(encodeReserveRE, encodeReserveReplacer)\r\n .replace(commaRE, ',');\r\n\r\nfunction stringifyQuery (obj, encodeStr = encode) {\r\n const res = obj ? Object.keys(obj).map(key => {\r\n const val = obj[key];\r\n\r\n if (val === undefined) {\r\n return ''\r\n }\r\n\r\n if (val === null) {\r\n return encodeStr(key)\r\n }\r\n\r\n if (Array.isArray(val)) {\r\n const result = [];\r\n val.forEach(val2 => {\r\n if (val2 === undefined) {\r\n return\r\n }\r\n if (val2 === null) {\r\n result.push(encodeStr(key));\r\n } else {\r\n result.push(encodeStr(key) + '=' + encodeStr(val2));\r\n }\r\n });\r\n return result.join('&')\r\n }\r\n\r\n return encodeStr(key) + '=' + encodeStr(val)\r\n }).filter(x => x.length > 0).join('&') : null;\r\n return res ? `?${res}` : ''\r\n}\r\n\r\nfunction parseBaseComponent (vueComponentOptions, {\r\n isPage,\r\n initRelation\r\n} = {}) {\r\n const [VueComponent, vueOptions] = initVueComponent(Vue, vueComponentOptions);\r\n\r\n const options = {\r\n multipleSlots: true,\r\n addGlobalClass: true,\r\n ...(vueOptions.options || {})\r\n };\r\n\r\n {\r\n // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项\r\n if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {\r\n Object.assign(options, vueOptions['mp-weixin'].options);\r\n }\r\n }\r\n\r\n const componentOptions = {\r\n options,\r\n data: initData(vueOptions, Vue.prototype),\r\n behaviors: initBehaviors(vueOptions, initBehavior),\r\n properties: initProperties(vueOptions.props, false, vueOptions.__file),\r\n lifetimes: {\r\n attached () {\r\n const properties = this.properties;\r\n\r\n const options = {\r\n mpType: isPage.call(this) ? 'page' : 'component',\r\n mpInstance: this,\r\n propsData: properties\r\n };\r\n\r\n initVueIds(properties.vueId, this);\r\n\r\n // 处理父子关系\r\n initRelation.call(this, {\r\n vuePid: this._$vuePid,\r\n vueOptions: options\r\n });\r\n\r\n // 初始化 vue 实例\r\n this.$vm = new VueComponent(options);\r\n\r\n // 处理$slots,$scopedSlots(暂不支持动态变化$slots)\r\n initSlots(this.$vm, properties.vueSlots);\r\n\r\n // 触发首次 setData\r\n this.$vm.$mount();\r\n },\r\n ready () {\r\n // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发\r\n // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800\r\n if (this.$vm) {\r\n this.$vm._isMounted = true;\r\n this.$vm.__call_hook('mounted');\r\n this.$vm.__call_hook('onReady');\r\n }\r\n },\r\n detached () {\r\n this.$vm && this.$vm.$destroy();\r\n }\r\n },\r\n pageLifetimes: {\r\n show (args) {\r\n this.$vm && this.$vm.__call_hook('onPageShow', args);\r\n },\r\n hide () {\r\n this.$vm && this.$vm.__call_hook('onPageHide');\r\n },\r\n resize (size) {\r\n this.$vm && this.$vm.__call_hook('onPageResize', size);\r\n }\r\n },\r\n methods: {\r\n __l: handleLink,\r\n __e: handleEvent\r\n }\r\n };\r\n // externalClasses\r\n if (vueOptions.externalClasses) {\r\n componentOptions.externalClasses = vueOptions.externalClasses;\r\n }\r\n\r\n if (Array.isArray(vueOptions.wxsCallMethods)) {\r\n vueOptions.wxsCallMethods.forEach(callMethod => {\r\n componentOptions.methods[callMethod] = function (args) {\r\n return this.$vm[callMethod](args)\r\n };\r\n });\r\n }\r\n\r\n if (isPage) {\r\n return componentOptions\r\n }\r\n return [componentOptions, VueComponent]\r\n}\r\n\r\nfunction parseComponent (vueComponentOptions) {\r\n return parseBaseComponent(vueComponentOptions, {\r\n isPage,\r\n initRelation\r\n })\r\n}\r\n\r\nconst hooks$1 = [\r\n 'onShow',\r\n 'onHide',\r\n 'onUnload'\r\n];\r\n\r\nhooks$1.push(...PAGE_EVENT_HOOKS);\r\n\r\nfunction parseBasePage (vuePageOptions, {\r\n isPage,\r\n initRelation\r\n}) {\r\n const pageOptions = parseComponent(vuePageOptions);\r\n\r\n initHooks(pageOptions.methods, hooks$1, vuePageOptions);\r\n\r\n pageOptions.methods.onLoad = function (query) {\r\n this.options = query;\r\n const copyQuery = Object.assign({}, query);\r\n delete copyQuery.__id__;\r\n this.$page = {\r\n fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)\r\n };\r\n this.$vm.$mp.query = query; // 兼容 mpvue\r\n this.$vm.__call_hook('onLoad', query);\r\n };\r\n\r\n return pageOptions\r\n}\r\n\r\nfunction parsePage (vuePageOptions) {\r\n return parseBasePage(vuePageOptions, {\r\n isPage,\r\n initRelation\r\n })\r\n}\r\n\r\nfunction createPage (vuePageOptions) {\r\n {\r\n return Component(parsePage(vuePageOptions))\r\n }\r\n}\r\n\r\nfunction createComponent (vueOptions) {\r\n {\r\n return Component(parseComponent(vueOptions))\r\n }\r\n}\r\n\r\nfunction createSubpackageApp (vm) {\r\n const appOptions = parseApp(vm);\r\n const app = getApp({\r\n allowDefault: true\r\n });\r\n vm.$scope = app;\r\n const globalData = app.globalData;\r\n if (globalData) {\r\n Object.keys(appOptions.globalData).forEach(name => {\r\n if (!hasOwn(globalData, name)) {\r\n globalData[name] = appOptions.globalData[name];\r\n }\r\n });\r\n }\r\n Object.keys(appOptions).forEach(name => {\r\n if (!hasOwn(app, name)) {\r\n app[name] = appOptions[name];\r\n }\r\n });\r\n if (isFn(appOptions.onShow) && wx.onAppShow) {\r\n wx.onAppShow((...args) => {\r\n vm.__call_hook('onShow', args);\r\n });\r\n }\r\n if (isFn(appOptions.onHide) && wx.onAppHide) {\r\n wx.onAppHide((...args) => {\r\n vm.__call_hook('onHide', args);\r\n });\r\n }\r\n if (isFn(appOptions.onLaunch)) {\r\n const args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();\r\n vm.__call_hook('onLaunch', args);\r\n }\r\n return vm\r\n}\r\n\r\nfunction createPlugin (vm) {\r\n const appOptions = parseApp(vm);\r\n if (isFn(appOptions.onShow) && wx.onAppShow) {\r\n wx.onAppShow((...args) => {\r\n vm.__call_hook('onShow', args);\r\n });\r\n }\r\n if (isFn(appOptions.onHide) && wx.onAppHide) {\r\n wx.onAppHide((...args) => {\r\n vm.__call_hook('onHide', args);\r\n });\r\n }\r\n if (isFn(appOptions.onLaunch)) {\r\n const args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();\r\n vm.__call_hook('onLaunch', args);\r\n }\r\n return vm\r\n}\r\n\r\ntodos.forEach(todoApi => {\r\n protocols[todoApi] = false;\r\n});\r\n\r\ncanIUses.forEach(canIUseApi => {\r\n const apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name\r\n : canIUseApi;\r\n if (!wx.canIUse(apiName)) {\r\n protocols[canIUseApi] = false;\r\n }\r\n});\r\n\r\nlet uni = {};\r\n\r\nif (typeof Proxy !== 'undefined' && \"mp-weixin\" !== 'app-plus') {\r\n uni = new Proxy({}, {\r\n get (target, name) {\r\n if (hasOwn(target, name)) {\r\n return target[name]\r\n }\r\n if (baseApi[name]) {\r\n return baseApi[name]\r\n }\r\n if (api[name]) {\r\n return promisify(name, api[name])\r\n }\r\n {\r\n if (extraApi[name]) {\r\n return promisify(name, extraApi[name])\r\n }\r\n if (todoApis[name]) {\r\n return promisify(name, todoApis[name])\r\n }\r\n }\r\n if (eventApi[name]) {\r\n return eventApi[name]\r\n }\r\n if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {\r\n return\r\n }\r\n return promisify(name, wrapper(name, wx[name]))\r\n },\r\n set (target, name, value) {\r\n target[name] = value;\r\n return true\r\n }\r\n });\r\n} else {\r\n Object.keys(baseApi).forEach(name => {\r\n uni[name] = baseApi[name];\r\n });\r\n\r\n {\r\n Object.keys(todoApis).forEach(name => {\r\n uni[name] = promisify(name, todoApis[name]);\r\n });\r\n Object.keys(extraApi).forEach(name => {\r\n uni[name] = promisify(name, todoApis[name]);\r\n });\r\n }\r\n\r\n Object.keys(eventApi).forEach(name => {\r\n uni[name] = eventApi[name];\r\n });\r\n\r\n Object.keys(api).forEach(name => {\r\n uni[name] = promisify(name, api[name]);\r\n });\r\n\r\n Object.keys(wx).forEach(name => {\r\n if (hasOwn(wx, name) || hasOwn(protocols, name)) {\r\n uni[name] = promisify(name, wrapper(name, wx[name]));\r\n }\r\n });\r\n}\r\n\r\nwx.createApp = createApp;\r\nwx.createPage = createPage;\r\nwx.createComponent = createComponent;\r\nwx.createSubpackageApp = createSubpackageApp;\r\nwx.createPlugin = createPlugin;\r\n\r\nvar uni$1 = uni;\r\n\r\nexport default uni$1;\r\nexport { createApp, createComponent, createPage, createPlugin, createSubpackageApp };\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import Vue from 'vue'\r\nimport Vuex from 'vuex'\r\n\r\n\r\nVue.use(Vuex);\r\n\r\nimport state from './state';\r\nimport mutations from './mutations';\r\nimport actions from './actions';\r\n\r\nexport default new Vuex.Store({\r\n state,\r\n mutations,\r\n actions\r\n})\r\n","/*!\n * vuex v3.6.2\n * (c) 2021 Evan You\n * @license MIT\n */\n'use strict';\n\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar target = typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\nvar devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n }, { prepend: true });\n\n store.subscribeAction(function (action, state) {\n devtoolHook.emit('vuex:action', action, state);\n }, { prepend: true });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\nfunction find (list, f) {\n return list.filter(f)[0]\n}\n\n/**\n * Deep copy the given object considering circular structure.\n * This function caches all nested objects and its copies.\n * If it detects circular structure, use cached copy to avoid infinite loop.\n *\n * @param {*} obj\n * @param {Array} cache\n * @return {*}\n */\nfunction deepCopy (obj, cache) {\n if ( cache === void 0 ) cache = [];\n\n // just return if obj is immutable value\n if (obj === null || typeof obj !== 'object') {\n return obj\n }\n\n // if obj is hit, it is in circular structure\n var hit = find(cache, function (c) { return c.original === obj; });\n if (hit) {\n return hit.copy\n }\n\n var copy = Array.isArray(obj) ? [] : {};\n // put the copy into cache at first\n // because we want to refer it in recursive deepCopy\n cache.push({\n original: obj,\n copy: copy\n });\n\n Object.keys(obj).forEach(function (key) {\n copy[key] = deepCopy(obj[key], cache);\n });\n\n return copy\n}\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\nfunction partial (fn, arg) {\n return function () {\n return fn(arg)\n }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors = { namespaced: { configurable: true } };\n\nprototypeAccessors.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.hasChild = function hasChild (key) {\n return key in this._children\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n var child = parent.getChild(key);\n\n if (!child) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\n \"[vuex] trying to unregister module '\" + key + \"', which is \" +\n \"not registered\"\n );\n }\n return\n }\n\n if (!child.runtime) {\n return\n }\n\n parent.removeChild(key);\n};\n\nModuleCollection.prototype.isRegistered = function isRegistered (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n\n if (parent) {\n return parent.hasChild(key)\n }\n\n return false\n};\n\nfunction update (path, targetModule, newModule) {\n if ((process.env.NODE_ENV !== 'production')) {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nvar Vue; // bind on install\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #731\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Vue, \"must call Vue.use(Vuex) before creating a store instance.\");\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._watcherVM = new Vue();\n this._makeLocalGettersCache = Object.create(null);\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store vm, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreVM(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;\n if (useDevtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors$1 = { state: { configurable: true } };\n\nprototypeAccessors$1.state.get = function () {\n return this._vm._data.$$state\n};\n\nprototypeAccessors$1.state.set = function (v) {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n\n this._subscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n (process.env.NODE_ENV !== 'production') &&\n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return new Promise(function (resolve, reject) {\n result.then(function (res) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1.state); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n resolve(res);\n }, function (error) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.error; })\n .forEach(function (sub) { return sub.error(action, this$1.state, error); });\n } catch (e) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.warn(\"[vuex] error in error action subscribers: \");\n console.error(e);\n }\n }\n reject(error);\n });\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn, options) {\n return genericSubscribe(fn, this._subscribers, options)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn, options) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers, options)\n};\n\nStore.prototype.watch = function watch (getter, cb, options) {\n var this$1 = this;\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._vm._data.$$state = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreVM(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n Vue.delete(parentState, path[path.length - 1]);\n });\n resetStore(this);\n};\n\nStore.prototype.hasModule = function hasModule (path) {\n if (typeof path === 'string') { path = [path]; }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n return this._modules.isRegistered(path)\n};\n\nStore.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors$1 );\n\nfunction genericSubscribe (fn, subs, options) {\n if (subs.indexOf(fn) < 0) {\n options && options.prepend\n ? subs.unshift(fn)\n : subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset vm\n resetStoreVM(store, state, hot);\n}\n\nfunction resetStoreVM (store, state, hot) {\n var oldVm = store._vm;\n\n // bind store public getters\n store.getters = {};\n // reset local getters cache\n store._makeLocalGettersCache = Object.create(null);\n var wrappedGetters = store._wrappedGetters;\n var computed = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n // direct inline function use will lead to closure preserving oldVm.\n // using partial to return function with only arguments preserved in closure environment.\n computed[key] = partial(fn, store);\n Object.defineProperty(store.getters, key, {\n get: function () { return store._vm[key]; },\n enumerable: true // for local getters\n });\n });\n\n // use a Vue instance to store the state tree\n // suppress warnings just in case the user has added\n // some funky global mixins\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n store._vm = new Vue({\n data: {\n $$state: state\n },\n computed: computed\n });\n Vue.config.silent = silent;\n\n // enable strict mode for new vm\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldVm) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldVm._data.$$state = null;\n });\n }\n Vue.nextTick(function () { return oldVm.$destroy(); });\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n if (store._modulesNamespaceMap[namespace] && (process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate namespace \" + namespace + \" for the namespaced module \" + (path.join('/'))));\n }\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n if ((process.env.NODE_ENV !== 'production')) {\n if (moduleName in parentState) {\n console.warn(\n (\"[vuex] state field \\\"\" + moduleName + \"\\\" was overridden by a module with the same name at \\\"\" + (path.join('.')) + \"\\\"\")\n );\n }\n }\n Vue.set(parentState, moduleName, module.state);\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if ((process.env.NODE_ENV !== 'production') && !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by vm update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n if (!store._makeLocalGettersCache[namespace]) {\n var gettersProxy = {};\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n store._makeLocalGettersCache[namespace] = gettersProxy;\n }\n\n return store._makeLocalGettersCache[namespace]\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n store._vm.$watch(function () { return this._data.$$state }, function () {\n if ((process.env.NODE_ENV !== 'production')) {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, sync: true });\n}\n\nfunction getNestedState (state, path) {\n return path.reduce(function (state, key) { return state[key]; }, state)\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if ((process.env.NODE_ENV !== 'production')) {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nfunction install (_Vue) {\n if (Vue && _Vue === Vue) {\n if ((process.env.NODE_ENV !== 'production')) {\n console.error(\n '[vuex] already installed. Vue.use(Vuex) should be called only once.'\n );\n }\n return\n }\n Vue = _Vue;\n applyMixin(Vue);\n}\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(states)) {\n console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(mutations)) {\n console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(getters)) {\n console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if ((process.env.NODE_ENV !== 'production') && !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n if ((process.env.NODE_ENV !== 'production') && !isValidMap(actions)) {\n console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');\n }\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n if (!isValidMap(map)) {\n return []\n }\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Validate whether given map is valid or not\n * @param {*} map\n * @return {Boolean}\n */\nfunction isValidMap (map) {\n return Array.isArray(map) || isObject(map)\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if ((process.env.NODE_ENV !== 'production') && !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\n// Credits: borrowed code from fcomb/redux-logger\n\nfunction createLogger (ref) {\n if ( ref === void 0 ) ref = {};\n var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;\n var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };\n var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };\n var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };\n var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };\n var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };\n var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;\n var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;\n var logger = ref.logger; if ( logger === void 0 ) logger = console;\n\n return function (store) {\n var prevState = deepCopy(store.state);\n\n if (typeof logger === 'undefined') {\n return\n }\n\n if (logMutations) {\n store.subscribe(function (mutation, state) {\n var nextState = deepCopy(state);\n\n if (filter(mutation, prevState, nextState)) {\n var formattedTime = getFormattedTime();\n var formattedMutation = mutationTransformer(mutation);\n var message = \"mutation \" + (mutation.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));\n logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);\n logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));\n endMessage(logger);\n }\n\n prevState = nextState;\n });\n }\n\n if (logActions) {\n store.subscribeAction(function (action, state) {\n if (actionFilter(action, state)) {\n var formattedTime = getFormattedTime();\n var formattedAction = actionTransformer(action);\n var message = \"action \" + (action.type) + formattedTime;\n\n startMessage(logger, message, collapsed);\n logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);\n endMessage(logger);\n }\n });\n }\n }\n}\n\nfunction startMessage (logger, message, collapsed) {\n var startMessage = collapsed\n ? logger.groupCollapsed\n : logger.group;\n\n // render\n try {\n startMessage.call(logger, message);\n } catch (e) {\n logger.log(message);\n }\n}\n\nfunction endMessage (logger) {\n try {\n logger.groupEnd();\n } catch (e) {\n logger.log('—— log end ——');\n }\n}\n\nfunction getFormattedTime () {\n var time = new Date();\n return (\" @ \" + (pad(time.getHours(), 2)) + \":\" + (pad(time.getMinutes(), 2)) + \":\" + (pad(time.getSeconds(), 2)) + \".\" + (pad(time.getMilliseconds(), 3)))\n}\n\nfunction repeat (str, times) {\n return (new Array(times + 1)).join(str)\n}\n\nfunction pad (num, maxLength) {\n return repeat('0', maxLength - num.toString().length) + num\n}\n\nvar index_cjs = {\n Store: Store,\n install: install,\n version: '3.6.2',\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers,\n createLogger: createLogger\n};\n\nmodule.exports = index_cjs;\n","export default {\r\n\tuserInfo: {},\r\n};","import * as types from './mutation-types';\r\n\r\nexport default {\r\n\t[types.USER_INFO] (state, e) {\r\n\t state.userInfo = e;\r\n\t},\r\n}\r\n\r\n","import en from './en.json'\r\nimport zhHans from './zh-Hans.json'\r\nimport zhHant from './zh-Hant.json'\r\nexport default {\r\n\ten,\r\n\t'zh-Hans': zhHans,\r\n\t'zh-Hant': zhHant\r\n}\r\n","\r\nexport const USER_INFO = 'USER_INFO'; \r\n","import * as types from './mutation-types';\r\n\r\nexport default {\r\n\tsetUserInfo ({\r\n\t commit\r\n\t}, obj) {\r\n\t commit(types.USER_INFO, obj);\r\n\t},\r\n}","\r\nconst numberReg = /^-?[1-9][0-9]?.?[0-9]*$/\r\nconst intReg = /^-?[1-9][0-9]*$/\r\nconst phoneReg = /^1[0-9]{10,10}$/\r\nconst emailReg = /^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/\r\nconst pwdReg = /^.{6,16}$/\r\nconst inviteCodeReg = /^[a-zA-Z0-9]{6,16}$/\r\n\r\nexport default {\r\n\tisNumber: function(val) {\r\n\t\treturn numberReg.test(val)\r\n\t},\r\n\tisInt: function(val) {\r\n\t\treturn intReg.test(val)\r\n\t},\r\n\tisPhone: function(val) {\r\n\t\treturn phoneReg.test(val)\r\n\t},\r\n\tisEmail: function(val) {\r\n\t\treturn emailReg.test(val)\r\n\t},\r\n\tisPwd: function(val) {\r\n\t\treturn pwdReg.test(val)\r\n\t},\r\n\tisInviteCode: function(val) {\r\n\t\treturn inviteCodeReg.test(val)\r\n\t},\r\n\tvalidate: function(data, rules) {\r\n\t\tlet res = { isOk: true, errmsg: '' }\r\n\t\tif (!rules || !rules.length) {\r\n\t\t\treturn res\r\n\t\t}\r\n\t\tfor (let rule of rules) {\r\n\t\t\t// rule: {name:'', type:'', errmsg:'', min:1, max:2, eq:'', required:Boolean, regex:''}\r\n\t\t\tif (!rule || !rule.name || !rule.type) {\r\n\t\t\t\tcontinue\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// 如果值不存在\r\n\t\t\tif (!data[rule.name]) {\r\n\t\t\t\t// 如果是必填项就返回错误提示,required可以作为type是为了不同的type能给用户不同的提示\r\n\t\t\t\tif (rule.type === 'required' || rule.required) {\r\n\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\tif (!res.errmsg) {\r\n\t\t\t\t\t\tres.errmsg = '请正确输入所有数据' //默认提示\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn res\r\n\t\t\t\t}\r\n\t\t\t\t// 如果不是必填项就跳过\r\n\t\t\t\tcontinue\r\n\t\t\t}\r\n\t\t\tswitch (rule.type) {\r\n\t\t\t\t// required 上面已经判断过了\r\n\t\t\t\tcase 'equals':\r\n\t\t\t\tcase 'eq':\r\n\t\t\t\t\tif (data[rule.name] !== data[rule.eqName]) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\tif (!numberReg.test(data[rule.name])) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'int':\r\n\t\t\t\t\tif (!intReg.test(data[rule.name])) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'phone':\r\n\t\t\t\t\tif (!phoneReg.test(data[rule.name])) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'email':\r\n\t\t\t\t\tif (!emailReg.test(data[rule.name])) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'pwd':\r\n\t\t\t\t\tif (!pwdReg.test(data[rule.name])) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'inviteCode':\r\n\t\t\t\t\tif (!inviteCodeReg.test(data[rule.name])) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'range': // 数字类型的值取值范围\r\n\t\t\t\t\t// {name: 'xxx', type: 'range', min: 6, max: 6, required: true, errmsg: 'xxx'}\r\n\t\t\t\t\tlet val = data[rule.name]\r\n\t\t\t\t\tif (val) {\r\n\t\t\t\t\t\tif (numberReg.test(val)) {\r\n\t\t\t\t\t\t\tif (rule.min && val < rule.min) {\r\n\t\t\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t\t\t} else if (rule.max && val > rule.max) {\r\n\t\t\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'lengthRange': // 字符串长度取值范围\r\n\t\t\t\t\t// {name: 'xxx', type: 'lengthRange', min: 6, max: 6, errmsg: 'xxx'}\r\n\t\t\t\t\tlet le = data[rule.name] ? data[rule.name].length : 0\r\n\t\t\t\t\tif (rule.min && le < rule.min) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t} else if (rule.max && le > rule.max) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t\tcase 'regex': // 自定义正则表达式\r\n\t\t\t\t\t// {name: 'xxx', type: 'regex', regex: /^1[0-9]{10,10}$/, errmsg: 'xxx'}\r\n\t\t\t\t\tif (rule.regex && !rule.regex.test(data[rule.name])) {\r\n\t\t\t\t\t\tres = { isOk: false, errmsg: rule.errmsg }\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t\t// 发现任何一个错误就立即返回,后面的不再判断\r\n\t\t\tif (!res.isOk) {\r\n\t\t\t\tif (!res.errmsg) {\r\n\t\t\t\t\tres.errmsg = '请正确输入所有数据' //默认提示\r\n\t\t\t\t}\r\n\t\t\t\treturn res\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res\r\n\t}\r\n}","import en from './en.json'\r\nimport zhHans from './zh-Hans.json'\r\nimport zhHant from './zh-Hant.json'\r\nexport default {\r\n\ten,\r\n\t'zh-Hans': zhHans,\r\n\t'zh-Hant': zhHant\r\n}\r\n","\texport default {\r\n\t\t/**\r\n\t\t * opt object | string\r\n\t\t * to_url object | string\r\n\t\t * 例:\r\n\t\t * this.Tips('/pages/test/test'); 跳转不提示\r\n\t\t * this.Tips({title:'提示'},'/pages/test/test'); 提示并跳转\r\n\t\t * this.Tips({title:'提示'},{tab:1,url:'/pages/index/index'}); 提示并跳转值table上\r\n\t\t * tab=1 一定时间后跳转至 table上\r\n\t\t * tab=2 一定时间后跳转至非 table上\r\n\t\t * tab=3 一定时间后返回上页面\r\n\t\t * tab=4 关闭所有页面跳转至非table上\r\n\t\t * tab=5 关闭当前页面跳转至table上\r\n\t\t */\r\n\t\tTips: function(opt, to_url) {\r\n\t\t\tif (typeof opt == 'string') {\r\n\t\t\t\tto_url = opt;\r\n\t\t\t\topt = {};\r\n\t\t\t}\r\n\t\t\tlet title = opt.title || '',\r\n\t\t\t\ticon = opt.icon || 'none',\r\n\t\t\t\tendtime = opt.endtime || 2000,\r\n\t\t\t\tsuccess = opt.success;\r\n\t\t\tif (title) uni.showToast({\r\n\t\t\t\ttitle: title,\r\n\t\t\t\ticon: icon,\r\n\t\t\t\tduration: endtime,\r\n\t\t\t\tsuccess\r\n\t\t\t})\r\n\t\t\tif (to_url != undefined) {\r\n\t\t\t\tif (typeof to_url == 'object') {\r\n\t\t\t\t\tlet tab = to_url.tab || 1,\r\n\t\t\t\t\t\turl = to_url.url || '';\r\n\t\t\t\t\tswitch (tab) {\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\t//一定时间后跳转至 table\r\n\t\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\t\tuni.switchTab({\r\n\t\t\t\t\t\t\t\t\turl: url\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}, endtime);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\t//跳转至非table页面\r\n\t\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\t\t\turl: url,\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}, endtime);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\t\t//返回上页面\r\n\t\t\t\t\t\t\tsetTimeout(function() {\r\n\r\n\t\t\t\t\t\t\t\tuni.navigateBack({\r\n\t\t\t\t\t\t\t\t\tdelta: parseInt(url),\r\n\t\t\t\t\t\t\t\t})\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t}, endtime);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\t\t//关闭当前所有页面跳转至非table页面\r\n\t\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\t\tuni.reLaunch({\r\n\t\t\t\t\t\t\t\t\turl: url,\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}, endtime);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 5:\r\n\t\t\t\t\t\t\t//关闭当前页面跳转至非table页面\r\n\t\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\t\tuni.redirectTo({\r\n\t\t\t\t\t\t\t\t\turl: url,\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}, endtime);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t} else if (typeof to_url == 'function') {\r\n\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\tto_url && to_url();\r\n\t\t\t\t\t}, endtime);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//没有提示时跳转不延迟\r\n\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\t\turl: to_url,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}, title ? endtime : 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\r\n\t\t/**\r\n\t\t * 移除数组中的某个数组并组成新的数组返回\r\n\t\t * @param array array 需要移除的数组\r\n\t\t * @param int index 需要移除的数组的键值\r\n\t\t * @param string | int 值\r\n\t\t * @return array\r\n\t\t * \r\n\t\t */\r\n\t\tArrayRemove: function(array, index, value) {\r\n\t\t\tconst valueArray = [];\r\n\t\t\tif (array instanceof Array) {\r\n\t\t\t\tfor (let i = 0; i < array.length; i++) {\r\n\t\t\t\t\tif (typeof index == 'number' && array[index] != i) {\r\n\t\t\t\t\t\tvalueArray.push(array[i]);\r\n\t\t\t\t\t} else if (typeof index == 'string' && array[i][index] != value) {\r\n\t\t\t\t\t\tvalueArray.push(array[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn valueArray;\r\n\t\t},\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * 合并数组\r\n\t\t */\r\n\t\tSplitArray(list, sp) {\r\n\t\t\tif (typeof list != 'object') return [];\r\n\t\t\tif (sp === undefined) sp = [];\r\n\t\t\tfor (var i = 0; i < list.length; i++) {\r\n\t\t\t\tsp.push(list[i]);\r\n\t\t\t}\r\n\t\t\treturn sp;\r\n\t\t},\r\n\t\t\r\n\t\ttrim(str) {\r\n\t\t\treturn String.prototype.trim.call(str);\r\n\t\t},\r\n\t\t\r\n\t\ttoStringValue: function(obj) {\r\n\t\t\tif (obj instanceof Array) {\r\n\t\t\t\tvar arr = [];\r\n\t\t\t\tfor (var i = 0; i < obj.length; i++) {\r\n\t\t\t\t\tarr[i] = toStringValue(obj[i]);\r\n\t\t\t\t}\r\n\t\t\t\treturn arr;\r\n\t\t\t} else if (typeof obj == 'object') {\r\n\t\t\t\tfor (var p in obj) {\r\n\t\t\t\t\tobj[p] = toStringValue(obj[p]);\r\n\t\t\t\t}\r\n\t\t\t} else if (typeof obj == 'number') {\r\n\t\t\t\tobj = obj + '';\r\n\t\t\t}\r\n\t\t\treturn obj;\r\n\t\t},\r\n\t\r\n\t\tshowModal: (title=\"\",infor=\"\", fnSure = () =>{}, fnCancel= () =>{}) => {\r\n\t\t\tuni.showModal({\r\n\t\t\t title,\r\n\t\t\t content: infor,\r\n\t\t\t\t\tshowCancel: false, // 不显示取消按钮\r\n\t\t\t success: function (res) {\r\n\t\t\t if (res.confirm) {\r\n\t\t\t fnSure(fn)\r\n\t\t\t } else if (res.cancel) {\r\n\t\t\t fnCancel(fn)\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\t// 验证是否已登录\r\n\t\tcheckLogin: ()=>{\r\n\t\t\tlet userNum = uni.getStorageSync('userNum');\r\n\t\t\tif(!userNum){\r\n\t\t\t\treturn false //未登陆\r\n\t\t\t}else{\r\n\t\t\t\treturn true //已登录\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\t// 获取地址\r\n\t\tgetAdress: (fn = () =>{})=>{\r\n\t\t\treturn new Promise((resolve,reject) =>{\r\n\t\t\t\tuni.getLocation({\r\n\t\t\t\t type: 'wgs84',\r\n\t\t\t\t success: function (res) {\r\n\t\t\t\t\t\t console.log('获取位置成功:', res)\r\n\t\t\t\t\t\t getApp().globalData.latitude = res.latitude;\r\n\t\t\t\t\t\t getApp().globalData.longitude = res.longitude;\r\n\t\t\t\t },\r\n\t\t\t\t\tfail:function(err){\r\n\t\t\t\t\t\t\t//点击取消\r\n\t\t\t\t\t\tif(err.errMsg.indexOf('auth denied') > -1 || err.errMsg.indexOf('auth deny') > -1 ){\r\n\t\t\t\t\t\t\tconsole.log('用户点击取消授权:',err)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//手机未开启GPS定位\r\n\t\t\t\t\t\telse if(err.errMsg.indexOf('ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF') > -1){\r\n\t\t\t\t\t\t\tconsole.log('用户手机未开启GPS:',err)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tconsole.log(err)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treject()\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t})\r\n\t\t},\r\n\t\t\r\n\t\tsetStorage: (key, data)=>{\r\n\t\t\tuni.setStorageSync({\r\n\t\t\t\tkey,\r\n\t\t\t\tdata,\r\n\t\t\t\tsuccess: function() {\r\n\t\t\t\t\tconsole.log(key + \"已储存\");\r\n\t\t\t\t},\r\n\t\t\t\tfail: function() {\r\n\t\t\t\t\tconsole.log(key + \"未储存\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\r\n\r\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import en from './en.json'\r\nimport zhHans from './zh-Hans.json'\r\nimport zhHant from './zh-Hant.json'\r\nexport default {\r\n\ten,\r\n\t'zh-Hans': zhHans,\r\n\t'zh-Hant': zhHant\r\n}\r\n","export default {\n \"id\": \"2852637\",\n \"name\": \"uniui图标库\",\n \"font_family\": \"uniicons\",\n \"css_prefix_text\": \"uniui-\",\n \"description\": \"\",\n \"glyphs\": [\n {\n \"icon_id\": \"25027049\",\n \"name\": \"yanse\",\n \"font_class\": \"color\",\n \"unicode\": \"e6cf\",\n \"unicode_decimal\": 59087\n },\n {\n \"icon_id\": \"25027048\",\n \"name\": \"wallet\",\n \"font_class\": \"wallet\",\n \"unicode\": \"e6b1\",\n \"unicode_decimal\": 59057\n },\n {\n \"icon_id\": \"25015720\",\n \"name\": \"settings-filled\",\n \"font_class\": \"settings-filled\",\n \"unicode\": \"e6ce\",\n \"unicode_decimal\": 59086\n },\n {\n \"icon_id\": \"25015434\",\n \"name\": \"shimingrenzheng-filled\",\n \"font_class\": \"auth-filled\",\n \"unicode\": \"e6cc\",\n \"unicode_decimal\": 59084\n },\n {\n \"icon_id\": \"24934246\",\n \"name\": \"shop-filled\",\n \"font_class\": \"shop-filled\",\n \"unicode\": \"e6cd\",\n \"unicode_decimal\": 59085\n },\n {\n \"icon_id\": \"24934159\",\n \"name\": \"staff-filled-01\",\n \"font_class\": \"staff-filled\",\n \"unicode\": \"e6cb\",\n \"unicode_decimal\": 59083\n },\n {\n \"icon_id\": \"24932461\",\n \"name\": \"VIP-filled\",\n \"font_class\": \"vip-filled\",\n \"unicode\": \"e6c6\",\n \"unicode_decimal\": 59078\n },\n {\n \"icon_id\": \"24932462\",\n \"name\": \"plus_circle_fill\",\n \"font_class\": \"plus-filled\",\n \"unicode\": \"e6c7\",\n \"unicode_decimal\": 59079\n },\n {\n \"icon_id\": \"24932463\",\n \"name\": \"folder_add-filled\",\n \"font_class\": \"folder-add-filled\",\n \"unicode\": \"e6c8\",\n \"unicode_decimal\": 59080\n },\n {\n \"icon_id\": \"24932464\",\n \"name\": \"yanse-filled\",\n \"font_class\": \"color-filled\",\n \"unicode\": \"e6c9\",\n \"unicode_decimal\": 59081\n },\n {\n \"icon_id\": \"24932465\",\n \"name\": \"tune-filled\",\n \"font_class\": \"tune-filled\",\n \"unicode\": \"e6ca\",\n \"unicode_decimal\": 59082\n },\n {\n \"icon_id\": \"24932455\",\n \"name\": \"a-rilidaka-filled\",\n \"font_class\": \"calendar-filled\",\n \"unicode\": \"e6c0\",\n \"unicode_decimal\": 59072\n },\n {\n \"icon_id\": \"24932456\",\n \"name\": \"notification-filled\",\n \"font_class\": \"notification-filled\",\n \"unicode\": \"e6c1\",\n \"unicode_decimal\": 59073\n },\n {\n \"icon_id\": \"24932457\",\n \"name\": \"wallet-filled\",\n \"font_class\": \"wallet-filled\",\n \"unicode\": \"e6c2\",\n \"unicode_decimal\": 59074\n },\n {\n \"icon_id\": \"24932458\",\n \"name\": \"paihangbang-filled\",\n \"font_class\": \"medal-filled\",\n \"unicode\": \"e6c3\",\n \"unicode_decimal\": 59075\n },\n {\n \"icon_id\": \"24932459\",\n \"name\": \"gift-filled\",\n \"font_class\": \"gift-filled\",\n \"unicode\": \"e6c4\",\n \"unicode_decimal\": 59076\n },\n {\n \"icon_id\": \"24932460\",\n \"name\": \"fire-filled\",\n \"font_class\": \"fire-filled\",\n \"unicode\": \"e6c5\",\n \"unicode_decimal\": 59077\n },\n {\n \"icon_id\": \"24928001\",\n \"name\": \"refreshempty\",\n \"font_class\": \"refreshempty\",\n \"unicode\": \"e6bf\",\n \"unicode_decimal\": 59071\n },\n {\n \"icon_id\": \"24926853\",\n \"name\": \"location-ellipse\",\n \"font_class\": \"location-filled\",\n \"unicode\": \"e6af\",\n \"unicode_decimal\": 59055\n },\n {\n \"icon_id\": \"24926735\",\n \"name\": \"person-filled\",\n \"font_class\": \"person-filled\",\n \"unicode\": \"e69d\",\n \"unicode_decimal\": 59037\n },\n {\n \"icon_id\": \"24926703\",\n \"name\": \"personadd-filled\",\n \"font_class\": \"personadd-filled\",\n \"unicode\": \"e698\",\n \"unicode_decimal\": 59032\n },\n {\n \"icon_id\": \"24923351\",\n \"name\": \"back\",\n \"font_class\": \"back\",\n \"unicode\": \"e6b9\",\n \"unicode_decimal\": 59065\n },\n {\n \"icon_id\": \"24923352\",\n \"name\": \"forward\",\n \"font_class\": \"forward\",\n \"unicode\": \"e6ba\",\n \"unicode_decimal\": 59066\n },\n {\n \"icon_id\": \"24923353\",\n \"name\": \"arrowthinright\",\n \"font_class\": \"arrow-right\",\n \"unicode\": \"e6bb\",\n \"unicode_decimal\": 59067\n },\n\t\t{\n\t\t \"icon_id\": \"24923353\",\n\t\t \"name\": \"arrowthinright\",\n\t\t \"font_class\": \"arrowthinright\",\n\t\t \"unicode\": \"e6bb\",\n\t\t \"unicode_decimal\": 59067\n\t\t},\n {\n \"icon_id\": \"24923354\",\n \"name\": \"arrowthinleft\",\n \"font_class\": \"arrow-left\",\n \"unicode\": \"e6bc\",\n \"unicode_decimal\": 59068\n },\n\t\t{\n\t\t \"icon_id\": \"24923354\",\n\t\t \"name\": \"arrowthinleft\",\n\t\t \"font_class\": \"arrowthinleft\",\n\t\t \"unicode\": \"e6bc\",\n\t\t \"unicode_decimal\": 59068\n\t\t},\n {\n \"icon_id\": \"24923355\",\n \"name\": \"arrowthinup\",\n \"font_class\": \"arrow-up\",\n \"unicode\": \"e6bd\",\n \"unicode_decimal\": 59069\n },\n\t\t{\n\t\t \"icon_id\": \"24923355\",\n\t\t \"name\": \"arrowthinup\",\n\t\t \"font_class\": \"arrowthinup\",\n\t\t \"unicode\": \"e6bd\",\n\t\t \"unicode_decimal\": 59069\n\t\t},\n {\n \"icon_id\": \"24923356\",\n \"name\": \"arrowthindown\",\n \"font_class\": \"arrow-down\",\n \"unicode\": \"e6be\",\n \"unicode_decimal\": 59070\n },{\n \"icon_id\": \"24923356\",\n \"name\": \"arrowthindown\",\n \"font_class\": \"arrowthindown\",\n \"unicode\": \"e6be\",\n \"unicode_decimal\": 59070\n },\n {\n \"icon_id\": \"24923349\",\n \"name\": \"arrowdown\",\n \"font_class\": \"bottom\",\n \"unicode\": \"e6b8\",\n \"unicode_decimal\": 59064\n },{\n \"icon_id\": \"24923349\",\n \"name\": \"arrowdown\",\n \"font_class\": \"arrowdown\",\n \"unicode\": \"e6b8\",\n \"unicode_decimal\": 59064\n },\n {\n \"icon_id\": \"24923346\",\n \"name\": \"arrowright\",\n \"font_class\": \"right\",\n \"unicode\": \"e6b5\",\n \"unicode_decimal\": 59061\n },\n\t\t{\n\t\t \"icon_id\": \"24923346\",\n\t\t \"name\": \"arrowright\",\n\t\t \"font_class\": \"arrowright\",\n\t\t \"unicode\": \"e6b5\",\n\t\t \"unicode_decimal\": 59061\n\t\t},\n {\n \"icon_id\": \"24923347\",\n \"name\": \"arrowup\",\n \"font_class\": \"top\",\n \"unicode\": \"e6b6\",\n \"unicode_decimal\": 59062\n },\n\t\t{\n\t\t \"icon_id\": \"24923347\",\n\t\t \"name\": \"arrowup\",\n\t\t \"font_class\": \"arrowup\",\n\t\t \"unicode\": \"e6b6\",\n\t\t \"unicode_decimal\": 59062\n\t\t},\n {\n \"icon_id\": \"24923348\",\n \"name\": \"arrowleft\",\n \"font_class\": \"left\",\n \"unicode\": \"e6b7\",\n \"unicode_decimal\": 59063\n },\n\t\t{\n\t\t \"icon_id\": \"24923348\",\n\t\t \"name\": \"arrowleft\",\n\t\t \"font_class\": \"arrowleft\",\n\t\t \"unicode\": \"e6b7\",\n\t\t \"unicode_decimal\": 59063\n\t\t},\n {\n \"icon_id\": \"24923334\",\n \"name\": \"eye\",\n \"font_class\": \"eye\",\n \"unicode\": \"e651\",\n \"unicode_decimal\": 58961\n },\n {\n \"icon_id\": \"24923335\",\n \"name\": \"eye-filled\",\n \"font_class\": \"eye-filled\",\n \"unicode\": \"e66a\",\n \"unicode_decimal\": 58986\n },\n {\n \"icon_id\": \"24923336\",\n \"name\": \"eye-slash\",\n \"font_class\": \"eye-slash\",\n \"unicode\": \"e6b3\",\n \"unicode_decimal\": 59059\n },\n {\n \"icon_id\": \"24923337\",\n \"name\": \"eye-slash-filled\",\n \"font_class\": \"eye-slash-filled\",\n \"unicode\": \"e6b4\",\n \"unicode_decimal\": 59060\n },\n {\n \"icon_id\": \"24923305\",\n \"name\": \"info-filled\",\n \"font_class\": \"info-filled\",\n \"unicode\": \"e649\",\n \"unicode_decimal\": 58953\n },\n {\n \"icon_id\": \"24923299\",\n \"name\": \"reload-01\",\n \"font_class\": \"reload\",\n \"unicode\": \"e6b2\",\n \"unicode_decimal\": 59058\n },\n {\n \"icon_id\": \"24923195\",\n \"name\": \"mic_slash_fill\",\n \"font_class\": \"micoff-filled\",\n \"unicode\": \"e6b0\",\n \"unicode_decimal\": 59056\n },\n {\n \"icon_id\": \"24923165\",\n \"name\": \"map-pin-ellipse\",\n \"font_class\": \"map-pin-ellipse\",\n \"unicode\": \"e6ac\",\n \"unicode_decimal\": 59052\n },\n {\n \"icon_id\": \"24923166\",\n \"name\": \"map-pin\",\n \"font_class\": \"map-pin\",\n \"unicode\": \"e6ad\",\n \"unicode_decimal\": 59053\n },\n {\n \"icon_id\": \"24923167\",\n \"name\": \"location\",\n \"font_class\": \"location\",\n \"unicode\": \"e6ae\",\n \"unicode_decimal\": 59054\n },\n {\n \"icon_id\": \"24923064\",\n \"name\": \"starhalf\",\n \"font_class\": \"starhalf\",\n \"unicode\": \"e683\",\n \"unicode_decimal\": 59011\n },\n {\n \"icon_id\": \"24923065\",\n \"name\": \"star\",\n \"font_class\": \"star\",\n \"unicode\": \"e688\",\n \"unicode_decimal\": 59016\n },\n {\n \"icon_id\": \"24923066\",\n \"name\": \"star-filled\",\n \"font_class\": \"star-filled\",\n \"unicode\": \"e68f\",\n \"unicode_decimal\": 59023\n },\n {\n \"icon_id\": \"24899646\",\n \"name\": \"a-rilidaka\",\n \"font_class\": \"calendar\",\n \"unicode\": \"e6a0\",\n \"unicode_decimal\": 59040\n },\n {\n \"icon_id\": \"24899647\",\n \"name\": \"fire\",\n \"font_class\": \"fire\",\n \"unicode\": \"e6a1\",\n \"unicode_decimal\": 59041\n },\n {\n \"icon_id\": \"24899648\",\n \"name\": \"paihangbang\",\n \"font_class\": \"medal\",\n \"unicode\": \"e6a2\",\n \"unicode_decimal\": 59042\n },\n {\n \"icon_id\": \"24899649\",\n \"name\": \"font\",\n \"font_class\": \"font\",\n \"unicode\": \"e6a3\",\n \"unicode_decimal\": 59043\n },\n {\n \"icon_id\": \"24899650\",\n \"name\": \"gift\",\n \"font_class\": \"gift\",\n \"unicode\": \"e6a4\",\n \"unicode_decimal\": 59044\n },\n {\n \"icon_id\": \"24899651\",\n \"name\": \"link\",\n \"font_class\": \"link\",\n \"unicode\": \"e6a5\",\n \"unicode_decimal\": 59045\n },\n {\n \"icon_id\": \"24899652\",\n \"name\": \"notification\",\n \"font_class\": \"notification\",\n \"unicode\": \"e6a6\",\n \"unicode_decimal\": 59046\n },\n {\n \"icon_id\": \"24899653\",\n \"name\": \"staff\",\n \"font_class\": \"staff\",\n \"unicode\": \"e6a7\",\n \"unicode_decimal\": 59047\n },\n {\n \"icon_id\": \"24899654\",\n \"name\": \"VIP\",\n \"font_class\": \"vip\",\n \"unicode\": \"e6a8\",\n \"unicode_decimal\": 59048\n },\n {\n \"icon_id\": \"24899655\",\n \"name\": \"folder_add\",\n \"font_class\": \"folder-add\",\n \"unicode\": \"e6a9\",\n \"unicode_decimal\": 59049\n },\n {\n \"icon_id\": \"24899656\",\n \"name\": \"tune\",\n \"font_class\": \"tune\",\n \"unicode\": \"e6aa\",\n \"unicode_decimal\": 59050\n },\n {\n \"icon_id\": \"24899657\",\n \"name\": \"shimingrenzheng\",\n \"font_class\": \"auth\",\n \"unicode\": \"e6ab\",\n \"unicode_decimal\": 59051\n },\n {\n \"icon_id\": \"24899565\",\n \"name\": \"person\",\n \"font_class\": \"person\",\n \"unicode\": \"e699\",\n \"unicode_decimal\": 59033\n },\n {\n \"icon_id\": \"24899566\",\n \"name\": \"email-filled\",\n \"font_class\": \"email-filled\",\n \"unicode\": \"e69a\",\n \"unicode_decimal\": 59034\n },\n {\n \"icon_id\": \"24899567\",\n \"name\": \"phone-filled\",\n \"font_class\": \"phone-filled\",\n \"unicode\": \"e69b\",\n \"unicode_decimal\": 59035\n },\n {\n \"icon_id\": \"24899568\",\n \"name\": \"phone\",\n \"font_class\": \"phone\",\n \"unicode\": \"e69c\",\n \"unicode_decimal\": 59036\n },\n {\n \"icon_id\": \"24899570\",\n \"name\": \"email\",\n \"font_class\": \"email\",\n \"unicode\": \"e69e\",\n \"unicode_decimal\": 59038\n },\n {\n \"icon_id\": \"24899571\",\n \"name\": \"personadd\",\n \"font_class\": \"personadd\",\n \"unicode\": \"e69f\",\n \"unicode_decimal\": 59039\n },\n {\n \"icon_id\": \"24899558\",\n \"name\": \"chatboxes-filled\",\n \"font_class\": \"chatboxes-filled\",\n \"unicode\": \"e692\",\n \"unicode_decimal\": 59026\n },\n {\n \"icon_id\": \"24899559\",\n \"name\": \"contact\",\n \"font_class\": \"contact\",\n \"unicode\": \"e693\",\n \"unicode_decimal\": 59027\n },\n {\n \"icon_id\": \"24899560\",\n \"name\": \"chatbubble-filled\",\n \"font_class\": \"chatbubble-filled\",\n \"unicode\": \"e694\",\n \"unicode_decimal\": 59028\n },\n {\n \"icon_id\": \"24899561\",\n \"name\": \"contact-filled\",\n \"font_class\": \"contact-filled\",\n \"unicode\": \"e695\",\n \"unicode_decimal\": 59029\n },\n {\n \"icon_id\": \"24899562\",\n \"name\": \"chatboxes\",\n \"font_class\": \"chatboxes\",\n \"unicode\": \"e696\",\n \"unicode_decimal\": 59030\n },\n {\n \"icon_id\": \"24899563\",\n \"name\": \"chatbubble\",\n \"font_class\": \"chatbubble\",\n \"unicode\": \"e697\",\n \"unicode_decimal\": 59031\n },\n {\n \"icon_id\": \"24881290\",\n \"name\": \"upload-filled\",\n \"font_class\": \"upload-filled\",\n \"unicode\": \"e68e\",\n \"unicode_decimal\": 59022\n },\n {\n \"icon_id\": \"24881292\",\n \"name\": \"upload\",\n \"font_class\": \"upload\",\n \"unicode\": \"e690\",\n \"unicode_decimal\": 59024\n },\n {\n \"icon_id\": \"24881293\",\n \"name\": \"weixin\",\n \"font_class\": \"weixin\",\n \"unicode\": \"e691\",\n \"unicode_decimal\": 59025\n },\n {\n \"icon_id\": \"24881274\",\n \"name\": \"compose\",\n \"font_class\": \"compose\",\n \"unicode\": \"e67f\",\n \"unicode_decimal\": 59007\n },\n {\n \"icon_id\": \"24881275\",\n \"name\": \"qq\",\n \"font_class\": \"qq\",\n \"unicode\": \"e680\",\n \"unicode_decimal\": 59008\n },\n {\n \"icon_id\": \"24881276\",\n \"name\": \"download-filled\",\n \"font_class\": \"download-filled\",\n \"unicode\": \"e681\",\n \"unicode_decimal\": 59009\n },\n {\n \"icon_id\": \"24881277\",\n \"name\": \"pengyouquan\",\n \"font_class\": \"pyq\",\n \"unicode\": \"e682\",\n \"unicode_decimal\": 59010\n },\n {\n \"icon_id\": \"24881279\",\n \"name\": \"sound\",\n \"font_class\": \"sound\",\n \"unicode\": \"e684\",\n \"unicode_decimal\": 59012\n },\n {\n \"icon_id\": \"24881280\",\n \"name\": \"trash-filled\",\n \"font_class\": \"trash-filled\",\n \"unicode\": \"e685\",\n \"unicode_decimal\": 59013\n },\n {\n \"icon_id\": \"24881281\",\n \"name\": \"sound-filled\",\n \"font_class\": \"sound-filled\",\n \"unicode\": \"e686\",\n \"unicode_decimal\": 59014\n },\n {\n \"icon_id\": \"24881282\",\n \"name\": \"trash\",\n \"font_class\": \"trash\",\n \"unicode\": \"e687\",\n \"unicode_decimal\": 59015\n },\n {\n \"icon_id\": \"24881284\",\n \"name\": \"videocam-filled\",\n \"font_class\": \"videocam-filled\",\n \"unicode\": \"e689\",\n \"unicode_decimal\": 59017\n },\n {\n \"icon_id\": \"24881285\",\n \"name\": \"spinner-cycle\",\n \"font_class\": \"spinner-cycle\",\n \"unicode\": \"e68a\",\n \"unicode_decimal\": 59018\n },\n {\n \"icon_id\": \"24881286\",\n \"name\": \"weibo\",\n \"font_class\": \"weibo\",\n \"unicode\": \"e68b\",\n \"unicode_decimal\": 59019\n },\n {\n \"icon_id\": \"24881288\",\n \"name\": \"videocam\",\n \"font_class\": \"videocam\",\n \"unicode\": \"e68c\",\n \"unicode_decimal\": 59020\n },\n {\n \"icon_id\": \"24881289\",\n \"name\": \"download\",\n \"font_class\": \"download\",\n \"unicode\": \"e68d\",\n \"unicode_decimal\": 59021\n },\n {\n \"icon_id\": \"24879601\",\n \"name\": \"help\",\n \"font_class\": \"help\",\n \"unicode\": \"e679\",\n \"unicode_decimal\": 59001\n },\n {\n \"icon_id\": \"24879602\",\n \"name\": \"navigate-filled\",\n \"font_class\": \"navigate-filled\",\n \"unicode\": \"e67a\",\n \"unicode_decimal\": 59002\n },\n {\n \"icon_id\": \"24879603\",\n \"name\": \"plusempty\",\n \"font_class\": \"plusempty\",\n \"unicode\": \"e67b\",\n \"unicode_decimal\": 59003\n },\n {\n \"icon_id\": \"24879604\",\n \"name\": \"smallcircle\",\n \"font_class\": \"smallcircle\",\n \"unicode\": \"e67c\",\n \"unicode_decimal\": 59004\n },\n {\n \"icon_id\": \"24879605\",\n \"name\": \"minus-filled\",\n \"font_class\": \"minus-filled\",\n \"unicode\": \"e67d\",\n \"unicode_decimal\": 59005\n },\n {\n \"icon_id\": \"24879606\",\n \"name\": \"micoff\",\n \"font_class\": \"micoff\",\n \"unicode\": \"e67e\",\n \"unicode_decimal\": 59006\n },\n {\n \"icon_id\": \"24879588\",\n \"name\": \"closeempty\",\n \"font_class\": \"closeempty\",\n \"unicode\": \"e66c\",\n \"unicode_decimal\": 58988\n },\n {\n \"icon_id\": \"24879589\",\n \"name\": \"clear\",\n \"font_class\": \"clear\",\n \"unicode\": \"e66d\",\n \"unicode_decimal\": 58989\n },\n {\n \"icon_id\": \"24879590\",\n \"name\": \"navigate\",\n \"font_class\": \"navigate\",\n \"unicode\": \"e66e\",\n \"unicode_decimal\": 58990\n },\n {\n \"icon_id\": \"24879591\",\n \"name\": \"minus\",\n \"font_class\": \"minus\",\n \"unicode\": \"e66f\",\n \"unicode_decimal\": 58991\n },\n {\n \"icon_id\": \"24879592\",\n \"name\": \"image\",\n \"font_class\": \"image\",\n \"unicode\": \"e670\",\n \"unicode_decimal\": 58992\n },\n {\n \"icon_id\": \"24879593\",\n \"name\": \"mic\",\n \"font_class\": \"mic\",\n \"unicode\": \"e671\",\n \"unicode_decimal\": 58993\n },\n {\n \"icon_id\": \"24879594\",\n \"name\": \"paperplane\",\n \"font_class\": \"paperplane\",\n \"unicode\": \"e672\",\n \"unicode_decimal\": 58994\n },\n {\n \"icon_id\": \"24879595\",\n \"name\": \"close\",\n \"font_class\": \"close\",\n \"unicode\": \"e673\",\n \"unicode_decimal\": 58995\n },\n {\n \"icon_id\": \"24879596\",\n \"name\": \"help-filled\",\n \"font_class\": \"help-filled\",\n \"unicode\": \"e674\",\n \"unicode_decimal\": 58996\n },\n {\n \"icon_id\": \"24879597\",\n \"name\": \"plus-filled\",\n \"font_class\": \"paperplane-filled\",\n \"unicode\": \"e675\",\n \"unicode_decimal\": 58997\n },\n {\n \"icon_id\": \"24879598\",\n \"name\": \"plus\",\n \"font_class\": \"plus\",\n \"unicode\": \"e676\",\n \"unicode_decimal\": 58998\n },\n {\n \"icon_id\": \"24879599\",\n \"name\": \"mic-filled\",\n \"font_class\": \"mic-filled\",\n \"unicode\": \"e677\",\n \"unicode_decimal\": 58999\n },\n {\n \"icon_id\": \"24879600\",\n \"name\": \"image-filled\",\n \"font_class\": \"image-filled\",\n \"unicode\": \"e678\",\n \"unicode_decimal\": 59000\n },\n {\n \"icon_id\": \"24855900\",\n \"name\": \"locked-filled\",\n \"font_class\": \"locked-filled\",\n \"unicode\": \"e668\",\n \"unicode_decimal\": 58984\n },\n {\n \"icon_id\": \"24855901\",\n \"name\": \"info\",\n \"font_class\": \"info\",\n \"unicode\": \"e669\",\n \"unicode_decimal\": 58985\n },\n {\n \"icon_id\": \"24855903\",\n \"name\": \"locked\",\n \"font_class\": \"locked\",\n \"unicode\": \"e66b\",\n \"unicode_decimal\": 58987\n },\n {\n \"icon_id\": \"24855884\",\n \"name\": \"camera-filled\",\n \"font_class\": \"camera-filled\",\n \"unicode\": \"e658\",\n \"unicode_decimal\": 58968\n },\n {\n \"icon_id\": \"24855885\",\n \"name\": \"chat-filled\",\n \"font_class\": \"chat-filled\",\n \"unicode\": \"e659\",\n \"unicode_decimal\": 58969\n },\n {\n \"icon_id\": \"24855886\",\n \"name\": \"camera\",\n \"font_class\": \"camera\",\n \"unicode\": \"e65a\",\n \"unicode_decimal\": 58970\n },\n {\n \"icon_id\": \"24855887\",\n \"name\": \"circle\",\n \"font_class\": \"circle\",\n \"unicode\": \"e65b\",\n \"unicode_decimal\": 58971\n },\n {\n \"icon_id\": \"24855888\",\n \"name\": \"checkmarkempty\",\n \"font_class\": \"checkmarkempty\",\n \"unicode\": \"e65c\",\n \"unicode_decimal\": 58972\n },\n {\n \"icon_id\": \"24855889\",\n \"name\": \"chat\",\n \"font_class\": \"chat\",\n \"unicode\": \"e65d\",\n \"unicode_decimal\": 58973\n },\n {\n \"icon_id\": \"24855890\",\n \"name\": \"circle-filled\",\n \"font_class\": \"circle-filled\",\n \"unicode\": \"e65e\",\n \"unicode_decimal\": 58974\n },\n {\n \"icon_id\": \"24855891\",\n \"name\": \"flag\",\n \"font_class\": \"flag\",\n \"unicode\": \"e65f\",\n \"unicode_decimal\": 58975\n },\n {\n \"icon_id\": \"24855892\",\n \"name\": \"flag-filled\",\n \"font_class\": \"flag-filled\",\n \"unicode\": \"e660\",\n \"unicode_decimal\": 58976\n },\n {\n \"icon_id\": \"24855893\",\n \"name\": \"gear-filled\",\n \"font_class\": \"gear-filled\",\n \"unicode\": \"e661\",\n \"unicode_decimal\": 58977\n },\n {\n \"icon_id\": \"24855894\",\n \"name\": \"home\",\n \"font_class\": \"home\",\n \"unicode\": \"e662\",\n \"unicode_decimal\": 58978\n },\n {\n \"icon_id\": \"24855895\",\n \"name\": \"home-filled\",\n \"font_class\": \"home-filled\",\n \"unicode\": \"e663\",\n \"unicode_decimal\": 58979\n },\n {\n \"icon_id\": \"24855896\",\n \"name\": \"gear\",\n \"font_class\": \"gear\",\n \"unicode\": \"e664\",\n \"unicode_decimal\": 58980\n },\n {\n \"icon_id\": \"24855897\",\n \"name\": \"smallcircle-filled\",\n \"font_class\": \"smallcircle-filled\",\n \"unicode\": \"e665\",\n \"unicode_decimal\": 58981\n },\n {\n \"icon_id\": \"24855898\",\n \"name\": \"map-filled\",\n \"font_class\": \"map-filled\",\n \"unicode\": \"e666\",\n \"unicode_decimal\": 58982\n },\n {\n \"icon_id\": \"24855899\",\n \"name\": \"map\",\n \"font_class\": \"map\",\n \"unicode\": \"e667\",\n \"unicode_decimal\": 58983\n },\n {\n \"icon_id\": \"24855825\",\n \"name\": \"refresh-filled\",\n \"font_class\": \"refresh-filled\",\n \"unicode\": \"e656\",\n \"unicode_decimal\": 58966\n },\n {\n \"icon_id\": \"24855826\",\n \"name\": \"refresh\",\n \"font_class\": \"refresh\",\n \"unicode\": \"e657\",\n \"unicode_decimal\": 58967\n },\n {\n \"icon_id\": \"24855808\",\n \"name\": \"cloud-upload\",\n \"font_class\": \"cloud-upload\",\n \"unicode\": \"e645\",\n \"unicode_decimal\": 58949\n },\n {\n \"icon_id\": \"24855809\",\n \"name\": \"cloud-download-filled\",\n \"font_class\": \"cloud-download-filled\",\n \"unicode\": \"e646\",\n \"unicode_decimal\": 58950\n },\n {\n \"icon_id\": \"24855810\",\n \"name\": \"cloud-download\",\n \"font_class\": \"cloud-download\",\n \"unicode\": \"e647\",\n \"unicode_decimal\": 58951\n },\n {\n \"icon_id\": \"24855811\",\n \"name\": \"cloud-upload-filled\",\n \"font_class\": \"cloud-upload-filled\",\n \"unicode\": \"e648\",\n \"unicode_decimal\": 58952\n },\n {\n \"icon_id\": \"24855813\",\n \"name\": \"redo\",\n \"font_class\": \"redo\",\n \"unicode\": \"e64a\",\n \"unicode_decimal\": 58954\n },\n {\n \"icon_id\": \"24855814\",\n \"name\": \"images-filled\",\n \"font_class\": \"images-filled\",\n \"unicode\": \"e64b\",\n \"unicode_decimal\": 58955\n },\n {\n \"icon_id\": \"24855815\",\n \"name\": \"undo-filled\",\n \"font_class\": \"undo-filled\",\n \"unicode\": \"e64c\",\n \"unicode_decimal\": 58956\n },\n {\n \"icon_id\": \"24855816\",\n \"name\": \"more\",\n \"font_class\": \"more\",\n \"unicode\": \"e64d\",\n \"unicode_decimal\": 58957\n },\n {\n \"icon_id\": \"24855817\",\n \"name\": \"more-filled\",\n \"font_class\": \"more-filled\",\n \"unicode\": \"e64e\",\n \"unicode_decimal\": 58958\n },\n {\n \"icon_id\": \"24855818\",\n \"name\": \"undo\",\n \"font_class\": \"undo\",\n \"unicode\": \"e64f\",\n \"unicode_decimal\": 58959\n },\n {\n \"icon_id\": \"24855819\",\n \"name\": \"images\",\n \"font_class\": \"images\",\n \"unicode\": \"e650\",\n \"unicode_decimal\": 58960\n },\n {\n \"icon_id\": \"24855821\",\n \"name\": \"paperclip\",\n \"font_class\": \"paperclip\",\n \"unicode\": \"e652\",\n \"unicode_decimal\": 58962\n },\n {\n \"icon_id\": \"24855822\",\n \"name\": \"settings\",\n \"font_class\": \"settings\",\n \"unicode\": \"e653\",\n \"unicode_decimal\": 58963\n },\n {\n \"icon_id\": \"24855823\",\n \"name\": \"search\",\n \"font_class\": \"search\",\n \"unicode\": \"e654\",\n \"unicode_decimal\": 58964\n },\n {\n \"icon_id\": \"24855824\",\n \"name\": \"redo-filled\",\n \"font_class\": \"redo-filled\",\n \"unicode\": \"e655\",\n \"unicode_decimal\": 58965\n },\n {\n \"icon_id\": \"24841702\",\n \"name\": \"list\",\n \"font_class\": \"list\",\n \"unicode\": \"e644\",\n \"unicode_decimal\": 58948\n },\n {\n \"icon_id\": \"24841489\",\n \"name\": \"mail-open-filled\",\n \"font_class\": \"mail-open-filled\",\n \"unicode\": \"e63a\",\n \"unicode_decimal\": 58938\n },\n {\n \"icon_id\": \"24841491\",\n \"name\": \"hand-thumbsdown-filled\",\n \"font_class\": \"hand-down-filled\",\n \"unicode\": \"e63c\",\n \"unicode_decimal\": 58940\n },\n {\n \"icon_id\": \"24841492\",\n \"name\": \"hand-thumbsdown\",\n \"font_class\": \"hand-down\",\n \"unicode\": \"e63d\",\n \"unicode_decimal\": 58941\n },\n {\n \"icon_id\": \"24841493\",\n \"name\": \"hand-thumbsup-filled\",\n \"font_class\": \"hand-up-filled\",\n \"unicode\": \"e63e\",\n \"unicode_decimal\": 58942\n },\n {\n \"icon_id\": \"24841494\",\n \"name\": \"hand-thumbsup\",\n \"font_class\": \"hand-up\",\n \"unicode\": \"e63f\",\n \"unicode_decimal\": 58943\n },\n {\n \"icon_id\": \"24841496\",\n \"name\": \"heart-filled\",\n \"font_class\": \"heart-filled\",\n \"unicode\": \"e641\",\n \"unicode_decimal\": 58945\n },\n {\n \"icon_id\": \"24841498\",\n \"name\": \"mail-open\",\n \"font_class\": \"mail-open\",\n \"unicode\": \"e643\",\n \"unicode_decimal\": 58947\n },\n {\n \"icon_id\": \"24841488\",\n \"name\": \"heart\",\n \"font_class\": \"heart\",\n \"unicode\": \"e639\",\n \"unicode_decimal\": 58937\n },\n {\n \"icon_id\": \"24839963\",\n \"name\": \"loop\",\n \"font_class\": \"loop\",\n \"unicode\": \"e633\",\n \"unicode_decimal\": 58931\n },\n {\n \"icon_id\": \"24839866\",\n \"name\": \"pulldown\",\n \"font_class\": \"pulldown\",\n \"unicode\": \"e632\",\n \"unicode_decimal\": 58930\n },\n {\n \"icon_id\": \"24813798\",\n \"name\": \"scan\",\n \"font_class\": \"scan\",\n \"unicode\": \"e62a\",\n \"unicode_decimal\": 58922\n },\n {\n \"icon_id\": \"24813786\",\n \"name\": \"bars\",\n \"font_class\": \"bars\",\n \"unicode\": \"e627\",\n \"unicode_decimal\": 58919\n },\n {\n \"icon_id\": \"24813788\",\n \"name\": \"cart-filled\",\n \"font_class\": \"cart-filled\",\n \"unicode\": \"e629\",\n \"unicode_decimal\": 58921\n },\n {\n \"icon_id\": \"24813790\",\n \"name\": \"checkbox\",\n \"font_class\": \"checkbox\",\n \"unicode\": \"e62b\",\n \"unicode_decimal\": 58923\n },\n {\n \"icon_id\": \"24813791\",\n \"name\": \"checkbox-filled\",\n \"font_class\": \"checkbox-filled\",\n \"unicode\": \"e62c\",\n \"unicode_decimal\": 58924\n },\n {\n \"icon_id\": \"24813794\",\n \"name\": \"shop\",\n \"font_class\": \"shop\",\n \"unicode\": \"e62f\",\n \"unicode_decimal\": 58927\n },\n {\n \"icon_id\": \"24813795\",\n \"name\": \"headphones\",\n \"font_class\": \"headphones\",\n \"unicode\": \"e630\",\n \"unicode_decimal\": 58928\n },\n {\n \"icon_id\": \"24813796\",\n \"name\": \"cart\",\n \"font_class\": \"cart\",\n \"unicode\": \"e631\",\n \"unicode_decimal\": 58929\n }\n ]\n}\n","class Calendar {\r\n\tconstructor({\r\n\t\tdate,\r\n\t\tselected,\r\n\t\tstartDate,\r\n\t\tendDate,\r\n\t\trange,\r\n\t\t// multipleStatus\r\n\t} = {}) {\r\n\t\t// 当前日期\r\n\t\tthis.date = this.getDate(new Date()) // 当前初入日期\r\n\t\t// 打点信息\r\n\t\tthis.selected = selected || [];\r\n\t\t// 范围开始\r\n\t\tthis.startDate = startDate\r\n\t\t// 范围结束\r\n\t\tthis.endDate = endDate\r\n\t\tthis.range = range\r\n\t\t// 多选状态\r\n\t\tthis.cleanMultipleStatus()\r\n\t\t// 每周日期\r\n\t\tthis.weeks = {}\r\n\t\t// this._getWeek(this.date.fullDate)\r\n\t\t// this.multipleStatus = multipleStatus\r\n\t\tthis.lastHover = false\r\n\t}\r\n\t/**\r\n\t * 设置日期\r\n\t * @param {Object} date\r\n\t */\r\n\tsetDate(date) {\r\n\t\tthis.selectDate = this.getDate(date)\r\n\t\tthis._getWeek(this.selectDate.fullDate)\r\n\t}\r\n\r\n\t/**\r\n\t * 清理多选状态\r\n\t */\r\n\tcleanMultipleStatus() {\r\n\t\tthis.multipleStatus = {\r\n\t\t\tbefore: '',\r\n\t\t\tafter: '',\r\n\t\t\tdata: []\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * 重置开始日期\r\n\t */\r\n\tresetSatrtDate(startDate) {\r\n\t\t// 范围开始\r\n\t\tthis.startDate = startDate\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * 重置结束日期\r\n\t */\r\n\tresetEndDate(endDate) {\r\n\t\t// 范围结束\r\n\t\tthis.endDate = endDate\r\n\t}\r\n\r\n\t/**\r\n\t * 获取任意时间\r\n\t */\r\n\tgetDate(date, AddDayCount = 0, str = 'day') {\r\n\t\tif (!date) {\r\n\t\t\tdate = new Date()\r\n\t\t}\r\n\t\tif (typeof date !== 'object') {\r\n\t\t\tdate = date.replace(/-/g, '/')\r\n\t\t}\r\n\t\tconst dd = new Date(date)\r\n\t\tswitch (str) {\r\n\t\t\tcase 'day':\r\n\t\t\t\tdd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期\r\n\t\t\t\tbreak\r\n\t\t\tcase 'month':\r\n\t\t\t\tif (dd.getDate() === 31) {\r\n\t\t\t\t\tdd.setDate(dd.getDate() + AddDayCount)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期\r\n\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\tcase 'year':\r\n\t\t\t\tdd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期\r\n\t\t\t\tbreak\r\n\t\t}\r\n\t\tconst y = dd.getFullYear()\r\n\t\tconst m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0\r\n\t\tconst d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0\r\n\t\treturn {\r\n\t\t\tfullDate: y + '-' + m + '-' + d,\r\n\t\t\tyear: y,\r\n\t\t\tmonth: m,\r\n\t\t\tdate: d,\r\n\t\t\tday: dd.getDay()\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * 获取上月剩余天数\r\n\t */\r\n\t_getLastMonthDays(firstDay, full) {\r\n\t\tlet dateArr = []\r\n\t\tfor (let i = firstDay; i > 0; i--) {\r\n\t\t\tconst beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()\r\n\t\t\tdateArr.push({\r\n\t\t\t\tdate: beforeDate,\r\n\t\t\t\tmonth: full.month - 1,\r\n\t\t\t\tdisable: true\r\n\t\t\t})\r\n\t\t}\r\n\t\treturn dateArr\r\n\t}\r\n\t/**\r\n\t * 获取本月天数\r\n\t */\r\n\t_currentMonthDys(dateData, full) {\r\n\t\tlet dateArr = []\r\n\t\tlet fullDate = this.date.fullDate\r\n\t\tfor (let i = 1; i <= dateData; i++) {\r\n\t\t\tlet isinfo = false\r\n\t\t\tlet nowDate = full.year + '-' + (full.month < 10 ?\r\n\t\t\t\tfull.month : full.month) + '-' + (i < 10 ?\r\n\t\t\t\t'0' + i : i)\r\n\t\t\t// 是否今天\r\n\t\t\tlet isDay = fullDate === nowDate\r\n\t\t\t// 获取打点信息\r\n\t\t\tlet info = this.selected && this.selected.find((item) => {\r\n\t\t\t\tif (this.dateEqual(nowDate, item.date)) {\r\n\t\t\t\t\treturn item\r\n\t\t\t\t}\r\n\t\t\t})\r\n\r\n\t\t\t// 日期禁用\r\n\t\t\tlet disableBefore = true\r\n\t\t\tlet disableAfter = true\r\n\t\t\tif (this.startDate) {\r\n\t\t\t\t// let dateCompBefore = this.dateCompare(this.startDate, fullDate)\r\n\t\t\t\t// disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)\r\n\t\t\t\tdisableBefore = this.dateCompare(this.startDate, nowDate)\r\n\t\t\t}\r\n\r\n\t\t\tif (this.endDate) {\r\n\t\t\t\t// let dateCompAfter = this.dateCompare(fullDate, this.endDate)\r\n\t\t\t\t// disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)\r\n\t\t\t\tdisableAfter = this.dateCompare(nowDate, this.endDate)\r\n\t\t\t}\r\n\t\t\tlet multiples = this.multipleStatus.data\r\n\t\t\tlet checked = false\r\n\t\t\tlet multiplesStatus = -1\r\n\t\t\tif (this.range) {\r\n\t\t\t\tif (multiples) {\r\n\t\t\t\t\tmultiplesStatus = multiples.findIndex((item) => {\r\n\t\t\t\t\t\treturn this.dateEqual(item, nowDate)\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\tif (multiplesStatus !== -1) {\r\n\t\t\t\t\tchecked = true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlet data = {\r\n\t\t\t\tfullDate: nowDate,\r\n\t\t\t\tyear: full.year,\r\n\t\t\t\tdate: i,\r\n\t\t\t\tmultiple: this.range ? checked : false,\r\n\t\t\t\tbeforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after),\r\n\t\t\t\tafterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after),\r\n\t\t\t\tmonth: full.month,\r\n\t\t\t\tdisable: !(disableBefore && disableAfter),\r\n\t\t\t\tisDay,\r\n\t\t\t\tuserChecked: false\r\n\t\t\t}\r\n\t\t\tif (info) {\r\n\t\t\t\tdata.extraInfo = info\r\n\t\t\t}\r\n\r\n\t\t\tdateArr.push(data)\r\n\t\t}\r\n\t\treturn dateArr\r\n\t}\r\n\t/**\r\n\t * 获取下月天数\r\n\t */\r\n\t_getNextMonthDays(surplus, full) {\r\n\t\tlet dateArr = []\r\n\t\tfor (let i = 1; i < surplus + 1; i++) {\r\n\t\t\tdateArr.push({\r\n\t\t\t\tdate: i,\r\n\t\t\t\tmonth: Number(full.month) + 1,\r\n\t\t\t\tdisable: true\r\n\t\t\t})\r\n\t\t}\r\n\t\treturn dateArr\r\n\t}\r\n\r\n\t/**\r\n\t * 获取当前日期详情\r\n\t * @param {Object} date\r\n\t */\r\n\tgetInfo(date) {\r\n\t\tif (!date) {\r\n\t\t\tdate = new Date()\r\n\t\t}\r\n\t\tconst dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)\r\n\t\treturn dateInfo\r\n\t}\r\n\r\n\t/**\r\n\t * 比较时间大小\r\n\t */\r\n\tdateCompare(startDate, endDate) {\r\n\t\t// 计算截止时间\r\n\t\tstartDate = new Date(startDate.replace('-', '/').replace('-', '/'))\r\n\t\t// 计算详细项的截止时间\r\n\t\tendDate = new Date(endDate.replace('-', '/').replace('-', '/'))\r\n\t\tif (startDate <= endDate) {\r\n\t\t\treturn true\r\n\t\t} else {\r\n\t\t\treturn false\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * 比较时间是否相等\r\n\t */\r\n\tdateEqual(before, after) {\r\n\t\t// 计算截止时间\r\n\t\tbefore = new Date(before.replace('-', '/').replace('-', '/'))\r\n\t\t// 计算详细项的截止时间\r\n\t\tafter = new Date(after.replace('-', '/').replace('-', '/'))\r\n\t\tif (before.getTime() - after.getTime() === 0) {\r\n\t\t\treturn true\r\n\t\t} else {\r\n\t\t\treturn false\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * 比较真实起始日期\r\n\t */\r\n\r\n\tisLogicBefore(currentDay, before, after) {\r\n\t\tlet logicBefore = before\r\n\t\tif (before && after) {\r\n\t\t\tlogicBefore = this.dateCompare(before, after) ? before : after\r\n\t\t}\r\n\t\treturn this.dateEqual(logicBefore, currentDay)\r\n\t}\r\n\r\n\tisLogicAfter(currentDay, before, after) {\r\n\t\tlet logicAfter = after\r\n\t\tif (before && after) {\r\n\t\t\tlogicAfter = this.dateCompare(before, after) ? after : before\r\n\t\t}\r\n\t\treturn this.dateEqual(logicAfter, currentDay)\r\n\t}\r\n\r\n\t/**\r\n\t * 获取日期范围内所有日期\r\n\t * @param {Object} begin\r\n\t * @param {Object} end\r\n\t */\r\n\tgeDateAll(begin, end) {\r\n\t\tvar arr = []\r\n\t\tvar ab = begin.split('-')\r\n\t\tvar ae = end.split('-')\r\n\t\tvar db = new Date()\r\n\t\tdb.setFullYear(ab[0], ab[1] - 1, ab[2])\r\n\t\tvar de = new Date()\r\n\t\tde.setFullYear(ae[0], ae[1] - 1, ae[2])\r\n\t\tvar unixDb = db.getTime() - 24 * 60 * 60 * 1000\r\n\t\tvar unixDe = de.getTime() - 24 * 60 * 60 * 1000\r\n\t\tfor (var k = unixDb; k <= unixDe;) {\r\n\t\t\tk = k + 24 * 60 * 60 * 1000\r\n\t\t\tarr.push(this.getDate(new Date(parseInt(k))).fullDate)\r\n\t\t}\r\n\t\treturn arr\r\n\t}\r\n\r\n\t/**\r\n\t * 获取多选状态\r\n\t */\r\n\tsetMultiple(fullDate) {\r\n\t\tlet {\r\n\t\t\tbefore,\r\n\t\t\tafter\r\n\t\t} = this.multipleStatus\r\n\t\tif (!this.range) return\r\n\t\tif (before && after) {\r\n\t\t\tif (!this.lastHover) {\r\n\t\t\t\tthis.lastHover = true\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tthis.multipleStatus.before = fullDate\r\n\t\t\tthis.multipleStatus.after = ''\r\n\t\t\tthis.multipleStatus.data = []\r\n\t\t\tthis.multipleStatus.fulldate = ''\r\n\t\t\tthis.lastHover = false\r\n\t\t} else {\r\n\t\t\tif (!before) {\r\n\t\t\t\tthis.multipleStatus.before = fullDate\r\n\t\t\t\tthis.lastHover = false\r\n\t\t\t} else {\r\n\t\t\t\tthis.multipleStatus.after = fullDate\r\n\t\t\t\tif (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {\r\n\t\t\t\t\tthis.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus\r\n\t\t\t\t\t\t.after);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus\r\n\t\t\t\t\t\t.before);\r\n\t\t\t\t}\r\n\t\t\t\tthis.lastHover = true\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._getWeek(fullDate)\r\n\t}\r\n\r\n\t/**\r\n\t * 鼠标 hover 更新多选状态\r\n\t */\r\n\tsetHoverMultiple(fullDate) {\r\n\t\tlet {\r\n\t\t\tbefore,\r\n\t\t\tafter\r\n\t\t} = this.multipleStatus\r\n\r\n\t\tif (!this.range) return\r\n\t\tif (this.lastHover) return\r\n\r\n\t\tif (!before) {\r\n\t\t\tthis.multipleStatus.before = fullDate\r\n\t\t} else {\r\n\t\t\tthis.multipleStatus.after = fullDate\r\n\t\t\tif (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {\r\n\t\t\t\tthis.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);\r\n\t\t\t} else {\r\n\t\t\t\tthis.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._getWeek(fullDate)\r\n\t}\r\n\r\n\t/**\r\n\t * 更新默认值多选状态\r\n\t */\r\n\tsetDefaultMultiple(before, after) {\r\n\t\tthis.multipleStatus.before = before\r\n\t\tthis.multipleStatus.after = after\r\n\t\tif (before && after) {\r\n\t\t\tif (this.dateCompare(before, after)) {\r\n\t\t\t\tthis.multipleStatus.data = this.geDateAll(before, after);\r\n\t\t\t\tthis._getWeek(after)\r\n\t\t\t} else {\r\n\t\t\t\tthis.multipleStatus.data = this.geDateAll(after, before);\r\n\t\t\t\tthis._getWeek(before)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * 获取每周数据\r\n\t * @param {Object} dateData\r\n\t */\r\n\t_getWeek(dateData) {\r\n\t\tconst {\r\n\t\t\tfullDate,\r\n\t\t\tyear,\r\n\t\t\tmonth,\r\n\t\t\tdate,\r\n\t\t\tday\r\n\t\t} = this.getDate(dateData)\r\n\t\tlet firstDay = new Date(year, month - 1, 1).getDay()\r\n\t\tlet currentDay = new Date(year, month, 0).getDate()\r\n\t\tlet dates = {\r\n\t\t\tlastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天\r\n\t\t\tcurrentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数\r\n\t\t\tnextMonthDays: [], // 下个月开始几天\r\n\t\t\tweeks: []\r\n\t\t}\r\n\t\tlet canlender = []\r\n\t\tconst surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)\r\n\t\tdates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))\r\n\t\tcanlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)\r\n\t\tlet weeks = {}\r\n\t\t// 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天\r\n\t\tfor (let i = 0; i < canlender.length; i++) {\r\n\t\t\tif (i % 7 === 0) {\r\n\t\t\t\tweeks[parseInt(i / 7)] = new Array(7)\r\n\t\t\t}\r\n\t\t\tweeks[parseInt(i / 7)][i % 7] = canlender[i]\r\n\t\t}\r\n\t\tthis.canlender = canlender\r\n\t\tthis.weeks = weeks\r\n\t}\r\n\r\n\t//静态方法\r\n\t// static init(date) {\r\n\t// \tif (!this.instance) {\r\n\t// \t\tthis.instance = new Calendar(date);\r\n\t// \t}\r\n\t// \treturn this.instance;\r\n\t// }\r\n}\r\n\r\n\r\nexport default Calendar\r\n","// import http from '../../request/request.js'\r\n\r\n\r\n// // 单独导出(测试接口)\r\n// export const test = (data) => {\r\n// return http.post('/ajax/echo/text',data)\r\n// }\r\n\r\n// // 获取banner\r\n// export const getByArea = (data) =>{\r\n// \treturn http.get('/basic/area-banner/get-by-area',data)\r\n// } \r\n","import http from '@/common/js/request/request.js'\r\n\r\nexport const login = (data) => {\r\n return http.post('/test_auth/user/login', data, 'json')\r\n}\r\n\r\nexport const getUserInfo = (data) => {\r\n return http.get('/test_auth/user/info', data)\r\n}\r\n","import{initVueI18n as e}from\"@dcloudio/uni-i18n\";\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self&&self;function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error(\"Dynamic requires are not currently supported by @rollup/plugin-commonjs\")}(null==t&&n.path)}},n.exports),n.exports}var s=n((function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},o=s.lib={},r=o.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty(\"init\")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(\"toString\")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=o.WordArray=r.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,s=this.sigBytes,o=e.sigBytes;if(this.clamp(),s%4)for(var r=0;r>>2]>>>24-r%4*8&255;t[s+r>>>2]|=i<<24-(s+r)%4*8}else for(r=0;r>>2]=n[r>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,s=[],o=function(t){t=t;var n=987654321,s=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&s)<<16)+(t=18e3*(65535&t)+(t>>16)&s)&s;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}},r=0;r>>2]>>>24-o%4*8&255;s.push((r>>>4).toString(16)),s.push((15&r).toString(16))}return s.join(\"\")},parse:function(e){for(var t=e.length,n=[],s=0;s>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new i.init(n,t/2)}},u=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,s=[],o=0;o>>2]>>>24-o%4*8&255;s.push(String.fromCharCode(r))}return s.join(\"\")},parse:function(e){for(var t=e.length,n=[],s=0;s>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new i.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error(\"Malformed UTF-8 data\")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},h=o.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){\"string\"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,s=n.words,o=n.sigBytes,r=this.blockSize,a=o/(4*r),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*r,u=e.min(4*c,o);if(c){for(var l=0;l>>24)|4278255360&(o<<24|o>>>8)}var r=this._hash.words,i=e[t+0],c=e[t+1],f=e[t+2],p=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],_=e[t+7],w=e[t+8],k=e[t+9],S=e[t+10],v=e[t+11],T=e[t+12],A=e[t+13],P=e[t+14],I=e[t+15],O=r[0],b=r[1],C=r[2],E=r[3];O=u(O,b,C,E,i,7,a[0]),E=u(E,O,b,C,c,12,a[1]),C=u(C,E,O,b,f,17,a[2]),b=u(b,C,E,O,p,22,a[3]),O=u(O,b,C,E,g,7,a[4]),E=u(E,O,b,C,m,12,a[5]),C=u(C,E,O,b,y,17,a[6]),b=u(b,C,E,O,_,22,a[7]),O=u(O,b,C,E,w,7,a[8]),E=u(E,O,b,C,k,12,a[9]),C=u(C,E,O,b,S,17,a[10]),b=u(b,C,E,O,v,22,a[11]),O=u(O,b,C,E,T,7,a[12]),E=u(E,O,b,C,A,12,a[13]),C=u(C,E,O,b,P,17,a[14]),O=l(O,b=u(b,C,E,O,I,22,a[15]),C,E,c,5,a[16]),E=l(E,O,b,C,y,9,a[17]),C=l(C,E,O,b,v,14,a[18]),b=l(b,C,E,O,i,20,a[19]),O=l(O,b,C,E,m,5,a[20]),E=l(E,O,b,C,S,9,a[21]),C=l(C,E,O,b,I,14,a[22]),b=l(b,C,E,O,g,20,a[23]),O=l(O,b,C,E,k,5,a[24]),E=l(E,O,b,C,P,9,a[25]),C=l(C,E,O,b,p,14,a[26]),b=l(b,C,E,O,w,20,a[27]),O=l(O,b,C,E,A,5,a[28]),E=l(E,O,b,C,f,9,a[29]),C=l(C,E,O,b,_,14,a[30]),O=h(O,b=l(b,C,E,O,T,20,a[31]),C,E,m,4,a[32]),E=h(E,O,b,C,w,11,a[33]),C=h(C,E,O,b,v,16,a[34]),b=h(b,C,E,O,P,23,a[35]),O=h(O,b,C,E,c,4,a[36]),E=h(E,O,b,C,g,11,a[37]),C=h(C,E,O,b,_,16,a[38]),b=h(b,C,E,O,S,23,a[39]),O=h(O,b,C,E,A,4,a[40]),E=h(E,O,b,C,i,11,a[41]),C=h(C,E,O,b,p,16,a[42]),b=h(b,C,E,O,y,23,a[43]),O=h(O,b,C,E,k,4,a[44]),E=h(E,O,b,C,T,11,a[45]),C=h(C,E,O,b,I,16,a[46]),O=d(O,b=h(b,C,E,O,f,23,a[47]),C,E,i,6,a[48]),E=d(E,O,b,C,_,10,a[49]),C=d(C,E,O,b,P,15,a[50]),b=d(b,C,E,O,m,21,a[51]),O=d(O,b,C,E,T,6,a[52]),E=d(E,O,b,C,p,10,a[53]),C=d(C,E,O,b,S,15,a[54]),b=d(b,C,E,O,c,21,a[55]),O=d(O,b,C,E,w,6,a[56]),E=d(E,O,b,C,I,10,a[57]),C=d(C,E,O,b,y,15,a[58]),b=d(b,C,E,O,A,21,a[59]),O=d(O,b,C,E,g,6,a[60]),E=d(E,O,b,C,v,10,a[61]),C=d(C,E,O,b,f,15,a[62]),b=d(b,C,E,O,k,21,a[63]),r[0]=r[0]+O|0,r[1]=r[1]+b|0,r[2]=r[2]+C|0,r[3]=r[3]+E|0},_doFinalize:function(){var t=this._data,n=t.words,s=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var r=e.floor(s/4294967296),i=s;n[15+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,c=a.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,s,o,r,i){var a=e+(t&n|~t&s)+o+i;return(a<>>32-r)+t}function l(e,t,n,s,o,r,i){var a=e+(t&s|n&~s)+o+i;return(a<>>32-r)+t}function h(e,t,n,s,o,r,i){var a=e+(t^n^s)+o+i;return(a<>>32-r)+t}function d(e,t,n,s,o,r,i){var a=e+(n^(t|~s))+o+i;return(a<>>32-r)+t}t.MD5=r._createHelper(c),t.HmacMD5=r._createHmacHelper(c)}(Math),n.MD5)})),n((function(e,t){var n,o,r;e.exports=(o=(n=s).lib.Base,r=n.enc.Utf8,void(n.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,\"string\"==typeof t&&(t=r.parse(t));var n=e.blockSize,s=4*n;t.sigBytes>s&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),i=this._iKey=t.clone(),a=o.words,c=i.words,u=0;u{w.indexOf(n)>-1&&function(e,t,n){let s=k[e][t];s||(s=k[e][t]=[]),-1===s.indexOf(n)&&\"function\"==typeof n&&s.push(n)}(e,n,t[n])}))}function v(e,t){k[e]||(k[e]={}),u(t)?Object.keys(t).forEach((n=>{w.indexOf(n)>-1&&function(e,t,n){const s=k[e][t];if(!s)return;const o=s.indexOf(n);o>-1&&s.splice(o,1)}(e,n,t[n])})):delete k[e]}function T(e,t){return e&&0!==e.length?e.reduce(((e,n)=>e.then((()=>n(t)))),Promise.resolve()):Promise.resolve()}function A(e,t){return k[e]&&k[e][t]||[]}const P=_(\"_globalUniCloudListener\"),I=\"response\",O=\"clientdb\",b=\"cloudfunction\",C=\"cloudobject\";function E(e){return P[e]||(P[e]=[]),P[e]}function U(e,t){const n=E(e);for(let e=0;es?Promise.resolve():T(A(t,\"invoke\"),n))).then((()=>e.call(this,n))).then((e=>s?Promise.resolve(e):T(A(t,\"success\"),e).then((()=>T(A(t,\"complete\"),e))).then((()=>(o&&U(I,{type:b,content:e}),Promise.resolve(e))))),(e=>s?Promise.reject(e):T(A(t,\"fail\"),e).then((()=>T(A(t,\"complete\"),e))).then((()=>(U(I,{type:b,content:e}),Promise.reject(e))))));if(!(n.success||n.fail||n.complete))return a;a.then((e=>{n.success&&n.success(e),n.complete&&n.complete(e),o&&U(I,{type:b,content:e})}),(e=>{n.fail&&n.fail(e),n.complete&&n.complete(e),o&&U(I,{type:b,content:e})}))}:function(t){if(!((t=t||{}).success||t.fail||t.complete))return e.call(this,t);e.call(this,t).then((e=>{t.success&&t.success(e),t.complete&&t.complete(e)}),(e=>{t.fail&&t.fail(e),t.complete&&t.complete(e)}))}}class x extends Error{constructor(e){super(e.message),this.errMsg=e.message||\"\",this.errCode=this.code=e.code||\"SYSTEM_ERROR\",this.requestId=e.requestId}}function D(){let e;try{if(uni.getLaunchOptionsSync){if(uni.getLaunchOptionsSync.toString().indexOf(\"not yet implemented\")>-1)return;const{scene:t,channel:n}=uni.getLaunchOptionsSync();e=t||n}}catch(e){}return e}let q;function L(){const e=uni.getLocale&&uni.getLocale()||\"en\";if(q)return{...q,locale:e,LOCALE:e};const t=uni.getSystemInfoSync(),{deviceId:n,platform:s,osName:o,uniPlatform:r,appId:i}=t;return q={PLATFORM:r||d,OS:o||s,APPID:i||m,DEVICEID:n,channel:D(),...t},{...q,locale:e,LOCALE:e}}var F={sign:function(e,t){let n=\"\";return Object.keys(e).sort().forEach((function(t){e[t]&&(n=n+\"&\"+t+\"=\"+e[t])})),n=n.slice(1),o(n,t).toString()},wrappedRequest:function(e,t){return new Promise(((n,s)=>{t(Object.assign(e,{complete(e){e||(e={}),h&&\"h5\"===d&&e.errMsg&&0===e.errMsg.indexOf(\"request:fail\")&&console.warn(\"发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5\");const t=e.data&&e.data.header&&e.data.header[\"x-serverless-request-id\"]||e.header&&e.header[\"request-id\"];if(!e.statusCode||e.statusCode>=400)return s(new x({code:\"SYS_ERR\",message:e.errMsg||\"request:fail\",requestId:t}));const o=e.data;if(o.error)return s(new x({code:o.error.code,message:o.error.message,requestId:t}));o.result=o.data,o.requestId=t,delete o.data,n(o)}}))}))}};var N={request:e=>uni.request(e),uploadFile:e=>uni.uploadFile(e),setStorageSync:(e,t)=>uni.setStorageSync(e,t),getStorageSync:e=>uni.getStorageSync(e),removeStorageSync:e=>uni.removeStorageSync(e),clearStorageSync:()=>uni.clearStorageSync()},M={\"uniCloud.init.paramRequired\":\"{param} required\",\"uniCloud.uploadFile.fileError\":\"filePath should be instance of File\"};const{t:j}=e({\"zh-Hans\":{\"uniCloud.init.paramRequired\":\"缺少参数:{param}\",\"uniCloud.uploadFile.fileError\":\"filePath应为File对象\"},\"zh-Hant\":{\"uniCloud.init.paramRequired\":\"缺少参数:{param}\",\"uniCloud.uploadFile.fileError\":\"filePath应为File对象\"},en:M,fr:{\"uniCloud.init.paramRequired\":\"{param} required\",\"uniCloud.uploadFile.fileError\":\"filePath should be instance of File\"},es:{\"uniCloud.init.paramRequired\":\"{param} required\",\"uniCloud.uploadFile.fileError\":\"filePath should be instance of File\"},ja:M},\"zh-Hans\");var $=class{constructor(e){[\"spaceId\",\"clientSecret\"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(j(\"uniCloud.init.paramRequired\",{param:t}))})),this.config=Object.assign({},{endpoint:\"https://api.bspapp.com\"},e),this.config.provider=\"aliyun\",this.config.requestUrl=this.config.endpoint+\"/client\",this.config.envType=this.config.envType||\"public\",this.config.accessTokenKey=\"access_token_\"+this.config.spaceId,this.adapter=N,this._getAccessTokenPromise=null,this._getAccessTokenPromiseStatus=null}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){this.accessToken=e}requestWrapped(e){return F.wrappedRequest(e,this.adapter.request)}requestAuth(e){return this.requestWrapped(e)}request(e,t){return Promise.resolve().then((()=>this.hasAccessToken?t?this.requestWrapped(e):this.requestWrapped(e).catch((t=>new Promise(((e,n)=>{!t||\"GATEWAY_INVALID_TOKEN\"!==t.code&&\"InvalidParameter.InvalidToken\"!==t.code?n(t):e()})).then((()=>this.getAccessToken())).then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})))):this.getAccessToken().then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)}))))}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header[\"x-basement-token\"]=this.accessToken,t.header[\"x-serverless-sign\"]=F.sign(t.data,this.config.clientSecret),t}setupRequest(e,t){const n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),s={\"Content-Type\":\"application/json\"};return\"auth\"!==t&&(n.token=this.accessToken,s[\"x-basement-token\"]=this.accessToken),s[\"x-serverless-sign\"]=F.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:\"POST\",data:n,dataType:\"json\",header:s}}getAccessToken(){if(\"pending\"===this._getAccessTokenPromiseStatus)return this._getAccessTokenPromise;this._getAccessTokenPromiseStatus=\"pending\";return this._getAccessTokenPromise=this.requestAuth(this.setupRequest({method:\"serverless.auth.user.anonymousAuthorize\",params:\"{}\"},\"auth\")).then((e=>new Promise(((t,n)=>{e.result&&e.result.accessToken?(this.setAccessToken(e.result.accessToken),this._getAccessTokenPromiseStatus=\"fulfilled\",t(this.accessToken)):(this._getAccessTokenPromiseStatus=\"rejected\",n(new x({code:\"AUTH_FAILED\",message:\"获取accessToken失败\"})))}))),(e=>(this._getAccessTokenPromiseStatus=\"rejected\",Promise.reject(e)))),this._getAccessTokenPromise}authorize(){this.getAccessToken()}callFunction(e){const t={method:\"serverless.function.runtime.invoke\",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}getOSSUploadOptionsFromPath(e){const t={method:\"serverless.file.resource.generateProximalSign\",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,name:n,filePath:s,fileType:o,onUploadProgress:r}){return new Promise(((i,a)=>{const c=this.adapter.uploadFile({url:e,formData:t,name:n,filePath:s,fileType:o,header:{\"X-OSS-server-side-encrpytion\":\"AES256\"},success(e){e&&e.statusCode<400?i(e):a(new x({code:\"UPLOAD_FAILED\",message:\"文件上传失败\"}))},fail(e){a(new x({code:e.code||\"UPLOAD_FAILED\",message:e.message||e.errMsg||\"文件上传失败\"}))}});\"function\"==typeof r&&c&&\"function\"==typeof c.onProgressUpdate&&c.onProgressUpdate((e=>{r({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}reportOSSUpload(e){const t={method:\"serverless.file.resource.report\",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFile({filePath:e,cloudPath:t,fileType:n=\"image\",onUploadProgress:s,config:o}){if(\"string\"!==c(t))throw new x({code:\"INVALID_PARAM\",message:\"cloudPath必须为字符串类型\"});if(!(t=t.trim()))throw new x({code:\"CLOUDPATH_REQUIRED\",message:\"cloudPath不可为空\"});if(/:\\/\\//.test(t))throw new x({code:\"INVALID_PARAM\",message:\"cloudPath不合法\"});const r=o&&o.envType||this.config.envType;let i,a;return this.getOSSUploadOptionsFromPath({env:r,filename:t}).then((t=>{const o=t.result;i=o.id,a=\"https://\"+o.cdnDomain+\"/\"+o.ossPath;const r={url:\"https://\"+o.host,formData:{\"Cache-Control\":\"max-age=2592000\",\"Content-Disposition\":\"attachment\",OSSAccessKeyId:o.accessKeyId,Signature:o.signature,host:o.host,id:i,key:o.ossPath,policy:o.policy,success_action_status:200},fileName:\"file\",name:\"file\",filePath:e,fileType:n};return this.uploadFileToOSS(Object.assign({},r,{onUploadProgress:s}))})).then((()=>this.reportOSSUpload({id:i}))).then((t=>new Promise(((n,s)=>{t.success?n({success:!0,filePath:e,fileID:a}):s(new x({code:\"UPLOAD_FAILED\",message:\"文件上传失败\"}))}))))}deleteFile({fileList:e}){const t={method:\"serverless.file.resource.delete\",params:JSON.stringify({id:e[0]})};return this.request(this.setupRequest(t))}getTempFileURL({fileList:e}={}){return new Promise(((t,n)=>{Array.isArray(e)&&0!==e.length||n(new x({code:\"INVALID_PARAM\",message:\"fileList的元素必须是非空的字符串\"})),t({fileList:e.map((e=>({fileID:e,tempFileURL:e})))})}))}};var B={init(e){const t=new $(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};const K=\"undefined\"!=typeof location&&\"http:\"===location.protocol?\"http:\":\"https:\";var H;!function(e){e.local=\"local\",e.none=\"none\",e.session=\"session\"}(H||(H={}));var W=function(){};const z=()=>{let e;if(!Promise){e=()=>{},e.promise={};const t=()=>{throw new x({message:'Your Node runtime does support ES6 Promises. Set \"global.Promise\" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,\"then\",{get:t}),Object.defineProperty(e.promise,\"catch\",{get:t}),e}const t=new Promise(((t,n)=>{e=(e,s)=>e?n(e):t(s)}));return e.promise=t,e};function J(e){return void 0===e}function V(e){return\"[object Null]\"===Object.prototype.toString.call(e)}var Y;function X(e){const t=(n=e,\"[object Array]\"===Object.prototype.toString.call(n)?e:[e]);var n;for(const e of t){const{isMatch:t,genAdapter:n,runtime:s}=e;if(t())return{adapter:n(),runtime:s}}}!function(e){e.WEB=\"web\",e.WX_MP=\"wx_mp\"}(Y||(Y={}));const G={adapter:null,runtime:void 0},Q=[\"anonymousUuidKey\"];class Z extends W{constructor(){super(),G.adapter.root.tcbObject||(G.adapter.root.tcbObject={})}setItem(e,t){G.adapter.root.tcbObject[e]=t}getItem(e){return G.adapter.root.tcbObject[e]}removeItem(e){delete G.adapter.root.tcbObject[e]}clear(){delete G.adapter.root.tcbObject}}function ee(e,t){switch(e){case\"local\":return t.localStorage||new Z;case\"none\":return new Z;default:return t.sessionStorage||new Z}}class te{constructor(e){if(!this._storage){this._persistence=G.adapter.primaryStorage||e.persistence,this._storage=ee(this._persistence,G.adapter);const t=`access_token_${e.env}`,n=`access_token_expire_${e.env}`,s=`refresh_token_${e.env}`,o=`anonymous_uuid_${e.env}`,r=`login_type_${e.env}`,i=`user_info_${e.env}`;this.keys={accessTokenKey:t,accessTokenExpireKey:n,refreshTokenKey:s,anonymousUuidKey:o,loginTypeKey:r,userInfoKey:i}}}updatePersistence(e){if(e===this._persistence)return;const t=\"local\"===this._persistence;this._persistence=e;const n=ee(e,G.adapter);for(const e in this.keys){const s=this.keys[e];if(t&&Q.includes(e))continue;const o=this._storage.getItem(s);J(o)||V(o)||(n.setItem(s,o),this._storage.removeItem(s))}this._storage=n}setStore(e,t,n){if(!this._storage)return;const s={version:n||\"localCachev1\",content:t},o=JSON.stringify(s);try{this._storage.setItem(e,o)}catch(e){throw e}}getStore(e,t){try{if(!this._storage)return}catch(e){return\"\"}t=t||\"localCachev1\";const n=this._storage.getItem(e);if(!n)return\"\";if(n.indexOf(t)>=0){return JSON.parse(n).content}return\"\"}removeStore(e){this._storage.removeItem(e)}}const ne={},se={};function oe(e){return ne[e]}class re{constructor(e,t){this.data=t||null,this.name=e}}class ie extends re{constructor(e,t){super(\"error\",{error:e,data:t}),this.error=e}}const ae=new class{constructor(){this._listeners={}}on(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this._listeners),this}off(e,t){return function(e,t,n){if(n&&n[e]){const s=n[e].indexOf(t);-1!==s&&n[e].splice(s,1)}}(e,t,this._listeners),this}fire(e,t){if(e instanceof ie)return console.error(e.error),this;const n=\"string\"==typeof e?new re(e,t||{}):e;const s=n.name;if(this._listens(s)){n.target=this;const e=this._listeners[s]?[...this._listeners[s]]:[];for(const t of e)t.call(this,n)}return this}_listens(e){return this._listeners[e]&&this._listeners[e].length>0}};function ce(e,t){ae.on(e,t)}function ue(e,t={}){ae.fire(e,t)}function le(e,t){ae.off(e,t)}const he=\"loginStateChanged\",de=\"loginStateExpire\",fe=\"loginTypeChanged\",pe=\"anonymousConverted\",ge=\"refreshAccessToken\";var me;!function(e){e.ANONYMOUS=\"ANONYMOUS\",e.WECHAT=\"WECHAT\",e.WECHAT_PUBLIC=\"WECHAT-PUBLIC\",e.WECHAT_OPEN=\"WECHAT-OPEN\",e.CUSTOM=\"CUSTOM\",e.EMAIL=\"EMAIL\",e.USERNAME=\"USERNAME\",e.NULL=\"NULL\"}(me||(me={}));const ye=[\"auth.getJwt\",\"auth.logout\",\"auth.signInWithTicket\",\"auth.signInAnonymously\",\"auth.signIn\",\"auth.fetchAccessTokenWithRefreshToken\",\"auth.signUpWithEmailAndPassword\",\"auth.activateEndUserMail\",\"auth.sendPasswordResetEmail\",\"auth.resetPasswordWithToken\",\"auth.isUsernameRegistered\"],_e={\"X-SDK-Version\":\"1.3.5\"};function we(e,t,n){const s=e[t];e[t]=function(t){const o={},r={};n.forEach((n=>{const{data:s,headers:i}=n.call(e,t);Object.assign(o,s),Object.assign(r,i)}));const i=t.data;return i&&(()=>{var e;if(e=i,\"[object FormData]\"!==Object.prototype.toString.call(e))t.data={...i,...o};else for(const e in o)i.append(e,o[e])})(),t.headers={...t.headers||{},...r},s.call(e,t)}}function ke(){const e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:{..._e,\"x-seqid\":e}}}class Se{constructor(e={}){var t;this.config=e,this._reqClass=new G.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:`请求在${this.config.timeout/1e3}s内未完成,已中断`,restrictedMethods:[\"post\"]}),this._cache=oe(this.config.env),this._localCache=(t=this.config.env,se[t]),we(this._reqClass,\"post\",[ke]),we(this._reqClass,\"upload\",[ke]),we(this._reqClass,\"download\",[ke])}async post(e){return await this._reqClass.post(e)}async upload(e){return await this._reqClass.upload(e)}async download(e){return await this._reqClass.download(e)}async refreshAccessToken(){let e,t;this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken());try{e=await this._refreshAccessTokenPromise}catch(e){t=e}if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,t)throw t;return e}async _refreshAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:n,loginTypeKey:s,anonymousUuidKey:o}=this._cache.keys;this._cache.removeStore(e),this._cache.removeStore(t);let r=this._cache.getStore(n);if(!r)throw new x({message:\"未登录CloudBase\"});const i={refresh_token:r},a=await this.request(\"auth.fetchAccessTokenWithRefreshToken\",i);if(a.data.code){const{code:e}=a.data;if(\"SIGN_PARAM_INVALID\"===e||\"REFRESH_TOKEN_EXPIRED\"===e||\"INVALID_REFRESH_TOKEN\"===e){if(this._cache.getStore(s)===me.ANONYMOUS&&\"INVALID_REFRESH_TOKEN\"===e){const e=this._cache.getStore(o),t=this._cache.getStore(n),s=await this.send(\"auth.signInAnonymously\",{anonymous_uuid:e,refresh_token:t});return this.setRefreshToken(s.refresh_token),this._refreshAccessToken()}ue(de),this._cache.removeStore(n)}throw new x({code:a.data.code,message:`刷新access token失败:${a.data.code}`})}if(a.data.access_token)return ue(ge),this._cache.setStore(e,a.data.access_token),this._cache.setStore(t,a.data.access_token_expire+Date.now()),{accessToken:a.data.access_token,accessTokenExpire:a.data.access_token_expire};a.data.refresh_token&&(this._cache.removeStore(n),this._cache.setStore(n,a.data.refresh_token),this._refreshAccessToken())}async getAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:n}=this._cache.keys;if(!this._cache.getStore(n))throw new x({message:\"refresh token不存在,登录状态异常\"});let s=this._cache.getStore(e),o=this._cache.getStore(t),r=!0;return this._shouldRefreshAccessTokenHook&&!await this._shouldRefreshAccessTokenHook(s,o)&&(r=!1),(!s||!o||o{e.wxOpenId&&e.wxPublicId&&(t=!0)})),{users:n,hasPrimaryUid:t}}setPrimaryUid(e){return this._request.send(\"auth.setPrimaryUid\",{uid:e})}unlink(e){return this._request.send(\"auth.unlink\",{platform:e})}async update(e){const{nickName:t,gender:n,avatarUrl:s,province:o,country:r,city:i}=e,{data:a}=await this._request.send(\"auth.updateUserInfo\",{nickName:t,gender:n,avatarUrl:s,province:o,country:r,city:i});this.setLocalUserInfo(a)}async refresh(){const{data:e}=await this._request.send(\"auth.getUserInfo\",{});return this.setLocalUserInfo(e),e}setUserInfo(){const{userInfoKey:e}=this._cache.keys,t=this._cache.getStore(e);[\"uid\",\"loginType\",\"openid\",\"wxOpenId\",\"wxPublicId\",\"unionId\",\"qqMiniOpenId\",\"email\",\"hasPassword\",\"customUserId\",\"nickName\",\"gender\",\"avatarUrl\"].forEach((e=>{this[e]=t[e]})),this.location={country:t.country,province:t.province,city:t.city}}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e),this.setUserInfo()}}class Ie{constructor(e){if(!e)throw new x({code:\"PARAM_ERROR\",message:\"envId is not defined\"});this._cache=oe(e);const{refreshTokenKey:t,accessTokenKey:n,accessTokenExpireKey:s}=this._cache.keys,o=this._cache.getStore(t),r=this._cache.getStore(n),i=this._cache.getStore(s);this.credential={refreshToken:o,accessToken:r,accessTokenExpire:i},this.user=new Pe(e)}get isAnonymousAuth(){return this.loginType===me.ANONYMOUS}get isCustomAuth(){return this.loginType===me.CUSTOM}get isWeixinAuth(){return this.loginType===me.WECHAT||this.loginType===me.WECHAT_OPEN||this.loginType===me.WECHAT_PUBLIC}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}class Oe extends Ae{async signIn(){this._cache.updatePersistence(\"local\");const{anonymousUuidKey:e,refreshTokenKey:t}=this._cache.keys,n=this._cache.getStore(e)||void 0,s=this._cache.getStore(t)||void 0,o=await this._request.send(\"auth.signInAnonymously\",{anonymous_uuid:n,refresh_token:s});if(o.uuid&&o.refresh_token){this._setAnonymousUUID(o.uuid),this.setRefreshToken(o.refresh_token),await this._request.refreshAccessToken(),ue(he),ue(fe,{env:this.config.env,loginType:me.ANONYMOUS,persistence:\"local\"});const e=new Ie(this.config.env);return await e.user.refresh(),e}throw new x({message:\"匿名登录失败\"})}async linkAndRetrieveDataWithTicket(e){const{anonymousUuidKey:t,refreshTokenKey:n}=this._cache.keys,s=this._cache.getStore(t),o=this._cache.getStore(n),r=await this._request.send(\"auth.linkAndRetrieveDataWithTicket\",{anonymous_uuid:s,refresh_token:o,ticket:e});if(r.refresh_token)return this._clearAnonymousUUID(),this.setRefreshToken(r.refresh_token),await this._request.refreshAccessToken(),ue(pe,{env:this.config.env}),ue(fe,{loginType:me.CUSTOM,persistence:\"local\"}),{credential:{refreshToken:r.refresh_token}};throw new x({message:\"匿名转化失败\"})}_setAnonymousUUID(e){const{anonymousUuidKey:t,loginTypeKey:n}=this._cache.keys;this._cache.removeStore(t),this._cache.setStore(t,e),this._cache.setStore(n,me.ANONYMOUS)}_clearAnonymousUUID(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}class be extends Ae{async signIn(e){if(\"string\"!=typeof e)throw new x({param:\"PARAM_ERROR\",message:\"ticket must be a string\"});const{refreshTokenKey:t}=this._cache.keys,n=await this._request.send(\"auth.signInWithTicket\",{ticket:e,refresh_token:this._cache.getStore(t)||\"\"});if(n.refresh_token)return this.setRefreshToken(n.refresh_token),await this._request.refreshAccessToken(),ue(he),ue(fe,{env:this.config.env,loginType:me.CUSTOM,persistence:this.config.persistence}),await this.refreshUserInfo(),new Ie(this.config.env);throw new x({message:\"自定义登录失败\"})}}class Ce extends Ae{async signIn(e,t){if(\"string\"!=typeof e)throw new x({code:\"PARAM_ERROR\",message:\"email must be a string\"});const{refreshTokenKey:n}=this._cache.keys,s=await this._request.send(\"auth.signIn\",{loginType:\"EMAIL\",email:e,password:t,refresh_token:this._cache.getStore(n)||\"\"}),{refresh_token:o,access_token:r,access_token_expire:i}=s;if(o)return this.setRefreshToken(o),r&&i?this.setAccessToken(r,i):await this._request.refreshAccessToken(),await this.refreshUserInfo(),ue(he),ue(fe,{env:this.config.env,loginType:me.EMAIL,persistence:this.config.persistence}),new Ie(this.config.env);throw s.code?new x({code:s.code,message:`邮箱登录失败: ${s.message}`}):new x({message:\"邮箱登录失败\"})}async activate(e){return this._request.send(\"auth.activateEndUserMail\",{token:e})}async resetPasswordWithToken(e,t){return this._request.send(\"auth.resetPasswordWithToken\",{token:e,newPassword:t})}}class Ee extends Ae{async signIn(e,t){if(\"string\"!=typeof e)throw new x({code:\"PARAM_ERROR\",message:\"username must be a string\"});\"string\"!=typeof t&&(t=\"\",console.warn(\"password is empty\"));const{refreshTokenKey:n}=this._cache.keys,s=await this._request.send(\"auth.signIn\",{loginType:me.USERNAME,username:e,password:t,refresh_token:this._cache.getStore(n)||\"\"}),{refresh_token:o,access_token_expire:r,access_token:i}=s;if(o)return this.setRefreshToken(o),i&&r?this.setAccessToken(i,r):await this._request.refreshAccessToken(),await this.refreshUserInfo(),ue(he),ue(fe,{env:this.config.env,loginType:me.USERNAME,persistence:this.config.persistence}),new Ie(this.config.env);throw s.code?new x({code:s.code,message:`用户名密码登录失败: ${s.message}`}):new x({message:\"用户名密码登录失败\"})}}class Ue{constructor(e){this.config=e,this._cache=oe(e.env),this._request=Te(e.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),ce(fe,this._onLoginTypeChanged)}get currentUser(){const e=this.hasLoginState();return e&&e.user||null}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}anonymousAuthProvider(){return new Oe(this.config)}customAuthProvider(){return new be(this.config)}emailAuthProvider(){return new Ce(this.config)}usernameAuthProvider(){return new Ee(this.config)}async signInAnonymously(){return new Oe(this.config).signIn()}async signInWithEmailAndPassword(e,t){return new Ce(this.config).signIn(e,t)}signInWithUsernameAndPassword(e,t){return new Ee(this.config).signIn(e,t)}async linkAndRetrieveDataWithTicket(e){this._anonymousAuthProvider||(this._anonymousAuthProvider=new Oe(this.config)),ce(pe,this._onAnonymousConverted);return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e)}async signOut(){if(this.loginType===me.ANONYMOUS)throw new x({message:\"匿名用户不支持登出操作\"});const{refreshTokenKey:e,accessTokenKey:t,accessTokenExpireKey:n}=this._cache.keys,s=this._cache.getStore(e);if(!s)return;const o=await this._request.send(\"auth.logout\",{refresh_token:s});return this._cache.removeStore(e),this._cache.removeStore(t),this._cache.removeStore(n),ue(he),ue(fe,{env:this.config.env,loginType:me.NULL,persistence:this.config.persistence}),o}async signUpWithEmailAndPassword(e,t){return this._request.send(\"auth.signUpWithEmailAndPassword\",{email:e,password:t})}async sendPasswordResetEmail(e){return this._request.send(\"auth.sendPasswordResetEmail\",{email:e})}onLoginStateChanged(e){ce(he,(()=>{const t=this.hasLoginState();e.call(this,t)}));const t=this.hasLoginState();e.call(this,t)}onLoginStateExpired(e){ce(de,e.bind(this))}onAccessTokenRefreshed(e){ce(ge,e.bind(this))}onAnonymousConverted(e){ce(pe,e.bind(this))}onLoginTypeChanged(e){ce(fe,(()=>{const t=this.hasLoginState();e.call(this,t)}))}async getAccessToken(){return{accessToken:(await this._request.getAccessToken()).accessToken,env:this.config.env}}hasLoginState(){const{refreshTokenKey:e}=this._cache.keys;return this._cache.getStore(e)?new Ie(this.config.env):null}async isUsernameRegistered(e){if(\"string\"!=typeof e)throw new x({code:\"PARAM_ERROR\",message:\"username must be a string\"});const{data:t}=await this._request.send(\"auth.isUsernameRegistered\",{username:e});return t&&t.isRegistered}getLoginState(){return Promise.resolve(this.hasLoginState())}async signInWithTicket(e){return new be(this.config).signIn(e)}shouldRefreshAccessToken(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}getUserInfo(){return this._request.send(\"auth.getUserInfo\",{}).then((e=>e.code?e:{...e.data,requestId:e.seqId}))}getAuthHeader(){const{refreshTokenKey:e,accessTokenKey:t}=this._cache.keys,n=this._cache.getStore(e);return{\"x-cloudbase-credentials\":this._cache.getStore(t)+\"/@@/\"+n}}_onAnonymousConverted(e){const{env:t}=e.data;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}_onLoginTypeChanged(e){const{loginType:t,persistence:n,env:s}=e.data;s===this.config.env&&(this._cache.updatePersistence(n),this._cache.setStore(this._cache.keys.loginTypeKey,t))}}const Re=function(e,t){t=t||z();const n=Te(this.config.env),{cloudPath:s,filePath:o,onUploadProgress:r,fileType:i=\"image\"}=e;return n.send(\"storage.getUploadMetadata\",{path:s}).then((e=>{const{data:{url:a,authorization:c,token:u,fileId:l,cosFileId:h},requestId:d}=e,f={key:s,signature:c,\"x-cos-meta-fileid\":h,success_action_status:\"201\",\"x-cos-security-token\":u};n.upload({url:a,data:f,file:o,name:s,fileType:i,onUploadProgress:r}).then((e=>{201===e.statusCode?t(null,{fileID:l,requestId:d}):t(new x({code:\"STORAGE_REQUEST_FAIL\",message:`STORAGE_REQUEST_FAIL: ${e.data}`}))})).catch((e=>{t(e)}))})).catch((e=>{t(e)})),t.promise},xe=function(e,t){t=t||z();const n=Te(this.config.env),{cloudPath:s}=e;return n.send(\"storage.getUploadMetadata\",{path:s}).then((e=>{t(null,e)})).catch((e=>{t(e)})),t.promise},De=function({fileList:e},t){if(t=t||z(),!e||!Array.isArray(e))return{code:\"INVALID_PARAM\",message:\"fileList必须是非空的数组\"};for(let t of e)if(!t||\"string\"!=typeof t)return{code:\"INVALID_PARAM\",message:\"fileList的元素必须是非空的字符串\"};const n={fileid_list:e};return Te(this.config.env).send(\"storage.batchDeleteFile\",n).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},qe=function({fileList:e},t){t=t||z(),e&&Array.isArray(e)||t(null,{code:\"INVALID_PARAM\",message:\"fileList必须是非空的数组\"});let n=[];for(let s of e)\"object\"==typeof s?(s.hasOwnProperty(\"fileID\")&&s.hasOwnProperty(\"maxAge\")||t(null,{code:\"INVALID_PARAM\",message:\"fileList的元素必须是包含fileID和maxAge的对象\"}),n.push({fileid:s.fileID,max_age:s.maxAge})):\"string\"==typeof s?n.push({fileid:s}):t(null,{code:\"INVALID_PARAM\",message:\"fileList的元素必须是字符串\"});const s={file_list:n};return Te(this.config.env).send(\"storage.batchGetDownloadUrl\",s).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},Le=async function({fileID:e},t){const n=(await qe.call(this,{fileList:[{fileID:e,maxAge:600}]})).fileList[0];if(\"SUCCESS\"!==n.code)return t?t(n):new Promise((e=>{e(n)}));const s=Te(this.config.env);let o=n.download_url;if(o=encodeURI(o),!t)return s.download({url:o});t(await s.download({url:o}))},Fe=function({name:e,data:t,query:n,parse:s,search:o},r){const i=r||z();let a;try{a=t?JSON.stringify(t):\"\"}catch(e){return Promise.reject(e)}if(!e)return Promise.reject(new x({code:\"PARAM_ERROR\",message:\"函数名不能为空\"}));const c={inQuery:n,parse:s,search:o,function_name:e,request_data:a};return Te(this.config.env).send(\"functions.invokeFunction\",c).then((e=>{if(e.code)i(null,e);else{let t=e.data.response_data;if(s)i(null,{result:t,requestId:e.requestId});else try{t=JSON.parse(e.data.response_data),i(null,{result:t,requestId:e.requestId})}catch(e){i(new x({message:\"response data must be json\"}))}}return i.promise})).catch((e=>{i(e)})),i.promise},Ne={timeout:15e3,persistence:\"session\"},Me={};class je{constructor(e){this.config=e||this.config,this.authObj=void 0}init(e){switch(G.adapter||(this.requestClient=new G.adapter.reqClass({timeout:e.timeout||5e3,timeoutMsg:`请求在${(e.timeout||5e3)/1e3}s内未完成,已中断`})),this.config={...Ne,...e},!0){case this.config.timeout>6e5:console.warn(\"timeout大于可配置上限[10分钟],已重置为上限数值\"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn(\"timeout小于可配置下限[100ms],已重置为下限数值\"),this.config.timeout=100}return new je(this.config)}auth({persistence:e}={}){if(this.authObj)return this.authObj;const t=e||G.adapter.primaryStorage||Ne.persistence;var n;return t!==this.config.persistence&&(this.config.persistence=t),function(e){const{env:t}=e;ne[t]=new te(e),se[t]=new te({...e,persistence:\"local\"})}(this.config),n=this.config,ve[n.env]=new Se(n),this.authObj=new Ue(this.config),this.authObj}on(e,t){return ce.apply(this,[e,t])}off(e,t){return le.apply(this,[e,t])}callFunction(e,t){return Fe.apply(this,[e,t])}deleteFile(e,t){return De.apply(this,[e,t])}getTempFileURL(e,t){return qe.apply(this,[e,t])}downloadFile(e,t){return Le.apply(this,[e,t])}uploadFile(e,t){return Re.apply(this,[e,t])}getUploadMetadata(e,t){return xe.apply(this,[e,t])}registerExtension(e){Me[e.name]=e}async invokeExtension(e,t){const n=Me[e];if(!n)throw new x({message:`扩展${e} 必须先注册`});return await n.invoke(t,this)}useAdapters(e){const{adapter:t,runtime:n}=X(e)||{};t&&(G.adapter=t),n&&(G.runtime=n)}}var $e=new je;function Be(e,t,n){void 0===n&&(n={});var s=/\\?/.test(t),o=\"\";for(var r in n)\"\"===o?!s&&(t+=\"?\"):o+=\"&\",o+=r+\"=\"+encodeURIComponent(n[r]);return/^http(s)?:\\/\\//.test(t+=o)?t:\"\"+e+t}class Ke{post(e){const{url:t,data:n,headers:s}=e;return new Promise(((e,o)=>{N.request({url:Be(\"https:\",t),data:n,method:\"POST\",header:s,success(t){e(t)},fail(e){o(e)}})}))}upload(e){return new Promise(((t,n)=>{const{url:s,file:o,data:r,headers:i,fileType:a}=e,c=N.uploadFile({url:Be(\"https:\",s),name:\"file\",formData:Object.assign({},r),filePath:o,fileType:a,header:i,success(e){const n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&r.success_action_status&&(n.statusCode=parseInt(r.success_action_status,10)),t(n)},fail(e){h&&\"mp-alipay\"===d&&console.warn(\"支付宝小程序开发工具上传腾讯云时无法准确判断是否上传成功,请使用真机测试\"),n(new Error(e.errMsg||\"uploadFile:fail\"))}});\"function\"==typeof e.onUploadProgress&&c&&\"function\"==typeof c.onProgressUpdate&&c.onProgressUpdate((t=>{e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}const He={setItem(e,t){N.setStorageSync(e,t)},getItem:e=>N.getStorageSync(e),removeItem(e){N.removeStorageSync(e)},clear(){N.clearStorageSync()}};var We={genAdapter:function(){return{root:{},reqClass:Ke,localStorage:He,primaryStorage:\"local\"}},isMatch:function(){return!0},runtime:\"uni_app\"};$e.useAdapters(We);const ze=$e,Je=ze.init;ze.init=function(e){e.env=e.spaceId;const t=Je.call(this,e);t.config.provider=\"tencent\",t.config.spaceId=e.spaceId;const n=t.auth;return t.auth=function(e){const t=n.call(this,e);return[\"linkAndRetrieveDataWithTicket\",\"signInAnonymously\",\"signOut\",\"getAccessToken\",\"getLoginState\",\"signInWithTicket\",\"getUserInfo\"].forEach((e=>{t[e]=R(t[e]).bind(t)})),t},t.customAuth=t.auth,t};var Ve=ze;function Ye(){return{token:N.getStorageSync(\"uni_id_token\")||N.getStorageSync(\"uniIdToken\"),tokenExpired:N.getStorageSync(\"uni_id_token_expired\")}}function Xe({token:e,tokenExpired:t}={}){e&&N.setStorageSync(\"uni_id_token\",e),t&&N.setStorageSync(\"uni_id_token_expired\",t)}function Ge(){if(!h||\"h5\"!==d)return;uni.getStorageSync(\"__LAST_DCLOUD_APPID\")!==m&&(uni.setStorageSync(\"__LAST_DCLOUD_APPID\",m),console.warn(\"检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)\"),N.removeStorageSync(\"uni_id_token\"),N.removeStorageSync(\"uniIdToken\"),N.removeStorageSync(\"uni_id_token_expired\"))}var Qe=class extends ${getAccessToken(){return new Promise(((e,t)=>{const n=\"Anonymous_Access_token\";this.setAccessToken(n),e(n)}))}setupRequest(e,t){const n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),s={\"Content-Type\":\"application/json\"};\"auth\"!==t&&(n.token=this.accessToken,s[\"x-basement-token\"]=this.accessToken),s[\"x-serverless-sign\"]=F.sign(n,this.config.clientSecret);const o=L();s[\"x-client-info\"]=JSON.stringify(o);const{token:r}=Ye();return s[\"x-client-token\"]=r,{url:this.config.requestUrl,method:\"POST\",data:n,dataType:\"json\",header:JSON.parse(JSON.stringify(s))}}uploadFileToOSS({url:e,formData:t,name:n,filePath:s,fileType:o,onUploadProgress:r}){return new Promise(((i,a)=>{const c=this.adapter.uploadFile({url:e,formData:t,name:n,filePath:s,fileType:o,success(e){e&&e.statusCode<400?i(e):a(new x({code:\"UPLOAD_FAILED\",message:\"文件上传失败\"}))},fail(e){a(new x({code:e.code||\"UPLOAD_FAILED\",message:e.message||e.errMsg||\"文件上传失败\"}))}});\"function\"==typeof r&&c&&\"function\"==typeof c.onProgressUpdate&&c.onProgressUpdate((e=>{r({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}uploadFile({filePath:e,cloudPath:t,fileType:n=\"image\",onUploadProgress:s}){if(!t)throw new x({code:\"CLOUDPATH_REQUIRED\",message:\"cloudPath不可为空\"});let o;return this.getOSSUploadOptionsFromPath({cloudPath:t}).then((t=>{const{url:r,formData:i,name:a}=t.result;o=t.result.fileUrl;const c={url:r,formData:i,name:a,filePath:e,fileType:n};return this.uploadFileToOSS(Object.assign({},c,{onUploadProgress:s}))})).then((()=>this.reportOSSUpload({cloudPath:t}))).then((t=>new Promise(((n,s)=>{t.success?n({success:!0,filePath:e,fileID:o}):s(new x({code:\"UPLOAD_FAILED\",message:\"文件上传失败\"}))}))))}deleteFile({fileList:e}){const t={method:\"serverless.file.resource.delete\",params:JSON.stringify({fileList:e})};return this.request(this.setupRequest(t))}getTempFileURL({fileList:e}={}){const t={method:\"serverless.file.resource.getTempFileURL\",params:JSON.stringify({fileList:e})};return this.request(this.setupRequest(t))}};var Ze={init(e){const t=new Qe(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};function et({data:e}){let t;t=L();const n=JSON.parse(JSON.stringify(e||{}));if(Object.assign(n,{clientInfo:t}),!n.uniIdToken){const{token:e}=Ye();e&&(n.uniIdToken=e)}return n}function tt({name:e,data:t}){const{localAddress:n,localPort:s}=this,o={aliyun:\"aliyun\",tencent:\"tcb\"}[this.config.provider],r=this.config.spaceId,i=`http://${n}:${s}/system/check-function`,a=`http://${n}:${s}/cloudfunctions/${e}`;return new Promise(((t,n)=>{N.request({method:\"POST\",url:i,data:{name:e,platform:d,provider:o,spaceId:r},timeout:3e3,success(e){t(e)},fail(){t({data:{code:\"NETWORK_ERROR\",message:\"连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。\"}})}})})).then((({data:e}={})=>{const{code:t,message:n}=e||{};return{code:0===t?0:t||\"SYS_ERR\",message:n||\"SYS_ERR\"}})).then((({code:n,message:s})=>{if(0!==n){switch(n){case\"MODULE_ENCRYPTED\":console.error(`此云函数(${e})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`);break;case\"FUNCTION_ENCRYPTED\":console.error(`此云函数(${e})已加密不可本地调试,自动切换为云端已部署的云函数`);break;case\"ACTION_ENCRYPTED\":console.error(s||\"需要访问加密的uni-clientDB-action,自动切换为云端环境\");break;case\"NETWORK_ERROR\":{const e=\"连接本地调试服务失败,请检查客户端是否和主机在同一局域网下\";throw console.error(e),new Error(e)}case\"SWITCH_TO_CLOUD\":break;default:{const e=`检测本地调试服务出现错误:${s},请检查网络环境或重启客户端再试`;throw console.error(e),new Error(e)}}return this._originCallFunction({name:e,data:t})}return new Promise(((e,n)=>{const s=et.call(this,{data:t});N.request({method:\"POST\",url:a,data:{provider:o,platform:d,param:s},success:({statusCode:t,data:s}={})=>!t||t>=400?n(new x({code:s.code||\"SYS_ERR\",message:s.message||\"request:fail\"})):e({result:s}),fail(e){n(new x({code:e.code||e.errCode||\"SYS_ERR\",message:e.message||e.errMsg||\"request:fail\"}))}})}))}))}const nt=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:\",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间\",mode:\"append\"}];var st=/[\\\\^$.*+?()[\\]{}|]/g,ot=RegExp(st.source);function rt(e,t,n){return e.replace(new RegExp((s=t)&&ot.test(s)?s.replace(st,\"\\\\$&\"):s,\"g\"),n);var s}function it({functionName:e,result:t,logPvd:n}){if(this.config.useDebugFunction&&t&&t.requestId){const s=JSON.stringify({spaceId:this.config.spaceId,functionName:e,requestId:t.requestId});console.log(`[${n}-request]${s}[/${n}-request]`)}}function at(e){const t=e.callFunction,n=function(n){const s=n.name;n.data=et.call(e,{data:n.data});const o={aliyun:\"aliyun\",tencent:\"tcb\",tcb:\"tcb\"}[this.config.provider];return t.call(this,n).then((e=>(e.errCode=0,it.call(this,{functionName:s,result:e,logPvd:o}),Promise.resolve(e))),(e=>(it.call(this,{functionName:s,result:e,logPvd:o}),e&&e.message&&(e.message=function({message:e=\"\",extraInfo:t={},formatter:n=[]}={}){for(let s=0;s(console.warn(\"当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise\"),{})}),s}}const ct=Symbol(\"CLIENT_DB_INTERNAL\");function ut(e,t){return e.then=\"DoNotReturnProxyWithAFunctionNamedThen\",e._internalType=ct,e.__ob__=void 0,new Proxy(e,{get(e,n,s){if(\"_uniClient\"===n)return null;if(n in e||\"string\"!=typeof n){const t=e[n];return\"function\"==typeof t?t.bind(e):t}return t.get(e,n,s)}})}function lt(e){return{on:(t,n)=>{e[t]=e[t]||[],e[t].indexOf(n)>-1||e[t].push(n)},off:(t,n)=>{e[t]=e[t]||[];const s=e[t].indexOf(n);-1!==s&&e[t].splice(s,1)}}}const ht=[\"db.Geo\",\"db.command\",\"command.aggregate\"];function dt(e,t){return ht.indexOf(`${e}.${t}`)>-1}function ft(e){switch(c(e)){case\"array\":return e.map((e=>ft(e)));case\"object\":return e._internalType===ct||Object.keys(e).forEach((t=>{e[t]=ft(e[t])})),e;case\"regexp\":return{$regexp:{source:e.source,flags:e.flags}};case\"date\":return{$date:e.toISOString()};default:return e}}class pt{constructor(e,t,n){this.content=e,this.prevStage=t||null,this.udb=null,this._database=n}toJSON(){let e=this;const t=[e.content];for(;e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((e=>({$method:e.$method,$param:ft(e.$param)})))}}getAction(){const e=this.toJSON().$db.find((e=>\"action\"===e.$method));return e&&e.$param&&e.$param[0]}getCommand(){return{$db:this.toJSON().$db.filter((e=>\"action\"!==e.$method))}}get useAggregate(){let e=this,t=!1;for(;e.prevStage;){e=e.prevStage;const n=e.content.$method;if(\"aggregate\"===n||\"pipeline\"===n){t=!0;break}}return t}get count(){if(!this.useAggregate)return function(){return this._send(\"count\",Array.from(arguments))};const e=this;return function(){return gt({$method:\"count\",$param:ft(Array.from(arguments))},e,this._database)}}get(){return this._send(\"get\",Array.from(arguments))}add(){return this._send(\"add\",Array.from(arguments))}remove(){return this._send(\"remove\",Array.from(arguments))}update(){return this._send(\"update\",Array.from(arguments))}end(){return this._send(\"end\",Array.from(arguments))}set(){throw new Error(\"clientDB禁止使用set方法\")}_send(e,t){const n=this.getAction(),s=this.getCommand();if(s.$db.push({$method:e,$param:ft(t)}),h){const e=s.$db.find((e=>\"collection\"===e.$method)),t=e&&e.$param;t&&1===t.length&&\"string\"==typeof e.$param[0]&&e.$param[0].indexOf(\",\")>-1&&console.warn(\"检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \\n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。\")}return this._database._callCloudFunction({action:n,command:s})}}function gt(e,t,n){return ut(new pt(e,t,n),{get(e,t){let s=\"db\";return e&&e.content&&(s=e.content.$method),dt(s,t)?gt({$method:t},e,n):function(){return gt({$method:t,$param:ft(Array.from(arguments))},e,n)}}})}function mt({path:e,method:t}){return class{constructor(){this.param=Array.from(arguments)}toJSON(){return{$newDb:[...e.map((e=>({$method:e}))),{$method:t,$param:this.param}]}}}}class yt extends class{constructor({uniClient:e={}}={}){this._uniClient=e,this._authCallBacks={},this._dbCallBacks={},e.isDefault&&(this._dbCallBacks=_(\"_globalUniCloudDatabaseCallback\")),this.auth=lt(this._authCallBacks),Object.assign(this,lt(this._dbCallBacks)),this.env=ut({},{get:(e,t)=>({$env:t})}),this.Geo=ut({},{get:(e,t)=>mt({path:[\"Geo\"],method:t})}),this.serverDate=mt({path:[],method:\"serverDate\"}),this.RegExp=mt({path:[],method:\"RegExp\"})}getCloudEnv(e){if(\"string\"!=typeof e||!e.trim())throw new Error(\"getCloudEnv参数错误\");return{$env:e.replace(\"$cloudEnv_\",\"\")}}_callback(e,t){const n=this._dbCallBacks;n[e]&&n[e].forEach((e=>{e(...t)}))}_callbackAuth(e,t){const n=this._authCallBacks;n[e]&&n[e].forEach((e=>{e(...t)}))}multiSend(){const e=Array.from(arguments),t=e.map((e=>{const t=e.getAction(),n=e.getCommand();if(\"getTemp\"!==n.$db[n.$db.length-1].$method)throw new Error(\"multiSend只支持子命令内使用getTemp\");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}{_callCloudFunction({action:e,command:t,multiCommand:n,queryList:s}){function o(e,t){if(n&&s)for(let n=0;nT(A(\"database\",\"complete\"),e))).then((()=>(o(null,e),U(I,{type:O,content:e}),Promise.reject(e))))}const c=T(A(\"database\",\"invoke\")),u=this._uniClient;return c.then((()=>u.callFunction({name:\"DCloud-clientDB\",type:a,data:{action:e,command:t,multiCommand:n}}))).then((e=>{const{code:t,message:n,token:s,tokenExpired:r,systemInfo:a=[]}=e.result;if(a)for(let e=0;e(console.warn(s),t)})}}return function(e){return T(A(\"database\",\"success\"),e).then((()=>T(A(\"database\",\"complete\"),e))).then((()=>(o(e,null),U(I,{type:O,content:e}),Promise.resolve(e))))}(e)}),(e=>{/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn(\"clientDB未初始化,请在web控制台保存一次schema以开启clientDB\");return i(new x({code:e.code||\"SYSTEM_ERROR\",message:e.message,requestId:e.requestId}))}))}}function _t(e){e.database=function(t){if(t&&Object.keys(t).length>0)return e.init(t).database();if(this._database)return this._database;const n=function(e,t={}){return ut(new e(t),{get:(e,t)=>dt(\"db\",t)?gt({$method:t},null,e):function(){return gt({$method:t,$param:ft(Array.from(arguments))},null,e)}})}(yt,{uniClient:e});return this._database=n,n}}function wt(e){e.onResponse=function(e){!function(e,t){const n=E(e);n.includes(t)||n.push(t)}(I,e)},e.offResponse=function(e){!function(e,t){const n=E(e),s=n.indexOf(t);-1!==s&&n.splice(s,1)}(I,e)}}let kt;const St=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",vt=/^(?:[A-Za-z\\d+/]{4})*?(?:[A-Za-z\\d+/]{2}(?:==)?|[A-Za-z\\d+/]{3}=?)?$/;function Tt(){const e=Ye().token||\"\",t=e.split(\".\");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let n;try{n=JSON.parse((s=t[1],decodeURIComponent(kt(s).split(\"\").map((function(e){return\"%\"+(\"00\"+e.charCodeAt(0).toString(16)).slice(-2)})).join(\"\"))))}catch(e){throw new Error(\"获取当前用户信息出错,详细错误信息为:\"+e.message)}var s;return n.tokenExpired=1e3*n.exp,delete n.exp,delete n.iat,n}kt=\"function\"!=typeof atob?function(e){if(e=String(e).replace(/[\\t\\n\\f\\r ]+/g,\"\"),!vt.test(e))throw new Error(\"Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.\");var t;e+=\"==\".slice(2-(3&e.length));for(var n,s,o=\"\",r=0;r>16&255):64===s?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}:atob;var At=t(n((function(e,t){Object.defineProperty(t,\"__esModule\",{value:!0});const n=\"chooseAndUploadFile:ok\",s=\"chooseAndUploadFile:fail\";function o(e,t){return e.tempFiles.forEach(((e,n)=>{e.name||(e.name=e.path.substring(e.path.lastIndexOf(\"/\")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+\"_\"+n+e.name.substring(e.name.lastIndexOf(\".\"))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((e=>e.path))),e}function r(e,t,{onChooseFile:s,onUploadProgress:o}){return t.then((e=>{if(s){const t=s(e);if(void 0!==t)return Promise.resolve(t).then((t=>void 0===t?e:t))}return e})).then((t=>!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t,s=5,o){(t=Object.assign({},t)).errMsg=n;const r=t.tempFiles,i=r.length;let a=0;return new Promise((n=>{for(;a=i)return void(!r.find((e=>!e.url&&!e.errMsg))&&n(t));const u=r[s];e.uploadFile({filePath:u.path,cloudPath:u.cloudPath,fileType:u.fileType,onUploadProgress(e){e.index=s,e.tempFile=u,e.tempFilePath=u.path,o&&o(e)}}).then((e=>{u.url=e.fileID,s{u.errMsg=e.errMsg||e.message,s{uni.chooseImage({count:t,sizeType:n,sourceType:r,extension:i,success(t){e(o(t,\"image\"))},fail(e){a({errMsg:e.errMsg.replace(\"chooseImage:fail\",s)})}})}))}(t),t):\"video\"===t.type?r(e,function(e){const{camera:t,compressed:n,maxDuration:r,sourceType:i=[\"album\",\"camera\"],extension:a}=e;return new Promise(((e,c)=>{uni.chooseVideo({camera:t,compressed:n,maxDuration:r,sourceType:i,extension:a,success(t){const{tempFilePath:n,duration:s,size:r,height:i,width:a}=t;e(o({errMsg:\"chooseVideo:ok\",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||\"\",path:n,size:r,type:t.tempFile&&t.tempFile.type||\"\",width:a,height:i,duration:s,fileType:\"video\",cloudPath:\"\"}]},\"video\"))},fail(e){c({errMsg:e.errMsg.replace(\"chooseVideo:fail\",s)})}})}))}(t),t):r(e,function(e){const{count:t,extension:n}=e;return new Promise(((e,r)=>{let i=uni.chooseFile;if(\"undefined\"!=typeof wx&&\"function\"==typeof wx.chooseMessageFile&&(i=wx.chooseMessageFile),\"function\"!=typeof i)return r({errMsg:s+\" 请指定 type 类型,该平台仅支持选择 image 或 video。\"});i({type:\"all\",count:t,extension:n,success(t){e(o(t))},fail(e){r({errMsg:e.errMsg.replace(\"chooseFile:fail\",s)})}})}))}(t),t)}}})));const Pt=\"manual\";function It(e){return{props:{localdata:{type:Array,default:()=>[]},options:{type:[Object,Array],default:()=>({})},spaceInfo:{type:Object,default:()=>({})},collection:{type:[String,Array],default:\"\"},action:{type:String,default:\"\"},field:{type:String,default:\"\"},orderby:{type:String,default:\"\"},where:{type:[String,Object],default:\"\"},pageData:{type:String,default:\"add\"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:\"\"},limitlevel:{type:Number,default:10},groupby:{type:String,default:\"\"},groupField:{type:String,default:\"\"},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:\"\"},loadtime:{type:String,default:\"auto\"},manual:{type:Boolean,default:!1}},data:()=>({mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:\"\",mixinDatacomPage:{}}),created(){this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((()=>{var e=[];return[\"pageCurrent\",\"pageSize\",\"localdata\",\"collection\",\"action\",\"field\",\"orderby\",\"where\",\"getont\",\"getcount\",\"gettree\",\"groupby\",\"groupField\",\"distinct\"].forEach((t=>{e.push(this[t])})),e}),((e,t)=>{if(this.loadtime===Pt)return;let n=!1;const s=[];for(let o=2;o{this.mixinDatacomLoading=!1;const{data:s,count:o}=n.result;this.getcount&&(this.mixinDatacomPage.count=o),this.mixinDatacomHasMore=s.length{this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=e,n&&n(e)})))},mixinDatacomGet(t={}){let n=e.database(this.spaceInfo);const s=t.action||this.action;s&&(n=n.action(s));const o=t.collection||this.collection;n=Array.isArray(o)?n.collection(...o):n.collection(o);const r=t.where||this.where;r&&Object.keys(r).length&&(n=n.where(r));const i=t.field||this.field;i&&(n=n.field(i));const a=t.foreignKey||this.foreignKey;a&&(n=n.foreignKey(a));const c=t.groupby||this.groupby;c&&(n=n.groupBy(c));const u=t.groupField||this.groupField;u&&(n=n.groupField(u));!0===(void 0!==t.distinct?t.distinct:this.distinct)&&(n=n.distinct());const l=t.orderby||this.orderby;l&&(n=n.orderBy(l));const h=void 0!==t.pageCurrent?t.pageCurrent:this.mixinDatacomPage.current,d=void 0!==t.pageSize?t.pageSize:this.mixinDatacomPage.size,f=void 0!==t.getcount?t.getcount:this.getcount,p=void 0!==t.gettree?t.gettree:this.gettree,g=void 0!==t.gettreepath?t.gettreepath:this.gettreepath,m={getCount:f},y={limitLevel:void 0!==t.limitlevel?t.limitlevel:this.limitlevel,startWith:void 0!==t.startwith?t.startwith:this.startwith};return p&&(m.getTree=y),g&&(m.getTreePath=y),n=n.skip(d*(h-1)).limit(d).get(m),n}}}}function Ot(e){return function(t,n={}){n=function(e,t={}){return e.customUI=t.customUI||e.customUI,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),e}({customUI:!1,loadingOptions:{title:\"加载中...\",mask:!0},errorOptions:{type:\"modal\",retry:!1}},n);const{customUI:s,loadingOptions:o,errorOptions:r}=n,a=!s;return new Proxy({},{get:(n,s)=>async function n(...c){let u;a&&uni.showLoading({title:o.title,mask:o.mask});try{u=await e.callFunction({name:t,type:i,data:{method:s,params:c}})}catch(e){u={result:e}}const{errCode:l,errMsg:h,newToken:d}=u.result||{};if(a&&uni.hideLoading(),d&&d.token&&d.tokenExpired&&Xe(d),l){if(a)if(\"toast\"===r.type)uni.showToast({title:h,icon:\"none\"});else{if(\"modal\"!==r.type)throw new Error(`Invalid errorOptions.type: ${r.type}`);{const{confirm:e}=await async function({title:e,content:t,showCancel:n,cancelText:s,confirmText:o}={}){return new Promise(((r,i)=>{uni.showModal({title:e,content:t,showCancel:n,cancelText:s,confirmText:o,success(e){r(e)},fail(){r({confirm:!1,cancel:!0})}})}))}({title:\"提示\",content:h,showCancel:r.retry,cancelText:\"取消\",confirmText:r.retry?\"重试\":\"确定\"});if(r.retry&&e)return n(...c)}}const e=new x({code:l,message:h,requestId:u.requestId});throw e.detail=u.result,U(I,{type:C,content:e}),e}return U(I,{type:C,content:u.result}),u.result}})}}async function bt(e,t){const n=`http://${e}:${t}/system/ping`;try{const e=await(s={url:n,timeout:500},new Promise(((e,t)=>{N.request({...s,success(t){e(t)},fail(e){t(e)}})})));return!(!e.data||0!==e.data.code)}catch(e){return!1}var s}function Ct(e){if(e.initUniCloudStatus&&\"rejected\"!==e.initUniCloudStatus)return;let t=Promise.resolve();var n;n=1,t=new Promise(((e,t)=>{setTimeout((()=>{e()}),n)})),e.isReady=!1,e.isDefault=!1;const s=e.auth();e.initUniCloudStatus=\"pending\",e.initUniCloud=t.then((()=>s.getLoginState())).then((e=>e?Promise.resolve():s.signInAnonymously())).then((()=>{if(!h)return Promise.resolve();if(h&&e.debugInfo){const{address:t,servePort:n}=e.debugInfo;return async function(e,t){let n;for(let s=0;s{if(!h)return Promise.resolve();if(t)e.localAddress=t,e.localPort=n;else if(e.debugInfo){const t=console[\"app-plus\"===d?\"error\":\"warn\"];let n=\"\";\"remote\"===e.debugInfo.initialLaunchType?(e.debugInfo.forceRemote=!0,n=\"当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\"):n=\"无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\",\"h5\"===d&&(n+=\"\\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式\"),t(n)}})).then((()=>{Ge(),e.isReady=!0,e.initUniCloudStatus=\"fulfilled\"})).catch((t=>{console.error(t),e.initUniCloudStatus=\"rejected\"}))}let Et=new class{init(e){let t={};const n=!1!==e.debugFunction&&h&&(\"h5\"===d&&navigator.userAgent.indexOf(\"HBuilderX\")>0||\"app-plus\"===d);switch(e.provider){case\"tcb\":case\"tencent\":t=Ve.init(Object.assign(e,{useDebugFunction:n}));break;case\"aliyun\":t=B.init(Object.assign(e,{useDebugFunction:n}));break;case\"private\":t=Ze.init(Object.assign(e,{useDebugFunction:n}));break;default:throw new Error(\"未提供正确的provider参数\")}const s=f;h&&s&&!s.code&&(t.debugInfo=s),Ct(t),t.reInit=function(){Ct(this)},at(t),function(e){const t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),_t(t),function(e){e.getCurrentUserInfo=Tt,e.chooseAndUploadFile=At.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return It(e)}}),e.importObject=Ot(e)}(t);return[\"callFunction\",\"uploadFile\",\"deleteFile\",\"getTempFileURL\",\"downloadFile\",\"chooseAndUploadFile\"].forEach((e=>{if(!t[e])return;const n=t[e];t[e]=function(){return t.reInit(),n.apply(t,Array.from(arguments))},t[e]=R(t[e],e).bind(t)})),t.init=this.init,t}};(()=>{{const e=p;let t={};if(1===e.length)t=e[0],Et=Et.init(t),Et.isDefault=!0;else{const t=[\"auth\",\"callFunction\",\"uploadFile\",\"deleteFile\",\"getTempFileURL\",\"downloadFile\",\"database\",\"getCurrentUSerInfo\",\"importObject\"];let n;n=e&&e.length>0?\"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间\":g?\"应用未关联服务空间,请在uniCloud目录右键关联服务空间\":\"uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间\",t.forEach((e=>{Et[e]=function(){return console.error(n),Promise.reject(new x({code:\"SYS_ERR\",message:n}))}}))}Object.assign(Et,{get mixinDatacom(){return It(Et)}}),wt(Et),Et.addInterceptor=S,Et.removeInterceptor=v,h&&\"h5\"===d&&(window.uniCloud=Et)}})();var Ut=Et;export{Ut as default};\n","/**\r\n * 通用uni-app网络请求\r\n * 基于 Promise 对象实现更简单的 request 使用方式,支持请求和响应拦截\r\n */\r\nimport config from \"./config.js\"\r\n\r\nfunction request(options,contentType = 'normal') {\r\n\t\r\n\toptions.url = config.baseUrl + options.url\r\n\toptions.header = {\r\n \t\t'Content-Type': contentType == 'json' ? 'application/json;charset=UTF-8' : 'application/x-www-form-urlencoded',\r\n\t\t'Authorization': 'Bearer ' + uni.getStorageSync('userToken') || '',\r\n\t}\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\tlet _config = null\r\n\r\n\t\toptions.complete = (response) => {\r\n\t\t\tlet statusCode = response.statusCode;\r\n\t\t\t\r\n\r\n\t\t\t// 测试环境打印:统一的响应日志记录\r\n\t\t\t_reslog(response)\r\n\r\n\t\t\tif (statusCode === 200) { //成功,返回服务器返回数据\r\n\t\t\t\tlet data = response.data\r\n\t\t\t\tif(data.code == 200){\r\n\t\t\t\t\tresolve(data);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treject(data)\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treject(response)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t_config = Object.assign({}, config, options)\r\n\r\n\t\t// 测试环境打印:统一的请求日志记录\r\n\t\t_reqlog(_config)\r\n\r\n\t\tuni.request(_config);\r\n\t});\r\n}\r\n\r\n/**\r\n * 请求接口日志记录\r\n */\r\nfunction _reqlog(req) {\r\n\tif (process.env.NODE_ENV === 'development') {\r\n\t\t// console.log(\"地址:\" + req.url)\r\n\t\t// console.log(\"请求参数:\" + JSON.stringify(req.data))\r\n\t}\r\n\r\n\t//TODO 调接口异步写入日志数据库\r\n}\r\n\r\n/**\r\n * 响应接口日志记录\r\n */\r\nfunction _reslog(res) {\r\n\tif (process.env.NODE_ENV === 'development') {\r\n\t\t// console.log(\"响应结果:\" + JSON.stringify(res.data))\r\n\t}\r\n}\r\n\r\n\r\nexport default {\r\n\tget(url, data = null, contentType = 'normal') {\r\n\t\tlet options = {\r\n\t\t\turl,\r\n\t\t\tdata,\r\n\t\t\tmethod: 'GET'\r\n\t\t}\r\n\t\treturn request(options, contentType)\r\n\t},\r\n\tpost(url, data = null, contentType = 'normal') {\r\n\t\tlet options = {\r\n\t\t\turl,\r\n\t\t\tdata,\r\n\t\t\tmethod: 'POST'\r\n\t\t}\r\n\t\treturn request(options, contentType)\r\n\t},\r\n\tput(url, data = null, contentType = 'normal') {\r\n\t\tlet options = {\r\n\t\t\turl,\r\n\t\t\tdata,\r\n\t\t\tmethod: 'PUT'\r\n\t\t}\r\n\t\treturn request(options, contentType)\r\n\t},\r\n\tdelete(url, data = null, contentType = 'normal') {\r\n\t\tlet options = {\r\n\t\t\turl,\r\n\t\t\tdata,\r\n\t\t\tmethod: 'DELETE'\r\n\t\t}\r\n\t\treturn request(options, contentType)\r\n\t}\r\n}\r\n","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// This method of obtaining a reference to the global object needs to be\n// kept identical to the way it is obtained in runtime.js\nvar g = (function() {\n return this || (typeof self === \"object\" && self);\n})() || Function(\"return this\")();\n\n// Use `getOwnPropertyNames` because not all browsers support calling\n// `hasOwnProperty` on the global `self` object in a worker. See #183.\nvar hadRuntime = g.regeneratorRuntime &&\n Object.getOwnPropertyNames(g).indexOf(\"regeneratorRuntime\") >= 0;\n\n// Save the old regeneratorRuntime in case it needs to be restored later.\nvar oldRuntime = hadRuntime && g.regeneratorRuntime;\n\n// Force reevalutation of runtime.js.\ng.regeneratorRuntime = undefined;\n\nmodule.exports = require(\"./runtime\");\n\nif (hadRuntime) {\n // Restore the original runtime.\n g.regeneratorRuntime = oldRuntime;\n} else {\n // Remove the global property added by runtime.js.\n try {\n delete g.regeneratorRuntime;\n } catch(e) {\n g.regeneratorRuntime = undefined;\n }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // In sloppy mode, unbound `this` refers to the global object, fallback to\n // Function constructor if we're in global strict mode. That is sadly a form\n // of indirect eval which violates Content Security Policy.\n (function() {\n return this || (typeof self === \"object\" && self);\n })() || Function(\"return this\")()\n);\n","export default {\"appid\":\"__UNI__ECB7EC0\"}","export default { \r\n\t// baseUrl :process.env.NODE_ENV === 'development' ? \"https://wechat.myshipping.net:8860\": \"http://djy-identity.myshipping.net\",\r\n\tbaseUrl :process.env.NODE_ENV === 'development' ? \"https://wechat.myshipping.net:8860\": \"https://wechat.myshipping.net:8860\",\r\n \t// header: {\r\n \t// \t'Content-Type': 'application/json;charset=UTF-8',\r\n \t// },\r\n \tdataType: \"json\",\r\n \t/* 如设为json,会对返回的数据做一次 JSON.parse */\r\n \tresponseType: \"text\"\r\n }","const isArray = Array.isArray;\r\nconst isObject = (val) => val !== null && typeof val === 'object';\r\nconst defaultDelimiters = ['{', '}'];\r\nclass BaseFormatter {\r\n constructor() {\r\n this._caches = Object.create(null);\r\n }\r\n interpolate(message, values, delimiters = defaultDelimiters) {\r\n if (!values) {\r\n return [message];\r\n }\r\n let tokens = this._caches[message];\r\n if (!tokens) {\r\n tokens = parse(message, delimiters);\r\n this._caches[message] = tokens;\r\n }\r\n return compile(tokens, values);\r\n }\r\n}\r\nconst RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\r\nconst RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\r\nfunction parse(format, [startDelimiter, endDelimiter]) {\r\n const tokens = [];\r\n let position = 0;\r\n let text = '';\r\n while (position < format.length) {\r\n let char = format[position++];\r\n if (char === startDelimiter) {\r\n if (text) {\r\n tokens.push({ type: 'text', value: text });\r\n }\r\n text = '';\r\n let sub = '';\r\n char = format[position++];\r\n while (char !== undefined && char !== endDelimiter) {\r\n sub += char;\r\n char = format[position++];\r\n }\r\n const isClosed = char === endDelimiter;\r\n const type = RE_TOKEN_LIST_VALUE.test(sub)\r\n ? 'list'\r\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\r\n ? 'named'\r\n : 'unknown';\r\n tokens.push({ value: sub, type });\r\n }\r\n // else if (char === '%') {\r\n // // when found rails i18n syntax, skip text capture\r\n // if (format[position] !== '{') {\r\n // text += char\r\n // }\r\n // }\r\n else {\r\n text += char;\r\n }\r\n }\r\n text && tokens.push({ type: 'text', value: text });\r\n return tokens;\r\n}\r\nfunction compile(tokens, values) {\r\n const compiled = [];\r\n let index = 0;\r\n const mode = isArray(values)\r\n ? 'list'\r\n : isObject(values)\r\n ? 'named'\r\n : 'unknown';\r\n if (mode === 'unknown') {\r\n return compiled;\r\n }\r\n while (index < tokens.length) {\r\n const token = tokens[index];\r\n switch (token.type) {\r\n case 'text':\r\n compiled.push(token.value);\r\n break;\r\n case 'list':\r\n compiled.push(values[parseInt(token.value, 10)]);\r\n break;\r\n case 'named':\r\n if (mode === 'named') {\r\n compiled.push(values[token.value]);\r\n }\r\n else {\r\n if (process.env.NODE_ENV !== 'production') {\r\n console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);\r\n }\r\n }\r\n break;\r\n case 'unknown':\r\n if (process.env.NODE_ENV !== 'production') {\r\n console.warn(`Detect 'unknown' type of token!`);\r\n }\r\n break;\r\n }\r\n index++;\r\n }\r\n return compiled;\r\n}\r\n\r\nconst LOCALE_ZH_HANS = 'zh-Hans';\r\nconst LOCALE_ZH_HANT = 'zh-Hant';\r\nconst LOCALE_EN = 'en';\r\nconst LOCALE_FR = 'fr';\r\nconst LOCALE_ES = 'es';\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\r\nconst defaultFormatter = new BaseFormatter();\r\nfunction include(str, parts) {\r\n return !!parts.find((part) => str.indexOf(part) !== -1);\r\n}\r\nfunction startsWith(str, parts) {\r\n return parts.find((part) => str.indexOf(part) === 0);\r\n}\r\nfunction normalizeLocale(locale, messages) {\r\n if (!locale) {\r\n return;\r\n }\r\n locale = locale.trim().replace(/_/g, '-');\r\n if (messages && messages[locale]) {\r\n return locale;\r\n }\r\n locale = locale.toLowerCase();\r\n if (locale.indexOf('zh') === 0) {\r\n if (locale.indexOf('-hans') > -1) {\r\n return LOCALE_ZH_HANS;\r\n }\r\n if (locale.indexOf('-hant') > -1) {\r\n return LOCALE_ZH_HANT;\r\n }\r\n if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {\r\n return LOCALE_ZH_HANT;\r\n }\r\n return LOCALE_ZH_HANS;\r\n }\r\n const lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);\r\n if (lang) {\r\n return lang;\r\n }\r\n}\r\nclass I18n {\r\n constructor({ locale, fallbackLocale, messages, watcher, formater, }) {\r\n this.locale = LOCALE_EN;\r\n this.fallbackLocale = LOCALE_EN;\r\n this.message = {};\r\n this.messages = {};\r\n this.watchers = [];\r\n if (fallbackLocale) {\r\n this.fallbackLocale = fallbackLocale;\r\n }\r\n this.formater = formater || defaultFormatter;\r\n this.messages = messages || {};\r\n this.setLocale(locale || LOCALE_EN);\r\n if (watcher) {\r\n this.watchLocale(watcher);\r\n }\r\n }\r\n setLocale(locale) {\r\n const oldLocale = this.locale;\r\n this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;\r\n if (!this.messages[this.locale]) {\r\n // 可能初始化时不存在\r\n this.messages[this.locale] = {};\r\n }\r\n this.message = this.messages[this.locale];\r\n // 仅发生变化时,通知\r\n if (oldLocale !== this.locale) {\r\n this.watchers.forEach((watcher) => {\r\n watcher(this.locale, oldLocale);\r\n });\r\n }\r\n }\r\n getLocale() {\r\n return this.locale;\r\n }\r\n watchLocale(fn) {\r\n const index = this.watchers.push(fn) - 1;\r\n return () => {\r\n this.watchers.splice(index, 1);\r\n };\r\n }\r\n add(locale, message, override = true) {\r\n const curMessages = this.messages[locale];\r\n if (curMessages) {\r\n if (override) {\r\n Object.assign(curMessages, message);\r\n }\r\n else {\r\n Object.keys(message).forEach((key) => {\r\n if (!hasOwn(curMessages, key)) {\r\n curMessages[key] = message[key];\r\n }\r\n });\r\n }\r\n }\r\n else {\r\n this.messages[locale] = message;\r\n }\r\n }\r\n f(message, values, delimiters) {\r\n return this.formater.interpolate(message, values, delimiters).join('');\r\n }\r\n t(key, locale, values) {\r\n let message = this.message;\r\n if (typeof locale === 'string') {\r\n locale = normalizeLocale(locale, this.messages);\r\n locale && (message = this.messages[locale]);\r\n }\r\n else {\r\n values = locale;\r\n }\r\n if (!hasOwn(message, key)) {\r\n console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);\r\n return key;\r\n }\r\n return this.formater.interpolate(message[key], values).join('');\r\n }\r\n}\r\n\r\nfunction watchAppLocale(appVm, i18n) {\r\n // 需要保证 watch 的触发在组件渲染之前\r\n if (appVm.$watchLocale) {\r\n // vue2\r\n appVm.$watchLocale((newLocale) => {\r\n i18n.setLocale(newLocale);\r\n });\r\n }\r\n else {\r\n appVm.$watch(() => appVm.$locale, (newLocale) => {\r\n i18n.setLocale(newLocale);\r\n });\r\n }\r\n}\r\nfunction getDefaultLocale() {\r\n if (typeof uni !== 'undefined' && uni.getLocale) {\r\n return uni.getLocale();\r\n }\r\n // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale\r\n if (typeof global !== 'undefined' && global.getLocale) {\r\n return global.getLocale();\r\n }\r\n return LOCALE_EN;\r\n}\r\nfunction initVueI18n(locale, messages = {}, fallbackLocale, watcher) {\r\n // 兼容旧版本入参\r\n if (typeof locale !== 'string') {\r\n [locale, messages] = [\r\n messages,\r\n locale,\r\n ];\r\n }\r\n if (typeof locale !== 'string') {\r\n // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined\r\n locale = getDefaultLocale();\r\n }\r\n if (typeof fallbackLocale !== 'string') {\r\n fallbackLocale =\r\n (typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale) ||\r\n LOCALE_EN;\r\n }\r\n const i18n = new I18n({\r\n locale,\r\n fallbackLocale,\r\n messages,\r\n watcher,\r\n });\r\n let t = (key, values) => {\r\n if (typeof getApp !== 'function') {\r\n // app view\r\n /* eslint-disable no-func-assign */\r\n t = function (key, values) {\r\n return i18n.t(key, values);\r\n };\r\n }\r\n else {\r\n let isWatchedAppLocale = false;\r\n t = function (key, values) {\r\n const appVm = getApp().$vm;\r\n // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化\r\n // options: {\r\n // \ttype: Array,\r\n // \tdefault () {\r\n // \t\treturn [{\r\n // \t\t\ticon: 'shop',\r\n // \t\t\ttext: t(\"uni-goods-nav.options.shop\"),\r\n // \t\t}, {\r\n // \t\t\ticon: 'cart',\r\n // \t\t\ttext: t(\"uni-goods-nav.options.cart\")\r\n // \t\t}]\r\n // \t}\r\n // },\r\n if (appVm) {\r\n // 触发响应式\r\n appVm.$locale;\r\n if (!isWatchedAppLocale) {\r\n isWatchedAppLocale = true;\r\n watchAppLocale(appVm, i18n);\r\n }\r\n }\r\n return i18n.t(key, values);\r\n };\r\n }\r\n return t(key, values);\r\n };\r\n return {\r\n i18n,\r\n f(message, values, delimiters) {\r\n return i18n.f(message, values, delimiters);\r\n },\r\n t(key, values) {\r\n return t(key, values);\r\n },\r\n add(locale, message, override = true) {\r\n return i18n.add(locale, message, override);\r\n },\r\n watch(fn) {\r\n return i18n.watchLocale(fn);\r\n },\r\n getLocale() {\r\n return i18n.getLocale();\r\n },\r\n setLocale(newLocale) {\r\n return i18n.setLocale(newLocale);\r\n },\r\n };\r\n}\r\n\r\nconst isString = (val) => typeof val === 'string';\r\nlet formater;\r\nfunction hasI18nJson(jsonObj, delimiters) {\r\n if (!formater) {\r\n formater = new BaseFormatter();\r\n }\r\n return walkJsonObj(jsonObj, (jsonObj, key) => {\r\n const value = jsonObj[key];\r\n if (isString(value)) {\r\n if (isI18nStr(value, delimiters)) {\r\n return true;\r\n }\r\n }\r\n else {\r\n return hasI18nJson(value, delimiters);\r\n }\r\n });\r\n}\r\nfunction parseI18nJson(jsonObj, values, delimiters) {\r\n if (!formater) {\r\n formater = new BaseFormatter();\r\n }\r\n walkJsonObj(jsonObj, (jsonObj, key) => {\r\n const value = jsonObj[key];\r\n if (isString(value)) {\r\n if (isI18nStr(value, delimiters)) {\r\n jsonObj[key] = compileStr(value, values, delimiters);\r\n }\r\n }\r\n else {\r\n parseI18nJson(value, values, delimiters);\r\n }\r\n });\r\n return jsonObj;\r\n}\r\nfunction compileI18nJsonStr(jsonStr, { locale, locales, delimiters, }) {\r\n if (!isI18nStr(jsonStr, delimiters)) {\r\n return jsonStr;\r\n }\r\n if (!formater) {\r\n formater = new BaseFormatter();\r\n }\r\n const localeValues = [];\r\n Object.keys(locales).forEach((name) => {\r\n if (name !== locale) {\r\n localeValues.push({\r\n locale: name,\r\n values: locales[name],\r\n });\r\n }\r\n });\r\n localeValues.unshift({ locale, values: locales[locale] });\r\n try {\r\n return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);\r\n }\r\n catch (e) { }\r\n return jsonStr;\r\n}\r\nfunction isI18nStr(value, delimiters) {\r\n return value.indexOf(delimiters[0]) > -1;\r\n}\r\nfunction compileStr(value, values, delimiters) {\r\n return formater.interpolate(value, values, delimiters).join('');\r\n}\r\nfunction compileValue(jsonObj, key, localeValues, delimiters) {\r\n const value = jsonObj[key];\r\n if (isString(value)) {\r\n // 存在国际化\r\n if (isI18nStr(value, delimiters)) {\r\n jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);\r\n if (localeValues.length > 1) {\r\n // 格式化国际化语言\r\n const valueLocales = (jsonObj[key + 'Locales'] = {});\r\n localeValues.forEach((localValue) => {\r\n valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);\r\n });\r\n }\r\n }\r\n }\r\n else {\r\n compileJsonObj(value, localeValues, delimiters);\r\n }\r\n}\r\nfunction compileJsonObj(jsonObj, localeValues, delimiters) {\r\n walkJsonObj(jsonObj, (jsonObj, key) => {\r\n compileValue(jsonObj, key, localeValues, delimiters);\r\n });\r\n return jsonObj;\r\n}\r\nfunction walkJsonObj(jsonObj, walk) {\r\n if (isArray(jsonObj)) {\r\n for (let i = 0; i < jsonObj.length; i++) {\r\n if (walk(jsonObj, i)) {\r\n return true;\r\n }\r\n }\r\n }\r\n else if (isObject(jsonObj)) {\r\n for (const key in jsonObj) {\r\n if (walk(jsonObj, key)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nfunction resolveLocale(locales) {\r\n return (locale) => {\r\n if (!locale) {\r\n return locale;\r\n }\r\n locale = normalizeLocale(locale) || locale;\r\n return resolveLocaleChain(locale).find((locale) => locales.indexOf(locale) > -1);\r\n };\r\n}\r\nfunction resolveLocaleChain(locale) {\r\n const chain = [];\r\n const tokens = locale.split('-');\r\n while (tokens.length) {\r\n chain.push(tokens.join('-'));\r\n tokens.pop();\r\n }\r\n return chain;\r\n}\r\n\r\nexport { BaseFormatter as Formatter, I18n, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT, compileI18nJsonStr, hasI18nJson, initVueI18n, isI18nStr, isString, normalizeLocale, parseI18nJson, resolveLocale };\r\n","/*!\n * Vue.js v2.6.11\n * (c) 2014-2022 Evan You\n * Released under the MIT License.\n */\n/* */\n\nvar emptyObject = Object.freeze({});\n\n// These helpers produce better VM code in JS engines due to their\n// explicitness and function inlining.\nfunction isUndef (v) {\n return v === undefined || v === null\n}\n\nfunction isDef (v) {\n return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n return v === true\n}\n\nfunction isFalse (v) {\n return v === false\n}\n\n/**\n * Check if value is primitive.\n */\nfunction isPrimitive (value) {\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n // $flow-disable-line\n typeof value === 'symbol' ||\n typeof value === 'boolean'\n )\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Get the raw type string of a value, e.g., [object Object].\n */\nvar _toString = Object.prototype.toString;\n\nfunction toRawType (value) {\n return _toString.call(value).slice(8, -1)\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject (obj) {\n return _toString.call(obj) === '[object Object]'\n}\n\nfunction isRegExp (v) {\n return _toString.call(v) === '[object RegExp]'\n}\n\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex (val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val)\n}\n\nfunction isPromise (val) {\n return (\n isDef(val) &&\n typeof val.then === 'function' &&\n typeof val.catch === 'function'\n )\n}\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString (val) {\n return val == null\n ? ''\n : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)\n ? JSON.stringify(val, null, 2)\n : String(val)\n}\n\n/**\n * Convert an input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n var n = parseFloat(val);\n return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n str,\n expectsLowerCase\n) {\n var map = Object.create(null);\n var list = str.split(',');\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase\n ? function (val) { return map[val.toLowerCase()]; }\n : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Check if an attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n\n/**\n * Remove an item from an array.\n */\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\n/**\n * Check whether an object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n var cache = Object.create(null);\n return (function cachedFn (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str))\n })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n});\n\n/**\n * Simple bind polyfill for environments that do not support it,\n * e.g., PhantomJS 1.x. Technically, we don't need this anymore\n * since native bind is now performant enough in most browsers.\n * But removing it would mean breaking code that was able to run in\n * PhantomJS 1.x, so this must be kept for backward compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind (fn, ctx) {\n function boundFn (a) {\n var l = arguments.length;\n return l\n ? l > 1\n ? fn.apply(ctx, arguments)\n : fn.call(ctx, a)\n : fn.call(ctx)\n }\n\n boundFn._length = fn.length;\n return boundFn\n}\n\nfunction nativeBind (fn, ctx) {\n return fn.bind(ctx)\n}\n\nvar bind = Function.prototype.bind\n ? nativeBind\n : polyfillBind;\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n for (var key in _from) {\n to[key] = _from[key];\n }\n return to\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n}\n\n/* eslint-disable no-unused-vars */\n\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).\n */\nfunction noop (a, b, c) {}\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n\n/* eslint-enable no-unused-vars */\n\n/**\n * Return the same value.\n */\nvar identity = function (_) { return _; };\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Return the first index at which a loosely equal value can be\n * found in the array (if value is a plain object, the array must\n * contain an object of the same shape), or -1 if it is not present.\n */\nfunction looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n}\n\nvar ASSET_TYPES = [\n 'component',\n 'directive',\n 'filter'\n];\n\nvar LIFECYCLE_HOOKS = [\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeUpdate',\n 'updated',\n 'beforeDestroy',\n 'destroyed',\n 'activated',\n 'deactivated',\n 'errorCaptured',\n 'serverPrefetch'\n];\n\n/* */\n\n\n\nvar config = ({\n /**\n * Option merge strategies (used in core/util/options)\n */\n // $flow-disable-line\n optionMergeStrategies: Object.create(null),\n\n /**\n * Whether to suppress warnings.\n */\n silent: false,\n\n /**\n * Show production mode tip message on boot?\n */\n productionTip: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to enable devtools\n */\n devtools: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to record perf\n */\n performance: false,\n\n /**\n * Error handler for watcher errors\n */\n errorHandler: null,\n\n /**\n * Warn handler for watcher warns\n */\n warnHandler: null,\n\n /**\n * Ignore certain custom elements\n */\n ignoredElements: [],\n\n /**\n * Custom user key aliases for v-on\n */\n // $flow-disable-line\n keyCodes: Object.create(null),\n\n /**\n * Check if a tag is reserved so that it cannot be registered as a\n * component. This is platform-dependent and may be overwritten.\n */\n isReservedTag: no,\n\n /**\n * Check if an attribute is reserved so that it cannot be used as a component\n * prop. This is platform-dependent and may be overwritten.\n */\n isReservedAttr: no,\n\n /**\n * Check if a tag is an unknown element.\n * Platform-dependent.\n */\n isUnknownElement: no,\n\n /**\n * Get the namespace of an element\n */\n getTagNamespace: noop,\n\n /**\n * Parse the real tag name for the specific platform.\n */\n parsePlatformTagName: identity,\n\n /**\n * Check if an attribute must be bound using property, e.g. value\n * Platform-dependent.\n */\n mustUseProp: no,\n\n /**\n * Perform updates asynchronously. Intended to be used by Vue Test Utils\n * This will significantly reduce performance if set to false.\n */\n async: true,\n\n /**\n * Exposed for legacy reasons\n */\n _lifecycleHooks: LIFECYCLE_HOOKS\n});\n\n/* */\n\n/**\n * unicode letters used for parsing html tags, component names and property paths.\n * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname\n * skipping \\u10000-\\uEFFFF due to it freezing up PhantomJS\n */\nvar unicodeRegExp = /a-zA-Z\\u00B7\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD/;\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n var c = (str + '').charCodeAt(0);\n return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n Object.defineProperty(obj, key, {\n value: val,\n enumerable: !!enumerable,\n writable: true,\n configurable: true\n });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = new RegExp((\"[^\" + (unicodeRegExp.source) + \".$_\\\\d]\"));\nfunction parsePath (path) {\n if (bailRE.test(path)) {\n return\n }\n var segments = path.split('.');\n return function (obj) {\n for (var i = 0; i < segments.length; i++) {\n if (!obj) { return }\n obj = obj[segments[i]];\n }\n return obj\n }\n}\n\n/* */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\nvar weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');\nvar isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\nvar isPhantomJS = UA && /phantomjs/.test(UA);\nvar isFF = UA && UA.match(/firefox\\/(\\d+)/);\n\n// Firefox has a \"watch\" function on Object.prototype...\nvar nativeWatch = ({}).watch;\nif (inBrowser) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', ({\n get: function get () {\n }\n })); // https://github.com/facebook/flow/issues/285\n window.addEventListener('test-passive', null, opts);\n } catch (e) {}\n}\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n if (_isServer === undefined) {\n /* istanbul ignore if */\n if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n // detect presence of vue-server-renderer and avoid\n // Webpack shimming the process\n _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';\n } else {\n _isServer = false;\n }\n }\n return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n typeof Symbol !== 'undefined' && isNative(Symbol) &&\n typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\nvar _Set;\n/* istanbul ignore if */ // $flow-disable-line\nif (typeof Set !== 'undefined' && isNative(Set)) {\n // use native Set when available.\n _Set = Set;\n} else {\n // a non-standard Set polyfill that only works with primitive keys.\n _Set = /*@__PURE__*/(function () {\n function Set () {\n this.set = Object.create(null);\n }\n Set.prototype.has = function has (key) {\n return this.set[key] === true\n };\n Set.prototype.add = function add (key) {\n this.set[key] = true;\n };\n Set.prototype.clear = function clear () {\n this.set = Object.create(null);\n };\n\n return Set;\n }());\n}\n\n/* */\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace = (noop); // work around flow check\nvar formatComponentName = (noop);\n\nif (process.env.NODE_ENV !== 'production') {\n var hasConsole = typeof console !== 'undefined';\n var classifyRE = /(?:^|[-_])(\\w)/g;\n var classify = function (str) { return str\n .replace(classifyRE, function (c) { return c.toUpperCase(); })\n .replace(/[-_]/g, ''); };\n\n warn = function (msg, vm) {\n var trace = vm ? generateComponentTrace(vm) : '';\n\n if (config.warnHandler) {\n config.warnHandler.call(null, msg, vm, trace);\n } else if (hasConsole && (!config.silent)) {\n console.error((\"[Vue warn]: \" + msg + trace));\n }\n };\n\n tip = function (msg, vm) {\n if (hasConsole && (!config.silent)) {\n console.warn(\"[Vue tip]: \" + msg + (\n vm ? generateComponentTrace(vm) : ''\n ));\n }\n };\n\n formatComponentName = function (vm, includeFile) {\n if (vm.$root === vm) {\n if (vm.$options && vm.$options.__file) { // fixed by xxxxxx\n return ('') + vm.$options.__file\n }\n return ''\n }\n var options = typeof vm === 'function' && vm.cid != null\n ? vm.options\n : vm._isVue\n ? vm.$options || vm.constructor.options\n : vm;\n var name = options.name || options._componentTag;\n var file = options.__file;\n if (!name && file) {\n var match = file.match(/([^/\\\\]+)\\.vue$/);\n name = match && match[1];\n }\n\n return (\n (name ? (\"<\" + (classify(name)) + \">\") : \"\") +\n (file && includeFile !== false ? (\" at \" + file) : '')\n )\n };\n\n var repeat = function (str, n) {\n var res = '';\n while (n) {\n if (n % 2 === 1) { res += str; }\n if (n > 1) { str += str; }\n n >>= 1;\n }\n return res\n };\n\n generateComponentTrace = function (vm) {\n if (vm._isVue && vm.$parent) {\n var tree = [];\n var currentRecursiveSequence = 0;\n while (vm && vm.$options.name !== 'PageBody') {\n if (tree.length > 0) {\n var last = tree[tree.length - 1];\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent;\n continue\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n !vm.$options.isReserved && tree.push(vm);\n vm = vm.$parent;\n }\n return '\\n\\nfound in\\n\\n' + tree\n .map(function (vm, i) { return (\"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)\n ? ((formatComponentName(vm[0])) + \"... (\" + (vm[1]) + \" recursive calls)\")\n : formatComponentName(vm))); })\n .join('\\n')\n } else {\n return (\"\\n\\n(found in \" + (formatComponentName(vm)) + \")\")\n }\n };\n}\n\n/* */\n\nvar uid = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n this.id = uid++;\n this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n if (Dep.SharedObject.target) {\n Dep.SharedObject.target.addDep(this);\n }\n};\n\nDep.prototype.notify = function notify () {\n // stabilize the subscriber list first\n var subs = this.subs.slice();\n if (process.env.NODE_ENV !== 'production' && !config.async) {\n // subs aren't sorted in scheduler if not running async\n // we need to sort them now to make sure they fire in correct\n // order\n subs.sort(function (a, b) { return a.id - b.id; });\n }\n for (var i = 0, l = subs.length; i < l; i++) {\n subs[i].update();\n }\n};\n\n// The current target watcher being evaluated.\n// This is globally unique because only one watcher\n// can be evaluated at a time.\n// fixed by xxxxxx (nvue shared vuex)\n/* eslint-disable no-undef */\nDep.SharedObject = {};\nDep.SharedObject.target = null;\nDep.SharedObject.targetStack = [];\n\nfunction pushTarget (target) {\n Dep.SharedObject.targetStack.push(target);\n Dep.SharedObject.target = target;\n Dep.target = target;\n}\n\nfunction popTarget () {\n Dep.SharedObject.targetStack.pop();\n Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];\n Dep.target = Dep.SharedObject.target;\n}\n\n/* */\n\nvar VNode = function VNode (\n tag,\n data,\n children,\n text,\n elm,\n context,\n componentOptions,\n asyncFactory\n) {\n this.tag = tag;\n this.data = data;\n this.children = children;\n this.text = text;\n this.elm = elm;\n this.ns = undefined;\n this.context = context;\n this.fnContext = undefined;\n this.fnOptions = undefined;\n this.fnScopeId = undefined;\n this.key = data && data.key;\n this.componentOptions = componentOptions;\n this.componentInstance = undefined;\n this.parent = undefined;\n this.raw = false;\n this.isStatic = false;\n this.isRootInsert = true;\n this.isComment = false;\n this.isCloned = false;\n this.isOnce = false;\n this.asyncFactory = asyncFactory;\n this.asyncMeta = undefined;\n this.isAsyncPlaceholder = false;\n};\n\nvar prototypeAccessors = { child: { configurable: true } };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function (text) {\n if ( text === void 0 ) text = '';\n\n var node = new VNode();\n node.text = text;\n node.isComment = true;\n return node\n};\n\nfunction createTextVNode (val) {\n return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n // #7975\n // clone children array to avoid mutating original in case of cloning\n // a child.\n vnode.children && vnode.children.slice(),\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.asyncMeta = vnode.asyncMeta;\n cloned.isCloned = true;\n return cloned\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\n\nvar methodsToPatch = [\n 'push',\n 'pop',\n 'shift',\n 'unshift',\n 'splice',\n 'sort',\n 'reverse'\n];\n\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n // cache original method\n var original = arrayProto[method];\n def(arrayMethods, method, function mutator () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var result = original.apply(this, args);\n var ob = this.__ob__;\n var inserted;\n switch (method) {\n case 'push':\n case 'unshift':\n inserted = args;\n break\n case 'splice':\n inserted = args.slice(2);\n break\n }\n if (inserted) { ob.observeArray(inserted); }\n // notify change\n ob.dep.notify();\n return result\n });\n});\n\n/* */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\n\nfunction toggleObserving (value) {\n shouldObserve = value;\n}\n\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = function Observer (value) {\n this.value = value;\n this.dep = new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n if (Array.isArray(value)) {\n if (hasProto) {\n {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑\n if(value.push !== value.__proto__.push){\n copyAugment(value, arrayMethods, arrayKeys);\n } else {\n protoAugment(value, arrayMethods);\n }\n }\n } else {\n copyAugment(value, arrayMethods, arrayKeys);\n }\n this.observeArray(value);\n } else {\n this.walk(value);\n }\n};\n\n/**\n * Walk through all properties and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n defineReactive$$1(obj, keys[i]);\n }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n for (var i = 0, l = items.length; i < l; i++) {\n observe(items[i]);\n }\n};\n\n// helpers\n\n/**\n * Augment a target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}\n\n/**\n * Augment a target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n def(target, key, src[key]);\n }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive$$1 (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n var setter = property && property.set;\n if ((!getter || setter) && arguments.length === 2) {\n val = obj[key];\n }\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.SharedObject.target) { // fixed by xxxxxx\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n // #7981: for accessor properties without setter\n if (getter && !setter) { return }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot set reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val\n }\n if (key in target && !(key in Object.prototype)) {\n target[key] = val;\n return val\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return val\n }\n if (!ob) {\n target[key] = val;\n return val\n }\n defineReactive$$1(ob.value, key, val);\n ob.dep.notify();\n return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n}\n\n/* */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n strats.el = strats.propsData = function (parent, child, vm, key) {\n if (!vm) {\n warn(\n \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n 'creation with the `new` keyword.'\n );\n }\n return defaultStrat(parent, child)\n };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}\n\n/**\n * Data\n */\nfunction mergeDataOrFn (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n // in a Vue.extend merge, both should be functions\n if (!childVal) {\n return parentVal\n }\n if (!parentVal) {\n return childVal\n }\n // when parentVal & childVal are both present,\n // we need to return a function that returns the\n // merged result of both functions... no need to\n // check if parentVal is a function here because\n // it has to be a function to pass previous merges.\n return function mergedDataFn () {\n return mergeData(\n typeof childVal === 'function' ? childVal.call(this, this) : childVal,\n typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal\n )\n }\n } else {\n return function mergedInstanceDataFn () {\n // instance merge\n var instanceData = typeof childVal === 'function'\n ? childVal.call(vm, vm)\n : childVal;\n var defaultData = typeof parentVal === 'function'\n ? parentVal.call(vm, vm)\n : parentVal;\n if (instanceData) {\n return mergeData(instanceData, defaultData)\n } else {\n return defaultData\n }\n }\n }\n}\n\nstrats.data = function (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n if (childVal && typeof childVal !== 'function') {\n process.env.NODE_ENV !== 'production' && warn(\n 'The \"data\" option should be a function ' +\n 'that returns a per-instance value in component ' +\n 'definitions.',\n vm\n );\n\n return parentVal\n }\n return mergeDataOrFn(parentVal, childVal)\n }\n\n return mergeDataOrFn(parentVal, childVal, vm)\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n parentVal,\n childVal\n) {\n var res = childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal;\n return res\n ? dedupeHooks(res)\n : res\n}\n\nfunction dedupeHooks (hooks) {\n var res = [];\n for (var i = 0; i < hooks.length; i++) {\n if (res.indexOf(hooks[i]) === -1) {\n res.push(hooks[i]);\n }\n }\n return res\n}\n\nLIFECYCLE_HOOKS.forEach(function (hook) {\n strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}\n\nASSET_TYPES.forEach(function (type) {\n strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n // work around Firefox's Object.prototype.watch...\n if (parentVal === nativeWatch) { parentVal = undefined; }\n if (childVal === nativeWatch) { childVal = undefined; }\n /* istanbul ignore if */\n if (!childVal) { return Object.create(parentVal || null) }\n if (process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = {};\n extend(ret, parentVal);\n for (var key$1 in childVal) {\n var parent = ret[key$1];\n var child = childVal[key$1];\n if (parent && !Array.isArray(parent)) {\n parent = [parent];\n }\n ret[key$1] = parent\n ? parent.concat(child)\n : Array.isArray(child) ? child : [child];\n }\n return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.inject =\nstrats.computed = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n if (childVal && process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = Object.create(null);\n extend(ret, parentVal);\n if (childVal) { extend(ret, childVal); }\n return ret\n};\nstrats.provide = mergeDataOrFn;\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n for (var key in options.components) {\n validateComponentName(key);\n }\n}\n\nfunction validateComponentName (name) {\n if (!new RegExp((\"^[a-zA-Z][\\\\-\\\\.0-9_\" + (unicodeRegExp.source) + \"]*$\")).test(name)) {\n warn(\n 'Invalid component name: \"' + name + '\". Component names ' +\n 'should conform to valid custom element name in html5 specification.'\n );\n }\n if (isBuiltInTag(name) || config.isReservedTag(name)) {\n warn(\n 'Do not use built-in or reserved HTML elements as component ' +\n 'id: ' + name\n );\n }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n var dirs = options.directives;\n if (dirs) {\n for (var key in dirs) {\n var def$$1 = dirs[key];\n if (typeof def$$1 === 'function') {\n dirs[key] = { bind: def$$1, update: def$$1 };\n }\n }\n }\n}\n\nfunction assertObjectType (name, value, vm) {\n if (!isPlainObject(value)) {\n warn(\n \"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" +\n \"but got \" + (toRawType(value)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n parent,\n child,\n vm\n) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n\n // Apply extends and mixins on the child options,\n // but only if it is a raw options object that isn't\n // the result of another mergeOptions call.\n // Only merged options has the _base property.\n if (!child._base) {\n if (child.extends) {\n parent = mergeOptions(parent, child.extends, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n }\n\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}\n\n/* */\n\n\n\nfunction validateProp (\n key,\n propOptions,\n propsData,\n vm\n) {\n var prop = propOptions[key];\n var absent = !hasOwn(propsData, key);\n var value = propsData[key];\n // boolean casting\n var booleanIndex = getTypeIndex(Boolean, prop.type);\n if (booleanIndex > -1) {\n if (absent && !hasOwn(prop, 'default')) {\n value = false;\n } else if (value === '' || value === hyphenate(key)) {\n // only cast empty string / same name to boolean if\n // boolean has higher priority\n var stringIndex = getTypeIndex(String, prop.type);\n if (stringIndex < 0 || booleanIndex < stringIndex) {\n value = true;\n }\n }\n }\n // check default value\n if (value === undefined) {\n value = getPropDefaultValue(vm, prop, key);\n // since the default value is a fresh copy,\n // make sure to observe it.\n var prevShouldObserve = shouldObserve;\n toggleObserving(true);\n observe(value);\n toggleObserving(prevShouldObserve);\n }\n if (\n process.env.NODE_ENV !== 'production' &&\n // skip validation for weex recycle-list child component props\n !(false)\n ) {\n assertProp(prop, key, value, vm, absent);\n }\n return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n\n if (!valid) {\n warn(\n getInvalidTypeMessage(name, value, expectedTypes),\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}\n\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;\n\nfunction assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (simpleCheckRE.test(expectedType)) {\n var t = typeof value;\n valid = t === expectedType.toLowerCase();\n // for primitive wrapper objects\n if (!valid && t === 'object') {\n valid = value instanceof type;\n }\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}\n\nfunction isSameType (a, b) {\n return getType(a) === getType(b)\n}\n\nfunction getTypeIndex (type, expectedTypes) {\n if (!Array.isArray(expectedTypes)) {\n return isSameType(expectedTypes, type) ? 0 : -1\n }\n for (var i = 0, len = expectedTypes.length; i < len; i++) {\n if (isSameType(expectedTypes[i], type)) {\n return i\n }\n }\n return -1\n}\n\nfunction getInvalidTypeMessage (name, value, expectedTypes) {\n var message = \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', '));\n var expectedType = expectedTypes[0];\n var receivedType = toRawType(value);\n var expectedValue = styleValue(value, expectedType);\n var receivedValue = styleValue(value, receivedType);\n // check if we need to specify expected value\n if (expectedTypes.length === 1 &&\n isExplicable(expectedType) &&\n !isBoolean(expectedType, receivedType)) {\n message += \" with value \" + expectedValue;\n }\n message += \", got \" + receivedType + \" \";\n // check if we need to specify received value\n if (isExplicable(receivedType)) {\n message += \"with value \" + receivedValue + \".\";\n }\n return message\n}\n\nfunction styleValue (value, type) {\n if (type === 'String') {\n return (\"\\\"\" + value + \"\\\"\")\n } else if (type === 'Number') {\n return (\"\" + (Number(value)))\n } else {\n return (\"\" + value)\n }\n}\n\nfunction isExplicable (value) {\n var explicitTypes = ['string', 'number', 'boolean'];\n return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })\n}\n\nfunction isBoolean () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })\n}\n\n/* */\n\nfunction handleError (err, vm, info) {\n // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.\n // See: https://github.com/vuejs/vuex/issues/1505\n pushTarget();\n try {\n if (vm) {\n var cur = vm;\n while ((cur = cur.$parent)) {\n var hooks = cur.$options.errorCaptured;\n if (hooks) {\n for (var i = 0; i < hooks.length; i++) {\n try {\n var capture = hooks[i].call(cur, err, vm, info) === false;\n if (capture) { return }\n } catch (e) {\n globalHandleError(e, cur, 'errorCaptured hook');\n }\n }\n }\n }\n }\n globalHandleError(err, vm, info);\n } finally {\n popTarget();\n }\n}\n\nfunction invokeWithErrorHandling (\n handler,\n context,\n args,\n vm,\n info\n) {\n var res;\n try {\n res = args ? handler.apply(context, args) : handler.call(context);\n if (res && !res._isVue && isPromise(res) && !res._handled) {\n res.catch(function (e) { return handleError(e, vm, info + \" (Promise/async)\"); });\n // issue #9511\n // avoid catch triggering multiple times when nested calls\n res._handled = true;\n }\n } catch (e) {\n handleError(e, vm, info);\n }\n return res\n}\n\nfunction globalHandleError (err, vm, info) {\n if (config.errorHandler) {\n try {\n return config.errorHandler.call(null, err, vm, info)\n } catch (e) {\n // if the user intentionally throws the original error in the handler,\n // do not log it twice\n if (e !== err) {\n logError(e, null, 'config.errorHandler');\n }\n }\n }\n logError(err, vm, info);\n}\n\nfunction logError (err, vm, info) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Error in \" + info + \": \\\"\" + (err.toString()) + \"\\\"\"), vm);\n }\n /* istanbul ignore else */\n if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n console.error(err);\n } else {\n throw err\n }\n}\n\n/* */\n\nvar callbacks = [];\nvar pending = false;\n\nfunction flushCallbacks () {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks.length = 0;\n for (var i = 0; i < copies.length; i++) {\n copies[i]();\n }\n}\n\n// Here we have async deferring wrappers using microtasks.\n// In 2.5 we used (macro) tasks (in combination with microtasks).\n// However, it has subtle problems when state is changed right before repaint\n// (e.g. #6813, out-in transitions).\n// Also, using (macro) tasks in event handler would cause some weird behaviors\n// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).\n// So we now use microtasks everywhere, again.\n// A major drawback of this tradeoff is that there are some scenarios\n// where microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690, which have workarounds)\n// or even between bubbling of the same event (#6566).\nvar timerFunc;\n\n// The nextTick behavior leverages the microtask queue, which can be accessed\n// via either native Promise.then or MutationObserver.\n// MutationObserver has wider support, however it is seriously bugged in\n// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\n// completely stops working after triggering a few times... so, if native\n// Promise is available, we will use it:\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n var p = Promise.resolve();\n timerFunc = function () {\n p.then(flushCallbacks);\n // In problematic UIWebViews, Promise.then doesn't completely break, but\n // it can get stuck in a weird state where callbacks are pushed into the\n // microtask queue but the queue isn't being flushed, until the browser\n // needs to do some other work, e.g. handle a timer. Therefore we can\n // \"force\" the microtask queue to be flushed by adding an empty timer.\n if (isIOS) { setTimeout(noop); }\n };\n} else if (!isIE && typeof MutationObserver !== 'undefined' && (\n isNative(MutationObserver) ||\n // PhantomJS and iOS 7.x\n MutationObserver.toString() === '[object MutationObserverConstructor]'\n)) {\n // Use MutationObserver where native Promise is not available,\n // e.g. PhantomJS, iOS7, Android 4.4\n // (#6466 MutationObserver is unreliable in IE11)\n var counter = 1;\n var observer = new MutationObserver(flushCallbacks);\n var textNode = document.createTextNode(String(counter));\n observer.observe(textNode, {\n characterData: true\n });\n timerFunc = function () {\n counter = (counter + 1) % 2;\n textNode.data = String(counter);\n };\n} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n // Fallback to setImmediate.\n // Technically it leverages the (macro) task queue,\n // but it is still a better choice than setTimeout.\n timerFunc = function () {\n setImmediate(flushCallbacks);\n };\n} else {\n // Fallback to setTimeout.\n timerFunc = function () {\n setTimeout(flushCallbacks, 0);\n };\n}\n\nfunction nextTick (cb, ctx) {\n var _resolve;\n callbacks.push(function () {\n if (cb) {\n try {\n cb.call(ctx);\n } catch (e) {\n handleError(e, ctx, 'nextTick');\n }\n } else if (_resolve) {\n _resolve(ctx);\n }\n });\n if (!pending) {\n pending = true;\n timerFunc();\n }\n // $flow-disable-line\n if (!cb && typeof Promise !== 'undefined') {\n return new Promise(function (resolve) {\n _resolve = resolve;\n })\n }\n}\n\n/* */\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n var allowedGlobals = makeMap(\n 'Infinity,undefined,NaN,isFinite,isNaN,' +\n 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n 'require' // for Webpack/Browserify\n );\n\n var warnNonPresent = function (target, key) {\n warn(\n \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n 'referenced during render. Make sure that this property is reactive, ' +\n 'either in the data option, or for class-based components, by ' +\n 'initializing the property. ' +\n 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',\n target\n );\n };\n\n var warnReservedPrefix = function (target, key) {\n warn(\n \"Property \\\"\" + key + \"\\\" must be accessed with \\\"$data.\" + key + \"\\\" because \" +\n 'properties starting with \"$\" or \"_\" are not proxied in the Vue instance to ' +\n 'prevent conflicts with Vue internals. ' +\n 'See: https://vuejs.org/v2/api/#data',\n target\n );\n };\n\n var hasProxy =\n typeof Proxy !== 'undefined' && isNative(Proxy);\n\n if (hasProxy) {\n var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n config.keyCodes = new Proxy(config.keyCodes, {\n set: function set (target, key, value) {\n if (isBuiltInModifier(key)) {\n warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n return false\n } else {\n target[key] = value;\n return true\n }\n }\n });\n }\n\n var hasHandler = {\n has: function has (target, key) {\n var has = key in target;\n var isAllowed = allowedGlobals(key) ||\n (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));\n if (!has && !isAllowed) {\n if (key in target.$data) { warnReservedPrefix(target, key); }\n else { warnNonPresent(target, key); }\n }\n return has || !isAllowed\n }\n };\n\n var getHandler = {\n get: function get (target, key) {\n if (typeof key === 'string' && !(key in target)) {\n if (key in target.$data) { warnReservedPrefix(target, key); }\n else { warnNonPresent(target, key); }\n }\n return target[key]\n }\n };\n\n initProxy = function initProxy (vm) {\n if (hasProxy) {\n // determine which proxy handler to use\n var options = vm.$options;\n var handlers = options.render && options.render._withStripped\n ? getHandler\n : hasHandler;\n vm._renderProxy = new Proxy(vm, handlers);\n } else {\n vm._renderProxy = vm;\n }\n };\n}\n\n/* */\n\nvar seenObjects = new _Set();\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}\n\nfunction _traverse (val, seen) {\n var i, keys;\n var isA = Array.isArray(val);\n if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {\n return\n }\n if (val.__ob__) {\n var depId = val.__ob__.dep.id;\n if (seen.has(depId)) {\n return\n }\n seen.add(depId);\n }\n if (isA) {\n i = val.length;\n while (i--) { _traverse(val[i], seen); }\n } else {\n keys = Object.keys(val);\n i = keys.length;\n while (i--) { _traverse(val[keys[i]], seen); }\n }\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n var perf = inBrowser && window.performance;\n /* istanbul ignore if */\n if (\n perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n perf.clearMeasures\n ) {\n mark = function (tag) { return perf.mark(tag); };\n measure = function (name, startTag, endTag) {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n // perf.clearMeasures(name)\n };\n }\n}\n\n/* */\n\nvar normalizeEvent = cached(function (name) {\n var passive = name.charAt(0) === '&';\n name = passive ? name.slice(1) : name;\n var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n name = once$$1 ? name.slice(1) : name;\n var capture = name.charAt(0) === '!';\n name = capture ? name.slice(1) : name;\n return {\n name: name,\n once: once$$1,\n capture: capture,\n passive: passive\n }\n});\n\nfunction createFnInvoker (fns, vm) {\n function invoker () {\n var arguments$1 = arguments;\n\n var fns = invoker.fns;\n if (Array.isArray(fns)) {\n var cloned = fns.slice();\n for (var i = 0; i < cloned.length; i++) {\n invokeWithErrorHandling(cloned[i], null, arguments$1, vm, \"v-on handler\");\n }\n } else {\n // return handler return value for single handlers\n return invokeWithErrorHandling(fns, null, arguments, vm, \"v-on handler\")\n }\n }\n invoker.fns = fns;\n return invoker\n}\n\nfunction updateListeners (\n on,\n oldOn,\n add,\n remove$$1,\n createOnceHandler,\n vm\n) {\n var name, def$$1, cur, old, event;\n for (name in on) {\n def$$1 = cur = on[name];\n old = oldOn[name];\n event = normalizeEvent(name);\n if (isUndef(cur)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n vm\n );\n } else if (isUndef(old)) {\n if (isUndef(cur.fns)) {\n cur = on[name] = createFnInvoker(cur, vm);\n }\n if (isTrue(event.once)) {\n cur = on[name] = createOnceHandler(event.name, cur, event.capture);\n }\n add(event.name, cur, event.capture, event.passive, event.params);\n } else if (cur !== old) {\n old.fns = cur;\n on[name] = old;\n }\n }\n for (name in oldOn) {\n if (isUndef(on[name])) {\n event = normalizeEvent(name);\n remove$$1(event.name, oldOn[name], event.capture);\n }\n }\n}\n\n/* */\n\n/* */\n\n// fixed by xxxxxx (mp properties)\nfunction extractPropertiesFromVNodeData(data, Ctor, res, context) {\n var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;\n if (isUndef(propOptions)) {\n return res\n }\n var externalClasses = Ctor.options.mpOptions.externalClasses || [];\n var attrs = data.attrs;\n var props = data.props;\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n var result = checkProp(res, props, key, altKey, true) ||\n checkProp(res, attrs, key, altKey, false);\n // externalClass\n if (\n result &&\n res[key] &&\n externalClasses.indexOf(altKey) !== -1 &&\n context[camelize(res[key])]\n ) {\n // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)\n res[key] = context[camelize(res[key])];\n }\n }\n }\n return res\n}\n\nfunction extractPropsFromVNodeData (\n data,\n Ctor,\n tag,\n context// fixed by xxxxxx\n) {\n // we are only extracting raw values here.\n // validation and default values are handled in the child\n // component itself.\n var propOptions = Ctor.options.props;\n if (isUndef(propOptions)) {\n // fixed by xxxxxx\n return extractPropertiesFromVNodeData(data, Ctor, {}, context)\n }\n var res = {};\n var attrs = data.attrs;\n var props = data.props;\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n if (process.env.NODE_ENV !== 'production') {\n var keyInLowerCase = key.toLowerCase();\n if (\n key !== keyInLowerCase &&\n attrs && hasOwn(attrs, keyInLowerCase)\n ) {\n tip(\n \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n \" \\\"\" + key + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and camelCased \" +\n \"props need to use their kebab-case equivalents when using in-DOM \" +\n \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n );\n }\n }\n checkProp(res, props, key, altKey, true) ||\n checkProp(res, attrs, key, altKey, false);\n }\n }\n // fixed by xxxxxx\n return extractPropertiesFromVNodeData(data, Ctor, res, context)\n}\n\nfunction checkProp (\n res,\n hash,\n key,\n altKey,\n preserve\n) {\n if (isDef(hash)) {\n if (hasOwn(hash, key)) {\n res[key] = hash[key];\n if (!preserve) {\n delete hash[key];\n }\n return true\n } else if (hasOwn(hash, altKey)) {\n res[key] = hash[altKey];\n if (!preserve) {\n delete hash[altKey];\n }\n return true\n }\n }\n return false\n}\n\n/* */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g.