康巴易测肤/伤疤uniapp小程序类
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

26374 lines
833KB

  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
  2. /* 0 */,
  3. /* 1 */
  4. /*!*********************************************************!*\
  5. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  6. \*********************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. "use strict";
  10. Object.defineProperty(exports, "__esModule", {
  11. value: true
  12. });
  13. exports.default = void 0;
  14. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  15. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  16. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  17. return this;
  18. }();
  19. var key = ['w', 'x'].join('');
  20. var oldWx = target[key];
  21. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  22. function isWxKey(key) {
  23. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  24. return false;
  25. }
  26. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  27. }
  28. function initWx() {
  29. var newWx = {};
  30. for (var _key in oldWx) {
  31. if (isWxKey(_key)) {
  32. // TODO wrapper function
  33. newWx[_key] = oldWx[_key];
  34. }
  35. }
  36. return newWx;
  37. }
  38. target[key] = initWx();
  39. var _default = target[key];
  40. exports.default = _default;
  41. /***/ }),
  42. /* 2 */
  43. /*!************************************************************!*\
  44. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  45. \************************************************************/
  46. /*! no static exports found */
  47. /***/ (function(module, exports, __webpack_require__) {
  48. "use strict";
  49. /* WEBPACK VAR INJECTION */(function(wx, global) {
  50. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  51. Object.defineProperty(exports, "__esModule", {
  52. value: true
  53. });
  54. exports.createApp = createApp;
  55. exports.createComponent = createComponent;
  56. exports.createPage = createPage;
  57. exports.createPlugin = createPlugin;
  58. exports.createSubpackageApp = createSubpackageApp;
  59. exports.default = void 0;
  60. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  61. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  62. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  63. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  64. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  65. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  66. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  67. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  68. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  69. var realAtob;
  70. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  71. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  72. if (typeof atob !== 'function') {
  73. realAtob = function realAtob(str) {
  74. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  75. if (!b64re.test(str)) {
  76. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  77. }
  78. // Adding the padding if missing, for semplicity
  79. str += '=='.slice(2 - (str.length & 3));
  80. var bitmap;
  81. var result = '';
  82. var r1;
  83. var r2;
  84. var i = 0;
  85. for (; i < str.length;) {
  86. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  87. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  88. }
  89. return result;
  90. };
  91. } else {
  92. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  93. realAtob = atob;
  94. }
  95. function b64DecodeUnicode(str) {
  96. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  97. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  98. }).join(''));
  99. }
  100. function getCurrentUserInfo() {
  101. var token = wx.getStorageSync('uni_id_token') || '';
  102. var tokenArr = token.split('.');
  103. if (!token || tokenArr.length !== 3) {
  104. return {
  105. uid: null,
  106. role: [],
  107. permission: [],
  108. tokenExpired: 0
  109. };
  110. }
  111. var userInfo;
  112. try {
  113. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  114. } catch (error) {
  115. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  116. }
  117. userInfo.tokenExpired = userInfo.exp * 1000;
  118. delete userInfo.exp;
  119. delete userInfo.iat;
  120. return userInfo;
  121. }
  122. function uniIdMixin(Vue) {
  123. Vue.prototype.uniIDHasRole = function (roleId) {
  124. var _getCurrentUserInfo = getCurrentUserInfo(),
  125. role = _getCurrentUserInfo.role;
  126. return role.indexOf(roleId) > -1;
  127. };
  128. Vue.prototype.uniIDHasPermission = function (permissionId) {
  129. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  130. permission = _getCurrentUserInfo2.permission;
  131. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  132. };
  133. Vue.prototype.uniIDTokenValid = function () {
  134. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  135. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  136. return tokenExpired > Date.now();
  137. };
  138. }
  139. var _toString = Object.prototype.toString;
  140. var hasOwnProperty = Object.prototype.hasOwnProperty;
  141. function isFn(fn) {
  142. return typeof fn === 'function';
  143. }
  144. function isStr(str) {
  145. return typeof str === 'string';
  146. }
  147. function isObject(obj) {
  148. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  149. }
  150. function isPlainObject(obj) {
  151. return _toString.call(obj) === '[object Object]';
  152. }
  153. function hasOwn(obj, key) {
  154. return hasOwnProperty.call(obj, key);
  155. }
  156. function noop() {}
  157. /**
  158. * Create a cached version of a pure function.
  159. */
  160. function cached(fn) {
  161. var cache = Object.create(null);
  162. return function cachedFn(str) {
  163. var hit = cache[str];
  164. return hit || (cache[str] = fn(str));
  165. };
  166. }
  167. /**
  168. * Camelize a hyphen-delimited string.
  169. */
  170. var camelizeRE = /-(\w)/g;
  171. var camelize = cached(function (str) {
  172. return str.replace(camelizeRE, function (_, c) {
  173. return c ? c.toUpperCase() : '';
  174. });
  175. });
  176. function sortObject(obj) {
  177. var sortObj = {};
  178. if (isPlainObject(obj)) {
  179. Object.keys(obj).sort().forEach(function (key) {
  180. sortObj[key] = obj[key];
  181. });
  182. }
  183. return !Object.keys(sortObj) ? obj : sortObj;
  184. }
  185. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  186. var globalInterceptors = {};
  187. var scopedInterceptors = {};
  188. function mergeHook(parentVal, childVal) {
  189. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  190. return res ? dedupeHooks(res) : res;
  191. }
  192. function dedupeHooks(hooks) {
  193. var res = [];
  194. for (var i = 0; i < hooks.length; i++) {
  195. if (res.indexOf(hooks[i]) === -1) {
  196. res.push(hooks[i]);
  197. }
  198. }
  199. return res;
  200. }
  201. function removeHook(hooks, hook) {
  202. var index = hooks.indexOf(hook);
  203. if (index !== -1) {
  204. hooks.splice(index, 1);
  205. }
  206. }
  207. function mergeInterceptorHook(interceptor, option) {
  208. Object.keys(option).forEach(function (hook) {
  209. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  210. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  211. }
  212. });
  213. }
  214. function removeInterceptorHook(interceptor, option) {
  215. if (!interceptor || !option) {
  216. return;
  217. }
  218. Object.keys(option).forEach(function (hook) {
  219. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  220. removeHook(interceptor[hook], option[hook]);
  221. }
  222. });
  223. }
  224. function addInterceptor(method, option) {
  225. if (typeof method === 'string' && isPlainObject(option)) {
  226. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  227. } else if (isPlainObject(method)) {
  228. mergeInterceptorHook(globalInterceptors, method);
  229. }
  230. }
  231. function removeInterceptor(method, option) {
  232. if (typeof method === 'string') {
  233. if (isPlainObject(option)) {
  234. removeInterceptorHook(scopedInterceptors[method], option);
  235. } else {
  236. delete scopedInterceptors[method];
  237. }
  238. } else if (isPlainObject(method)) {
  239. removeInterceptorHook(globalInterceptors, method);
  240. }
  241. }
  242. function wrapperHook(hook, params) {
  243. return function (data) {
  244. return hook(data, params) || data;
  245. };
  246. }
  247. function isPromise(obj) {
  248. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  249. }
  250. function queue(hooks, data, params) {
  251. var promise = false;
  252. for (var i = 0; i < hooks.length; i++) {
  253. var hook = hooks[i];
  254. if (promise) {
  255. promise = Promise.resolve(wrapperHook(hook, params));
  256. } else {
  257. var res = hook(data, params);
  258. if (isPromise(res)) {
  259. promise = Promise.resolve(res);
  260. }
  261. if (res === false) {
  262. return {
  263. then: function then() {}
  264. };
  265. }
  266. }
  267. }
  268. return promise || {
  269. then: function then(callback) {
  270. return callback(data);
  271. }
  272. };
  273. }
  274. function wrapperOptions(interceptor) {
  275. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  276. ['success', 'fail', 'complete'].forEach(function (name) {
  277. if (Array.isArray(interceptor[name])) {
  278. var oldCallback = options[name];
  279. options[name] = function callbackInterceptor(res) {
  280. queue(interceptor[name], res, options).then(function (res) {
  281. /* eslint-disable no-mixed-operators */
  282. return isFn(oldCallback) && oldCallback(res) || res;
  283. });
  284. };
  285. }
  286. });
  287. return options;
  288. }
  289. function wrapperReturnValue(method, returnValue) {
  290. var returnValueHooks = [];
  291. if (Array.isArray(globalInterceptors.returnValue)) {
  292. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  293. }
  294. var interceptor = scopedInterceptors[method];
  295. if (interceptor && Array.isArray(interceptor.returnValue)) {
  296. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  297. }
  298. returnValueHooks.forEach(function (hook) {
  299. returnValue = hook(returnValue) || returnValue;
  300. });
  301. return returnValue;
  302. }
  303. function getApiInterceptorHooks(method) {
  304. var interceptor = Object.create(null);
  305. Object.keys(globalInterceptors).forEach(function (hook) {
  306. if (hook !== 'returnValue') {
  307. interceptor[hook] = globalInterceptors[hook].slice();
  308. }
  309. });
  310. var scopedInterceptor = scopedInterceptors[method];
  311. if (scopedInterceptor) {
  312. Object.keys(scopedInterceptor).forEach(function (hook) {
  313. if (hook !== 'returnValue') {
  314. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  315. }
  316. });
  317. }
  318. return interceptor;
  319. }
  320. function invokeApi(method, api, options) {
  321. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  322. params[_key - 3] = arguments[_key];
  323. }
  324. var interceptor = getApiInterceptorHooks(method);
  325. if (interceptor && Object.keys(interceptor).length) {
  326. if (Array.isArray(interceptor.invoke)) {
  327. var res = queue(interceptor.invoke, options);
  328. return res.then(function (options) {
  329. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  330. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  331. });
  332. } else {
  333. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  334. }
  335. }
  336. return api.apply(void 0, [options].concat(params));
  337. }
  338. var promiseInterceptor = {
  339. returnValue: function returnValue(res) {
  340. if (!isPromise(res)) {
  341. return res;
  342. }
  343. return new Promise(function (resolve, reject) {
  344. res.then(function (res) {
  345. if (!res) {
  346. resolve(res);
  347. return;
  348. }
  349. if (res[0]) {
  350. reject(res[0]);
  351. } else {
  352. resolve(res[1]);
  353. }
  354. });
  355. });
  356. }
  357. };
  358. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|rpx2px|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  359. var CONTEXT_API_RE = /^create|Manager$/;
  360. // Context例外情况
  361. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  362. // 同步例外情况
  363. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  364. var CALLBACK_API_RE = /^on|^off/;
  365. function isContextApi(name) {
  366. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  367. }
  368. function isSyncApi(name) {
  369. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  370. }
  371. function isCallbackApi(name) {
  372. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  373. }
  374. function handlePromise(promise) {
  375. return promise.then(function (data) {
  376. return [null, data];
  377. }).catch(function (err) {
  378. return [err];
  379. });
  380. }
  381. function shouldPromise(name) {
  382. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  383. return false;
  384. }
  385. return true;
  386. }
  387. /* eslint-disable no-extend-native */
  388. if (!Promise.prototype.finally) {
  389. Promise.prototype.finally = function (callback) {
  390. var promise = this.constructor;
  391. return this.then(function (value) {
  392. return promise.resolve(callback()).then(function () {
  393. return value;
  394. });
  395. }, function (reason) {
  396. return promise.resolve(callback()).then(function () {
  397. throw reason;
  398. });
  399. });
  400. };
  401. }
  402. function promisify(name, api) {
  403. if (!shouldPromise(name) || !isFn(api)) {
  404. return api;
  405. }
  406. return function promiseApi() {
  407. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  408. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  409. params[_key2 - 1] = arguments[_key2];
  410. }
  411. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  412. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  413. }
  414. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  415. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  416. success: resolve,
  417. fail: reject
  418. })].concat(params));
  419. })));
  420. };
  421. }
  422. var EPS = 1e-4;
  423. var BASE_DEVICE_WIDTH = 750;
  424. var isIOS = false;
  425. var deviceWidth = 0;
  426. var deviceDPR = 0;
  427. function checkDeviceWidth() {
  428. var _Object$assign = Object.assign({}, wx.getWindowInfo(), {
  429. platform: wx.getDeviceInfo().platform
  430. }),
  431. windowWidth = _Object$assign.windowWidth,
  432. pixelRatio = _Object$assign.pixelRatio,
  433. platform = _Object$assign.platform; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  434. deviceWidth = windowWidth;
  435. deviceDPR = pixelRatio;
  436. isIOS = platform === 'ios';
  437. }
  438. function upx2px(number, newDeviceWidth) {
  439. if (deviceWidth === 0) {
  440. checkDeviceWidth();
  441. }
  442. number = Number(number);
  443. if (number === 0) {
  444. return 0;
  445. }
  446. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  447. if (result < 0) {
  448. result = -result;
  449. }
  450. result = Math.floor(result + EPS);
  451. if (result === 0) {
  452. if (deviceDPR === 1 || !isIOS) {
  453. result = 1;
  454. } else {
  455. result = 0.5;
  456. }
  457. }
  458. return number < 0 ? -result : result;
  459. }
  460. var LOCALE_ZH_HANS = 'zh-Hans';
  461. var LOCALE_ZH_HANT = 'zh-Hant';
  462. var LOCALE_EN = 'en';
  463. var LOCALE_FR = 'fr';
  464. var LOCALE_ES = 'es';
  465. var messages = {};
  466. var locale;
  467. {
  468. locale = normalizeLocale(wx.getAppBaseInfo().language) || LOCALE_EN;
  469. }
  470. function initI18nMessages() {
  471. if (!isEnableLocale()) {
  472. return;
  473. }
  474. var localeKeys = Object.keys(__uniConfig.locales);
  475. if (localeKeys.length) {
  476. localeKeys.forEach(function (locale) {
  477. var curMessages = messages[locale];
  478. var userMessages = __uniConfig.locales[locale];
  479. if (curMessages) {
  480. Object.assign(curMessages, userMessages);
  481. } else {
  482. messages[locale] = userMessages;
  483. }
  484. });
  485. }
  486. }
  487. initI18nMessages();
  488. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  489. var t = i18n.t;
  490. var i18nMixin = i18n.mixin = {
  491. beforeCreate: function beforeCreate() {
  492. var _this = this;
  493. var unwatch = i18n.i18n.watchLocale(function () {
  494. _this.$forceUpdate();
  495. });
  496. this.$once('hook:beforeDestroy', function () {
  497. unwatch();
  498. });
  499. },
  500. methods: {
  501. $$t: function $$t(key, values) {
  502. return t(key, values);
  503. }
  504. }
  505. };
  506. var setLocale = i18n.setLocale;
  507. var getLocale = i18n.getLocale;
  508. function initAppLocale(Vue, appVm, locale) {
  509. var state = Vue.observable({
  510. locale: locale || i18n.getLocale()
  511. });
  512. var localeWatchers = [];
  513. appVm.$watchLocale = function (fn) {
  514. localeWatchers.push(fn);
  515. };
  516. Object.defineProperty(appVm, '$locale', {
  517. get: function get() {
  518. return state.locale;
  519. },
  520. set: function set(v) {
  521. state.locale = v;
  522. localeWatchers.forEach(function (watch) {
  523. return watch(v);
  524. });
  525. }
  526. });
  527. }
  528. function isEnableLocale() {
  529. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  530. }
  531. function include(str, parts) {
  532. return !!parts.find(function (part) {
  533. return str.indexOf(part) !== -1;
  534. });
  535. }
  536. function startsWith(str, parts) {
  537. return parts.find(function (part) {
  538. return str.indexOf(part) === 0;
  539. });
  540. }
  541. function normalizeLocale(locale, messages) {
  542. if (!locale) {
  543. return;
  544. }
  545. locale = locale.trim().replace(/_/g, '-');
  546. if (messages && messages[locale]) {
  547. return locale;
  548. }
  549. locale = locale.toLowerCase();
  550. if (locale === 'chinese') {
  551. // 支付宝
  552. return LOCALE_ZH_HANS;
  553. }
  554. if (locale.indexOf('zh') === 0) {
  555. if (locale.indexOf('-hans') > -1) {
  556. return LOCALE_ZH_HANS;
  557. }
  558. if (locale.indexOf('-hant') > -1) {
  559. return LOCALE_ZH_HANT;
  560. }
  561. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  562. return LOCALE_ZH_HANT;
  563. }
  564. return LOCALE_ZH_HANS;
  565. }
  566. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  567. if (lang) {
  568. return lang;
  569. }
  570. }
  571. // export function initI18n() {
  572. // const localeKeys = Object.keys(__uniConfig.locales || {})
  573. // if (localeKeys.length) {
  574. // localeKeys.forEach((locale) =>
  575. // i18n.add(locale, __uniConfig.locales[locale])
  576. // )
  577. // }
  578. // }
  579. function getLocale$1() {
  580. // 优先使用 $locale
  581. if (isFn(getApp)) {
  582. var app = getApp({
  583. allowDefault: true
  584. });
  585. if (app && app.$vm) {
  586. return app.$vm.$locale;
  587. }
  588. }
  589. return normalizeLocale(wx.getAppBaseInfo().language) || LOCALE_EN;
  590. }
  591. function setLocale$1(locale) {
  592. var app = isFn(getApp) ? getApp() : false;
  593. if (!app) {
  594. return false;
  595. }
  596. var oldLocale = app.$vm.$locale;
  597. if (oldLocale !== locale) {
  598. app.$vm.$locale = locale;
  599. onLocaleChangeCallbacks.forEach(function (fn) {
  600. return fn({
  601. locale: locale
  602. });
  603. });
  604. return true;
  605. }
  606. return false;
  607. }
  608. var onLocaleChangeCallbacks = [];
  609. function onLocaleChange(fn) {
  610. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  611. onLocaleChangeCallbacks.push(fn);
  612. }
  613. }
  614. if (typeof global !== 'undefined') {
  615. global.getLocale = getLocale$1;
  616. }
  617. var interceptors = {
  618. promiseInterceptor: promiseInterceptor
  619. };
  620. var baseApi = /*#__PURE__*/Object.freeze({
  621. __proto__: null,
  622. upx2px: upx2px,
  623. rpx2px: upx2px,
  624. getLocale: getLocale$1,
  625. setLocale: setLocale$1,
  626. onLocaleChange: onLocaleChange,
  627. addInterceptor: addInterceptor,
  628. removeInterceptor: removeInterceptor,
  629. interceptors: interceptors
  630. });
  631. function findExistsPageIndex(url) {
  632. var pages = getCurrentPages();
  633. var len = pages.length;
  634. while (len--) {
  635. var page = pages[len];
  636. if (page.$page && page.$page.fullPath === url) {
  637. return len;
  638. }
  639. }
  640. return -1;
  641. }
  642. var redirectTo = {
  643. name: function name(fromArgs) {
  644. if (fromArgs.exists === 'back' && fromArgs.delta) {
  645. return 'navigateBack';
  646. }
  647. return 'redirectTo';
  648. },
  649. args: function args(fromArgs) {
  650. if (fromArgs.exists === 'back' && fromArgs.url) {
  651. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  652. if (existsPageIndex !== -1) {
  653. var delta = getCurrentPages().length - 1 - existsPageIndex;
  654. if (delta > 0) {
  655. fromArgs.delta = delta;
  656. }
  657. }
  658. }
  659. }
  660. };
  661. var previewImage = {
  662. args: function args(fromArgs) {
  663. var currentIndex = parseInt(fromArgs.current);
  664. if (isNaN(currentIndex)) {
  665. return;
  666. }
  667. var urls = fromArgs.urls;
  668. if (!Array.isArray(urls)) {
  669. return;
  670. }
  671. var len = urls.length;
  672. if (!len) {
  673. return;
  674. }
  675. if (currentIndex < 0) {
  676. currentIndex = 0;
  677. } else if (currentIndex >= len) {
  678. currentIndex = len - 1;
  679. }
  680. if (currentIndex > 0) {
  681. fromArgs.current = urls[currentIndex];
  682. fromArgs.urls = urls.filter(function (item, index) {
  683. return index < currentIndex ? item !== urls[currentIndex] : true;
  684. });
  685. } else {
  686. fromArgs.current = urls[0];
  687. }
  688. return {
  689. indicator: false,
  690. loop: false
  691. };
  692. }
  693. };
  694. var UUID_KEY = '__DC_STAT_UUID';
  695. var deviceId;
  696. function useDeviceId(result) {
  697. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  698. if (!deviceId) {
  699. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  700. wx.setStorage({
  701. key: UUID_KEY,
  702. data: deviceId
  703. });
  704. }
  705. result.deviceId = deviceId;
  706. }
  707. function addSafeAreaInsets(result) {
  708. if (result.safeArea) {
  709. var safeArea = result.safeArea;
  710. result.safeAreaInsets = {
  711. top: safeArea.top,
  712. left: safeArea.left,
  713. right: result.windowWidth - safeArea.right,
  714. bottom: result.screenHeight - safeArea.bottom
  715. };
  716. }
  717. }
  718. function populateParameters(result) {
  719. var _result$brand = result.brand,
  720. brand = _result$brand === void 0 ? '' : _result$brand,
  721. _result$model = result.model,
  722. model = _result$model === void 0 ? '' : _result$model,
  723. _result$system = result.system,
  724. system = _result$system === void 0 ? '' : _result$system,
  725. _result$language = result.language,
  726. language = _result$language === void 0 ? '' : _result$language,
  727. theme = result.theme,
  728. version = result.version,
  729. platform = result.platform,
  730. fontSizeSetting = result.fontSizeSetting,
  731. SDKVersion = result.SDKVersion,
  732. pixelRatio = result.pixelRatio,
  733. deviceOrientation = result.deviceOrientation;
  734. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  735. var extraParam = {};
  736. // osName osVersion
  737. var osName = '';
  738. var osVersion = '';
  739. {
  740. osName = system.split(' ')[0] || '';
  741. osVersion = system.split(' ')[1] || '';
  742. }
  743. var hostVersion = version;
  744. // deviceType
  745. var deviceType = getGetDeviceType(result, model);
  746. // deviceModel
  747. var deviceBrand = getDeviceBrand(brand);
  748. // hostName
  749. var _hostName = getHostName(result);
  750. // deviceOrientation
  751. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  752. // devicePixelRatio
  753. var _devicePixelRatio = pixelRatio;
  754. // SDKVersion
  755. var _SDKVersion = SDKVersion;
  756. // hostLanguage
  757. var hostLanguage = (language || '').replace(/_/g, '-');
  758. // wx.getAccountInfoSync
  759. var parameters = {
  760. appId: "__UNI__344920F",
  761. appName: "uniapp-template",
  762. appVersion: "1.0.0",
  763. appVersionCode: "100",
  764. appLanguage: getAppLanguage(hostLanguage),
  765. uniCompileVersion: "4.45",
  766. uniCompilerVersion: "4.45",
  767. uniRuntimeVersion: "4.45",
  768. uniPlatform: undefined || "mp-weixin",
  769. deviceBrand: deviceBrand,
  770. deviceModel: model,
  771. deviceType: deviceType,
  772. devicePixelRatio: _devicePixelRatio,
  773. deviceOrientation: _deviceOrientation,
  774. osName: osName.toLocaleLowerCase(),
  775. osVersion: osVersion,
  776. hostTheme: theme,
  777. hostVersion: hostVersion,
  778. hostLanguage: hostLanguage,
  779. hostName: _hostName,
  780. hostSDKVersion: _SDKVersion,
  781. hostFontSizeSetting: fontSizeSetting,
  782. windowTop: 0,
  783. windowBottom: 0,
  784. // TODO
  785. osLanguage: undefined,
  786. osTheme: undefined,
  787. ua: undefined,
  788. hostPackageName: undefined,
  789. browserName: undefined,
  790. browserVersion: undefined,
  791. isUniAppX: false
  792. };
  793. Object.assign(result, parameters, extraParam);
  794. }
  795. function getGetDeviceType(result, model) {
  796. var deviceType = result.deviceType || 'phone';
  797. {
  798. var deviceTypeMaps = {
  799. ipad: 'pad',
  800. windows: 'pc',
  801. mac: 'pc'
  802. };
  803. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  804. var _model = model.toLocaleLowerCase();
  805. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  806. var _m = deviceTypeMapsKeys[index];
  807. if (_model.indexOf(_m) !== -1) {
  808. deviceType = deviceTypeMaps[_m];
  809. break;
  810. }
  811. }
  812. }
  813. return deviceType;
  814. }
  815. function getDeviceBrand(brand) {
  816. var deviceBrand = brand;
  817. if (deviceBrand) {
  818. deviceBrand = brand.toLocaleLowerCase();
  819. }
  820. return deviceBrand;
  821. }
  822. function getAppLanguage(defaultLanguage) {
  823. return getLocale$1 ? getLocale$1() : defaultLanguage;
  824. }
  825. function getHostName(result) {
  826. var _platform = 'WeChat';
  827. var _hostName = result.hostName || _platform; // mp-jd
  828. {
  829. if (result.environment) {
  830. _hostName = result.environment;
  831. } else if (result.host && result.host.env) {
  832. _hostName = result.host.env;
  833. }
  834. }
  835. return _hostName;
  836. }
  837. var getSystemInfo = {
  838. returnValue: function returnValue(result) {
  839. useDeviceId(result);
  840. addSafeAreaInsets(result);
  841. populateParameters(result);
  842. }
  843. };
  844. var showActionSheet = {
  845. args: function args(fromArgs) {
  846. if ((0, _typeof2.default)(fromArgs) === 'object') {
  847. fromArgs.alertText = fromArgs.title;
  848. }
  849. }
  850. };
  851. var getAppBaseInfo = {
  852. returnValue: function returnValue(result) {
  853. var _result = result,
  854. version = _result.version,
  855. language = _result.language,
  856. SDKVersion = _result.SDKVersion,
  857. theme = _result.theme;
  858. var _hostName = getHostName(result);
  859. var hostLanguage = (language || '').replace('_', '-');
  860. result = sortObject(Object.assign(result, {
  861. appId: "__UNI__344920F",
  862. appName: "uniapp-template",
  863. appVersion: "1.0.0",
  864. appVersionCode: "100",
  865. appLanguage: getAppLanguage(hostLanguage),
  866. hostVersion: version,
  867. hostLanguage: hostLanguage,
  868. hostName: _hostName,
  869. hostSDKVersion: SDKVersion,
  870. hostTheme: theme,
  871. isUniAppX: false,
  872. uniPlatform: undefined || "mp-weixin",
  873. uniCompileVersion: "4.45",
  874. uniCompilerVersion: "4.45",
  875. uniRuntimeVersion: "4.45"
  876. }));
  877. }
  878. };
  879. var getDeviceInfo = {
  880. returnValue: function returnValue(result) {
  881. var _result2 = result,
  882. brand = _result2.brand,
  883. model = _result2.model;
  884. var deviceType = getGetDeviceType(result, model);
  885. var deviceBrand = getDeviceBrand(brand);
  886. useDeviceId(result);
  887. result = sortObject(Object.assign(result, {
  888. deviceType: deviceType,
  889. deviceBrand: deviceBrand,
  890. deviceModel: model
  891. }));
  892. }
  893. };
  894. var getWindowInfo = {
  895. returnValue: function returnValue(result) {
  896. addSafeAreaInsets(result);
  897. result = sortObject(Object.assign(result, {
  898. windowTop: 0,
  899. windowBottom: 0
  900. }));
  901. }
  902. };
  903. var getAppAuthorizeSetting = {
  904. returnValue: function returnValue(result) {
  905. var locationReducedAccuracy = result.locationReducedAccuracy;
  906. result.locationAccuracy = 'unsupported';
  907. if (locationReducedAccuracy === true) {
  908. result.locationAccuracy = 'reduced';
  909. } else if (locationReducedAccuracy === false) {
  910. result.locationAccuracy = 'full';
  911. }
  912. }
  913. };
  914. // import navigateTo from 'uni-helpers/navigate-to'
  915. var compressImage = {
  916. args: function args(fromArgs) {
  917. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  918. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  919. fromArgs.compressHeight = fromArgs.compressedHeight;
  920. }
  921. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  922. fromArgs.compressWidth = fromArgs.compressedWidth;
  923. }
  924. }
  925. };
  926. var protocols = {
  927. redirectTo: redirectTo,
  928. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  929. previewImage: previewImage,
  930. getSystemInfo: getSystemInfo,
  931. getSystemInfoSync: getSystemInfo,
  932. showActionSheet: showActionSheet,
  933. getAppBaseInfo: getAppBaseInfo,
  934. getDeviceInfo: getDeviceInfo,
  935. getWindowInfo: getWindowInfo,
  936. getAppAuthorizeSetting: getAppAuthorizeSetting,
  937. compressImage: compressImage
  938. };
  939. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  940. var canIUses = [];
  941. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  942. function processCallback(methodName, method, returnValue) {
  943. return function (res) {
  944. return method(processReturnValue(methodName, res, returnValue));
  945. };
  946. }
  947. function processArgs(methodName, fromArgs) {
  948. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  949. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  950. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  951. if (isPlainObject(fromArgs)) {
  952. // 一般 api 的参数解析
  953. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  954. if (isFn(argsOption)) {
  955. argsOption = argsOption(fromArgs, toArgs) || {};
  956. }
  957. for (var key in fromArgs) {
  958. if (hasOwn(argsOption, key)) {
  959. var keyOption = argsOption[key];
  960. if (isFn(keyOption)) {
  961. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  962. }
  963. if (!keyOption) {
  964. // 不支持的参数
  965. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  966. } else if (isStr(keyOption)) {
  967. // 重写参数 key
  968. toArgs[keyOption] = fromArgs[key];
  969. } else if (isPlainObject(keyOption)) {
  970. // {name:newName,value:value}可重新指定参数 key:value
  971. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  972. }
  973. } else if (CALLBACKS.indexOf(key) !== -1) {
  974. if (isFn(fromArgs[key])) {
  975. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  976. }
  977. } else {
  978. if (!keepFromArgs) {
  979. toArgs[key] = fromArgs[key];
  980. }
  981. }
  982. }
  983. return toArgs;
  984. } else if (isFn(fromArgs)) {
  985. fromArgs = processCallback(methodName, fromArgs, returnValue);
  986. }
  987. return fromArgs;
  988. }
  989. function processReturnValue(methodName, res, returnValue) {
  990. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  991. if (isFn(protocols.returnValue)) {
  992. // 处理通用 returnValue
  993. res = protocols.returnValue(methodName, res);
  994. }
  995. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  996. }
  997. function wrapper(methodName, method) {
  998. if (hasOwn(protocols, methodName)) {
  999. var protocol = protocols[methodName];
  1000. if (!protocol) {
  1001. // 暂不支持的 api
  1002. return function () {
  1003. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1004. };
  1005. }
  1006. return function (arg1, arg2) {
  1007. // 目前 api 最多两个参数
  1008. var options = protocol;
  1009. if (isFn(protocol)) {
  1010. options = protocol(arg1);
  1011. }
  1012. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1013. var args = [arg1];
  1014. if (typeof arg2 !== 'undefined') {
  1015. args.push(arg2);
  1016. }
  1017. if (isFn(options.name)) {
  1018. methodName = options.name(arg1);
  1019. } else if (isStr(options.name)) {
  1020. methodName = options.name;
  1021. }
  1022. var returnValue = wx[methodName].apply(wx, args);
  1023. if (isSyncApi(methodName)) {
  1024. // 同步 api
  1025. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1026. }
  1027. return returnValue;
  1028. };
  1029. }
  1030. return method;
  1031. }
  1032. var todoApis = Object.create(null);
  1033. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1034. function createTodoApi(name) {
  1035. return function todoApi(_ref) {
  1036. var fail = _ref.fail,
  1037. complete = _ref.complete;
  1038. var res = {
  1039. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1040. };
  1041. isFn(fail) && fail(res);
  1042. isFn(complete) && complete(res);
  1043. };
  1044. }
  1045. TODOS.forEach(function (name) {
  1046. todoApis[name] = createTodoApi(name);
  1047. });
  1048. var providers = {
  1049. oauth: ['weixin'],
  1050. share: ['weixin'],
  1051. payment: ['wxpay'],
  1052. push: ['weixin']
  1053. };
  1054. function getProvider(_ref2) {
  1055. var service = _ref2.service,
  1056. success = _ref2.success,
  1057. fail = _ref2.fail,
  1058. complete = _ref2.complete;
  1059. var res = false;
  1060. if (providers[service]) {
  1061. res = {
  1062. errMsg: 'getProvider:ok',
  1063. service: service,
  1064. provider: providers[service]
  1065. };
  1066. isFn(success) && success(res);
  1067. } else {
  1068. res = {
  1069. errMsg: 'getProvider:fail service not found'
  1070. };
  1071. isFn(fail) && fail(res);
  1072. }
  1073. isFn(complete) && complete(res);
  1074. }
  1075. var extraApi = /*#__PURE__*/Object.freeze({
  1076. __proto__: null,
  1077. getProvider: getProvider
  1078. });
  1079. var getEmitter = function () {
  1080. var Emitter;
  1081. return function getUniEmitter() {
  1082. if (!Emitter) {
  1083. Emitter = new _vue.default();
  1084. }
  1085. return Emitter;
  1086. };
  1087. }();
  1088. function apply(ctx, method, args) {
  1089. return ctx[method].apply(ctx, args);
  1090. }
  1091. function $on() {
  1092. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1093. }
  1094. function $off() {
  1095. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1096. }
  1097. function $once() {
  1098. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1099. }
  1100. function $emit() {
  1101. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1102. }
  1103. var eventApi = /*#__PURE__*/Object.freeze({
  1104. __proto__: null,
  1105. $on: $on,
  1106. $off: $off,
  1107. $once: $once,
  1108. $emit: $emit
  1109. });
  1110. /**
  1111. * 框架内 try-catch
  1112. */
  1113. /**
  1114. * 开发者 try-catch
  1115. */
  1116. function tryCatch(fn) {
  1117. return function () {
  1118. try {
  1119. return fn.apply(fn, arguments);
  1120. } catch (e) {
  1121. // TODO
  1122. console.error(e);
  1123. }
  1124. };
  1125. }
  1126. function getApiCallbacks(params) {
  1127. var apiCallbacks = {};
  1128. for (var name in params) {
  1129. var param = params[name];
  1130. if (isFn(param)) {
  1131. apiCallbacks[name] = tryCatch(param);
  1132. delete params[name];
  1133. }
  1134. }
  1135. return apiCallbacks;
  1136. }
  1137. var cid;
  1138. var cidErrMsg;
  1139. var enabled;
  1140. function normalizePushMessage(message) {
  1141. try {
  1142. return JSON.parse(message);
  1143. } catch (e) {}
  1144. return message;
  1145. }
  1146. function invokePushCallback(args) {
  1147. if (args.type === 'enabled') {
  1148. enabled = true;
  1149. } else if (args.type === 'clientId') {
  1150. cid = args.cid;
  1151. cidErrMsg = args.errMsg;
  1152. invokeGetPushCidCallbacks(cid, args.errMsg);
  1153. } else if (args.type === 'pushMsg') {
  1154. var message = {
  1155. type: 'receive',
  1156. data: normalizePushMessage(args.message)
  1157. };
  1158. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1159. var callback = onPushMessageCallbacks[i];
  1160. callback(message);
  1161. // 该消息已被阻止
  1162. if (message.stopped) {
  1163. break;
  1164. }
  1165. }
  1166. } else if (args.type === 'click') {
  1167. onPushMessageCallbacks.forEach(function (callback) {
  1168. callback({
  1169. type: 'click',
  1170. data: normalizePushMessage(args.message)
  1171. });
  1172. });
  1173. }
  1174. }
  1175. var getPushCidCallbacks = [];
  1176. function invokeGetPushCidCallbacks(cid, errMsg) {
  1177. getPushCidCallbacks.forEach(function (callback) {
  1178. callback(cid, errMsg);
  1179. });
  1180. getPushCidCallbacks.length = 0;
  1181. }
  1182. function getPushClientId(args) {
  1183. if (!isPlainObject(args)) {
  1184. args = {};
  1185. }
  1186. var _getApiCallbacks = getApiCallbacks(args),
  1187. success = _getApiCallbacks.success,
  1188. fail = _getApiCallbacks.fail,
  1189. complete = _getApiCallbacks.complete;
  1190. var hasSuccess = isFn(success);
  1191. var hasFail = isFn(fail);
  1192. var hasComplete = isFn(complete);
  1193. Promise.resolve().then(function () {
  1194. if (typeof enabled === 'undefined') {
  1195. enabled = false;
  1196. cid = '';
  1197. cidErrMsg = 'uniPush is not enabled';
  1198. }
  1199. getPushCidCallbacks.push(function (cid, errMsg) {
  1200. var res;
  1201. if (cid) {
  1202. res = {
  1203. errMsg: 'getPushClientId:ok',
  1204. cid: cid
  1205. };
  1206. hasSuccess && success(res);
  1207. } else {
  1208. res = {
  1209. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1210. };
  1211. hasFail && fail(res);
  1212. }
  1213. hasComplete && complete(res);
  1214. });
  1215. if (typeof cid !== 'undefined') {
  1216. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1217. }
  1218. });
  1219. }
  1220. var onPushMessageCallbacks = [];
  1221. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1222. var onPushMessage = function onPushMessage(fn) {
  1223. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1224. onPushMessageCallbacks.push(fn);
  1225. }
  1226. };
  1227. var offPushMessage = function offPushMessage(fn) {
  1228. if (!fn) {
  1229. onPushMessageCallbacks.length = 0;
  1230. } else {
  1231. var index = onPushMessageCallbacks.indexOf(fn);
  1232. if (index > -1) {
  1233. onPushMessageCallbacks.splice(index, 1);
  1234. }
  1235. }
  1236. };
  1237. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1238. if (!baseInfo) {
  1239. baseInfo = wx.getSystemInfoSync();
  1240. }
  1241. var host = baseInfo ? baseInfo.host : null;
  1242. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1243. var api = /*#__PURE__*/Object.freeze({
  1244. __proto__: null,
  1245. shareVideoMessage: shareVideoMessage,
  1246. getPushClientId: getPushClientId,
  1247. onPushMessage: onPushMessage,
  1248. offPushMessage: offPushMessage,
  1249. invokePushCallback: invokePushCallback
  1250. });
  1251. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1252. function findVmByVueId(vm, vuePid) {
  1253. var $children = vm.$children;
  1254. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1255. for (var i = $children.length - 1; i >= 0; i--) {
  1256. var childVm = $children[i];
  1257. if (childVm.$scope._$vueId === vuePid) {
  1258. return childVm;
  1259. }
  1260. }
  1261. // 反向递归查找
  1262. var parentVm;
  1263. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1264. parentVm = findVmByVueId($children[_i], vuePid);
  1265. if (parentVm) {
  1266. return parentVm;
  1267. }
  1268. }
  1269. }
  1270. function initBehavior(options) {
  1271. return Behavior(options);
  1272. }
  1273. function isPage() {
  1274. return !!this.route;
  1275. }
  1276. function initRelation(detail) {
  1277. this.triggerEvent('__l', detail);
  1278. }
  1279. function selectAllComponents(mpInstance, selector, $refs) {
  1280. var components = mpInstance.selectAllComponents(selector) || [];
  1281. components.forEach(function (component) {
  1282. var ref = component.dataset.ref;
  1283. $refs[ref] = component.$vm || toSkip(component);
  1284. {
  1285. if (component.dataset.vueGeneric === 'scoped') {
  1286. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1287. selectAllComponents(scopedComponent, selector, $refs);
  1288. });
  1289. }
  1290. }
  1291. });
  1292. }
  1293. function syncRefs(refs, newRefs) {
  1294. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1295. var newKeys = Object.keys(newRefs);
  1296. newKeys.forEach(function (key) {
  1297. var oldValue = refs[key];
  1298. var newValue = newRefs[key];
  1299. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1300. return oldValue.includes(value);
  1301. })) {
  1302. return;
  1303. }
  1304. refs[key] = newValue;
  1305. oldKeys.delete(key);
  1306. });
  1307. oldKeys.forEach(function (key) {
  1308. delete refs[key];
  1309. });
  1310. return refs;
  1311. }
  1312. function initRefs(vm) {
  1313. var mpInstance = vm.$scope;
  1314. var refs = {};
  1315. Object.defineProperty(vm, '$refs', {
  1316. get: function get() {
  1317. var $refs = {};
  1318. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1319. // TODO 暂不考虑 for 中的 scoped
  1320. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1321. forComponents.forEach(function (component) {
  1322. var ref = component.dataset.ref;
  1323. if (!$refs[ref]) {
  1324. $refs[ref] = [];
  1325. }
  1326. $refs[ref].push(component.$vm || toSkip(component));
  1327. });
  1328. return syncRefs(refs, $refs);
  1329. }
  1330. });
  1331. }
  1332. function handleLink(event) {
  1333. var _ref3 = event.detail || event.value,
  1334. vuePid = _ref3.vuePid,
  1335. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1336. var parentVm;
  1337. if (vuePid) {
  1338. parentVm = findVmByVueId(this.$vm, vuePid);
  1339. }
  1340. if (!parentVm) {
  1341. parentVm = this.$vm;
  1342. }
  1343. vueOptions.parent = parentVm;
  1344. }
  1345. function markMPComponent(component) {
  1346. // 在 Vue 中标记为小程序组件
  1347. var IS_MP = '__v_isMPComponent';
  1348. Object.defineProperty(component, IS_MP, {
  1349. configurable: true,
  1350. enumerable: false,
  1351. value: true
  1352. });
  1353. return component;
  1354. }
  1355. function toSkip(obj) {
  1356. var OB = '__ob__';
  1357. var SKIP = '__v_skip';
  1358. if (isObject(obj) && Object.isExtensible(obj)) {
  1359. // 避免被 @vue/composition-api 观测
  1360. Object.defineProperty(obj, OB, {
  1361. configurable: true,
  1362. enumerable: false,
  1363. value: (0, _defineProperty2.default)({}, SKIP, true)
  1364. });
  1365. }
  1366. return obj;
  1367. }
  1368. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1369. function initWorkletMethods(mpMethods, vueMethods) {
  1370. if (vueMethods) {
  1371. Object.keys(vueMethods).forEach(function (name) {
  1372. var matches = name.match(WORKLET_RE);
  1373. if (matches) {
  1374. var workletName = matches[1];
  1375. mpMethods[name] = vueMethods[name];
  1376. mpMethods[workletName] = vueMethods[workletName];
  1377. }
  1378. });
  1379. }
  1380. }
  1381. var MPPage = Page;
  1382. var MPComponent = Component;
  1383. var customizeRE = /:/g;
  1384. var customize = cached(function (str) {
  1385. return camelize(str.replace(customizeRE, '-'));
  1386. });
  1387. function initTriggerEvent(mpInstance) {
  1388. var oldTriggerEvent = mpInstance.triggerEvent;
  1389. var newTriggerEvent = function newTriggerEvent(event) {
  1390. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1391. args[_key3 - 1] = arguments[_key3];
  1392. }
  1393. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1394. if (this.$vm || this.dataset && this.dataset.comType) {
  1395. event = customize(event);
  1396. } else {
  1397. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1398. var newEvent = customize(event);
  1399. if (newEvent !== event) {
  1400. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1401. }
  1402. }
  1403. return oldTriggerEvent.apply(this, [event].concat(args));
  1404. };
  1405. try {
  1406. // 京东小程序 triggerEvent 为只读
  1407. mpInstance.triggerEvent = newTriggerEvent;
  1408. } catch (error) {
  1409. mpInstance._triggerEvent = newTriggerEvent;
  1410. }
  1411. }
  1412. function initHook(name, options, isComponent) {
  1413. var oldHook = options[name];
  1414. options[name] = function () {
  1415. markMPComponent(this);
  1416. initTriggerEvent(this);
  1417. if (oldHook) {
  1418. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1419. args[_key4] = arguments[_key4];
  1420. }
  1421. return oldHook.apply(this, args);
  1422. }
  1423. };
  1424. }
  1425. if (!MPPage.__$wrappered) {
  1426. MPPage.__$wrappered = true;
  1427. Page = function Page() {
  1428. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1429. initHook('onLoad', options);
  1430. return MPPage(options);
  1431. };
  1432. Page.after = MPPage.after;
  1433. Component = function Component() {
  1434. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1435. initHook('created', options);
  1436. return MPComponent(options);
  1437. };
  1438. }
  1439. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1440. function initMocks(vm, mocks) {
  1441. var mpInstance = vm.$mp[vm.mpType];
  1442. mocks.forEach(function (mock) {
  1443. if (hasOwn(mpInstance, mock)) {
  1444. vm[mock] = mpInstance[mock];
  1445. }
  1446. });
  1447. }
  1448. function hasHook(hook, vueOptions) {
  1449. if (!vueOptions) {
  1450. return true;
  1451. }
  1452. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1453. return true;
  1454. }
  1455. vueOptions = vueOptions.default || vueOptions;
  1456. if (isFn(vueOptions)) {
  1457. if (isFn(vueOptions.extendOptions[hook])) {
  1458. return true;
  1459. }
  1460. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1461. return true;
  1462. }
  1463. return false;
  1464. }
  1465. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1466. return true;
  1467. }
  1468. var mixins = vueOptions.mixins;
  1469. if (Array.isArray(mixins)) {
  1470. return !!mixins.find(function (mixin) {
  1471. return hasHook(hook, mixin);
  1472. });
  1473. }
  1474. }
  1475. function initHooks(mpOptions, hooks, vueOptions) {
  1476. hooks.forEach(function (hook) {
  1477. if (hasHook(hook, vueOptions)) {
  1478. mpOptions[hook] = function (args) {
  1479. return this.$vm && this.$vm.__call_hook(hook, args);
  1480. };
  1481. }
  1482. });
  1483. }
  1484. function initUnknownHooks(mpOptions, vueOptions) {
  1485. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1486. findHooks(vueOptions).forEach(function (hook) {
  1487. return initHook$1(mpOptions, hook, excludes);
  1488. });
  1489. }
  1490. function findHooks(vueOptions) {
  1491. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1492. if (vueOptions) {
  1493. Object.keys(vueOptions).forEach(function (name) {
  1494. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1495. hooks.push(name);
  1496. }
  1497. });
  1498. }
  1499. return hooks;
  1500. }
  1501. function initHook$1(mpOptions, hook, excludes) {
  1502. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1503. mpOptions[hook] = function (args) {
  1504. return this.$vm && this.$vm.__call_hook(hook, args);
  1505. };
  1506. }
  1507. }
  1508. function initVueComponent(Vue, vueOptions) {
  1509. vueOptions = vueOptions.default || vueOptions;
  1510. var VueComponent;
  1511. if (isFn(vueOptions)) {
  1512. VueComponent = vueOptions;
  1513. } else {
  1514. VueComponent = Vue.extend(vueOptions);
  1515. }
  1516. vueOptions = VueComponent.options;
  1517. return [VueComponent, vueOptions];
  1518. }
  1519. function initSlots(vm, vueSlots) {
  1520. if (Array.isArray(vueSlots) && vueSlots.length) {
  1521. var $slots = Object.create(null);
  1522. vueSlots.forEach(function (slotName) {
  1523. $slots[slotName] = true;
  1524. });
  1525. vm.$scopedSlots = vm.$slots = $slots;
  1526. }
  1527. }
  1528. function initVueIds(vueIds, mpInstance) {
  1529. vueIds = (vueIds || '').split(',');
  1530. var len = vueIds.length;
  1531. if (len === 1) {
  1532. mpInstance._$vueId = vueIds[0];
  1533. } else if (len === 2) {
  1534. mpInstance._$vueId = vueIds[0];
  1535. mpInstance._$vuePid = vueIds[1];
  1536. }
  1537. }
  1538. function initData(vueOptions, context) {
  1539. var data = vueOptions.data || {};
  1540. var methods = vueOptions.methods || {};
  1541. if (typeof data === 'function') {
  1542. try {
  1543. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1544. } catch (e) {
  1545. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"uniapp-template","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1546. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1547. }
  1548. }
  1549. } else {
  1550. try {
  1551. // 对 data 格式化
  1552. data = JSON.parse(JSON.stringify(data));
  1553. } catch (e) {}
  1554. }
  1555. if (!isPlainObject(data)) {
  1556. data = {};
  1557. }
  1558. Object.keys(methods).forEach(function (methodName) {
  1559. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1560. data[methodName] = methods[methodName];
  1561. }
  1562. });
  1563. return data;
  1564. }
  1565. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1566. function createObserver(name) {
  1567. return function observer(newVal, oldVal) {
  1568. if (this.$vm) {
  1569. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1570. }
  1571. };
  1572. }
  1573. function initBehaviors(vueOptions, initBehavior) {
  1574. var vueBehaviors = vueOptions.behaviors;
  1575. var vueExtends = vueOptions.extends;
  1576. var vueMixins = vueOptions.mixins;
  1577. var vueProps = vueOptions.props;
  1578. if (!vueProps) {
  1579. vueOptions.props = vueProps = [];
  1580. }
  1581. var behaviors = [];
  1582. if (Array.isArray(vueBehaviors)) {
  1583. vueBehaviors.forEach(function (behavior) {
  1584. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1585. if (behavior === 'uni://form-field') {
  1586. if (Array.isArray(vueProps)) {
  1587. vueProps.push('name');
  1588. vueProps.push('value');
  1589. } else {
  1590. vueProps.name = {
  1591. type: String,
  1592. default: ''
  1593. };
  1594. vueProps.value = {
  1595. type: [String, Number, Boolean, Array, Object, Date],
  1596. default: ''
  1597. };
  1598. }
  1599. }
  1600. });
  1601. }
  1602. if (isPlainObject(vueExtends) && vueExtends.props) {
  1603. behaviors.push(initBehavior({
  1604. properties: initProperties(vueExtends.props, true)
  1605. }));
  1606. }
  1607. if (Array.isArray(vueMixins)) {
  1608. vueMixins.forEach(function (vueMixin) {
  1609. if (isPlainObject(vueMixin) && vueMixin.props) {
  1610. behaviors.push(initBehavior({
  1611. properties: initProperties(vueMixin.props, true)
  1612. }));
  1613. }
  1614. });
  1615. }
  1616. return behaviors;
  1617. }
  1618. function parsePropType(key, type, defaultValue, file) {
  1619. // [String]=>String
  1620. if (Array.isArray(type) && type.length === 1) {
  1621. return type[0];
  1622. }
  1623. return type;
  1624. }
  1625. function initProperties(props) {
  1626. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1627. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1628. var options = arguments.length > 3 ? arguments[3] : undefined;
  1629. var properties = {};
  1630. if (!isBehavior) {
  1631. properties.vueId = {
  1632. type: String,
  1633. value: ''
  1634. };
  1635. {
  1636. if (options.virtualHost) {
  1637. properties.virtualHostStyle = {
  1638. type: null,
  1639. value: ''
  1640. };
  1641. properties.virtualHostClass = {
  1642. type: null,
  1643. value: ''
  1644. };
  1645. }
  1646. }
  1647. // scopedSlotsCompiler auto
  1648. properties.scopedSlotsCompiler = {
  1649. type: String,
  1650. value: ''
  1651. };
  1652. properties.vueSlots = {
  1653. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1654. type: null,
  1655. value: [],
  1656. observer: function observer(newVal, oldVal) {
  1657. var $slots = Object.create(null);
  1658. newVal.forEach(function (slotName) {
  1659. $slots[slotName] = true;
  1660. });
  1661. this.setData({
  1662. $slots: $slots
  1663. });
  1664. }
  1665. };
  1666. }
  1667. if (Array.isArray(props)) {
  1668. // ['title']
  1669. props.forEach(function (key) {
  1670. properties[key] = {
  1671. type: null,
  1672. observer: createObserver(key)
  1673. };
  1674. });
  1675. } else if (isPlainObject(props)) {
  1676. // {title:{type:String,default:''},content:String}
  1677. Object.keys(props).forEach(function (key) {
  1678. var opts = props[key];
  1679. if (isPlainObject(opts)) {
  1680. // title:{type:String,default:''}
  1681. var value = opts.default;
  1682. if (isFn(value)) {
  1683. value = value();
  1684. }
  1685. opts.type = parsePropType(key, opts.type);
  1686. properties[key] = {
  1687. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1688. value: value,
  1689. observer: createObserver(key)
  1690. };
  1691. } else {
  1692. // content:String
  1693. var type = parsePropType(key, opts);
  1694. properties[key] = {
  1695. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1696. observer: createObserver(key)
  1697. };
  1698. }
  1699. });
  1700. }
  1701. return properties;
  1702. }
  1703. function wrapper$1(event) {
  1704. // TODO 又得兼容 mpvue 的 mp 对象
  1705. try {
  1706. event.mp = JSON.parse(JSON.stringify(event));
  1707. } catch (e) {}
  1708. event.stopPropagation = noop;
  1709. event.preventDefault = noop;
  1710. event.target = event.target || {};
  1711. if (!hasOwn(event, 'detail')) {
  1712. event.detail = {};
  1713. }
  1714. if (hasOwn(event, 'markerId')) {
  1715. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1716. event.detail.markerId = event.markerId;
  1717. }
  1718. if (isPlainObject(event.detail)) {
  1719. event.target = Object.assign({}, event.target, event.detail);
  1720. }
  1721. return event;
  1722. }
  1723. function getExtraValue(vm, dataPathsArray) {
  1724. var context = vm;
  1725. dataPathsArray.forEach(function (dataPathArray) {
  1726. var dataPath = dataPathArray[0];
  1727. var value = dataPathArray[2];
  1728. if (dataPath || typeof value !== 'undefined') {
  1729. // ['','',index,'disable']
  1730. var propPath = dataPathArray[1];
  1731. var valuePath = dataPathArray[3];
  1732. var vFor;
  1733. if (Number.isInteger(dataPath)) {
  1734. vFor = dataPath;
  1735. } else if (!dataPath) {
  1736. vFor = context;
  1737. } else if (typeof dataPath === 'string' && dataPath) {
  1738. if (dataPath.indexOf('#s#') === 0) {
  1739. vFor = dataPath.substr(3);
  1740. } else {
  1741. vFor = vm.__get_value(dataPath, context);
  1742. }
  1743. }
  1744. if (Number.isInteger(vFor)) {
  1745. context = value;
  1746. } else if (!propPath) {
  1747. context = vFor[value];
  1748. } else {
  1749. if (Array.isArray(vFor)) {
  1750. context = vFor.find(function (vForItem) {
  1751. return vm.__get_value(propPath, vForItem) === value;
  1752. });
  1753. } else if (isPlainObject(vFor)) {
  1754. context = Object.keys(vFor).find(function (vForKey) {
  1755. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1756. });
  1757. } else {
  1758. console.error('v-for 暂不支持循环数据:', vFor);
  1759. }
  1760. }
  1761. if (valuePath) {
  1762. context = vm.__get_value(valuePath, context);
  1763. }
  1764. }
  1765. });
  1766. return context;
  1767. }
  1768. function processEventExtra(vm, extra, event, __args__) {
  1769. var extraObj = {};
  1770. if (Array.isArray(extra) && extra.length) {
  1771. /**
  1772. *[
  1773. * ['data.items', 'data.id', item.data.id],
  1774. * ['metas', 'id', meta.id]
  1775. *],
  1776. *[
  1777. * ['data.items', 'data.id', item.data.id],
  1778. * ['metas', 'id', meta.id]
  1779. *],
  1780. *'test'
  1781. */
  1782. extra.forEach(function (dataPath, index) {
  1783. if (typeof dataPath === 'string') {
  1784. if (!dataPath) {
  1785. // model,prop.sync
  1786. extraObj['$' + index] = vm;
  1787. } else {
  1788. if (dataPath === '$event') {
  1789. // $event
  1790. extraObj['$' + index] = event;
  1791. } else if (dataPath === 'arguments') {
  1792. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1793. } else if (dataPath.indexOf('$event.') === 0) {
  1794. // $event.target.value
  1795. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1796. } else {
  1797. extraObj['$' + index] = vm.__get_value(dataPath);
  1798. }
  1799. }
  1800. } else {
  1801. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1802. }
  1803. });
  1804. }
  1805. return extraObj;
  1806. }
  1807. function getObjByArray(arr) {
  1808. var obj = {};
  1809. for (var i = 1; i < arr.length; i++) {
  1810. var element = arr[i];
  1811. obj[element[0]] = element[1];
  1812. }
  1813. return obj;
  1814. }
  1815. function processEventArgs(vm, event) {
  1816. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1817. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1818. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1819. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1820. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1821. // fixed 用户直接触发 mpInstance.triggerEvent
  1822. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1823. if (isCustom) {
  1824. // 自定义事件
  1825. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1826. if (!args.length) {
  1827. // 无参数,直接传入 event 或 detail 数组
  1828. if (isCustomMPEvent) {
  1829. return [event];
  1830. }
  1831. return __args__;
  1832. }
  1833. }
  1834. var extraObj = processEventExtra(vm, extra, event, __args__);
  1835. var ret = [];
  1836. args.forEach(function (arg) {
  1837. if (arg === '$event') {
  1838. if (methodName === '__set_model' && !isCustom) {
  1839. // input v-model value
  1840. ret.push(event.target.value);
  1841. } else {
  1842. if (isCustom && !isCustomMPEvent) {
  1843. ret.push(__args__[0]);
  1844. } else {
  1845. // wxcomponent 组件或内置组件
  1846. ret.push(event);
  1847. }
  1848. }
  1849. } else {
  1850. if (Array.isArray(arg) && arg[0] === 'o') {
  1851. ret.push(getObjByArray(arg));
  1852. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1853. ret.push(extraObj[arg]);
  1854. } else {
  1855. ret.push(arg);
  1856. }
  1857. }
  1858. });
  1859. return ret;
  1860. }
  1861. var ONCE = '~';
  1862. var CUSTOM = '^';
  1863. function isMatchEventType(eventType, optType) {
  1864. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  1865. }
  1866. function getContextVm(vm) {
  1867. var $parent = vm.$parent;
  1868. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1869. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1870. $parent = $parent.$parent;
  1871. }
  1872. return $parent && $parent.$parent;
  1873. }
  1874. function handleEvent(event) {
  1875. var _this2 = this;
  1876. event = wrapper$1(event);
  1877. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1878. var dataset = (event.currentTarget || event.target).dataset;
  1879. if (!dataset) {
  1880. return console.warn('事件信息不存在');
  1881. }
  1882. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1883. if (!eventOpts) {
  1884. return console.warn('事件信息不存在');
  1885. }
  1886. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1887. var eventType = event.type;
  1888. var ret = [];
  1889. eventOpts.forEach(function (eventOpt) {
  1890. var type = eventOpt[0];
  1891. var eventsArray = eventOpt[1];
  1892. var isCustom = type.charAt(0) === CUSTOM;
  1893. type = isCustom ? type.slice(1) : type;
  1894. var isOnce = type.charAt(0) === ONCE;
  1895. type = isOnce ? type.slice(1) : type;
  1896. if (eventsArray && isMatchEventType(eventType, type)) {
  1897. eventsArray.forEach(function (eventArray) {
  1898. var methodName = eventArray[0];
  1899. if (methodName) {
  1900. var handlerCtx = _this2.$vm;
  1901. if (handlerCtx.$options.generic) {
  1902. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1903. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1904. }
  1905. if (methodName === '$emit') {
  1906. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  1907. return;
  1908. }
  1909. var handler = handlerCtx[methodName];
  1910. if (!isFn(handler)) {
  1911. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1912. var path = _this2.route || _this2.is;
  1913. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1914. }
  1915. if (isOnce) {
  1916. if (handler.once) {
  1917. return;
  1918. }
  1919. handler.once = true;
  1920. }
  1921. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  1922. params = Array.isArray(params) ? params : [];
  1923. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1924. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1925. // eslint-disable-next-line no-sparse-arrays
  1926. params = params.concat([,,,,,,,,,, event]);
  1927. }
  1928. ret.push(handler.apply(handlerCtx, params));
  1929. }
  1930. });
  1931. }
  1932. });
  1933. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  1934. return ret[0];
  1935. }
  1936. }
  1937. var eventChannels = {};
  1938. function getEventChannel(id) {
  1939. var eventChannel = eventChannels[id];
  1940. delete eventChannels[id];
  1941. return eventChannel;
  1942. }
  1943. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  1944. function initEventChannel() {
  1945. _vue.default.prototype.getOpenerEventChannel = function () {
  1946. // 微信小程序使用自身getOpenerEventChannel
  1947. {
  1948. return this.$scope.getOpenerEventChannel();
  1949. }
  1950. };
  1951. var callHook = _vue.default.prototype.__call_hook;
  1952. _vue.default.prototype.__call_hook = function (hook, args) {
  1953. if (hook === 'onLoad' && args && args.__id__) {
  1954. this.__eventChannel__ = getEventChannel(args.__id__);
  1955. delete args.__id__;
  1956. }
  1957. return callHook.call(this, hook, args);
  1958. };
  1959. }
  1960. function initScopedSlotsParams() {
  1961. var center = {};
  1962. var parents = {};
  1963. function currentId(fn) {
  1964. var vueIds = this.$options.propsData.vueId;
  1965. if (vueIds) {
  1966. var vueId = vueIds.split(',')[0];
  1967. fn(vueId);
  1968. }
  1969. }
  1970. _vue.default.prototype.$hasSSP = function (vueId) {
  1971. var slot = center[vueId];
  1972. if (!slot) {
  1973. parents[vueId] = this;
  1974. this.$on('hook:destroyed', function () {
  1975. delete parents[vueId];
  1976. });
  1977. }
  1978. return slot;
  1979. };
  1980. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  1981. var slot = center[vueId];
  1982. if (slot) {
  1983. var params = slot[name] || [];
  1984. if (needAll) {
  1985. return params;
  1986. }
  1987. return params[0];
  1988. }
  1989. };
  1990. _vue.default.prototype.$setSSP = function (name, value) {
  1991. var index = 0;
  1992. currentId.call(this, function (vueId) {
  1993. var slot = center[vueId];
  1994. var params = slot[name] = slot[name] || [];
  1995. params.push(value);
  1996. index = params.length - 1;
  1997. });
  1998. return index;
  1999. };
  2000. _vue.default.prototype.$initSSP = function () {
  2001. currentId.call(this, function (vueId) {
  2002. center[vueId] = {};
  2003. });
  2004. };
  2005. _vue.default.prototype.$callSSP = function () {
  2006. currentId.call(this, function (vueId) {
  2007. if (parents[vueId]) {
  2008. parents[vueId].$forceUpdate();
  2009. }
  2010. });
  2011. };
  2012. _vue.default.mixin({
  2013. destroyed: function destroyed() {
  2014. var propsData = this.$options.propsData;
  2015. var vueId = propsData && propsData.vueId;
  2016. if (vueId) {
  2017. delete center[vueId];
  2018. delete parents[vueId];
  2019. }
  2020. }
  2021. });
  2022. }
  2023. function parseBaseApp(vm, _ref4) {
  2024. var mocks = _ref4.mocks,
  2025. initRefs = _ref4.initRefs;
  2026. initEventChannel();
  2027. {
  2028. initScopedSlotsParams();
  2029. }
  2030. if (vm.$options.store) {
  2031. _vue.default.prototype.$store = vm.$options.store;
  2032. }
  2033. uniIdMixin(_vue.default);
  2034. _vue.default.prototype.mpHost = "mp-weixin";
  2035. _vue.default.mixin({
  2036. beforeCreate: function beforeCreate() {
  2037. if (!this.$options.mpType) {
  2038. return;
  2039. }
  2040. this.mpType = this.$options.mpType;
  2041. this.$mp = (0, _defineProperty2.default)({
  2042. data: {}
  2043. }, this.mpType, this.$options.mpInstance);
  2044. this.$scope = this.$options.mpInstance;
  2045. delete this.$options.mpType;
  2046. delete this.$options.mpInstance;
  2047. if (this.mpType === 'page' && typeof getApp === 'function') {
  2048. // hack vue-i18n
  2049. var app = getApp();
  2050. if (app.$vm && app.$vm.$i18n) {
  2051. this._i18n = app.$vm.$i18n;
  2052. }
  2053. }
  2054. if (this.mpType !== 'app') {
  2055. initRefs(this);
  2056. initMocks(this, mocks);
  2057. }
  2058. }
  2059. });
  2060. var appOptions = {
  2061. onLaunch: function onLaunch(args) {
  2062. if (this.$vm) {
  2063. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2064. return;
  2065. }
  2066. {
  2067. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2068. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2069. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2070. }
  2071. }
  2072. this.$vm = vm;
  2073. this.$vm.$mp = {
  2074. app: this
  2075. };
  2076. this.$vm.$scope = this;
  2077. // vm 上也挂载 globalData
  2078. this.$vm.globalData = this.globalData;
  2079. this.$vm._isMounted = true;
  2080. this.$vm.__call_hook('mounted', args);
  2081. this.$vm.__call_hook('onLaunch', args);
  2082. }
  2083. };
  2084. // 兼容旧版本 globalData
  2085. appOptions.globalData = vm.$options.globalData || {};
  2086. // 将 methods 中的方法挂在 getApp() 中
  2087. var methods = vm.$options.methods;
  2088. if (methods) {
  2089. Object.keys(methods).forEach(function (name) {
  2090. appOptions[name] = methods[name];
  2091. });
  2092. }
  2093. initAppLocale(_vue.default, vm, normalizeLocale(wx.getAppBaseInfo().language) || LOCALE_EN);
  2094. initHooks(appOptions, hooks);
  2095. initUnknownHooks(appOptions, vm.$options);
  2096. return appOptions;
  2097. }
  2098. function parseApp(vm) {
  2099. return parseBaseApp(vm, {
  2100. mocks: mocks,
  2101. initRefs: initRefs
  2102. });
  2103. }
  2104. function createApp(vm) {
  2105. App(parseApp(vm));
  2106. return vm;
  2107. }
  2108. var encodeReserveRE = /[!'()*]/g;
  2109. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2110. return '%' + c.charCodeAt(0).toString(16);
  2111. };
  2112. var commaRE = /%2C/g;
  2113. // fixed encodeURIComponent which is more conformant to RFC3986:
  2114. // - escapes [!'()*]
  2115. // - preserve commas
  2116. var encode = function encode(str) {
  2117. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2118. };
  2119. function stringifyQuery(obj) {
  2120. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2121. var res = obj ? Object.keys(obj).map(function (key) {
  2122. var val = obj[key];
  2123. if (val === undefined) {
  2124. return '';
  2125. }
  2126. if (val === null) {
  2127. return encodeStr(key);
  2128. }
  2129. if (Array.isArray(val)) {
  2130. var result = [];
  2131. val.forEach(function (val2) {
  2132. if (val2 === undefined) {
  2133. return;
  2134. }
  2135. if (val2 === null) {
  2136. result.push(encodeStr(key));
  2137. } else {
  2138. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2139. }
  2140. });
  2141. return result.join('&');
  2142. }
  2143. return encodeStr(key) + '=' + encodeStr(val);
  2144. }).filter(function (x) {
  2145. return x.length > 0;
  2146. }).join('&') : null;
  2147. return res ? "?".concat(res) : '';
  2148. }
  2149. function parseBaseComponent(vueComponentOptions) {
  2150. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2151. isPage = _ref5.isPage,
  2152. initRelation = _ref5.initRelation;
  2153. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2154. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2155. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2156. VueComponent = _initVueComponent2[0],
  2157. vueOptions = _initVueComponent2[1];
  2158. var options = _objectSpread({
  2159. multipleSlots: true,
  2160. // styleIsolation: 'apply-shared',
  2161. addGlobalClass: true
  2162. }, vueOptions.options || {});
  2163. {
  2164. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2165. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2166. Object.assign(options, vueOptions['mp-weixin'].options);
  2167. }
  2168. }
  2169. var componentOptions = {
  2170. options: options,
  2171. data: initData(vueOptions, _vue.default.prototype),
  2172. behaviors: initBehaviors(vueOptions, initBehavior),
  2173. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2174. lifetimes: {
  2175. attached: function attached() {
  2176. var properties = this.properties;
  2177. var options = {
  2178. mpType: isPage.call(this) ? 'page' : 'component',
  2179. mpInstance: this,
  2180. propsData: properties
  2181. };
  2182. initVueIds(properties.vueId, this);
  2183. // 处理父子关系
  2184. initRelation.call(this, {
  2185. vuePid: this._$vuePid,
  2186. vueOptions: options
  2187. });
  2188. // 初始化 vue 实例
  2189. this.$vm = new VueComponent(options);
  2190. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2191. initSlots(this.$vm, properties.vueSlots);
  2192. // 触发首次 setData
  2193. this.$vm.$mount();
  2194. },
  2195. ready: function ready() {
  2196. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2197. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2198. if (this.$vm) {
  2199. this.$vm._isMounted = true;
  2200. this.$vm.__call_hook('mounted');
  2201. this.$vm.__call_hook('onReady');
  2202. }
  2203. },
  2204. detached: function detached() {
  2205. this.$vm && this.$vm.$destroy();
  2206. }
  2207. },
  2208. pageLifetimes: {
  2209. show: function show(args) {
  2210. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2211. },
  2212. hide: function hide() {
  2213. this.$vm && this.$vm.__call_hook('onPageHide');
  2214. },
  2215. resize: function resize(size) {
  2216. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2217. }
  2218. },
  2219. methods: {
  2220. __l: handleLink,
  2221. __e: handleEvent
  2222. }
  2223. };
  2224. // externalClasses
  2225. if (vueOptions.externalClasses) {
  2226. componentOptions.externalClasses = vueOptions.externalClasses;
  2227. }
  2228. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2229. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2230. componentOptions.methods[callMethod] = function (args) {
  2231. return this.$vm[callMethod](args);
  2232. };
  2233. });
  2234. }
  2235. if (needVueOptions) {
  2236. return [componentOptions, vueOptions, VueComponent];
  2237. }
  2238. if (isPage) {
  2239. return componentOptions;
  2240. }
  2241. return [componentOptions, VueComponent];
  2242. }
  2243. function parseComponent(vueComponentOptions, needVueOptions) {
  2244. return parseBaseComponent(vueComponentOptions, {
  2245. isPage: isPage,
  2246. initRelation: initRelation
  2247. }, needVueOptions);
  2248. }
  2249. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2250. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2251. function parseBasePage(vuePageOptions) {
  2252. var _parseComponent = parseComponent(vuePageOptions, true),
  2253. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2254. pageOptions = _parseComponent2[0],
  2255. vueOptions = _parseComponent2[1];
  2256. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2257. pageOptions.methods.onLoad = function (query) {
  2258. this.options = query;
  2259. var copyQuery = Object.assign({}, query);
  2260. delete copyQuery.__id__;
  2261. this.$page = {
  2262. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2263. };
  2264. this.$vm.$mp.query = query; // 兼容 mpvue
  2265. this.$vm.__call_hook('onLoad', query);
  2266. };
  2267. {
  2268. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2269. }
  2270. {
  2271. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2272. }
  2273. return pageOptions;
  2274. }
  2275. function parsePage(vuePageOptions) {
  2276. return parseBasePage(vuePageOptions);
  2277. }
  2278. function createPage(vuePageOptions) {
  2279. {
  2280. return Component(parsePage(vuePageOptions));
  2281. }
  2282. }
  2283. function createComponent(vueOptions) {
  2284. {
  2285. return Component(parseComponent(vueOptions));
  2286. }
  2287. }
  2288. function createSubpackageApp(vm) {
  2289. var appOptions = parseApp(vm);
  2290. var app = getApp({
  2291. allowDefault: true
  2292. });
  2293. vm.$scope = app;
  2294. var globalData = app.globalData;
  2295. if (globalData) {
  2296. Object.keys(appOptions.globalData).forEach(function (name) {
  2297. if (!hasOwn(globalData, name)) {
  2298. globalData[name] = appOptions.globalData[name];
  2299. }
  2300. });
  2301. }
  2302. Object.keys(appOptions).forEach(function (name) {
  2303. if (!hasOwn(app, name)) {
  2304. app[name] = appOptions[name];
  2305. }
  2306. });
  2307. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2308. wx.onAppShow(function () {
  2309. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2310. args[_key5] = arguments[_key5];
  2311. }
  2312. vm.__call_hook('onShow', args);
  2313. });
  2314. }
  2315. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2316. wx.onAppHide(function () {
  2317. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2318. args[_key6] = arguments[_key6];
  2319. }
  2320. vm.__call_hook('onHide', args);
  2321. });
  2322. }
  2323. if (isFn(appOptions.onLaunch)) {
  2324. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2325. vm.__call_hook('onLaunch', args);
  2326. }
  2327. return vm;
  2328. }
  2329. function createPlugin(vm) {
  2330. var appOptions = parseApp(vm);
  2331. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2332. wx.onAppShow(function () {
  2333. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2334. args[_key7] = arguments[_key7];
  2335. }
  2336. vm.__call_hook('onShow', args);
  2337. });
  2338. }
  2339. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2340. wx.onAppHide(function () {
  2341. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2342. args[_key8] = arguments[_key8];
  2343. }
  2344. vm.__call_hook('onHide', args);
  2345. });
  2346. }
  2347. if (isFn(appOptions.onLaunch)) {
  2348. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2349. vm.__call_hook('onLaunch', args);
  2350. }
  2351. return vm;
  2352. }
  2353. todos.forEach(function (todoApi) {
  2354. protocols[todoApi] = false;
  2355. });
  2356. canIUses.forEach(function (canIUseApi) {
  2357. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2358. if (!wx.canIUse(apiName)) {
  2359. protocols[canIUseApi] = false;
  2360. }
  2361. });
  2362. var uni = {};
  2363. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2364. uni = new Proxy({}, {
  2365. get: function get(target, name) {
  2366. if (hasOwn(target, name)) {
  2367. return target[name];
  2368. }
  2369. if (baseApi[name]) {
  2370. return baseApi[name];
  2371. }
  2372. if (api[name]) {
  2373. return promisify(name, api[name]);
  2374. }
  2375. {
  2376. if (extraApi[name]) {
  2377. return promisify(name, extraApi[name]);
  2378. }
  2379. if (todoApis[name]) {
  2380. return promisify(name, todoApis[name]);
  2381. }
  2382. }
  2383. if (eventApi[name]) {
  2384. return eventApi[name];
  2385. }
  2386. return promisify(name, wrapper(name, wx[name]));
  2387. },
  2388. set: function set(target, name, value) {
  2389. target[name] = value;
  2390. return true;
  2391. }
  2392. });
  2393. } else {
  2394. Object.keys(baseApi).forEach(function (name) {
  2395. uni[name] = baseApi[name];
  2396. });
  2397. {
  2398. Object.keys(todoApis).forEach(function (name) {
  2399. uni[name] = promisify(name, todoApis[name]);
  2400. });
  2401. Object.keys(extraApi).forEach(function (name) {
  2402. uni[name] = promisify(name, extraApi[name]);
  2403. });
  2404. }
  2405. Object.keys(eventApi).forEach(function (name) {
  2406. uni[name] = eventApi[name];
  2407. });
  2408. Object.keys(api).forEach(function (name) {
  2409. uni[name] = promisify(name, api[name]);
  2410. });
  2411. Object.keys(wx).forEach(function (name) {
  2412. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2413. uni[name] = promisify(name, wrapper(name, wx[name]));
  2414. }
  2415. });
  2416. }
  2417. wx.createApp = createApp;
  2418. wx.createPage = createPage;
  2419. wx.createComponent = createComponent;
  2420. wx.createSubpackageApp = createSubpackageApp;
  2421. wx.createPlugin = createPlugin;
  2422. var uni$1 = uni;
  2423. var _default = uni$1;
  2424. exports.default = _default;
  2425. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  2426. /***/ }),
  2427. /* 3 */
  2428. /*!***********************************!*\
  2429. !*** (webpack)/buildin/global.js ***!
  2430. \***********************************/
  2431. /*! no static exports found */
  2432. /***/ (function(module, exports) {
  2433. var g;
  2434. // This works in non-strict mode
  2435. g = (function() {
  2436. return this;
  2437. })();
  2438. try {
  2439. // This works if eval is allowed (see CSP)
  2440. g = g || new Function("return this")();
  2441. } catch (e) {
  2442. // This works if the window reference is available
  2443. if (typeof window === "object") g = window;
  2444. }
  2445. // g can still be undefined, but nothing to do about it...
  2446. // We return undefined, instead of nothing here, so it's
  2447. // easier to handle this case. if(!global) { ...}
  2448. module.exports = g;
  2449. /***/ }),
  2450. /* 4 */
  2451. /*!**********************************************************************!*\
  2452. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  2453. \**********************************************************************/
  2454. /*! no static exports found */
  2455. /***/ (function(module, exports) {
  2456. function _interopRequireDefault(obj) {
  2457. return obj && obj.__esModule ? obj : {
  2458. "default": obj
  2459. };
  2460. }
  2461. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2462. /***/ }),
  2463. /* 5 */
  2464. /*!**************************************************************!*\
  2465. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  2466. \**************************************************************/
  2467. /*! no static exports found */
  2468. /***/ (function(module, exports, __webpack_require__) {
  2469. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  2470. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  2471. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2472. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  2473. function _slicedToArray(arr, i) {
  2474. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  2475. }
  2476. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2477. /***/ }),
  2478. /* 6 */
  2479. /*!***************************************************************!*\
  2480. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  2481. \***************************************************************/
  2482. /*! no static exports found */
  2483. /***/ (function(module, exports) {
  2484. function _arrayWithHoles(arr) {
  2485. if (Array.isArray(arr)) return arr;
  2486. }
  2487. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2488. /***/ }),
  2489. /* 7 */
  2490. /*!*********************************************************************!*\
  2491. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  2492. \*********************************************************************/
  2493. /*! no static exports found */
  2494. /***/ (function(module, exports) {
  2495. function _iterableToArrayLimit(r, l) {
  2496. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  2497. if (null != t) {
  2498. var e,
  2499. n,
  2500. i,
  2501. u,
  2502. a = [],
  2503. f = !0,
  2504. o = !1;
  2505. try {
  2506. if (i = (t = t.call(r)).next, 0 === l) {
  2507. if (Object(t) !== t) return;
  2508. f = !1;
  2509. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {
  2510. ;
  2511. }
  2512. } catch (r) {
  2513. o = !0, n = r;
  2514. } finally {
  2515. try {
  2516. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  2517. } finally {
  2518. if (o) throw n;
  2519. }
  2520. }
  2521. return a;
  2522. }
  2523. }
  2524. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2525. /***/ }),
  2526. /* 8 */
  2527. /*!***************************************************************************!*\
  2528. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  2529. \***************************************************************************/
  2530. /*! no static exports found */
  2531. /***/ (function(module, exports, __webpack_require__) {
  2532. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2533. function _unsupportedIterableToArray(o, minLen) {
  2534. if (!o) return;
  2535. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  2536. var n = Object.prototype.toString.call(o).slice(8, -1);
  2537. if (n === "Object" && o.constructor) n = o.constructor.name;
  2538. if (n === "Map" || n === "Set") return Array.from(o);
  2539. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  2540. }
  2541. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2542. /***/ }),
  2543. /* 9 */
  2544. /*!*****************************************************************!*\
  2545. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  2546. \*****************************************************************/
  2547. /*! no static exports found */
  2548. /***/ (function(module, exports) {
  2549. function _arrayLikeToArray(arr, len) {
  2550. if (len == null || len > arr.length) len = arr.length;
  2551. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  2552. arr2[i] = arr[i];
  2553. }
  2554. return arr2;
  2555. }
  2556. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2557. /***/ }),
  2558. /* 10 */
  2559. /*!****************************************************************!*\
  2560. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  2561. \****************************************************************/
  2562. /*! no static exports found */
  2563. /***/ (function(module, exports) {
  2564. function _nonIterableRest() {
  2565. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2566. }
  2567. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2568. /***/ }),
  2569. /* 11 */
  2570. /*!***************************************************************!*\
  2571. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2572. \***************************************************************/
  2573. /*! no static exports found */
  2574. /***/ (function(module, exports, __webpack_require__) {
  2575. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2576. function _defineProperty(obj, key, value) {
  2577. key = toPropertyKey(key);
  2578. if (key in obj) {
  2579. Object.defineProperty(obj, key, {
  2580. value: value,
  2581. enumerable: true,
  2582. configurable: true,
  2583. writable: true
  2584. });
  2585. } else {
  2586. obj[key] = value;
  2587. }
  2588. return obj;
  2589. }
  2590. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /* 12 */
  2593. /*!**************************************************************!*\
  2594. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  2595. \**************************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports, __webpack_require__) {
  2598. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2599. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  2600. function toPropertyKey(t) {
  2601. var i = toPrimitive(t, "string");
  2602. return "symbol" == _typeof(i) ? i : i + "";
  2603. }
  2604. module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2605. /***/ }),
  2606. /* 13 */
  2607. /*!*******************************************************!*\
  2608. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  2609. \*******************************************************/
  2610. /*! no static exports found */
  2611. /***/ (function(module, exports) {
  2612. function _typeof(o) {
  2613. "@babel/helpers - typeof";
  2614. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  2615. return typeof o;
  2616. } : function (o) {
  2617. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  2618. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
  2619. }
  2620. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2621. /***/ }),
  2622. /* 14 */
  2623. /*!************************************************************!*\
  2624. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  2625. \************************************************************/
  2626. /*! no static exports found */
  2627. /***/ (function(module, exports, __webpack_require__) {
  2628. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2629. function toPrimitive(t, r) {
  2630. if ("object" != _typeof(t) || !t) return t;
  2631. var e = t[Symbol.toPrimitive];
  2632. if (void 0 !== e) {
  2633. var i = e.call(t, r || "default");
  2634. if ("object" != _typeof(i)) return i;
  2635. throw new TypeError("@@toPrimitive must return a primitive value.");
  2636. }
  2637. return ("string" === r ? String : Number)(t);
  2638. }
  2639. module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2640. /***/ }),
  2641. /* 15 */
  2642. /*!**********************************************************!*\
  2643. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  2644. \**********************************************************/
  2645. /*! no static exports found */
  2646. /***/ (function(module, exports, __webpack_require__) {
  2647. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  2648. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  2649. function _construct(t, e, r) {
  2650. if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
  2651. var o = [null];
  2652. o.push.apply(o, e);
  2653. var p = new (t.bind.apply(t, o))();
  2654. return r && setPrototypeOf(p, r.prototype), p;
  2655. }
  2656. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2657. /***/ }),
  2658. /* 16 */
  2659. /*!***************************************************************!*\
  2660. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  2661. \***************************************************************/
  2662. /*! no static exports found */
  2663. /***/ (function(module, exports) {
  2664. function _setPrototypeOf(o, p) {
  2665. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2666. o.__proto__ = p;
  2667. return o;
  2668. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2669. return _setPrototypeOf(o, p);
  2670. }
  2671. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2672. /***/ }),
  2673. /* 17 */
  2674. /*!*************************************************************************!*\
  2675. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  2676. \*************************************************************************/
  2677. /*! no static exports found */
  2678. /***/ (function(module, exports) {
  2679. function _isNativeReflectConstruct() {
  2680. try {
  2681. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  2682. } catch (t) {}
  2683. return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
  2684. return !!t;
  2685. }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
  2686. }
  2687. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2688. /***/ }),
  2689. /* 18 */
  2690. /*!******************************************************************!*\
  2691. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  2692. \******************************************************************/
  2693. /*! no static exports found */
  2694. /***/ (function(module, exports, __webpack_require__) {
  2695. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  2696. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  2697. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2698. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  2699. function _toConsumableArray(arr) {
  2700. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  2701. }
  2702. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2703. /***/ }),
  2704. /* 19 */
  2705. /*!******************************************************************!*\
  2706. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  2707. \******************************************************************/
  2708. /*! no static exports found */
  2709. /***/ (function(module, exports, __webpack_require__) {
  2710. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2711. function _arrayWithoutHoles(arr) {
  2712. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  2713. }
  2714. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2715. /***/ }),
  2716. /* 20 */
  2717. /*!****************************************************************!*\
  2718. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2719. \****************************************************************/
  2720. /*! no static exports found */
  2721. /***/ (function(module, exports) {
  2722. function _iterableToArray(iter) {
  2723. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2724. }
  2725. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2726. /***/ }),
  2727. /* 21 */
  2728. /*!******************************************************************!*\
  2729. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2730. \******************************************************************/
  2731. /*! no static exports found */
  2732. /***/ (function(module, exports) {
  2733. function _nonIterableSpread() {
  2734. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2735. }
  2736. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2737. /***/ }),
  2738. /* 22 */
  2739. /*!*************************************************************!*\
  2740. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2741. \*************************************************************/
  2742. /*! no static exports found */
  2743. /***/ (function(module, exports, __webpack_require__) {
  2744. "use strict";
  2745. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2746. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2747. Object.defineProperty(exports, "__esModule", {
  2748. value: true
  2749. });
  2750. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2751. exports.compileI18nJsonStr = compileI18nJsonStr;
  2752. exports.hasI18nJson = hasI18nJson;
  2753. exports.initVueI18n = initVueI18n;
  2754. exports.isI18nStr = isI18nStr;
  2755. exports.isString = void 0;
  2756. exports.normalizeLocale = normalizeLocale;
  2757. exports.parseI18nJson = parseI18nJson;
  2758. exports.resolveLocale = resolveLocale;
  2759. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2760. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2761. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2762. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2763. var isObject = function isObject(val) {
  2764. return val !== null && (0, _typeof2.default)(val) === 'object';
  2765. };
  2766. var defaultDelimiters = ['{', '}'];
  2767. var BaseFormatter = /*#__PURE__*/function () {
  2768. function BaseFormatter() {
  2769. (0, _classCallCheck2.default)(this, BaseFormatter);
  2770. this._caches = Object.create(null);
  2771. }
  2772. (0, _createClass2.default)(BaseFormatter, [{
  2773. key: "interpolate",
  2774. value: function interpolate(message, values) {
  2775. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2776. if (!values) {
  2777. return [message];
  2778. }
  2779. var tokens = this._caches[message];
  2780. if (!tokens) {
  2781. tokens = parse(message, delimiters);
  2782. this._caches[message] = tokens;
  2783. }
  2784. return compile(tokens, values);
  2785. }
  2786. }]);
  2787. return BaseFormatter;
  2788. }();
  2789. exports.Formatter = BaseFormatter;
  2790. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2791. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2792. function parse(format, _ref) {
  2793. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2794. startDelimiter = _ref2[0],
  2795. endDelimiter = _ref2[1];
  2796. var tokens = [];
  2797. var position = 0;
  2798. var text = '';
  2799. while (position < format.length) {
  2800. var char = format[position++];
  2801. if (char === startDelimiter) {
  2802. if (text) {
  2803. tokens.push({
  2804. type: 'text',
  2805. value: text
  2806. });
  2807. }
  2808. text = '';
  2809. var sub = '';
  2810. char = format[position++];
  2811. while (char !== undefined && char !== endDelimiter) {
  2812. sub += char;
  2813. char = format[position++];
  2814. }
  2815. var isClosed = char === endDelimiter;
  2816. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2817. tokens.push({
  2818. value: sub,
  2819. type: type
  2820. });
  2821. }
  2822. // else if (char === '%') {
  2823. // // when found rails i18n syntax, skip text capture
  2824. // if (format[position] !== '{') {
  2825. // text += char
  2826. // }
  2827. // }
  2828. else {
  2829. text += char;
  2830. }
  2831. }
  2832. text && tokens.push({
  2833. type: 'text',
  2834. value: text
  2835. });
  2836. return tokens;
  2837. }
  2838. function compile(tokens, values) {
  2839. var compiled = [];
  2840. var index = 0;
  2841. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2842. if (mode === 'unknown') {
  2843. return compiled;
  2844. }
  2845. while (index < tokens.length) {
  2846. var token = tokens[index];
  2847. switch (token.type) {
  2848. case 'text':
  2849. compiled.push(token.value);
  2850. break;
  2851. case 'list':
  2852. compiled.push(values[parseInt(token.value, 10)]);
  2853. break;
  2854. case 'named':
  2855. if (mode === 'named') {
  2856. compiled.push(values[token.value]);
  2857. } else {
  2858. if (true) {
  2859. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2860. }
  2861. }
  2862. break;
  2863. case 'unknown':
  2864. if (true) {
  2865. console.warn("Detect 'unknown' type of token!");
  2866. }
  2867. break;
  2868. }
  2869. index++;
  2870. }
  2871. return compiled;
  2872. }
  2873. var LOCALE_ZH_HANS = 'zh-Hans';
  2874. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2875. var LOCALE_ZH_HANT = 'zh-Hant';
  2876. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2877. var LOCALE_EN = 'en';
  2878. exports.LOCALE_EN = LOCALE_EN;
  2879. var LOCALE_FR = 'fr';
  2880. exports.LOCALE_FR = LOCALE_FR;
  2881. var LOCALE_ES = 'es';
  2882. exports.LOCALE_ES = LOCALE_ES;
  2883. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2884. var hasOwn = function hasOwn(val, key) {
  2885. return hasOwnProperty.call(val, key);
  2886. };
  2887. var defaultFormatter = new BaseFormatter();
  2888. function include(str, parts) {
  2889. return !!parts.find(function (part) {
  2890. return str.indexOf(part) !== -1;
  2891. });
  2892. }
  2893. function startsWith(str, parts) {
  2894. return parts.find(function (part) {
  2895. return str.indexOf(part) === 0;
  2896. });
  2897. }
  2898. function normalizeLocale(locale, messages) {
  2899. if (!locale) {
  2900. return;
  2901. }
  2902. locale = locale.trim().replace(/_/g, '-');
  2903. if (messages && messages[locale]) {
  2904. return locale;
  2905. }
  2906. locale = locale.toLowerCase();
  2907. if (locale === 'chinese') {
  2908. // 支付宝
  2909. return LOCALE_ZH_HANS;
  2910. }
  2911. if (locale.indexOf('zh') === 0) {
  2912. if (locale.indexOf('-hans') > -1) {
  2913. return LOCALE_ZH_HANS;
  2914. }
  2915. if (locale.indexOf('-hant') > -1) {
  2916. return LOCALE_ZH_HANT;
  2917. }
  2918. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2919. return LOCALE_ZH_HANT;
  2920. }
  2921. return LOCALE_ZH_HANS;
  2922. }
  2923. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2924. if (messages && Object.keys(messages).length > 0) {
  2925. locales = Object.keys(messages);
  2926. }
  2927. var lang = startsWith(locale, locales);
  2928. if (lang) {
  2929. return lang;
  2930. }
  2931. }
  2932. var I18n = /*#__PURE__*/function () {
  2933. function I18n(_ref3) {
  2934. var locale = _ref3.locale,
  2935. fallbackLocale = _ref3.fallbackLocale,
  2936. messages = _ref3.messages,
  2937. watcher = _ref3.watcher,
  2938. formater = _ref3.formater;
  2939. (0, _classCallCheck2.default)(this, I18n);
  2940. this.locale = LOCALE_EN;
  2941. this.fallbackLocale = LOCALE_EN;
  2942. this.message = {};
  2943. this.messages = {};
  2944. this.watchers = [];
  2945. if (fallbackLocale) {
  2946. this.fallbackLocale = fallbackLocale;
  2947. }
  2948. this.formater = formater || defaultFormatter;
  2949. this.messages = messages || {};
  2950. this.setLocale(locale || LOCALE_EN);
  2951. if (watcher) {
  2952. this.watchLocale(watcher);
  2953. }
  2954. }
  2955. (0, _createClass2.default)(I18n, [{
  2956. key: "setLocale",
  2957. value: function setLocale(locale) {
  2958. var _this = this;
  2959. var oldLocale = this.locale;
  2960. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2961. if (!this.messages[this.locale]) {
  2962. // 可能初始化时不存在
  2963. this.messages[this.locale] = {};
  2964. }
  2965. this.message = this.messages[this.locale];
  2966. // 仅发生变化时,通知
  2967. if (oldLocale !== this.locale) {
  2968. this.watchers.forEach(function (watcher) {
  2969. watcher(_this.locale, oldLocale);
  2970. });
  2971. }
  2972. }
  2973. }, {
  2974. key: "getLocale",
  2975. value: function getLocale() {
  2976. return this.locale;
  2977. }
  2978. }, {
  2979. key: "watchLocale",
  2980. value: function watchLocale(fn) {
  2981. var _this2 = this;
  2982. var index = this.watchers.push(fn) - 1;
  2983. return function () {
  2984. _this2.watchers.splice(index, 1);
  2985. };
  2986. }
  2987. }, {
  2988. key: "add",
  2989. value: function add(locale, message) {
  2990. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2991. var curMessages = this.messages[locale];
  2992. if (curMessages) {
  2993. if (override) {
  2994. Object.assign(curMessages, message);
  2995. } else {
  2996. Object.keys(message).forEach(function (key) {
  2997. if (!hasOwn(curMessages, key)) {
  2998. curMessages[key] = message[key];
  2999. }
  3000. });
  3001. }
  3002. } else {
  3003. this.messages[locale] = message;
  3004. }
  3005. }
  3006. }, {
  3007. key: "f",
  3008. value: function f(message, values, delimiters) {
  3009. return this.formater.interpolate(message, values, delimiters).join('');
  3010. }
  3011. }, {
  3012. key: "t",
  3013. value: function t(key, locale, values) {
  3014. var message = this.message;
  3015. if (typeof locale === 'string') {
  3016. locale = normalizeLocale(locale, this.messages);
  3017. locale && (message = this.messages[locale]);
  3018. } else {
  3019. values = locale;
  3020. }
  3021. if (!hasOwn(message, key)) {
  3022. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3023. return key;
  3024. }
  3025. return this.formater.interpolate(message[key], values).join('');
  3026. }
  3027. }]);
  3028. return I18n;
  3029. }();
  3030. exports.I18n = I18n;
  3031. function watchAppLocale(appVm, i18n) {
  3032. // 需要保证 watch 的触发在组件渲染之前
  3033. if (appVm.$watchLocale) {
  3034. // vue2
  3035. appVm.$watchLocale(function (newLocale) {
  3036. i18n.setLocale(newLocale);
  3037. });
  3038. } else {
  3039. appVm.$watch(function () {
  3040. return appVm.$locale;
  3041. }, function (newLocale) {
  3042. i18n.setLocale(newLocale);
  3043. });
  3044. }
  3045. }
  3046. function getDefaultLocale() {
  3047. if (typeof uni !== 'undefined' && uni.getLocale) {
  3048. return uni.getLocale();
  3049. }
  3050. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3051. if (typeof global !== 'undefined' && global.getLocale) {
  3052. return global.getLocale();
  3053. }
  3054. return LOCALE_EN;
  3055. }
  3056. function initVueI18n(locale) {
  3057. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3058. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3059. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3060. // 兼容旧版本入参
  3061. if (typeof locale !== 'string') {
  3062. var _ref4 = [messages, locale];
  3063. locale = _ref4[0];
  3064. messages = _ref4[1];
  3065. }
  3066. if (typeof locale !== 'string') {
  3067. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3068. locale = getDefaultLocale();
  3069. }
  3070. if (typeof fallbackLocale !== 'string') {
  3071. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3072. }
  3073. var i18n = new I18n({
  3074. locale: locale,
  3075. fallbackLocale: fallbackLocale,
  3076. messages: messages,
  3077. watcher: watcher
  3078. });
  3079. var _t = function t(key, values) {
  3080. if (typeof getApp !== 'function') {
  3081. // app view
  3082. /* eslint-disable no-func-assign */
  3083. _t = function t(key, values) {
  3084. return i18n.t(key, values);
  3085. };
  3086. } else {
  3087. var isWatchedAppLocale = false;
  3088. _t = function t(key, values) {
  3089. var appVm = getApp().$vm;
  3090. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3091. // options: {
  3092. // type: Array,
  3093. // default () {
  3094. // return [{
  3095. // icon: 'shop',
  3096. // text: t("uni-goods-nav.options.shop"),
  3097. // }, {
  3098. // icon: 'cart',
  3099. // text: t("uni-goods-nav.options.cart")
  3100. // }]
  3101. // }
  3102. // },
  3103. if (appVm) {
  3104. // 触发响应式
  3105. appVm.$locale;
  3106. if (!isWatchedAppLocale) {
  3107. isWatchedAppLocale = true;
  3108. watchAppLocale(appVm, i18n);
  3109. }
  3110. }
  3111. return i18n.t(key, values);
  3112. };
  3113. }
  3114. return _t(key, values);
  3115. };
  3116. return {
  3117. i18n: i18n,
  3118. f: function f(message, values, delimiters) {
  3119. return i18n.f(message, values, delimiters);
  3120. },
  3121. t: function t(key, values) {
  3122. return _t(key, values);
  3123. },
  3124. add: function add(locale, message) {
  3125. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3126. return i18n.add(locale, message, override);
  3127. },
  3128. watch: function watch(fn) {
  3129. return i18n.watchLocale(fn);
  3130. },
  3131. getLocale: function getLocale() {
  3132. return i18n.getLocale();
  3133. },
  3134. setLocale: function setLocale(newLocale) {
  3135. return i18n.setLocale(newLocale);
  3136. }
  3137. };
  3138. }
  3139. var isString = function isString(val) {
  3140. return typeof val === 'string';
  3141. };
  3142. exports.isString = isString;
  3143. var formater;
  3144. function hasI18nJson(jsonObj, delimiters) {
  3145. if (!formater) {
  3146. formater = new BaseFormatter();
  3147. }
  3148. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3149. var value = jsonObj[key];
  3150. if (isString(value)) {
  3151. if (isI18nStr(value, delimiters)) {
  3152. return true;
  3153. }
  3154. } else {
  3155. return hasI18nJson(value, delimiters);
  3156. }
  3157. });
  3158. }
  3159. function parseI18nJson(jsonObj, values, delimiters) {
  3160. if (!formater) {
  3161. formater = new BaseFormatter();
  3162. }
  3163. walkJsonObj(jsonObj, function (jsonObj, key) {
  3164. var value = jsonObj[key];
  3165. if (isString(value)) {
  3166. if (isI18nStr(value, delimiters)) {
  3167. jsonObj[key] = compileStr(value, values, delimiters);
  3168. }
  3169. } else {
  3170. parseI18nJson(value, values, delimiters);
  3171. }
  3172. });
  3173. return jsonObj;
  3174. }
  3175. function compileI18nJsonStr(jsonStr, _ref5) {
  3176. var locale = _ref5.locale,
  3177. locales = _ref5.locales,
  3178. delimiters = _ref5.delimiters;
  3179. if (!isI18nStr(jsonStr, delimiters)) {
  3180. return jsonStr;
  3181. }
  3182. if (!formater) {
  3183. formater = new BaseFormatter();
  3184. }
  3185. var localeValues = [];
  3186. Object.keys(locales).forEach(function (name) {
  3187. if (name !== locale) {
  3188. localeValues.push({
  3189. locale: name,
  3190. values: locales[name]
  3191. });
  3192. }
  3193. });
  3194. localeValues.unshift({
  3195. locale: locale,
  3196. values: locales[locale]
  3197. });
  3198. try {
  3199. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3200. } catch (e) {}
  3201. return jsonStr;
  3202. }
  3203. function isI18nStr(value, delimiters) {
  3204. return value.indexOf(delimiters[0]) > -1;
  3205. }
  3206. function compileStr(value, values, delimiters) {
  3207. return formater.interpolate(value, values, delimiters).join('');
  3208. }
  3209. function compileValue(jsonObj, key, localeValues, delimiters) {
  3210. var value = jsonObj[key];
  3211. if (isString(value)) {
  3212. // 存在国际化
  3213. if (isI18nStr(value, delimiters)) {
  3214. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3215. if (localeValues.length > 1) {
  3216. // 格式化国际化语言
  3217. var valueLocales = jsonObj[key + 'Locales'] = {};
  3218. localeValues.forEach(function (localValue) {
  3219. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3220. });
  3221. }
  3222. }
  3223. } else {
  3224. compileJsonObj(value, localeValues, delimiters);
  3225. }
  3226. }
  3227. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3228. walkJsonObj(jsonObj, function (jsonObj, key) {
  3229. compileValue(jsonObj, key, localeValues, delimiters);
  3230. });
  3231. return jsonObj;
  3232. }
  3233. function walkJsonObj(jsonObj, walk) {
  3234. if (Array.isArray(jsonObj)) {
  3235. for (var i = 0; i < jsonObj.length; i++) {
  3236. if (walk(jsonObj, i)) {
  3237. return true;
  3238. }
  3239. }
  3240. } else if (isObject(jsonObj)) {
  3241. for (var key in jsonObj) {
  3242. if (walk(jsonObj, key)) {
  3243. return true;
  3244. }
  3245. }
  3246. }
  3247. return false;
  3248. }
  3249. function resolveLocale(locales) {
  3250. return function (locale) {
  3251. if (!locale) {
  3252. return locale;
  3253. }
  3254. locale = normalizeLocale(locale) || locale;
  3255. return resolveLocaleChain(locale).find(function (locale) {
  3256. return locales.indexOf(locale) > -1;
  3257. });
  3258. };
  3259. }
  3260. function resolveLocaleChain(locale) {
  3261. var chain = [];
  3262. var tokens = locale.split('-');
  3263. while (tokens.length) {
  3264. chain.push(tokens.join('-'));
  3265. tokens.pop();
  3266. }
  3267. return chain;
  3268. }
  3269. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3270. /***/ }),
  3271. /* 23 */
  3272. /*!***************************************************************!*\
  3273. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3274. \***************************************************************/
  3275. /*! no static exports found */
  3276. /***/ (function(module, exports) {
  3277. function _classCallCheck(instance, Constructor) {
  3278. if (!(instance instanceof Constructor)) {
  3279. throw new TypeError("Cannot call a class as a function");
  3280. }
  3281. }
  3282. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3283. /***/ }),
  3284. /* 24 */
  3285. /*!************************************************************!*\
  3286. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3287. \************************************************************/
  3288. /*! no static exports found */
  3289. /***/ (function(module, exports, __webpack_require__) {
  3290. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3291. function _defineProperties(target, props) {
  3292. for (var i = 0; i < props.length; i++) {
  3293. var descriptor = props[i];
  3294. descriptor.enumerable = descriptor.enumerable || false;
  3295. descriptor.configurable = true;
  3296. if ("value" in descriptor) descriptor.writable = true;
  3297. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3298. }
  3299. }
  3300. function _createClass(Constructor, protoProps, staticProps) {
  3301. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3302. if (staticProps) _defineProperties(Constructor, staticProps);
  3303. Object.defineProperty(Constructor, "prototype", {
  3304. writable: false
  3305. });
  3306. return Constructor;
  3307. }
  3308. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3309. /***/ }),
  3310. /* 25 */
  3311. /*!******************************************************************************************!*\
  3312. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3313. \******************************************************************************************/
  3314. /*! exports provided: default */
  3315. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3316. "use strict";
  3317. __webpack_require__.r(__webpack_exports__);
  3318. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3319. * Vue.js v2.6.11
  3320. * (c) 2014-2024 Evan You
  3321. * Released under the MIT License.
  3322. */
  3323. /* */
  3324. var emptyObject = Object.freeze({});
  3325. // These helpers produce better VM code in JS engines due to their
  3326. // explicitness and function inlining.
  3327. function isUndef (v) {
  3328. return v === undefined || v === null
  3329. }
  3330. function isDef (v) {
  3331. return v !== undefined && v !== null
  3332. }
  3333. function isTrue (v) {
  3334. return v === true
  3335. }
  3336. function isFalse (v) {
  3337. return v === false
  3338. }
  3339. /**
  3340. * Check if value is primitive.
  3341. */
  3342. function isPrimitive (value) {
  3343. return (
  3344. typeof value === 'string' ||
  3345. typeof value === 'number' ||
  3346. // $flow-disable-line
  3347. typeof value === 'symbol' ||
  3348. typeof value === 'boolean'
  3349. )
  3350. }
  3351. /**
  3352. * Quick object check - this is primarily used to tell
  3353. * Objects from primitive values when we know the value
  3354. * is a JSON-compliant type.
  3355. */
  3356. function isObject (obj) {
  3357. return obj !== null && typeof obj === 'object'
  3358. }
  3359. /**
  3360. * Get the raw type string of a value, e.g., [object Object].
  3361. */
  3362. var _toString = Object.prototype.toString;
  3363. function toRawType (value) {
  3364. return _toString.call(value).slice(8, -1)
  3365. }
  3366. /**
  3367. * Strict object type check. Only returns true
  3368. * for plain JavaScript objects.
  3369. */
  3370. function isPlainObject (obj) {
  3371. return _toString.call(obj) === '[object Object]'
  3372. }
  3373. function isRegExp (v) {
  3374. return _toString.call(v) === '[object RegExp]'
  3375. }
  3376. /**
  3377. * Check if val is a valid array index.
  3378. */
  3379. function isValidArrayIndex (val) {
  3380. var n = parseFloat(String(val));
  3381. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3382. }
  3383. function isPromise (val) {
  3384. return (
  3385. isDef(val) &&
  3386. typeof val.then === 'function' &&
  3387. typeof val.catch === 'function'
  3388. )
  3389. }
  3390. /**
  3391. * Convert a value to a string that is actually rendered.
  3392. */
  3393. function toString (val) {
  3394. return val == null
  3395. ? ''
  3396. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3397. ? JSON.stringify(val, null, 2)
  3398. : String(val)
  3399. }
  3400. /**
  3401. * Convert an input value to a number for persistence.
  3402. * If the conversion fails, return original string.
  3403. */
  3404. function toNumber (val) {
  3405. var n = parseFloat(val);
  3406. return isNaN(n) ? val : n
  3407. }
  3408. /**
  3409. * Make a map and return a function for checking if a key
  3410. * is in that map.
  3411. */
  3412. function makeMap (
  3413. str,
  3414. expectsLowerCase
  3415. ) {
  3416. var map = Object.create(null);
  3417. var list = str.split(',');
  3418. for (var i = 0; i < list.length; i++) {
  3419. map[list[i]] = true;
  3420. }
  3421. return expectsLowerCase
  3422. ? function (val) { return map[val.toLowerCase()]; }
  3423. : function (val) { return map[val]; }
  3424. }
  3425. /**
  3426. * Check if a tag is a built-in tag.
  3427. */
  3428. var isBuiltInTag = makeMap('slot,component', true);
  3429. /**
  3430. * Check if an attribute is a reserved attribute.
  3431. */
  3432. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3433. /**
  3434. * Remove an item from an array.
  3435. */
  3436. function remove (arr, item) {
  3437. if (arr.length) {
  3438. var index = arr.indexOf(item);
  3439. if (index > -1) {
  3440. return arr.splice(index, 1)
  3441. }
  3442. }
  3443. }
  3444. /**
  3445. * Check whether an object has the property.
  3446. */
  3447. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3448. function hasOwn (obj, key) {
  3449. return hasOwnProperty.call(obj, key)
  3450. }
  3451. /**
  3452. * Create a cached version of a pure function.
  3453. */
  3454. function cached (fn) {
  3455. var cache = Object.create(null);
  3456. return (function cachedFn (str) {
  3457. var hit = cache[str];
  3458. return hit || (cache[str] = fn(str))
  3459. })
  3460. }
  3461. /**
  3462. * Camelize a hyphen-delimited string.
  3463. */
  3464. var camelizeRE = /-(\w)/g;
  3465. var camelize = cached(function (str) {
  3466. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3467. });
  3468. /**
  3469. * Capitalize a string.
  3470. */
  3471. var capitalize = cached(function (str) {
  3472. return str.charAt(0).toUpperCase() + str.slice(1)
  3473. });
  3474. /**
  3475. * Hyphenate a camelCase string.
  3476. */
  3477. var hyphenateRE = /\B([A-Z])/g;
  3478. var hyphenate = cached(function (str) {
  3479. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3480. });
  3481. /**
  3482. * Simple bind polyfill for environments that do not support it,
  3483. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3484. * since native bind is now performant enough in most browsers.
  3485. * But removing it would mean breaking code that was able to run in
  3486. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3487. */
  3488. /* istanbul ignore next */
  3489. function polyfillBind (fn, ctx) {
  3490. function boundFn (a) {
  3491. var l = arguments.length;
  3492. return l
  3493. ? l > 1
  3494. ? fn.apply(ctx, arguments)
  3495. : fn.call(ctx, a)
  3496. : fn.call(ctx)
  3497. }
  3498. boundFn._length = fn.length;
  3499. return boundFn
  3500. }
  3501. function nativeBind (fn, ctx) {
  3502. return fn.bind(ctx)
  3503. }
  3504. var bind = Function.prototype.bind
  3505. ? nativeBind
  3506. : polyfillBind;
  3507. /**
  3508. * Convert an Array-like object to a real Array.
  3509. */
  3510. function toArray (list, start) {
  3511. start = start || 0;
  3512. var i = list.length - start;
  3513. var ret = new Array(i);
  3514. while (i--) {
  3515. ret[i] = list[i + start];
  3516. }
  3517. return ret
  3518. }
  3519. /**
  3520. * Mix properties into target object.
  3521. */
  3522. function extend (to, _from) {
  3523. for (var key in _from) {
  3524. to[key] = _from[key];
  3525. }
  3526. return to
  3527. }
  3528. /**
  3529. * Merge an Array of Objects into a single Object.
  3530. */
  3531. function toObject (arr) {
  3532. var res = {};
  3533. for (var i = 0; i < arr.length; i++) {
  3534. if (arr[i]) {
  3535. extend(res, arr[i]);
  3536. }
  3537. }
  3538. return res
  3539. }
  3540. /* eslint-disable no-unused-vars */
  3541. /**
  3542. * Perform no operation.
  3543. * Stubbing args to make Flow happy without leaving useless transpiled code
  3544. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3545. */
  3546. function noop (a, b, c) {}
  3547. /**
  3548. * Always return false.
  3549. */
  3550. var no = function (a, b, c) { return false; };
  3551. /* eslint-enable no-unused-vars */
  3552. /**
  3553. * Return the same value.
  3554. */
  3555. var identity = function (_) { return _; };
  3556. /**
  3557. * Check if two values are loosely equal - that is,
  3558. * if they are plain objects, do they have the same shape?
  3559. */
  3560. function looseEqual (a, b) {
  3561. if (a === b) { return true }
  3562. var isObjectA = isObject(a);
  3563. var isObjectB = isObject(b);
  3564. if (isObjectA && isObjectB) {
  3565. try {
  3566. var isArrayA = Array.isArray(a);
  3567. var isArrayB = Array.isArray(b);
  3568. if (isArrayA && isArrayB) {
  3569. return a.length === b.length && a.every(function (e, i) {
  3570. return looseEqual(e, b[i])
  3571. })
  3572. } else if (a instanceof Date && b instanceof Date) {
  3573. return a.getTime() === b.getTime()
  3574. } else if (!isArrayA && !isArrayB) {
  3575. var keysA = Object.keys(a);
  3576. var keysB = Object.keys(b);
  3577. return keysA.length === keysB.length && keysA.every(function (key) {
  3578. return looseEqual(a[key], b[key])
  3579. })
  3580. } else {
  3581. /* istanbul ignore next */
  3582. return false
  3583. }
  3584. } catch (e) {
  3585. /* istanbul ignore next */
  3586. return false
  3587. }
  3588. } else if (!isObjectA && !isObjectB) {
  3589. return String(a) === String(b)
  3590. } else {
  3591. return false
  3592. }
  3593. }
  3594. /**
  3595. * Return the first index at which a loosely equal value can be
  3596. * found in the array (if value is a plain object, the array must
  3597. * contain an object of the same shape), or -1 if it is not present.
  3598. */
  3599. function looseIndexOf (arr, val) {
  3600. for (var i = 0; i < arr.length; i++) {
  3601. if (looseEqual(arr[i], val)) { return i }
  3602. }
  3603. return -1
  3604. }
  3605. /**
  3606. * Ensure a function is called only once.
  3607. */
  3608. function once (fn) {
  3609. var called = false;
  3610. return function () {
  3611. if (!called) {
  3612. called = true;
  3613. fn.apply(this, arguments);
  3614. }
  3615. }
  3616. }
  3617. var ASSET_TYPES = [
  3618. 'component',
  3619. 'directive',
  3620. 'filter'
  3621. ];
  3622. var LIFECYCLE_HOOKS = [
  3623. 'beforeCreate',
  3624. 'created',
  3625. 'beforeMount',
  3626. 'mounted',
  3627. 'beforeUpdate',
  3628. 'updated',
  3629. 'beforeDestroy',
  3630. 'destroyed',
  3631. 'activated',
  3632. 'deactivated',
  3633. 'errorCaptured',
  3634. 'serverPrefetch'
  3635. ];
  3636. /* */
  3637. var config = ({
  3638. /**
  3639. * Option merge strategies (used in core/util/options)
  3640. */
  3641. // $flow-disable-line
  3642. optionMergeStrategies: Object.create(null),
  3643. /**
  3644. * Whether to suppress warnings.
  3645. */
  3646. silent: false,
  3647. /**
  3648. * Show production mode tip message on boot?
  3649. */
  3650. productionTip: "development" !== 'production',
  3651. /**
  3652. * Whether to enable devtools
  3653. */
  3654. devtools: "development" !== 'production',
  3655. /**
  3656. * Whether to record perf
  3657. */
  3658. performance: false,
  3659. /**
  3660. * Error handler for watcher errors
  3661. */
  3662. errorHandler: null,
  3663. /**
  3664. * Warn handler for watcher warns
  3665. */
  3666. warnHandler: null,
  3667. /**
  3668. * Ignore certain custom elements
  3669. */
  3670. ignoredElements: [],
  3671. /**
  3672. * Custom user key aliases for v-on
  3673. */
  3674. // $flow-disable-line
  3675. keyCodes: Object.create(null),
  3676. /**
  3677. * Check if a tag is reserved so that it cannot be registered as a
  3678. * component. This is platform-dependent and may be overwritten.
  3679. */
  3680. isReservedTag: no,
  3681. /**
  3682. * Check if an attribute is reserved so that it cannot be used as a component
  3683. * prop. This is platform-dependent and may be overwritten.
  3684. */
  3685. isReservedAttr: no,
  3686. /**
  3687. * Check if a tag is an unknown element.
  3688. * Platform-dependent.
  3689. */
  3690. isUnknownElement: no,
  3691. /**
  3692. * Get the namespace of an element
  3693. */
  3694. getTagNamespace: noop,
  3695. /**
  3696. * Parse the real tag name for the specific platform.
  3697. */
  3698. parsePlatformTagName: identity,
  3699. /**
  3700. * Check if an attribute must be bound using property, e.g. value
  3701. * Platform-dependent.
  3702. */
  3703. mustUseProp: no,
  3704. /**
  3705. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3706. * This will significantly reduce performance if set to false.
  3707. */
  3708. async: true,
  3709. /**
  3710. * Exposed for legacy reasons
  3711. */
  3712. _lifecycleHooks: LIFECYCLE_HOOKS
  3713. });
  3714. /* */
  3715. /**
  3716. * unicode letters used for parsing html tags, component names and property paths.
  3717. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3718. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3719. */
  3720. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  3721. /**
  3722. * Check if a string starts with $ or _
  3723. */
  3724. function isReserved (str) {
  3725. var c = (str + '').charCodeAt(0);
  3726. return c === 0x24 || c === 0x5F
  3727. }
  3728. /**
  3729. * Define a property.
  3730. */
  3731. function def (obj, key, val, enumerable) {
  3732. Object.defineProperty(obj, key, {
  3733. value: val,
  3734. enumerable: !!enumerable,
  3735. writable: true,
  3736. configurable: true
  3737. });
  3738. }
  3739. /**
  3740. * Parse simple path.
  3741. */
  3742. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3743. function parsePath (path) {
  3744. if (bailRE.test(path)) {
  3745. return
  3746. }
  3747. var segments = path.split('.');
  3748. return function (obj) {
  3749. for (var i = 0; i < segments.length; i++) {
  3750. if (!obj) { return }
  3751. obj = obj[segments[i]];
  3752. }
  3753. return obj
  3754. }
  3755. }
  3756. /* */
  3757. // can we use __proto__?
  3758. var hasProto = '__proto__' in {};
  3759. // Browser environment sniffing
  3760. var inBrowser = typeof window !== 'undefined';
  3761. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3762. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3763. var UA = inBrowser && window.navigator && window.navigator.userAgent.toLowerCase();
  3764. var isIE = UA && /msie|trident/.test(UA);
  3765. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3766. var isEdge = UA && UA.indexOf('edge/') > 0;
  3767. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3768. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3769. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3770. var isPhantomJS = UA && /phantomjs/.test(UA);
  3771. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3772. // Firefox has a "watch" function on Object.prototype...
  3773. var nativeWatch = ({}).watch;
  3774. if (inBrowser) {
  3775. try {
  3776. var opts = {};
  3777. Object.defineProperty(opts, 'passive', ({
  3778. get: function get () {
  3779. }
  3780. })); // https://github.com/facebook/flow/issues/285
  3781. window.addEventListener('test-passive', null, opts);
  3782. } catch (e) {}
  3783. }
  3784. // this needs to be lazy-evaled because vue may be required before
  3785. // vue-server-renderer can set VUE_ENV
  3786. var _isServer;
  3787. var isServerRendering = function () {
  3788. if (_isServer === undefined) {
  3789. /* istanbul ignore if */
  3790. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3791. // detect presence of vue-server-renderer and avoid
  3792. // Webpack shimming the process
  3793. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3794. } else {
  3795. _isServer = false;
  3796. }
  3797. }
  3798. return _isServer
  3799. };
  3800. // detect devtools
  3801. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3802. /* istanbul ignore next */
  3803. function isNative (Ctor) {
  3804. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3805. }
  3806. var hasSymbol =
  3807. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3808. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3809. var _Set;
  3810. /* istanbul ignore if */ // $flow-disable-line
  3811. if (typeof Set !== 'undefined' && isNative(Set)) {
  3812. // use native Set when available.
  3813. _Set = Set;
  3814. } else {
  3815. // a non-standard Set polyfill that only works with primitive keys.
  3816. _Set = /*@__PURE__*/(function () {
  3817. function Set () {
  3818. this.set = Object.create(null);
  3819. }
  3820. Set.prototype.has = function has (key) {
  3821. return this.set[key] === true
  3822. };
  3823. Set.prototype.add = function add (key) {
  3824. this.set[key] = true;
  3825. };
  3826. Set.prototype.clear = function clear () {
  3827. this.set = Object.create(null);
  3828. };
  3829. return Set;
  3830. }());
  3831. }
  3832. /* */
  3833. var warn = noop;
  3834. var tip = noop;
  3835. var generateComponentTrace = (noop); // work around flow check
  3836. var formatComponentName = (noop);
  3837. if (true) {
  3838. var hasConsole = typeof console !== 'undefined';
  3839. var classifyRE = /(?:^|[-_])(\w)/g;
  3840. var classify = function (str) { return str
  3841. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3842. .replace(/[-_]/g, ''); };
  3843. warn = function (msg, vm) {
  3844. var trace = vm ? generateComponentTrace(vm) : '';
  3845. if (config.warnHandler) {
  3846. config.warnHandler.call(null, msg, vm, trace);
  3847. } else if (hasConsole && (!config.silent)) {
  3848. console.error(("[Vue warn]: " + msg + trace));
  3849. }
  3850. };
  3851. tip = function (msg, vm) {
  3852. if (hasConsole && (!config.silent)) {
  3853. console.warn("[Vue tip]: " + msg + (
  3854. vm ? generateComponentTrace(vm) : ''
  3855. ));
  3856. }
  3857. };
  3858. formatComponentName = function (vm, includeFile) {
  3859. if (vm.$root === vm) {
  3860. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3861. return ('') + vm.$options.__file
  3862. }
  3863. return '<Root>'
  3864. }
  3865. var options = typeof vm === 'function' && vm.cid != null
  3866. ? vm.options
  3867. : vm._isVue
  3868. ? vm.$options || vm.constructor.options
  3869. : vm;
  3870. var name = options.name || options._componentTag;
  3871. var file = options.__file;
  3872. if (!name && file) {
  3873. var match = file.match(/([^/\\]+)\.vue$/);
  3874. name = match && match[1];
  3875. }
  3876. return (
  3877. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3878. (file && includeFile !== false ? (" at " + file) : '')
  3879. )
  3880. };
  3881. var repeat = function (str, n) {
  3882. var res = '';
  3883. while (n) {
  3884. if (n % 2 === 1) { res += str; }
  3885. if (n > 1) { str += str; }
  3886. n >>= 1;
  3887. }
  3888. return res
  3889. };
  3890. generateComponentTrace = function (vm) {
  3891. if (vm._isVue && vm.$parent) {
  3892. var tree = [];
  3893. var currentRecursiveSequence = 0;
  3894. while (vm && vm.$options.name !== 'PageBody') {
  3895. if (tree.length > 0) {
  3896. var last = tree[tree.length - 1];
  3897. if (last.constructor === vm.constructor) {
  3898. currentRecursiveSequence++;
  3899. vm = vm.$parent;
  3900. continue
  3901. } else if (currentRecursiveSequence > 0) {
  3902. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3903. currentRecursiveSequence = 0;
  3904. }
  3905. }
  3906. !vm.$options.isReserved && tree.push(vm);
  3907. vm = vm.$parent;
  3908. }
  3909. return '\n\nfound in\n\n' + tree
  3910. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3911. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3912. : formatComponentName(vm))); })
  3913. .join('\n')
  3914. } else {
  3915. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3916. }
  3917. };
  3918. }
  3919. /* */
  3920. var uid = 0;
  3921. /**
  3922. * A dep is an observable that can have multiple
  3923. * directives subscribing to it.
  3924. */
  3925. var Dep = function Dep () {
  3926. this.id = uid++;
  3927. this.subs = [];
  3928. };
  3929. Dep.prototype.addSub = function addSub (sub) {
  3930. this.subs.push(sub);
  3931. };
  3932. Dep.prototype.removeSub = function removeSub (sub) {
  3933. remove(this.subs, sub);
  3934. };
  3935. Dep.prototype.depend = function depend () {
  3936. if (Dep.SharedObject.target) {
  3937. Dep.SharedObject.target.addDep(this);
  3938. }
  3939. };
  3940. Dep.prototype.notify = function notify () {
  3941. // stabilize the subscriber list first
  3942. var subs = this.subs.slice();
  3943. if ( true && !config.async) {
  3944. // subs aren't sorted in scheduler if not running async
  3945. // we need to sort them now to make sure they fire in correct
  3946. // order
  3947. subs.sort(function (a, b) { return a.id - b.id; });
  3948. }
  3949. for (var i = 0, l = subs.length; i < l; i++) {
  3950. subs[i].update();
  3951. }
  3952. };
  3953. // The current target watcher being evaluated.
  3954. // This is globally unique because only one watcher
  3955. // can be evaluated at a time.
  3956. // fixed by xxxxxx (nvue shared vuex)
  3957. /* eslint-disable no-undef */
  3958. Dep.SharedObject = {};
  3959. Dep.SharedObject.target = null;
  3960. Dep.SharedObject.targetStack = [];
  3961. function pushTarget (target) {
  3962. Dep.SharedObject.targetStack.push(target);
  3963. Dep.SharedObject.target = target;
  3964. Dep.target = target;
  3965. }
  3966. function popTarget () {
  3967. Dep.SharedObject.targetStack.pop();
  3968. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3969. Dep.target = Dep.SharedObject.target;
  3970. }
  3971. /* */
  3972. var VNode = function VNode (
  3973. tag,
  3974. data,
  3975. children,
  3976. text,
  3977. elm,
  3978. context,
  3979. componentOptions,
  3980. asyncFactory
  3981. ) {
  3982. this.tag = tag;
  3983. this.data = data;
  3984. this.children = children;
  3985. this.text = text;
  3986. this.elm = elm;
  3987. this.ns = undefined;
  3988. this.context = context;
  3989. this.fnContext = undefined;
  3990. this.fnOptions = undefined;
  3991. this.fnScopeId = undefined;
  3992. this.key = data && data.key;
  3993. this.componentOptions = componentOptions;
  3994. this.componentInstance = undefined;
  3995. this.parent = undefined;
  3996. this.raw = false;
  3997. this.isStatic = false;
  3998. this.isRootInsert = true;
  3999. this.isComment = false;
  4000. this.isCloned = false;
  4001. this.isOnce = false;
  4002. this.asyncFactory = asyncFactory;
  4003. this.asyncMeta = undefined;
  4004. this.isAsyncPlaceholder = false;
  4005. };
  4006. var prototypeAccessors = { child: { configurable: true } };
  4007. // DEPRECATED: alias for componentInstance for backwards compat.
  4008. /* istanbul ignore next */
  4009. prototypeAccessors.child.get = function () {
  4010. return this.componentInstance
  4011. };
  4012. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4013. var createEmptyVNode = function (text) {
  4014. if ( text === void 0 ) text = '';
  4015. var node = new VNode();
  4016. node.text = text;
  4017. node.isComment = true;
  4018. return node
  4019. };
  4020. function createTextVNode (val) {
  4021. return new VNode(undefined, undefined, undefined, String(val))
  4022. }
  4023. // optimized shallow clone
  4024. // used for static nodes and slot nodes because they may be reused across
  4025. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4026. // on their elm reference.
  4027. function cloneVNode (vnode) {
  4028. var cloned = new VNode(
  4029. vnode.tag,
  4030. vnode.data,
  4031. // #7975
  4032. // clone children array to avoid mutating original in case of cloning
  4033. // a child.
  4034. vnode.children && vnode.children.slice(),
  4035. vnode.text,
  4036. vnode.elm,
  4037. vnode.context,
  4038. vnode.componentOptions,
  4039. vnode.asyncFactory
  4040. );
  4041. cloned.ns = vnode.ns;
  4042. cloned.isStatic = vnode.isStatic;
  4043. cloned.key = vnode.key;
  4044. cloned.isComment = vnode.isComment;
  4045. cloned.fnContext = vnode.fnContext;
  4046. cloned.fnOptions = vnode.fnOptions;
  4047. cloned.fnScopeId = vnode.fnScopeId;
  4048. cloned.asyncMeta = vnode.asyncMeta;
  4049. cloned.isCloned = true;
  4050. return cloned
  4051. }
  4052. /*
  4053. * not type checking this file because flow doesn't play well with
  4054. * dynamically accessing methods on Array prototype
  4055. */
  4056. var arrayProto = Array.prototype;
  4057. var arrayMethods = Object.create(arrayProto);
  4058. var methodsToPatch = [
  4059. 'push',
  4060. 'pop',
  4061. 'shift',
  4062. 'unshift',
  4063. 'splice',
  4064. 'sort',
  4065. 'reverse'
  4066. ];
  4067. /**
  4068. * Intercept mutating methods and emit events
  4069. */
  4070. methodsToPatch.forEach(function (method) {
  4071. // cache original method
  4072. var original = arrayProto[method];
  4073. def(arrayMethods, method, function mutator () {
  4074. var args = [], len = arguments.length;
  4075. while ( len-- ) args[ len ] = arguments[ len ];
  4076. var result = original.apply(this, args);
  4077. var ob = this.__ob__;
  4078. var inserted;
  4079. switch (method) {
  4080. case 'push':
  4081. case 'unshift':
  4082. inserted = args;
  4083. break
  4084. case 'splice':
  4085. inserted = args.slice(2);
  4086. break
  4087. }
  4088. if (inserted) { ob.observeArray(inserted); }
  4089. // notify change
  4090. ob.dep.notify();
  4091. return result
  4092. });
  4093. });
  4094. /* */
  4095. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4096. /**
  4097. * In some cases we may want to disable observation inside a component's
  4098. * update computation.
  4099. */
  4100. var shouldObserve = true;
  4101. function toggleObserving (value) {
  4102. shouldObserve = value;
  4103. }
  4104. /**
  4105. * Observer class that is attached to each observed
  4106. * object. Once attached, the observer converts the target
  4107. * object's property keys into getter/setters that
  4108. * collect dependencies and dispatch updates.
  4109. */
  4110. var Observer = function Observer (value) {
  4111. this.value = value;
  4112. this.dep = new Dep();
  4113. this.vmCount = 0;
  4114. def(value, '__ob__', this);
  4115. if (Array.isArray(value)) {
  4116. if (hasProto) {
  4117. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4118. if(value.push !== value.__proto__.push){
  4119. copyAugment(value, arrayMethods, arrayKeys);
  4120. } else {
  4121. protoAugment(value, arrayMethods);
  4122. }
  4123. }
  4124. } else {
  4125. copyAugment(value, arrayMethods, arrayKeys);
  4126. }
  4127. this.observeArray(value);
  4128. } else {
  4129. this.walk(value);
  4130. }
  4131. };
  4132. /**
  4133. * Walk through all properties and convert them into
  4134. * getter/setters. This method should only be called when
  4135. * value type is Object.
  4136. */
  4137. Observer.prototype.walk = function walk (obj) {
  4138. var keys = Object.keys(obj);
  4139. for (var i = 0; i < keys.length; i++) {
  4140. defineReactive$$1(obj, keys[i]);
  4141. }
  4142. };
  4143. /**
  4144. * Observe a list of Array items.
  4145. */
  4146. Observer.prototype.observeArray = function observeArray (items) {
  4147. for (var i = 0, l = items.length; i < l; i++) {
  4148. observe(items[i]);
  4149. }
  4150. };
  4151. // helpers
  4152. /**
  4153. * Augment a target Object or Array by intercepting
  4154. * the prototype chain using __proto__
  4155. */
  4156. function protoAugment (target, src) {
  4157. /* eslint-disable no-proto */
  4158. target.__proto__ = src;
  4159. /* eslint-enable no-proto */
  4160. }
  4161. /**
  4162. * Augment a target Object or Array by defining
  4163. * hidden properties.
  4164. */
  4165. /* istanbul ignore next */
  4166. function copyAugment (target, src, keys) {
  4167. for (var i = 0, l = keys.length; i < l; i++) {
  4168. var key = keys[i];
  4169. def(target, key, src[key]);
  4170. }
  4171. }
  4172. /**
  4173. * Attempt to create an observer instance for a value,
  4174. * returns the new observer if successfully observed,
  4175. * or the existing observer if the value already has one.
  4176. */
  4177. function observe (value, asRootData) {
  4178. if (!isObject(value) || value instanceof VNode) {
  4179. return
  4180. }
  4181. var ob;
  4182. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4183. ob = value.__ob__;
  4184. } else if (
  4185. shouldObserve &&
  4186. !isServerRendering() &&
  4187. (Array.isArray(value) || isPlainObject(value)) &&
  4188. Object.isExtensible(value) &&
  4189. !value._isVue &&
  4190. !value.__v_isMPComponent
  4191. ) {
  4192. ob = new Observer(value);
  4193. }
  4194. if (asRootData && ob) {
  4195. ob.vmCount++;
  4196. }
  4197. return ob
  4198. }
  4199. /**
  4200. * Define a reactive property on an Object.
  4201. */
  4202. function defineReactive$$1 (
  4203. obj,
  4204. key,
  4205. val,
  4206. customSetter,
  4207. shallow
  4208. ) {
  4209. var dep = new Dep();
  4210. var property = Object.getOwnPropertyDescriptor(obj, key);
  4211. if (property && property.configurable === false) {
  4212. return
  4213. }
  4214. // cater for pre-defined getter/setters
  4215. var getter = property && property.get;
  4216. var setter = property && property.set;
  4217. if ((!getter || setter) && arguments.length === 2) {
  4218. val = obj[key];
  4219. }
  4220. var childOb = !shallow && observe(val);
  4221. Object.defineProperty(obj, key, {
  4222. enumerable: true,
  4223. configurable: true,
  4224. get: function reactiveGetter () {
  4225. var value = getter ? getter.call(obj) : val;
  4226. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4227. dep.depend();
  4228. if (childOb) {
  4229. childOb.dep.depend();
  4230. if (Array.isArray(value)) {
  4231. dependArray(value);
  4232. }
  4233. }
  4234. }
  4235. return value
  4236. },
  4237. set: function reactiveSetter (newVal) {
  4238. var value = getter ? getter.call(obj) : val;
  4239. /* eslint-disable no-self-compare */
  4240. if (newVal === value || (newVal !== newVal && value !== value)) {
  4241. return
  4242. }
  4243. /* eslint-enable no-self-compare */
  4244. if ( true && customSetter) {
  4245. customSetter();
  4246. }
  4247. // #7981: for accessor properties without setter
  4248. if (getter && !setter) { return }
  4249. if (setter) {
  4250. setter.call(obj, newVal);
  4251. } else {
  4252. val = newVal;
  4253. }
  4254. childOb = !shallow && observe(newVal);
  4255. dep.notify();
  4256. }
  4257. });
  4258. }
  4259. /**
  4260. * Set a property on an object. Adds the new property and
  4261. * triggers change notification if the property doesn't
  4262. * already exist.
  4263. */
  4264. function set (target, key, val) {
  4265. if ( true &&
  4266. (isUndef(target) || isPrimitive(target))
  4267. ) {
  4268. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4269. }
  4270. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4271. target.length = Math.max(target.length, key);
  4272. target.splice(key, 1, val);
  4273. return val
  4274. }
  4275. if (key in target && !(key in Object.prototype)) {
  4276. target[key] = val;
  4277. return val
  4278. }
  4279. var ob = (target).__ob__;
  4280. if (target._isVue || (ob && ob.vmCount)) {
  4281. true && warn(
  4282. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4283. 'at runtime - declare it upfront in the data option.'
  4284. );
  4285. return val
  4286. }
  4287. if (!ob) {
  4288. target[key] = val;
  4289. return val
  4290. }
  4291. defineReactive$$1(ob.value, key, val);
  4292. ob.dep.notify();
  4293. return val
  4294. }
  4295. /**
  4296. * Delete a property and trigger change if necessary.
  4297. */
  4298. function del (target, key) {
  4299. if ( true &&
  4300. (isUndef(target) || isPrimitive(target))
  4301. ) {
  4302. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4303. }
  4304. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4305. target.splice(key, 1);
  4306. return
  4307. }
  4308. var ob = (target).__ob__;
  4309. if (target._isVue || (ob && ob.vmCount)) {
  4310. true && warn(
  4311. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4312. '- just set it to null.'
  4313. );
  4314. return
  4315. }
  4316. if (!hasOwn(target, key)) {
  4317. return
  4318. }
  4319. delete target[key];
  4320. if (!ob) {
  4321. return
  4322. }
  4323. ob.dep.notify();
  4324. }
  4325. /**
  4326. * Collect dependencies on array elements when the array is touched, since
  4327. * we cannot intercept array element access like property getters.
  4328. */
  4329. function dependArray (value) {
  4330. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4331. e = value[i];
  4332. e && e.__ob__ && e.__ob__.dep.depend();
  4333. if (Array.isArray(e)) {
  4334. dependArray(e);
  4335. }
  4336. }
  4337. }
  4338. /* */
  4339. /**
  4340. * Option overwriting strategies are functions that handle
  4341. * how to merge a parent option value and a child option
  4342. * value into the final value.
  4343. */
  4344. var strats = config.optionMergeStrategies;
  4345. /**
  4346. * Options with restrictions
  4347. */
  4348. if (true) {
  4349. strats.el = strats.propsData = function (parent, child, vm, key) {
  4350. if (!vm) {
  4351. warn(
  4352. "option \"" + key + "\" can only be used during instance " +
  4353. 'creation with the `new` keyword.'
  4354. );
  4355. }
  4356. return defaultStrat(parent, child)
  4357. };
  4358. }
  4359. /**
  4360. * Helper that recursively merges two data objects together.
  4361. */
  4362. function mergeData (to, from) {
  4363. if (!from) { return to }
  4364. var key, toVal, fromVal;
  4365. var keys = hasSymbol
  4366. ? Reflect.ownKeys(from)
  4367. : Object.keys(from);
  4368. for (var i = 0; i < keys.length; i++) {
  4369. key = keys[i];
  4370. // in case the object is already observed...
  4371. if (key === '__ob__') { continue }
  4372. toVal = to[key];
  4373. fromVal = from[key];
  4374. if (!hasOwn(to, key)) {
  4375. set(to, key, fromVal);
  4376. } else if (
  4377. toVal !== fromVal &&
  4378. isPlainObject(toVal) &&
  4379. isPlainObject(fromVal)
  4380. ) {
  4381. mergeData(toVal, fromVal);
  4382. }
  4383. }
  4384. return to
  4385. }
  4386. /**
  4387. * Data
  4388. */
  4389. function mergeDataOrFn (
  4390. parentVal,
  4391. childVal,
  4392. vm
  4393. ) {
  4394. if (!vm) {
  4395. // in a Vue.extend merge, both should be functions
  4396. if (!childVal) {
  4397. return parentVal
  4398. }
  4399. if (!parentVal) {
  4400. return childVal
  4401. }
  4402. // when parentVal & childVal are both present,
  4403. // we need to return a function that returns the
  4404. // merged result of both functions... no need to
  4405. // check if parentVal is a function here because
  4406. // it has to be a function to pass previous merges.
  4407. return function mergedDataFn () {
  4408. return mergeData(
  4409. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4410. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4411. )
  4412. }
  4413. } else {
  4414. return function mergedInstanceDataFn () {
  4415. // instance merge
  4416. var instanceData = typeof childVal === 'function'
  4417. ? childVal.call(vm, vm)
  4418. : childVal;
  4419. var defaultData = typeof parentVal === 'function'
  4420. ? parentVal.call(vm, vm)
  4421. : parentVal;
  4422. if (instanceData) {
  4423. return mergeData(instanceData, defaultData)
  4424. } else {
  4425. return defaultData
  4426. }
  4427. }
  4428. }
  4429. }
  4430. strats.data = function (
  4431. parentVal,
  4432. childVal,
  4433. vm
  4434. ) {
  4435. if (!vm) {
  4436. if (childVal && typeof childVal !== 'function') {
  4437. true && warn(
  4438. 'The "data" option should be a function ' +
  4439. 'that returns a per-instance value in component ' +
  4440. 'definitions.',
  4441. vm
  4442. );
  4443. return parentVal
  4444. }
  4445. return mergeDataOrFn(parentVal, childVal)
  4446. }
  4447. return mergeDataOrFn(parentVal, childVal, vm)
  4448. };
  4449. /**
  4450. * Hooks and props are merged as arrays.
  4451. */
  4452. function mergeHook (
  4453. parentVal,
  4454. childVal
  4455. ) {
  4456. var res = childVal
  4457. ? parentVal
  4458. ? parentVal.concat(childVal)
  4459. : Array.isArray(childVal)
  4460. ? childVal
  4461. : [childVal]
  4462. : parentVal;
  4463. return res
  4464. ? dedupeHooks(res)
  4465. : res
  4466. }
  4467. function dedupeHooks (hooks) {
  4468. var res = [];
  4469. for (var i = 0; i < hooks.length; i++) {
  4470. if (res.indexOf(hooks[i]) === -1) {
  4471. res.push(hooks[i]);
  4472. }
  4473. }
  4474. return res
  4475. }
  4476. LIFECYCLE_HOOKS.forEach(function (hook) {
  4477. strats[hook] = mergeHook;
  4478. });
  4479. /**
  4480. * Assets
  4481. *
  4482. * When a vm is present (instance creation), we need to do
  4483. * a three-way merge between constructor options, instance
  4484. * options and parent options.
  4485. */
  4486. function mergeAssets (
  4487. parentVal,
  4488. childVal,
  4489. vm,
  4490. key
  4491. ) {
  4492. var res = Object.create(parentVal || null);
  4493. if (childVal) {
  4494. true && assertObjectType(key, childVal, vm);
  4495. return extend(res, childVal)
  4496. } else {
  4497. return res
  4498. }
  4499. }
  4500. ASSET_TYPES.forEach(function (type) {
  4501. strats[type + 's'] = mergeAssets;
  4502. });
  4503. /**
  4504. * Watchers.
  4505. *
  4506. * Watchers hashes should not overwrite one
  4507. * another, so we merge them as arrays.
  4508. */
  4509. strats.watch = function (
  4510. parentVal,
  4511. childVal,
  4512. vm,
  4513. key
  4514. ) {
  4515. // work around Firefox's Object.prototype.watch...
  4516. if (parentVal === nativeWatch) { parentVal = undefined; }
  4517. if (childVal === nativeWatch) { childVal = undefined; }
  4518. /* istanbul ignore if */
  4519. if (!childVal) { return Object.create(parentVal || null) }
  4520. if (true) {
  4521. assertObjectType(key, childVal, vm);
  4522. }
  4523. if (!parentVal) { return childVal }
  4524. var ret = {};
  4525. extend(ret, parentVal);
  4526. for (var key$1 in childVal) {
  4527. var parent = ret[key$1];
  4528. var child = childVal[key$1];
  4529. if (parent && !Array.isArray(parent)) {
  4530. parent = [parent];
  4531. }
  4532. ret[key$1] = parent
  4533. ? parent.concat(child)
  4534. : Array.isArray(child) ? child : [child];
  4535. }
  4536. return ret
  4537. };
  4538. /**
  4539. * Other object hashes.
  4540. */
  4541. strats.props =
  4542. strats.methods =
  4543. strats.inject =
  4544. strats.computed = function (
  4545. parentVal,
  4546. childVal,
  4547. vm,
  4548. key
  4549. ) {
  4550. if (childVal && "development" !== 'production') {
  4551. assertObjectType(key, childVal, vm);
  4552. }
  4553. if (!parentVal) { return childVal }
  4554. var ret = Object.create(null);
  4555. extend(ret, parentVal);
  4556. if (childVal) { extend(ret, childVal); }
  4557. return ret
  4558. };
  4559. strats.provide = mergeDataOrFn;
  4560. /**
  4561. * Default strategy.
  4562. */
  4563. var defaultStrat = function (parentVal, childVal) {
  4564. return childVal === undefined
  4565. ? parentVal
  4566. : childVal
  4567. };
  4568. /**
  4569. * Validate component names
  4570. */
  4571. function checkComponents (options) {
  4572. for (var key in options.components) {
  4573. validateComponentName(key);
  4574. }
  4575. }
  4576. function validateComponentName (name) {
  4577. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4578. warn(
  4579. 'Invalid component name: "' + name + '". Component names ' +
  4580. 'should conform to valid custom element name in html5 specification.'
  4581. );
  4582. }
  4583. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4584. warn(
  4585. 'Do not use built-in or reserved HTML elements as component ' +
  4586. 'id: ' + name
  4587. );
  4588. }
  4589. }
  4590. /**
  4591. * Ensure all props option syntax are normalized into the
  4592. * Object-based format.
  4593. */
  4594. function normalizeProps (options, vm) {
  4595. var props = options.props;
  4596. if (!props) { return }
  4597. var res = {};
  4598. var i, val, name;
  4599. if (Array.isArray(props)) {
  4600. i = props.length;
  4601. while (i--) {
  4602. val = props[i];
  4603. if (typeof val === 'string') {
  4604. name = camelize(val);
  4605. res[name] = { type: null };
  4606. } else if (true) {
  4607. warn('props must be strings when using array syntax.');
  4608. }
  4609. }
  4610. } else if (isPlainObject(props)) {
  4611. for (var key in props) {
  4612. val = props[key];
  4613. name = camelize(key);
  4614. res[name] = isPlainObject(val)
  4615. ? val
  4616. : { type: val };
  4617. }
  4618. } else if (true) {
  4619. warn(
  4620. "Invalid value for option \"props\": expected an Array or an Object, " +
  4621. "but got " + (toRawType(props)) + ".",
  4622. vm
  4623. );
  4624. }
  4625. options.props = res;
  4626. }
  4627. /**
  4628. * Normalize all injections into Object-based format
  4629. */
  4630. function normalizeInject (options, vm) {
  4631. var inject = options.inject;
  4632. if (!inject) { return }
  4633. var normalized = options.inject = {};
  4634. if (Array.isArray(inject)) {
  4635. for (var i = 0; i < inject.length; i++) {
  4636. normalized[inject[i]] = { from: inject[i] };
  4637. }
  4638. } else if (isPlainObject(inject)) {
  4639. for (var key in inject) {
  4640. var val = inject[key];
  4641. normalized[key] = isPlainObject(val)
  4642. ? extend({ from: key }, val)
  4643. : { from: val };
  4644. }
  4645. } else if (true) {
  4646. warn(
  4647. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4648. "but got " + (toRawType(inject)) + ".",
  4649. vm
  4650. );
  4651. }
  4652. }
  4653. /**
  4654. * Normalize raw function directives into object format.
  4655. */
  4656. function normalizeDirectives (options) {
  4657. var dirs = options.directives;
  4658. if (dirs) {
  4659. for (var key in dirs) {
  4660. var def$$1 = dirs[key];
  4661. if (typeof def$$1 === 'function') {
  4662. dirs[key] = { bind: def$$1, update: def$$1 };
  4663. }
  4664. }
  4665. }
  4666. }
  4667. function assertObjectType (name, value, vm) {
  4668. if (!isPlainObject(value)) {
  4669. warn(
  4670. "Invalid value for option \"" + name + "\": expected an Object, " +
  4671. "but got " + (toRawType(value)) + ".",
  4672. vm
  4673. );
  4674. }
  4675. }
  4676. /**
  4677. * Merge two option objects into a new one.
  4678. * Core utility used in both instantiation and inheritance.
  4679. */
  4680. function mergeOptions (
  4681. parent,
  4682. child,
  4683. vm
  4684. ) {
  4685. if (true) {
  4686. checkComponents(child);
  4687. }
  4688. if (typeof child === 'function') {
  4689. child = child.options;
  4690. }
  4691. normalizeProps(child, vm);
  4692. normalizeInject(child, vm);
  4693. normalizeDirectives(child);
  4694. // Apply extends and mixins on the child options,
  4695. // but only if it is a raw options object that isn't
  4696. // the result of another mergeOptions call.
  4697. // Only merged options has the _base property.
  4698. if (!child._base) {
  4699. if (child.extends) {
  4700. parent = mergeOptions(parent, child.extends, vm);
  4701. }
  4702. if (child.mixins) {
  4703. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4704. parent = mergeOptions(parent, child.mixins[i], vm);
  4705. }
  4706. }
  4707. }
  4708. var options = {};
  4709. var key;
  4710. for (key in parent) {
  4711. mergeField(key);
  4712. }
  4713. for (key in child) {
  4714. if (!hasOwn(parent, key)) {
  4715. mergeField(key);
  4716. }
  4717. }
  4718. function mergeField (key) {
  4719. var strat = strats[key] || defaultStrat;
  4720. options[key] = strat(parent[key], child[key], vm, key);
  4721. }
  4722. return options
  4723. }
  4724. /**
  4725. * Resolve an asset.
  4726. * This function is used because child instances need access
  4727. * to assets defined in its ancestor chain.
  4728. */
  4729. function resolveAsset (
  4730. options,
  4731. type,
  4732. id,
  4733. warnMissing
  4734. ) {
  4735. /* istanbul ignore if */
  4736. if (typeof id !== 'string') {
  4737. return
  4738. }
  4739. var assets = options[type];
  4740. // check local registration variations first
  4741. if (hasOwn(assets, id)) { return assets[id] }
  4742. var camelizedId = camelize(id);
  4743. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4744. var PascalCaseId = capitalize(camelizedId);
  4745. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4746. // fallback to prototype chain
  4747. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4748. if ( true && warnMissing && !res) {
  4749. warn(
  4750. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4751. options
  4752. );
  4753. }
  4754. return res
  4755. }
  4756. /* */
  4757. function validateProp (
  4758. key,
  4759. propOptions,
  4760. propsData,
  4761. vm
  4762. ) {
  4763. var prop = propOptions[key];
  4764. var absent = !hasOwn(propsData, key);
  4765. var value = propsData[key];
  4766. // boolean casting
  4767. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4768. if (booleanIndex > -1) {
  4769. if (absent && !hasOwn(prop, 'default')) {
  4770. value = false;
  4771. } else if (value === '' || value === hyphenate(key)) {
  4772. // only cast empty string / same name to boolean if
  4773. // boolean has higher priority
  4774. var stringIndex = getTypeIndex(String, prop.type);
  4775. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4776. value = true;
  4777. }
  4778. }
  4779. }
  4780. // check default value
  4781. if (value === undefined) {
  4782. value = getPropDefaultValue(vm, prop, key);
  4783. // since the default value is a fresh copy,
  4784. // make sure to observe it.
  4785. var prevShouldObserve = shouldObserve;
  4786. toggleObserving(true);
  4787. observe(value);
  4788. toggleObserving(prevShouldObserve);
  4789. }
  4790. if (
  4791. true
  4792. ) {
  4793. assertProp(prop, key, value, vm, absent);
  4794. }
  4795. return value
  4796. }
  4797. /**
  4798. * Get the default value of a prop.
  4799. */
  4800. function getPropDefaultValue (vm, prop, key) {
  4801. // no default, return undefined
  4802. if (!hasOwn(prop, 'default')) {
  4803. return undefined
  4804. }
  4805. var def = prop.default;
  4806. // warn against non-factory defaults for Object & Array
  4807. if ( true && isObject(def)) {
  4808. warn(
  4809. 'Invalid default value for prop "' + key + '": ' +
  4810. 'Props with type Object/Array must use a factory function ' +
  4811. 'to return the default value.',
  4812. vm
  4813. );
  4814. }
  4815. // the raw prop value was also undefined from previous render,
  4816. // return previous default value to avoid unnecessary watcher trigger
  4817. if (vm && vm.$options.propsData &&
  4818. vm.$options.propsData[key] === undefined &&
  4819. vm._props[key] !== undefined
  4820. ) {
  4821. return vm._props[key]
  4822. }
  4823. // call factory function for non-Function types
  4824. // a value is Function if its prototype is function even across different execution context
  4825. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4826. ? def.call(vm)
  4827. : def
  4828. }
  4829. /**
  4830. * Assert whether a prop is valid.
  4831. */
  4832. function assertProp (
  4833. prop,
  4834. name,
  4835. value,
  4836. vm,
  4837. absent
  4838. ) {
  4839. if (prop.required && absent) {
  4840. warn(
  4841. 'Missing required prop: "' + name + '"',
  4842. vm
  4843. );
  4844. return
  4845. }
  4846. if (value == null && !prop.required) {
  4847. return
  4848. }
  4849. var type = prop.type;
  4850. var valid = !type || type === true;
  4851. var expectedTypes = [];
  4852. if (type) {
  4853. if (!Array.isArray(type)) {
  4854. type = [type];
  4855. }
  4856. for (var i = 0; i < type.length && !valid; i++) {
  4857. var assertedType = assertType(value, type[i]);
  4858. expectedTypes.push(assertedType.expectedType || '');
  4859. valid = assertedType.valid;
  4860. }
  4861. }
  4862. if (!valid) {
  4863. warn(
  4864. getInvalidTypeMessage(name, value, expectedTypes),
  4865. vm
  4866. );
  4867. return
  4868. }
  4869. var validator = prop.validator;
  4870. if (validator) {
  4871. if (!validator(value)) {
  4872. warn(
  4873. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4874. vm
  4875. );
  4876. }
  4877. }
  4878. }
  4879. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4880. function assertType (value, type) {
  4881. var valid;
  4882. var expectedType = getType(type);
  4883. if (simpleCheckRE.test(expectedType)) {
  4884. var t = typeof value;
  4885. valid = t === expectedType.toLowerCase();
  4886. // for primitive wrapper objects
  4887. if (!valid && t === 'object') {
  4888. valid = value instanceof type;
  4889. }
  4890. } else if (expectedType === 'Object') {
  4891. valid = isPlainObject(value);
  4892. } else if (expectedType === 'Array') {
  4893. valid = Array.isArray(value);
  4894. } else {
  4895. valid = value instanceof type;
  4896. }
  4897. return {
  4898. valid: valid,
  4899. expectedType: expectedType
  4900. }
  4901. }
  4902. /**
  4903. * Use function string name to check built-in types,
  4904. * because a simple equality check will fail when running
  4905. * across different vms / iframes.
  4906. */
  4907. function getType (fn) {
  4908. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4909. return match ? match[1] : ''
  4910. }
  4911. function isSameType (a, b) {
  4912. return getType(a) === getType(b)
  4913. }
  4914. function getTypeIndex (type, expectedTypes) {
  4915. if (!Array.isArray(expectedTypes)) {
  4916. return isSameType(expectedTypes, type) ? 0 : -1
  4917. }
  4918. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4919. if (isSameType(expectedTypes[i], type)) {
  4920. return i
  4921. }
  4922. }
  4923. return -1
  4924. }
  4925. function getInvalidTypeMessage (name, value, expectedTypes) {
  4926. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4927. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4928. var expectedType = expectedTypes[0];
  4929. var receivedType = toRawType(value);
  4930. var expectedValue = styleValue(value, expectedType);
  4931. var receivedValue = styleValue(value, receivedType);
  4932. // check if we need to specify expected value
  4933. if (expectedTypes.length === 1 &&
  4934. isExplicable(expectedType) &&
  4935. !isBoolean(expectedType, receivedType)) {
  4936. message += " with value " + expectedValue;
  4937. }
  4938. message += ", got " + receivedType + " ";
  4939. // check if we need to specify received value
  4940. if (isExplicable(receivedType)) {
  4941. message += "with value " + receivedValue + ".";
  4942. }
  4943. return message
  4944. }
  4945. function styleValue (value, type) {
  4946. if (type === 'String') {
  4947. return ("\"" + value + "\"")
  4948. } else if (type === 'Number') {
  4949. return ("" + (Number(value)))
  4950. } else {
  4951. return ("" + value)
  4952. }
  4953. }
  4954. function isExplicable (value) {
  4955. var explicitTypes = ['string', 'number', 'boolean'];
  4956. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4957. }
  4958. function isBoolean () {
  4959. var args = [], len = arguments.length;
  4960. while ( len-- ) args[ len ] = arguments[ len ];
  4961. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4962. }
  4963. /* */
  4964. function handleError (err, vm, info) {
  4965. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4966. // See: https://github.com/vuejs/vuex/issues/1505
  4967. pushTarget();
  4968. try {
  4969. if (vm) {
  4970. var cur = vm;
  4971. while ((cur = cur.$parent)) {
  4972. var hooks = cur.$options.errorCaptured;
  4973. if (hooks) {
  4974. for (var i = 0; i < hooks.length; i++) {
  4975. try {
  4976. var capture = hooks[i].call(cur, err, vm, info) === false;
  4977. if (capture) { return }
  4978. } catch (e) {
  4979. globalHandleError(e, cur, 'errorCaptured hook');
  4980. }
  4981. }
  4982. }
  4983. }
  4984. }
  4985. globalHandleError(err, vm, info);
  4986. } finally {
  4987. popTarget();
  4988. }
  4989. }
  4990. function invokeWithErrorHandling (
  4991. handler,
  4992. context,
  4993. args,
  4994. vm,
  4995. info
  4996. ) {
  4997. var res;
  4998. try {
  4999. res = args ? handler.apply(context, args) : handler.call(context);
  5000. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5001. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5002. // issue #9511
  5003. // avoid catch triggering multiple times when nested calls
  5004. res._handled = true;
  5005. }
  5006. } catch (e) {
  5007. handleError(e, vm, info);
  5008. }
  5009. return res
  5010. }
  5011. function globalHandleError (err, vm, info) {
  5012. if (config.errorHandler) {
  5013. try {
  5014. return config.errorHandler.call(null, err, vm, info)
  5015. } catch (e) {
  5016. // if the user intentionally throws the original error in the handler,
  5017. // do not log it twice
  5018. if (e !== err) {
  5019. logError(e, null, 'config.errorHandler');
  5020. }
  5021. }
  5022. }
  5023. logError(err, vm, info);
  5024. }
  5025. function logError (err, vm, info) {
  5026. if (true) {
  5027. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5028. }
  5029. /* istanbul ignore else */
  5030. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5031. console.error(err);
  5032. } else {
  5033. throw err
  5034. }
  5035. }
  5036. /* */
  5037. var callbacks = [];
  5038. var pending = false;
  5039. function flushCallbacks () {
  5040. pending = false;
  5041. var copies = callbacks.slice(0);
  5042. callbacks.length = 0;
  5043. for (var i = 0; i < copies.length; i++) {
  5044. copies[i]();
  5045. }
  5046. }
  5047. // Here we have async deferring wrappers using microtasks.
  5048. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5049. // However, it has subtle problems when state is changed right before repaint
  5050. // (e.g. #6813, out-in transitions).
  5051. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5052. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5053. // So we now use microtasks everywhere, again.
  5054. // A major drawback of this tradeoff is that there are some scenarios
  5055. // where microtasks have too high a priority and fire in between supposedly
  5056. // sequential events (e.g. #4521, #6690, which have workarounds)
  5057. // or even between bubbling of the same event (#6566).
  5058. var timerFunc;
  5059. // The nextTick behavior leverages the microtask queue, which can be accessed
  5060. // via either native Promise.then or MutationObserver.
  5061. // MutationObserver has wider support, however it is seriously bugged in
  5062. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5063. // completely stops working after triggering a few times... so, if native
  5064. // Promise is available, we will use it:
  5065. /* istanbul ignore next, $flow-disable-line */
  5066. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5067. var p = Promise.resolve();
  5068. timerFunc = function () {
  5069. p.then(flushCallbacks);
  5070. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5071. // it can get stuck in a weird state where callbacks are pushed into the
  5072. // microtask queue but the queue isn't being flushed, until the browser
  5073. // needs to do some other work, e.g. handle a timer. Therefore we can
  5074. // "force" the microtask queue to be flushed by adding an empty timer.
  5075. if (isIOS) { setTimeout(noop); }
  5076. };
  5077. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5078. isNative(MutationObserver) ||
  5079. // PhantomJS and iOS 7.x
  5080. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5081. )) {
  5082. // Use MutationObserver where native Promise is not available,
  5083. // e.g. PhantomJS, iOS7, Android 4.4
  5084. // (#6466 MutationObserver is unreliable in IE11)
  5085. var counter = 1;
  5086. var observer = new MutationObserver(flushCallbacks);
  5087. var textNode = document.createTextNode(String(counter));
  5088. observer.observe(textNode, {
  5089. characterData: true
  5090. });
  5091. timerFunc = function () {
  5092. counter = (counter + 1) % 2;
  5093. textNode.data = String(counter);
  5094. };
  5095. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5096. // Fallback to setImmediate.
  5097. // Technically it leverages the (macro) task queue,
  5098. // but it is still a better choice than setTimeout.
  5099. timerFunc = function () {
  5100. setImmediate(flushCallbacks);
  5101. };
  5102. } else {
  5103. // Fallback to setTimeout.
  5104. timerFunc = function () {
  5105. setTimeout(flushCallbacks, 0);
  5106. };
  5107. }
  5108. function nextTick (cb, ctx) {
  5109. var _resolve;
  5110. callbacks.push(function () {
  5111. if (cb) {
  5112. try {
  5113. cb.call(ctx);
  5114. } catch (e) {
  5115. handleError(e, ctx, 'nextTick');
  5116. }
  5117. } else if (_resolve) {
  5118. _resolve(ctx);
  5119. }
  5120. });
  5121. if (!pending) {
  5122. pending = true;
  5123. timerFunc();
  5124. }
  5125. // $flow-disable-line
  5126. if (!cb && typeof Promise !== 'undefined') {
  5127. return new Promise(function (resolve) {
  5128. _resolve = resolve;
  5129. })
  5130. }
  5131. }
  5132. /* */
  5133. /* not type checking this file because flow doesn't play well with Proxy */
  5134. var initProxy;
  5135. if (true) {
  5136. var allowedGlobals = makeMap(
  5137. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5138. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5139. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5140. 'require' // for Webpack/Browserify
  5141. );
  5142. var warnNonPresent = function (target, key) {
  5143. warn(
  5144. "Property or method \"" + key + "\" is not defined on the instance but " +
  5145. 'referenced during render. Make sure that this property is reactive, ' +
  5146. 'either in the data option, or for class-based components, by ' +
  5147. 'initializing the property. ' +
  5148. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5149. target
  5150. );
  5151. };
  5152. var warnReservedPrefix = function (target, key) {
  5153. warn(
  5154. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5155. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5156. 'prevent conflicts with Vue internals. ' +
  5157. 'See: https://vuejs.org/v2/api/#data',
  5158. target
  5159. );
  5160. };
  5161. var hasProxy =
  5162. typeof Proxy !== 'undefined' && isNative(Proxy);
  5163. if (hasProxy) {
  5164. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5165. config.keyCodes = new Proxy(config.keyCodes, {
  5166. set: function set (target, key, value) {
  5167. if (isBuiltInModifier(key)) {
  5168. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5169. return false
  5170. } else {
  5171. target[key] = value;
  5172. return true
  5173. }
  5174. }
  5175. });
  5176. }
  5177. var hasHandler = {
  5178. has: function has (target, key) {
  5179. var has = key in target;
  5180. var isAllowed = allowedGlobals(key) ||
  5181. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5182. if (!has && !isAllowed) {
  5183. if (key in target.$data) { warnReservedPrefix(target, key); }
  5184. else { warnNonPresent(target, key); }
  5185. }
  5186. return has || !isAllowed
  5187. }
  5188. };
  5189. var getHandler = {
  5190. get: function get (target, key) {
  5191. if (typeof key === 'string' && !(key in target)) {
  5192. if (key in target.$data) { warnReservedPrefix(target, key); }
  5193. else { warnNonPresent(target, key); }
  5194. }
  5195. return target[key]
  5196. }
  5197. };
  5198. initProxy = function initProxy (vm) {
  5199. if (hasProxy) {
  5200. // determine which proxy handler to use
  5201. var options = vm.$options;
  5202. var handlers = options.render && options.render._withStripped
  5203. ? getHandler
  5204. : hasHandler;
  5205. vm._renderProxy = new Proxy(vm, handlers);
  5206. } else {
  5207. vm._renderProxy = vm;
  5208. }
  5209. };
  5210. }
  5211. /* */
  5212. var seenObjects = new _Set();
  5213. /**
  5214. * Recursively traverse an object to evoke all converted
  5215. * getters, so that every nested property inside the object
  5216. * is collected as a "deep" dependency.
  5217. */
  5218. function traverse (val) {
  5219. _traverse(val, seenObjects);
  5220. seenObjects.clear();
  5221. }
  5222. function _traverse (val, seen) {
  5223. var i, keys;
  5224. var isA = Array.isArray(val);
  5225. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5226. return
  5227. }
  5228. if (val.__ob__) {
  5229. var depId = val.__ob__.dep.id;
  5230. if (seen.has(depId)) {
  5231. return
  5232. }
  5233. seen.add(depId);
  5234. }
  5235. if (isA) {
  5236. i = val.length;
  5237. while (i--) { _traverse(val[i], seen); }
  5238. } else {
  5239. keys = Object.keys(val);
  5240. i = keys.length;
  5241. while (i--) { _traverse(val[keys[i]], seen); }
  5242. }
  5243. }
  5244. var mark;
  5245. var measure;
  5246. if (true) {
  5247. var perf = inBrowser && window.performance;
  5248. /* istanbul ignore if */
  5249. if (
  5250. perf &&
  5251. perf.mark &&
  5252. perf.measure &&
  5253. perf.clearMarks &&
  5254. perf.clearMeasures
  5255. ) {
  5256. mark = function (tag) { return perf.mark(tag); };
  5257. measure = function (name, startTag, endTag) {
  5258. perf.measure(name, startTag, endTag);
  5259. perf.clearMarks(startTag);
  5260. perf.clearMarks(endTag);
  5261. // perf.clearMeasures(name)
  5262. };
  5263. }
  5264. }
  5265. /* */
  5266. var normalizeEvent = cached(function (name) {
  5267. var passive = name.charAt(0) === '&';
  5268. name = passive ? name.slice(1) : name;
  5269. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5270. name = once$$1 ? name.slice(1) : name;
  5271. var capture = name.charAt(0) === '!';
  5272. name = capture ? name.slice(1) : name;
  5273. return {
  5274. name: name,
  5275. once: once$$1,
  5276. capture: capture,
  5277. passive: passive
  5278. }
  5279. });
  5280. function createFnInvoker (fns, vm) {
  5281. function invoker () {
  5282. var arguments$1 = arguments;
  5283. var fns = invoker.fns;
  5284. if (Array.isArray(fns)) {
  5285. var cloned = fns.slice();
  5286. for (var i = 0; i < cloned.length; i++) {
  5287. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5288. }
  5289. } else {
  5290. // return handler return value for single handlers
  5291. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5292. }
  5293. }
  5294. invoker.fns = fns;
  5295. return invoker
  5296. }
  5297. function updateListeners (
  5298. on,
  5299. oldOn,
  5300. add,
  5301. remove$$1,
  5302. createOnceHandler,
  5303. vm
  5304. ) {
  5305. var name, def$$1, cur, old, event;
  5306. for (name in on) {
  5307. def$$1 = cur = on[name];
  5308. old = oldOn[name];
  5309. event = normalizeEvent(name);
  5310. if (isUndef(cur)) {
  5311. true && warn(
  5312. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5313. vm
  5314. );
  5315. } else if (isUndef(old)) {
  5316. if (isUndef(cur.fns)) {
  5317. cur = on[name] = createFnInvoker(cur, vm);
  5318. }
  5319. if (isTrue(event.once)) {
  5320. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5321. }
  5322. add(event.name, cur, event.capture, event.passive, event.params);
  5323. } else if (cur !== old) {
  5324. old.fns = cur;
  5325. on[name] = old;
  5326. }
  5327. }
  5328. for (name in oldOn) {
  5329. if (isUndef(on[name])) {
  5330. event = normalizeEvent(name);
  5331. remove$$1(event.name, oldOn[name], event.capture);
  5332. }
  5333. }
  5334. }
  5335. /* */
  5336. /* */
  5337. // fixed by xxxxxx (mp properties)
  5338. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5339. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5340. if (isUndef(propOptions)) {
  5341. return res
  5342. }
  5343. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5344. var attrs = data.attrs;
  5345. var props = data.props;
  5346. if (isDef(attrs) || isDef(props)) {
  5347. for (var key in propOptions) {
  5348. var altKey = hyphenate(key);
  5349. var result = checkProp(res, props, key, altKey, true) ||
  5350. checkProp(res, attrs, key, altKey, false);
  5351. // externalClass
  5352. if (
  5353. result &&
  5354. res[key] &&
  5355. externalClasses.indexOf(altKey) !== -1 &&
  5356. context[camelize(res[key])]
  5357. ) {
  5358. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5359. res[key] = context[camelize(res[key])];
  5360. }
  5361. }
  5362. }
  5363. return res
  5364. }
  5365. function extractPropsFromVNodeData (
  5366. data,
  5367. Ctor,
  5368. tag,
  5369. context// fixed by xxxxxx
  5370. ) {
  5371. // we are only extracting raw values here.
  5372. // validation and default values are handled in the child
  5373. // component itself.
  5374. var propOptions = Ctor.options.props;
  5375. if (isUndef(propOptions)) {
  5376. // fixed by xxxxxx
  5377. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5378. }
  5379. var res = {};
  5380. var attrs = data.attrs;
  5381. var props = data.props;
  5382. if (isDef(attrs) || isDef(props)) {
  5383. for (var key in propOptions) {
  5384. var altKey = hyphenate(key);
  5385. if (true) {
  5386. var keyInLowerCase = key.toLowerCase();
  5387. if (
  5388. key !== keyInLowerCase &&
  5389. attrs && hasOwn(attrs, keyInLowerCase)
  5390. ) {
  5391. tip(
  5392. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5393. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5394. " \"" + key + "\". " +
  5395. "Note that HTML attributes are case-insensitive and camelCased " +
  5396. "props need to use their kebab-case equivalents when using in-DOM " +
  5397. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5398. );
  5399. }
  5400. }
  5401. checkProp(res, props, key, altKey, true) ||
  5402. checkProp(res, attrs, key, altKey, false);
  5403. }
  5404. }
  5405. // fixed by xxxxxx
  5406. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5407. }
  5408. function checkProp (
  5409. res,
  5410. hash,
  5411. key,
  5412. altKey,
  5413. preserve
  5414. ) {
  5415. if (isDef(hash)) {
  5416. if (hasOwn(hash, key)) {
  5417. res[key] = hash[key];
  5418. if (!preserve) {
  5419. delete hash[key];
  5420. }
  5421. return true
  5422. } else if (hasOwn(hash, altKey)) {
  5423. res[key] = hash[altKey];
  5424. if (!preserve) {
  5425. delete hash[altKey];
  5426. }
  5427. return true
  5428. }
  5429. }
  5430. return false
  5431. }
  5432. /* */
  5433. // The template compiler attempts to minimize the need for normalization by
  5434. // statically analyzing the template at compile time.
  5435. //
  5436. // For plain HTML markup, normalization can be completely skipped because the
  5437. // generated render function is guaranteed to return Array<VNode>. There are
  5438. // two cases where extra normalization is needed:
  5439. // 1. When the children contains components - because a functional component
  5440. // may return an Array instead of a single root. In this case, just a simple
  5441. // normalization is needed - if any child is an Array, we flatten the whole
  5442. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5443. // because functional components already normalize their own children.
  5444. function simpleNormalizeChildren (children) {
  5445. for (var i = 0; i < children.length; i++) {
  5446. if (Array.isArray(children[i])) {
  5447. return Array.prototype.concat.apply([], children)
  5448. }
  5449. }
  5450. return children
  5451. }
  5452. // 2. When the children contains constructs that always generated nested Arrays,
  5453. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5454. // with hand-written render functions / JSX. In such cases a full normalization
  5455. // is needed to cater to all possible types of children values.
  5456. function normalizeChildren (children) {
  5457. return isPrimitive(children)
  5458. ? [createTextVNode(children)]
  5459. : Array.isArray(children)
  5460. ? normalizeArrayChildren(children)
  5461. : undefined
  5462. }
  5463. function isTextNode (node) {
  5464. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5465. }
  5466. function normalizeArrayChildren (children, nestedIndex) {
  5467. var res = [];
  5468. var i, c, lastIndex, last;
  5469. for (i = 0; i < children.length; i++) {
  5470. c = children[i];
  5471. if (isUndef(c) || typeof c === 'boolean') { continue }
  5472. lastIndex = res.length - 1;
  5473. last = res[lastIndex];
  5474. // nested
  5475. if (Array.isArray(c)) {
  5476. if (c.length > 0) {
  5477. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5478. // merge adjacent text nodes
  5479. if (isTextNode(c[0]) && isTextNode(last)) {
  5480. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5481. c.shift();
  5482. }
  5483. res.push.apply(res, c);
  5484. }
  5485. } else if (isPrimitive(c)) {
  5486. if (isTextNode(last)) {
  5487. // merge adjacent text nodes
  5488. // this is necessary for SSR hydration because text nodes are
  5489. // essentially merged when rendered to HTML strings
  5490. res[lastIndex] = createTextVNode(last.text + c);
  5491. } else if (c !== '') {
  5492. // convert primitive to vnode
  5493. res.push(createTextVNode(c));
  5494. }
  5495. } else {
  5496. if (isTextNode(c) && isTextNode(last)) {
  5497. // merge adjacent text nodes
  5498. res[lastIndex] = createTextVNode(last.text + c.text);
  5499. } else {
  5500. // default key for nested array children (likely generated by v-for)
  5501. if (isTrue(children._isVList) &&
  5502. isDef(c.tag) &&
  5503. isUndef(c.key) &&
  5504. isDef(nestedIndex)) {
  5505. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5506. }
  5507. res.push(c);
  5508. }
  5509. }
  5510. }
  5511. return res
  5512. }
  5513. /* */
  5514. function initProvide (vm) {
  5515. var provide = vm.$options.provide;
  5516. if (provide) {
  5517. vm._provided = typeof provide === 'function'
  5518. ? provide.call(vm)
  5519. : provide;
  5520. }
  5521. }
  5522. function initInjections (vm) {
  5523. var result = resolveInject(vm.$options.inject, vm);
  5524. if (result) {
  5525. toggleObserving(false);
  5526. Object.keys(result).forEach(function (key) {
  5527. /* istanbul ignore else */
  5528. if (true) {
  5529. defineReactive$$1(vm, key, result[key], function () {
  5530. warn(
  5531. "Avoid mutating an injected value directly since the changes will be " +
  5532. "overwritten whenever the provided component re-renders. " +
  5533. "injection being mutated: \"" + key + "\"",
  5534. vm
  5535. );
  5536. });
  5537. } else {}
  5538. });
  5539. toggleObserving(true);
  5540. }
  5541. }
  5542. function resolveInject (inject, vm) {
  5543. if (inject) {
  5544. // inject is :any because flow is not smart enough to figure out cached
  5545. var result = Object.create(null);
  5546. var keys = hasSymbol
  5547. ? Reflect.ownKeys(inject)
  5548. : Object.keys(inject);
  5549. for (var i = 0; i < keys.length; i++) {
  5550. var key = keys[i];
  5551. // #6574 in case the inject object is observed...
  5552. if (key === '__ob__') { continue }
  5553. var provideKey = inject[key].from;
  5554. var source = vm;
  5555. while (source) {
  5556. if (source._provided && hasOwn(source._provided, provideKey)) {
  5557. result[key] = source._provided[provideKey];
  5558. break
  5559. }
  5560. source = source.$parent;
  5561. }
  5562. if (!source) {
  5563. if ('default' in inject[key]) {
  5564. var provideDefault = inject[key].default;
  5565. result[key] = typeof provideDefault === 'function'
  5566. ? provideDefault.call(vm)
  5567. : provideDefault;
  5568. } else if (true) {
  5569. warn(("Injection \"" + key + "\" not found"), vm);
  5570. }
  5571. }
  5572. }
  5573. return result
  5574. }
  5575. }
  5576. /* */
  5577. /**
  5578. * Runtime helper for resolving raw children VNodes into a slot object.
  5579. */
  5580. function resolveSlots (
  5581. children,
  5582. context
  5583. ) {
  5584. if (!children || !children.length) {
  5585. return {}
  5586. }
  5587. var slots = {};
  5588. for (var i = 0, l = children.length; i < l; i++) {
  5589. var child = children[i];
  5590. var data = child.data;
  5591. // remove slot attribute if the node is resolved as a Vue slot node
  5592. if (data && data.attrs && data.attrs.slot) {
  5593. delete data.attrs.slot;
  5594. }
  5595. // named slots should only be respected if the vnode was rendered in the
  5596. // same context.
  5597. if ((child.context === context || child.fnContext === context) &&
  5598. data && data.slot != null
  5599. ) {
  5600. var name = data.slot;
  5601. var slot = (slots[name] || (slots[name] = []));
  5602. if (child.tag === 'template') {
  5603. slot.push.apply(slot, child.children || []);
  5604. } else {
  5605. slot.push(child);
  5606. }
  5607. } else {
  5608. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5609. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5610. (slots['page'] || (slots['page'] = [])).push(child);
  5611. }else{
  5612. (slots.default || (slots.default = [])).push(child);
  5613. }
  5614. }
  5615. }
  5616. // ignore slots that contains only whitespace
  5617. for (var name$1 in slots) {
  5618. if (slots[name$1].every(isWhitespace)) {
  5619. delete slots[name$1];
  5620. }
  5621. }
  5622. return slots
  5623. }
  5624. function isWhitespace (node) {
  5625. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5626. }
  5627. /* */
  5628. function normalizeScopedSlots (
  5629. slots,
  5630. normalSlots,
  5631. prevSlots
  5632. ) {
  5633. var res;
  5634. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5635. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5636. var key = slots && slots.$key;
  5637. if (!slots) {
  5638. res = {};
  5639. } else if (slots._normalized) {
  5640. // fast path 1: child component re-render only, parent did not change
  5641. return slots._normalized
  5642. } else if (
  5643. isStable &&
  5644. prevSlots &&
  5645. prevSlots !== emptyObject &&
  5646. key === prevSlots.$key &&
  5647. !hasNormalSlots &&
  5648. !prevSlots.$hasNormal
  5649. ) {
  5650. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5651. // only need to normalize once
  5652. return prevSlots
  5653. } else {
  5654. res = {};
  5655. for (var key$1 in slots) {
  5656. if (slots[key$1] && key$1[0] !== '$') {
  5657. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5658. }
  5659. }
  5660. }
  5661. // expose normal slots on scopedSlots
  5662. for (var key$2 in normalSlots) {
  5663. if (!(key$2 in res)) {
  5664. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5665. }
  5666. }
  5667. // avoriaz seems to mock a non-extensible $scopedSlots object
  5668. // and when that is passed down this would cause an error
  5669. if (slots && Object.isExtensible(slots)) {
  5670. (slots)._normalized = res;
  5671. }
  5672. def(res, '$stable', isStable);
  5673. def(res, '$key', key);
  5674. def(res, '$hasNormal', hasNormalSlots);
  5675. return res
  5676. }
  5677. function normalizeScopedSlot(normalSlots, key, fn) {
  5678. var normalized = function () {
  5679. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5680. res = res && typeof res === 'object' && !Array.isArray(res)
  5681. ? [res] // single vnode
  5682. : normalizeChildren(res);
  5683. return res && (
  5684. res.length === 0 ||
  5685. (res.length === 1 && res[0].isComment) // #9658
  5686. ) ? undefined
  5687. : res
  5688. };
  5689. // this is a slot using the new v-slot syntax without scope. although it is
  5690. // compiled as a scoped slot, render fn users would expect it to be present
  5691. // on this.$slots because the usage is semantically a normal slot.
  5692. if (fn.proxy) {
  5693. Object.defineProperty(normalSlots, key, {
  5694. get: normalized,
  5695. enumerable: true,
  5696. configurable: true
  5697. });
  5698. }
  5699. return normalized
  5700. }
  5701. function proxyNormalSlot(slots, key) {
  5702. return function () { return slots[key]; }
  5703. }
  5704. /* */
  5705. /**
  5706. * Runtime helper for rendering v-for lists.
  5707. */
  5708. function renderList (
  5709. val,
  5710. render
  5711. ) {
  5712. var ret, i, l, keys, key;
  5713. if (Array.isArray(val) || typeof val === 'string') {
  5714. ret = new Array(val.length);
  5715. for (i = 0, l = val.length; i < l; i++) {
  5716. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5717. }
  5718. } else if (typeof val === 'number') {
  5719. ret = new Array(val);
  5720. for (i = 0; i < val; i++) {
  5721. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5722. }
  5723. } else if (isObject(val)) {
  5724. if (hasSymbol && val[Symbol.iterator]) {
  5725. ret = [];
  5726. var iterator = val[Symbol.iterator]();
  5727. var result = iterator.next();
  5728. while (!result.done) {
  5729. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5730. result = iterator.next();
  5731. }
  5732. } else {
  5733. keys = Object.keys(val);
  5734. ret = new Array(keys.length);
  5735. for (i = 0, l = keys.length; i < l; i++) {
  5736. key = keys[i];
  5737. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5738. }
  5739. }
  5740. }
  5741. if (!isDef(ret)) {
  5742. ret = [];
  5743. }
  5744. (ret)._isVList = true;
  5745. return ret
  5746. }
  5747. /* */
  5748. /**
  5749. * Runtime helper for rendering <slot>
  5750. */
  5751. function renderSlot (
  5752. name,
  5753. fallback,
  5754. props,
  5755. bindObject
  5756. ) {
  5757. var scopedSlotFn = this.$scopedSlots[name];
  5758. var nodes;
  5759. if (scopedSlotFn) { // scoped slot
  5760. props = props || {};
  5761. if (bindObject) {
  5762. if ( true && !isObject(bindObject)) {
  5763. warn(
  5764. 'slot v-bind without argument expects an Object',
  5765. this
  5766. );
  5767. }
  5768. props = extend(extend({}, bindObject), props);
  5769. }
  5770. // fixed by xxxxxx app-plus scopedSlot
  5771. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5772. } else {
  5773. nodes = this.$slots[name] || fallback;
  5774. }
  5775. var target = props && props.slot;
  5776. if (target) {
  5777. return this.$createElement('template', { slot: target }, nodes)
  5778. } else {
  5779. return nodes
  5780. }
  5781. }
  5782. /* */
  5783. /**
  5784. * Runtime helper for resolving filters
  5785. */
  5786. function resolveFilter (id) {
  5787. return resolveAsset(this.$options, 'filters', id, true) || identity
  5788. }
  5789. /* */
  5790. function isKeyNotMatch (expect, actual) {
  5791. if (Array.isArray(expect)) {
  5792. return expect.indexOf(actual) === -1
  5793. } else {
  5794. return expect !== actual
  5795. }
  5796. }
  5797. /**
  5798. * Runtime helper for checking keyCodes from config.
  5799. * exposed as Vue.prototype._k
  5800. * passing in eventKeyName as last argument separately for backwards compat
  5801. */
  5802. function checkKeyCodes (
  5803. eventKeyCode,
  5804. key,
  5805. builtInKeyCode,
  5806. eventKeyName,
  5807. builtInKeyName
  5808. ) {
  5809. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5810. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5811. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5812. } else if (mappedKeyCode) {
  5813. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5814. } else if (eventKeyName) {
  5815. return hyphenate(eventKeyName) !== key
  5816. }
  5817. }
  5818. /* */
  5819. /**
  5820. * Runtime helper for merging v-bind="object" into a VNode's data.
  5821. */
  5822. function bindObjectProps (
  5823. data,
  5824. tag,
  5825. value,
  5826. asProp,
  5827. isSync
  5828. ) {
  5829. if (value) {
  5830. if (!isObject(value)) {
  5831. true && warn(
  5832. 'v-bind without argument expects an Object or Array value',
  5833. this
  5834. );
  5835. } else {
  5836. if (Array.isArray(value)) {
  5837. value = toObject(value);
  5838. }
  5839. var hash;
  5840. var loop = function ( key ) {
  5841. if (
  5842. key === 'class' ||
  5843. key === 'style' ||
  5844. isReservedAttribute(key)
  5845. ) {
  5846. hash = data;
  5847. } else {
  5848. var type = data.attrs && data.attrs.type;
  5849. hash = asProp || config.mustUseProp(tag, type, key)
  5850. ? data.domProps || (data.domProps = {})
  5851. : data.attrs || (data.attrs = {});
  5852. }
  5853. var camelizedKey = camelize(key);
  5854. var hyphenatedKey = hyphenate(key);
  5855. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5856. hash[key] = value[key];
  5857. if (isSync) {
  5858. var on = data.on || (data.on = {});
  5859. on[("update:" + key)] = function ($event) {
  5860. value[key] = $event;
  5861. };
  5862. }
  5863. }
  5864. };
  5865. for (var key in value) loop( key );
  5866. }
  5867. }
  5868. return data
  5869. }
  5870. /* */
  5871. /**
  5872. * Runtime helper for rendering static trees.
  5873. */
  5874. function renderStatic (
  5875. index,
  5876. isInFor
  5877. ) {
  5878. var cached = this._staticTrees || (this._staticTrees = []);
  5879. var tree = cached[index];
  5880. // if has already-rendered static tree and not inside v-for,
  5881. // we can reuse the same tree.
  5882. if (tree && !isInFor) {
  5883. return tree
  5884. }
  5885. // otherwise, render a fresh tree.
  5886. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5887. this._renderProxy,
  5888. null,
  5889. this // for render fns generated for functional component templates
  5890. );
  5891. markStatic(tree, ("__static__" + index), false);
  5892. return tree
  5893. }
  5894. /**
  5895. * Runtime helper for v-once.
  5896. * Effectively it means marking the node as static with a unique key.
  5897. */
  5898. function markOnce (
  5899. tree,
  5900. index,
  5901. key
  5902. ) {
  5903. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5904. return tree
  5905. }
  5906. function markStatic (
  5907. tree,
  5908. key,
  5909. isOnce
  5910. ) {
  5911. if (Array.isArray(tree)) {
  5912. for (var i = 0; i < tree.length; i++) {
  5913. if (tree[i] && typeof tree[i] !== 'string') {
  5914. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5915. }
  5916. }
  5917. } else {
  5918. markStaticNode(tree, key, isOnce);
  5919. }
  5920. }
  5921. function markStaticNode (node, key, isOnce) {
  5922. node.isStatic = true;
  5923. node.key = key;
  5924. node.isOnce = isOnce;
  5925. }
  5926. /* */
  5927. function bindObjectListeners (data, value) {
  5928. if (value) {
  5929. if (!isPlainObject(value)) {
  5930. true && warn(
  5931. 'v-on without argument expects an Object value',
  5932. this
  5933. );
  5934. } else {
  5935. var on = data.on = data.on ? extend({}, data.on) : {};
  5936. for (var key in value) {
  5937. var existing = on[key];
  5938. var ours = value[key];
  5939. on[key] = existing ? [].concat(existing, ours) : ours;
  5940. }
  5941. }
  5942. }
  5943. return data
  5944. }
  5945. /* */
  5946. function resolveScopedSlots (
  5947. fns, // see flow/vnode
  5948. res,
  5949. // the following are added in 2.6
  5950. hasDynamicKeys,
  5951. contentHashKey
  5952. ) {
  5953. res = res || { $stable: !hasDynamicKeys };
  5954. for (var i = 0; i < fns.length; i++) {
  5955. var slot = fns[i];
  5956. if (Array.isArray(slot)) {
  5957. resolveScopedSlots(slot, res, hasDynamicKeys);
  5958. } else if (slot) {
  5959. // marker for reverse proxying v-slot without scope on this.$slots
  5960. if (slot.proxy) {
  5961. slot.fn.proxy = true;
  5962. }
  5963. res[slot.key] = slot.fn;
  5964. }
  5965. }
  5966. if (contentHashKey) {
  5967. (res).$key = contentHashKey;
  5968. }
  5969. return res
  5970. }
  5971. /* */
  5972. function bindDynamicKeys (baseObj, values) {
  5973. for (var i = 0; i < values.length; i += 2) {
  5974. var key = values[i];
  5975. if (typeof key === 'string' && key) {
  5976. baseObj[values[i]] = values[i + 1];
  5977. } else if ( true && key !== '' && key !== null) {
  5978. // null is a special value for explicitly removing a binding
  5979. warn(
  5980. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5981. this
  5982. );
  5983. }
  5984. }
  5985. return baseObj
  5986. }
  5987. // helper to dynamically append modifier runtime markers to event names.
  5988. // ensure only append when value is already string, otherwise it will be cast
  5989. // to string and cause the type check to miss.
  5990. function prependModifier (value, symbol) {
  5991. return typeof value === 'string' ? symbol + value : value
  5992. }
  5993. /* */
  5994. function installRenderHelpers (target) {
  5995. target._o = markOnce;
  5996. target._n = toNumber;
  5997. target._s = toString;
  5998. target._l = renderList;
  5999. target._t = renderSlot;
  6000. target._q = looseEqual;
  6001. target._i = looseIndexOf;
  6002. target._m = renderStatic;
  6003. target._f = resolveFilter;
  6004. target._k = checkKeyCodes;
  6005. target._b = bindObjectProps;
  6006. target._v = createTextVNode;
  6007. target._e = createEmptyVNode;
  6008. target._u = resolveScopedSlots;
  6009. target._g = bindObjectListeners;
  6010. target._d = bindDynamicKeys;
  6011. target._p = prependModifier;
  6012. }
  6013. /* */
  6014. function FunctionalRenderContext (
  6015. data,
  6016. props,
  6017. children,
  6018. parent,
  6019. Ctor
  6020. ) {
  6021. var this$1 = this;
  6022. var options = Ctor.options;
  6023. // ensure the createElement function in functional components
  6024. // gets a unique context - this is necessary for correct named slot check
  6025. var contextVm;
  6026. if (hasOwn(parent, '_uid')) {
  6027. contextVm = Object.create(parent);
  6028. // $flow-disable-line
  6029. contextVm._original = parent;
  6030. } else {
  6031. // the context vm passed in is a functional context as well.
  6032. // in this case we want to make sure we are able to get a hold to the
  6033. // real context instance.
  6034. contextVm = parent;
  6035. // $flow-disable-line
  6036. parent = parent._original;
  6037. }
  6038. var isCompiled = isTrue(options._compiled);
  6039. var needNormalization = !isCompiled;
  6040. this.data = data;
  6041. this.props = props;
  6042. this.children = children;
  6043. this.parent = parent;
  6044. this.listeners = data.on || emptyObject;
  6045. this.injections = resolveInject(options.inject, parent);
  6046. this.slots = function () {
  6047. if (!this$1.$slots) {
  6048. normalizeScopedSlots(
  6049. data.scopedSlots,
  6050. this$1.$slots = resolveSlots(children, parent)
  6051. );
  6052. }
  6053. return this$1.$slots
  6054. };
  6055. Object.defineProperty(this, 'scopedSlots', ({
  6056. enumerable: true,
  6057. get: function get () {
  6058. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6059. }
  6060. }));
  6061. // support for compiled functional template
  6062. if (isCompiled) {
  6063. // exposing $options for renderStatic()
  6064. this.$options = options;
  6065. // pre-resolve slots for renderSlot()
  6066. this.$slots = this.slots();
  6067. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6068. }
  6069. if (options._scopeId) {
  6070. this._c = function (a, b, c, d) {
  6071. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6072. if (vnode && !Array.isArray(vnode)) {
  6073. vnode.fnScopeId = options._scopeId;
  6074. vnode.fnContext = parent;
  6075. }
  6076. return vnode
  6077. };
  6078. } else {
  6079. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6080. }
  6081. }
  6082. installRenderHelpers(FunctionalRenderContext.prototype);
  6083. function createFunctionalComponent (
  6084. Ctor,
  6085. propsData,
  6086. data,
  6087. contextVm,
  6088. children
  6089. ) {
  6090. var options = Ctor.options;
  6091. var props = {};
  6092. var propOptions = options.props;
  6093. if (isDef(propOptions)) {
  6094. for (var key in propOptions) {
  6095. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6096. }
  6097. } else {
  6098. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6099. if (isDef(data.props)) { mergeProps(props, data.props); }
  6100. }
  6101. var renderContext = new FunctionalRenderContext(
  6102. data,
  6103. props,
  6104. children,
  6105. contextVm,
  6106. Ctor
  6107. );
  6108. var vnode = options.render.call(null, renderContext._c, renderContext);
  6109. if (vnode instanceof VNode) {
  6110. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6111. } else if (Array.isArray(vnode)) {
  6112. var vnodes = normalizeChildren(vnode) || [];
  6113. var res = new Array(vnodes.length);
  6114. for (var i = 0; i < vnodes.length; i++) {
  6115. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6116. }
  6117. return res
  6118. }
  6119. }
  6120. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6121. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6122. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6123. // that should not be matched to match.
  6124. var clone = cloneVNode(vnode);
  6125. clone.fnContext = contextVm;
  6126. clone.fnOptions = options;
  6127. if (true) {
  6128. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6129. }
  6130. if (data.slot) {
  6131. (clone.data || (clone.data = {})).slot = data.slot;
  6132. }
  6133. return clone
  6134. }
  6135. function mergeProps (to, from) {
  6136. for (var key in from) {
  6137. to[camelize(key)] = from[key];
  6138. }
  6139. }
  6140. /* */
  6141. /* */
  6142. /* */
  6143. /* */
  6144. // inline hooks to be invoked on component VNodes during patch
  6145. var componentVNodeHooks = {
  6146. init: function init (vnode, hydrating) {
  6147. if (
  6148. vnode.componentInstance &&
  6149. !vnode.componentInstance._isDestroyed &&
  6150. vnode.data.keepAlive
  6151. ) {
  6152. // kept-alive components, treat as a patch
  6153. var mountedNode = vnode; // work around flow
  6154. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6155. } else {
  6156. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6157. vnode,
  6158. activeInstance
  6159. );
  6160. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6161. }
  6162. },
  6163. prepatch: function prepatch (oldVnode, vnode) {
  6164. var options = vnode.componentOptions;
  6165. var child = vnode.componentInstance = oldVnode.componentInstance;
  6166. updateChildComponent(
  6167. child,
  6168. options.propsData, // updated props
  6169. options.listeners, // updated listeners
  6170. vnode, // new parent vnode
  6171. options.children // new children
  6172. );
  6173. },
  6174. insert: function insert (vnode) {
  6175. var context = vnode.context;
  6176. var componentInstance = vnode.componentInstance;
  6177. if (!componentInstance._isMounted) {
  6178. callHook(componentInstance, 'onServiceCreated');
  6179. callHook(componentInstance, 'onServiceAttached');
  6180. componentInstance._isMounted = true;
  6181. callHook(componentInstance, 'mounted');
  6182. }
  6183. if (vnode.data.keepAlive) {
  6184. if (context._isMounted) {
  6185. // vue-router#1212
  6186. // During updates, a kept-alive component's child components may
  6187. // change, so directly walking the tree here may call activated hooks
  6188. // on incorrect children. Instead we push them into a queue which will
  6189. // be processed after the whole patch process ended.
  6190. queueActivatedComponent(componentInstance);
  6191. } else {
  6192. activateChildComponent(componentInstance, true /* direct */);
  6193. }
  6194. }
  6195. },
  6196. destroy: function destroy (vnode) {
  6197. var componentInstance = vnode.componentInstance;
  6198. if (!componentInstance._isDestroyed) {
  6199. if (!vnode.data.keepAlive) {
  6200. componentInstance.$destroy();
  6201. } else {
  6202. deactivateChildComponent(componentInstance, true /* direct */);
  6203. }
  6204. }
  6205. }
  6206. };
  6207. var hooksToMerge = Object.keys(componentVNodeHooks);
  6208. function createComponent (
  6209. Ctor,
  6210. data,
  6211. context,
  6212. children,
  6213. tag
  6214. ) {
  6215. if (isUndef(Ctor)) {
  6216. return
  6217. }
  6218. var baseCtor = context.$options._base;
  6219. // plain options object: turn it into a constructor
  6220. if (isObject(Ctor)) {
  6221. Ctor = baseCtor.extend(Ctor);
  6222. }
  6223. // if at this stage it's not a constructor or an async component factory,
  6224. // reject.
  6225. if (typeof Ctor !== 'function') {
  6226. if (true) {
  6227. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6228. }
  6229. return
  6230. }
  6231. // async component
  6232. var asyncFactory;
  6233. if (isUndef(Ctor.cid)) {
  6234. asyncFactory = Ctor;
  6235. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6236. if (Ctor === undefined) {
  6237. // return a placeholder node for async component, which is rendered
  6238. // as a comment node but preserves all the raw information for the node.
  6239. // the information will be used for async server-rendering and hydration.
  6240. return createAsyncPlaceholder(
  6241. asyncFactory,
  6242. data,
  6243. context,
  6244. children,
  6245. tag
  6246. )
  6247. }
  6248. }
  6249. data = data || {};
  6250. // resolve constructor options in case global mixins are applied after
  6251. // component constructor creation
  6252. resolveConstructorOptions(Ctor);
  6253. // transform component v-model data into props & events
  6254. if (isDef(data.model)) {
  6255. transformModel(Ctor.options, data);
  6256. }
  6257. // extract props
  6258. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6259. // functional component
  6260. if (isTrue(Ctor.options.functional)) {
  6261. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6262. }
  6263. // extract listeners, since these needs to be treated as
  6264. // child component listeners instead of DOM listeners
  6265. var listeners = data.on;
  6266. // replace with listeners with .native modifier
  6267. // so it gets processed during parent component patch.
  6268. data.on = data.nativeOn;
  6269. if (isTrue(Ctor.options.abstract)) {
  6270. // abstract components do not keep anything
  6271. // other than props & listeners & slot
  6272. // work around flow
  6273. var slot = data.slot;
  6274. data = {};
  6275. if (slot) {
  6276. data.slot = slot;
  6277. }
  6278. }
  6279. // install component management hooks onto the placeholder node
  6280. installComponentHooks(data);
  6281. // return a placeholder vnode
  6282. var name = Ctor.options.name || tag;
  6283. var vnode = new VNode(
  6284. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6285. data, undefined, undefined, undefined, context,
  6286. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6287. asyncFactory
  6288. );
  6289. return vnode
  6290. }
  6291. function createComponentInstanceForVnode (
  6292. vnode, // we know it's MountedComponentVNode but flow doesn't
  6293. parent // activeInstance in lifecycle state
  6294. ) {
  6295. var options = {
  6296. _isComponent: true,
  6297. _parentVnode: vnode,
  6298. parent: parent
  6299. };
  6300. // check inline-template render functions
  6301. var inlineTemplate = vnode.data.inlineTemplate;
  6302. if (isDef(inlineTemplate)) {
  6303. options.render = inlineTemplate.render;
  6304. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6305. }
  6306. return new vnode.componentOptions.Ctor(options)
  6307. }
  6308. function installComponentHooks (data) {
  6309. var hooks = data.hook || (data.hook = {});
  6310. for (var i = 0; i < hooksToMerge.length; i++) {
  6311. var key = hooksToMerge[i];
  6312. var existing = hooks[key];
  6313. var toMerge = componentVNodeHooks[key];
  6314. if (existing !== toMerge && !(existing && existing._merged)) {
  6315. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6316. }
  6317. }
  6318. }
  6319. function mergeHook$1 (f1, f2) {
  6320. var merged = function (a, b) {
  6321. // flow complains about extra args which is why we use any
  6322. f1(a, b);
  6323. f2(a, b);
  6324. };
  6325. merged._merged = true;
  6326. return merged
  6327. }
  6328. // transform component v-model info (value and callback) into
  6329. // prop and event handler respectively.
  6330. function transformModel (options, data) {
  6331. var prop = (options.model && options.model.prop) || 'value';
  6332. var event = (options.model && options.model.event) || 'input'
  6333. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6334. var on = data.on || (data.on = {});
  6335. var existing = on[event];
  6336. var callback = data.model.callback;
  6337. if (isDef(existing)) {
  6338. if (
  6339. Array.isArray(existing)
  6340. ? existing.indexOf(callback) === -1
  6341. : existing !== callback
  6342. ) {
  6343. on[event] = [callback].concat(existing);
  6344. }
  6345. } else {
  6346. on[event] = callback;
  6347. }
  6348. }
  6349. /* */
  6350. var SIMPLE_NORMALIZE = 1;
  6351. var ALWAYS_NORMALIZE = 2;
  6352. // wrapper function for providing a more flexible interface
  6353. // without getting yelled at by flow
  6354. function createElement (
  6355. context,
  6356. tag,
  6357. data,
  6358. children,
  6359. normalizationType,
  6360. alwaysNormalize
  6361. ) {
  6362. if (Array.isArray(data) || isPrimitive(data)) {
  6363. normalizationType = children;
  6364. children = data;
  6365. data = undefined;
  6366. }
  6367. if (isTrue(alwaysNormalize)) {
  6368. normalizationType = ALWAYS_NORMALIZE;
  6369. }
  6370. return _createElement(context, tag, data, children, normalizationType)
  6371. }
  6372. function _createElement (
  6373. context,
  6374. tag,
  6375. data,
  6376. children,
  6377. normalizationType
  6378. ) {
  6379. if (isDef(data) && isDef((data).__ob__)) {
  6380. true && warn(
  6381. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6382. 'Always create fresh vnode data objects in each render!',
  6383. context
  6384. );
  6385. return createEmptyVNode()
  6386. }
  6387. // object syntax in v-bind
  6388. if (isDef(data) && isDef(data.is)) {
  6389. tag = data.is;
  6390. }
  6391. if (!tag) {
  6392. // in case of component :is set to falsy value
  6393. return createEmptyVNode()
  6394. }
  6395. // warn against non-primitive key
  6396. if ( true &&
  6397. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6398. ) {
  6399. {
  6400. warn(
  6401. 'Avoid using non-primitive value as key, ' +
  6402. 'use string/number value instead.',
  6403. context
  6404. );
  6405. }
  6406. }
  6407. // support single function children as default scoped slot
  6408. if (Array.isArray(children) &&
  6409. typeof children[0] === 'function'
  6410. ) {
  6411. data = data || {};
  6412. data.scopedSlots = { default: children[0] };
  6413. children.length = 0;
  6414. }
  6415. if (normalizationType === ALWAYS_NORMALIZE) {
  6416. children = normalizeChildren(children);
  6417. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6418. children = simpleNormalizeChildren(children);
  6419. }
  6420. var vnode, ns;
  6421. if (typeof tag === 'string') {
  6422. var Ctor;
  6423. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6424. if (config.isReservedTag(tag)) {
  6425. // platform built-in elements
  6426. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6427. warn(
  6428. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6429. context
  6430. );
  6431. }
  6432. vnode = new VNode(
  6433. config.parsePlatformTagName(tag), data, children,
  6434. undefined, undefined, context
  6435. );
  6436. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6437. // component
  6438. vnode = createComponent(Ctor, data, context, children, tag);
  6439. } else {
  6440. // unknown or unlisted namespaced elements
  6441. // check at runtime because it may get assigned a namespace when its
  6442. // parent normalizes children
  6443. vnode = new VNode(
  6444. tag, data, children,
  6445. undefined, undefined, context
  6446. );
  6447. }
  6448. } else {
  6449. // direct component options / constructor
  6450. vnode = createComponent(tag, data, context, children);
  6451. }
  6452. if (Array.isArray(vnode)) {
  6453. return vnode
  6454. } else if (isDef(vnode)) {
  6455. if (isDef(ns)) { applyNS(vnode, ns); }
  6456. if (isDef(data)) { registerDeepBindings(data); }
  6457. return vnode
  6458. } else {
  6459. return createEmptyVNode()
  6460. }
  6461. }
  6462. function applyNS (vnode, ns, force) {
  6463. vnode.ns = ns;
  6464. if (vnode.tag === 'foreignObject') {
  6465. // use default namespace inside foreignObject
  6466. ns = undefined;
  6467. force = true;
  6468. }
  6469. if (isDef(vnode.children)) {
  6470. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6471. var child = vnode.children[i];
  6472. if (isDef(child.tag) && (
  6473. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6474. applyNS(child, ns, force);
  6475. }
  6476. }
  6477. }
  6478. }
  6479. // ref #5318
  6480. // necessary to ensure parent re-render when deep bindings like :style and
  6481. // :class are used on slot nodes
  6482. function registerDeepBindings (data) {
  6483. if (isObject(data.style)) {
  6484. traverse(data.style);
  6485. }
  6486. if (isObject(data.class)) {
  6487. traverse(data.class);
  6488. }
  6489. }
  6490. /* */
  6491. function initRender (vm) {
  6492. vm._vnode = null; // the root of the child tree
  6493. vm._staticTrees = null; // v-once cached trees
  6494. var options = vm.$options;
  6495. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6496. var renderContext = parentVnode && parentVnode.context;
  6497. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6498. vm.$scopedSlots = emptyObject;
  6499. // bind the createElement fn to this instance
  6500. // so that we get proper render context inside it.
  6501. // args order: tag, data, children, normalizationType, alwaysNormalize
  6502. // internal version is used by render functions compiled from templates
  6503. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6504. // normalization is always applied for the public version, used in
  6505. // user-written render functions.
  6506. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6507. // $attrs & $listeners are exposed for easier HOC creation.
  6508. // they need to be reactive so that HOCs using them are always updated
  6509. var parentData = parentVnode && parentVnode.data;
  6510. /* istanbul ignore else */
  6511. if (true) {
  6512. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6513. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6514. }, true);
  6515. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6516. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6517. }, true);
  6518. } else {}
  6519. }
  6520. var currentRenderingInstance = null;
  6521. function renderMixin (Vue) {
  6522. // install runtime convenience helpers
  6523. installRenderHelpers(Vue.prototype);
  6524. Vue.prototype.$nextTick = function (fn) {
  6525. return nextTick(fn, this)
  6526. };
  6527. Vue.prototype._render = function () {
  6528. var vm = this;
  6529. var ref = vm.$options;
  6530. var render = ref.render;
  6531. var _parentVnode = ref._parentVnode;
  6532. if (_parentVnode) {
  6533. vm.$scopedSlots = normalizeScopedSlots(
  6534. _parentVnode.data.scopedSlots,
  6535. vm.$slots,
  6536. vm.$scopedSlots
  6537. );
  6538. }
  6539. // set parent vnode. this allows render functions to have access
  6540. // to the data on the placeholder node.
  6541. vm.$vnode = _parentVnode;
  6542. // render self
  6543. var vnode;
  6544. try {
  6545. // There's no need to maintain a stack because all render fns are called
  6546. // separately from one another. Nested component's render fns are called
  6547. // when parent component is patched.
  6548. currentRenderingInstance = vm;
  6549. vnode = render.call(vm._renderProxy, vm.$createElement);
  6550. } catch (e) {
  6551. handleError(e, vm, "render");
  6552. // return error render result,
  6553. // or previous vnode to prevent render error causing blank component
  6554. /* istanbul ignore else */
  6555. if ( true && vm.$options.renderError) {
  6556. try {
  6557. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6558. } catch (e) {
  6559. handleError(e, vm, "renderError");
  6560. vnode = vm._vnode;
  6561. }
  6562. } else {
  6563. vnode = vm._vnode;
  6564. }
  6565. } finally {
  6566. currentRenderingInstance = null;
  6567. }
  6568. // if the returned array contains only a single node, allow it
  6569. if (Array.isArray(vnode) && vnode.length === 1) {
  6570. vnode = vnode[0];
  6571. }
  6572. // return empty vnode in case the render function errored out
  6573. if (!(vnode instanceof VNode)) {
  6574. if ( true && Array.isArray(vnode)) {
  6575. warn(
  6576. 'Multiple root nodes returned from render function. Render function ' +
  6577. 'should return a single root node.',
  6578. vm
  6579. );
  6580. }
  6581. vnode = createEmptyVNode();
  6582. }
  6583. // set parent
  6584. vnode.parent = _parentVnode;
  6585. return vnode
  6586. };
  6587. }
  6588. /* */
  6589. function ensureCtor (comp, base) {
  6590. if (
  6591. comp.__esModule ||
  6592. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6593. ) {
  6594. comp = comp.default;
  6595. }
  6596. return isObject(comp)
  6597. ? base.extend(comp)
  6598. : comp
  6599. }
  6600. function createAsyncPlaceholder (
  6601. factory,
  6602. data,
  6603. context,
  6604. children,
  6605. tag
  6606. ) {
  6607. var node = createEmptyVNode();
  6608. node.asyncFactory = factory;
  6609. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6610. return node
  6611. }
  6612. function resolveAsyncComponent (
  6613. factory,
  6614. baseCtor
  6615. ) {
  6616. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6617. return factory.errorComp
  6618. }
  6619. if (isDef(factory.resolved)) {
  6620. return factory.resolved
  6621. }
  6622. var owner = currentRenderingInstance;
  6623. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6624. // already pending
  6625. factory.owners.push(owner);
  6626. }
  6627. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6628. return factory.loadingComp
  6629. }
  6630. if (owner && !isDef(factory.owners)) {
  6631. var owners = factory.owners = [owner];
  6632. var sync = true;
  6633. var timerLoading = null;
  6634. var timerTimeout = null
  6635. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6636. var forceRender = function (renderCompleted) {
  6637. for (var i = 0, l = owners.length; i < l; i++) {
  6638. (owners[i]).$forceUpdate();
  6639. }
  6640. if (renderCompleted) {
  6641. owners.length = 0;
  6642. if (timerLoading !== null) {
  6643. clearTimeout(timerLoading);
  6644. timerLoading = null;
  6645. }
  6646. if (timerTimeout !== null) {
  6647. clearTimeout(timerTimeout);
  6648. timerTimeout = null;
  6649. }
  6650. }
  6651. };
  6652. var resolve = once(function (res) {
  6653. // cache resolved
  6654. factory.resolved = ensureCtor(res, baseCtor);
  6655. // invoke callbacks only if this is not a synchronous resolve
  6656. // (async resolves are shimmed as synchronous during SSR)
  6657. if (!sync) {
  6658. forceRender(true);
  6659. } else {
  6660. owners.length = 0;
  6661. }
  6662. });
  6663. var reject = once(function (reason) {
  6664. true && warn(
  6665. "Failed to resolve async component: " + (String(factory)) +
  6666. (reason ? ("\nReason: " + reason) : '')
  6667. );
  6668. if (isDef(factory.errorComp)) {
  6669. factory.error = true;
  6670. forceRender(true);
  6671. }
  6672. });
  6673. var res = factory(resolve, reject);
  6674. if (isObject(res)) {
  6675. if (isPromise(res)) {
  6676. // () => Promise
  6677. if (isUndef(factory.resolved)) {
  6678. res.then(resolve, reject);
  6679. }
  6680. } else if (isPromise(res.component)) {
  6681. res.component.then(resolve, reject);
  6682. if (isDef(res.error)) {
  6683. factory.errorComp = ensureCtor(res.error, baseCtor);
  6684. }
  6685. if (isDef(res.loading)) {
  6686. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6687. if (res.delay === 0) {
  6688. factory.loading = true;
  6689. } else {
  6690. timerLoading = setTimeout(function () {
  6691. timerLoading = null;
  6692. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6693. factory.loading = true;
  6694. forceRender(false);
  6695. }
  6696. }, res.delay || 200);
  6697. }
  6698. }
  6699. if (isDef(res.timeout)) {
  6700. timerTimeout = setTimeout(function () {
  6701. timerTimeout = null;
  6702. if (isUndef(factory.resolved)) {
  6703. reject(
  6704. true
  6705. ? ("timeout (" + (res.timeout) + "ms)")
  6706. : undefined
  6707. );
  6708. }
  6709. }, res.timeout);
  6710. }
  6711. }
  6712. }
  6713. sync = false;
  6714. // return in case resolved synchronously
  6715. return factory.loading
  6716. ? factory.loadingComp
  6717. : factory.resolved
  6718. }
  6719. }
  6720. /* */
  6721. function isAsyncPlaceholder (node) {
  6722. return node.isComment && node.asyncFactory
  6723. }
  6724. /* */
  6725. function getFirstComponentChild (children) {
  6726. if (Array.isArray(children)) {
  6727. for (var i = 0; i < children.length; i++) {
  6728. var c = children[i];
  6729. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6730. return c
  6731. }
  6732. }
  6733. }
  6734. }
  6735. /* */
  6736. /* */
  6737. function initEvents (vm) {
  6738. vm._events = Object.create(null);
  6739. vm._hasHookEvent = false;
  6740. // init parent attached events
  6741. var listeners = vm.$options._parentListeners;
  6742. if (listeners) {
  6743. updateComponentListeners(vm, listeners);
  6744. }
  6745. }
  6746. var target;
  6747. function add (event, fn) {
  6748. target.$on(event, fn);
  6749. }
  6750. function remove$1 (event, fn) {
  6751. target.$off(event, fn);
  6752. }
  6753. function createOnceHandler (event, fn) {
  6754. var _target = target;
  6755. return function onceHandler () {
  6756. var res = fn.apply(null, arguments);
  6757. if (res !== null) {
  6758. _target.$off(event, onceHandler);
  6759. }
  6760. }
  6761. }
  6762. function updateComponentListeners (
  6763. vm,
  6764. listeners,
  6765. oldListeners
  6766. ) {
  6767. target = vm;
  6768. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6769. target = undefined;
  6770. }
  6771. function eventsMixin (Vue) {
  6772. var hookRE = /^hook:/;
  6773. Vue.prototype.$on = function (event, fn) {
  6774. var vm = this;
  6775. if (Array.isArray(event)) {
  6776. for (var i = 0, l = event.length; i < l; i++) {
  6777. vm.$on(event[i], fn);
  6778. }
  6779. } else {
  6780. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6781. // optimize hook:event cost by using a boolean flag marked at registration
  6782. // instead of a hash lookup
  6783. if (hookRE.test(event)) {
  6784. vm._hasHookEvent = true;
  6785. }
  6786. }
  6787. return vm
  6788. };
  6789. Vue.prototype.$once = function (event, fn) {
  6790. var vm = this;
  6791. function on () {
  6792. vm.$off(event, on);
  6793. fn.apply(vm, arguments);
  6794. }
  6795. on.fn = fn;
  6796. vm.$on(event, on);
  6797. return vm
  6798. };
  6799. Vue.prototype.$off = function (event, fn) {
  6800. var vm = this;
  6801. // all
  6802. if (!arguments.length) {
  6803. vm._events = Object.create(null);
  6804. return vm
  6805. }
  6806. // array of events
  6807. if (Array.isArray(event)) {
  6808. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6809. vm.$off(event[i$1], fn);
  6810. }
  6811. return vm
  6812. }
  6813. // specific event
  6814. var cbs = vm._events[event];
  6815. if (!cbs) {
  6816. return vm
  6817. }
  6818. if (!fn) {
  6819. vm._events[event] = null;
  6820. return vm
  6821. }
  6822. // specific handler
  6823. var cb;
  6824. var i = cbs.length;
  6825. while (i--) {
  6826. cb = cbs[i];
  6827. if (cb === fn || cb.fn === fn) {
  6828. cbs.splice(i, 1);
  6829. break
  6830. }
  6831. }
  6832. return vm
  6833. };
  6834. Vue.prototype.$emit = function (event) {
  6835. var vm = this;
  6836. if (true) {
  6837. var lowerCaseEvent = event.toLowerCase();
  6838. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6839. tip(
  6840. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6841. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6842. "Note that HTML attributes are case-insensitive and you cannot use " +
  6843. "v-on to listen to camelCase events when using in-DOM templates. " +
  6844. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6845. );
  6846. }
  6847. }
  6848. var cbs = vm._events[event];
  6849. if (cbs) {
  6850. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6851. var args = toArray(arguments, 1);
  6852. var info = "event handler for \"" + event + "\"";
  6853. for (var i = 0, l = cbs.length; i < l; i++) {
  6854. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6855. }
  6856. }
  6857. return vm
  6858. };
  6859. }
  6860. /* */
  6861. var activeInstance = null;
  6862. var isUpdatingChildComponent = false;
  6863. function setActiveInstance(vm) {
  6864. var prevActiveInstance = activeInstance;
  6865. activeInstance = vm;
  6866. return function () {
  6867. activeInstance = prevActiveInstance;
  6868. }
  6869. }
  6870. function initLifecycle (vm) {
  6871. var options = vm.$options;
  6872. // locate first non-abstract parent
  6873. var parent = options.parent;
  6874. if (parent && !options.abstract) {
  6875. while (parent.$options.abstract && parent.$parent) {
  6876. parent = parent.$parent;
  6877. }
  6878. parent.$children.push(vm);
  6879. }
  6880. vm.$parent = parent;
  6881. vm.$root = parent ? parent.$root : vm;
  6882. vm.$children = [];
  6883. vm.$refs = {};
  6884. vm._watcher = null;
  6885. vm._inactive = null;
  6886. vm._directInactive = false;
  6887. vm._isMounted = false;
  6888. vm._isDestroyed = false;
  6889. vm._isBeingDestroyed = false;
  6890. }
  6891. function lifecycleMixin (Vue) {
  6892. Vue.prototype._update = function (vnode, hydrating) {
  6893. var vm = this;
  6894. var prevEl = vm.$el;
  6895. var prevVnode = vm._vnode;
  6896. var restoreActiveInstance = setActiveInstance(vm);
  6897. vm._vnode = vnode;
  6898. // Vue.prototype.__patch__ is injected in entry points
  6899. // based on the rendering backend used.
  6900. if (!prevVnode) {
  6901. // initial render
  6902. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6903. } else {
  6904. // updates
  6905. vm.$el = vm.__patch__(prevVnode, vnode);
  6906. }
  6907. restoreActiveInstance();
  6908. // update __vue__ reference
  6909. if (prevEl) {
  6910. prevEl.__vue__ = null;
  6911. }
  6912. if (vm.$el) {
  6913. vm.$el.__vue__ = vm;
  6914. }
  6915. // if parent is an HOC, update its $el as well
  6916. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6917. vm.$parent.$el = vm.$el;
  6918. }
  6919. // updated hook is called by the scheduler to ensure that children are
  6920. // updated in a parent's updated hook.
  6921. };
  6922. Vue.prototype.$forceUpdate = function () {
  6923. var vm = this;
  6924. if (vm._watcher) {
  6925. vm._watcher.update();
  6926. }
  6927. };
  6928. Vue.prototype.$destroy = function () {
  6929. var vm = this;
  6930. if (vm._isBeingDestroyed) {
  6931. return
  6932. }
  6933. callHook(vm, 'beforeDestroy');
  6934. vm._isBeingDestroyed = true;
  6935. // remove self from parent
  6936. var parent = vm.$parent;
  6937. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6938. remove(parent.$children, vm);
  6939. }
  6940. // teardown watchers
  6941. if (vm._watcher) {
  6942. vm._watcher.teardown();
  6943. }
  6944. var i = vm._watchers.length;
  6945. while (i--) {
  6946. vm._watchers[i].teardown();
  6947. }
  6948. // remove reference from data ob
  6949. // frozen object may not have observer.
  6950. if (vm._data.__ob__) {
  6951. vm._data.__ob__.vmCount--;
  6952. }
  6953. // call the last hook...
  6954. vm._isDestroyed = true;
  6955. // invoke destroy hooks on current rendered tree
  6956. vm.__patch__(vm._vnode, null);
  6957. // fire destroyed hook
  6958. callHook(vm, 'destroyed');
  6959. // turn off all instance listeners.
  6960. vm.$off();
  6961. // remove __vue__ reference
  6962. if (vm.$el) {
  6963. vm.$el.__vue__ = null;
  6964. }
  6965. // release circular reference (#6759)
  6966. if (vm.$vnode) {
  6967. vm.$vnode.parent = null;
  6968. }
  6969. };
  6970. }
  6971. function updateChildComponent (
  6972. vm,
  6973. propsData,
  6974. listeners,
  6975. parentVnode,
  6976. renderChildren
  6977. ) {
  6978. if (true) {
  6979. isUpdatingChildComponent = true;
  6980. }
  6981. // determine whether component has slot children
  6982. // we need to do this before overwriting $options._renderChildren.
  6983. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6984. // dynamic slot names). Static scoped slots compiled from template has the
  6985. // "$stable" marker.
  6986. var newScopedSlots = parentVnode.data.scopedSlots;
  6987. var oldScopedSlots = vm.$scopedSlots;
  6988. var hasDynamicScopedSlot = !!(
  6989. (newScopedSlots && !newScopedSlots.$stable) ||
  6990. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6991. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6992. );
  6993. // Any static slot children from the parent may have changed during parent's
  6994. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6995. // update is necessary to ensure correctness.
  6996. var needsForceUpdate = !!(
  6997. renderChildren || // has new static slots
  6998. vm.$options._renderChildren || // has old static slots
  6999. hasDynamicScopedSlot
  7000. );
  7001. vm.$options._parentVnode = parentVnode;
  7002. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7003. if (vm._vnode) { // update child tree's parent
  7004. vm._vnode.parent = parentVnode;
  7005. }
  7006. vm.$options._renderChildren = renderChildren;
  7007. // update $attrs and $listeners hash
  7008. // these are also reactive so they may trigger child update if the child
  7009. // used them during render
  7010. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7011. vm.$listeners = listeners || emptyObject;
  7012. // update props
  7013. if (propsData && vm.$options.props) {
  7014. toggleObserving(false);
  7015. var props = vm._props;
  7016. var propKeys = vm.$options._propKeys || [];
  7017. for (var i = 0; i < propKeys.length; i++) {
  7018. var key = propKeys[i];
  7019. var propOptions = vm.$options.props; // wtf flow?
  7020. props[key] = validateProp(key, propOptions, propsData, vm);
  7021. }
  7022. toggleObserving(true);
  7023. // keep a copy of raw propsData
  7024. vm.$options.propsData = propsData;
  7025. }
  7026. // fixed by xxxxxx update properties(mp runtime)
  7027. vm._$updateProperties && vm._$updateProperties(vm);
  7028. // update listeners
  7029. listeners = listeners || emptyObject;
  7030. var oldListeners = vm.$options._parentListeners;
  7031. vm.$options._parentListeners = listeners;
  7032. updateComponentListeners(vm, listeners, oldListeners);
  7033. // resolve slots + force update if has children
  7034. if (needsForceUpdate) {
  7035. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7036. vm.$forceUpdate();
  7037. }
  7038. if (true) {
  7039. isUpdatingChildComponent = false;
  7040. }
  7041. }
  7042. function isInInactiveTree (vm) {
  7043. while (vm && (vm = vm.$parent)) {
  7044. if (vm._inactive) { return true }
  7045. }
  7046. return false
  7047. }
  7048. function activateChildComponent (vm, direct) {
  7049. if (direct) {
  7050. vm._directInactive = false;
  7051. if (isInInactiveTree(vm)) {
  7052. return
  7053. }
  7054. } else if (vm._directInactive) {
  7055. return
  7056. }
  7057. if (vm._inactive || vm._inactive === null) {
  7058. vm._inactive = false;
  7059. for (var i = 0; i < vm.$children.length; i++) {
  7060. activateChildComponent(vm.$children[i]);
  7061. }
  7062. callHook(vm, 'activated');
  7063. }
  7064. }
  7065. function deactivateChildComponent (vm, direct) {
  7066. if (direct) {
  7067. vm._directInactive = true;
  7068. if (isInInactiveTree(vm)) {
  7069. return
  7070. }
  7071. }
  7072. if (!vm._inactive) {
  7073. vm._inactive = true;
  7074. for (var i = 0; i < vm.$children.length; i++) {
  7075. deactivateChildComponent(vm.$children[i]);
  7076. }
  7077. callHook(vm, 'deactivated');
  7078. }
  7079. }
  7080. function callHook (vm, hook) {
  7081. // #7573 disable dep collection when invoking lifecycle hooks
  7082. pushTarget();
  7083. var handlers = vm.$options[hook];
  7084. var info = hook + " hook";
  7085. if (handlers) {
  7086. for (var i = 0, j = handlers.length; i < j; i++) {
  7087. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7088. }
  7089. }
  7090. if (vm._hasHookEvent) {
  7091. vm.$emit('hook:' + hook);
  7092. }
  7093. popTarget();
  7094. }
  7095. /* */
  7096. var MAX_UPDATE_COUNT = 100;
  7097. var queue = [];
  7098. var activatedChildren = [];
  7099. var has = {};
  7100. var circular = {};
  7101. var waiting = false;
  7102. var flushing = false;
  7103. var index = 0;
  7104. /**
  7105. * Reset the scheduler's state.
  7106. */
  7107. function resetSchedulerState () {
  7108. index = queue.length = activatedChildren.length = 0;
  7109. has = {};
  7110. if (true) {
  7111. circular = {};
  7112. }
  7113. waiting = flushing = false;
  7114. }
  7115. // Async edge case #6566 requires saving the timestamp when event listeners are
  7116. // attached. However, calling performance.now() has a perf overhead especially
  7117. // if the page has thousands of event listeners. Instead, we take a timestamp
  7118. // every time the scheduler flushes and use that for all event listeners
  7119. // attached during that flush.
  7120. var currentFlushTimestamp = 0;
  7121. // Async edge case fix requires storing an event listener's attach timestamp.
  7122. var getNow = Date.now;
  7123. // Determine what event timestamp the browser is using. Annoyingly, the
  7124. // timestamp can either be hi-res (relative to page load) or low-res
  7125. // (relative to UNIX epoch), so in order to compare time we have to use the
  7126. // same timestamp type when saving the flush timestamp.
  7127. // All IE versions use low-res event timestamps, and have problematic clock
  7128. // implementations (#9632)
  7129. if (inBrowser && !isIE) {
  7130. var performance = window.performance;
  7131. if (
  7132. performance &&
  7133. typeof performance.now === 'function' &&
  7134. getNow() > document.createEvent('Event').timeStamp
  7135. ) {
  7136. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7137. // smaller than it, it means the event is using a hi-res timestamp,
  7138. // and we need to use the hi-res version for event listener timestamps as
  7139. // well.
  7140. getNow = function () { return performance.now(); };
  7141. }
  7142. }
  7143. /**
  7144. * Flush both queues and run the watchers.
  7145. */
  7146. function flushSchedulerQueue () {
  7147. currentFlushTimestamp = getNow();
  7148. flushing = true;
  7149. var watcher, id;
  7150. // Sort queue before flush.
  7151. // This ensures that:
  7152. // 1. Components are updated from parent to child. (because parent is always
  7153. // created before the child)
  7154. // 2. A component's user watchers are run before its render watcher (because
  7155. // user watchers are created before the render watcher)
  7156. // 3. If a component is destroyed during a parent component's watcher run,
  7157. // its watchers can be skipped.
  7158. queue.sort(function (a, b) { return a.id - b.id; });
  7159. // do not cache length because more watchers might be pushed
  7160. // as we run existing watchers
  7161. for (index = 0; index < queue.length; index++) {
  7162. watcher = queue[index];
  7163. if (watcher.before) {
  7164. watcher.before();
  7165. }
  7166. id = watcher.id;
  7167. has[id] = null;
  7168. watcher.run();
  7169. // in dev build, check and stop circular updates.
  7170. if ( true && has[id] != null) {
  7171. circular[id] = (circular[id] || 0) + 1;
  7172. if (circular[id] > MAX_UPDATE_COUNT) {
  7173. warn(
  7174. 'You may have an infinite update loop ' + (
  7175. watcher.user
  7176. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7177. : "in a component render function."
  7178. ),
  7179. watcher.vm
  7180. );
  7181. break
  7182. }
  7183. }
  7184. }
  7185. // keep copies of post queues before resetting state
  7186. var activatedQueue = activatedChildren.slice();
  7187. var updatedQueue = queue.slice();
  7188. resetSchedulerState();
  7189. // call component updated and activated hooks
  7190. callActivatedHooks(activatedQueue);
  7191. callUpdatedHooks(updatedQueue);
  7192. // devtool hook
  7193. /* istanbul ignore if */
  7194. if (devtools && config.devtools) {
  7195. devtools.emit('flush');
  7196. }
  7197. }
  7198. function callUpdatedHooks (queue) {
  7199. var i = queue.length;
  7200. while (i--) {
  7201. var watcher = queue[i];
  7202. var vm = watcher.vm;
  7203. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7204. callHook(vm, 'updated');
  7205. }
  7206. }
  7207. }
  7208. /**
  7209. * Queue a kept-alive component that was activated during patch.
  7210. * The queue will be processed after the entire tree has been patched.
  7211. */
  7212. function queueActivatedComponent (vm) {
  7213. // setting _inactive to false here so that a render function can
  7214. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7215. vm._inactive = false;
  7216. activatedChildren.push(vm);
  7217. }
  7218. function callActivatedHooks (queue) {
  7219. for (var i = 0; i < queue.length; i++) {
  7220. queue[i]._inactive = true;
  7221. activateChildComponent(queue[i], true /* true */);
  7222. }
  7223. }
  7224. /**
  7225. * Push a watcher into the watcher queue.
  7226. * Jobs with duplicate IDs will be skipped unless it's
  7227. * pushed when the queue is being flushed.
  7228. */
  7229. function queueWatcher (watcher) {
  7230. var id = watcher.id;
  7231. if (has[id] == null) {
  7232. has[id] = true;
  7233. if (!flushing) {
  7234. queue.push(watcher);
  7235. } else {
  7236. // if already flushing, splice the watcher based on its id
  7237. // if already past its id, it will be run next immediately.
  7238. var i = queue.length - 1;
  7239. while (i > index && queue[i].id > watcher.id) {
  7240. i--;
  7241. }
  7242. queue.splice(i + 1, 0, watcher);
  7243. }
  7244. // queue the flush
  7245. if (!waiting) {
  7246. waiting = true;
  7247. if ( true && !config.async) {
  7248. flushSchedulerQueue();
  7249. return
  7250. }
  7251. nextTick(flushSchedulerQueue);
  7252. }
  7253. }
  7254. }
  7255. /* */
  7256. var uid$2 = 0;
  7257. /**
  7258. * A watcher parses an expression, collects dependencies,
  7259. * and fires callback when the expression value changes.
  7260. * This is used for both the $watch() api and directives.
  7261. */
  7262. var Watcher = function Watcher (
  7263. vm,
  7264. expOrFn,
  7265. cb,
  7266. options,
  7267. isRenderWatcher
  7268. ) {
  7269. this.vm = vm;
  7270. if (isRenderWatcher) {
  7271. vm._watcher = this;
  7272. }
  7273. vm._watchers.push(this);
  7274. // options
  7275. if (options) {
  7276. this.deep = !!options.deep;
  7277. this.user = !!options.user;
  7278. this.lazy = !!options.lazy;
  7279. this.sync = !!options.sync;
  7280. this.before = options.before;
  7281. } else {
  7282. this.deep = this.user = this.lazy = this.sync = false;
  7283. }
  7284. this.cb = cb;
  7285. this.id = ++uid$2; // uid for batching
  7286. this.active = true;
  7287. this.dirty = this.lazy; // for lazy watchers
  7288. this.deps = [];
  7289. this.newDeps = [];
  7290. this.depIds = new _Set();
  7291. this.newDepIds = new _Set();
  7292. this.expression = true
  7293. ? expOrFn.toString()
  7294. : undefined;
  7295. // parse expression for getter
  7296. if (typeof expOrFn === 'function') {
  7297. this.getter = expOrFn;
  7298. } else {
  7299. this.getter = parsePath(expOrFn);
  7300. if (!this.getter) {
  7301. this.getter = noop;
  7302. true && warn(
  7303. "Failed watching path: \"" + expOrFn + "\" " +
  7304. 'Watcher only accepts simple dot-delimited paths. ' +
  7305. 'For full control, use a function instead.',
  7306. vm
  7307. );
  7308. }
  7309. }
  7310. this.value = this.lazy
  7311. ? undefined
  7312. : this.get();
  7313. };
  7314. /**
  7315. * Evaluate the getter, and re-collect dependencies.
  7316. */
  7317. Watcher.prototype.get = function get () {
  7318. pushTarget(this);
  7319. var value;
  7320. var vm = this.vm;
  7321. try {
  7322. value = this.getter.call(vm, vm);
  7323. } catch (e) {
  7324. if (this.user) {
  7325. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7326. } else {
  7327. throw e
  7328. }
  7329. } finally {
  7330. // "touch" every property so they are all tracked as
  7331. // dependencies for deep watching
  7332. if (this.deep) {
  7333. traverse(value);
  7334. }
  7335. popTarget();
  7336. this.cleanupDeps();
  7337. }
  7338. return value
  7339. };
  7340. /**
  7341. * Add a dependency to this directive.
  7342. */
  7343. Watcher.prototype.addDep = function addDep (dep) {
  7344. var id = dep.id;
  7345. if (!this.newDepIds.has(id)) {
  7346. this.newDepIds.add(id);
  7347. this.newDeps.push(dep);
  7348. if (!this.depIds.has(id)) {
  7349. dep.addSub(this);
  7350. }
  7351. }
  7352. };
  7353. /**
  7354. * Clean up for dependency collection.
  7355. */
  7356. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7357. var i = this.deps.length;
  7358. while (i--) {
  7359. var dep = this.deps[i];
  7360. if (!this.newDepIds.has(dep.id)) {
  7361. dep.removeSub(this);
  7362. }
  7363. }
  7364. var tmp = this.depIds;
  7365. this.depIds = this.newDepIds;
  7366. this.newDepIds = tmp;
  7367. this.newDepIds.clear();
  7368. tmp = this.deps;
  7369. this.deps = this.newDeps;
  7370. this.newDeps = tmp;
  7371. this.newDeps.length = 0;
  7372. };
  7373. /**
  7374. * Subscriber interface.
  7375. * Will be called when a dependency changes.
  7376. */
  7377. Watcher.prototype.update = function update () {
  7378. /* istanbul ignore else */
  7379. if (this.lazy) {
  7380. this.dirty = true;
  7381. } else if (this.sync) {
  7382. this.run();
  7383. } else {
  7384. queueWatcher(this);
  7385. }
  7386. };
  7387. /**
  7388. * Scheduler job interface.
  7389. * Will be called by the scheduler.
  7390. */
  7391. Watcher.prototype.run = function run () {
  7392. if (this.active) {
  7393. var value = this.get();
  7394. if (
  7395. value !== this.value ||
  7396. // Deep watchers and watchers on Object/Arrays should fire even
  7397. // when the value is the same, because the value may
  7398. // have mutated.
  7399. isObject(value) ||
  7400. this.deep
  7401. ) {
  7402. // set new value
  7403. var oldValue = this.value;
  7404. this.value = value;
  7405. if (this.user) {
  7406. try {
  7407. this.cb.call(this.vm, value, oldValue);
  7408. } catch (e) {
  7409. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7410. }
  7411. } else {
  7412. this.cb.call(this.vm, value, oldValue);
  7413. }
  7414. }
  7415. }
  7416. };
  7417. /**
  7418. * Evaluate the value of the watcher.
  7419. * This only gets called for lazy watchers.
  7420. */
  7421. Watcher.prototype.evaluate = function evaluate () {
  7422. this.value = this.get();
  7423. this.dirty = false;
  7424. };
  7425. /**
  7426. * Depend on all deps collected by this watcher.
  7427. */
  7428. Watcher.prototype.depend = function depend () {
  7429. var i = this.deps.length;
  7430. while (i--) {
  7431. this.deps[i].depend();
  7432. }
  7433. };
  7434. /**
  7435. * Remove self from all dependencies' subscriber list.
  7436. */
  7437. Watcher.prototype.teardown = function teardown () {
  7438. if (this.active) {
  7439. // remove self from vm's watcher list
  7440. // this is a somewhat expensive operation so we skip it
  7441. // if the vm is being destroyed.
  7442. if (!this.vm._isBeingDestroyed) {
  7443. remove(this.vm._watchers, this);
  7444. }
  7445. var i = this.deps.length;
  7446. while (i--) {
  7447. this.deps[i].removeSub(this);
  7448. }
  7449. this.active = false;
  7450. }
  7451. };
  7452. /* */
  7453. var sharedPropertyDefinition = {
  7454. enumerable: true,
  7455. configurable: true,
  7456. get: noop,
  7457. set: noop
  7458. };
  7459. function proxy (target, sourceKey, key) {
  7460. sharedPropertyDefinition.get = function proxyGetter () {
  7461. return this[sourceKey][key]
  7462. };
  7463. sharedPropertyDefinition.set = function proxySetter (val) {
  7464. this[sourceKey][key] = val;
  7465. };
  7466. Object.defineProperty(target, key, sharedPropertyDefinition);
  7467. }
  7468. function initState (vm) {
  7469. vm._watchers = [];
  7470. var opts = vm.$options;
  7471. if (opts.props) { initProps(vm, opts.props); }
  7472. if (opts.methods) { initMethods(vm, opts.methods); }
  7473. if (opts.data) {
  7474. initData(vm);
  7475. } else {
  7476. observe(vm._data = {}, true /* asRootData */);
  7477. }
  7478. if (opts.computed) { initComputed(vm, opts.computed); }
  7479. if (opts.watch && opts.watch !== nativeWatch) {
  7480. initWatch(vm, opts.watch);
  7481. }
  7482. }
  7483. function initProps (vm, propsOptions) {
  7484. var propsData = vm.$options.propsData || {};
  7485. var props = vm._props = {};
  7486. // cache prop keys so that future props updates can iterate using Array
  7487. // instead of dynamic object key enumeration.
  7488. var keys = vm.$options._propKeys = [];
  7489. var isRoot = !vm.$parent;
  7490. // root instance props should be converted
  7491. if (!isRoot) {
  7492. toggleObserving(false);
  7493. }
  7494. var loop = function ( key ) {
  7495. keys.push(key);
  7496. var value = validateProp(key, propsOptions, propsData, vm);
  7497. /* istanbul ignore else */
  7498. if (true) {
  7499. var hyphenatedKey = hyphenate(key);
  7500. if (isReservedAttribute(hyphenatedKey) ||
  7501. config.isReservedAttr(hyphenatedKey)) {
  7502. warn(
  7503. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7504. vm
  7505. );
  7506. }
  7507. defineReactive$$1(props, key, value, function () {
  7508. if (!isRoot && !isUpdatingChildComponent) {
  7509. {
  7510. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7511. return
  7512. }
  7513. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7514. if(
  7515. key === 'value' &&
  7516. Array.isArray(vm.$options.behaviors) &&
  7517. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7518. ){
  7519. return
  7520. }
  7521. if(vm._getFormData){
  7522. return
  7523. }
  7524. var $parent = vm.$parent;
  7525. while($parent){
  7526. if($parent.__next_tick_pending){
  7527. return
  7528. }
  7529. $parent = $parent.$parent;
  7530. }
  7531. }
  7532. warn(
  7533. "Avoid mutating a prop directly since the value will be " +
  7534. "overwritten whenever the parent component re-renders. " +
  7535. "Instead, use a data or computed property based on the prop's " +
  7536. "value. Prop being mutated: \"" + key + "\"",
  7537. vm
  7538. );
  7539. }
  7540. });
  7541. } else {}
  7542. // static props are already proxied on the component's prototype
  7543. // during Vue.extend(). We only need to proxy props defined at
  7544. // instantiation here.
  7545. if (!(key in vm)) {
  7546. proxy(vm, "_props", key);
  7547. }
  7548. };
  7549. for (var key in propsOptions) loop( key );
  7550. toggleObserving(true);
  7551. }
  7552. function initData (vm) {
  7553. var data = vm.$options.data;
  7554. data = vm._data = typeof data === 'function'
  7555. ? getData(data, vm)
  7556. : data || {};
  7557. if (!isPlainObject(data)) {
  7558. data = {};
  7559. true && warn(
  7560. 'data functions should return an object:\n' +
  7561. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7562. vm
  7563. );
  7564. }
  7565. // proxy data on instance
  7566. var keys = Object.keys(data);
  7567. var props = vm.$options.props;
  7568. var methods = vm.$options.methods;
  7569. var i = keys.length;
  7570. while (i--) {
  7571. var key = keys[i];
  7572. if (true) {
  7573. if (methods && hasOwn(methods, key)) {
  7574. warn(
  7575. ("Method \"" + key + "\" has already been defined as a data property."),
  7576. vm
  7577. );
  7578. }
  7579. }
  7580. if (props && hasOwn(props, key)) {
  7581. true && warn(
  7582. "The data property \"" + key + "\" is already declared as a prop. " +
  7583. "Use prop default value instead.",
  7584. vm
  7585. );
  7586. } else if (!isReserved(key)) {
  7587. proxy(vm, "_data", key);
  7588. }
  7589. }
  7590. // observe data
  7591. observe(data, true /* asRootData */);
  7592. }
  7593. function getData (data, vm) {
  7594. // #7573 disable dep collection when invoking data getters
  7595. pushTarget();
  7596. try {
  7597. return data.call(vm, vm)
  7598. } catch (e) {
  7599. handleError(e, vm, "data()");
  7600. return {}
  7601. } finally {
  7602. popTarget();
  7603. }
  7604. }
  7605. var computedWatcherOptions = { lazy: true };
  7606. function initComputed (vm, computed) {
  7607. // $flow-disable-line
  7608. var watchers = vm._computedWatchers = Object.create(null);
  7609. // computed properties are just getters during SSR
  7610. var isSSR = isServerRendering();
  7611. for (var key in computed) {
  7612. var userDef = computed[key];
  7613. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7614. if ( true && getter == null) {
  7615. warn(
  7616. ("Getter is missing for computed property \"" + key + "\"."),
  7617. vm
  7618. );
  7619. }
  7620. if (!isSSR) {
  7621. // create internal watcher for the computed property.
  7622. watchers[key] = new Watcher(
  7623. vm,
  7624. getter || noop,
  7625. noop,
  7626. computedWatcherOptions
  7627. );
  7628. }
  7629. // component-defined computed properties are already defined on the
  7630. // component prototype. We only need to define computed properties defined
  7631. // at instantiation here.
  7632. if (!(key in vm)) {
  7633. defineComputed(vm, key, userDef);
  7634. } else if (true) {
  7635. if (key in vm.$data) {
  7636. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7637. } else if (vm.$options.props && key in vm.$options.props) {
  7638. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7639. }
  7640. }
  7641. }
  7642. }
  7643. function defineComputed (
  7644. target,
  7645. key,
  7646. userDef
  7647. ) {
  7648. var shouldCache = !isServerRendering();
  7649. if (typeof userDef === 'function') {
  7650. sharedPropertyDefinition.get = shouldCache
  7651. ? createComputedGetter(key)
  7652. : createGetterInvoker(userDef);
  7653. sharedPropertyDefinition.set = noop;
  7654. } else {
  7655. sharedPropertyDefinition.get = userDef.get
  7656. ? shouldCache && userDef.cache !== false
  7657. ? createComputedGetter(key)
  7658. : createGetterInvoker(userDef.get)
  7659. : noop;
  7660. sharedPropertyDefinition.set = userDef.set || noop;
  7661. }
  7662. if ( true &&
  7663. sharedPropertyDefinition.set === noop) {
  7664. sharedPropertyDefinition.set = function () {
  7665. warn(
  7666. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7667. this
  7668. );
  7669. };
  7670. }
  7671. Object.defineProperty(target, key, sharedPropertyDefinition);
  7672. }
  7673. function createComputedGetter (key) {
  7674. return function computedGetter () {
  7675. var watcher = this._computedWatchers && this._computedWatchers[key];
  7676. if (watcher) {
  7677. if (watcher.dirty) {
  7678. watcher.evaluate();
  7679. }
  7680. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7681. watcher.depend();
  7682. }
  7683. return watcher.value
  7684. }
  7685. }
  7686. }
  7687. function createGetterInvoker(fn) {
  7688. return function computedGetter () {
  7689. return fn.call(this, this)
  7690. }
  7691. }
  7692. function initMethods (vm, methods) {
  7693. var props = vm.$options.props;
  7694. for (var key in methods) {
  7695. if (true) {
  7696. if (typeof methods[key] !== 'function') {
  7697. warn(
  7698. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7699. "Did you reference the function correctly?",
  7700. vm
  7701. );
  7702. }
  7703. if (props && hasOwn(props, key)) {
  7704. warn(
  7705. ("Method \"" + key + "\" has already been defined as a prop."),
  7706. vm
  7707. );
  7708. }
  7709. if ((key in vm) && isReserved(key)) {
  7710. warn(
  7711. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7712. "Avoid defining component methods that start with _ or $."
  7713. );
  7714. }
  7715. }
  7716. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7717. }
  7718. }
  7719. function initWatch (vm, watch) {
  7720. for (var key in watch) {
  7721. var handler = watch[key];
  7722. if (Array.isArray(handler)) {
  7723. for (var i = 0; i < handler.length; i++) {
  7724. createWatcher(vm, key, handler[i]);
  7725. }
  7726. } else {
  7727. createWatcher(vm, key, handler);
  7728. }
  7729. }
  7730. }
  7731. function createWatcher (
  7732. vm,
  7733. expOrFn,
  7734. handler,
  7735. options
  7736. ) {
  7737. if (isPlainObject(handler)) {
  7738. options = handler;
  7739. handler = handler.handler;
  7740. }
  7741. if (typeof handler === 'string') {
  7742. handler = vm[handler];
  7743. }
  7744. return vm.$watch(expOrFn, handler, options)
  7745. }
  7746. function stateMixin (Vue) {
  7747. // flow somehow has problems with directly declared definition object
  7748. // when using Object.defineProperty, so we have to procedurally build up
  7749. // the object here.
  7750. var dataDef = {};
  7751. dataDef.get = function () { return this._data };
  7752. var propsDef = {};
  7753. propsDef.get = function () { return this._props };
  7754. if (true) {
  7755. dataDef.set = function () {
  7756. warn(
  7757. 'Avoid replacing instance root $data. ' +
  7758. 'Use nested data properties instead.',
  7759. this
  7760. );
  7761. };
  7762. propsDef.set = function () {
  7763. warn("$props is readonly.", this);
  7764. };
  7765. }
  7766. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7767. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7768. Vue.prototype.$set = set;
  7769. Vue.prototype.$delete = del;
  7770. Vue.prototype.$watch = function (
  7771. expOrFn,
  7772. cb,
  7773. options
  7774. ) {
  7775. var vm = this;
  7776. if (isPlainObject(cb)) {
  7777. return createWatcher(vm, expOrFn, cb, options)
  7778. }
  7779. options = options || {};
  7780. options.user = true;
  7781. var watcher = new Watcher(vm, expOrFn, cb, options);
  7782. if (options.immediate) {
  7783. try {
  7784. cb.call(vm, watcher.value);
  7785. } catch (error) {
  7786. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7787. }
  7788. }
  7789. return function unwatchFn () {
  7790. watcher.teardown();
  7791. }
  7792. };
  7793. }
  7794. /* */
  7795. var uid$3 = 0;
  7796. function initMixin (Vue) {
  7797. Vue.prototype._init = function (options) {
  7798. var vm = this;
  7799. // a uid
  7800. vm._uid = uid$3++;
  7801. var startTag, endTag;
  7802. /* istanbul ignore if */
  7803. if ( true && config.performance && mark) {
  7804. startTag = "vue-perf-start:" + (vm._uid);
  7805. endTag = "vue-perf-end:" + (vm._uid);
  7806. mark(startTag);
  7807. }
  7808. // a flag to avoid this being observed
  7809. vm._isVue = true;
  7810. // merge options
  7811. if (options && options._isComponent) {
  7812. // optimize internal component instantiation
  7813. // since dynamic options merging is pretty slow, and none of the
  7814. // internal component options needs special treatment.
  7815. initInternalComponent(vm, options);
  7816. } else {
  7817. vm.$options = mergeOptions(
  7818. resolveConstructorOptions(vm.constructor),
  7819. options || {},
  7820. vm
  7821. );
  7822. }
  7823. /* istanbul ignore else */
  7824. if (true) {
  7825. initProxy(vm);
  7826. } else {}
  7827. // expose real self
  7828. vm._self = vm;
  7829. initLifecycle(vm);
  7830. initEvents(vm);
  7831. initRender(vm);
  7832. callHook(vm, 'beforeCreate');
  7833. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7834. initState(vm);
  7835. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7836. !vm._$fallback && callHook(vm, 'created');
  7837. /* istanbul ignore if */
  7838. if ( true && config.performance && mark) {
  7839. vm._name = formatComponentName(vm, false);
  7840. mark(endTag);
  7841. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7842. }
  7843. if (vm.$options.el) {
  7844. vm.$mount(vm.$options.el);
  7845. }
  7846. };
  7847. }
  7848. function initInternalComponent (vm, options) {
  7849. var opts = vm.$options = Object.create(vm.constructor.options);
  7850. // doing this because it's faster than dynamic enumeration.
  7851. var parentVnode = options._parentVnode;
  7852. opts.parent = options.parent;
  7853. opts._parentVnode = parentVnode;
  7854. var vnodeComponentOptions = parentVnode.componentOptions;
  7855. opts.propsData = vnodeComponentOptions.propsData;
  7856. opts._parentListeners = vnodeComponentOptions.listeners;
  7857. opts._renderChildren = vnodeComponentOptions.children;
  7858. opts._componentTag = vnodeComponentOptions.tag;
  7859. if (options.render) {
  7860. opts.render = options.render;
  7861. opts.staticRenderFns = options.staticRenderFns;
  7862. }
  7863. }
  7864. function resolveConstructorOptions (Ctor) {
  7865. var options = Ctor.options;
  7866. if (Ctor.super) {
  7867. var superOptions = resolveConstructorOptions(Ctor.super);
  7868. var cachedSuperOptions = Ctor.superOptions;
  7869. if (superOptions !== cachedSuperOptions) {
  7870. // super option changed,
  7871. // need to resolve new options.
  7872. Ctor.superOptions = superOptions;
  7873. // check if there are any late-modified/attached options (#4976)
  7874. var modifiedOptions = resolveModifiedOptions(Ctor);
  7875. // update base extend options
  7876. if (modifiedOptions) {
  7877. extend(Ctor.extendOptions, modifiedOptions);
  7878. }
  7879. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7880. if (options.name) {
  7881. options.components[options.name] = Ctor;
  7882. }
  7883. }
  7884. }
  7885. return options
  7886. }
  7887. function resolveModifiedOptions (Ctor) {
  7888. var modified;
  7889. var latest = Ctor.options;
  7890. var sealed = Ctor.sealedOptions;
  7891. for (var key in latest) {
  7892. if (latest[key] !== sealed[key]) {
  7893. if (!modified) { modified = {}; }
  7894. modified[key] = latest[key];
  7895. }
  7896. }
  7897. return modified
  7898. }
  7899. function Vue (options) {
  7900. if ( true &&
  7901. !(this instanceof Vue)
  7902. ) {
  7903. warn('Vue is a constructor and should be called with the `new` keyword');
  7904. }
  7905. this._init(options);
  7906. }
  7907. initMixin(Vue);
  7908. stateMixin(Vue);
  7909. eventsMixin(Vue);
  7910. lifecycleMixin(Vue);
  7911. renderMixin(Vue);
  7912. /* */
  7913. function initUse (Vue) {
  7914. Vue.use = function (plugin) {
  7915. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7916. if (installedPlugins.indexOf(plugin) > -1) {
  7917. return this
  7918. }
  7919. // additional parameters
  7920. var args = toArray(arguments, 1);
  7921. args.unshift(this);
  7922. if (typeof plugin.install === 'function') {
  7923. plugin.install.apply(plugin, args);
  7924. } else if (typeof plugin === 'function') {
  7925. plugin.apply(null, args);
  7926. }
  7927. installedPlugins.push(plugin);
  7928. return this
  7929. };
  7930. }
  7931. /* */
  7932. function initMixin$1 (Vue) {
  7933. Vue.mixin = function (mixin) {
  7934. this.options = mergeOptions(this.options, mixin);
  7935. return this
  7936. };
  7937. }
  7938. /* */
  7939. function initExtend (Vue) {
  7940. /**
  7941. * Each instance constructor, including Vue, has a unique
  7942. * cid. This enables us to create wrapped "child
  7943. * constructors" for prototypal inheritance and cache them.
  7944. */
  7945. Vue.cid = 0;
  7946. var cid = 1;
  7947. /**
  7948. * Class inheritance
  7949. */
  7950. Vue.extend = function (extendOptions) {
  7951. extendOptions = extendOptions || {};
  7952. var Super = this;
  7953. var SuperId = Super.cid;
  7954. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7955. if (cachedCtors[SuperId]) {
  7956. return cachedCtors[SuperId]
  7957. }
  7958. var name = extendOptions.name || Super.options.name;
  7959. if ( true && name) {
  7960. validateComponentName(name);
  7961. }
  7962. var Sub = function VueComponent (options) {
  7963. this._init(options);
  7964. };
  7965. Sub.prototype = Object.create(Super.prototype);
  7966. Sub.prototype.constructor = Sub;
  7967. Sub.cid = cid++;
  7968. Sub.options = mergeOptions(
  7969. Super.options,
  7970. extendOptions
  7971. );
  7972. Sub['super'] = Super;
  7973. // For props and computed properties, we define the proxy getters on
  7974. // the Vue instances at extension time, on the extended prototype. This
  7975. // avoids Object.defineProperty calls for each instance created.
  7976. if (Sub.options.props) {
  7977. initProps$1(Sub);
  7978. }
  7979. if (Sub.options.computed) {
  7980. initComputed$1(Sub);
  7981. }
  7982. // allow further extension/mixin/plugin usage
  7983. Sub.extend = Super.extend;
  7984. Sub.mixin = Super.mixin;
  7985. Sub.use = Super.use;
  7986. // create asset registers, so extended classes
  7987. // can have their private assets too.
  7988. ASSET_TYPES.forEach(function (type) {
  7989. Sub[type] = Super[type];
  7990. });
  7991. // enable recursive self-lookup
  7992. if (name) {
  7993. Sub.options.components[name] = Sub;
  7994. }
  7995. // keep a reference to the super options at extension time.
  7996. // later at instantiation we can check if Super's options have
  7997. // been updated.
  7998. Sub.superOptions = Super.options;
  7999. Sub.extendOptions = extendOptions;
  8000. Sub.sealedOptions = extend({}, Sub.options);
  8001. // cache constructor
  8002. cachedCtors[SuperId] = Sub;
  8003. return Sub
  8004. };
  8005. }
  8006. function initProps$1 (Comp) {
  8007. var props = Comp.options.props;
  8008. for (var key in props) {
  8009. proxy(Comp.prototype, "_props", key);
  8010. }
  8011. }
  8012. function initComputed$1 (Comp) {
  8013. var computed = Comp.options.computed;
  8014. for (var key in computed) {
  8015. defineComputed(Comp.prototype, key, computed[key]);
  8016. }
  8017. }
  8018. /* */
  8019. function initAssetRegisters (Vue) {
  8020. /**
  8021. * Create asset registration methods.
  8022. */
  8023. ASSET_TYPES.forEach(function (type) {
  8024. Vue[type] = function (
  8025. id,
  8026. definition
  8027. ) {
  8028. if (!definition) {
  8029. return this.options[type + 's'][id]
  8030. } else {
  8031. /* istanbul ignore if */
  8032. if ( true && type === 'component') {
  8033. validateComponentName(id);
  8034. }
  8035. if (type === 'component' && isPlainObject(definition)) {
  8036. definition.name = definition.name || id;
  8037. definition = this.options._base.extend(definition);
  8038. }
  8039. if (type === 'directive' && typeof definition === 'function') {
  8040. definition = { bind: definition, update: definition };
  8041. }
  8042. this.options[type + 's'][id] = definition;
  8043. return definition
  8044. }
  8045. };
  8046. });
  8047. }
  8048. /* */
  8049. function getComponentName (opts) {
  8050. return opts && (opts.Ctor.options.name || opts.tag)
  8051. }
  8052. function matches (pattern, name) {
  8053. if (Array.isArray(pattern)) {
  8054. return pattern.indexOf(name) > -1
  8055. } else if (typeof pattern === 'string') {
  8056. return pattern.split(',').indexOf(name) > -1
  8057. } else if (isRegExp(pattern)) {
  8058. return pattern.test(name)
  8059. }
  8060. /* istanbul ignore next */
  8061. return false
  8062. }
  8063. function pruneCache (keepAliveInstance, filter) {
  8064. var cache = keepAliveInstance.cache;
  8065. var keys = keepAliveInstance.keys;
  8066. var _vnode = keepAliveInstance._vnode;
  8067. for (var key in cache) {
  8068. var cachedNode = cache[key];
  8069. if (cachedNode) {
  8070. var name = getComponentName(cachedNode.componentOptions);
  8071. if (name && !filter(name)) {
  8072. pruneCacheEntry(cache, key, keys, _vnode);
  8073. }
  8074. }
  8075. }
  8076. }
  8077. function pruneCacheEntry (
  8078. cache,
  8079. key,
  8080. keys,
  8081. current
  8082. ) {
  8083. var cached$$1 = cache[key];
  8084. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8085. cached$$1.componentInstance.$destroy();
  8086. }
  8087. cache[key] = null;
  8088. remove(keys, key);
  8089. }
  8090. var patternTypes = [String, RegExp, Array];
  8091. var KeepAlive = {
  8092. name: 'keep-alive',
  8093. abstract: true,
  8094. props: {
  8095. include: patternTypes,
  8096. exclude: patternTypes,
  8097. max: [String, Number]
  8098. },
  8099. created: function created () {
  8100. this.cache = Object.create(null);
  8101. this.keys = [];
  8102. },
  8103. destroyed: function destroyed () {
  8104. for (var key in this.cache) {
  8105. pruneCacheEntry(this.cache, key, this.keys);
  8106. }
  8107. },
  8108. mounted: function mounted () {
  8109. var this$1 = this;
  8110. this.$watch('include', function (val) {
  8111. pruneCache(this$1, function (name) { return matches(val, name); });
  8112. });
  8113. this.$watch('exclude', function (val) {
  8114. pruneCache(this$1, function (name) { return !matches(val, name); });
  8115. });
  8116. },
  8117. render: function render () {
  8118. var slot = this.$slots.default;
  8119. var vnode = getFirstComponentChild(slot);
  8120. var componentOptions = vnode && vnode.componentOptions;
  8121. if (componentOptions) {
  8122. // check pattern
  8123. var name = getComponentName(componentOptions);
  8124. var ref = this;
  8125. var include = ref.include;
  8126. var exclude = ref.exclude;
  8127. if (
  8128. // not included
  8129. (include && (!name || !matches(include, name))) ||
  8130. // excluded
  8131. (exclude && name && matches(exclude, name))
  8132. ) {
  8133. return vnode
  8134. }
  8135. var ref$1 = this;
  8136. var cache = ref$1.cache;
  8137. var keys = ref$1.keys;
  8138. var key = vnode.key == null
  8139. // same constructor may get registered as different local components
  8140. // so cid alone is not enough (#3269)
  8141. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8142. : vnode.key;
  8143. if (cache[key]) {
  8144. vnode.componentInstance = cache[key].componentInstance;
  8145. // make current key freshest
  8146. remove(keys, key);
  8147. keys.push(key);
  8148. } else {
  8149. cache[key] = vnode;
  8150. keys.push(key);
  8151. // prune oldest entry
  8152. if (this.max && keys.length > parseInt(this.max)) {
  8153. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8154. }
  8155. }
  8156. vnode.data.keepAlive = true;
  8157. }
  8158. return vnode || (slot && slot[0])
  8159. }
  8160. };
  8161. var builtInComponents = {
  8162. KeepAlive: KeepAlive
  8163. };
  8164. /* */
  8165. function initGlobalAPI (Vue) {
  8166. // config
  8167. var configDef = {};
  8168. configDef.get = function () { return config; };
  8169. if (true) {
  8170. configDef.set = function () {
  8171. warn(
  8172. 'Do not replace the Vue.config object, set individual fields instead.'
  8173. );
  8174. };
  8175. }
  8176. Object.defineProperty(Vue, 'config', configDef);
  8177. // exposed util methods.
  8178. // NOTE: these are not considered part of the public API - avoid relying on
  8179. // them unless you are aware of the risk.
  8180. Vue.util = {
  8181. warn: warn,
  8182. extend: extend,
  8183. mergeOptions: mergeOptions,
  8184. defineReactive: defineReactive$$1
  8185. };
  8186. Vue.set = set;
  8187. Vue.delete = del;
  8188. Vue.nextTick = nextTick;
  8189. // 2.6 explicit observable API
  8190. Vue.observable = function (obj) {
  8191. observe(obj);
  8192. return obj
  8193. };
  8194. Vue.options = Object.create(null);
  8195. ASSET_TYPES.forEach(function (type) {
  8196. Vue.options[type + 's'] = Object.create(null);
  8197. });
  8198. // this is used to identify the "base" constructor to extend all plain-object
  8199. // components with in Weex's multi-instance scenarios.
  8200. Vue.options._base = Vue;
  8201. extend(Vue.options.components, builtInComponents);
  8202. initUse(Vue);
  8203. initMixin$1(Vue);
  8204. initExtend(Vue);
  8205. initAssetRegisters(Vue);
  8206. }
  8207. initGlobalAPI(Vue);
  8208. Object.defineProperty(Vue.prototype, '$isServer', {
  8209. get: isServerRendering
  8210. });
  8211. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8212. get: function get () {
  8213. /* istanbul ignore next */
  8214. return this.$vnode && this.$vnode.ssrContext
  8215. }
  8216. });
  8217. // expose FunctionalRenderContext for ssr runtime helper installation
  8218. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8219. value: FunctionalRenderContext
  8220. });
  8221. Vue.version = '2.6.11';
  8222. /**
  8223. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8224. */
  8225. var ARRAYTYPE = '[object Array]';
  8226. var OBJECTTYPE = '[object Object]';
  8227. var NULLTYPE = '[object Null]';
  8228. var UNDEFINEDTYPE = '[object Undefined]';
  8229. // const FUNCTIONTYPE = '[object Function]'
  8230. function diff(current, pre) {
  8231. var result = {};
  8232. syncKeys(current, pre);
  8233. _diff(current, pre, '', result);
  8234. return result
  8235. }
  8236. function syncKeys(current, pre) {
  8237. if (current === pre) { return }
  8238. var rootCurrentType = type(current);
  8239. var rootPreType = type(pre);
  8240. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8241. if(Object.keys(current).length >= Object.keys(pre).length){
  8242. for (var key in pre) {
  8243. var currentValue = current[key];
  8244. if (currentValue === undefined) {
  8245. current[key] = null;
  8246. } else {
  8247. syncKeys(currentValue, pre[key]);
  8248. }
  8249. }
  8250. }
  8251. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8252. if (current.length >= pre.length) {
  8253. pre.forEach(function (item, index) {
  8254. syncKeys(current[index], item);
  8255. });
  8256. }
  8257. }
  8258. }
  8259. function nullOrUndefined(currentType, preType) {
  8260. if(
  8261. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8262. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8263. ) {
  8264. return false
  8265. }
  8266. return true
  8267. }
  8268. function _diff(current, pre, path, result) {
  8269. if (current === pre) { return }
  8270. var rootCurrentType = type(current);
  8271. var rootPreType = type(pre);
  8272. if (rootCurrentType == OBJECTTYPE) {
  8273. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8274. setResult(result, path, current);
  8275. } else {
  8276. var loop = function ( key ) {
  8277. var currentValue = current[key];
  8278. var preValue = pre[key];
  8279. var currentType = type(currentValue);
  8280. var preType = type(preValue);
  8281. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8282. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8283. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8284. }
  8285. } else if (currentType == ARRAYTYPE) {
  8286. if (preType != ARRAYTYPE) {
  8287. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8288. } else {
  8289. if (currentValue.length < preValue.length) {
  8290. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8291. } else {
  8292. currentValue.forEach(function (item, index) {
  8293. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8294. });
  8295. }
  8296. }
  8297. } else if (currentType == OBJECTTYPE) {
  8298. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8299. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8300. } else {
  8301. for (var subKey in currentValue) {
  8302. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8303. }
  8304. }
  8305. }
  8306. };
  8307. for (var key in current) loop( key );
  8308. }
  8309. } else if (rootCurrentType == ARRAYTYPE) {
  8310. if (rootPreType != ARRAYTYPE) {
  8311. setResult(result, path, current);
  8312. } else {
  8313. if (current.length < pre.length) {
  8314. setResult(result, path, current);
  8315. } else {
  8316. current.forEach(function (item, index) {
  8317. _diff(item, pre[index], path + '[' + index + ']', result);
  8318. });
  8319. }
  8320. }
  8321. } else {
  8322. setResult(result, path, current);
  8323. }
  8324. }
  8325. function setResult(result, k, v) {
  8326. // if (type(v) != FUNCTIONTYPE) {
  8327. result[k] = v;
  8328. // }
  8329. }
  8330. function type(obj) {
  8331. return Object.prototype.toString.call(obj)
  8332. }
  8333. /* */
  8334. function flushCallbacks$1(vm) {
  8335. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8336. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"uniapp-template","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8337. var mpInstance = vm.$scope;
  8338. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8339. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8340. }
  8341. var copies = vm.__next_tick_callbacks.slice(0);
  8342. vm.__next_tick_callbacks.length = 0;
  8343. for (var i = 0; i < copies.length; i++) {
  8344. copies[i]();
  8345. }
  8346. }
  8347. }
  8348. function hasRenderWatcher(vm) {
  8349. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8350. }
  8351. function nextTick$1(vm, cb) {
  8352. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8353. //2.nextTick 之前存在 render watcher
  8354. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8355. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"uniapp-template","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8356. var mpInstance = vm.$scope;
  8357. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8358. ']:nextVueTick');
  8359. }
  8360. return nextTick(cb, vm)
  8361. }else{
  8362. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"uniapp-template","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8363. var mpInstance$1 = vm.$scope;
  8364. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8365. ']:nextMPTick');
  8366. }
  8367. }
  8368. var _resolve;
  8369. if (!vm.__next_tick_callbacks) {
  8370. vm.__next_tick_callbacks = [];
  8371. }
  8372. vm.__next_tick_callbacks.push(function () {
  8373. if (cb) {
  8374. try {
  8375. cb.call(vm);
  8376. } catch (e) {
  8377. handleError(e, vm, 'nextTick');
  8378. }
  8379. } else if (_resolve) {
  8380. _resolve(vm);
  8381. }
  8382. });
  8383. // $flow-disable-line
  8384. if (!cb && typeof Promise !== 'undefined') {
  8385. return new Promise(function (resolve) {
  8386. _resolve = resolve;
  8387. })
  8388. }
  8389. }
  8390. /* */
  8391. function clearInstance(key, value) {
  8392. // 简易去除 Vue 和小程序组件实例
  8393. if (value) {
  8394. if (value._isVue || value.__v_isMPComponent) {
  8395. return {}
  8396. }
  8397. }
  8398. return value
  8399. }
  8400. function cloneWithData(vm) {
  8401. // 确保当前 vm 所有数据被同步
  8402. var ret = Object.create(null);
  8403. var dataKeys = [].concat(
  8404. Object.keys(vm._data || {}),
  8405. Object.keys(vm._computedWatchers || {}));
  8406. dataKeys.reduce(function(ret, key) {
  8407. ret[key] = vm[key];
  8408. return ret
  8409. }, ret);
  8410. // vue-composition-api
  8411. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8412. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8413. if (rawBindings) {
  8414. Object.keys(rawBindings).forEach(function (key) {
  8415. ret[key] = vm[key];
  8416. });
  8417. }
  8418. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8419. Object.assign(ret, vm.$mp.data || {});
  8420. if (
  8421. Array.isArray(vm.$options.behaviors) &&
  8422. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8423. ) { //form-field
  8424. ret['name'] = vm.name;
  8425. ret['value'] = vm.value;
  8426. }
  8427. return JSON.parse(JSON.stringify(ret, clearInstance))
  8428. }
  8429. var patch = function(oldVnode, vnode) {
  8430. var this$1 = this;
  8431. if (vnode === null) { //destroy
  8432. return
  8433. }
  8434. if (this.mpType === 'page' || this.mpType === 'component') {
  8435. var mpInstance = this.$scope;
  8436. var data = Object.create(null);
  8437. try {
  8438. data = cloneWithData(this);
  8439. } catch (err) {
  8440. console.error(err);
  8441. }
  8442. data.__webviewId__ = mpInstance.data.__webviewId__;
  8443. var mpData = Object.create(null);
  8444. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8445. mpData[key] = mpInstance.data[key];
  8446. });
  8447. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8448. if (Object.keys(diffData).length) {
  8449. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"uniapp-template","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8450. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8451. ']差量更新',
  8452. JSON.stringify(diffData));
  8453. }
  8454. this.__next_tick_pending = true;
  8455. mpInstance.setData(diffData, function () {
  8456. this$1.__next_tick_pending = false;
  8457. flushCallbacks$1(this$1);
  8458. });
  8459. } else {
  8460. flushCallbacks$1(this);
  8461. }
  8462. }
  8463. };
  8464. /* */
  8465. function createEmptyRender() {
  8466. }
  8467. function mountComponent$1(
  8468. vm,
  8469. el,
  8470. hydrating
  8471. ) {
  8472. if (!vm.mpType) {//main.js 中的 new Vue
  8473. return vm
  8474. }
  8475. if (vm.mpType === 'app') {
  8476. vm.$options.render = createEmptyRender;
  8477. }
  8478. if (!vm.$options.render) {
  8479. vm.$options.render = createEmptyRender;
  8480. if (true) {
  8481. /* istanbul ignore if */
  8482. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8483. vm.$options.el || el) {
  8484. warn(
  8485. 'You are using the runtime-only build of Vue where the template ' +
  8486. 'compiler is not available. Either pre-compile the templates into ' +
  8487. 'render functions, or use the compiler-included build.',
  8488. vm
  8489. );
  8490. } else {
  8491. warn(
  8492. 'Failed to mount component: template or render function not defined.',
  8493. vm
  8494. );
  8495. }
  8496. }
  8497. }
  8498. !vm._$fallback && callHook(vm, 'beforeMount');
  8499. var updateComponent = function () {
  8500. vm._update(vm._render(), hydrating);
  8501. };
  8502. // we set this to vm._watcher inside the watcher's constructor
  8503. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8504. // component's mounted hook), which relies on vm._watcher being already defined
  8505. new Watcher(vm, updateComponent, noop, {
  8506. before: function before() {
  8507. if (vm._isMounted && !vm._isDestroyed) {
  8508. callHook(vm, 'beforeUpdate');
  8509. }
  8510. }
  8511. }, true /* isRenderWatcher */);
  8512. hydrating = false;
  8513. return vm
  8514. }
  8515. /* */
  8516. function renderClass (
  8517. staticClass,
  8518. dynamicClass
  8519. ) {
  8520. if (isDef(staticClass) || isDef(dynamicClass)) {
  8521. return concat(staticClass, stringifyClass(dynamicClass))
  8522. }
  8523. /* istanbul ignore next */
  8524. return ''
  8525. }
  8526. function concat (a, b) {
  8527. return a ? b ? (a + ' ' + b) : a : (b || '')
  8528. }
  8529. function stringifyClass (value) {
  8530. if (Array.isArray(value)) {
  8531. return stringifyArray(value)
  8532. }
  8533. if (isObject(value)) {
  8534. return stringifyObject(value)
  8535. }
  8536. if (typeof value === 'string') {
  8537. return value
  8538. }
  8539. /* istanbul ignore next */
  8540. return ''
  8541. }
  8542. function stringifyArray (value) {
  8543. var res = '';
  8544. var stringified;
  8545. for (var i = 0, l = value.length; i < l; i++) {
  8546. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8547. if (res) { res += ' '; }
  8548. res += stringified;
  8549. }
  8550. }
  8551. return res
  8552. }
  8553. function stringifyObject (value) {
  8554. var res = '';
  8555. for (var key in value) {
  8556. if (value[key]) {
  8557. if (res) { res += ' '; }
  8558. res += key;
  8559. }
  8560. }
  8561. return res
  8562. }
  8563. /* */
  8564. var parseStyleText = cached(function (cssText) {
  8565. var res = {};
  8566. var listDelimiter = /;(?![^(]*\))/g;
  8567. var propertyDelimiter = /:(.+)/;
  8568. cssText.split(listDelimiter).forEach(function (item) {
  8569. if (item) {
  8570. var tmp = item.split(propertyDelimiter);
  8571. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8572. }
  8573. });
  8574. return res
  8575. });
  8576. // normalize possible array / string values into Object
  8577. function normalizeStyleBinding (bindingStyle) {
  8578. if (Array.isArray(bindingStyle)) {
  8579. return toObject(bindingStyle)
  8580. }
  8581. if (typeof bindingStyle === 'string') {
  8582. return parseStyleText(bindingStyle)
  8583. }
  8584. return bindingStyle
  8585. }
  8586. /* */
  8587. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8588. function getTarget(obj, path) {
  8589. var parts = path.split('.');
  8590. var key = parts[0];
  8591. if (key.indexOf('__$n') === 0) { //number index
  8592. key = parseInt(key.replace('__$n', ''));
  8593. }
  8594. if (parts.length === 1) {
  8595. return obj[key]
  8596. }
  8597. return getTarget(obj[key], parts.slice(1).join('.'))
  8598. }
  8599. function internalMixin(Vue) {
  8600. Vue.config.errorHandler = function(err, vm, info) {
  8601. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8602. console.error(err);
  8603. /* eslint-disable no-undef */
  8604. var app = typeof getApp === 'function' && getApp();
  8605. if (app && app.onError) {
  8606. app.onError(err);
  8607. }
  8608. };
  8609. var oldEmit = Vue.prototype.$emit;
  8610. Vue.prototype.$emit = function(event) {
  8611. if (this.$scope && event) {
  8612. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8613. if (triggerEvent) {
  8614. try {
  8615. triggerEvent.call(this.$scope, event, {
  8616. __args__: toArray(arguments, 1)
  8617. });
  8618. } catch (error) {
  8619. }
  8620. }
  8621. }
  8622. return oldEmit.apply(this, arguments)
  8623. };
  8624. Vue.prototype.$nextTick = function(fn) {
  8625. return nextTick$1(this, fn)
  8626. };
  8627. MP_METHODS.forEach(function (method) {
  8628. Vue.prototype[method] = function(args) {
  8629. if (this.$scope && this.$scope[method]) {
  8630. return this.$scope[method](args)
  8631. }
  8632. // mp-alipay
  8633. if (typeof my === 'undefined') {
  8634. return
  8635. }
  8636. if (method === 'createSelectorQuery') {
  8637. /* eslint-disable no-undef */
  8638. return my.createSelectorQuery(args)
  8639. } else if (method === 'createIntersectionObserver') {
  8640. /* eslint-disable no-undef */
  8641. return my.createIntersectionObserver(args)
  8642. }
  8643. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8644. };
  8645. });
  8646. Vue.prototype.__init_provide = initProvide;
  8647. Vue.prototype.__init_injections = initInjections;
  8648. Vue.prototype.__call_hook = function(hook, args) {
  8649. var vm = this;
  8650. // #7573 disable dep collection when invoking lifecycle hooks
  8651. pushTarget();
  8652. var handlers = vm.$options[hook];
  8653. var info = hook + " hook";
  8654. var ret;
  8655. if (handlers) {
  8656. for (var i = 0, j = handlers.length; i < j; i++) {
  8657. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8658. }
  8659. }
  8660. if (vm._hasHookEvent) {
  8661. vm.$emit('hook:' + hook, args);
  8662. }
  8663. popTarget();
  8664. return ret
  8665. };
  8666. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8667. if (Array.isArray(modifiers)) {
  8668. if (modifiers.indexOf('trim') !== -1) {
  8669. value = value.trim();
  8670. }
  8671. if (modifiers.indexOf('number') !== -1) {
  8672. value = this._n(value);
  8673. }
  8674. }
  8675. if (!target) {
  8676. target = this;
  8677. }
  8678. // 解决动态属性添加
  8679. Vue.set(target, key, value);
  8680. };
  8681. Vue.prototype.__set_sync = function(target, key, value) {
  8682. if (!target) {
  8683. target = this;
  8684. }
  8685. // 解决动态属性添加
  8686. Vue.set(target, key, value);
  8687. };
  8688. Vue.prototype.__get_orig = function(item) {
  8689. if (isPlainObject(item)) {
  8690. return item['$orig'] || item
  8691. }
  8692. return item
  8693. };
  8694. Vue.prototype.__get_value = function(dataPath, target) {
  8695. return getTarget(target || this, dataPath)
  8696. };
  8697. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8698. return renderClass(staticClass, dynamicClass)
  8699. };
  8700. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8701. if (!dynamicStyle && !staticStyle) {
  8702. return ''
  8703. }
  8704. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8705. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8706. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8707. };
  8708. Vue.prototype.__map = function(val, iteratee) {
  8709. //TODO 暂不考虑 string
  8710. var ret, i, l, keys, key;
  8711. if (Array.isArray(val)) {
  8712. ret = new Array(val.length);
  8713. for (i = 0, l = val.length; i < l; i++) {
  8714. ret[i] = iteratee(val[i], i);
  8715. }
  8716. return ret
  8717. } else if (isObject(val)) {
  8718. keys = Object.keys(val);
  8719. ret = Object.create(null);
  8720. for (i = 0, l = keys.length; i < l; i++) {
  8721. key = keys[i];
  8722. ret[key] = iteratee(val[key], key, i);
  8723. }
  8724. return ret
  8725. } else if (typeof val === 'number') {
  8726. ret = new Array(val);
  8727. for (i = 0, l = val; i < l; i++) {
  8728. // 第一个参数暂时仍和小程序一致
  8729. ret[i] = iteratee(i, i);
  8730. }
  8731. return ret
  8732. }
  8733. return []
  8734. };
  8735. }
  8736. /* */
  8737. var LIFECYCLE_HOOKS$1 = [
  8738. //App
  8739. 'onLaunch',
  8740. 'onShow',
  8741. 'onHide',
  8742. 'onUniNViewMessage',
  8743. 'onPageNotFound',
  8744. 'onThemeChange',
  8745. 'onError',
  8746. 'onUnhandledRejection',
  8747. //Page
  8748. 'onInit',
  8749. 'onLoad',
  8750. // 'onShow',
  8751. 'onReady',
  8752. // 'onHide',
  8753. 'onUnload',
  8754. 'onPullDownRefresh',
  8755. 'onReachBottom',
  8756. 'onTabItemTap',
  8757. 'onAddToFavorites',
  8758. 'onShareTimeline',
  8759. 'onShareAppMessage',
  8760. 'onResize',
  8761. 'onPageScroll',
  8762. 'onNavigationBarButtonTap',
  8763. 'onBackPress',
  8764. 'onNavigationBarSearchInputChanged',
  8765. 'onNavigationBarSearchInputConfirmed',
  8766. 'onNavigationBarSearchInputClicked',
  8767. 'onUploadDouyinVideo',
  8768. 'onNFCReadMessage',
  8769. //Component
  8770. // 'onReady', // 兼容旧版本,应该移除该事件
  8771. 'onPageShow',
  8772. 'onPageHide',
  8773. 'onPageResize'
  8774. ];
  8775. function lifecycleMixin$1(Vue) {
  8776. //fixed vue-class-component
  8777. var oldExtend = Vue.extend;
  8778. Vue.extend = function(extendOptions) {
  8779. extendOptions = extendOptions || {};
  8780. var methods = extendOptions.methods;
  8781. if (methods) {
  8782. Object.keys(methods).forEach(function (methodName) {
  8783. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8784. extendOptions[methodName] = methods[methodName];
  8785. delete methods[methodName];
  8786. }
  8787. });
  8788. }
  8789. return oldExtend.call(this, extendOptions)
  8790. };
  8791. var strategies = Vue.config.optionMergeStrategies;
  8792. var mergeHook = strategies.created;
  8793. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8794. strategies[hook] = mergeHook;
  8795. });
  8796. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8797. }
  8798. /* */
  8799. // install platform patch function
  8800. Vue.prototype.__patch__ = patch;
  8801. // public mount method
  8802. Vue.prototype.$mount = function(
  8803. el ,
  8804. hydrating
  8805. ) {
  8806. return mountComponent$1(this, el, hydrating)
  8807. };
  8808. lifecycleMixin$1(Vue);
  8809. internalMixin(Vue);
  8810. /* */
  8811. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8812. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8813. /***/ }),
  8814. /* 26 */
  8815. /*!****************************************************************************!*\
  8816. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/pages.json ***!
  8817. \****************************************************************************/
  8818. /*! no static exports found */
  8819. /***/ (function(module, exports) {
  8820. /***/ }),
  8821. /* 27 */,
  8822. /* 28 */,
  8823. /* 29 */,
  8824. /* 30 */,
  8825. /* 31 */,
  8826. /* 32 */
  8827. /*!**********************************************************************************************************!*\
  8828. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  8829. \**********************************************************************************************************/
  8830. /*! exports provided: default */
  8831. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8832. "use strict";
  8833. __webpack_require__.r(__webpack_exports__);
  8834. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  8835. /* globals __VUE_SSR_CONTEXT__ */
  8836. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  8837. // This module is a runtime utility for cleaner component module output and will
  8838. // be included in the final webpack user bundle.
  8839. function normalizeComponent (
  8840. scriptExports,
  8841. render,
  8842. staticRenderFns,
  8843. functionalTemplate,
  8844. injectStyles,
  8845. scopeId,
  8846. moduleIdentifier, /* server only */
  8847. shadowMode, /* vue-cli only */
  8848. components, // fixed by xxxxxx auto components
  8849. renderjs // fixed by xxxxxx renderjs
  8850. ) {
  8851. // Vue.extend constructor export interop
  8852. var options = typeof scriptExports === 'function'
  8853. ? scriptExports.options
  8854. : scriptExports
  8855. // fixed by xxxxxx auto components
  8856. if (components) {
  8857. if (!options.components) {
  8858. options.components = {}
  8859. }
  8860. var hasOwn = Object.prototype.hasOwnProperty
  8861. for (var name in components) {
  8862. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  8863. options.components[name] = components[name]
  8864. }
  8865. }
  8866. }
  8867. // fixed by xxxxxx renderjs
  8868. if (renderjs) {
  8869. if(typeof renderjs.beforeCreate === 'function'){
  8870. renderjs.beforeCreate = [renderjs.beforeCreate]
  8871. }
  8872. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  8873. this[renderjs.__module] = this
  8874. });
  8875. (options.mixins || (options.mixins = [])).push(renderjs)
  8876. }
  8877. // render functions
  8878. if (render) {
  8879. options.render = render
  8880. options.staticRenderFns = staticRenderFns
  8881. options._compiled = true
  8882. }
  8883. // functional template
  8884. if (functionalTemplate) {
  8885. options.functional = true
  8886. }
  8887. // scopedId
  8888. if (scopeId) {
  8889. options._scopeId = 'data-v-' + scopeId
  8890. }
  8891. var hook
  8892. if (moduleIdentifier) { // server build
  8893. hook = function (context) {
  8894. // 2.3 injection
  8895. context =
  8896. context || // cached call
  8897. (this.$vnode && this.$vnode.ssrContext) || // stateful
  8898. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  8899. // 2.2 with runInNewContext: true
  8900. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  8901. context = __VUE_SSR_CONTEXT__
  8902. }
  8903. // inject component styles
  8904. if (injectStyles) {
  8905. injectStyles.call(this, context)
  8906. }
  8907. // register component module identifier for async chunk inferrence
  8908. if (context && context._registeredComponents) {
  8909. context._registeredComponents.add(moduleIdentifier)
  8910. }
  8911. }
  8912. // used by ssr in case component is cached and beforeCreate
  8913. // never gets called
  8914. options._ssrRegister = hook
  8915. } else if (injectStyles) {
  8916. hook = shadowMode
  8917. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  8918. : injectStyles
  8919. }
  8920. if (hook) {
  8921. if (options.functional) {
  8922. // for template-only hot-reload because in that case the render fn doesn't
  8923. // go through the normalizer
  8924. options._injectStyles = hook
  8925. // register for functioal component in vue file
  8926. var originalRender = options.render
  8927. options.render = function renderWithStyleInjection (h, context) {
  8928. hook.call(context)
  8929. return originalRender(h, context)
  8930. }
  8931. } else {
  8932. // inject component registration as beforeCreate hook
  8933. var existing = options.beforeCreate
  8934. options.beforeCreate = existing
  8935. ? [].concat(existing, hook)
  8936. : [hook]
  8937. }
  8938. }
  8939. return {
  8940. exports: scriptExports,
  8941. options: options
  8942. }
  8943. }
  8944. /***/ }),
  8945. /* 33 */
  8946. /*!******************************************************************************************!*\
  8947. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/uni.promisify.adaptor.js ***!
  8948. \******************************************************************************************/
  8949. /*! no static exports found */
  8950. /***/ (function(module, exports, __webpack_require__) {
  8951. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  8952. uni.addInterceptor({
  8953. returnValue: function returnValue(res) {
  8954. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  8955. return res;
  8956. }
  8957. return new Promise(function (resolve, reject) {
  8958. res.then(function (res) {
  8959. return res[0] ? reject(res[0]) : resolve(res[1]);
  8960. });
  8961. });
  8962. }
  8963. });
  8964. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  8965. /***/ }),
  8966. /* 34 */
  8967. /*!************************************************************************************************!*\
  8968. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/index.js ***!
  8969. \************************************************************************************************/
  8970. /*! no static exports found */
  8971. /***/ (function(module, exports, __webpack_require__) {
  8972. "use strict";
  8973. /* WEBPACK VAR INJECTION */(function(uni) {
  8974. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8975. Object.defineProperty(exports, "__esModule", {
  8976. value: true
  8977. });
  8978. exports.default = void 0;
  8979. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  8980. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 35));
  8981. var _mpMixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mpMixin.js */ 36));
  8982. var _luchRequest = _interopRequireDefault(__webpack_require__(/*! ./libs/luch-request */ 37));
  8983. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/util/route.js */ 55));
  8984. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 59));
  8985. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 60));
  8986. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 61));
  8987. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 62));
  8988. var _index = _interopRequireDefault(__webpack_require__(/*! ./libs/function/index.js */ 63));
  8989. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 66));
  8990. var _props = _interopRequireDefault(__webpack_require__(/*! ./libs/config/props.js */ 67));
  8991. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 157));
  8992. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/config/color.js */ 115));
  8993. var _platform = _interopRequireDefault(__webpack_require__(/*! ./libs/function/platform */ 158));
  8994. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  8995. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  8996. // 看到此报错,是因为没有配置vue.config.js的【transpileDependencies】,详见:https://www.uviewui.com/components/npmSetting.html#_5-cli模式额外配置
  8997. var pleaseSetTranspileDependencies = {},
  8998. babelTest = pleaseSetTranspileDependencies === null || pleaseSetTranspileDependencies === void 0 ? void 0 : pleaseSetTranspileDependencies.test;
  8999. // 引入全局mixin
  9000. var $u = _objectSpread(_objectSpread({
  9001. route: _route.default,
  9002. date: _index.default.timeFormat,
  9003. // 另名date
  9004. colorGradient: _colorGradient.default.colorGradient,
  9005. hexToRgb: _colorGradient.default.hexToRgb,
  9006. rgbToHex: _colorGradient.default.rgbToHex,
  9007. colorToRgba: _colorGradient.default.colorToRgba,
  9008. test: _test.default,
  9009. type: ['primary', 'success', 'error', 'warning', 'info'],
  9010. http: new _luchRequest.default(),
  9011. config: _config.default,
  9012. // uView配置信息相关,比如版本号
  9013. zIndex: _zIndex.default,
  9014. debounce: _debounce.default,
  9015. throttle: _throttle.default,
  9016. mixin: _mixin.default,
  9017. mpMixin: _mpMixin.default,
  9018. props: _props.default
  9019. }, _index.default), {}, {
  9020. color: _color.default,
  9021. platform: _platform.default
  9022. });
  9023. // $u挂载到uni对象上
  9024. uni.$u = $u;
  9025. var install = function install(Vue) {
  9026. // 时间格式化,同时两个名称,date和timeFormat
  9027. Vue.filter('timeFormat', function (timestamp, format) {
  9028. return uni.$u.timeFormat(timestamp, format);
  9029. });
  9030. Vue.filter('date', function (timestamp, format) {
  9031. return uni.$u.timeFormat(timestamp, format);
  9032. });
  9033. // 将多久以前的方法,注入到全局过滤器
  9034. Vue.filter('timeFrom', function (timestamp, format) {
  9035. return uni.$u.timeFrom(timestamp, format);
  9036. });
  9037. // 同时挂载到uni和Vue.prototype中
  9038. // 只有vue,挂载到Vue.prototype才有意义,因为nvue中全局Vue.prototype和Vue.mixin是无效的
  9039. Vue.prototype.$u = $u;
  9040. Vue.mixin(_mixin.default);
  9041. };
  9042. var _default = {
  9043. install: install
  9044. };
  9045. exports.default = _default;
  9046. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9047. /***/ }),
  9048. /* 35 */
  9049. /*!***********************************************************************************************************!*\
  9050. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/mixin/mixin.js ***!
  9051. \***********************************************************************************************************/
  9052. /*! no static exports found */
  9053. /***/ (function(module, exports, __webpack_require__) {
  9054. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  9055. // 定义每个组件都可能需要用到的外部样式以及类名
  9056. props: {
  9057. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  9058. customStyle: {
  9059. type: [Object, String],
  9060. default: function _default() {
  9061. return {};
  9062. }
  9063. },
  9064. customClass: {
  9065. type: String,
  9066. default: ''
  9067. },
  9068. // 跳转的页面路径
  9069. url: {
  9070. type: String,
  9071. default: ''
  9072. },
  9073. // 页面跳转的类型
  9074. linkType: {
  9075. type: String,
  9076. default: 'navigateTo'
  9077. }
  9078. },
  9079. data: function data() {
  9080. return {};
  9081. },
  9082. onLoad: function onLoad() {
  9083. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  9084. this.$u.getRect = this.$uGetRect;
  9085. },
  9086. created: function created() {
  9087. // 组件当中,只有created声明周期,为了能在组件使用,故也在created中将方法挂载到$u
  9088. this.$u.getRect = this.$uGetRect;
  9089. },
  9090. computed: {
  9091. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  9092. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  9093. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  9094. $u: function $u() {
  9095. // 在非nvue端,移除props,http,mixin等对象,避免在小程序setData时数据过大影响性能
  9096. return uni.$u.deepMerge(uni.$u, {
  9097. props: undefined,
  9098. http: undefined,
  9099. mixin: undefined
  9100. });
  9101. },
  9102. /**
  9103. * 生成bem规则类名
  9104. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  9105. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  9106. * @param {String} name 组件名称
  9107. * @param {Array} fixed 一直会存在的类名
  9108. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  9109. * @returns {Array|string}
  9110. */
  9111. bem: function bem() {
  9112. return function (name, fixed, change) {
  9113. var _this = this;
  9114. // 类名前缀
  9115. var prefix = "u-".concat(name, "--");
  9116. var classes = {};
  9117. if (fixed) {
  9118. fixed.map(function (item) {
  9119. // 这里的类名,会一直存在
  9120. classes[prefix + _this[item]] = true;
  9121. });
  9122. }
  9123. if (change) {
  9124. change.map(function (item) {
  9125. // 这里的类名,会根据this[item]的值为true或者false,而进行添加或者移除某一个类
  9126. _this[item] ? classes[prefix + item] = _this[item] : delete classes[prefix + item];
  9127. });
  9128. }
  9129. return Object.keys(classes);
  9130. // 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
  9131. };
  9132. }
  9133. },
  9134. methods: {
  9135. // 跳转某一个页面
  9136. openPage: function openPage() {
  9137. var urlKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'url';
  9138. var url = this[urlKey];
  9139. if (url) {
  9140. // 执行类似uni.navigateTo的方法
  9141. uni[this.linkType]({
  9142. url: url
  9143. });
  9144. }
  9145. },
  9146. // 查询节点信息
  9147. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  9148. // 解决办法为在组件根部再套一个没有任何作用的view元素
  9149. $uGetRect: function $uGetRect(selector, all) {
  9150. var _this2 = this;
  9151. return new Promise(function (resolve) {
  9152. uni.createSelectorQuery().in(_this2)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  9153. if (all && Array.isArray(rect) && rect.length) {
  9154. resolve(rect);
  9155. }
  9156. if (!all && rect) {
  9157. resolve(rect);
  9158. }
  9159. }).exec();
  9160. });
  9161. },
  9162. getParentData: function getParentData() {
  9163. var _this3 = this;
  9164. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  9165. // 避免在created中去定义parent变量
  9166. if (!this.parent) this.parent = {};
  9167. // 这里的本质原理是,通过获取父组件实例(也即类似u-radio的父组件u-radio-group的this)
  9168. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  9169. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  9170. // 此处并不会自动更新子组件的数据,而是依赖父组件u-radio-group去监听data的变化,手动调用更新子组件的方法去重新获取
  9171. this.parent = uni.$u.$parent.call(this, parentName);
  9172. if (this.parent.children) {
  9173. // 如果父组件的children不存在本组件的实例,才将本实例添加到父组件的children中
  9174. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  9175. }
  9176. if (this.parent && this.parentData) {
  9177. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  9178. Object.keys(this.parentData).map(function (key) {
  9179. _this3.parentData[key] = _this3.parent[key];
  9180. });
  9181. }
  9182. },
  9183. // 阻止事件冒泡
  9184. preventEvent: function preventEvent(e) {
  9185. e && typeof e.stopPropagation === 'function' && e.stopPropagation();
  9186. },
  9187. // 空操作
  9188. noop: function noop(e) {
  9189. this.preventEvent(e);
  9190. }
  9191. },
  9192. onReachBottom: function onReachBottom() {
  9193. uni.$emit('uOnReachBottom');
  9194. },
  9195. beforeDestroy: function beforeDestroy() {
  9196. var _this4 = this;
  9197. // 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
  9198. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  9199. if (this.parent && uni.$u.test.array(this.parent.children)) {
  9200. // 组件销毁时,移除父组件中的children数组中对应的实例
  9201. var childrenList = this.parent.children;
  9202. childrenList.map(function (child, index) {
  9203. // 如果相等,则移除
  9204. if (child === _this4) {
  9205. childrenList.splice(index, 1);
  9206. }
  9207. });
  9208. }
  9209. }
  9210. };
  9211. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9212. /***/ }),
  9213. /* 36 */
  9214. /*!*************************************************************************************************************!*\
  9215. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/mixin/mpMixin.js ***!
  9216. \*************************************************************************************************************/
  9217. /*! no static exports found */
  9218. /***/ (function(module, exports, __webpack_require__) {
  9219. "use strict";
  9220. Object.defineProperty(exports, "__esModule", {
  9221. value: true
  9222. });
  9223. exports.default = void 0;
  9224. var _default = {
  9225. // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
  9226. options: {
  9227. virtualHost: true
  9228. }
  9229. };
  9230. exports.default = _default;
  9231. /***/ }),
  9232. /* 37 */
  9233. /*!******************************************************************************************************************!*\
  9234. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/index.js ***!
  9235. \******************************************************************************************************************/
  9236. /*! no static exports found */
  9237. /***/ (function(module, exports, __webpack_require__) {
  9238. "use strict";
  9239. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9240. Object.defineProperty(exports, "__esModule", {
  9241. value: true
  9242. });
  9243. exports.default = void 0;
  9244. var _Request = _interopRequireDefault(__webpack_require__(/*! ./core/Request */ 38));
  9245. var _default = _Request.default;
  9246. exports.default = _default;
  9247. /***/ }),
  9248. /* 38 */
  9249. /*!*************************************************************************************************************************!*\
  9250. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/core/Request.js ***!
  9251. \*************************************************************************************************************************/
  9252. /*! no static exports found */
  9253. /***/ (function(module, exports, __webpack_require__) {
  9254. "use strict";
  9255. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9256. Object.defineProperty(exports, "__esModule", {
  9257. value: true
  9258. });
  9259. exports.default = void 0;
  9260. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  9261. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  9262. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  9263. var _dispatchRequest = _interopRequireDefault(__webpack_require__(/*! ./dispatchRequest */ 39));
  9264. var _InterceptorManager = _interopRequireDefault(__webpack_require__(/*! ./InterceptorManager */ 47));
  9265. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./mergeConfig */ 48));
  9266. var _defaults = _interopRequireDefault(__webpack_require__(/*! ./defaults */ 49));
  9267. var _utils = __webpack_require__(/*! ../utils */ 42);
  9268. var _clone = _interopRequireDefault(__webpack_require__(/*! ../utils/clone */ 50));
  9269. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  9270. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  9271. var Request = /*#__PURE__*/function () {
  9272. /**
  9273. * @param {Object} arg - 全局配置
  9274. * @param {String} arg.baseURL - 全局根路径
  9275. * @param {Object} arg.header - 全局header
  9276. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  9277. * @param {String} arg.dataType = [json] - 全局默认的dataType
  9278. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  9279. * @param {Object} arg.custom - 全局默认的自定义参数
  9280. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  9281. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  9282. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  9283. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  9284. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  9285. */
  9286. function Request() {
  9287. var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9288. (0, _classCallCheck2.default)(this, Request);
  9289. if (!(0, _utils.isPlainObject)(arg)) {
  9290. arg = {};
  9291. console.warn('设置全局参数必须接收一个Object');
  9292. }
  9293. this.config = (0, _clone.default)(_objectSpread(_objectSpread({}, _defaults.default), arg));
  9294. this.interceptors = {
  9295. request: new _InterceptorManager.default(),
  9296. response: new _InterceptorManager.default()
  9297. };
  9298. }
  9299. /**
  9300. * @Function
  9301. * @param {Request~setConfigCallback} f - 设置全局默认配置
  9302. */
  9303. (0, _createClass2.default)(Request, [{
  9304. key: "setConfig",
  9305. value: function setConfig(f) {
  9306. this.config = f(this.config);
  9307. }
  9308. }, {
  9309. key: "middleware",
  9310. value: function middleware(config) {
  9311. config = (0, _mergeConfig.default)(this.config, config);
  9312. var chain = [_dispatchRequest.default, undefined];
  9313. var promise = Promise.resolve(config);
  9314. this.interceptors.request.forEach(function (interceptor) {
  9315. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  9316. });
  9317. this.interceptors.response.forEach(function (interceptor) {
  9318. chain.push(interceptor.fulfilled, interceptor.rejected);
  9319. });
  9320. while (chain.length) {
  9321. promise = promise.then(chain.shift(), chain.shift());
  9322. }
  9323. return promise;
  9324. }
  9325. /**
  9326. * @Function
  9327. * @param {Object} config - 请求配置项
  9328. * @prop {String} options.url - 请求路径
  9329. * @prop {Object} options.data - 请求参数
  9330. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  9331. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  9332. * @prop {Object} [options.header = config.header] - 请求header
  9333. * @prop {Object} [options.method = config.method] - 请求方法
  9334. * @returns {Promise<unknown>}
  9335. */
  9336. }, {
  9337. key: "request",
  9338. value: function request() {
  9339. var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9340. return this.middleware(config);
  9341. }
  9342. }, {
  9343. key: "get",
  9344. value: function get(url) {
  9345. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9346. return this.middleware(_objectSpread({
  9347. url: url,
  9348. method: 'GET'
  9349. }, options));
  9350. }
  9351. }, {
  9352. key: "post",
  9353. value: function post(url, data) {
  9354. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9355. return this.middleware(_objectSpread({
  9356. url: url,
  9357. data: data,
  9358. method: 'POST'
  9359. }, options));
  9360. }
  9361. }, {
  9362. key: "put",
  9363. value: function put(url, data) {
  9364. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9365. return this.middleware(_objectSpread({
  9366. url: url,
  9367. data: data,
  9368. method: 'PUT'
  9369. }, options));
  9370. }
  9371. }, {
  9372. key: "delete",
  9373. value: function _delete(url, data) {
  9374. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9375. return this.middleware(_objectSpread({
  9376. url: url,
  9377. data: data,
  9378. method: 'DELETE'
  9379. }, options));
  9380. }
  9381. }, {
  9382. key: "connect",
  9383. value: function connect(url, data) {
  9384. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9385. return this.middleware(_objectSpread({
  9386. url: url,
  9387. data: data,
  9388. method: 'CONNECT'
  9389. }, options));
  9390. }
  9391. }, {
  9392. key: "head",
  9393. value: function head(url, data) {
  9394. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9395. return this.middleware(_objectSpread({
  9396. url: url,
  9397. data: data,
  9398. method: 'HEAD'
  9399. }, options));
  9400. }
  9401. }, {
  9402. key: "options",
  9403. value: function options(url, data) {
  9404. var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9405. return this.middleware(_objectSpread({
  9406. url: url,
  9407. data: data,
  9408. method: 'OPTIONS'
  9409. }, _options));
  9410. }
  9411. }, {
  9412. key: "trace",
  9413. value: function trace(url, data) {
  9414. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9415. return this.middleware(_objectSpread({
  9416. url: url,
  9417. data: data,
  9418. method: 'TRACE'
  9419. }, options));
  9420. }
  9421. }, {
  9422. key: "upload",
  9423. value: function upload(url) {
  9424. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9425. config.url = url;
  9426. config.method = 'UPLOAD';
  9427. return this.middleware(config);
  9428. }
  9429. }, {
  9430. key: "download",
  9431. value: function download(url) {
  9432. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9433. config.url = url;
  9434. config.method = 'DOWNLOAD';
  9435. return this.middleware(config);
  9436. }
  9437. }]);
  9438. return Request;
  9439. }();
  9440. /**
  9441. * setConfig回调
  9442. * @return {Object} - 返回操作后的config
  9443. * @callback Request~setConfigCallback
  9444. * @param {Object} config - 全局默认config
  9445. */
  9446. exports.default = Request;
  9447. /***/ }),
  9448. /* 39 */
  9449. /*!*********************************************************************************************************************************!*\
  9450. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/core/dispatchRequest.js ***!
  9451. \*********************************************************************************************************************************/
  9452. /*! no static exports found */
  9453. /***/ (function(module, exports, __webpack_require__) {
  9454. "use strict";
  9455. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9456. Object.defineProperty(exports, "__esModule", {
  9457. value: true
  9458. });
  9459. exports.default = void 0;
  9460. var _index = _interopRequireDefault(__webpack_require__(/*! ../adapters/index */ 40));
  9461. var _default = function _default(config) {
  9462. return (0, _index.default)(config);
  9463. };
  9464. exports.default = _default;
  9465. /***/ }),
  9466. /* 40 */
  9467. /*!***************************************************************************************************************************!*\
  9468. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/adapters/index.js ***!
  9469. \***************************************************************************************************************************/
  9470. /*! no static exports found */
  9471. /***/ (function(module, exports, __webpack_require__) {
  9472. "use strict";
  9473. /* WEBPACK VAR INJECTION */(function(uni) {
  9474. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9475. Object.defineProperty(exports, "__esModule", {
  9476. value: true
  9477. });
  9478. exports.default = void 0;
  9479. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  9480. var _buildURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/buildURL */ 41));
  9481. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ../core/buildFullPath */ 43));
  9482. var _settle = _interopRequireDefault(__webpack_require__(/*! ../core/settle */ 46));
  9483. var _utils = __webpack_require__(/*! ../utils */ 42);
  9484. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  9485. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  9486. /**
  9487. * 返回可选值存在的配置
  9488. * @param {Array} keys - 可选值数组
  9489. * @param {Object} config2 - 配置
  9490. * @return {{}} - 存在的配置项
  9491. */
  9492. var mergeKeys = function mergeKeys(keys, config2) {
  9493. var config = {};
  9494. keys.forEach(function (prop) {
  9495. if (!(0, _utils.isUndefined)(config2[prop])) {
  9496. config[prop] = config2[prop];
  9497. }
  9498. });
  9499. return config;
  9500. };
  9501. var _default = function _default(config) {
  9502. return new Promise(function (resolve, reject) {
  9503. var fullPath = (0, _buildURL.default)((0, _buildFullPath.default)(config.baseURL, config.url), config.params);
  9504. var _config = {
  9505. url: fullPath,
  9506. header: config.header,
  9507. complete: function complete(response) {
  9508. config.fullPath = fullPath;
  9509. response.config = config;
  9510. try {
  9511. // 对可能字符串不是json 的情况容错
  9512. if (typeof response.data === 'string') {
  9513. response.data = JSON.parse(response.data);
  9514. }
  9515. // eslint-disable-next-line no-empty
  9516. } catch (e) {}
  9517. (0, _settle.default)(resolve, reject, response);
  9518. }
  9519. };
  9520. var requestTask;
  9521. if (config.method === 'UPLOAD') {
  9522. delete _config.header['content-type'];
  9523. delete _config.header['Content-Type'];
  9524. var otherConfig = {
  9525. filePath: config.filePath,
  9526. name: config.name
  9527. };
  9528. var optionalKeys = ['formData'];
  9529. requestTask = uni.uploadFile(_objectSpread(_objectSpread(_objectSpread({}, _config), otherConfig), mergeKeys(optionalKeys, config)));
  9530. } else if (config.method === 'DOWNLOAD') {
  9531. requestTask = uni.downloadFile(_config);
  9532. } else {
  9533. var _optionalKeys = ['data', 'method', 'timeout', 'dataType', 'responseType'];
  9534. requestTask = uni.request(_objectSpread(_objectSpread({}, _config), mergeKeys(_optionalKeys, config)));
  9535. }
  9536. if (config.getTask) {
  9537. config.getTask(requestTask, config);
  9538. }
  9539. });
  9540. };
  9541. exports.default = _default;
  9542. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9543. /***/ }),
  9544. /* 41 */
  9545. /*!*****************************************************************************************************************************!*\
  9546. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/helpers/buildURL.js ***!
  9547. \*****************************************************************************************************************************/
  9548. /*! no static exports found */
  9549. /***/ (function(module, exports, __webpack_require__) {
  9550. "use strict";
  9551. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  9552. Object.defineProperty(exports, "__esModule", {
  9553. value: true
  9554. });
  9555. exports.default = buildURL;
  9556. var utils = _interopRequireWildcard(__webpack_require__(/*! ../utils */ 42));
  9557. function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
  9558. function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  9559. function encode(val) {
  9560. return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');
  9561. }
  9562. /**
  9563. * Build a URL by appending params to the end
  9564. *
  9565. * @param {string} url The base of the url (e.g., http://www.google.com)
  9566. * @param {object} [params] The params to be appended
  9567. * @returns {string} The formatted url
  9568. */
  9569. function buildURL(url, params) {
  9570. /* eslint no-param-reassign:0 */
  9571. if (!params) {
  9572. return url;
  9573. }
  9574. var serializedParams;
  9575. if (utils.isURLSearchParams(params)) {
  9576. serializedParams = params.toString();
  9577. } else {
  9578. var parts = [];
  9579. utils.forEach(params, function (val, key) {
  9580. if (val === null || typeof val === 'undefined') {
  9581. return;
  9582. }
  9583. if (utils.isArray(val)) {
  9584. key = "".concat(key, "[]");
  9585. } else {
  9586. val = [val];
  9587. }
  9588. utils.forEach(val, function (v) {
  9589. if (utils.isDate(v)) {
  9590. v = v.toISOString();
  9591. } else if (utils.isObject(v)) {
  9592. v = JSON.stringify(v);
  9593. }
  9594. parts.push("".concat(encode(key), "=").concat(encode(v)));
  9595. });
  9596. });
  9597. serializedParams = parts.join('&');
  9598. }
  9599. if (serializedParams) {
  9600. var hashmarkIndex = url.indexOf('#');
  9601. if (hashmarkIndex !== -1) {
  9602. url = url.slice(0, hashmarkIndex);
  9603. }
  9604. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  9605. }
  9606. return url;
  9607. }
  9608. /***/ }),
  9609. /* 42 */
  9610. /*!******************************************************************************************************************!*\
  9611. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/utils.js ***!
  9612. \******************************************************************************************************************/
  9613. /*! no static exports found */
  9614. /***/ (function(module, exports, __webpack_require__) {
  9615. "use strict";
  9616. // utils is a library of generic helper functions non-specific to axios
  9617. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9618. Object.defineProperty(exports, "__esModule", {
  9619. value: true
  9620. });
  9621. exports.deepMerge = deepMerge;
  9622. exports.forEach = forEach;
  9623. exports.isArray = isArray;
  9624. exports.isBoolean = isBoolean;
  9625. exports.isDate = isDate;
  9626. exports.isObject = isObject;
  9627. exports.isPlainObject = isPlainObject;
  9628. exports.isURLSearchParams = isURLSearchParams;
  9629. exports.isUndefined = isUndefined;
  9630. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9631. var toString = Object.prototype.toString;
  9632. /**
  9633. * Determine if a value is an Array
  9634. *
  9635. * @param {Object} val The value to test
  9636. * @returns {boolean} True if value is an Array, otherwise false
  9637. */
  9638. function isArray(val) {
  9639. return toString.call(val) === '[object Array]';
  9640. }
  9641. /**
  9642. * Determine if a value is an Object
  9643. *
  9644. * @param {Object} val The value to test
  9645. * @returns {boolean} True if value is an Object, otherwise false
  9646. */
  9647. function isObject(val) {
  9648. return val !== null && (0, _typeof2.default)(val) === 'object';
  9649. }
  9650. /**
  9651. * Determine if a value is a Date
  9652. *
  9653. * @param {Object} val The value to test
  9654. * @returns {boolean} True if value is a Date, otherwise false
  9655. */
  9656. function isDate(val) {
  9657. return toString.call(val) === '[object Date]';
  9658. }
  9659. /**
  9660. * Determine if a value is a URLSearchParams object
  9661. *
  9662. * @param {Object} val The value to test
  9663. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  9664. */
  9665. function isURLSearchParams(val) {
  9666. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  9667. }
  9668. /**
  9669. * Iterate over an Array or an Object invoking a function for each item.
  9670. *
  9671. * If `obj` is an Array callback will be called passing
  9672. * the value, index, and complete array for each item.
  9673. *
  9674. * If 'obj' is an Object callback will be called passing
  9675. * the value, key, and complete object for each property.
  9676. *
  9677. * @param {Object|Array} obj The object to iterate
  9678. * @param {Function} fn The callback to invoke for each item
  9679. */
  9680. function forEach(obj, fn) {
  9681. // Don't bother if no value provided
  9682. if (obj === null || typeof obj === 'undefined') {
  9683. return;
  9684. }
  9685. // Force an array if not already something iterable
  9686. if ((0, _typeof2.default)(obj) !== 'object') {
  9687. /* eslint no-param-reassign:0 */
  9688. obj = [obj];
  9689. }
  9690. if (isArray(obj)) {
  9691. // Iterate over array values
  9692. for (var i = 0, l = obj.length; i < l; i++) {
  9693. fn.call(null, obj[i], i, obj);
  9694. }
  9695. } else {
  9696. // Iterate over object keys
  9697. for (var key in obj) {
  9698. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  9699. fn.call(null, obj[key], key, obj);
  9700. }
  9701. }
  9702. }
  9703. }
  9704. /**
  9705. * 是否为boolean 值
  9706. * @param val
  9707. * @returns {boolean}
  9708. */
  9709. function isBoolean(val) {
  9710. return typeof val === 'boolean';
  9711. }
  9712. /**
  9713. * 是否为真正的对象{} new Object
  9714. * @param {any} obj - 检测的对象
  9715. * @returns {boolean}
  9716. */
  9717. function isPlainObject(obj) {
  9718. return Object.prototype.toString.call(obj) === '[object Object]';
  9719. }
  9720. /**
  9721. * Function equal to merge with the difference being that no reference
  9722. * to original objects is kept.
  9723. *
  9724. * @see merge
  9725. * @param {Object} obj1 Object to merge
  9726. * @returns {Object} Result of all merge properties
  9727. */
  9728. function deepMerge( /* obj1, obj2, obj3, ... */
  9729. ) {
  9730. var result = {};
  9731. function assignValue(val, key) {
  9732. if ((0, _typeof2.default)(result[key]) === 'object' && (0, _typeof2.default)(val) === 'object') {
  9733. result[key] = deepMerge(result[key], val);
  9734. } else if ((0, _typeof2.default)(val) === 'object') {
  9735. result[key] = deepMerge({}, val);
  9736. } else {
  9737. result[key] = val;
  9738. }
  9739. }
  9740. for (var i = 0, l = arguments.length; i < l; i++) {
  9741. forEach(arguments[i], assignValue);
  9742. }
  9743. return result;
  9744. }
  9745. function isUndefined(val) {
  9746. return typeof val === 'undefined';
  9747. }
  9748. /***/ }),
  9749. /* 43 */
  9750. /*!*******************************************************************************************************************************!*\
  9751. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/core/buildFullPath.js ***!
  9752. \*******************************************************************************************************************************/
  9753. /*! no static exports found */
  9754. /***/ (function(module, exports, __webpack_require__) {
  9755. "use strict";
  9756. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9757. Object.defineProperty(exports, "__esModule", {
  9758. value: true
  9759. });
  9760. exports.default = buildFullPath;
  9761. var _isAbsoluteURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/isAbsoluteURL */ 44));
  9762. var _combineURLs = _interopRequireDefault(__webpack_require__(/*! ../helpers/combineURLs */ 45));
  9763. /**
  9764. * Creates a new URL by combining the baseURL with the requestedURL,
  9765. * only when the requestedURL is not already an absolute URL.
  9766. * If the requestURL is absolute, this function returns the requestedURL untouched.
  9767. *
  9768. * @param {string} baseURL The base URL
  9769. * @param {string} requestedURL Absolute or relative URL to combine
  9770. * @returns {string} The combined full path
  9771. */
  9772. function buildFullPath(baseURL, requestedURL) {
  9773. if (baseURL && !(0, _isAbsoluteURL.default)(requestedURL)) {
  9774. return (0, _combineURLs.default)(baseURL, requestedURL);
  9775. }
  9776. return requestedURL;
  9777. }
  9778. /***/ }),
  9779. /* 44 */
  9780. /*!**********************************************************************************************************************************!*\
  9781. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/helpers/isAbsoluteURL.js ***!
  9782. \**********************************************************************************************************************************/
  9783. /*! no static exports found */
  9784. /***/ (function(module, exports, __webpack_require__) {
  9785. "use strict";
  9786. /**
  9787. * Determines whether the specified URL is absolute
  9788. *
  9789. * @param {string} url The URL to test
  9790. * @returns {boolean} True if the specified URL is absolute, otherwise false
  9791. */
  9792. Object.defineProperty(exports, "__esModule", {
  9793. value: true
  9794. });
  9795. exports.default = isAbsoluteURL;
  9796. function isAbsoluteURL(url) {
  9797. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  9798. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  9799. // by any combination of letters, digits, plus, period, or hyphen.
  9800. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  9801. }
  9802. /***/ }),
  9803. /* 45 */
  9804. /*!********************************************************************************************************************************!*\
  9805. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/helpers/combineURLs.js ***!
  9806. \********************************************************************************************************************************/
  9807. /*! no static exports found */
  9808. /***/ (function(module, exports, __webpack_require__) {
  9809. "use strict";
  9810. /**
  9811. * Creates a new URL by combining the specified URLs
  9812. *
  9813. * @param {string} baseURL The base URL
  9814. * @param {string} relativeURL The relative URL
  9815. * @returns {string} The combined URL
  9816. */
  9817. Object.defineProperty(exports, "__esModule", {
  9818. value: true
  9819. });
  9820. exports.default = combineURLs;
  9821. function combineURLs(baseURL, relativeURL) {
  9822. return relativeURL ? "".concat(baseURL.replace(/\/+$/, ''), "/").concat(relativeURL.replace(/^\/+/, '')) : baseURL;
  9823. }
  9824. /***/ }),
  9825. /* 46 */
  9826. /*!************************************************************************************************************************!*\
  9827. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/core/settle.js ***!
  9828. \************************************************************************************************************************/
  9829. /*! no static exports found */
  9830. /***/ (function(module, exports, __webpack_require__) {
  9831. "use strict";
  9832. Object.defineProperty(exports, "__esModule", {
  9833. value: true
  9834. });
  9835. exports.default = settle;
  9836. /**
  9837. * Resolve or reject a Promise based on response status.
  9838. *
  9839. * @param {Function} resolve A function that resolves the promise.
  9840. * @param {Function} reject A function that rejects the promise.
  9841. * @param {object} response The response.
  9842. */
  9843. function settle(resolve, reject, response) {
  9844. var validateStatus = response.config.validateStatus;
  9845. var status = response.statusCode;
  9846. if (status && (!validateStatus || validateStatus(status))) {
  9847. resolve(response);
  9848. } else {
  9849. reject(response);
  9850. }
  9851. }
  9852. /***/ }),
  9853. /* 47 */
  9854. /*!************************************************************************************************************************************!*\
  9855. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/core/InterceptorManager.js ***!
  9856. \************************************************************************************************************************************/
  9857. /*! no static exports found */
  9858. /***/ (function(module, exports, __webpack_require__) {
  9859. "use strict";
  9860. Object.defineProperty(exports, "__esModule", {
  9861. value: true
  9862. });
  9863. exports.default = void 0;
  9864. function InterceptorManager() {
  9865. this.handlers = [];
  9866. }
  9867. /**
  9868. * Add a new interceptor to the stack
  9869. *
  9870. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  9871. * @param {Function} rejected The function to handle `reject` for a `Promise`
  9872. *
  9873. * @return {Number} An ID used to remove interceptor later
  9874. */
  9875. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  9876. this.handlers.push({
  9877. fulfilled: fulfilled,
  9878. rejected: rejected
  9879. });
  9880. return this.handlers.length - 1;
  9881. };
  9882. /**
  9883. * Remove an interceptor from the stack
  9884. *
  9885. * @param {Number} id The ID that was returned by `use`
  9886. */
  9887. InterceptorManager.prototype.eject = function eject(id) {
  9888. if (this.handlers[id]) {
  9889. this.handlers[id] = null;
  9890. }
  9891. };
  9892. /**
  9893. * Iterate over all the registered interceptors
  9894. *
  9895. * This method is particularly useful for skipping over any
  9896. * interceptors that may have become `null` calling `eject`.
  9897. *
  9898. * @param {Function} fn The function to call for each interceptor
  9899. */
  9900. InterceptorManager.prototype.forEach = function forEach(fn) {
  9901. this.handlers.forEach(function (h) {
  9902. if (h !== null) {
  9903. fn(h);
  9904. }
  9905. });
  9906. };
  9907. var _default = InterceptorManager;
  9908. exports.default = _default;
  9909. /***/ }),
  9910. /* 48 */
  9911. /*!*****************************************************************************************************************************!*\
  9912. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/core/mergeConfig.js ***!
  9913. \*****************************************************************************************************************************/
  9914. /*! no static exports found */
  9915. /***/ (function(module, exports, __webpack_require__) {
  9916. "use strict";
  9917. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9918. Object.defineProperty(exports, "__esModule", {
  9919. value: true
  9920. });
  9921. exports.default = void 0;
  9922. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  9923. var _utils = __webpack_require__(/*! ../utils */ 42);
  9924. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  9925. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  9926. /**
  9927. * 合并局部配置优先的配置,如果局部有该配置项则用局部,如果全局有该配置项则用全局
  9928. * @param {Array} keys - 配置项
  9929. * @param {Object} globalsConfig - 当前的全局配置
  9930. * @param {Object} config2 - 局部配置
  9931. * @return {{}}
  9932. */
  9933. var mergeKeys = function mergeKeys(keys, globalsConfig, config2) {
  9934. var config = {};
  9935. keys.forEach(function (prop) {
  9936. if (!(0, _utils.isUndefined)(config2[prop])) {
  9937. config[prop] = config2[prop];
  9938. } else if (!(0, _utils.isUndefined)(globalsConfig[prop])) {
  9939. config[prop] = globalsConfig[prop];
  9940. }
  9941. });
  9942. return config;
  9943. };
  9944. /**
  9945. *
  9946. * @param globalsConfig - 当前实例的全局配置
  9947. * @param config2 - 当前的局部配置
  9948. * @return - 合并后的配置
  9949. */
  9950. var _default = function _default(globalsConfig) {
  9951. var config2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9952. var method = config2.method || globalsConfig.method || 'GET';
  9953. var config = {
  9954. baseURL: globalsConfig.baseURL || '',
  9955. method: method,
  9956. url: config2.url || '',
  9957. params: config2.params || {},
  9958. custom: _objectSpread(_objectSpread({}, globalsConfig.custom || {}), config2.custom || {}),
  9959. header: (0, _utils.deepMerge)(globalsConfig.header || {}, config2.header || {})
  9960. };
  9961. var defaultToConfig2Keys = ['getTask', 'validateStatus'];
  9962. config = _objectSpread(_objectSpread({}, config), mergeKeys(defaultToConfig2Keys, globalsConfig, config2));
  9963. // eslint-disable-next-line no-empty
  9964. if (method === 'DOWNLOAD') {} else if (method === 'UPLOAD') {
  9965. delete config.header['content-type'];
  9966. delete config.header['Content-Type'];
  9967. var uploadKeys = ['filePath', 'name', 'formData'];
  9968. uploadKeys.forEach(function (prop) {
  9969. if (!(0, _utils.isUndefined)(config2[prop])) {
  9970. config[prop] = config2[prop];
  9971. }
  9972. });
  9973. } else {
  9974. var defaultsKeys = ['data', 'timeout', 'dataType', 'responseType'];
  9975. config = _objectSpread(_objectSpread({}, config), mergeKeys(defaultsKeys, globalsConfig, config2));
  9976. }
  9977. return config;
  9978. };
  9979. exports.default = _default;
  9980. /***/ }),
  9981. /* 49 */
  9982. /*!**************************************************************************************************************************!*\
  9983. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/core/defaults.js ***!
  9984. \**************************************************************************************************************************/
  9985. /*! no static exports found */
  9986. /***/ (function(module, exports, __webpack_require__) {
  9987. "use strict";
  9988. Object.defineProperty(exports, "__esModule", {
  9989. value: true
  9990. });
  9991. exports.default = void 0;
  9992. /**
  9993. * 默认的全局配置
  9994. */
  9995. var _default = {
  9996. baseURL: '',
  9997. header: {},
  9998. method: 'GET',
  9999. dataType: 'json',
  10000. responseType: 'text',
  10001. custom: {},
  10002. timeout: 60000,
  10003. validateStatus: function validateStatus(status) {
  10004. return status >= 200 && status < 300;
  10005. }
  10006. };
  10007. exports.default = _default;
  10008. /***/ }),
  10009. /* 50 */
  10010. /*!************************************************************************************************************************!*\
  10011. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/luch-request/utils/clone.js ***!
  10012. \************************************************************************************************************************/
  10013. /*! no static exports found */
  10014. /***/ (function(module, exports, __webpack_require__) {
  10015. "use strict";
  10016. /* WEBPACK VAR INJECTION */(function(Buffer) {
  10017. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10018. Object.defineProperty(exports, "__esModule", {
  10019. value: true
  10020. });
  10021. exports.default = void 0;
  10022. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10023. /* eslint-disable */
  10024. var clone = function () {
  10025. 'use strict';
  10026. function _instanceof(obj, type) {
  10027. return type != null && obj instanceof type;
  10028. }
  10029. var nativeMap;
  10030. try {
  10031. nativeMap = Map;
  10032. } catch (_) {
  10033. // maybe a reference error because no `Map`. Give it a dummy value that no
  10034. // value will ever be an instanceof.
  10035. nativeMap = function nativeMap() {};
  10036. }
  10037. var nativeSet;
  10038. try {
  10039. nativeSet = Set;
  10040. } catch (_) {
  10041. nativeSet = function nativeSet() {};
  10042. }
  10043. var nativePromise;
  10044. try {
  10045. nativePromise = Promise;
  10046. } catch (_) {
  10047. nativePromise = function nativePromise() {};
  10048. }
  10049. /**
  10050. * Clones (copies) an Object using deep copying.
  10051. *
  10052. * This function supports circular references by default, but if you are certain
  10053. * there are no circular references in your object, you can save some CPU time
  10054. * by calling clone(obj, false).
  10055. *
  10056. * Caution: if `circular` is false and `parent` contains circular references,
  10057. * your program may enter an infinite loop and crash.
  10058. *
  10059. * @param `parent` - the object to be cloned
  10060. * @param `circular` - set to true if the object to be cloned may contain
  10061. * circular references. (optional - true by default)
  10062. * @param `depth` - set to a number if the object is only to be cloned to
  10063. * a particular depth. (optional - defaults to Infinity)
  10064. * @param `prototype` - sets the prototype to be used when cloning an object.
  10065. * (optional - defaults to parent prototype).
  10066. * @param `includeNonEnumerable` - set to true if the non-enumerable properties
  10067. * should be cloned as well. Non-enumerable properties on the prototype
  10068. * chain will be ignored. (optional - false by default)
  10069. */
  10070. function clone(parent, circular, depth, prototype, includeNonEnumerable) {
  10071. if ((0, _typeof2.default)(circular) === 'object') {
  10072. depth = circular.depth;
  10073. prototype = circular.prototype;
  10074. includeNonEnumerable = circular.includeNonEnumerable;
  10075. circular = circular.circular;
  10076. }
  10077. // maintain two arrays for circular references, where corresponding parents
  10078. // and children have the same index
  10079. var allParents = [];
  10080. var allChildren = [];
  10081. var useBuffer = typeof Buffer != 'undefined';
  10082. if (typeof circular == 'undefined') circular = true;
  10083. if (typeof depth == 'undefined') depth = Infinity;
  10084. // recurse this function so we don't reset allParents and allChildren
  10085. function _clone(parent, depth) {
  10086. // cloning null always returns null
  10087. if (parent === null) return null;
  10088. if (depth === 0) return parent;
  10089. var child;
  10090. var proto;
  10091. if ((0, _typeof2.default)(parent) != 'object') {
  10092. return parent;
  10093. }
  10094. if (_instanceof(parent, nativeMap)) {
  10095. child = new nativeMap();
  10096. } else if (_instanceof(parent, nativeSet)) {
  10097. child = new nativeSet();
  10098. } else if (_instanceof(parent, nativePromise)) {
  10099. child = new nativePromise(function (resolve, reject) {
  10100. parent.then(function (value) {
  10101. resolve(_clone(value, depth - 1));
  10102. }, function (err) {
  10103. reject(_clone(err, depth - 1));
  10104. });
  10105. });
  10106. } else if (clone.__isArray(parent)) {
  10107. child = [];
  10108. } else if (clone.__isRegExp(parent)) {
  10109. child = new RegExp(parent.source, __getRegExpFlags(parent));
  10110. if (parent.lastIndex) child.lastIndex = parent.lastIndex;
  10111. } else if (clone.__isDate(parent)) {
  10112. child = new Date(parent.getTime());
  10113. } else if (useBuffer && Buffer.isBuffer(parent)) {
  10114. if (Buffer.from) {
  10115. // Node.js >= 5.10.0
  10116. child = Buffer.from(parent);
  10117. } else {
  10118. // Older Node.js versions
  10119. child = new Buffer(parent.length);
  10120. parent.copy(child);
  10121. }
  10122. return child;
  10123. } else if (_instanceof(parent, Error)) {
  10124. child = Object.create(parent);
  10125. } else {
  10126. if (typeof prototype == 'undefined') {
  10127. proto = Object.getPrototypeOf(parent);
  10128. child = Object.create(proto);
  10129. } else {
  10130. child = Object.create(prototype);
  10131. proto = prototype;
  10132. }
  10133. }
  10134. if (circular) {
  10135. var index = allParents.indexOf(parent);
  10136. if (index != -1) {
  10137. return allChildren[index];
  10138. }
  10139. allParents.push(parent);
  10140. allChildren.push(child);
  10141. }
  10142. if (_instanceof(parent, nativeMap)) {
  10143. parent.forEach(function (value, key) {
  10144. var keyChild = _clone(key, depth - 1);
  10145. var valueChild = _clone(value, depth - 1);
  10146. child.set(keyChild, valueChild);
  10147. });
  10148. }
  10149. if (_instanceof(parent, nativeSet)) {
  10150. parent.forEach(function (value) {
  10151. var entryChild = _clone(value, depth - 1);
  10152. child.add(entryChild);
  10153. });
  10154. }
  10155. for (var i in parent) {
  10156. var attrs = Object.getOwnPropertyDescriptor(parent, i);
  10157. if (attrs) {
  10158. child[i] = _clone(parent[i], depth - 1);
  10159. }
  10160. try {
  10161. var objProperty = Object.getOwnPropertyDescriptor(parent, i);
  10162. if (objProperty.set === 'undefined') {
  10163. // no setter defined. Skip cloning this property
  10164. continue;
  10165. }
  10166. child[i] = _clone(parent[i], depth - 1);
  10167. } catch (e) {
  10168. if (e instanceof TypeError) {
  10169. // when in strict mode, TypeError will be thrown if child[i] property only has a getter
  10170. // we can't do anything about this, other than inform the user that this property cannot be set.
  10171. continue;
  10172. } else if (e instanceof ReferenceError) {
  10173. //this may happen in non strict mode
  10174. continue;
  10175. }
  10176. }
  10177. }
  10178. if (Object.getOwnPropertySymbols) {
  10179. var symbols = Object.getOwnPropertySymbols(parent);
  10180. for (var i = 0; i < symbols.length; i++) {
  10181. // Don't need to worry about cloning a symbol because it is a primitive,
  10182. // like a number or string.
  10183. var symbol = symbols[i];
  10184. var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
  10185. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  10186. continue;
  10187. }
  10188. child[symbol] = _clone(parent[symbol], depth - 1);
  10189. Object.defineProperty(child, symbol, descriptor);
  10190. }
  10191. }
  10192. if (includeNonEnumerable) {
  10193. var allPropertyNames = Object.getOwnPropertyNames(parent);
  10194. for (var i = 0; i < allPropertyNames.length; i++) {
  10195. var propertyName = allPropertyNames[i];
  10196. var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
  10197. if (descriptor && descriptor.enumerable) {
  10198. continue;
  10199. }
  10200. child[propertyName] = _clone(parent[propertyName], depth - 1);
  10201. Object.defineProperty(child, propertyName, descriptor);
  10202. }
  10203. }
  10204. return child;
  10205. }
  10206. return _clone(parent, depth);
  10207. }
  10208. /**
  10209. * Simple flat clone using prototype, accepts only objects, usefull for property
  10210. * override on FLAT configuration object (no nested props).
  10211. *
  10212. * USE WITH CAUTION! This may not behave as you wish if you do not know how this
  10213. * works.
  10214. */
  10215. clone.clonePrototype = function clonePrototype(parent) {
  10216. if (parent === null) return null;
  10217. var c = function c() {};
  10218. c.prototype = parent;
  10219. return new c();
  10220. };
  10221. // private utility functions
  10222. function __objToStr(o) {
  10223. return Object.prototype.toString.call(o);
  10224. }
  10225. clone.__objToStr = __objToStr;
  10226. function __isDate(o) {
  10227. return (0, _typeof2.default)(o) === 'object' && __objToStr(o) === '[object Date]';
  10228. }
  10229. clone.__isDate = __isDate;
  10230. function __isArray(o) {
  10231. return (0, _typeof2.default)(o) === 'object' && __objToStr(o) === '[object Array]';
  10232. }
  10233. clone.__isArray = __isArray;
  10234. function __isRegExp(o) {
  10235. return (0, _typeof2.default)(o) === 'object' && __objToStr(o) === '[object RegExp]';
  10236. }
  10237. clone.__isRegExp = __isRegExp;
  10238. function __getRegExpFlags(re) {
  10239. var flags = '';
  10240. if (re.global) flags += 'g';
  10241. if (re.ignoreCase) flags += 'i';
  10242. if (re.multiline) flags += 'm';
  10243. return flags;
  10244. }
  10245. clone.__getRegExpFlags = __getRegExpFlags;
  10246. return clone;
  10247. }();
  10248. var _default = clone;
  10249. exports.default = _default;
  10250. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/buffer/index.js */ 51).Buffer))
  10251. /***/ }),
  10252. /* 51 */
  10253. /*!**************************************!*\
  10254. !*** ./node_modules/buffer/index.js ***!
  10255. \**************************************/
  10256. /*! no static exports found */
  10257. /***/ (function(module, exports, __webpack_require__) {
  10258. "use strict";
  10259. /* WEBPACK VAR INJECTION */(function(global) {/*!
  10260. * The buffer module from node.js, for the browser.
  10261. *
  10262. * @author Feross Aboukhadijeh <http://feross.org>
  10263. * @license MIT
  10264. */
  10265. /* eslint-disable no-proto */
  10266. var base64 = __webpack_require__(/*! base64-js */ 52)
  10267. var ieee754 = __webpack_require__(/*! ieee754 */ 53)
  10268. var isArray = __webpack_require__(/*! isarray */ 54)
  10269. exports.Buffer = Buffer
  10270. exports.SlowBuffer = SlowBuffer
  10271. exports.INSPECT_MAX_BYTES = 50
  10272. /**
  10273. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  10274. * === true Use Uint8Array implementation (fastest)
  10275. * === false Use Object implementation (most compatible, even IE6)
  10276. *
  10277. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  10278. * Opera 11.6+, iOS 4.2+.
  10279. *
  10280. * Due to various browser bugs, sometimes the Object implementation will be used even
  10281. * when the browser supports typed arrays.
  10282. *
  10283. * Note:
  10284. *
  10285. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  10286. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  10287. *
  10288. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  10289. *
  10290. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  10291. * incorrect length in some situations.
  10292. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  10293. * get the Object implementation, which is slower but behaves correctly.
  10294. */
  10295. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  10296. ? global.TYPED_ARRAY_SUPPORT
  10297. : typedArraySupport()
  10298. /*
  10299. * Export kMaxLength after typed array support is determined.
  10300. */
  10301. exports.kMaxLength = kMaxLength()
  10302. function typedArraySupport () {
  10303. try {
  10304. var arr = new Uint8Array(1)
  10305. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  10306. return arr.foo() === 42 && // typed array instances can be augmented
  10307. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  10308. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  10309. } catch (e) {
  10310. return false
  10311. }
  10312. }
  10313. function kMaxLength () {
  10314. return Buffer.TYPED_ARRAY_SUPPORT
  10315. ? 0x7fffffff
  10316. : 0x3fffffff
  10317. }
  10318. function createBuffer (that, length) {
  10319. if (kMaxLength() < length) {
  10320. throw new RangeError('Invalid typed array length')
  10321. }
  10322. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10323. // Return an augmented `Uint8Array` instance, for best performance
  10324. that = new Uint8Array(length)
  10325. that.__proto__ = Buffer.prototype
  10326. } else {
  10327. // Fallback: Return an object instance of the Buffer class
  10328. if (that === null) {
  10329. that = new Buffer(length)
  10330. }
  10331. that.length = length
  10332. }
  10333. return that
  10334. }
  10335. /**
  10336. * The Buffer constructor returns instances of `Uint8Array` that have their
  10337. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  10338. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  10339. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  10340. * returns a single octet.
  10341. *
  10342. * The `Uint8Array` prototype remains unmodified.
  10343. */
  10344. function Buffer (arg, encodingOrOffset, length) {
  10345. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  10346. return new Buffer(arg, encodingOrOffset, length)
  10347. }
  10348. // Common case.
  10349. if (typeof arg === 'number') {
  10350. if (typeof encodingOrOffset === 'string') {
  10351. throw new Error(
  10352. 'If encoding is specified then the first argument must be a string'
  10353. )
  10354. }
  10355. return allocUnsafe(this, arg)
  10356. }
  10357. return from(this, arg, encodingOrOffset, length)
  10358. }
  10359. Buffer.poolSize = 8192 // not used by this implementation
  10360. // TODO: Legacy, not needed anymore. Remove in next major version.
  10361. Buffer._augment = function (arr) {
  10362. arr.__proto__ = Buffer.prototype
  10363. return arr
  10364. }
  10365. function from (that, value, encodingOrOffset, length) {
  10366. if (typeof value === 'number') {
  10367. throw new TypeError('"value" argument must not be a number')
  10368. }
  10369. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  10370. return fromArrayBuffer(that, value, encodingOrOffset, length)
  10371. }
  10372. if (typeof value === 'string') {
  10373. return fromString(that, value, encodingOrOffset)
  10374. }
  10375. return fromObject(that, value)
  10376. }
  10377. /**
  10378. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  10379. * if value is a number.
  10380. * Buffer.from(str[, encoding])
  10381. * Buffer.from(array)
  10382. * Buffer.from(buffer)
  10383. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  10384. **/
  10385. Buffer.from = function (value, encodingOrOffset, length) {
  10386. return from(null, value, encodingOrOffset, length)
  10387. }
  10388. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10389. Buffer.prototype.__proto__ = Uint8Array.prototype
  10390. Buffer.__proto__ = Uint8Array
  10391. if (typeof Symbol !== 'undefined' && Symbol.species &&
  10392. Buffer[Symbol.species] === Buffer) {
  10393. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  10394. Object.defineProperty(Buffer, Symbol.species, {
  10395. value: null,
  10396. configurable: true
  10397. })
  10398. }
  10399. }
  10400. function assertSize (size) {
  10401. if (typeof size !== 'number') {
  10402. throw new TypeError('"size" argument must be a number')
  10403. } else if (size < 0) {
  10404. throw new RangeError('"size" argument must not be negative')
  10405. }
  10406. }
  10407. function alloc (that, size, fill, encoding) {
  10408. assertSize(size)
  10409. if (size <= 0) {
  10410. return createBuffer(that, size)
  10411. }
  10412. if (fill !== undefined) {
  10413. // Only pay attention to encoding if it's a string. This
  10414. // prevents accidentally sending in a number that would
  10415. // be interpretted as a start offset.
  10416. return typeof encoding === 'string'
  10417. ? createBuffer(that, size).fill(fill, encoding)
  10418. : createBuffer(that, size).fill(fill)
  10419. }
  10420. return createBuffer(that, size)
  10421. }
  10422. /**
  10423. * Creates a new filled Buffer instance.
  10424. * alloc(size[, fill[, encoding]])
  10425. **/
  10426. Buffer.alloc = function (size, fill, encoding) {
  10427. return alloc(null, size, fill, encoding)
  10428. }
  10429. function allocUnsafe (that, size) {
  10430. assertSize(size)
  10431. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  10432. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  10433. for (var i = 0; i < size; ++i) {
  10434. that[i] = 0
  10435. }
  10436. }
  10437. return that
  10438. }
  10439. /**
  10440. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  10441. * */
  10442. Buffer.allocUnsafe = function (size) {
  10443. return allocUnsafe(null, size)
  10444. }
  10445. /**
  10446. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  10447. */
  10448. Buffer.allocUnsafeSlow = function (size) {
  10449. return allocUnsafe(null, size)
  10450. }
  10451. function fromString (that, string, encoding) {
  10452. if (typeof encoding !== 'string' || encoding === '') {
  10453. encoding = 'utf8'
  10454. }
  10455. if (!Buffer.isEncoding(encoding)) {
  10456. throw new TypeError('"encoding" must be a valid string encoding')
  10457. }
  10458. var length = byteLength(string, encoding) | 0
  10459. that = createBuffer(that, length)
  10460. var actual = that.write(string, encoding)
  10461. if (actual !== length) {
  10462. // Writing a hex string, for example, that contains invalid characters will
  10463. // cause everything after the first invalid character to be ignored. (e.g.
  10464. // 'abxxcd' will be treated as 'ab')
  10465. that = that.slice(0, actual)
  10466. }
  10467. return that
  10468. }
  10469. function fromArrayLike (that, array) {
  10470. var length = array.length < 0 ? 0 : checked(array.length) | 0
  10471. that = createBuffer(that, length)
  10472. for (var i = 0; i < length; i += 1) {
  10473. that[i] = array[i] & 255
  10474. }
  10475. return that
  10476. }
  10477. function fromArrayBuffer (that, array, byteOffset, length) {
  10478. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  10479. if (byteOffset < 0 || array.byteLength < byteOffset) {
  10480. throw new RangeError('\'offset\' is out of bounds')
  10481. }
  10482. if (array.byteLength < byteOffset + (length || 0)) {
  10483. throw new RangeError('\'length\' is out of bounds')
  10484. }
  10485. if (byteOffset === undefined && length === undefined) {
  10486. array = new Uint8Array(array)
  10487. } else if (length === undefined) {
  10488. array = new Uint8Array(array, byteOffset)
  10489. } else {
  10490. array = new Uint8Array(array, byteOffset, length)
  10491. }
  10492. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10493. // Return an augmented `Uint8Array` instance, for best performance
  10494. that = array
  10495. that.__proto__ = Buffer.prototype
  10496. } else {
  10497. // Fallback: Return an object instance of the Buffer class
  10498. that = fromArrayLike(that, array)
  10499. }
  10500. return that
  10501. }
  10502. function fromObject (that, obj) {
  10503. if (Buffer.isBuffer(obj)) {
  10504. var len = checked(obj.length) | 0
  10505. that = createBuffer(that, len)
  10506. if (that.length === 0) {
  10507. return that
  10508. }
  10509. obj.copy(that, 0, 0, len)
  10510. return that
  10511. }
  10512. if (obj) {
  10513. if ((typeof ArrayBuffer !== 'undefined' &&
  10514. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  10515. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  10516. return createBuffer(that, 0)
  10517. }
  10518. return fromArrayLike(that, obj)
  10519. }
  10520. if (obj.type === 'Buffer' && isArray(obj.data)) {
  10521. return fromArrayLike(that, obj.data)
  10522. }
  10523. }
  10524. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  10525. }
  10526. function checked (length) {
  10527. // Note: cannot use `length < kMaxLength()` here because that fails when
  10528. // length is NaN (which is otherwise coerced to zero.)
  10529. if (length >= kMaxLength()) {
  10530. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  10531. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  10532. }
  10533. return length | 0
  10534. }
  10535. function SlowBuffer (length) {
  10536. if (+length != length) { // eslint-disable-line eqeqeq
  10537. length = 0
  10538. }
  10539. return Buffer.alloc(+length)
  10540. }
  10541. Buffer.isBuffer = function isBuffer (b) {
  10542. return !!(b != null && b._isBuffer)
  10543. }
  10544. Buffer.compare = function compare (a, b) {
  10545. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  10546. throw new TypeError('Arguments must be Buffers')
  10547. }
  10548. if (a === b) return 0
  10549. var x = a.length
  10550. var y = b.length
  10551. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  10552. if (a[i] !== b[i]) {
  10553. x = a[i]
  10554. y = b[i]
  10555. break
  10556. }
  10557. }
  10558. if (x < y) return -1
  10559. if (y < x) return 1
  10560. return 0
  10561. }
  10562. Buffer.isEncoding = function isEncoding (encoding) {
  10563. switch (String(encoding).toLowerCase()) {
  10564. case 'hex':
  10565. case 'utf8':
  10566. case 'utf-8':
  10567. case 'ascii':
  10568. case 'latin1':
  10569. case 'binary':
  10570. case 'base64':
  10571. case 'ucs2':
  10572. case 'ucs-2':
  10573. case 'utf16le':
  10574. case 'utf-16le':
  10575. return true
  10576. default:
  10577. return false
  10578. }
  10579. }
  10580. Buffer.concat = function concat (list, length) {
  10581. if (!isArray(list)) {
  10582. throw new TypeError('"list" argument must be an Array of Buffers')
  10583. }
  10584. if (list.length === 0) {
  10585. return Buffer.alloc(0)
  10586. }
  10587. var i
  10588. if (length === undefined) {
  10589. length = 0
  10590. for (i = 0; i < list.length; ++i) {
  10591. length += list[i].length
  10592. }
  10593. }
  10594. var buffer = Buffer.allocUnsafe(length)
  10595. var pos = 0
  10596. for (i = 0; i < list.length; ++i) {
  10597. var buf = list[i]
  10598. if (!Buffer.isBuffer(buf)) {
  10599. throw new TypeError('"list" argument must be an Array of Buffers')
  10600. }
  10601. buf.copy(buffer, pos)
  10602. pos += buf.length
  10603. }
  10604. return buffer
  10605. }
  10606. function byteLength (string, encoding) {
  10607. if (Buffer.isBuffer(string)) {
  10608. return string.length
  10609. }
  10610. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  10611. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  10612. return string.byteLength
  10613. }
  10614. if (typeof string !== 'string') {
  10615. string = '' + string
  10616. }
  10617. var len = string.length
  10618. if (len === 0) return 0
  10619. // Use a for loop to avoid recursion
  10620. var loweredCase = false
  10621. for (;;) {
  10622. switch (encoding) {
  10623. case 'ascii':
  10624. case 'latin1':
  10625. case 'binary':
  10626. return len
  10627. case 'utf8':
  10628. case 'utf-8':
  10629. case undefined:
  10630. return utf8ToBytes(string).length
  10631. case 'ucs2':
  10632. case 'ucs-2':
  10633. case 'utf16le':
  10634. case 'utf-16le':
  10635. return len * 2
  10636. case 'hex':
  10637. return len >>> 1
  10638. case 'base64':
  10639. return base64ToBytes(string).length
  10640. default:
  10641. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  10642. encoding = ('' + encoding).toLowerCase()
  10643. loweredCase = true
  10644. }
  10645. }
  10646. }
  10647. Buffer.byteLength = byteLength
  10648. function slowToString (encoding, start, end) {
  10649. var loweredCase = false
  10650. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  10651. // property of a typed array.
  10652. // This behaves neither like String nor Uint8Array in that we set start/end
  10653. // to their upper/lower bounds if the value passed is out of range.
  10654. // undefined is handled specially as per ECMA-262 6th Edition,
  10655. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  10656. if (start === undefined || start < 0) {
  10657. start = 0
  10658. }
  10659. // Return early if start > this.length. Done here to prevent potential uint32
  10660. // coercion fail below.
  10661. if (start > this.length) {
  10662. return ''
  10663. }
  10664. if (end === undefined || end > this.length) {
  10665. end = this.length
  10666. }
  10667. if (end <= 0) {
  10668. return ''
  10669. }
  10670. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  10671. end >>>= 0
  10672. start >>>= 0
  10673. if (end <= start) {
  10674. return ''
  10675. }
  10676. if (!encoding) encoding = 'utf8'
  10677. while (true) {
  10678. switch (encoding) {
  10679. case 'hex':
  10680. return hexSlice(this, start, end)
  10681. case 'utf8':
  10682. case 'utf-8':
  10683. return utf8Slice(this, start, end)
  10684. case 'ascii':
  10685. return asciiSlice(this, start, end)
  10686. case 'latin1':
  10687. case 'binary':
  10688. return latin1Slice(this, start, end)
  10689. case 'base64':
  10690. return base64Slice(this, start, end)
  10691. case 'ucs2':
  10692. case 'ucs-2':
  10693. case 'utf16le':
  10694. case 'utf-16le':
  10695. return utf16leSlice(this, start, end)
  10696. default:
  10697. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  10698. encoding = (encoding + '').toLowerCase()
  10699. loweredCase = true
  10700. }
  10701. }
  10702. }
  10703. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  10704. // Buffer instances.
  10705. Buffer.prototype._isBuffer = true
  10706. function swap (b, n, m) {
  10707. var i = b[n]
  10708. b[n] = b[m]
  10709. b[m] = i
  10710. }
  10711. Buffer.prototype.swap16 = function swap16 () {
  10712. var len = this.length
  10713. if (len % 2 !== 0) {
  10714. throw new RangeError('Buffer size must be a multiple of 16-bits')
  10715. }
  10716. for (var i = 0; i < len; i += 2) {
  10717. swap(this, i, i + 1)
  10718. }
  10719. return this
  10720. }
  10721. Buffer.prototype.swap32 = function swap32 () {
  10722. var len = this.length
  10723. if (len % 4 !== 0) {
  10724. throw new RangeError('Buffer size must be a multiple of 32-bits')
  10725. }
  10726. for (var i = 0; i < len; i += 4) {
  10727. swap(this, i, i + 3)
  10728. swap(this, i + 1, i + 2)
  10729. }
  10730. return this
  10731. }
  10732. Buffer.prototype.swap64 = function swap64 () {
  10733. var len = this.length
  10734. if (len % 8 !== 0) {
  10735. throw new RangeError('Buffer size must be a multiple of 64-bits')
  10736. }
  10737. for (var i = 0; i < len; i += 8) {
  10738. swap(this, i, i + 7)
  10739. swap(this, i + 1, i + 6)
  10740. swap(this, i + 2, i + 5)
  10741. swap(this, i + 3, i + 4)
  10742. }
  10743. return this
  10744. }
  10745. Buffer.prototype.toString = function toString () {
  10746. var length = this.length | 0
  10747. if (length === 0) return ''
  10748. if (arguments.length === 0) return utf8Slice(this, 0, length)
  10749. return slowToString.apply(this, arguments)
  10750. }
  10751. Buffer.prototype.equals = function equals (b) {
  10752. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  10753. if (this === b) return true
  10754. return Buffer.compare(this, b) === 0
  10755. }
  10756. Buffer.prototype.inspect = function inspect () {
  10757. var str = ''
  10758. var max = exports.INSPECT_MAX_BYTES
  10759. if (this.length > 0) {
  10760. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  10761. if (this.length > max) str += ' ... '
  10762. }
  10763. return '<Buffer ' + str + '>'
  10764. }
  10765. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  10766. if (!Buffer.isBuffer(target)) {
  10767. throw new TypeError('Argument must be a Buffer')
  10768. }
  10769. if (start === undefined) {
  10770. start = 0
  10771. }
  10772. if (end === undefined) {
  10773. end = target ? target.length : 0
  10774. }
  10775. if (thisStart === undefined) {
  10776. thisStart = 0
  10777. }
  10778. if (thisEnd === undefined) {
  10779. thisEnd = this.length
  10780. }
  10781. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  10782. throw new RangeError('out of range index')
  10783. }
  10784. if (thisStart >= thisEnd && start >= end) {
  10785. return 0
  10786. }
  10787. if (thisStart >= thisEnd) {
  10788. return -1
  10789. }
  10790. if (start >= end) {
  10791. return 1
  10792. }
  10793. start >>>= 0
  10794. end >>>= 0
  10795. thisStart >>>= 0
  10796. thisEnd >>>= 0
  10797. if (this === target) return 0
  10798. var x = thisEnd - thisStart
  10799. var y = end - start
  10800. var len = Math.min(x, y)
  10801. var thisCopy = this.slice(thisStart, thisEnd)
  10802. var targetCopy = target.slice(start, end)
  10803. for (var i = 0; i < len; ++i) {
  10804. if (thisCopy[i] !== targetCopy[i]) {
  10805. x = thisCopy[i]
  10806. y = targetCopy[i]
  10807. break
  10808. }
  10809. }
  10810. if (x < y) return -1
  10811. if (y < x) return 1
  10812. return 0
  10813. }
  10814. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  10815. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  10816. //
  10817. // Arguments:
  10818. // - buffer - a Buffer to search
  10819. // - val - a string, Buffer, or number
  10820. // - byteOffset - an index into `buffer`; will be clamped to an int32
  10821. // - encoding - an optional encoding, relevant is val is a string
  10822. // - dir - true for indexOf, false for lastIndexOf
  10823. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  10824. // Empty buffer means no match
  10825. if (buffer.length === 0) return -1
  10826. // Normalize byteOffset
  10827. if (typeof byteOffset === 'string') {
  10828. encoding = byteOffset
  10829. byteOffset = 0
  10830. } else if (byteOffset > 0x7fffffff) {
  10831. byteOffset = 0x7fffffff
  10832. } else if (byteOffset < -0x80000000) {
  10833. byteOffset = -0x80000000
  10834. }
  10835. byteOffset = +byteOffset // Coerce to Number.
  10836. if (isNaN(byteOffset)) {
  10837. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  10838. byteOffset = dir ? 0 : (buffer.length - 1)
  10839. }
  10840. // Normalize byteOffset: negative offsets start from the end of the buffer
  10841. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  10842. if (byteOffset >= buffer.length) {
  10843. if (dir) return -1
  10844. else byteOffset = buffer.length - 1
  10845. } else if (byteOffset < 0) {
  10846. if (dir) byteOffset = 0
  10847. else return -1
  10848. }
  10849. // Normalize val
  10850. if (typeof val === 'string') {
  10851. val = Buffer.from(val, encoding)
  10852. }
  10853. // Finally, search either indexOf (if dir is true) or lastIndexOf
  10854. if (Buffer.isBuffer(val)) {
  10855. // Special case: looking for empty string/buffer always fails
  10856. if (val.length === 0) {
  10857. return -1
  10858. }
  10859. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  10860. } else if (typeof val === 'number') {
  10861. val = val & 0xFF // Search for a byte value [0-255]
  10862. if (Buffer.TYPED_ARRAY_SUPPORT &&
  10863. typeof Uint8Array.prototype.indexOf === 'function') {
  10864. if (dir) {
  10865. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  10866. } else {
  10867. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  10868. }
  10869. }
  10870. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  10871. }
  10872. throw new TypeError('val must be string, number or Buffer')
  10873. }
  10874. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  10875. var indexSize = 1
  10876. var arrLength = arr.length
  10877. var valLength = val.length
  10878. if (encoding !== undefined) {
  10879. encoding = String(encoding).toLowerCase()
  10880. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  10881. encoding === 'utf16le' || encoding === 'utf-16le') {
  10882. if (arr.length < 2 || val.length < 2) {
  10883. return -1
  10884. }
  10885. indexSize = 2
  10886. arrLength /= 2
  10887. valLength /= 2
  10888. byteOffset /= 2
  10889. }
  10890. }
  10891. function read (buf, i) {
  10892. if (indexSize === 1) {
  10893. return buf[i]
  10894. } else {
  10895. return buf.readUInt16BE(i * indexSize)
  10896. }
  10897. }
  10898. var i
  10899. if (dir) {
  10900. var foundIndex = -1
  10901. for (i = byteOffset; i < arrLength; i++) {
  10902. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  10903. if (foundIndex === -1) foundIndex = i
  10904. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  10905. } else {
  10906. if (foundIndex !== -1) i -= i - foundIndex
  10907. foundIndex = -1
  10908. }
  10909. }
  10910. } else {
  10911. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  10912. for (i = byteOffset; i >= 0; i--) {
  10913. var found = true
  10914. for (var j = 0; j < valLength; j++) {
  10915. if (read(arr, i + j) !== read(val, j)) {
  10916. found = false
  10917. break
  10918. }
  10919. }
  10920. if (found) return i
  10921. }
  10922. }
  10923. return -1
  10924. }
  10925. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  10926. return this.indexOf(val, byteOffset, encoding) !== -1
  10927. }
  10928. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  10929. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  10930. }
  10931. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  10932. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  10933. }
  10934. function hexWrite (buf, string, offset, length) {
  10935. offset = Number(offset) || 0
  10936. var remaining = buf.length - offset
  10937. if (!length) {
  10938. length = remaining
  10939. } else {
  10940. length = Number(length)
  10941. if (length > remaining) {
  10942. length = remaining
  10943. }
  10944. }
  10945. // must be an even number of digits
  10946. var strLen = string.length
  10947. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  10948. if (length > strLen / 2) {
  10949. length = strLen / 2
  10950. }
  10951. for (var i = 0; i < length; ++i) {
  10952. var parsed = parseInt(string.substr(i * 2, 2), 16)
  10953. if (isNaN(parsed)) return i
  10954. buf[offset + i] = parsed
  10955. }
  10956. return i
  10957. }
  10958. function utf8Write (buf, string, offset, length) {
  10959. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  10960. }
  10961. function asciiWrite (buf, string, offset, length) {
  10962. return blitBuffer(asciiToBytes(string), buf, offset, length)
  10963. }
  10964. function latin1Write (buf, string, offset, length) {
  10965. return asciiWrite(buf, string, offset, length)
  10966. }
  10967. function base64Write (buf, string, offset, length) {
  10968. return blitBuffer(base64ToBytes(string), buf, offset, length)
  10969. }
  10970. function ucs2Write (buf, string, offset, length) {
  10971. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  10972. }
  10973. Buffer.prototype.write = function write (string, offset, length, encoding) {
  10974. // Buffer#write(string)
  10975. if (offset === undefined) {
  10976. encoding = 'utf8'
  10977. length = this.length
  10978. offset = 0
  10979. // Buffer#write(string, encoding)
  10980. } else if (length === undefined && typeof offset === 'string') {
  10981. encoding = offset
  10982. length = this.length
  10983. offset = 0
  10984. // Buffer#write(string, offset[, length][, encoding])
  10985. } else if (isFinite(offset)) {
  10986. offset = offset | 0
  10987. if (isFinite(length)) {
  10988. length = length | 0
  10989. if (encoding === undefined) encoding = 'utf8'
  10990. } else {
  10991. encoding = length
  10992. length = undefined
  10993. }
  10994. // legacy write(string, encoding, offset, length) - remove in v0.13
  10995. } else {
  10996. throw new Error(
  10997. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  10998. )
  10999. }
  11000. var remaining = this.length - offset
  11001. if (length === undefined || length > remaining) length = remaining
  11002. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  11003. throw new RangeError('Attempt to write outside buffer bounds')
  11004. }
  11005. if (!encoding) encoding = 'utf8'
  11006. var loweredCase = false
  11007. for (;;) {
  11008. switch (encoding) {
  11009. case 'hex':
  11010. return hexWrite(this, string, offset, length)
  11011. case 'utf8':
  11012. case 'utf-8':
  11013. return utf8Write(this, string, offset, length)
  11014. case 'ascii':
  11015. return asciiWrite(this, string, offset, length)
  11016. case 'latin1':
  11017. case 'binary':
  11018. return latin1Write(this, string, offset, length)
  11019. case 'base64':
  11020. // Warning: maxLength not taken into account in base64Write
  11021. return base64Write(this, string, offset, length)
  11022. case 'ucs2':
  11023. case 'ucs-2':
  11024. case 'utf16le':
  11025. case 'utf-16le':
  11026. return ucs2Write(this, string, offset, length)
  11027. default:
  11028. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  11029. encoding = ('' + encoding).toLowerCase()
  11030. loweredCase = true
  11031. }
  11032. }
  11033. }
  11034. Buffer.prototype.toJSON = function toJSON () {
  11035. return {
  11036. type: 'Buffer',
  11037. data: Array.prototype.slice.call(this._arr || this, 0)
  11038. }
  11039. }
  11040. function base64Slice (buf, start, end) {
  11041. if (start === 0 && end === buf.length) {
  11042. return base64.fromByteArray(buf)
  11043. } else {
  11044. return base64.fromByteArray(buf.slice(start, end))
  11045. }
  11046. }
  11047. function utf8Slice (buf, start, end) {
  11048. end = Math.min(buf.length, end)
  11049. var res = []
  11050. var i = start
  11051. while (i < end) {
  11052. var firstByte = buf[i]
  11053. var codePoint = null
  11054. var bytesPerSequence = (firstByte > 0xEF) ? 4
  11055. : (firstByte > 0xDF) ? 3
  11056. : (firstByte > 0xBF) ? 2
  11057. : 1
  11058. if (i + bytesPerSequence <= end) {
  11059. var secondByte, thirdByte, fourthByte, tempCodePoint
  11060. switch (bytesPerSequence) {
  11061. case 1:
  11062. if (firstByte < 0x80) {
  11063. codePoint = firstByte
  11064. }
  11065. break
  11066. case 2:
  11067. secondByte = buf[i + 1]
  11068. if ((secondByte & 0xC0) === 0x80) {
  11069. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  11070. if (tempCodePoint > 0x7F) {
  11071. codePoint = tempCodePoint
  11072. }
  11073. }
  11074. break
  11075. case 3:
  11076. secondByte = buf[i + 1]
  11077. thirdByte = buf[i + 2]
  11078. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  11079. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  11080. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  11081. codePoint = tempCodePoint
  11082. }
  11083. }
  11084. break
  11085. case 4:
  11086. secondByte = buf[i + 1]
  11087. thirdByte = buf[i + 2]
  11088. fourthByte = buf[i + 3]
  11089. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  11090. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  11091. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  11092. codePoint = tempCodePoint
  11093. }
  11094. }
  11095. }
  11096. }
  11097. if (codePoint === null) {
  11098. // we did not generate a valid codePoint so insert a
  11099. // replacement char (U+FFFD) and advance only 1 byte
  11100. codePoint = 0xFFFD
  11101. bytesPerSequence = 1
  11102. } else if (codePoint > 0xFFFF) {
  11103. // encode to utf16 (surrogate pair dance)
  11104. codePoint -= 0x10000
  11105. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  11106. codePoint = 0xDC00 | codePoint & 0x3FF
  11107. }
  11108. res.push(codePoint)
  11109. i += bytesPerSequence
  11110. }
  11111. return decodeCodePointsArray(res)
  11112. }
  11113. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  11114. // the lowest limit is Chrome, with 0x10000 args.
  11115. // We go 1 magnitude less, for safety
  11116. var MAX_ARGUMENTS_LENGTH = 0x1000
  11117. function decodeCodePointsArray (codePoints) {
  11118. var len = codePoints.length
  11119. if (len <= MAX_ARGUMENTS_LENGTH) {
  11120. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  11121. }
  11122. // Decode in chunks to avoid "call stack size exceeded".
  11123. var res = ''
  11124. var i = 0
  11125. while (i < len) {
  11126. res += String.fromCharCode.apply(
  11127. String,
  11128. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  11129. )
  11130. }
  11131. return res
  11132. }
  11133. function asciiSlice (buf, start, end) {
  11134. var ret = ''
  11135. end = Math.min(buf.length, end)
  11136. for (var i = start; i < end; ++i) {
  11137. ret += String.fromCharCode(buf[i] & 0x7F)
  11138. }
  11139. return ret
  11140. }
  11141. function latin1Slice (buf, start, end) {
  11142. var ret = ''
  11143. end = Math.min(buf.length, end)
  11144. for (var i = start; i < end; ++i) {
  11145. ret += String.fromCharCode(buf[i])
  11146. }
  11147. return ret
  11148. }
  11149. function hexSlice (buf, start, end) {
  11150. var len = buf.length
  11151. if (!start || start < 0) start = 0
  11152. if (!end || end < 0 || end > len) end = len
  11153. var out = ''
  11154. for (var i = start; i < end; ++i) {
  11155. out += toHex(buf[i])
  11156. }
  11157. return out
  11158. }
  11159. function utf16leSlice (buf, start, end) {
  11160. var bytes = buf.slice(start, end)
  11161. var res = ''
  11162. for (var i = 0; i < bytes.length; i += 2) {
  11163. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  11164. }
  11165. return res
  11166. }
  11167. Buffer.prototype.slice = function slice (start, end) {
  11168. var len = this.length
  11169. start = ~~start
  11170. end = end === undefined ? len : ~~end
  11171. if (start < 0) {
  11172. start += len
  11173. if (start < 0) start = 0
  11174. } else if (start > len) {
  11175. start = len
  11176. }
  11177. if (end < 0) {
  11178. end += len
  11179. if (end < 0) end = 0
  11180. } else if (end > len) {
  11181. end = len
  11182. }
  11183. if (end < start) end = start
  11184. var newBuf
  11185. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11186. newBuf = this.subarray(start, end)
  11187. newBuf.__proto__ = Buffer.prototype
  11188. } else {
  11189. var sliceLen = end - start
  11190. newBuf = new Buffer(sliceLen, undefined)
  11191. for (var i = 0; i < sliceLen; ++i) {
  11192. newBuf[i] = this[i + start]
  11193. }
  11194. }
  11195. return newBuf
  11196. }
  11197. /*
  11198. * Need to make sure that buffer isn't trying to write out of bounds.
  11199. */
  11200. function checkOffset (offset, ext, length) {
  11201. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  11202. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  11203. }
  11204. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  11205. offset = offset | 0
  11206. byteLength = byteLength | 0
  11207. if (!noAssert) checkOffset(offset, byteLength, this.length)
  11208. var val = this[offset]
  11209. var mul = 1
  11210. var i = 0
  11211. while (++i < byteLength && (mul *= 0x100)) {
  11212. val += this[offset + i] * mul
  11213. }
  11214. return val
  11215. }
  11216. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  11217. offset = offset | 0
  11218. byteLength = byteLength | 0
  11219. if (!noAssert) {
  11220. checkOffset(offset, byteLength, this.length)
  11221. }
  11222. var val = this[offset + --byteLength]
  11223. var mul = 1
  11224. while (byteLength > 0 && (mul *= 0x100)) {
  11225. val += this[offset + --byteLength] * mul
  11226. }
  11227. return val
  11228. }
  11229. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  11230. if (!noAssert) checkOffset(offset, 1, this.length)
  11231. return this[offset]
  11232. }
  11233. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  11234. if (!noAssert) checkOffset(offset, 2, this.length)
  11235. return this[offset] | (this[offset + 1] << 8)
  11236. }
  11237. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  11238. if (!noAssert) checkOffset(offset, 2, this.length)
  11239. return (this[offset] << 8) | this[offset + 1]
  11240. }
  11241. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  11242. if (!noAssert) checkOffset(offset, 4, this.length)
  11243. return ((this[offset]) |
  11244. (this[offset + 1] << 8) |
  11245. (this[offset + 2] << 16)) +
  11246. (this[offset + 3] * 0x1000000)
  11247. }
  11248. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  11249. if (!noAssert) checkOffset(offset, 4, this.length)
  11250. return (this[offset] * 0x1000000) +
  11251. ((this[offset + 1] << 16) |
  11252. (this[offset + 2] << 8) |
  11253. this[offset + 3])
  11254. }
  11255. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  11256. offset = offset | 0
  11257. byteLength = byteLength | 0
  11258. if (!noAssert) checkOffset(offset, byteLength, this.length)
  11259. var val = this[offset]
  11260. var mul = 1
  11261. var i = 0
  11262. while (++i < byteLength && (mul *= 0x100)) {
  11263. val += this[offset + i] * mul
  11264. }
  11265. mul *= 0x80
  11266. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  11267. return val
  11268. }
  11269. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  11270. offset = offset | 0
  11271. byteLength = byteLength | 0
  11272. if (!noAssert) checkOffset(offset, byteLength, this.length)
  11273. var i = byteLength
  11274. var mul = 1
  11275. var val = this[offset + --i]
  11276. while (i > 0 && (mul *= 0x100)) {
  11277. val += this[offset + --i] * mul
  11278. }
  11279. mul *= 0x80
  11280. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  11281. return val
  11282. }
  11283. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  11284. if (!noAssert) checkOffset(offset, 1, this.length)
  11285. if (!(this[offset] & 0x80)) return (this[offset])
  11286. return ((0xff - this[offset] + 1) * -1)
  11287. }
  11288. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  11289. if (!noAssert) checkOffset(offset, 2, this.length)
  11290. var val = this[offset] | (this[offset + 1] << 8)
  11291. return (val & 0x8000) ? val | 0xFFFF0000 : val
  11292. }
  11293. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  11294. if (!noAssert) checkOffset(offset, 2, this.length)
  11295. var val = this[offset + 1] | (this[offset] << 8)
  11296. return (val & 0x8000) ? val | 0xFFFF0000 : val
  11297. }
  11298. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  11299. if (!noAssert) checkOffset(offset, 4, this.length)
  11300. return (this[offset]) |
  11301. (this[offset + 1] << 8) |
  11302. (this[offset + 2] << 16) |
  11303. (this[offset + 3] << 24)
  11304. }
  11305. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  11306. if (!noAssert) checkOffset(offset, 4, this.length)
  11307. return (this[offset] << 24) |
  11308. (this[offset + 1] << 16) |
  11309. (this[offset + 2] << 8) |
  11310. (this[offset + 3])
  11311. }
  11312. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  11313. if (!noAssert) checkOffset(offset, 4, this.length)
  11314. return ieee754.read(this, offset, true, 23, 4)
  11315. }
  11316. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  11317. if (!noAssert) checkOffset(offset, 4, this.length)
  11318. return ieee754.read(this, offset, false, 23, 4)
  11319. }
  11320. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  11321. if (!noAssert) checkOffset(offset, 8, this.length)
  11322. return ieee754.read(this, offset, true, 52, 8)
  11323. }
  11324. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  11325. if (!noAssert) checkOffset(offset, 8, this.length)
  11326. return ieee754.read(this, offset, false, 52, 8)
  11327. }
  11328. function checkInt (buf, value, offset, ext, max, min) {
  11329. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  11330. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  11331. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  11332. }
  11333. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  11334. value = +value
  11335. offset = offset | 0
  11336. byteLength = byteLength | 0
  11337. if (!noAssert) {
  11338. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  11339. checkInt(this, value, offset, byteLength, maxBytes, 0)
  11340. }
  11341. var mul = 1
  11342. var i = 0
  11343. this[offset] = value & 0xFF
  11344. while (++i < byteLength && (mul *= 0x100)) {
  11345. this[offset + i] = (value / mul) & 0xFF
  11346. }
  11347. return offset + byteLength
  11348. }
  11349. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  11350. value = +value
  11351. offset = offset | 0
  11352. byteLength = byteLength | 0
  11353. if (!noAssert) {
  11354. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  11355. checkInt(this, value, offset, byteLength, maxBytes, 0)
  11356. }
  11357. var i = byteLength - 1
  11358. var mul = 1
  11359. this[offset + i] = value & 0xFF
  11360. while (--i >= 0 && (mul *= 0x100)) {
  11361. this[offset + i] = (value / mul) & 0xFF
  11362. }
  11363. return offset + byteLength
  11364. }
  11365. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  11366. value = +value
  11367. offset = offset | 0
  11368. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  11369. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  11370. this[offset] = (value & 0xff)
  11371. return offset + 1
  11372. }
  11373. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  11374. if (value < 0) value = 0xffff + value + 1
  11375. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  11376. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  11377. (littleEndian ? i : 1 - i) * 8
  11378. }
  11379. }
  11380. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  11381. value = +value
  11382. offset = offset | 0
  11383. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  11384. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11385. this[offset] = (value & 0xff)
  11386. this[offset + 1] = (value >>> 8)
  11387. } else {
  11388. objectWriteUInt16(this, value, offset, true)
  11389. }
  11390. return offset + 2
  11391. }
  11392. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  11393. value = +value
  11394. offset = offset | 0
  11395. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  11396. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11397. this[offset] = (value >>> 8)
  11398. this[offset + 1] = (value & 0xff)
  11399. } else {
  11400. objectWriteUInt16(this, value, offset, false)
  11401. }
  11402. return offset + 2
  11403. }
  11404. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  11405. if (value < 0) value = 0xffffffff + value + 1
  11406. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  11407. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  11408. }
  11409. }
  11410. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  11411. value = +value
  11412. offset = offset | 0
  11413. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  11414. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11415. this[offset + 3] = (value >>> 24)
  11416. this[offset + 2] = (value >>> 16)
  11417. this[offset + 1] = (value >>> 8)
  11418. this[offset] = (value & 0xff)
  11419. } else {
  11420. objectWriteUInt32(this, value, offset, true)
  11421. }
  11422. return offset + 4
  11423. }
  11424. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  11425. value = +value
  11426. offset = offset | 0
  11427. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  11428. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11429. this[offset] = (value >>> 24)
  11430. this[offset + 1] = (value >>> 16)
  11431. this[offset + 2] = (value >>> 8)
  11432. this[offset + 3] = (value & 0xff)
  11433. } else {
  11434. objectWriteUInt32(this, value, offset, false)
  11435. }
  11436. return offset + 4
  11437. }
  11438. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  11439. value = +value
  11440. offset = offset | 0
  11441. if (!noAssert) {
  11442. var limit = Math.pow(2, 8 * byteLength - 1)
  11443. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  11444. }
  11445. var i = 0
  11446. var mul = 1
  11447. var sub = 0
  11448. this[offset] = value & 0xFF
  11449. while (++i < byteLength && (mul *= 0x100)) {
  11450. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  11451. sub = 1
  11452. }
  11453. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  11454. }
  11455. return offset + byteLength
  11456. }
  11457. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  11458. value = +value
  11459. offset = offset | 0
  11460. if (!noAssert) {
  11461. var limit = Math.pow(2, 8 * byteLength - 1)
  11462. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  11463. }
  11464. var i = byteLength - 1
  11465. var mul = 1
  11466. var sub = 0
  11467. this[offset + i] = value & 0xFF
  11468. while (--i >= 0 && (mul *= 0x100)) {
  11469. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  11470. sub = 1
  11471. }
  11472. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  11473. }
  11474. return offset + byteLength
  11475. }
  11476. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  11477. value = +value
  11478. offset = offset | 0
  11479. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  11480. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  11481. if (value < 0) value = 0xff + value + 1
  11482. this[offset] = (value & 0xff)
  11483. return offset + 1
  11484. }
  11485. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  11486. value = +value
  11487. offset = offset | 0
  11488. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  11489. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11490. this[offset] = (value & 0xff)
  11491. this[offset + 1] = (value >>> 8)
  11492. } else {
  11493. objectWriteUInt16(this, value, offset, true)
  11494. }
  11495. return offset + 2
  11496. }
  11497. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  11498. value = +value
  11499. offset = offset | 0
  11500. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  11501. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11502. this[offset] = (value >>> 8)
  11503. this[offset + 1] = (value & 0xff)
  11504. } else {
  11505. objectWriteUInt16(this, value, offset, false)
  11506. }
  11507. return offset + 2
  11508. }
  11509. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  11510. value = +value
  11511. offset = offset | 0
  11512. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  11513. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11514. this[offset] = (value & 0xff)
  11515. this[offset + 1] = (value >>> 8)
  11516. this[offset + 2] = (value >>> 16)
  11517. this[offset + 3] = (value >>> 24)
  11518. } else {
  11519. objectWriteUInt32(this, value, offset, true)
  11520. }
  11521. return offset + 4
  11522. }
  11523. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  11524. value = +value
  11525. offset = offset | 0
  11526. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  11527. if (value < 0) value = 0xffffffff + value + 1
  11528. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11529. this[offset] = (value >>> 24)
  11530. this[offset + 1] = (value >>> 16)
  11531. this[offset + 2] = (value >>> 8)
  11532. this[offset + 3] = (value & 0xff)
  11533. } else {
  11534. objectWriteUInt32(this, value, offset, false)
  11535. }
  11536. return offset + 4
  11537. }
  11538. function checkIEEE754 (buf, value, offset, ext, max, min) {
  11539. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  11540. if (offset < 0) throw new RangeError('Index out of range')
  11541. }
  11542. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  11543. if (!noAssert) {
  11544. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  11545. }
  11546. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  11547. return offset + 4
  11548. }
  11549. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  11550. return writeFloat(this, value, offset, true, noAssert)
  11551. }
  11552. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  11553. return writeFloat(this, value, offset, false, noAssert)
  11554. }
  11555. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  11556. if (!noAssert) {
  11557. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  11558. }
  11559. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  11560. return offset + 8
  11561. }
  11562. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  11563. return writeDouble(this, value, offset, true, noAssert)
  11564. }
  11565. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  11566. return writeDouble(this, value, offset, false, noAssert)
  11567. }
  11568. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  11569. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  11570. if (!start) start = 0
  11571. if (!end && end !== 0) end = this.length
  11572. if (targetStart >= target.length) targetStart = target.length
  11573. if (!targetStart) targetStart = 0
  11574. if (end > 0 && end < start) end = start
  11575. // Copy 0 bytes; we're done
  11576. if (end === start) return 0
  11577. if (target.length === 0 || this.length === 0) return 0
  11578. // Fatal error conditions
  11579. if (targetStart < 0) {
  11580. throw new RangeError('targetStart out of bounds')
  11581. }
  11582. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  11583. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  11584. // Are we oob?
  11585. if (end > this.length) end = this.length
  11586. if (target.length - targetStart < end - start) {
  11587. end = target.length - targetStart + start
  11588. }
  11589. var len = end - start
  11590. var i
  11591. if (this === target && start < targetStart && targetStart < end) {
  11592. // descending copy from end
  11593. for (i = len - 1; i >= 0; --i) {
  11594. target[i + targetStart] = this[i + start]
  11595. }
  11596. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  11597. // ascending copy from start
  11598. for (i = 0; i < len; ++i) {
  11599. target[i + targetStart] = this[i + start]
  11600. }
  11601. } else {
  11602. Uint8Array.prototype.set.call(
  11603. target,
  11604. this.subarray(start, start + len),
  11605. targetStart
  11606. )
  11607. }
  11608. return len
  11609. }
  11610. // Usage:
  11611. // buffer.fill(number[, offset[, end]])
  11612. // buffer.fill(buffer[, offset[, end]])
  11613. // buffer.fill(string[, offset[, end]][, encoding])
  11614. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  11615. // Handle string cases:
  11616. if (typeof val === 'string') {
  11617. if (typeof start === 'string') {
  11618. encoding = start
  11619. start = 0
  11620. end = this.length
  11621. } else if (typeof end === 'string') {
  11622. encoding = end
  11623. end = this.length
  11624. }
  11625. if (val.length === 1) {
  11626. var code = val.charCodeAt(0)
  11627. if (code < 256) {
  11628. val = code
  11629. }
  11630. }
  11631. if (encoding !== undefined && typeof encoding !== 'string') {
  11632. throw new TypeError('encoding must be a string')
  11633. }
  11634. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  11635. throw new TypeError('Unknown encoding: ' + encoding)
  11636. }
  11637. } else if (typeof val === 'number') {
  11638. val = val & 255
  11639. }
  11640. // Invalid ranges are not set to a default, so can range check early.
  11641. if (start < 0 || this.length < start || this.length < end) {
  11642. throw new RangeError('Out of range index')
  11643. }
  11644. if (end <= start) {
  11645. return this
  11646. }
  11647. start = start >>> 0
  11648. end = end === undefined ? this.length : end >>> 0
  11649. if (!val) val = 0
  11650. var i
  11651. if (typeof val === 'number') {
  11652. for (i = start; i < end; ++i) {
  11653. this[i] = val
  11654. }
  11655. } else {
  11656. var bytes = Buffer.isBuffer(val)
  11657. ? val
  11658. : utf8ToBytes(new Buffer(val, encoding).toString())
  11659. var len = bytes.length
  11660. for (i = 0; i < end - start; ++i) {
  11661. this[i + start] = bytes[i % len]
  11662. }
  11663. }
  11664. return this
  11665. }
  11666. // HELPER FUNCTIONS
  11667. // ================
  11668. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  11669. function base64clean (str) {
  11670. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  11671. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  11672. // Node converts strings with length < 2 to ''
  11673. if (str.length < 2) return ''
  11674. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  11675. while (str.length % 4 !== 0) {
  11676. str = str + '='
  11677. }
  11678. return str
  11679. }
  11680. function stringtrim (str) {
  11681. if (str.trim) return str.trim()
  11682. return str.replace(/^\s+|\s+$/g, '')
  11683. }
  11684. function toHex (n) {
  11685. if (n < 16) return '0' + n.toString(16)
  11686. return n.toString(16)
  11687. }
  11688. function utf8ToBytes (string, units) {
  11689. units = units || Infinity
  11690. var codePoint
  11691. var length = string.length
  11692. var leadSurrogate = null
  11693. var bytes = []
  11694. for (var i = 0; i < length; ++i) {
  11695. codePoint = string.charCodeAt(i)
  11696. // is surrogate component
  11697. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  11698. // last char was a lead
  11699. if (!leadSurrogate) {
  11700. // no lead yet
  11701. if (codePoint > 0xDBFF) {
  11702. // unexpected trail
  11703. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  11704. continue
  11705. } else if (i + 1 === length) {
  11706. // unpaired lead
  11707. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  11708. continue
  11709. }
  11710. // valid lead
  11711. leadSurrogate = codePoint
  11712. continue
  11713. }
  11714. // 2 leads in a row
  11715. if (codePoint < 0xDC00) {
  11716. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  11717. leadSurrogate = codePoint
  11718. continue
  11719. }
  11720. // valid surrogate pair
  11721. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  11722. } else if (leadSurrogate) {
  11723. // valid bmp char, but last char was a lead
  11724. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  11725. }
  11726. leadSurrogate = null
  11727. // encode utf8
  11728. if (codePoint < 0x80) {
  11729. if ((units -= 1) < 0) break
  11730. bytes.push(codePoint)
  11731. } else if (codePoint < 0x800) {
  11732. if ((units -= 2) < 0) break
  11733. bytes.push(
  11734. codePoint >> 0x6 | 0xC0,
  11735. codePoint & 0x3F | 0x80
  11736. )
  11737. } else if (codePoint < 0x10000) {
  11738. if ((units -= 3) < 0) break
  11739. bytes.push(
  11740. codePoint >> 0xC | 0xE0,
  11741. codePoint >> 0x6 & 0x3F | 0x80,
  11742. codePoint & 0x3F | 0x80
  11743. )
  11744. } else if (codePoint < 0x110000) {
  11745. if ((units -= 4) < 0) break
  11746. bytes.push(
  11747. codePoint >> 0x12 | 0xF0,
  11748. codePoint >> 0xC & 0x3F | 0x80,
  11749. codePoint >> 0x6 & 0x3F | 0x80,
  11750. codePoint & 0x3F | 0x80
  11751. )
  11752. } else {
  11753. throw new Error('Invalid code point')
  11754. }
  11755. }
  11756. return bytes
  11757. }
  11758. function asciiToBytes (str) {
  11759. var byteArray = []
  11760. for (var i = 0; i < str.length; ++i) {
  11761. // Node's code seems to be doing this and not & 0x7F..
  11762. byteArray.push(str.charCodeAt(i) & 0xFF)
  11763. }
  11764. return byteArray
  11765. }
  11766. function utf16leToBytes (str, units) {
  11767. var c, hi, lo
  11768. var byteArray = []
  11769. for (var i = 0; i < str.length; ++i) {
  11770. if ((units -= 2) < 0) break
  11771. c = str.charCodeAt(i)
  11772. hi = c >> 8
  11773. lo = c % 256
  11774. byteArray.push(lo)
  11775. byteArray.push(hi)
  11776. }
  11777. return byteArray
  11778. }
  11779. function base64ToBytes (str) {
  11780. return base64.toByteArray(base64clean(str))
  11781. }
  11782. function blitBuffer (src, dst, offset, length) {
  11783. for (var i = 0; i < length; ++i) {
  11784. if ((i + offset >= dst.length) || (i >= src.length)) break
  11785. dst[i + offset] = src[i]
  11786. }
  11787. return i
  11788. }
  11789. function isnan (val) {
  11790. return val !== val // eslint-disable-line no-self-compare
  11791. }
  11792. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  11793. /***/ }),
  11794. /* 52 */
  11795. /*!*****************************************!*\
  11796. !*** ./node_modules/base64-js/index.js ***!
  11797. \*****************************************/
  11798. /*! no static exports found */
  11799. /***/ (function(module, exports, __webpack_require__) {
  11800. "use strict";
  11801. exports.byteLength = byteLength
  11802. exports.toByteArray = toByteArray
  11803. exports.fromByteArray = fromByteArray
  11804. var lookup = []
  11805. var revLookup = []
  11806. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  11807. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  11808. for (var i = 0, len = code.length; i < len; ++i) {
  11809. lookup[i] = code[i]
  11810. revLookup[code.charCodeAt(i)] = i
  11811. }
  11812. // Support decoding URL-safe base64 strings, as Node.js does.
  11813. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  11814. revLookup['-'.charCodeAt(0)] = 62
  11815. revLookup['_'.charCodeAt(0)] = 63
  11816. function getLens (b64) {
  11817. var len = b64.length
  11818. if (len % 4 > 0) {
  11819. throw new Error('Invalid string. Length must be a multiple of 4')
  11820. }
  11821. // Trim off extra bytes after placeholder bytes are found
  11822. // See: https://github.com/beatgammit/base64-js/issues/42
  11823. var validLen = b64.indexOf('=')
  11824. if (validLen === -1) validLen = len
  11825. var placeHoldersLen = validLen === len
  11826. ? 0
  11827. : 4 - (validLen % 4)
  11828. return [validLen, placeHoldersLen]
  11829. }
  11830. // base64 is 4/3 + up to two characters of the original data
  11831. function byteLength (b64) {
  11832. var lens = getLens(b64)
  11833. var validLen = lens[0]
  11834. var placeHoldersLen = lens[1]
  11835. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  11836. }
  11837. function _byteLength (b64, validLen, placeHoldersLen) {
  11838. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  11839. }
  11840. function toByteArray (b64) {
  11841. var tmp
  11842. var lens = getLens(b64)
  11843. var validLen = lens[0]
  11844. var placeHoldersLen = lens[1]
  11845. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  11846. var curByte = 0
  11847. // if there are placeholders, only get up to the last complete 4 chars
  11848. var len = placeHoldersLen > 0
  11849. ? validLen - 4
  11850. : validLen
  11851. var i
  11852. for (i = 0; i < len; i += 4) {
  11853. tmp =
  11854. (revLookup[b64.charCodeAt(i)] << 18) |
  11855. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  11856. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  11857. revLookup[b64.charCodeAt(i + 3)]
  11858. arr[curByte++] = (tmp >> 16) & 0xFF
  11859. arr[curByte++] = (tmp >> 8) & 0xFF
  11860. arr[curByte++] = tmp & 0xFF
  11861. }
  11862. if (placeHoldersLen === 2) {
  11863. tmp =
  11864. (revLookup[b64.charCodeAt(i)] << 2) |
  11865. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  11866. arr[curByte++] = tmp & 0xFF
  11867. }
  11868. if (placeHoldersLen === 1) {
  11869. tmp =
  11870. (revLookup[b64.charCodeAt(i)] << 10) |
  11871. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  11872. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  11873. arr[curByte++] = (tmp >> 8) & 0xFF
  11874. arr[curByte++] = tmp & 0xFF
  11875. }
  11876. return arr
  11877. }
  11878. function tripletToBase64 (num) {
  11879. return lookup[num >> 18 & 0x3F] +
  11880. lookup[num >> 12 & 0x3F] +
  11881. lookup[num >> 6 & 0x3F] +
  11882. lookup[num & 0x3F]
  11883. }
  11884. function encodeChunk (uint8, start, end) {
  11885. var tmp
  11886. var output = []
  11887. for (var i = start; i < end; i += 3) {
  11888. tmp =
  11889. ((uint8[i] << 16) & 0xFF0000) +
  11890. ((uint8[i + 1] << 8) & 0xFF00) +
  11891. (uint8[i + 2] & 0xFF)
  11892. output.push(tripletToBase64(tmp))
  11893. }
  11894. return output.join('')
  11895. }
  11896. function fromByteArray (uint8) {
  11897. var tmp
  11898. var len = uint8.length
  11899. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  11900. var parts = []
  11901. var maxChunkLength = 16383 // must be multiple of 3
  11902. // go through the array every three bytes, we'll deal with trailing stuff later
  11903. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  11904. parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
  11905. }
  11906. // pad the end with zeros, but make sure to not forget the extra bytes
  11907. if (extraBytes === 1) {
  11908. tmp = uint8[len - 1]
  11909. parts.push(
  11910. lookup[tmp >> 2] +
  11911. lookup[(tmp << 4) & 0x3F] +
  11912. '=='
  11913. )
  11914. } else if (extraBytes === 2) {
  11915. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  11916. parts.push(
  11917. lookup[tmp >> 10] +
  11918. lookup[(tmp >> 4) & 0x3F] +
  11919. lookup[(tmp << 2) & 0x3F] +
  11920. '='
  11921. )
  11922. }
  11923. return parts.join('')
  11924. }
  11925. /***/ }),
  11926. /* 53 */
  11927. /*!***************************************!*\
  11928. !*** ./node_modules/ieee754/index.js ***!
  11929. \***************************************/
  11930. /*! no static exports found */
  11931. /***/ (function(module, exports) {
  11932. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  11933. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  11934. var e, m
  11935. var eLen = (nBytes * 8) - mLen - 1
  11936. var eMax = (1 << eLen) - 1
  11937. var eBias = eMax >> 1
  11938. var nBits = -7
  11939. var i = isLE ? (nBytes - 1) : 0
  11940. var d = isLE ? -1 : 1
  11941. var s = buffer[offset + i]
  11942. i += d
  11943. e = s & ((1 << (-nBits)) - 1)
  11944. s >>= (-nBits)
  11945. nBits += eLen
  11946. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  11947. m = e & ((1 << (-nBits)) - 1)
  11948. e >>= (-nBits)
  11949. nBits += mLen
  11950. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  11951. if (e === 0) {
  11952. e = 1 - eBias
  11953. } else if (e === eMax) {
  11954. return m ? NaN : ((s ? -1 : 1) * Infinity)
  11955. } else {
  11956. m = m + Math.pow(2, mLen)
  11957. e = e - eBias
  11958. }
  11959. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  11960. }
  11961. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  11962. var e, m, c
  11963. var eLen = (nBytes * 8) - mLen - 1
  11964. var eMax = (1 << eLen) - 1
  11965. var eBias = eMax >> 1
  11966. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  11967. var i = isLE ? 0 : (nBytes - 1)
  11968. var d = isLE ? 1 : -1
  11969. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  11970. value = Math.abs(value)
  11971. if (isNaN(value) || value === Infinity) {
  11972. m = isNaN(value) ? 1 : 0
  11973. e = eMax
  11974. } else {
  11975. e = Math.floor(Math.log(value) / Math.LN2)
  11976. if (value * (c = Math.pow(2, -e)) < 1) {
  11977. e--
  11978. c *= 2
  11979. }
  11980. if (e + eBias >= 1) {
  11981. value += rt / c
  11982. } else {
  11983. value += rt * Math.pow(2, 1 - eBias)
  11984. }
  11985. if (value * c >= 2) {
  11986. e++
  11987. c /= 2
  11988. }
  11989. if (e + eBias >= eMax) {
  11990. m = 0
  11991. e = eMax
  11992. } else if (e + eBias >= 1) {
  11993. m = ((value * c) - 1) * Math.pow(2, mLen)
  11994. e = e + eBias
  11995. } else {
  11996. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  11997. e = 0
  11998. }
  11999. }
  12000. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  12001. e = (e << mLen) | m
  12002. eLen += mLen
  12003. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  12004. buffer[offset + i - d] |= s * 128
  12005. }
  12006. /***/ }),
  12007. /* 54 */
  12008. /*!***************************************!*\
  12009. !*** ./node_modules/isarray/index.js ***!
  12010. \***************************************/
  12011. /*! no static exports found */
  12012. /***/ (function(module, exports) {
  12013. var toString = {}.toString;
  12014. module.exports = Array.isArray || function (arr) {
  12015. return toString.call(arr) == '[object Array]';
  12016. };
  12017. /***/ }),
  12018. /* 55 */
  12019. /*!**********************************************************************************************************!*\
  12020. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/util/route.js ***!
  12021. \**********************************************************************************************************/
  12022. /*! no static exports found */
  12023. /***/ (function(module, exports, __webpack_require__) {
  12024. "use strict";
  12025. /* WEBPACK VAR INJECTION */(function(uni) {
  12026. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12027. Object.defineProperty(exports, "__esModule", {
  12028. value: true
  12029. });
  12030. exports.default = void 0;
  12031. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 56));
  12032. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 58));
  12033. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  12034. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  12035. /**
  12036. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  12037. * 并且带有路由拦截功能
  12038. */
  12039. var Router = /*#__PURE__*/function () {
  12040. function Router() {
  12041. (0, _classCallCheck2.default)(this, Router);
  12042. // 原始属性定义
  12043. this.config = {
  12044. type: 'navigateTo',
  12045. url: '',
  12046. delta: 1,
  12047. // navigateBack页面后退时,回退的层数
  12048. params: {},
  12049. // 传递的参数
  12050. animationType: 'pop-in',
  12051. // 窗口动画,只在APP有效
  12052. animationDuration: 300,
  12053. // 窗口动画持续时间,单位毫秒,只在APP有效
  12054. intercept: false // 是否需要拦截
  12055. };
  12056. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  12057. // 这里在构造函数中进行this绑定
  12058. this.route = this.route.bind(this);
  12059. }
  12060. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  12061. (0, _createClass2.default)(Router, [{
  12062. key: "addRootPath",
  12063. value: function addRootPath(url) {
  12064. return url[0] === '/' ? url : "/".concat(url);
  12065. }
  12066. // 整合路由参数
  12067. }, {
  12068. key: "mixinParam",
  12069. value: function mixinParam(url, params) {
  12070. url = url && this.addRootPath(url);
  12071. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  12072. // 如果有url中有get参数,转换后无需带上"?"
  12073. var query = '';
  12074. if (/.*\/.*\?.*=.*/.test(url)) {
  12075. // object对象转为get类型的参数
  12076. query = uni.$u.queryParams(params, false);
  12077. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  12078. return url += "&".concat(query);
  12079. }
  12080. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  12081. query = uni.$u.queryParams(params);
  12082. return url += query;
  12083. }
  12084. // 对外的方法名称
  12085. }, {
  12086. key: "route",
  12087. value: function () {
  12088. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  12089. var options,
  12090. params,
  12091. mergeConfig,
  12092. isNext,
  12093. _args = arguments;
  12094. return _regenerator.default.wrap(function _callee$(_context) {
  12095. while (1) {
  12096. switch (_context.prev = _context.next) {
  12097. case 0:
  12098. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  12099. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  12100. // 合并用户的配置和内部的默认配置
  12101. mergeConfig = {};
  12102. if (typeof options === 'string') {
  12103. // 如果options为字符串,则为route(url, params)的形式
  12104. mergeConfig.url = this.mixinParam(options, params);
  12105. mergeConfig.type = 'navigateTo';
  12106. } else {
  12107. mergeConfig = uni.$u.deepMerge(this.config, options);
  12108. // 否则正常使用mergeConfig中的url和params进行拼接
  12109. mergeConfig.url = this.mixinParam(options.url, options.params);
  12110. }
  12111. // 如果本次跳转的路径和本页面路径一致,不执行跳转,防止用户快速点击跳转按钮,造成多次跳转同一个页面的问题
  12112. if (!(mergeConfig.url === uni.$u.page())) {
  12113. _context.next = 6;
  12114. break;
  12115. }
  12116. return _context.abrupt("return");
  12117. case 6:
  12118. if (params.intercept) {
  12119. this.config.intercept = params.intercept;
  12120. }
  12121. // params参数也带给拦截器
  12122. mergeConfig.params = params;
  12123. // 合并内外部参数
  12124. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  12125. // 判断用户是否定义了拦截器
  12126. if (!(typeof uni.$u.routeIntercept === 'function')) {
  12127. _context.next = 16;
  12128. break;
  12129. }
  12130. _context.next = 12;
  12131. return new Promise(function (resolve, reject) {
  12132. uni.$u.routeIntercept(mergeConfig, resolve);
  12133. });
  12134. case 12:
  12135. isNext = _context.sent;
  12136. // 如果isNext为true,则执行路由跳转
  12137. isNext && this.openPage(mergeConfig);
  12138. _context.next = 17;
  12139. break;
  12140. case 16:
  12141. this.openPage(mergeConfig);
  12142. case 17:
  12143. case "end":
  12144. return _context.stop();
  12145. }
  12146. }
  12147. }, _callee, this);
  12148. }));
  12149. function route() {
  12150. return _route.apply(this, arguments);
  12151. }
  12152. return route;
  12153. }() // 执行路由跳转
  12154. }, {
  12155. key: "openPage",
  12156. value: function openPage(config) {
  12157. // 解构参数
  12158. var url = config.url,
  12159. type = config.type,
  12160. delta = config.delta,
  12161. animationType = config.animationType,
  12162. animationDuration = config.animationDuration;
  12163. if (config.type == 'navigateTo' || config.type == 'to') {
  12164. uni.navigateTo({
  12165. url: url,
  12166. animationType: animationType,
  12167. animationDuration: animationDuration
  12168. });
  12169. }
  12170. if (config.type == 'redirectTo' || config.type == 'redirect') {
  12171. uni.redirectTo({
  12172. url: url
  12173. });
  12174. }
  12175. if (config.type == 'switchTab' || config.type == 'tab') {
  12176. uni.switchTab({
  12177. url: url
  12178. });
  12179. }
  12180. if (config.type == 'reLaunch' || config.type == 'launch') {
  12181. uni.reLaunch({
  12182. url: url
  12183. });
  12184. }
  12185. if (config.type == 'navigateBack' || config.type == 'back') {
  12186. uni.navigateBack({
  12187. delta: delta
  12188. });
  12189. }
  12190. }
  12191. }]);
  12192. return Router;
  12193. }();
  12194. var _default = new Router().route;
  12195. exports.default = _default;
  12196. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  12197. /***/ }),
  12198. /* 56 */
  12199. /*!************************************************************************************************!*\
  12200. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  12201. \************************************************************************************************/
  12202. /*! no static exports found */
  12203. /***/ (function(module, exports, __webpack_require__) {
  12204. // TODO(Babel 8): Remove this file.
  12205. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 57)();
  12206. module.exports = runtime;
  12207. /***/ }),
  12208. /* 57 */
  12209. /*!*******************************************************************!*\
  12210. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  12211. \*******************************************************************/
  12212. /*! no static exports found */
  12213. /***/ (function(module, exports, __webpack_require__) {
  12214. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  12215. function _regeneratorRuntime() {
  12216. "use strict";
  12217. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  12218. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  12219. return e;
  12220. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12221. var t,
  12222. e = {},
  12223. r = Object.prototype,
  12224. n = r.hasOwnProperty,
  12225. o = Object.defineProperty || function (t, e, r) {
  12226. t[e] = r.value;
  12227. },
  12228. i = "function" == typeof Symbol ? Symbol : {},
  12229. a = i.iterator || "@@iterator",
  12230. c = i.asyncIterator || "@@asyncIterator",
  12231. u = i.toStringTag || "@@toStringTag";
  12232. function define(t, e, r) {
  12233. return Object.defineProperty(t, e, {
  12234. value: r,
  12235. enumerable: !0,
  12236. configurable: !0,
  12237. writable: !0
  12238. }), t[e];
  12239. }
  12240. try {
  12241. define({}, "");
  12242. } catch (t) {
  12243. define = function define(t, e, r) {
  12244. return t[e] = r;
  12245. };
  12246. }
  12247. function wrap(t, e, r, n) {
  12248. var i = e && e.prototype instanceof Generator ? e : Generator,
  12249. a = Object.create(i.prototype),
  12250. c = new Context(n || []);
  12251. return o(a, "_invoke", {
  12252. value: makeInvokeMethod(t, r, c)
  12253. }), a;
  12254. }
  12255. function tryCatch(t, e, r) {
  12256. try {
  12257. return {
  12258. type: "normal",
  12259. arg: t.call(e, r)
  12260. };
  12261. } catch (t) {
  12262. return {
  12263. type: "throw",
  12264. arg: t
  12265. };
  12266. }
  12267. }
  12268. e.wrap = wrap;
  12269. var h = "suspendedStart",
  12270. l = "suspendedYield",
  12271. f = "executing",
  12272. s = "completed",
  12273. y = {};
  12274. function Generator() {}
  12275. function GeneratorFunction() {}
  12276. function GeneratorFunctionPrototype() {}
  12277. var p = {};
  12278. define(p, a, function () {
  12279. return this;
  12280. });
  12281. var d = Object.getPrototypeOf,
  12282. v = d && d(d(values([])));
  12283. v && v !== r && n.call(v, a) && (p = v);
  12284. var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
  12285. function defineIteratorMethods(t) {
  12286. ["next", "throw", "return"].forEach(function (e) {
  12287. define(t, e, function (t) {
  12288. return this._invoke(e, t);
  12289. });
  12290. });
  12291. }
  12292. function AsyncIterator(t, e) {
  12293. function invoke(r, o, i, a) {
  12294. var c = tryCatch(t[r], t, o);
  12295. if ("throw" !== c.type) {
  12296. var u = c.arg,
  12297. h = u.value;
  12298. return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
  12299. invoke("next", t, i, a);
  12300. }, function (t) {
  12301. invoke("throw", t, i, a);
  12302. }) : e.resolve(h).then(function (t) {
  12303. u.value = t, i(u);
  12304. }, function (t) {
  12305. return invoke("throw", t, i, a);
  12306. });
  12307. }
  12308. a(c.arg);
  12309. }
  12310. var r;
  12311. o(this, "_invoke", {
  12312. value: function value(t, n) {
  12313. function callInvokeWithMethodAndArg() {
  12314. return new e(function (e, r) {
  12315. invoke(t, n, e, r);
  12316. });
  12317. }
  12318. return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  12319. }
  12320. });
  12321. }
  12322. function makeInvokeMethod(e, r, n) {
  12323. var o = h;
  12324. return function (i, a) {
  12325. if (o === f) throw Error("Generator is already running");
  12326. if (o === s) {
  12327. if ("throw" === i) throw a;
  12328. return {
  12329. value: t,
  12330. done: !0
  12331. };
  12332. }
  12333. for (n.method = i, n.arg = a;;) {
  12334. var c = n.delegate;
  12335. if (c) {
  12336. var u = maybeInvokeDelegate(c, n);
  12337. if (u) {
  12338. if (u === y) continue;
  12339. return u;
  12340. }
  12341. }
  12342. if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
  12343. if (o === h) throw o = s, n.arg;
  12344. n.dispatchException(n.arg);
  12345. } else "return" === n.method && n.abrupt("return", n.arg);
  12346. o = f;
  12347. var p = tryCatch(e, r, n);
  12348. if ("normal" === p.type) {
  12349. if (o = n.done ? s : l, p.arg === y) continue;
  12350. return {
  12351. value: p.arg,
  12352. done: n.done
  12353. };
  12354. }
  12355. "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
  12356. }
  12357. };
  12358. }
  12359. function maybeInvokeDelegate(e, r) {
  12360. var n = r.method,
  12361. o = e.iterator[n];
  12362. if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
  12363. var i = tryCatch(o, e.iterator, r.arg);
  12364. if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
  12365. var a = i.arg;
  12366. return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
  12367. }
  12368. function pushTryEntry(t) {
  12369. var e = {
  12370. tryLoc: t[0]
  12371. };
  12372. 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
  12373. }
  12374. function resetTryEntry(t) {
  12375. var e = t.completion || {};
  12376. e.type = "normal", delete e.arg, t.completion = e;
  12377. }
  12378. function Context(t) {
  12379. this.tryEntries = [{
  12380. tryLoc: "root"
  12381. }], t.forEach(pushTryEntry, this), this.reset(!0);
  12382. }
  12383. function values(e) {
  12384. if (e || "" === e) {
  12385. var r = e[a];
  12386. if (r) return r.call(e);
  12387. if ("function" == typeof e.next) return e;
  12388. if (!isNaN(e.length)) {
  12389. var o = -1,
  12390. i = function next() {
  12391. for (; ++o < e.length;) {
  12392. if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
  12393. }
  12394. return next.value = t, next.done = !0, next;
  12395. };
  12396. return i.next = i;
  12397. }
  12398. }
  12399. throw new TypeError(_typeof(e) + " is not iterable");
  12400. }
  12401. return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
  12402. value: GeneratorFunctionPrototype,
  12403. configurable: !0
  12404. }), o(GeneratorFunctionPrototype, "constructor", {
  12405. value: GeneratorFunction,
  12406. configurable: !0
  12407. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
  12408. var e = "function" == typeof t && t.constructor;
  12409. return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
  12410. }, e.mark = function (t) {
  12411. return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
  12412. }, e.awrap = function (t) {
  12413. return {
  12414. __await: t
  12415. };
  12416. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
  12417. return this;
  12418. }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
  12419. void 0 === i && (i = Promise);
  12420. var a = new AsyncIterator(wrap(t, r, n, o), i);
  12421. return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
  12422. return t.done ? t.value : a.next();
  12423. });
  12424. }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
  12425. return this;
  12426. }), define(g, "toString", function () {
  12427. return "[object Generator]";
  12428. }), e.keys = function (t) {
  12429. var e = Object(t),
  12430. r = [];
  12431. for (var n in e) {
  12432. r.push(n);
  12433. }
  12434. return r.reverse(), function next() {
  12435. for (; r.length;) {
  12436. var t = r.pop();
  12437. if (t in e) return next.value = t, next.done = !1, next;
  12438. }
  12439. return next.done = !0, next;
  12440. };
  12441. }, e.values = values, Context.prototype = {
  12442. constructor: Context,
  12443. reset: function reset(e) {
  12444. if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) {
  12445. "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
  12446. }
  12447. },
  12448. stop: function stop() {
  12449. this.done = !0;
  12450. var t = this.tryEntries[0].completion;
  12451. if ("throw" === t.type) throw t.arg;
  12452. return this.rval;
  12453. },
  12454. dispatchException: function dispatchException(e) {
  12455. if (this.done) throw e;
  12456. var r = this;
  12457. function handle(n, o) {
  12458. return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
  12459. }
  12460. for (var o = this.tryEntries.length - 1; o >= 0; --o) {
  12461. var i = this.tryEntries[o],
  12462. a = i.completion;
  12463. if ("root" === i.tryLoc) return handle("end");
  12464. if (i.tryLoc <= this.prev) {
  12465. var c = n.call(i, "catchLoc"),
  12466. u = n.call(i, "finallyLoc");
  12467. if (c && u) {
  12468. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  12469. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  12470. } else if (c) {
  12471. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  12472. } else {
  12473. if (!u) throw Error("try statement without catch or finally");
  12474. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  12475. }
  12476. }
  12477. }
  12478. },
  12479. abrupt: function abrupt(t, e) {
  12480. for (var r = this.tryEntries.length - 1; r >= 0; --r) {
  12481. var o = this.tryEntries[r];
  12482. if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
  12483. var i = o;
  12484. break;
  12485. }
  12486. }
  12487. i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
  12488. var a = i ? i.completion : {};
  12489. return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
  12490. },
  12491. complete: function complete(t, e) {
  12492. if ("throw" === t.type) throw t.arg;
  12493. return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
  12494. },
  12495. finish: function finish(t) {
  12496. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  12497. var r = this.tryEntries[e];
  12498. if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
  12499. }
  12500. },
  12501. "catch": function _catch(t) {
  12502. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  12503. var r = this.tryEntries[e];
  12504. if (r.tryLoc === t) {
  12505. var n = r.completion;
  12506. if ("throw" === n.type) {
  12507. var o = n.arg;
  12508. resetTryEntry(r);
  12509. }
  12510. return o;
  12511. }
  12512. }
  12513. throw Error("illegal catch attempt");
  12514. },
  12515. delegateYield: function delegateYield(e, r, n) {
  12516. return this.delegate = {
  12517. iterator: values(e),
  12518. resultName: r,
  12519. nextLoc: n
  12520. }, "next" === this.method && (this.arg = t), y;
  12521. }
  12522. }, e;
  12523. }
  12524. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12525. /***/ }),
  12526. /* 58 */
  12527. /*!*****************************************************************!*\
  12528. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  12529. \*****************************************************************/
  12530. /*! no static exports found */
  12531. /***/ (function(module, exports) {
  12532. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  12533. try {
  12534. var info = gen[key](arg);
  12535. var value = info.value;
  12536. } catch (error) {
  12537. reject(error);
  12538. return;
  12539. }
  12540. if (info.done) {
  12541. resolve(value);
  12542. } else {
  12543. Promise.resolve(value).then(_next, _throw);
  12544. }
  12545. }
  12546. function _asyncToGenerator(fn) {
  12547. return function () {
  12548. var self = this,
  12549. args = arguments;
  12550. return new Promise(function (resolve, reject) {
  12551. var gen = fn.apply(self, args);
  12552. function _next(value) {
  12553. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  12554. }
  12555. function _throw(err) {
  12556. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  12557. }
  12558. _next(undefined);
  12559. });
  12560. };
  12561. }
  12562. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12563. /***/ }),
  12564. /* 59 */
  12565. /*!**********************************************************************************************************************!*\
  12566. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/function/colorGradient.js ***!
  12567. \**********************************************************************************************************************/
  12568. /*! no static exports found */
  12569. /***/ (function(module, exports, __webpack_require__) {
  12570. "use strict";
  12571. Object.defineProperty(exports, "__esModule", {
  12572. value: true
  12573. });
  12574. exports.default = void 0;
  12575. /**
  12576. * 求两个颜色之间的渐变值
  12577. * @param {string} startColor 开始的颜色
  12578. * @param {string} endColor 结束的颜色
  12579. * @param {number} step 颜色等分的份额
  12580. * */
  12581. function colorGradient() {
  12582. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  12583. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  12584. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  12585. var startRGB = hexToRgb(startColor, false); // 转换为rgb数组模式
  12586. var startR = startRGB[0];
  12587. var startG = startRGB[1];
  12588. var startB = startRGB[2];
  12589. var endRGB = hexToRgb(endColor, false);
  12590. var endR = endRGB[0];
  12591. var endG = endRGB[1];
  12592. var endB = endRGB[2];
  12593. var sR = (endR - startR) / step; // 总差值
  12594. var sG = (endG - startG) / step;
  12595. var sB = (endB - startB) / step;
  12596. var colorArr = [];
  12597. for (var i = 0; i < step; i++) {
  12598. // 计算每一步的hex值
  12599. var hex = rgbToHex("rgb(".concat(Math.round(sR * i + startR), ",").concat(Math.round(sG * i + startG), ",").concat(Math.round(sB * i + startB), ")"));
  12600. // 确保第一个颜色值为startColor的值
  12601. if (i === 0) hex = rgbToHex(startColor);
  12602. // 确保最后一个颜色值为endColor的值
  12603. if (i === step - 1) hex = rgbToHex(endColor);
  12604. colorArr.push(hex);
  12605. }
  12606. return colorArr;
  12607. }
  12608. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  12609. function hexToRgb(sColor) {
  12610. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  12611. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  12612. sColor = String(sColor).toLowerCase();
  12613. if (sColor && reg.test(sColor)) {
  12614. if (sColor.length === 4) {
  12615. var sColorNew = '#';
  12616. for (var i = 1; i < 4; i += 1) {
  12617. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  12618. }
  12619. sColor = sColorNew;
  12620. }
  12621. // 处理六位的颜色值
  12622. var sColorChange = [];
  12623. for (var _i = 1; _i < 7; _i += 2) {
  12624. sColorChange.push(parseInt("0x".concat(sColor.slice(_i, _i + 2))));
  12625. }
  12626. if (!str) {
  12627. return sColorChange;
  12628. }
  12629. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  12630. }
  12631. if (/^(rgb|RGB)/.test(sColor)) {
  12632. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',');
  12633. return arr.map(function (val) {
  12634. return Number(val);
  12635. });
  12636. }
  12637. return sColor;
  12638. }
  12639. // 将rgb表示方式转换为hex表示方式
  12640. function rgbToHex(rgb) {
  12641. var _this = rgb;
  12642. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  12643. if (/^(rgb|RGB)/.test(_this)) {
  12644. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',');
  12645. var strHex = '#';
  12646. for (var i = 0; i < aColor.length; i++) {
  12647. var hex = Number(aColor[i]).toString(16);
  12648. hex = String(hex).length == 1 ? "".concat(0, hex) : hex; // 保证每个rgb的值为2位
  12649. if (hex === '0') {
  12650. hex += hex;
  12651. }
  12652. strHex += hex;
  12653. }
  12654. if (strHex.length !== 7) {
  12655. strHex = _this;
  12656. }
  12657. return strHex;
  12658. }
  12659. if (reg.test(_this)) {
  12660. var aNum = _this.replace(/#/, '').split('');
  12661. if (aNum.length === 6) {
  12662. return _this;
  12663. }
  12664. if (aNum.length === 3) {
  12665. var numHex = '#';
  12666. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  12667. numHex += aNum[_i2] + aNum[_i2];
  12668. }
  12669. return numHex;
  12670. }
  12671. } else {
  12672. return _this;
  12673. }
  12674. }
  12675. /**
  12676. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  12677. * sHex为传入的十六进制的色值
  12678. * alpha为rgba的透明度
  12679. */
  12680. function colorToRgba(color, alpha) {
  12681. color = rgbToHex(color);
  12682. // 十六进制颜色值的正则表达式
  12683. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  12684. /* 16进制颜色转为RGB格式 */
  12685. var sColor = String(color).toLowerCase();
  12686. if (sColor && reg.test(sColor)) {
  12687. if (sColor.length === 4) {
  12688. var sColorNew = '#';
  12689. for (var i = 1; i < 4; i += 1) {
  12690. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  12691. }
  12692. sColor = sColorNew;
  12693. }
  12694. // 处理六位的颜色值
  12695. var sColorChange = [];
  12696. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  12697. sColorChange.push(parseInt("0x".concat(sColor.slice(_i3, _i3 + 2))));
  12698. }
  12699. // return sColorChange.join(',')
  12700. return "rgba(".concat(sColorChange.join(','), ",").concat(alpha, ")");
  12701. }
  12702. return sColor;
  12703. }
  12704. var _default = {
  12705. colorGradient: colorGradient,
  12706. hexToRgb: hexToRgb,
  12707. rgbToHex: rgbToHex,
  12708. colorToRgba: colorToRgba
  12709. };
  12710. exports.default = _default;
  12711. /***/ }),
  12712. /* 60 */
  12713. /*!*************************************************************************************************************!*\
  12714. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/function/test.js ***!
  12715. \*************************************************************************************************************/
  12716. /*! no static exports found */
  12717. /***/ (function(module, exports, __webpack_require__) {
  12718. "use strict";
  12719. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12720. Object.defineProperty(exports, "__esModule", {
  12721. value: true
  12722. });
  12723. exports.default = void 0;
  12724. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  12725. /**
  12726. * 验证电子邮箱格式
  12727. */
  12728. function email(value) {
  12729. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  12730. }
  12731. /**
  12732. * 验证手机格式
  12733. */
  12734. function mobile(value) {
  12735. return /^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(value);
  12736. }
  12737. /**
  12738. * 验证URL格式
  12739. */
  12740. function url(value) {
  12741. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value);
  12742. }
  12743. /**
  12744. * 验证日期格式
  12745. */
  12746. function date(value) {
  12747. if (!value) return false;
  12748. // 判断是否数值或者字符串数值(意味着为时间戳),转为数值,否则new Date无法识别字符串时间戳
  12749. if (number(value)) value = +value;
  12750. return !/Invalid|NaN/.test(new Date(value).toString());
  12751. }
  12752. /**
  12753. * 验证ISO类型的日期格式
  12754. */
  12755. function dateISO(value) {
  12756. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  12757. }
  12758. /**
  12759. * 验证十进制数字
  12760. */
  12761. function number(value) {
  12762. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  12763. }
  12764. /**
  12765. * 验证字符串
  12766. */
  12767. function string(value) {
  12768. return typeof value === 'string';
  12769. }
  12770. /**
  12771. * 验证整数
  12772. */
  12773. function digits(value) {
  12774. return /^\d+$/.test(value);
  12775. }
  12776. /**
  12777. * 验证身份证号码
  12778. */
  12779. function idCard(value) {
  12780. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  12781. }
  12782. /**
  12783. * 是否车牌号
  12784. */
  12785. function carNo(value) {
  12786. // 新能源车牌
  12787. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  12788. // 旧车牌
  12789. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  12790. if (value.length === 7) {
  12791. return creg.test(value);
  12792. }
  12793. if (value.length === 8) {
  12794. return xreg.test(value);
  12795. }
  12796. return false;
  12797. }
  12798. /**
  12799. * 金额,只允许2位小数
  12800. */
  12801. function amount(value) {
  12802. // 金额,只允许保留两位小数
  12803. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  12804. }
  12805. /**
  12806. * 中文
  12807. */
  12808. function chinese(value) {
  12809. var reg = /^[\u4e00-\u9fa5]+$/gi;
  12810. return reg.test(value);
  12811. }
  12812. /**
  12813. * 只能输入字母
  12814. */
  12815. function letter(value) {
  12816. return /^[a-zA-Z]*$/.test(value);
  12817. }
  12818. /**
  12819. * 只能是字母或者数字
  12820. */
  12821. function enOrNum(value) {
  12822. // 英文或者数字
  12823. var reg = /^[0-9a-zA-Z]*$/g;
  12824. return reg.test(value);
  12825. }
  12826. /**
  12827. * 验证是否包含某个值
  12828. */
  12829. function contains(value, param) {
  12830. return value.indexOf(param) >= 0;
  12831. }
  12832. /**
  12833. * 验证一个值范围[min, max]
  12834. */
  12835. function range(value, param) {
  12836. return value >= param[0] && value <= param[1];
  12837. }
  12838. /**
  12839. * 验证一个长度范围[min, max]
  12840. */
  12841. function rangeLength(value, param) {
  12842. return value.length >= param[0] && value.length <= param[1];
  12843. }
  12844. /**
  12845. * 是否固定电话
  12846. */
  12847. function landline(value) {
  12848. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  12849. return reg.test(value);
  12850. }
  12851. /**
  12852. * 判断是否为空
  12853. */
  12854. function empty(value) {
  12855. switch ((0, _typeof2.default)(value)) {
  12856. case 'undefined':
  12857. return true;
  12858. case 'string':
  12859. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  12860. break;
  12861. case 'boolean':
  12862. if (!value) return true;
  12863. break;
  12864. case 'number':
  12865. if (value === 0 || isNaN(value)) return true;
  12866. break;
  12867. case 'object':
  12868. if (value === null || value.length === 0) return true;
  12869. for (var i in value) {
  12870. return false;
  12871. }
  12872. return true;
  12873. }
  12874. return false;
  12875. }
  12876. /**
  12877. * 是否json字符串
  12878. */
  12879. function jsonString(value) {
  12880. if (typeof value === 'string') {
  12881. try {
  12882. var obj = JSON.parse(value);
  12883. if ((0, _typeof2.default)(obj) === 'object' && obj) {
  12884. return true;
  12885. }
  12886. return false;
  12887. } catch (e) {
  12888. return false;
  12889. }
  12890. }
  12891. return false;
  12892. }
  12893. /**
  12894. * 是否数组
  12895. */
  12896. function array(value) {
  12897. if (typeof Array.isArray === 'function') {
  12898. return Array.isArray(value);
  12899. }
  12900. return Object.prototype.toString.call(value) === '[object Array]';
  12901. }
  12902. /**
  12903. * 是否对象
  12904. */
  12905. function object(value) {
  12906. return Object.prototype.toString.call(value) === '[object Object]';
  12907. }
  12908. /**
  12909. * 是否短信验证码
  12910. */
  12911. function code(value) {
  12912. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  12913. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  12914. }
  12915. /**
  12916. * 是否函数方法
  12917. * @param {Object} value
  12918. */
  12919. function func(value) {
  12920. return typeof value === 'function';
  12921. }
  12922. /**
  12923. * 是否promise对象
  12924. * @param {Object} value
  12925. */
  12926. function promise(value) {
  12927. return object(value) && func(value.then) && func(value.catch);
  12928. }
  12929. /** 是否图片格式
  12930. * @param {Object} value
  12931. */
  12932. function image(value) {
  12933. var newValue = value.split('?')[0];
  12934. var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  12935. return IMAGE_REGEXP.test(newValue);
  12936. }
  12937. /**
  12938. * 是否视频格式
  12939. * @param {Object} value
  12940. */
  12941. function video(value) {
  12942. var VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  12943. return VIDEO_REGEXP.test(value);
  12944. }
  12945. /**
  12946. * 是否为正则对象
  12947. * @param {Object}
  12948. * @return {Boolean}
  12949. */
  12950. function regExp(o) {
  12951. return o && Object.prototype.toString.call(o) === '[object RegExp]';
  12952. }
  12953. var _default = {
  12954. email: email,
  12955. mobile: mobile,
  12956. url: url,
  12957. date: date,
  12958. dateISO: dateISO,
  12959. number: number,
  12960. digits: digits,
  12961. idCard: idCard,
  12962. carNo: carNo,
  12963. amount: amount,
  12964. chinese: chinese,
  12965. letter: letter,
  12966. enOrNum: enOrNum,
  12967. contains: contains,
  12968. range: range,
  12969. rangeLength: rangeLength,
  12970. empty: empty,
  12971. isEmpty: empty,
  12972. jsonString: jsonString,
  12973. landline: landline,
  12974. object: object,
  12975. array: array,
  12976. code: code,
  12977. func: func,
  12978. promise: promise,
  12979. video: video,
  12980. image: image,
  12981. regExp: regExp,
  12982. string: string
  12983. };
  12984. exports.default = _default;
  12985. /***/ }),
  12986. /* 61 */
  12987. /*!*****************************************************************************************************************!*\
  12988. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/function/debounce.js ***!
  12989. \*****************************************************************************************************************/
  12990. /*! no static exports found */
  12991. /***/ (function(module, exports, __webpack_require__) {
  12992. "use strict";
  12993. Object.defineProperty(exports, "__esModule", {
  12994. value: true
  12995. });
  12996. exports.default = void 0;
  12997. var timeout = null;
  12998. /**
  12999. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  13000. *
  13001. * @param {Function} func 要执行的回调函数
  13002. * @param {Number} wait 延时的时间
  13003. * @param {Boolean} immediate 是否立即执行
  13004. * @return null
  13005. */
  13006. function debounce(func) {
  13007. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  13008. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  13009. // 清除定时器
  13010. if (timeout !== null) clearTimeout(timeout);
  13011. // 立即执行,此类情况一般用不到
  13012. if (immediate) {
  13013. var callNow = !timeout;
  13014. timeout = setTimeout(function () {
  13015. timeout = null;
  13016. }, wait);
  13017. if (callNow) typeof func === 'function' && func();
  13018. } else {
  13019. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  13020. timeout = setTimeout(function () {
  13021. typeof func === 'function' && func();
  13022. }, wait);
  13023. }
  13024. }
  13025. var _default = debounce;
  13026. exports.default = _default;
  13027. /***/ }),
  13028. /* 62 */
  13029. /*!*****************************************************************************************************************!*\
  13030. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/function/throttle.js ***!
  13031. \*****************************************************************************************************************/
  13032. /*! no static exports found */
  13033. /***/ (function(module, exports, __webpack_require__) {
  13034. "use strict";
  13035. Object.defineProperty(exports, "__esModule", {
  13036. value: true
  13037. });
  13038. exports.default = void 0;
  13039. var timer;
  13040. var flag;
  13041. /**
  13042. * 节流原理:在一定时间内,只能触发一次
  13043. *
  13044. * @param {Function} func 要执行的回调函数
  13045. * @param {Number} wait 延时的时间
  13046. * @param {Boolean} immediate 是否立即执行
  13047. * @return null
  13048. */
  13049. function throttle(func) {
  13050. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  13051. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  13052. if (immediate) {
  13053. if (!flag) {
  13054. flag = true;
  13055. // 如果是立即执行,则在wait毫秒内开始时执行
  13056. typeof func === 'function' && func();
  13057. timer = setTimeout(function () {
  13058. flag = false;
  13059. }, wait);
  13060. }
  13061. } else if (!flag) {
  13062. flag = true;
  13063. // 如果是非立即执行,则在wait毫秒内的结束处执行
  13064. timer = setTimeout(function () {
  13065. flag = false;
  13066. typeof func === 'function' && func();
  13067. }, wait);
  13068. }
  13069. }
  13070. var _default = throttle;
  13071. exports.default = _default;
  13072. /***/ }),
  13073. /* 63 */
  13074. /*!**************************************************************************************************************!*\
  13075. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/function/index.js ***!
  13076. \**************************************************************************************************************/
  13077. /*! no static exports found */
  13078. /***/ (function(module, exports, __webpack_require__) {
  13079. "use strict";
  13080. /* WEBPACK VAR INJECTION */(function(uni) {
  13081. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13082. Object.defineProperty(exports, "__esModule", {
  13083. value: true
  13084. });
  13085. exports.default = void 0;
  13086. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  13087. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  13088. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 60));
  13089. var _digit = __webpack_require__(/*! ./digit.js */ 64);
  13090. /**
  13091. * @description 如果value小于min,取min;如果value大于max,取max
  13092. * @param {number} min
  13093. * @param {number} max
  13094. * @param {number} value
  13095. */
  13096. function range() {
  13097. var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  13098. var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  13099. var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  13100. return Math.max(min, Math.min(max, Number(value)));
  13101. }
  13102. /**
  13103. * @description 用于获取用户传递值的px值 如果用户传递了"xxpx"或者"xxrpx",取出其数值部分,如果是"xxxrpx"还需要用过uni.upx2px进行转换
  13104. * @param {number|string} value 用户传递值的px值
  13105. * @param {boolean} unit
  13106. * @returns {number|string}
  13107. */
  13108. function getPx(value) {
  13109. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  13110. if (_test.default.number(value)) {
  13111. return unit ? "".concat(value, "px") : Number(value);
  13112. }
  13113. // 如果带有rpx,先取出其数值部分,再转为px值
  13114. if (/(rpx|upx)$/.test(value)) {
  13115. return unit ? "".concat(uni.upx2px(parseInt(value)), "px") : Number(uni.upx2px(parseInt(value)));
  13116. }
  13117. return unit ? "".concat(parseInt(value), "px") : parseInt(value);
  13118. }
  13119. /**
  13120. * @description 进行延时,以达到可以简写代码的目的 比如: await uni.$u.sleep(20)将会阻塞20ms
  13121. * @param {number} value 堵塞时间 单位ms 毫秒
  13122. * @returns {Promise} 返回promise
  13123. */
  13124. function sleep() {
  13125. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 30;
  13126. return new Promise(function (resolve) {
  13127. setTimeout(function () {
  13128. resolve();
  13129. }, value);
  13130. });
  13131. }
  13132. /**
  13133. * @description 运行期判断平台
  13134. * @returns {string} 返回所在平台(小写)
  13135. * @link 运行期判断平台 https://uniapp.dcloud.io/frame?id=判断平台
  13136. */
  13137. function os() {
  13138. return uni.getSystemInfoSync().platform.toLowerCase();
  13139. }
  13140. /**
  13141. * @description 获取系统信息同步接口
  13142. * @link 获取系统信息同步接口 https://uniapp.dcloud.io/api/system/info?id=getsysteminfosync
  13143. */
  13144. function sys() {
  13145. return uni.getSystemInfoSync();
  13146. }
  13147. /**
  13148. * @description 取一个区间数
  13149. * @param {Number} min 最小值
  13150. * @param {Number} max 最大值
  13151. */
  13152. function random(min, max) {
  13153. if (min >= 0 && max > 0 && max >= min) {
  13154. var gab = max - min + 1;
  13155. return Math.floor(Math.random() * gab + min);
  13156. }
  13157. return 0;
  13158. }
  13159. /**
  13160. * @param {Number} len uuid的长度
  13161. * @param {Boolean} firstU 将返回的首字母置为"u"
  13162. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  13163. */
  13164. function guid() {
  13165. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  13166. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  13167. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  13168. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  13169. var uuid = [];
  13170. radix = radix || chars.length;
  13171. if (len) {
  13172. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  13173. for (var i = 0; i < len; i++) {
  13174. uuid[i] = chars[0 | Math.random() * radix];
  13175. }
  13176. } else {
  13177. var r;
  13178. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  13179. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  13180. uuid[14] = '4';
  13181. for (var _i = 0; _i < 36; _i++) {
  13182. if (!uuid[_i]) {
  13183. r = 0 | Math.random() * 16;
  13184. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  13185. }
  13186. }
  13187. }
  13188. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  13189. if (firstU) {
  13190. uuid.shift();
  13191. return "u".concat(uuid.join(''));
  13192. }
  13193. return uuid.join('');
  13194. }
  13195. /**
  13196. * @description 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  13197. this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  13198. 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  13199. 值(默认为undefined),就是查找最顶层的$parent
  13200. * @param {string|undefined} name 父组件的参数名
  13201. */
  13202. function $parent() {
  13203. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  13204. var parent = this.$parent;
  13205. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  13206. while (parent) {
  13207. // 父组件
  13208. if (parent.$options && parent.$options.name !== name) {
  13209. // 如果组件的name不相等,继续上一级寻找
  13210. parent = parent.$parent;
  13211. } else {
  13212. return parent;
  13213. }
  13214. }
  13215. return false;
  13216. }
  13217. /**
  13218. * @description 样式转换
  13219. * 对象转字符串,或者字符串转对象
  13220. * @param {object | string} customStyle 需要转换的目标
  13221. * @param {String} target 转换的目的,object-转为对象,string-转为字符串
  13222. * @returns {object|string}
  13223. */
  13224. function addStyle(customStyle) {
  13225. var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'object';
  13226. // 字符串转字符串,对象转对象情形,直接返回
  13227. if (_test.default.empty(customStyle) || (0, _typeof2.default)(customStyle) === 'object' && target === 'object' || target === 'string' && typeof customStyle === 'string') {
  13228. return customStyle;
  13229. }
  13230. // 字符串转对象
  13231. if (target === 'object') {
  13232. // 去除字符串样式中的两端空格(中间的空格不能去掉,比如padding: 20px 0如果去掉了就错了),空格是无用的
  13233. customStyle = trim(customStyle);
  13234. // 根据";"将字符串转为数组形式
  13235. var styleArray = customStyle.split(';');
  13236. var style = {};
  13237. // 历遍数组,拼接成对象
  13238. for (var i = 0; i < styleArray.length; i++) {
  13239. // 'font-size:20px;color:red;',如此最后字符串有";"的话,会导致styleArray最后一个元素为空字符串,这里需要过滤
  13240. if (styleArray[i]) {
  13241. var item = styleArray[i].split(':');
  13242. style[trim(item[0])] = trim(item[1]);
  13243. }
  13244. }
  13245. return style;
  13246. }
  13247. // 这里为对象转字符串形式
  13248. var string = '';
  13249. for (var _i2 in customStyle) {
  13250. // 驼峰转为中划线的形式,否则css内联样式,无法识别驼峰样式属性名
  13251. var key = _i2.replace(/([A-Z])/g, '-$1').toLowerCase();
  13252. string += "".concat(key, ":").concat(customStyle[_i2], ";");
  13253. }
  13254. // 去除两端空格
  13255. return trim(string);
  13256. }
  13257. /**
  13258. * @description 添加单位,如果有rpx,upx,%,px等单位结尾或者值为auto,直接返回,否则加上px单位结尾
  13259. * @param {string|number} value 需要添加单位的值
  13260. * @param {string} unit 添加的单位名 比如px
  13261. */
  13262. function addUnit() {
  13263. var _uni$$u$config$unit, _uni, _uni$$u, _uni$$u$config;
  13264. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  13265. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (_uni$$u$config$unit = (_uni = uni) === null || _uni === void 0 ? void 0 : (_uni$$u = _uni.$u) === null || _uni$$u === void 0 ? void 0 : (_uni$$u$config = _uni$$u.config) === null || _uni$$u$config === void 0 ? void 0 : _uni$$u$config.unit) !== null && _uni$$u$config$unit !== void 0 ? _uni$$u$config$unit : 'px';
  13266. value = String(value);
  13267. // 用uView内置验证规则中的number判断是否为数值
  13268. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  13269. }
  13270. /**
  13271. * @description 深度克隆
  13272. * @param {object} obj 需要深度克隆的对象
  13273. * @param cache 缓存
  13274. * @returns {*} 克隆后的对象或者原值(不是对象)
  13275. */
  13276. function deepClone(obj) {
  13277. var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new WeakMap();
  13278. if (obj === null || (0, _typeof2.default)(obj) !== 'object') return obj;
  13279. if (cache.has(obj)) return cache.get(obj);
  13280. var clone;
  13281. if (obj instanceof Date) {
  13282. clone = new Date(obj.getTime());
  13283. } else if (obj instanceof RegExp) {
  13284. clone = new RegExp(obj);
  13285. } else if (obj instanceof Map) {
  13286. clone = new Map(Array.from(obj, function (_ref) {
  13287. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  13288. key = _ref2[0],
  13289. value = _ref2[1];
  13290. return [key, deepClone(value, cache)];
  13291. }));
  13292. } else if (obj instanceof Set) {
  13293. clone = new Set(Array.from(obj, function (value) {
  13294. return deepClone(value, cache);
  13295. }));
  13296. } else if (Array.isArray(obj)) {
  13297. clone = obj.map(function (value) {
  13298. return deepClone(value, cache);
  13299. });
  13300. } else if (Object.prototype.toString.call(obj) === '[object Object]') {
  13301. clone = Object.create(Object.getPrototypeOf(obj));
  13302. cache.set(obj, clone);
  13303. for (var _i3 = 0, _Object$entries = Object.entries(obj); _i3 < _Object$entries.length; _i3++) {
  13304. var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i3], 2),
  13305. key = _Object$entries$_i[0],
  13306. value = _Object$entries$_i[1];
  13307. clone[key] = deepClone(value, cache);
  13308. }
  13309. } else {
  13310. clone = Object.assign({}, obj);
  13311. }
  13312. cache.set(obj, clone);
  13313. return clone;
  13314. }
  13315. /**
  13316. * @description JS对象深度合并
  13317. * @param {object} target 需要拷贝的对象
  13318. * @param {object} source 拷贝的来源对象
  13319. * @returns {object|boolean} 深度合并后的对象或者false(入参有不是对象)
  13320. */
  13321. function deepMerge() {
  13322. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  13323. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13324. target = deepClone(target);
  13325. if ((0, _typeof2.default)(target) !== 'object' || target === null || (0, _typeof2.default)(source) !== 'object' || source === null) return target;
  13326. var merged = Array.isArray(target) ? target.slice() : Object.assign({}, target);
  13327. for (var prop in source) {
  13328. if (!source.hasOwnProperty(prop)) continue;
  13329. var sourceValue = source[prop];
  13330. var targetValue = merged[prop];
  13331. if (sourceValue instanceof Date) {
  13332. merged[prop] = new Date(sourceValue);
  13333. } else if (sourceValue instanceof RegExp) {
  13334. merged[prop] = new RegExp(sourceValue);
  13335. } else if (sourceValue instanceof Map) {
  13336. merged[prop] = new Map(sourceValue);
  13337. } else if (sourceValue instanceof Set) {
  13338. merged[prop] = new Set(sourceValue);
  13339. } else if ((0, _typeof2.default)(sourceValue) === 'object' && sourceValue !== null) {
  13340. merged[prop] = deepMerge(targetValue, sourceValue);
  13341. } else {
  13342. merged[prop] = sourceValue;
  13343. }
  13344. }
  13345. return merged;
  13346. }
  13347. /**
  13348. * @description error提示
  13349. * @param {*} err 错误内容
  13350. */
  13351. function error(err) {
  13352. // 开发环境才提示,生产环境不会提示
  13353. if (true) {
  13354. console.error("uView\u63D0\u793A\uFF1A".concat(err));
  13355. }
  13356. }
  13357. /**
  13358. * @description 打乱数组
  13359. * @param {array} array 需要打乱的数组
  13360. * @returns {array} 打乱后的数组
  13361. */
  13362. function randomArray() {
  13363. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  13364. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  13365. return array.sort(function () {
  13366. return Math.random() - 0.5;
  13367. });
  13368. }
  13369. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  13370. // 所以这里做一个兼容polyfill的兼容处理
  13371. if (!String.prototype.padStart) {
  13372. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  13373. String.prototype.padStart = function (maxLength) {
  13374. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  13375. if (Object.prototype.toString.call(fillString) !== '[object String]') {
  13376. throw new TypeError('fillString must be String');
  13377. }
  13378. var str = this;
  13379. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  13380. if (str.length >= maxLength) return String(str);
  13381. var fillLength = maxLength - str.length;
  13382. var times = Math.ceil(fillLength / fillString.length);
  13383. while (times >>= 1) {
  13384. fillString += fillString;
  13385. if (times === 1) {
  13386. fillString += fillString;
  13387. }
  13388. }
  13389. return fillString.slice(0, fillLength) + str;
  13390. };
  13391. }
  13392. /**
  13393. * @description 格式化时间
  13394. * @param {String|Number} dateTime 需要格式化的时间戳
  13395. * @param {String} fmt 格式化规则 yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 默认yyyy-mm-dd
  13396. * @returns {string} 返回格式化后的字符串
  13397. */
  13398. function timeFormat() {
  13399. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  13400. var formatStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  13401. var date;
  13402. // 若传入时间为假值,则取当前时间
  13403. if (!dateTime) {
  13404. date = new Date();
  13405. }
  13406. // 若为unix秒时间戳,则转为毫秒时间戳(逻辑有点奇怪,但不敢改,以保证历史兼容)
  13407. else if (/^\d{10}$/.test(dateTime === null || dateTime === void 0 ? void 0 : dateTime.toString().trim())) {
  13408. date = new Date(dateTime * 1000);
  13409. }
  13410. // 若用户传入字符串格式时间戳,new Date无法解析,需做兼容
  13411. else if (typeof dateTime === 'string' && /^\d+$/.test(dateTime.trim())) {
  13412. date = new Date(Number(dateTime));
  13413. }
  13414. // 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间
  13415. // 处理 '2022-07-10 01:02:03',跳过 '2022-07-10T01:02:03'
  13416. else if (typeof dateTime === 'string' && dateTime.includes('-') && !dateTime.includes('T')) {
  13417. date = new Date(dateTime.replace(/-/g, '/'));
  13418. }
  13419. // 其他都认为符合 RFC 2822 规范
  13420. else {
  13421. date = new Date(dateTime);
  13422. }
  13423. var timeSource = {
  13424. 'y': date.getFullYear().toString(),
  13425. // 年
  13426. 'm': (date.getMonth() + 1).toString().padStart(2, '0'),
  13427. // 月
  13428. 'd': date.getDate().toString().padStart(2, '0'),
  13429. // 日
  13430. 'h': date.getHours().toString().padStart(2, '0'),
  13431. // 时
  13432. 'M': date.getMinutes().toString().padStart(2, '0'),
  13433. // 分
  13434. 's': date.getSeconds().toString().padStart(2, '0') // 秒
  13435. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  13436. };
  13437. for (var key in timeSource) {
  13438. var _ref3 = new RegExp("".concat(key, "+")).exec(formatStr) || [],
  13439. _ref4 = (0, _slicedToArray2.default)(_ref3, 1),
  13440. ret = _ref4[0];
  13441. if (ret) {
  13442. // 年可能只需展示两位
  13443. var beginIndex = key === 'y' && ret.length === 2 ? 2 : 0;
  13444. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  13445. }
  13446. }
  13447. return formatStr;
  13448. }
  13449. /**
  13450. * @description 时间戳转为多久之前
  13451. * @param {String|Number} timestamp 时间戳
  13452. * @param {String|Boolean} format
  13453. * 格式化规则如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  13454. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  13455. * @returns {string} 转化后的内容
  13456. */
  13457. function timeFrom() {
  13458. var timestamp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  13459. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  13460. if (timestamp == null) timestamp = Number(new Date());
  13461. timestamp = parseInt(timestamp);
  13462. // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位)
  13463. if (timestamp.toString().length == 10) timestamp *= 1000;
  13464. var timer = new Date().getTime() - timestamp;
  13465. timer = parseInt(timer / 1000);
  13466. // 如果小于5分钟,则返回"刚刚",其他以此类推
  13467. var tips = '';
  13468. switch (true) {
  13469. case timer < 300:
  13470. tips = '刚刚';
  13471. break;
  13472. case timer >= 300 && timer < 3600:
  13473. tips = "".concat(parseInt(timer / 60), "\u5206\u949F\u524D");
  13474. break;
  13475. case timer >= 3600 && timer < 86400:
  13476. tips = "".concat(parseInt(timer / 3600), "\u5C0F\u65F6\u524D");
  13477. break;
  13478. case timer >= 86400 && timer < 2592000:
  13479. tips = "".concat(parseInt(timer / 86400), "\u5929\u524D");
  13480. break;
  13481. default:
  13482. // 如果format为false,则无论什么时间戳,都显示xx之前
  13483. if (format === false) {
  13484. if (timer >= 2592000 && timer < 365 * 86400) {
  13485. tips = "".concat(parseInt(timer / (86400 * 30)), "\u4E2A\u6708\u524D");
  13486. } else {
  13487. tips = "".concat(parseInt(timer / (86400 * 365)), "\u5E74\u524D");
  13488. }
  13489. } else {
  13490. tips = timeFormat(timestamp, format);
  13491. }
  13492. }
  13493. return tips;
  13494. }
  13495. /**
  13496. * @description 去除空格
  13497. * @param String str 需要去除空格的字符串
  13498. * @param String pos both(左右)|left|right|all 默认both
  13499. */
  13500. function trim(str) {
  13501. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  13502. str = String(str);
  13503. if (pos == 'both') {
  13504. return str.replace(/^\s+|\s+$/g, '');
  13505. }
  13506. if (pos == 'left') {
  13507. return str.replace(/^\s*/, '');
  13508. }
  13509. if (pos == 'right') {
  13510. return str.replace(/(\s*$)/g, '');
  13511. }
  13512. if (pos == 'all') {
  13513. return str.replace(/\s+/g, '');
  13514. }
  13515. return str;
  13516. }
  13517. /**
  13518. * @description 对象转url参数
  13519. * @param {object} data,对象
  13520. * @param {Boolean} isPrefix,是否自动加上"?"
  13521. * @param {string} arrayFormat 规则 indices|brackets|repeat|comma
  13522. */
  13523. function queryParams() {
  13524. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  13525. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  13526. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  13527. var prefix = isPrefix ? '?' : '';
  13528. var _result = [];
  13529. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  13530. var _loop = function _loop(key) {
  13531. var value = data[key];
  13532. // 去掉为空的参数
  13533. if (['', undefined, null].indexOf(value) >= 0) {
  13534. return "continue";
  13535. }
  13536. // 如果值为数组,另行处理
  13537. if (value.constructor === Array) {
  13538. // e.g. {ids: [1, 2, 3]}
  13539. switch (arrayFormat) {
  13540. case 'indices':
  13541. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  13542. for (var i = 0; i < value.length; i++) {
  13543. _result.push("".concat(key, "[").concat(i, "]=").concat(value[i]));
  13544. }
  13545. break;
  13546. case 'brackets':
  13547. // 结果: ids[]=1&ids[]=2&ids[]=3
  13548. value.forEach(function (_value) {
  13549. _result.push("".concat(key, "[]=").concat(_value));
  13550. });
  13551. break;
  13552. case 'repeat':
  13553. // 结果: ids=1&ids=2&ids=3
  13554. value.forEach(function (_value) {
  13555. _result.push("".concat(key, "=").concat(_value));
  13556. });
  13557. break;
  13558. case 'comma':
  13559. // 结果: ids=1,2,3
  13560. var commaStr = '';
  13561. value.forEach(function (_value) {
  13562. commaStr += (commaStr ? ',' : '') + _value;
  13563. });
  13564. _result.push("".concat(key, "=").concat(commaStr));
  13565. break;
  13566. default:
  13567. value.forEach(function (_value) {
  13568. _result.push("".concat(key, "[]=").concat(_value));
  13569. });
  13570. }
  13571. } else {
  13572. _result.push("".concat(key, "=").concat(value));
  13573. }
  13574. };
  13575. for (var key in data) {
  13576. var _ret = _loop(key);
  13577. if (_ret === "continue") continue;
  13578. }
  13579. return _result.length ? prefix + _result.join('&') : '';
  13580. }
  13581. /**
  13582. * 显示消息提示框
  13583. * @param {String} title 提示的内容,长度与 icon 取值有关。
  13584. * @param {Number} duration 提示的延迟时间,单位毫秒,默认:2000
  13585. */
  13586. function toast(title) {
  13587. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
  13588. uni.showToast({
  13589. title: String(title),
  13590. icon: 'none',
  13591. duration: duration
  13592. });
  13593. }
  13594. /**
  13595. * @description 根据主题type值,获取对应的图标
  13596. * @param {String} type 主题名称,primary|info|error|warning|success
  13597. * @param {boolean} fill 是否使用fill填充实体的图标
  13598. */
  13599. function type2icon() {
  13600. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  13601. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  13602. // 如果非预置值,默认为success
  13603. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  13604. var iconName = '';
  13605. // 目前(2019-12-12),info和primary使用同一个图标
  13606. switch (type) {
  13607. case 'primary':
  13608. iconName = 'info-circle';
  13609. break;
  13610. case 'info':
  13611. iconName = 'info-circle';
  13612. break;
  13613. case 'error':
  13614. iconName = 'close-circle';
  13615. break;
  13616. case 'warning':
  13617. iconName = 'error-circle';
  13618. break;
  13619. case 'success':
  13620. iconName = 'checkmark-circle';
  13621. break;
  13622. default:
  13623. iconName = 'checkmark-circle';
  13624. }
  13625. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  13626. if (fill) iconName += '-fill';
  13627. return iconName;
  13628. }
  13629. /**
  13630. * @description 数字格式化
  13631. * @param {number|string} number 要格式化的数字
  13632. * @param {number} decimals 保留几位小数
  13633. * @param {string} decimalPoint 小数点符号
  13634. * @param {string} thousandsSeparator 千分位符号
  13635. * @returns {string} 格式化后的数字
  13636. */
  13637. function priceFormat(number) {
  13638. var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  13639. var decimalPoint = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
  13640. var thousandsSeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ',';
  13641. number = "".concat(number).replace(/[^0-9+-Ee.]/g, '');
  13642. var n = !isFinite(+number) ? 0 : +number;
  13643. var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  13644. var sep = typeof thousandsSeparator === 'undefined' ? ',' : thousandsSeparator;
  13645. var dec = typeof decimalPoint === 'undefined' ? '.' : decimalPoint;
  13646. var s = '';
  13647. s = (prec ? (0, _digit.round)(n, prec) + '' : "".concat(Math.round(n))).split('.');
  13648. var re = /(-?\d+)(\d{3})/;
  13649. while (re.test(s[0])) {
  13650. s[0] = s[0].replace(re, "$1".concat(sep, "$2"));
  13651. }
  13652. if ((s[1] || '').length < prec) {
  13653. s[1] = s[1] || '';
  13654. s[1] += new Array(prec - s[1].length + 1).join('0');
  13655. }
  13656. return s.join(dec);
  13657. }
  13658. /**
  13659. * @description 获取duration值
  13660. * 如果带有ms或者s直接返回,如果大于一定值,认为是ms单位,小于一定值,认为是s单位
  13661. * 比如以30位阈值,那么300大于30,可以理解为用户想要的是300ms,而不是想花300s去执行一个动画
  13662. * @param {String|number} value 比如: "1s"|"100ms"|1|100
  13663. * @param {boolean} unit 提示: 如果是false 默认返回number
  13664. * @return {string|number}
  13665. */
  13666. function getDuration(value) {
  13667. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  13668. var valueNum = parseInt(value);
  13669. if (unit) {
  13670. if (/s$/.test(value)) return value;
  13671. return value > 30 ? "".concat(value, "ms") : "".concat(value, "s");
  13672. }
  13673. if (/ms$/.test(value)) return valueNum;
  13674. if (/s$/.test(value)) return valueNum > 30 ? valueNum : valueNum * 1000;
  13675. return valueNum;
  13676. }
  13677. /**
  13678. * @description 日期的月或日补零操作
  13679. * @param {String} value 需要补零的值
  13680. */
  13681. function padZero(value) {
  13682. return "00".concat(value).slice(-2);
  13683. }
  13684. /**
  13685. * @description 在u-form的子组件内容发生变化,或者失去焦点时,尝试通知u-form执行校验方法
  13686. * @param {*} instance
  13687. * @param {*} event
  13688. */
  13689. function formValidate(instance, event) {
  13690. var formItem = uni.$u.$parent.call(instance, 'u-form-item');
  13691. var form = uni.$u.$parent.call(instance, 'u-form');
  13692. // 如果发生变化的input或者textarea等,其父组件中有u-form-item或者u-form等,就执行form的validate方法
  13693. // 同时将form-item的pros传递给form,让其进行精确对象验证
  13694. if (formItem && form) {
  13695. form.validateField(formItem.prop, function () {}, event);
  13696. }
  13697. }
  13698. /**
  13699. * @description 获取某个对象下的属性,用于通过类似'a.b.c'的形式去获取一个对象的的属性的形式
  13700. * @param {object} obj 对象
  13701. * @param {string} key 需要获取的属性字段
  13702. * @returns {*}
  13703. */
  13704. function getProperty(obj, key) {
  13705. if (!obj) {
  13706. return;
  13707. }
  13708. if (typeof key !== 'string' || key === '') {
  13709. return '';
  13710. }
  13711. if (key.indexOf('.') !== -1) {
  13712. var keys = key.split('.');
  13713. var firstObj = obj[keys[0]] || {};
  13714. for (var i = 1; i < keys.length; i++) {
  13715. if (firstObj) {
  13716. firstObj = firstObj[keys[i]];
  13717. }
  13718. }
  13719. return firstObj;
  13720. }
  13721. return obj[key];
  13722. }
  13723. /**
  13724. * @description 设置对象的属性值,如果'a.b.c'的形式进行设置
  13725. * @param {object} obj 对象
  13726. * @param {string} key 需要设置的属性
  13727. * @param {string} value 设置的值
  13728. */
  13729. function setProperty(obj, key, value) {
  13730. if (!obj) {
  13731. return;
  13732. }
  13733. // 递归赋值
  13734. var inFn = function inFn(_obj, keys, v) {
  13735. // 最后一个属性key
  13736. if (keys.length === 1) {
  13737. _obj[keys[0]] = v;
  13738. return;
  13739. }
  13740. // 0~length-1个key
  13741. while (keys.length > 1) {
  13742. var k = keys[0];
  13743. if (!_obj[k] || (0, _typeof2.default)(_obj[k]) !== 'object') {
  13744. _obj[k] = {};
  13745. }
  13746. var _key = keys.shift();
  13747. // 自调用判断是否存在属性,不存在则自动创建对象
  13748. inFn(_obj[k], keys, v);
  13749. }
  13750. };
  13751. if (typeof key !== 'string' || key === '') {} else if (key.indexOf('.') !== -1) {
  13752. // 支持多层级赋值操作
  13753. var keys = key.split('.');
  13754. inFn(obj, keys, value);
  13755. } else {
  13756. obj[key] = value;
  13757. }
  13758. }
  13759. /**
  13760. * @description 获取当前页面路径
  13761. */
  13762. function page() {
  13763. var _pages$route, _pages;
  13764. var pages = getCurrentPages();
  13765. // 某些特殊情况下(比如页面进行redirectTo时的一些时机),pages可能为空数组
  13766. return "/".concat((_pages$route = (_pages = pages[pages.length - 1]) === null || _pages === void 0 ? void 0 : _pages.route) !== null && _pages$route !== void 0 ? _pages$route : '');
  13767. }
  13768. /**
  13769. * @description 获取当前路由栈实例数组
  13770. */
  13771. function pages() {
  13772. var pages = getCurrentPages();
  13773. return pages;
  13774. }
  13775. /**
  13776. * 获取页面历史栈指定层实例
  13777. * @param back {number} [0] - 0或者负数,表示获取历史栈的哪一层,0表示获取当前页面实例,-1 表示获取上一个页面实例。默认0。
  13778. */
  13779. function getHistoryPage() {
  13780. var back = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  13781. var pages = getCurrentPages();
  13782. var len = pages.length;
  13783. return pages[len - 1 + back];
  13784. }
  13785. /**
  13786. * @description 修改uView内置属性值
  13787. * @param {object} props 修改内置props属性
  13788. * @param {object} config 修改内置config属性
  13789. * @param {object} color 修改内置color属性
  13790. * @param {object} zIndex 修改内置zIndex属性
  13791. */
  13792. function setConfig(_ref5) {
  13793. var _ref5$props = _ref5.props,
  13794. props = _ref5$props === void 0 ? {} : _ref5$props,
  13795. _ref5$config = _ref5.config,
  13796. config = _ref5$config === void 0 ? {} : _ref5$config,
  13797. _ref5$color = _ref5.color,
  13798. color = _ref5$color === void 0 ? {} : _ref5$color,
  13799. _ref5$zIndex = _ref5.zIndex,
  13800. zIndex = _ref5$zIndex === void 0 ? {} : _ref5$zIndex;
  13801. var deepMerge = uni.$u.deepMerge;
  13802. uni.$u.config = deepMerge(uni.$u.config, config);
  13803. uni.$u.props = deepMerge(uni.$u.props, props);
  13804. uni.$u.color = deepMerge(uni.$u.color, color);
  13805. uni.$u.zIndex = deepMerge(uni.$u.zIndex, zIndex);
  13806. }
  13807. var _default = {
  13808. range: range,
  13809. getPx: getPx,
  13810. sleep: sleep,
  13811. os: os,
  13812. sys: sys,
  13813. random: random,
  13814. guid: guid,
  13815. $parent: $parent,
  13816. addStyle: addStyle,
  13817. addUnit: addUnit,
  13818. deepClone: deepClone,
  13819. deepMerge: deepMerge,
  13820. error: error,
  13821. randomArray: randomArray,
  13822. timeFormat: timeFormat,
  13823. timeFrom: timeFrom,
  13824. trim: trim,
  13825. queryParams: queryParams,
  13826. toast: toast,
  13827. type2icon: type2icon,
  13828. priceFormat: priceFormat,
  13829. getDuration: getDuration,
  13830. padZero: padZero,
  13831. formValidate: formValidate,
  13832. getProperty: getProperty,
  13833. setProperty: setProperty,
  13834. page: page,
  13835. pages: pages,
  13836. getHistoryPage: getHistoryPage,
  13837. setConfig: setConfig
  13838. };
  13839. exports.default = _default;
  13840. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  13841. /***/ }),
  13842. /* 64 */
  13843. /*!**************************************************************************************************************!*\
  13844. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/function/digit.js ***!
  13845. \**************************************************************************************************************/
  13846. /*! no static exports found */
  13847. /***/ (function(module, exports, __webpack_require__) {
  13848. "use strict";
  13849. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13850. Object.defineProperty(exports, "__esModule", {
  13851. value: true
  13852. });
  13853. exports.default = void 0;
  13854. exports.divide = divide;
  13855. exports.enableBoundaryChecking = enableBoundaryChecking;
  13856. exports.minus = minus;
  13857. exports.plus = plus;
  13858. exports.round = round;
  13859. exports.times = times;
  13860. var _toArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toArray */ 65));
  13861. var _boundaryCheckingState = true; // 是否进行越界检查的全局开关
  13862. /**
  13863. * 把错误的数据转正
  13864. * @private
  13865. * @example strip(0.09999999999999998)=0.1
  13866. */
  13867. function strip(num) {
  13868. var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15;
  13869. return +parseFloat(Number(num).toPrecision(precision));
  13870. }
  13871. /**
  13872. * Return digits length of a number
  13873. * @private
  13874. * @param {*number} num Input number
  13875. */
  13876. function digitLength(num) {
  13877. // Get digit length of e
  13878. var eSplit = num.toString().split(/[eE]/);
  13879. var len = (eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0);
  13880. return len > 0 ? len : 0;
  13881. }
  13882. /**
  13883. * 把小数转成整数,如果是小数则放大成整数
  13884. * @private
  13885. * @param {*number} num 输入数
  13886. */
  13887. function float2Fixed(num) {
  13888. if (num.toString().indexOf('e') === -1) {
  13889. return Number(num.toString().replace('.', ''));
  13890. }
  13891. var dLen = digitLength(num);
  13892. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  13893. }
  13894. /**
  13895. * 检测数字是否越界,如果越界给出提示
  13896. * @private
  13897. * @param {*number} num 输入数
  13898. */
  13899. function checkBoundary(num) {
  13900. if (_boundaryCheckingState) {
  13901. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  13902. console.warn("".concat(num, " \u8D85\u51FA\u4E86\u7CBE\u5EA6\u9650\u5236\uFF0C\u7ED3\u679C\u53EF\u80FD\u4E0D\u6B63\u786E"));
  13903. }
  13904. }
  13905. }
  13906. /**
  13907. * 把递归操作扁平迭代化
  13908. * @param {number[]} arr 要操作的数字数组
  13909. * @param {function} operation 迭代操作
  13910. * @private
  13911. */
  13912. function iteratorOperation(arr, operation) {
  13913. var _arr = (0, _toArray2.default)(arr),
  13914. num1 = _arr[0],
  13915. num2 = _arr[1],
  13916. others = _arr.slice(2);
  13917. var res = operation(num1, num2);
  13918. others.forEach(function (num) {
  13919. res = operation(res, num);
  13920. });
  13921. return res;
  13922. }
  13923. /**
  13924. * 高精度乘法
  13925. * @export
  13926. */
  13927. function times() {
  13928. for (var _len = arguments.length, nums = new Array(_len), _key = 0; _key < _len; _key++) {
  13929. nums[_key] = arguments[_key];
  13930. }
  13931. if (nums.length > 2) {
  13932. return iteratorOperation(nums, times);
  13933. }
  13934. var num1 = nums[0],
  13935. num2 = nums[1];
  13936. var num1Changed = float2Fixed(num1);
  13937. var num2Changed = float2Fixed(num2);
  13938. var baseNum = digitLength(num1) + digitLength(num2);
  13939. var leftValue = num1Changed * num2Changed;
  13940. checkBoundary(leftValue);
  13941. return leftValue / Math.pow(10, baseNum);
  13942. }
  13943. /**
  13944. * 高精度加法
  13945. * @export
  13946. */
  13947. function plus() {
  13948. for (var _len2 = arguments.length, nums = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  13949. nums[_key2] = arguments[_key2];
  13950. }
  13951. if (nums.length > 2) {
  13952. return iteratorOperation(nums, plus);
  13953. }
  13954. var num1 = nums[0],
  13955. num2 = nums[1];
  13956. // 取最大的小数位
  13957. var baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));
  13958. // 把小数都转为整数然后再计算
  13959. return (times(num1, baseNum) + times(num2, baseNum)) / baseNum;
  13960. }
  13961. /**
  13962. * 高精度减法
  13963. * @export
  13964. */
  13965. function minus() {
  13966. for (var _len3 = arguments.length, nums = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  13967. nums[_key3] = arguments[_key3];
  13968. }
  13969. if (nums.length > 2) {
  13970. return iteratorOperation(nums, minus);
  13971. }
  13972. var num1 = nums[0],
  13973. num2 = nums[1];
  13974. var baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));
  13975. return (times(num1, baseNum) - times(num2, baseNum)) / baseNum;
  13976. }
  13977. /**
  13978. * 高精度除法
  13979. * @export
  13980. */
  13981. function divide() {
  13982. for (var _len4 = arguments.length, nums = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  13983. nums[_key4] = arguments[_key4];
  13984. }
  13985. if (nums.length > 2) {
  13986. return iteratorOperation(nums, divide);
  13987. }
  13988. var num1 = nums[0],
  13989. num2 = nums[1];
  13990. var num1Changed = float2Fixed(num1);
  13991. var num2Changed = float2Fixed(num2);
  13992. checkBoundary(num1Changed);
  13993. checkBoundary(num2Changed);
  13994. // 重要,这里必须用strip进行修正
  13995. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  13996. }
  13997. /**
  13998. * 四舍五入
  13999. * @export
  14000. */
  14001. function round(num, ratio) {
  14002. var base = Math.pow(10, ratio);
  14003. var result = divide(Math.round(Math.abs(times(num, base))), base);
  14004. if (num < 0 && result !== 0) {
  14005. result = times(result, -1);
  14006. }
  14007. // 位数不足则补0
  14008. return result;
  14009. }
  14010. /**
  14011. * 是否进行边界检查,默认开启
  14012. * @param flag 标记开关,true 为开启,false 为关闭,默认为 true
  14013. * @export
  14014. */
  14015. function enableBoundaryChecking() {
  14016. var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  14017. _boundaryCheckingState = flag;
  14018. }
  14019. var _default = {
  14020. times: times,
  14021. plus: plus,
  14022. minus: minus,
  14023. divide: divide,
  14024. round: round,
  14025. enableBoundaryChecking: enableBoundaryChecking
  14026. };
  14027. exports.default = _default;
  14028. /***/ }),
  14029. /* 65 */
  14030. /*!********************************************************!*\
  14031. !*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
  14032. \********************************************************/
  14033. /*! no static exports found */
  14034. /***/ (function(module, exports, __webpack_require__) {
  14035. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  14036. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  14037. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  14038. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  14039. function _toArray(arr) {
  14040. return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();
  14041. }
  14042. module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  14043. /***/ }),
  14044. /* 66 */
  14045. /*!*************************************************************************************************************!*\
  14046. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/config.js ***!
  14047. \*************************************************************************************************************/
  14048. /*! no static exports found */
  14049. /***/ (function(module, exports, __webpack_require__) {
  14050. "use strict";
  14051. Object.defineProperty(exports, "__esModule", {
  14052. value: true
  14053. });
  14054. exports.default = void 0;
  14055. // 此版本发布于2024-10-29
  14056. var version = '2.0.38';
  14057. // 开发环境才提示,生产环境不会提示
  14058. if (true) {
  14059. console.log("\n %c uView V".concat(version, " %c https://uviewui.com/ \n\n"), 'color: #ffffff; background: #3c9cff; padding:5px 0; border-radius: 5px;');
  14060. }
  14061. var _default = {
  14062. v: version,
  14063. version: version,
  14064. // 主题名称
  14065. type: ['primary', 'success', 'info', 'error', 'warning'],
  14066. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  14067. color: {
  14068. 'u-primary': '#2979ff',
  14069. 'u-warning': '#ff9900',
  14070. 'u-success': '#19be6b',
  14071. 'u-error': '#fa3534',
  14072. 'u-info': '#909399',
  14073. 'u-main-color': '#303133',
  14074. 'u-content-color': '#606266',
  14075. 'u-tips-color': '#909399',
  14076. 'u-light-color': '#c0c4cc'
  14077. },
  14078. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  14079. unit: 'px'
  14080. };
  14081. exports.default = _default;
  14082. /***/ }),
  14083. /* 67 */
  14084. /*!************************************************************************************************************!*\
  14085. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props.js ***!
  14086. \************************************************************************************************************/
  14087. /*! no static exports found */
  14088. /***/ (function(module, exports, __webpack_require__) {
  14089. "use strict";
  14090. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14091. Object.defineProperty(exports, "__esModule", {
  14092. value: true
  14093. });
  14094. exports.default = void 0;
  14095. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  14096. var _config = _interopRequireDefault(__webpack_require__(/*! ./config */ 66));
  14097. var _actionSheet = _interopRequireDefault(__webpack_require__(/*! ./props/actionSheet.js */ 68));
  14098. var _album = _interopRequireDefault(__webpack_require__(/*! ./props/album.js */ 69));
  14099. var _alert = _interopRequireDefault(__webpack_require__(/*! ./props/alert.js */ 70));
  14100. var _avatar = _interopRequireDefault(__webpack_require__(/*! ./props/avatar */ 71));
  14101. var _avatarGroup = _interopRequireDefault(__webpack_require__(/*! ./props/avatarGroup */ 72));
  14102. var _backtop = _interopRequireDefault(__webpack_require__(/*! ./props/backtop */ 73));
  14103. var _badge = _interopRequireDefault(__webpack_require__(/*! ./props/badge */ 74));
  14104. var _button = _interopRequireDefault(__webpack_require__(/*! ./props/button */ 75));
  14105. var _calendar = _interopRequireDefault(__webpack_require__(/*! ./props/calendar */ 76));
  14106. var _carKeyboard = _interopRequireDefault(__webpack_require__(/*! ./props/carKeyboard */ 77));
  14107. var _cell = _interopRequireDefault(__webpack_require__(/*! ./props/cell */ 78));
  14108. var _cellGroup = _interopRequireDefault(__webpack_require__(/*! ./props/cellGroup */ 79));
  14109. var _checkbox = _interopRequireDefault(__webpack_require__(/*! ./props/checkbox */ 80));
  14110. var _checkboxGroup = _interopRequireDefault(__webpack_require__(/*! ./props/checkboxGroup */ 81));
  14111. var _circleProgress = _interopRequireDefault(__webpack_require__(/*! ./props/circleProgress */ 82));
  14112. var _code = _interopRequireDefault(__webpack_require__(/*! ./props/code */ 83));
  14113. var _codeInput = _interopRequireDefault(__webpack_require__(/*! ./props/codeInput */ 84));
  14114. var _col = _interopRequireDefault(__webpack_require__(/*! ./props/col */ 85));
  14115. var _collapse = _interopRequireDefault(__webpack_require__(/*! ./props/collapse */ 86));
  14116. var _collapseItem = _interopRequireDefault(__webpack_require__(/*! ./props/collapseItem */ 87));
  14117. var _columnNotice = _interopRequireDefault(__webpack_require__(/*! ./props/columnNotice */ 88));
  14118. var _countDown = _interopRequireDefault(__webpack_require__(/*! ./props/countDown */ 89));
  14119. var _countTo = _interopRequireDefault(__webpack_require__(/*! ./props/countTo */ 90));
  14120. var _datetimePicker = _interopRequireDefault(__webpack_require__(/*! ./props/datetimePicker */ 91));
  14121. var _divider = _interopRequireDefault(__webpack_require__(/*! ./props/divider */ 92));
  14122. var _empty = _interopRequireDefault(__webpack_require__(/*! ./props/empty */ 93));
  14123. var _form = _interopRequireDefault(__webpack_require__(/*! ./props/form */ 94));
  14124. var _formItem = _interopRequireDefault(__webpack_require__(/*! ./props/formItem */ 95));
  14125. var _gap = _interopRequireDefault(__webpack_require__(/*! ./props/gap */ 96));
  14126. var _grid = _interopRequireDefault(__webpack_require__(/*! ./props/grid */ 97));
  14127. var _gridItem = _interopRequireDefault(__webpack_require__(/*! ./props/gridItem */ 98));
  14128. var _icon = _interopRequireDefault(__webpack_require__(/*! ./props/icon */ 99));
  14129. var _image = _interopRequireDefault(__webpack_require__(/*! ./props/image */ 100));
  14130. var _indexAnchor = _interopRequireDefault(__webpack_require__(/*! ./props/indexAnchor */ 101));
  14131. var _indexList = _interopRequireDefault(__webpack_require__(/*! ./props/indexList */ 102));
  14132. var _input = _interopRequireDefault(__webpack_require__(/*! ./props/input */ 103));
  14133. var _keyboard = _interopRequireDefault(__webpack_require__(/*! ./props/keyboard */ 104));
  14134. var _line = _interopRequireDefault(__webpack_require__(/*! ./props/line */ 105));
  14135. var _lineProgress = _interopRequireDefault(__webpack_require__(/*! ./props/lineProgress */ 106));
  14136. var _link = _interopRequireDefault(__webpack_require__(/*! ./props/link */ 107));
  14137. var _list = _interopRequireDefault(__webpack_require__(/*! ./props/list */ 108));
  14138. var _listItem = _interopRequireDefault(__webpack_require__(/*! ./props/listItem */ 109));
  14139. var _loadingIcon = _interopRequireDefault(__webpack_require__(/*! ./props/loadingIcon */ 110));
  14140. var _loadingPage = _interopRequireDefault(__webpack_require__(/*! ./props/loadingPage */ 111));
  14141. var _loadmore = _interopRequireDefault(__webpack_require__(/*! ./props/loadmore */ 112));
  14142. var _modal = _interopRequireDefault(__webpack_require__(/*! ./props/modal */ 113));
  14143. var _navbar = _interopRequireDefault(__webpack_require__(/*! ./props/navbar */ 114));
  14144. var _noNetwork = _interopRequireDefault(__webpack_require__(/*! ./props/noNetwork */ 116));
  14145. var _noticeBar = _interopRequireDefault(__webpack_require__(/*! ./props/noticeBar */ 117));
  14146. var _notify = _interopRequireDefault(__webpack_require__(/*! ./props/notify */ 118));
  14147. var _numberBox = _interopRequireDefault(__webpack_require__(/*! ./props/numberBox */ 119));
  14148. var _numberKeyboard = _interopRequireDefault(__webpack_require__(/*! ./props/numberKeyboard */ 120));
  14149. var _overlay = _interopRequireDefault(__webpack_require__(/*! ./props/overlay */ 121));
  14150. var _parse = _interopRequireDefault(__webpack_require__(/*! ./props/parse */ 122));
  14151. var _picker = _interopRequireDefault(__webpack_require__(/*! ./props/picker */ 123));
  14152. var _popup = _interopRequireDefault(__webpack_require__(/*! ./props/popup */ 124));
  14153. var _radio = _interopRequireDefault(__webpack_require__(/*! ./props/radio */ 125));
  14154. var _radioGroup = _interopRequireDefault(__webpack_require__(/*! ./props/radioGroup */ 126));
  14155. var _rate = _interopRequireDefault(__webpack_require__(/*! ./props/rate */ 127));
  14156. var _readMore = _interopRequireDefault(__webpack_require__(/*! ./props/readMore */ 128));
  14157. var _row = _interopRequireDefault(__webpack_require__(/*! ./props/row */ 129));
  14158. var _rowNotice = _interopRequireDefault(__webpack_require__(/*! ./props/rowNotice */ 130));
  14159. var _scrollList = _interopRequireDefault(__webpack_require__(/*! ./props/scrollList */ 131));
  14160. var _search = _interopRequireDefault(__webpack_require__(/*! ./props/search */ 132));
  14161. var _section = _interopRequireDefault(__webpack_require__(/*! ./props/section */ 133));
  14162. var _skeleton = _interopRequireDefault(__webpack_require__(/*! ./props/skeleton */ 134));
  14163. var _slider = _interopRequireDefault(__webpack_require__(/*! ./props/slider */ 135));
  14164. var _statusBar = _interopRequireDefault(__webpack_require__(/*! ./props/statusBar */ 136));
  14165. var _steps = _interopRequireDefault(__webpack_require__(/*! ./props/steps */ 137));
  14166. var _stepsItem = _interopRequireDefault(__webpack_require__(/*! ./props/stepsItem */ 138));
  14167. var _sticky = _interopRequireDefault(__webpack_require__(/*! ./props/sticky */ 139));
  14168. var _subsection = _interopRequireDefault(__webpack_require__(/*! ./props/subsection */ 140));
  14169. var _swipeAction = _interopRequireDefault(__webpack_require__(/*! ./props/swipeAction */ 141));
  14170. var _swipeActionItem = _interopRequireDefault(__webpack_require__(/*! ./props/swipeActionItem */ 142));
  14171. var _swiper = _interopRequireDefault(__webpack_require__(/*! ./props/swiper */ 143));
  14172. var _swipterIndicator = _interopRequireDefault(__webpack_require__(/*! ./props/swipterIndicator */ 144));
  14173. var _switch2 = _interopRequireDefault(__webpack_require__(/*! ./props/switch */ 145));
  14174. var _tabbar = _interopRequireDefault(__webpack_require__(/*! ./props/tabbar */ 146));
  14175. var _tabbarItem = _interopRequireDefault(__webpack_require__(/*! ./props/tabbarItem */ 147));
  14176. var _tabs = _interopRequireDefault(__webpack_require__(/*! ./props/tabs */ 148));
  14177. var _tag = _interopRequireDefault(__webpack_require__(/*! ./props/tag */ 149));
  14178. var _text = _interopRequireDefault(__webpack_require__(/*! ./props/text */ 150));
  14179. var _textarea = _interopRequireDefault(__webpack_require__(/*! ./props/textarea */ 151));
  14180. var _toast = _interopRequireDefault(__webpack_require__(/*! ./props/toast */ 152));
  14181. var _toolbar = _interopRequireDefault(__webpack_require__(/*! ./props/toolbar */ 153));
  14182. var _tooltip = _interopRequireDefault(__webpack_require__(/*! ./props/tooltip */ 154));
  14183. var _transition = _interopRequireDefault(__webpack_require__(/*! ./props/transition */ 155));
  14184. var _upload = _interopRequireDefault(__webpack_require__(/*! ./props/upload */ 156));
  14185. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  14186. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  14187. var color = _config.default.color;
  14188. var _default = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _actionSheet.default), _album.default), _alert.default), _avatar.default), _avatarGroup.default), _backtop.default), _badge.default), _button.default), _calendar.default), _carKeyboard.default), _cell.default), _cellGroup.default), _checkbox.default), _checkboxGroup.default), _circleProgress.default), _code.default), _codeInput.default), _col.default), _collapse.default), _collapseItem.default), _columnNotice.default), _countDown.default), _countTo.default), _datetimePicker.default), _divider.default), _empty.default), _form.default), _formItem.default), _gap.default), _grid.default), _gridItem.default), _icon.default), _image.default), _indexAnchor.default), _indexList.default), _input.default), _keyboard.default), _line.default), _lineProgress.default), _link.default), _list.default), _listItem.default), _loadingIcon.default), _loadingPage.default), _loadmore.default), _modal.default), _navbar.default), _noNetwork.default), _noticeBar.default), _notify.default), _numberBox.default), _numberKeyboard.default), _overlay.default), _parse.default), _picker.default), _popup.default), _radio.default), _radioGroup.default), _rate.default), _readMore.default), _row.default), _rowNotice.default), _scrollList.default), _search.default), _section.default), _skeleton.default), _slider.default), _statusBar.default), _steps.default), _stepsItem.default), _sticky.default), _subsection.default), _swipeAction.default), _swipeActionItem.default), _swiper.default), _swipterIndicator.default), _switch2.default), _tabbar.default), _tabbarItem.default), _tabs.default), _tag.default), _text.default), _textarea.default), _toast.default), _toolbar.default), _tooltip.default), _transition.default), _upload.default);
  14189. exports.default = _default;
  14190. /***/ }),
  14191. /* 68 */
  14192. /*!************************************************************************************************************************!*\
  14193. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/actionSheet.js ***!
  14194. \************************************************************************************************************************/
  14195. /*! no static exports found */
  14196. /***/ (function(module, exports, __webpack_require__) {
  14197. "use strict";
  14198. Object.defineProperty(exports, "__esModule", {
  14199. value: true
  14200. });
  14201. exports.default = void 0;
  14202. /*
  14203. * @Author : LQ
  14204. * @Description :
  14205. * @version : 1.0
  14206. * @Date : 2021-08-20 16:44:21
  14207. * @LastAuthor : LQ
  14208. * @lastTime : 2021-08-20 16:44:35
  14209. * @FilePath : /u-view2.0/uview-ui/libs/config/props/actionSheet.js
  14210. */
  14211. var _default = {
  14212. // action-sheet组件
  14213. actionSheet: {
  14214. show: false,
  14215. title: '',
  14216. description: '',
  14217. actions: function actions() {
  14218. return [];
  14219. },
  14220. index: '',
  14221. cancelText: '',
  14222. closeOnClickAction: true,
  14223. safeAreaInsetBottom: true,
  14224. openType: '',
  14225. closeOnClickOverlay: true,
  14226. round: 0
  14227. }
  14228. };
  14229. exports.default = _default;
  14230. /***/ }),
  14231. /* 69 */
  14232. /*!******************************************************************************************************************!*\
  14233. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/album.js ***!
  14234. \******************************************************************************************************************/
  14235. /*! no static exports found */
  14236. /***/ (function(module, exports, __webpack_require__) {
  14237. "use strict";
  14238. Object.defineProperty(exports, "__esModule", {
  14239. value: true
  14240. });
  14241. exports.default = void 0;
  14242. /*
  14243. * @Author : LQ
  14244. * @Description :
  14245. * @version : 1.0
  14246. * @Date : 2021-08-20 16:44:21
  14247. * @LastAuthor : LQ
  14248. * @lastTime : 2021-08-20 16:47:24
  14249. * @FilePath : /u-view2.0/uview-ui/libs/config/props/album.js
  14250. */
  14251. var _default = {
  14252. // album 组件
  14253. album: {
  14254. urls: function urls() {
  14255. return [];
  14256. },
  14257. keyName: '',
  14258. singleSize: 180,
  14259. multipleSize: 70,
  14260. space: 6,
  14261. singleMode: 'scaleToFill',
  14262. multipleMode: 'aspectFill',
  14263. maxCount: 9,
  14264. previewFullImage: true,
  14265. rowCount: 3,
  14266. showMore: true
  14267. }
  14268. };
  14269. exports.default = _default;
  14270. /***/ }),
  14271. /* 70 */
  14272. /*!******************************************************************************************************************!*\
  14273. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/alert.js ***!
  14274. \******************************************************************************************************************/
  14275. /*! no static exports found */
  14276. /***/ (function(module, exports, __webpack_require__) {
  14277. "use strict";
  14278. Object.defineProperty(exports, "__esModule", {
  14279. value: true
  14280. });
  14281. exports.default = void 0;
  14282. /*
  14283. * @Author : LQ
  14284. * @Description :
  14285. * @version : 1.0
  14286. * @Date : 2021-08-20 16:44:21
  14287. * @LastAuthor : LQ
  14288. * @lastTime : 2021-08-20 16:48:53
  14289. * @FilePath : /u-view2.0/uview-ui/libs/config/props/alert.js
  14290. */
  14291. var _default = {
  14292. // alert警告组件
  14293. alert: {
  14294. title: '',
  14295. type: 'warning',
  14296. description: '',
  14297. closable: false,
  14298. showIcon: false,
  14299. effect: 'light',
  14300. center: false,
  14301. fontSize: 14
  14302. }
  14303. };
  14304. exports.default = _default;
  14305. /***/ }),
  14306. /* 71 */
  14307. /*!*******************************************************************************************************************!*\
  14308. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/avatar.js ***!
  14309. \*******************************************************************************************************************/
  14310. /*! no static exports found */
  14311. /***/ (function(module, exports, __webpack_require__) {
  14312. "use strict";
  14313. Object.defineProperty(exports, "__esModule", {
  14314. value: true
  14315. });
  14316. exports.default = void 0;
  14317. /*
  14318. * @Author : LQ
  14319. * @Description :
  14320. * @version : 1.0
  14321. * @Date : 2021-08-20 16:44:21
  14322. * @LastAuthor : LQ
  14323. * @lastTime : 2021-08-20 16:49:22
  14324. * @FilePath : /u-view2.0/uview-ui/libs/config/props/avatar.js
  14325. */
  14326. var _default = {
  14327. // avatar 组件
  14328. avatar: {
  14329. src: '',
  14330. shape: 'circle',
  14331. size: 40,
  14332. mode: 'scaleToFill',
  14333. text: '',
  14334. bgColor: '#c0c4cc',
  14335. color: '#ffffff',
  14336. fontSize: 18,
  14337. icon: '',
  14338. mpAvatar: false,
  14339. randomBgColor: false,
  14340. defaultUrl: '',
  14341. colorIndex: '',
  14342. name: ''
  14343. }
  14344. };
  14345. exports.default = _default;
  14346. /***/ }),
  14347. /* 72 */
  14348. /*!************************************************************************************************************************!*\
  14349. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/avatarGroup.js ***!
  14350. \************************************************************************************************************************/
  14351. /*! no static exports found */
  14352. /***/ (function(module, exports, __webpack_require__) {
  14353. "use strict";
  14354. Object.defineProperty(exports, "__esModule", {
  14355. value: true
  14356. });
  14357. exports.default = void 0;
  14358. /*
  14359. * @Author : LQ
  14360. * @Description :
  14361. * @version : 1.0
  14362. * @Date : 2021-08-20 16:44:21
  14363. * @LastAuthor : LQ
  14364. * @lastTime : 2021-08-20 16:49:55
  14365. * @FilePath : /u-view2.0/uview-ui/libs/config/props/avatarGroup.js
  14366. */
  14367. var _default = {
  14368. // avatarGroup 组件
  14369. avatarGroup: {
  14370. urls: function urls() {
  14371. return [];
  14372. },
  14373. maxCount: 5,
  14374. shape: 'circle',
  14375. mode: 'scaleToFill',
  14376. showMore: true,
  14377. size: 40,
  14378. keyName: '',
  14379. gap: 0.5,
  14380. extraValue: 0
  14381. }
  14382. };
  14383. exports.default = _default;
  14384. /***/ }),
  14385. /* 73 */
  14386. /*!********************************************************************************************************************!*\
  14387. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/backtop.js ***!
  14388. \********************************************************************************************************************/
  14389. /*! no static exports found */
  14390. /***/ (function(module, exports, __webpack_require__) {
  14391. "use strict";
  14392. Object.defineProperty(exports, "__esModule", {
  14393. value: true
  14394. });
  14395. exports.default = void 0;
  14396. /*
  14397. * @Author : LQ
  14398. * @Description :
  14399. * @version : 1.0
  14400. * @Date : 2021-08-20 16:44:21
  14401. * @LastAuthor : LQ
  14402. * @lastTime : 2021-08-20 16:50:18
  14403. * @FilePath : /u-view2.0/uview-ui/libs/config/props/backtop.js
  14404. */
  14405. var _default = {
  14406. // backtop组件
  14407. backtop: {
  14408. mode: 'circle',
  14409. icon: 'arrow-upward',
  14410. text: '',
  14411. duration: 100,
  14412. scrollTop: 0,
  14413. top: 400,
  14414. bottom: 100,
  14415. right: 20,
  14416. zIndex: 9,
  14417. iconStyle: function iconStyle() {
  14418. return {
  14419. color: '#909399',
  14420. fontSize: '19px'
  14421. };
  14422. }
  14423. }
  14424. };
  14425. exports.default = _default;
  14426. /***/ }),
  14427. /* 74 */
  14428. /*!******************************************************************************************************************!*\
  14429. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/badge.js ***!
  14430. \******************************************************************************************************************/
  14431. /*! no static exports found */
  14432. /***/ (function(module, exports, __webpack_require__) {
  14433. "use strict";
  14434. Object.defineProperty(exports, "__esModule", {
  14435. value: true
  14436. });
  14437. exports.default = void 0;
  14438. /*
  14439. * @Author : LQ
  14440. * @Description :
  14441. * @version : 1.0
  14442. * @Date : 2021-08-20 16:44:21
  14443. * @LastAuthor : LQ
  14444. * @lastTime : 2021-08-23 19:51:50
  14445. * @FilePath : /u-view2.0/uview-ui/libs/config/props/badge.js
  14446. */
  14447. var _default = {
  14448. // 徽标数组件
  14449. badge: {
  14450. isDot: false,
  14451. value: '',
  14452. show: true,
  14453. max: 999,
  14454. type: 'error',
  14455. showZero: false,
  14456. bgColor: null,
  14457. color: null,
  14458. shape: 'circle',
  14459. numberType: 'overflow',
  14460. offset: function offset() {
  14461. return [];
  14462. },
  14463. inverted: false,
  14464. absolute: false
  14465. }
  14466. };
  14467. exports.default = _default;
  14468. /***/ }),
  14469. /* 75 */
  14470. /*!*******************************************************************************************************************!*\
  14471. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/button.js ***!
  14472. \*******************************************************************************************************************/
  14473. /*! no static exports found */
  14474. /***/ (function(module, exports, __webpack_require__) {
  14475. "use strict";
  14476. Object.defineProperty(exports, "__esModule", {
  14477. value: true
  14478. });
  14479. exports.default = void 0;
  14480. /*
  14481. * @Author : LQ
  14482. * @Description :
  14483. * @version : 1.0
  14484. * @Date : 2021-08-20 16:44:21
  14485. * @LastAuthor : LQ
  14486. * @lastTime : 2021-08-20 16:51:27
  14487. * @FilePath : /u-view2.0/uview-ui/libs/config/props/button.js
  14488. */
  14489. var _default = {
  14490. // button组件
  14491. button: {
  14492. hairline: false,
  14493. type: 'info',
  14494. size: 'normal',
  14495. shape: 'square',
  14496. plain: false,
  14497. disabled: false,
  14498. loading: false,
  14499. loadingText: '',
  14500. loadingMode: 'spinner',
  14501. loadingSize: 15,
  14502. openType: '',
  14503. formType: '',
  14504. appParameter: '',
  14505. hoverStopPropagation: true,
  14506. lang: 'en',
  14507. sessionFrom: '',
  14508. sendMessageTitle: '',
  14509. sendMessagePath: '',
  14510. sendMessageImg: '',
  14511. showMessageCard: false,
  14512. dataName: '',
  14513. throttleTime: 0,
  14514. hoverStartTime: 0,
  14515. hoverStayTime: 200,
  14516. text: '',
  14517. icon: '',
  14518. iconColor: '',
  14519. color: ''
  14520. }
  14521. };
  14522. exports.default = _default;
  14523. /***/ }),
  14524. /* 76 */
  14525. /*!*********************************************************************************************************************!*\
  14526. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/calendar.js ***!
  14527. \*********************************************************************************************************************/
  14528. /*! no static exports found */
  14529. /***/ (function(module, exports, __webpack_require__) {
  14530. "use strict";
  14531. Object.defineProperty(exports, "__esModule", {
  14532. value: true
  14533. });
  14534. exports.default = void 0;
  14535. /*
  14536. * @Author : LQ
  14537. * @Description :
  14538. * @version : 1.0
  14539. * @Date : 2021-08-20 16:44:21
  14540. * @LastAuthor : LQ
  14541. * @lastTime : 2021-08-20 16:52:43
  14542. * @FilePath : /u-view2.0/uview-ui/libs/config/props/calendar.js
  14543. */
  14544. var _default = {
  14545. // calendar 组件
  14546. calendar: {
  14547. title: '日期选择',
  14548. showTitle: true,
  14549. showSubtitle: true,
  14550. mode: 'single',
  14551. startText: '开始',
  14552. endText: '结束',
  14553. customList: function customList() {
  14554. return [];
  14555. },
  14556. color: '#3c9cff',
  14557. minDate: 0,
  14558. maxDate: 0,
  14559. defaultDate: null,
  14560. maxCount: Number.MAX_SAFE_INTEGER,
  14561. // Infinity
  14562. rowHeight: 56,
  14563. formatter: null,
  14564. showLunar: false,
  14565. showMark: true,
  14566. confirmText: '确定',
  14567. confirmDisabledText: '确定',
  14568. show: false,
  14569. closeOnClickOverlay: false,
  14570. readonly: false,
  14571. showConfirm: true,
  14572. maxRange: Number.MAX_SAFE_INTEGER,
  14573. // Infinity
  14574. rangePrompt: '',
  14575. showRangePrompt: true,
  14576. allowSameDay: false,
  14577. round: 0,
  14578. monthNum: 3
  14579. }
  14580. };
  14581. exports.default = _default;
  14582. /***/ }),
  14583. /* 77 */
  14584. /*!************************************************************************************************************************!*\
  14585. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/carKeyboard.js ***!
  14586. \************************************************************************************************************************/
  14587. /*! no static exports found */
  14588. /***/ (function(module, exports, __webpack_require__) {
  14589. "use strict";
  14590. Object.defineProperty(exports, "__esModule", {
  14591. value: true
  14592. });
  14593. exports.default = void 0;
  14594. /*
  14595. * @Author : LQ
  14596. * @Description :
  14597. * @version : 1.0
  14598. * @Date : 2021-08-20 16:44:21
  14599. * @LastAuthor : LQ
  14600. * @lastTime : 2021-08-20 16:53:20
  14601. * @FilePath : /u-view2.0/uview-ui/libs/config/props/carKeyboard.js
  14602. */
  14603. var _default = {
  14604. // 车牌号键盘
  14605. carKeyboard: {
  14606. random: false
  14607. }
  14608. };
  14609. exports.default = _default;
  14610. /***/ }),
  14611. /* 78 */
  14612. /*!*****************************************************************************************************************!*\
  14613. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/cell.js ***!
  14614. \*****************************************************************************************************************/
  14615. /*! no static exports found */
  14616. /***/ (function(module, exports, __webpack_require__) {
  14617. "use strict";
  14618. Object.defineProperty(exports, "__esModule", {
  14619. value: true
  14620. });
  14621. exports.default = void 0;
  14622. /*
  14623. * @Author : LQ
  14624. * @Description :
  14625. * @version : 1.0
  14626. * @Date : 2021-08-20 16:44:21
  14627. * @LastAuthor : LQ
  14628. * @lastTime : 2021-08-23 20:53:09
  14629. * @FilePath : /u-view2.0/uview-ui/libs/config/props/cell.js
  14630. */
  14631. var _default = {
  14632. // cell组件的props
  14633. cell: {
  14634. customClass: '',
  14635. title: '',
  14636. label: '',
  14637. value: '',
  14638. icon: '',
  14639. disabled: false,
  14640. border: true,
  14641. center: false,
  14642. url: '',
  14643. linkType: 'navigateTo',
  14644. clickable: false,
  14645. isLink: false,
  14646. required: false,
  14647. arrowDirection: '',
  14648. iconStyle: {},
  14649. rightIconStyle: {},
  14650. rightIcon: 'arrow-right',
  14651. titleStyle: {},
  14652. size: '',
  14653. stop: true,
  14654. name: ''
  14655. }
  14656. };
  14657. exports.default = _default;
  14658. /***/ }),
  14659. /* 79 */
  14660. /*!**********************************************************************************************************************!*\
  14661. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/cellGroup.js ***!
  14662. \**********************************************************************************************************************/
  14663. /*! no static exports found */
  14664. /***/ (function(module, exports, __webpack_require__) {
  14665. "use strict";
  14666. Object.defineProperty(exports, "__esModule", {
  14667. value: true
  14668. });
  14669. exports.default = void 0;
  14670. /*
  14671. * @Author : LQ
  14672. * @Description :
  14673. * @version : 1.0
  14674. * @Date : 2021-08-20 16:44:21
  14675. * @LastAuthor : LQ
  14676. * @lastTime : 2021-08-20 16:54:16
  14677. * @FilePath : /u-view2.0/uview-ui/libs/config/props/cellGroup.js
  14678. */
  14679. var _default = {
  14680. // cell-group组件的props
  14681. cellGroup: {
  14682. title: '',
  14683. border: true,
  14684. customStyle: {}
  14685. }
  14686. };
  14687. exports.default = _default;
  14688. /***/ }),
  14689. /* 80 */
  14690. /*!*********************************************************************************************************************!*\
  14691. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/checkbox.js ***!
  14692. \*********************************************************************************************************************/
  14693. /*! no static exports found */
  14694. /***/ (function(module, exports, __webpack_require__) {
  14695. "use strict";
  14696. Object.defineProperty(exports, "__esModule", {
  14697. value: true
  14698. });
  14699. exports.default = void 0;
  14700. /*
  14701. * @Author : LQ
  14702. * @Description :
  14703. * @version : 1.0
  14704. * @Date : 2021-08-20 16:44:21
  14705. * @LastAuthor : LQ
  14706. * @lastTime : 2021-08-23 21:06:59
  14707. * @FilePath : /u-view2.0/uview-ui/libs/config/props/checkbox.js
  14708. */
  14709. var _default = {
  14710. // checkbox组件
  14711. checkbox: {
  14712. name: '',
  14713. shape: '',
  14714. size: '',
  14715. checkbox: false,
  14716. disabled: '',
  14717. activeColor: '',
  14718. inactiveColor: '',
  14719. iconSize: '',
  14720. iconColor: '',
  14721. label: '',
  14722. labelSize: '',
  14723. labelColor: '',
  14724. labelDisabled: ''
  14725. }
  14726. };
  14727. exports.default = _default;
  14728. /***/ }),
  14729. /* 81 */
  14730. /*!**************************************************************************************************************************!*\
  14731. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/checkboxGroup.js ***!
  14732. \**************************************************************************************************************************/
  14733. /*! no static exports found */
  14734. /***/ (function(module, exports, __webpack_require__) {
  14735. "use strict";
  14736. Object.defineProperty(exports, "__esModule", {
  14737. value: true
  14738. });
  14739. exports.default = void 0;
  14740. /*
  14741. * @Author : LQ
  14742. * @Description :
  14743. * @version : 1.0
  14744. * @Date : 2021-08-20 16:44:21
  14745. * @LastAuthor : LQ
  14746. * @lastTime : 2021-08-20 16:54:47
  14747. * @FilePath : /u-view2.0/uview-ui/libs/config/props/checkboxGroup.js
  14748. */
  14749. var _default = {
  14750. // checkbox-group组件
  14751. checkboxGroup: {
  14752. name: '',
  14753. value: function value() {
  14754. return [];
  14755. },
  14756. shape: 'square',
  14757. disabled: false,
  14758. activeColor: '#2979ff',
  14759. inactiveColor: '#c8c9cc',
  14760. size: 18,
  14761. placement: 'row',
  14762. labelSize: 14,
  14763. labelColor: '#303133',
  14764. labelDisabled: false,
  14765. iconColor: '#ffffff',
  14766. iconSize: 12,
  14767. iconPlacement: 'left',
  14768. borderBottom: false
  14769. }
  14770. };
  14771. exports.default = _default;
  14772. /***/ }),
  14773. /* 82 */
  14774. /*!***************************************************************************************************************************!*\
  14775. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/circleProgress.js ***!
  14776. \***************************************************************************************************************************/
  14777. /*! no static exports found */
  14778. /***/ (function(module, exports, __webpack_require__) {
  14779. "use strict";
  14780. Object.defineProperty(exports, "__esModule", {
  14781. value: true
  14782. });
  14783. exports.default = void 0;
  14784. /*
  14785. * @Author : LQ
  14786. * @Description :
  14787. * @version : 1.0
  14788. * @Date : 2021-08-20 16:44:21
  14789. * @LastAuthor : LQ
  14790. * @lastTime : 2021-08-20 16:55:02
  14791. * @FilePath : /u-view2.0/uview-ui/libs/config/props/circleProgress.js
  14792. */
  14793. var _default = {
  14794. // circleProgress 组件
  14795. circleProgress: {
  14796. percentage: 30
  14797. }
  14798. };
  14799. exports.default = _default;
  14800. /***/ }),
  14801. /* 83 */
  14802. /*!*****************************************************************************************************************!*\
  14803. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/code.js ***!
  14804. \*****************************************************************************************************************/
  14805. /*! no static exports found */
  14806. /***/ (function(module, exports, __webpack_require__) {
  14807. "use strict";
  14808. Object.defineProperty(exports, "__esModule", {
  14809. value: true
  14810. });
  14811. exports.default = void 0;
  14812. /*
  14813. * @Author : LQ
  14814. * @Description :
  14815. * @version : 1.0
  14816. * @Date : 2021-08-20 16:44:21
  14817. * @LastAuthor : LQ
  14818. * @lastTime : 2021-08-20 16:55:27
  14819. * @FilePath : /u-view2.0/uview-ui/libs/config/props/code.js
  14820. */
  14821. var _default = {
  14822. // code 组件
  14823. code: {
  14824. seconds: 60,
  14825. startText: '获取验证码',
  14826. changeText: 'X秒重新获取',
  14827. endText: '重新获取',
  14828. keepRunning: false,
  14829. uniqueKey: ''
  14830. }
  14831. };
  14832. exports.default = _default;
  14833. /***/ }),
  14834. /* 84 */
  14835. /*!**********************************************************************************************************************!*\
  14836. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/codeInput.js ***!
  14837. \**********************************************************************************************************************/
  14838. /*! no static exports found */
  14839. /***/ (function(module, exports, __webpack_require__) {
  14840. "use strict";
  14841. Object.defineProperty(exports, "__esModule", {
  14842. value: true
  14843. });
  14844. exports.default = void 0;
  14845. /*
  14846. * @Author : LQ
  14847. * @Description :
  14848. * @version : 1.0
  14849. * @Date : 2021-08-20 16:44:21
  14850. * @LastAuthor : LQ
  14851. * @lastTime : 2021-08-20 16:55:58
  14852. * @FilePath : /u-view2.0/uview-ui/libs/config/props/codeInput.js
  14853. */
  14854. var _default = {
  14855. // codeInput 组件
  14856. codeInput: {
  14857. adjustPosition: true,
  14858. maxlength: 6,
  14859. dot: false,
  14860. mode: 'box',
  14861. hairline: false,
  14862. space: 10,
  14863. value: '',
  14864. focus: false,
  14865. bold: false,
  14866. color: '#606266',
  14867. fontSize: 18,
  14868. size: 35,
  14869. disabledKeyboard: false,
  14870. borderColor: '#c9cacc',
  14871. disabledDot: true
  14872. }
  14873. };
  14874. exports.default = _default;
  14875. /***/ }),
  14876. /* 85 */
  14877. /*!****************************************************************************************************************!*\
  14878. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/col.js ***!
  14879. \****************************************************************************************************************/
  14880. /*! no static exports found */
  14881. /***/ (function(module, exports, __webpack_require__) {
  14882. "use strict";
  14883. Object.defineProperty(exports, "__esModule", {
  14884. value: true
  14885. });
  14886. exports.default = void 0;
  14887. /*
  14888. * @Author : LQ
  14889. * @Description :
  14890. * @version : 1.0
  14891. * @Date : 2021-08-20 16:44:21
  14892. * @LastAuthor : LQ
  14893. * @lastTime : 2021-08-20 16:56:12
  14894. * @FilePath : /u-view2.0/uview-ui/libs/config/props/col.js
  14895. */
  14896. var _default = {
  14897. // col 组件
  14898. col: {
  14899. span: 12,
  14900. offset: 0,
  14901. justify: 'start',
  14902. align: 'stretch',
  14903. textAlign: 'left'
  14904. }
  14905. };
  14906. exports.default = _default;
  14907. /***/ }),
  14908. /* 86 */
  14909. /*!*********************************************************************************************************************!*\
  14910. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/collapse.js ***!
  14911. \*********************************************************************************************************************/
  14912. /*! no static exports found */
  14913. /***/ (function(module, exports, __webpack_require__) {
  14914. "use strict";
  14915. Object.defineProperty(exports, "__esModule", {
  14916. value: true
  14917. });
  14918. exports.default = void 0;
  14919. /*
  14920. * @Author : LQ
  14921. * @Description :
  14922. * @version : 1.0
  14923. * @Date : 2021-08-20 16:44:21
  14924. * @LastAuthor : LQ
  14925. * @lastTime : 2021-08-20 16:56:30
  14926. * @FilePath : /u-view2.0/uview-ui/libs/config/props/collapse.js
  14927. */
  14928. var _default = {
  14929. // collapse 组件
  14930. collapse: {
  14931. value: null,
  14932. accordion: false,
  14933. border: true
  14934. }
  14935. };
  14936. exports.default = _default;
  14937. /***/ }),
  14938. /* 87 */
  14939. /*!*************************************************************************************************************************!*\
  14940. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/collapseItem.js ***!
  14941. \*************************************************************************************************************************/
  14942. /*! no static exports found */
  14943. /***/ (function(module, exports, __webpack_require__) {
  14944. "use strict";
  14945. Object.defineProperty(exports, "__esModule", {
  14946. value: true
  14947. });
  14948. exports.default = void 0;
  14949. /*
  14950. * @Author : LQ
  14951. * @Description :
  14952. * @version : 1.0
  14953. * @Date : 2021-08-20 16:44:21
  14954. * @LastAuthor : LQ
  14955. * @lastTime : 2021-08-20 16:56:42
  14956. * @FilePath : /u-view2.0/uview-ui/libs/config/props/collapseItem.js
  14957. */
  14958. var _default = {
  14959. // collapseItem 组件
  14960. collapseItem: {
  14961. title: '',
  14962. value: '',
  14963. label: '',
  14964. disabled: false,
  14965. isLink: true,
  14966. clickable: true,
  14967. border: true,
  14968. align: 'left',
  14969. name: '',
  14970. icon: '',
  14971. duration: 300
  14972. }
  14973. };
  14974. exports.default = _default;
  14975. /***/ }),
  14976. /* 88 */
  14977. /*!*************************************************************************************************************************!*\
  14978. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/columnNotice.js ***!
  14979. \*************************************************************************************************************************/
  14980. /*! no static exports found */
  14981. /***/ (function(module, exports, __webpack_require__) {
  14982. "use strict";
  14983. Object.defineProperty(exports, "__esModule", {
  14984. value: true
  14985. });
  14986. exports.default = void 0;
  14987. /*
  14988. * @Author : LQ
  14989. * @Description :
  14990. * @version : 1.0
  14991. * @Date : 2021-08-20 16:44:21
  14992. * @LastAuthor : LQ
  14993. * @lastTime : 2021-08-20 16:57:16
  14994. * @FilePath : /u-view2.0/uview-ui/libs/config/props/columnNotice.js
  14995. */
  14996. var _default = {
  14997. // columnNotice 组件
  14998. columnNotice: {
  14999. text: '',
  15000. icon: 'volume',
  15001. mode: '',
  15002. color: '#f9ae3d',
  15003. bgColor: '#fdf6ec',
  15004. fontSize: 14,
  15005. speed: 80,
  15006. step: false,
  15007. duration: 1500,
  15008. disableTouch: true
  15009. }
  15010. };
  15011. exports.default = _default;
  15012. /***/ }),
  15013. /* 89 */
  15014. /*!**********************************************************************************************************************!*\
  15015. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/countDown.js ***!
  15016. \**********************************************************************************************************************/
  15017. /*! no static exports found */
  15018. /***/ (function(module, exports, __webpack_require__) {
  15019. "use strict";
  15020. Object.defineProperty(exports, "__esModule", {
  15021. value: true
  15022. });
  15023. exports.default = void 0;
  15024. /*
  15025. * @Author : LQ
  15026. * @Description :
  15027. * @version : 1.0
  15028. * @Date : 2021-08-20 16:44:21
  15029. * @LastAuthor : LQ
  15030. * @lastTime : 2021-08-20 17:11:29
  15031. * @FilePath : /u-view2.0/uview-ui/libs/config/props/countDown.js
  15032. */
  15033. var _default = {
  15034. // u-count-down 计时器组件
  15035. countDown: {
  15036. time: 0,
  15037. format: 'HH:mm:ss',
  15038. autoStart: true,
  15039. millisecond: false
  15040. }
  15041. };
  15042. exports.default = _default;
  15043. /***/ }),
  15044. /* 90 */
  15045. /*!********************************************************************************************************************!*\
  15046. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/countTo.js ***!
  15047. \********************************************************************************************************************/
  15048. /*! no static exports found */
  15049. /***/ (function(module, exports, __webpack_require__) {
  15050. "use strict";
  15051. Object.defineProperty(exports, "__esModule", {
  15052. value: true
  15053. });
  15054. exports.default = void 0;
  15055. /*
  15056. * @Author : LQ
  15057. * @Description :
  15058. * @version : 1.0
  15059. * @Date : 2021-08-20 16:44:21
  15060. * @LastAuthor : LQ
  15061. * @lastTime : 2021-08-20 16:57:32
  15062. * @FilePath : /u-view2.0/uview-ui/libs/config/props/countTo.js
  15063. */
  15064. var _default = {
  15065. // countTo 组件
  15066. countTo: {
  15067. startVal: 0,
  15068. endVal: 0,
  15069. duration: 2000,
  15070. autoplay: true,
  15071. decimals: 0,
  15072. useEasing: true,
  15073. decimal: '.',
  15074. color: '#606266',
  15075. fontSize: 22,
  15076. bold: false,
  15077. separator: ''
  15078. }
  15079. };
  15080. exports.default = _default;
  15081. /***/ }),
  15082. /* 91 */
  15083. /*!***************************************************************************************************************************!*\
  15084. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/datetimePicker.js ***!
  15085. \***************************************************************************************************************************/
  15086. /*! no static exports found */
  15087. /***/ (function(module, exports, __webpack_require__) {
  15088. "use strict";
  15089. Object.defineProperty(exports, "__esModule", {
  15090. value: true
  15091. });
  15092. exports.default = void 0;
  15093. /*
  15094. * @Author : LQ
  15095. * @Description :
  15096. * @version : 1.0
  15097. * @Date : 2021-08-20 16:44:21
  15098. * @LastAuthor : LQ
  15099. * @lastTime : 2021-08-20 16:57:48
  15100. * @FilePath : /u-view2.0/uview-ui/libs/config/props/datetimePicker.js
  15101. */
  15102. var _default = {
  15103. // datetimePicker 组件
  15104. datetimePicker: {
  15105. show: false,
  15106. showToolbar: true,
  15107. value: '',
  15108. title: '',
  15109. mode: 'datetime',
  15110. maxDate: new Date(new Date().getFullYear() + 10, 0, 1).getTime(),
  15111. minDate: new Date(new Date().getFullYear() - 10, 0, 1).getTime(),
  15112. minHour: 0,
  15113. maxHour: 23,
  15114. minMinute: 0,
  15115. maxMinute: 59,
  15116. filter: null,
  15117. formatter: null,
  15118. loading: false,
  15119. itemHeight: 44,
  15120. cancelText: '取消',
  15121. confirmText: '确认',
  15122. cancelColor: '#909193',
  15123. confirmColor: '#3c9cff',
  15124. visibleItemCount: 5,
  15125. closeOnClickOverlay: false,
  15126. immediateChange: false,
  15127. defaultIndex: function defaultIndex() {
  15128. return [];
  15129. }
  15130. }
  15131. };
  15132. exports.default = _default;
  15133. /***/ }),
  15134. /* 92 */
  15135. /*!********************************************************************************************************************!*\
  15136. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/divider.js ***!
  15137. \********************************************************************************************************************/
  15138. /*! no static exports found */
  15139. /***/ (function(module, exports, __webpack_require__) {
  15140. "use strict";
  15141. Object.defineProperty(exports, "__esModule", {
  15142. value: true
  15143. });
  15144. exports.default = void 0;
  15145. /*
  15146. * @Author : LQ
  15147. * @Description :
  15148. * @version : 1.0
  15149. * @Date : 2021-08-20 16:44:21
  15150. * @LastAuthor : LQ
  15151. * @lastTime : 2021-08-20 16:58:03
  15152. * @FilePath : /u-view2.0/uview-ui/libs/config/props/divider.js
  15153. */
  15154. var _default = {
  15155. // divider组件
  15156. divider: {
  15157. dashed: false,
  15158. hairline: true,
  15159. dot: false,
  15160. textPosition: 'center',
  15161. text: '',
  15162. textSize: 14,
  15163. textColor: '#909399',
  15164. lineColor: '#dcdfe6'
  15165. }
  15166. };
  15167. exports.default = _default;
  15168. /***/ }),
  15169. /* 93 */
  15170. /*!******************************************************************************************************************!*\
  15171. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/empty.js ***!
  15172. \******************************************************************************************************************/
  15173. /*! no static exports found */
  15174. /***/ (function(module, exports, __webpack_require__) {
  15175. "use strict";
  15176. Object.defineProperty(exports, "__esModule", {
  15177. value: true
  15178. });
  15179. exports.default = void 0;
  15180. /*
  15181. * @Author : LQ
  15182. * @Description :
  15183. * @version : 1.0
  15184. * @Date : 2021-08-20 16:44:21
  15185. * @LastAuthor : LQ
  15186. * @lastTime : 2021-08-20 17:03:27
  15187. * @FilePath : /u-view2.0/uview-ui/libs/config/props/empty.js
  15188. */
  15189. var _default = {
  15190. // empty组件
  15191. empty: {
  15192. icon: '',
  15193. text: '',
  15194. textColor: '#c0c4cc',
  15195. textSize: 14,
  15196. iconColor: '#c0c4cc',
  15197. iconSize: 90,
  15198. mode: 'data',
  15199. width: 160,
  15200. height: 160,
  15201. show: true,
  15202. marginTop: 0
  15203. }
  15204. };
  15205. exports.default = _default;
  15206. /***/ }),
  15207. /* 94 */
  15208. /*!*****************************************************************************************************************!*\
  15209. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/form.js ***!
  15210. \*****************************************************************************************************************/
  15211. /*! no static exports found */
  15212. /***/ (function(module, exports, __webpack_require__) {
  15213. "use strict";
  15214. Object.defineProperty(exports, "__esModule", {
  15215. value: true
  15216. });
  15217. exports.default = void 0;
  15218. /*
  15219. * @Author : LQ
  15220. * @Description :
  15221. * @version : 1.0
  15222. * @Date : 2021-08-20 16:44:21
  15223. * @LastAuthor : LQ
  15224. * @lastTime : 2021-08-20 17:03:49
  15225. * @FilePath : /u-view2.0/uview-ui/libs/config/props/form.js
  15226. */
  15227. var _default = {
  15228. // form 组件
  15229. form: {
  15230. model: function model() {
  15231. return {};
  15232. },
  15233. rules: function rules() {
  15234. return {};
  15235. },
  15236. errorType: 'message',
  15237. borderBottom: true,
  15238. labelPosition: 'left',
  15239. labelWidth: 45,
  15240. labelAlign: 'left',
  15241. labelStyle: function labelStyle() {
  15242. return {};
  15243. }
  15244. }
  15245. };
  15246. exports.default = _default;
  15247. /***/ }),
  15248. /* 95 */
  15249. /*!*********************************************************************************************************************!*\
  15250. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/formItem.js ***!
  15251. \*********************************************************************************************************************/
  15252. /*! no static exports found */
  15253. /***/ (function(module, exports, __webpack_require__) {
  15254. "use strict";
  15255. Object.defineProperty(exports, "__esModule", {
  15256. value: true
  15257. });
  15258. exports.default = void 0;
  15259. /*
  15260. * @Author : LQ
  15261. * @Description :
  15262. * @version : 1.0
  15263. * @Date : 2021-08-20 16:44:21
  15264. * @LastAuthor : LQ
  15265. * @lastTime : 2021-08-20 17:04:32
  15266. * @FilePath : /u-view2.0/uview-ui/libs/config/props/formItem.js
  15267. */
  15268. var _default = {
  15269. // formItem 组件
  15270. formItem: {
  15271. label: '',
  15272. prop: '',
  15273. borderBottom: '',
  15274. labelPosition: '',
  15275. labelWidth: '',
  15276. rightIcon: '',
  15277. leftIcon: '',
  15278. required: false,
  15279. leftIconStyle: ''
  15280. }
  15281. };
  15282. exports.default = _default;
  15283. /***/ }),
  15284. /* 96 */
  15285. /*!****************************************************************************************************************!*\
  15286. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/gap.js ***!
  15287. \****************************************************************************************************************/
  15288. /*! no static exports found */
  15289. /***/ (function(module, exports, __webpack_require__) {
  15290. "use strict";
  15291. Object.defineProperty(exports, "__esModule", {
  15292. value: true
  15293. });
  15294. exports.default = void 0;
  15295. /*
  15296. * @Author : LQ
  15297. * @Description :
  15298. * @version : 1.0
  15299. * @Date : 2021-08-20 16:44:21
  15300. * @LastAuthor : LQ
  15301. * @lastTime : 2021-08-20 17:05:25
  15302. * @FilePath : /u-view2.0/uview-ui/libs/config/props/gap.js
  15303. */
  15304. var _default = {
  15305. // gap组件
  15306. gap: {
  15307. bgColor: 'transparent',
  15308. height: 20,
  15309. marginTop: 0,
  15310. marginBottom: 0,
  15311. customStyle: {}
  15312. }
  15313. };
  15314. exports.default = _default;
  15315. /***/ }),
  15316. /* 97 */
  15317. /*!*****************************************************************************************************************!*\
  15318. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/grid.js ***!
  15319. \*****************************************************************************************************************/
  15320. /*! no static exports found */
  15321. /***/ (function(module, exports, __webpack_require__) {
  15322. "use strict";
  15323. Object.defineProperty(exports, "__esModule", {
  15324. value: true
  15325. });
  15326. exports.default = void 0;
  15327. /*
  15328. * @Author : LQ
  15329. * @Description :
  15330. * @version : 1.0
  15331. * @Date : 2021-08-20 16:44:21
  15332. * @LastAuthor : LQ
  15333. * @lastTime : 2021-08-20 17:05:57
  15334. * @FilePath : /u-view2.0/uview-ui/libs/config/props/grid.js
  15335. */
  15336. var _default = {
  15337. // grid组件
  15338. grid: {
  15339. col: 3,
  15340. border: false,
  15341. align: 'left'
  15342. }
  15343. };
  15344. exports.default = _default;
  15345. /***/ }),
  15346. /* 98 */
  15347. /*!*********************************************************************************************************************!*\
  15348. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/gridItem.js ***!
  15349. \*********************************************************************************************************************/
  15350. /*! no static exports found */
  15351. /***/ (function(module, exports, __webpack_require__) {
  15352. "use strict";
  15353. Object.defineProperty(exports, "__esModule", {
  15354. value: true
  15355. });
  15356. exports.default = void 0;
  15357. /*
  15358. * @Author : LQ
  15359. * @Description :
  15360. * @version : 1.0
  15361. * @Date : 2021-08-20 16:44:21
  15362. * @LastAuthor : LQ
  15363. * @lastTime : 2021-08-20 17:06:13
  15364. * @FilePath : /u-view2.0/uview-ui/libs/config/props/gridItem.js
  15365. */
  15366. var _default = {
  15367. // grid-item组件
  15368. gridItem: {
  15369. name: null,
  15370. bgColor: 'transparent'
  15371. }
  15372. };
  15373. exports.default = _default;
  15374. /***/ }),
  15375. /* 99 */
  15376. /*!*****************************************************************************************************************!*\
  15377. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/icon.js ***!
  15378. \*****************************************************************************************************************/
  15379. /*! no static exports found */
  15380. /***/ (function(module, exports, __webpack_require__) {
  15381. "use strict";
  15382. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15383. Object.defineProperty(exports, "__esModule", {
  15384. value: true
  15385. });
  15386. exports.default = void 0;
  15387. var _config = _interopRequireDefault(__webpack_require__(/*! ../config */ 66));
  15388. /*
  15389. * @Author : LQ
  15390. * @Description :
  15391. * @version : 1.0
  15392. * @Date : 2021-08-20 16:44:21
  15393. * @LastAuthor : LQ
  15394. * @lastTime : 2021-08-20 18:00:14
  15395. * @FilePath : /u-view2.0/uview-ui/libs/config/props/icon.js
  15396. */
  15397. var color = _config.default.color;
  15398. var _default = {
  15399. // icon组件
  15400. icon: {
  15401. name: '',
  15402. color: color['u-content-color'],
  15403. size: '16px',
  15404. bold: false,
  15405. index: '',
  15406. hoverClass: '',
  15407. customPrefix: 'uicon',
  15408. label: '',
  15409. labelPos: 'right',
  15410. labelSize: '15px',
  15411. labelColor: color['u-content-color'],
  15412. space: '3px',
  15413. imgMode: '',
  15414. width: '',
  15415. height: '',
  15416. top: 0,
  15417. stop: false
  15418. }
  15419. };
  15420. exports.default = _default;
  15421. /***/ }),
  15422. /* 100 */
  15423. /*!******************************************************************************************************************!*\
  15424. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/image.js ***!
  15425. \******************************************************************************************************************/
  15426. /*! no static exports found */
  15427. /***/ (function(module, exports, __webpack_require__) {
  15428. "use strict";
  15429. Object.defineProperty(exports, "__esModule", {
  15430. value: true
  15431. });
  15432. exports.default = void 0;
  15433. /*
  15434. * @Author : LQ
  15435. * @Description :
  15436. * @version : 1.0
  15437. * @Date : 2021-08-20 16:44:21
  15438. * @LastAuthor : LQ
  15439. * @lastTime : 2021-08-20 17:01:51
  15440. * @FilePath : /u-view2.0/uview-ui/libs/config/props/image.js
  15441. */
  15442. var _default = {
  15443. // image组件
  15444. image: {
  15445. src: '',
  15446. mode: 'aspectFill',
  15447. width: '300',
  15448. height: '225',
  15449. shape: 'square',
  15450. radius: 0,
  15451. lazyLoad: true,
  15452. showMenuByLongpress: true,
  15453. loadingIcon: 'photo',
  15454. errorIcon: 'error-circle',
  15455. showLoading: true,
  15456. showError: true,
  15457. fade: true,
  15458. webp: false,
  15459. duration: 500,
  15460. bgColor: '#f3f4f6'
  15461. }
  15462. };
  15463. exports.default = _default;
  15464. /***/ }),
  15465. /* 101 */
  15466. /*!************************************************************************************************************************!*\
  15467. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/indexAnchor.js ***!
  15468. \************************************************************************************************************************/
  15469. /*! no static exports found */
  15470. /***/ (function(module, exports, __webpack_require__) {
  15471. "use strict";
  15472. Object.defineProperty(exports, "__esModule", {
  15473. value: true
  15474. });
  15475. exports.default = void 0;
  15476. /*
  15477. * @Author : LQ
  15478. * @Description :
  15479. * @version : 1.0
  15480. * @Date : 2021-08-20 16:44:21
  15481. * @LastAuthor : LQ
  15482. * @lastTime : 2021-08-20 17:13:15
  15483. * @FilePath : /u-view2.0/uview-ui/libs/config/props/indexAnchor.js
  15484. */
  15485. var _default = {
  15486. // indexAnchor 组件
  15487. indexAnchor: {
  15488. text: '',
  15489. color: '#606266',
  15490. size: 14,
  15491. bgColor: '#dedede',
  15492. height: 32
  15493. }
  15494. };
  15495. exports.default = _default;
  15496. /***/ }),
  15497. /* 102 */
  15498. /*!**********************************************************************************************************************!*\
  15499. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/indexList.js ***!
  15500. \**********************************************************************************************************************/
  15501. /*! no static exports found */
  15502. /***/ (function(module, exports, __webpack_require__) {
  15503. "use strict";
  15504. Object.defineProperty(exports, "__esModule", {
  15505. value: true
  15506. });
  15507. exports.default = void 0;
  15508. /*
  15509. * @Author : LQ
  15510. * @Description :
  15511. * @version : 1.0
  15512. * @Date : 2021-08-20 16:44:21
  15513. * @LastAuthor : LQ
  15514. * @lastTime : 2021-08-20 17:13:35
  15515. * @FilePath : /u-view2.0/uview-ui/libs/config/props/indexList.js
  15516. */
  15517. var _default = {
  15518. // indexList 组件
  15519. indexList: {
  15520. inactiveColor: '#606266',
  15521. activeColor: '#5677fc',
  15522. indexList: function indexList() {
  15523. return [];
  15524. },
  15525. sticky: true,
  15526. customNavHeight: 0
  15527. }
  15528. };
  15529. exports.default = _default;
  15530. /***/ }),
  15531. /* 103 */
  15532. /*!******************************************************************************************************************!*\
  15533. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/input.js ***!
  15534. \******************************************************************************************************************/
  15535. /*! no static exports found */
  15536. /***/ (function(module, exports, __webpack_require__) {
  15537. "use strict";
  15538. Object.defineProperty(exports, "__esModule", {
  15539. value: true
  15540. });
  15541. exports.default = void 0;
  15542. /*
  15543. * @Author : LQ
  15544. * @Description :
  15545. * @version : 1.0
  15546. * @Date : 2021-08-20 16:44:21
  15547. * @LastAuthor : LQ
  15548. * @lastTime : 2021-08-20 17:13:55
  15549. * @FilePath : /u-view2.0/uview-ui/libs/config/props/input.js
  15550. */
  15551. var _default = {
  15552. // index 组件
  15553. input: {
  15554. value: '',
  15555. type: 'text',
  15556. fixed: false,
  15557. disabled: false,
  15558. disabledColor: '#f5f7fa',
  15559. clearable: false,
  15560. password: false,
  15561. maxlength: -1,
  15562. placeholder: null,
  15563. placeholderClass: 'input-placeholder',
  15564. placeholderStyle: 'color: #c0c4cc',
  15565. showWordLimit: false,
  15566. confirmType: 'done',
  15567. confirmHold: false,
  15568. holdKeyboard: false,
  15569. focus: false,
  15570. autoBlur: false,
  15571. disableDefaultPadding: false,
  15572. cursor: -1,
  15573. cursorSpacing: 30,
  15574. selectionStart: -1,
  15575. selectionEnd: -1,
  15576. adjustPosition: true,
  15577. inputAlign: 'left',
  15578. fontSize: '15px',
  15579. color: '#303133',
  15580. prefixIcon: '',
  15581. prefixIconStyle: '',
  15582. suffixIcon: '',
  15583. suffixIconStyle: '',
  15584. border: 'surround',
  15585. readonly: false,
  15586. shape: 'square',
  15587. formatter: null
  15588. }
  15589. };
  15590. exports.default = _default;
  15591. /***/ }),
  15592. /* 104 */
  15593. /*!*********************************************************************************************************************!*\
  15594. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/keyboard.js ***!
  15595. \*********************************************************************************************************************/
  15596. /*! no static exports found */
  15597. /***/ (function(module, exports, __webpack_require__) {
  15598. "use strict";
  15599. Object.defineProperty(exports, "__esModule", {
  15600. value: true
  15601. });
  15602. exports.default = void 0;
  15603. /*
  15604. * @Author : LQ
  15605. * @Description :
  15606. * @version : 1.0
  15607. * @Date : 2021-08-20 16:44:21
  15608. * @LastAuthor : LQ
  15609. * @lastTime : 2021-08-20 17:07:49
  15610. * @FilePath : /u-view2.0/uview-ui/libs/config/props/keyboard.js
  15611. */
  15612. var _default = {
  15613. // 键盘组件
  15614. keyboard: {
  15615. mode: 'number',
  15616. dotDisabled: false,
  15617. tooltip: true,
  15618. showTips: true,
  15619. tips: '',
  15620. showCancel: true,
  15621. showConfirm: true,
  15622. random: false,
  15623. safeAreaInsetBottom: true,
  15624. closeOnClickOverlay: true,
  15625. show: false,
  15626. overlay: true,
  15627. zIndex: 10075,
  15628. cancelText: '取消',
  15629. confirmText: '确定',
  15630. autoChange: false
  15631. }
  15632. };
  15633. exports.default = _default;
  15634. /***/ }),
  15635. /* 105 */
  15636. /*!*****************************************************************************************************************!*\
  15637. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/line.js ***!
  15638. \*****************************************************************************************************************/
  15639. /*! no static exports found */
  15640. /***/ (function(module, exports, __webpack_require__) {
  15641. "use strict";
  15642. Object.defineProperty(exports, "__esModule", {
  15643. value: true
  15644. });
  15645. exports.default = void 0;
  15646. /*
  15647. * @Author : LQ
  15648. * @Description :
  15649. * @version : 1.0
  15650. * @Date : 2021-08-20 16:44:21
  15651. * @LastAuthor : LQ
  15652. * @lastTime : 2021-08-20 17:04:49
  15653. * @FilePath : /u-view2.0/uview-ui/libs/config/props/line.js
  15654. */
  15655. var _default = {
  15656. // line组件
  15657. line: {
  15658. color: '#d6d7d9',
  15659. length: '100%',
  15660. direction: 'row',
  15661. hairline: true,
  15662. margin: 0,
  15663. dashed: false
  15664. }
  15665. };
  15666. exports.default = _default;
  15667. /***/ }),
  15668. /* 106 */
  15669. /*!*************************************************************************************************************************!*\
  15670. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/lineProgress.js ***!
  15671. \*************************************************************************************************************************/
  15672. /*! no static exports found */
  15673. /***/ (function(module, exports, __webpack_require__) {
  15674. "use strict";
  15675. Object.defineProperty(exports, "__esModule", {
  15676. value: true
  15677. });
  15678. exports.default = void 0;
  15679. /*
  15680. * @Author : LQ
  15681. * @Description :
  15682. * @version : 1.0
  15683. * @Date : 2021-08-20 16:44:21
  15684. * @LastAuthor : LQ
  15685. * @lastTime : 2021-08-20 17:14:11
  15686. * @FilePath : /u-view2.0/uview-ui/libs/config/props/lineProgress.js
  15687. */
  15688. var _default = {
  15689. // lineProgress 组件
  15690. lineProgress: {
  15691. activeColor: '#19be6b',
  15692. inactiveColor: '#ececec',
  15693. percentage: 0,
  15694. showText: true,
  15695. height: 12
  15696. }
  15697. };
  15698. exports.default = _default;
  15699. /***/ }),
  15700. /* 107 */
  15701. /*!*****************************************************************************************************************!*\
  15702. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/link.js ***!
  15703. \*****************************************************************************************************************/
  15704. /*! no static exports found */
  15705. /***/ (function(module, exports, __webpack_require__) {
  15706. "use strict";
  15707. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15708. Object.defineProperty(exports, "__esModule", {
  15709. value: true
  15710. });
  15711. exports.default = void 0;
  15712. var _config = _interopRequireDefault(__webpack_require__(/*! ../config */ 66));
  15713. /*
  15714. * @Author : LQ
  15715. * @Description :
  15716. * @version : 1.0
  15717. * @Date : 2021-08-20 16:44:21
  15718. * @LastAuthor : LQ
  15719. * @lastTime : 2021-08-20 17:45:36
  15720. * @FilePath : /u-view2.0/uview-ui/libs/config/props/link.js
  15721. */
  15722. var color = _config.default.color;
  15723. var _default = {
  15724. // link超链接组件props参数
  15725. link: {
  15726. color: color['u-primary'],
  15727. fontSize: 15,
  15728. underLine: false,
  15729. href: '',
  15730. mpTips: '链接已复制,请在浏览器打开',
  15731. lineColor: '',
  15732. text: ''
  15733. }
  15734. };
  15735. exports.default = _default;
  15736. /***/ }),
  15737. /* 108 */
  15738. /*!*****************************************************************************************************************!*\
  15739. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/list.js ***!
  15740. \*****************************************************************************************************************/
  15741. /*! no static exports found */
  15742. /***/ (function(module, exports, __webpack_require__) {
  15743. "use strict";
  15744. Object.defineProperty(exports, "__esModule", {
  15745. value: true
  15746. });
  15747. exports.default = void 0;
  15748. /*
  15749. * @Author : LQ
  15750. * @Description :
  15751. * @version : 1.0
  15752. * @Date : 2021-08-20 16:44:21
  15753. * @LastAuthor : LQ
  15754. * @lastTime : 2021-08-20 17:14:53
  15755. * @FilePath : /u-view2.0/uview-ui/libs/config/props/list.js
  15756. */
  15757. var _default = {
  15758. // list 组件
  15759. list: {
  15760. showScrollbar: false,
  15761. lowerThreshold: 50,
  15762. upperThreshold: 0,
  15763. scrollTop: 0,
  15764. offsetAccuracy: 10,
  15765. enableFlex: false,
  15766. pagingEnabled: false,
  15767. scrollable: true,
  15768. scrollIntoView: '',
  15769. scrollWithAnimation: false,
  15770. enableBackToTop: false,
  15771. height: 0,
  15772. width: 0,
  15773. preLoadScreen: 1
  15774. }
  15775. };
  15776. exports.default = _default;
  15777. /***/ }),
  15778. /* 109 */
  15779. /*!*********************************************************************************************************************!*\
  15780. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/listItem.js ***!
  15781. \*********************************************************************************************************************/
  15782. /*! no static exports found */
  15783. /***/ (function(module, exports, __webpack_require__) {
  15784. "use strict";
  15785. Object.defineProperty(exports, "__esModule", {
  15786. value: true
  15787. });
  15788. exports.default = void 0;
  15789. /*
  15790. * @Author : LQ
  15791. * @Description :
  15792. * @version : 1.0
  15793. * @Date : 2021-08-20 16:44:21
  15794. * @LastAuthor : LQ
  15795. * @lastTime : 2021-08-20 17:15:40
  15796. * @FilePath : /u-view2.0/uview-ui/libs/config/props/listItem.js
  15797. */
  15798. var _default = {
  15799. // listItem 组件
  15800. listItem: {
  15801. anchor: ''
  15802. }
  15803. };
  15804. exports.default = _default;
  15805. /***/ }),
  15806. /* 110 */
  15807. /*!************************************************************************************************************************!*\
  15808. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/loadingIcon.js ***!
  15809. \************************************************************************************************************************/
  15810. /*! no static exports found */
  15811. /***/ (function(module, exports, __webpack_require__) {
  15812. "use strict";
  15813. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15814. Object.defineProperty(exports, "__esModule", {
  15815. value: true
  15816. });
  15817. exports.default = void 0;
  15818. var _config = _interopRequireDefault(__webpack_require__(/*! ../config */ 66));
  15819. /*
  15820. * @Author : LQ
  15821. * @Description :
  15822. * @version : 1.0
  15823. * @Date : 2021-08-20 16:44:21
  15824. * @LastAuthor : LQ
  15825. * @lastTime : 2021-08-20 17:45:47
  15826. * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingIcon.js
  15827. */
  15828. var color = _config.default.color;
  15829. var _default = {
  15830. // loading-icon加载中图标组件
  15831. loadingIcon: {
  15832. show: true,
  15833. color: color['u-tips-color'],
  15834. textColor: color['u-tips-color'],
  15835. vertical: false,
  15836. mode: 'spinner',
  15837. size: 24,
  15838. textSize: 15,
  15839. text: '',
  15840. timingFunction: 'ease-in-out',
  15841. duration: 1200,
  15842. inactiveColor: ''
  15843. }
  15844. };
  15845. exports.default = _default;
  15846. /***/ }),
  15847. /* 111 */
  15848. /*!************************************************************************************************************************!*\
  15849. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/loadingPage.js ***!
  15850. \************************************************************************************************************************/
  15851. /*! no static exports found */
  15852. /***/ (function(module, exports, __webpack_require__) {
  15853. "use strict";
  15854. Object.defineProperty(exports, "__esModule", {
  15855. value: true
  15856. });
  15857. exports.default = void 0;
  15858. /*
  15859. * @Author : LQ
  15860. * @Description :
  15861. * @version : 1.0
  15862. * @Date : 2021-08-20 16:44:21
  15863. * @LastAuthor : LQ
  15864. * @lastTime : 2021-08-20 17:00:23
  15865. * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingPage.js
  15866. */
  15867. var _default = {
  15868. // loading-page组件
  15869. loadingPage: {
  15870. loadingText: '正在加载',
  15871. image: '',
  15872. loadingMode: 'circle',
  15873. loading: false,
  15874. bgColor: '#ffffff',
  15875. color: '#C8C8C8',
  15876. fontSize: 19,
  15877. iconSize: 28,
  15878. loadingColor: '#C8C8C8'
  15879. }
  15880. };
  15881. exports.default = _default;
  15882. /***/ }),
  15883. /* 112 */
  15884. /*!*********************************************************************************************************************!*\
  15885. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/loadmore.js ***!
  15886. \*********************************************************************************************************************/
  15887. /*! no static exports found */
  15888. /***/ (function(module, exports, __webpack_require__) {
  15889. "use strict";
  15890. Object.defineProperty(exports, "__esModule", {
  15891. value: true
  15892. });
  15893. exports.default = void 0;
  15894. /*
  15895. * @Author : LQ
  15896. * @Description :
  15897. * @version : 1.0
  15898. * @Date : 2021-08-20 16:44:21
  15899. * @LastAuthor : LQ
  15900. * @lastTime : 2021-08-20 17:15:26
  15901. * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadmore.js
  15902. */
  15903. var _default = {
  15904. // loadmore 组件
  15905. loadmore: {
  15906. status: 'loadmore',
  15907. bgColor: 'transparent',
  15908. icon: true,
  15909. fontSize: 14,
  15910. iconSize: 17,
  15911. color: '#606266',
  15912. loadingIcon: 'spinner',
  15913. loadmoreText: '加载更多',
  15914. loadingText: '正在加载...',
  15915. nomoreText: '没有更多了',
  15916. isDot: false,
  15917. iconColor: '#b7b7b7',
  15918. marginTop: 10,
  15919. marginBottom: 10,
  15920. height: 'auto',
  15921. line: false,
  15922. lineColor: '#E6E8EB',
  15923. dashed: false
  15924. }
  15925. };
  15926. exports.default = _default;
  15927. /***/ }),
  15928. /* 113 */
  15929. /*!******************************************************************************************************************!*\
  15930. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/modal.js ***!
  15931. \******************************************************************************************************************/
  15932. /*! no static exports found */
  15933. /***/ (function(module, exports, __webpack_require__) {
  15934. "use strict";
  15935. Object.defineProperty(exports, "__esModule", {
  15936. value: true
  15937. });
  15938. exports.default = void 0;
  15939. /*
  15940. * @Author : LQ
  15941. * @Description :
  15942. * @version : 1.0
  15943. * @Date : 2021-08-20 16:44:21
  15944. * @LastAuthor : LQ
  15945. * @lastTime : 2021-08-20 17:15:59
  15946. * @FilePath : /u-view2.0/uview-ui/libs/config/props/modal.js
  15947. */
  15948. var _default = {
  15949. // modal 组件
  15950. modal: {
  15951. show: false,
  15952. title: '',
  15953. content: '',
  15954. confirmText: '确认',
  15955. cancelText: '取消',
  15956. showConfirmButton: true,
  15957. showCancelButton: false,
  15958. confirmColor: '#2979ff',
  15959. cancelColor: '#606266',
  15960. buttonReverse: false,
  15961. zoom: true,
  15962. asyncClose: false,
  15963. closeOnClickOverlay: false,
  15964. negativeTop: 0,
  15965. width: '650rpx',
  15966. confirmButtonShape: '',
  15967. duration: 400
  15968. }
  15969. };
  15970. exports.default = _default;
  15971. /***/ }),
  15972. /* 114 */
  15973. /*!*******************************************************************************************************************!*\
  15974. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/navbar.js ***!
  15975. \*******************************************************************************************************************/
  15976. /*! no static exports found */
  15977. /***/ (function(module, exports, __webpack_require__) {
  15978. "use strict";
  15979. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15980. Object.defineProperty(exports, "__esModule", {
  15981. value: true
  15982. });
  15983. exports.default = void 0;
  15984. var _color = _interopRequireDefault(__webpack_require__(/*! ../color */ 115));
  15985. /*
  15986. * @Author : LQ
  15987. * @Description :
  15988. * @version : 1.0
  15989. * @Date : 2021-08-20 16:44:21
  15990. * @LastAuthor : LQ
  15991. * @lastTime : 2021-08-20 17:16:18
  15992. * @FilePath : /u-view2.0/uview-ui/libs/config/props/navbar.js
  15993. */
  15994. var _default = {
  15995. // navbar 组件
  15996. navbar: {
  15997. safeAreaInsetTop: true,
  15998. placeholder: false,
  15999. fixed: true,
  16000. border: false,
  16001. leftIcon: 'arrow-left',
  16002. leftText: '',
  16003. rightText: '',
  16004. rightIcon: '',
  16005. title: '',
  16006. bgColor: '#ffffff',
  16007. titleWidth: '400rpx',
  16008. height: '44px',
  16009. leftIconSize: 20,
  16010. leftIconColor: _color.default.mainColor,
  16011. autoBack: false,
  16012. titleStyle: ''
  16013. }
  16014. };
  16015. exports.default = _default;
  16016. /***/ }),
  16017. /* 115 */
  16018. /*!************************************************************************************************************!*\
  16019. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/color.js ***!
  16020. \************************************************************************************************************/
  16021. /*! no static exports found */
  16022. /***/ (function(module, exports, __webpack_require__) {
  16023. "use strict";
  16024. Object.defineProperty(exports, "__esModule", {
  16025. value: true
  16026. });
  16027. exports.default = void 0;
  16028. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  16029. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  16030. var color = {
  16031. primary: '#3c9cff',
  16032. info: '#909399',
  16033. default: '#909399',
  16034. warning: '#f9ae3d',
  16035. error: '#f56c6c',
  16036. success: '#5ac725',
  16037. mainColor: '#303133',
  16038. contentColor: '#606266',
  16039. tipsColor: '#909399',
  16040. lightColor: '#c0c4cc',
  16041. borderColor: '#e4e7ed'
  16042. };
  16043. var _default = color;
  16044. exports.default = _default;
  16045. /***/ }),
  16046. /* 116 */
  16047. /*!**********************************************************************************************************************!*\
  16048. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/noNetwork.js ***!
  16049. \**********************************************************************************************************************/
  16050. /*! no static exports found */
  16051. /***/ (function(module, exports, __webpack_require__) {
  16052. "use strict";
  16053. Object.defineProperty(exports, "__esModule", {
  16054. value: true
  16055. });
  16056. exports.default = void 0;
  16057. /*
  16058. * @Author : LQ
  16059. * @Description :
  16060. * @version : 1.0
  16061. * @Date : 2021-08-20 16:44:21
  16062. * @LastAuthor : LQ
  16063. * @lastTime : 2021-08-20 17:16:39
  16064. * @FilePath : /u-view2.0/uview-ui/libs/config/props/noNetwork.js
  16065. */
  16066. var _default = {
  16067. // noNetwork
  16068. noNetwork: {
  16069. tips: '哎呀,网络信号丢失',
  16070. zIndex: '',
  16071. image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC'
  16072. }
  16073. };
  16074. exports.default = _default;
  16075. /***/ }),
  16076. /* 117 */
  16077. /*!**********************************************************************************************************************!*\
  16078. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/noticeBar.js ***!
  16079. \**********************************************************************************************************************/
  16080. /*! no static exports found */
  16081. /***/ (function(module, exports, __webpack_require__) {
  16082. "use strict";
  16083. Object.defineProperty(exports, "__esModule", {
  16084. value: true
  16085. });
  16086. exports.default = void 0;
  16087. /*
  16088. * @Author : LQ
  16089. * @Description :
  16090. * @version : 1.0
  16091. * @Date : 2021-08-20 16:44:21
  16092. * @LastAuthor : LQ
  16093. * @lastTime : 2021-08-20 17:17:13
  16094. * @FilePath : /u-view2.0/uview-ui/libs/config/props/noticeBar.js
  16095. */
  16096. var _default = {
  16097. // noticeBar
  16098. noticeBar: {
  16099. text: function text() {
  16100. return [];
  16101. },
  16102. direction: 'row',
  16103. step: false,
  16104. icon: 'volume',
  16105. mode: '',
  16106. color: '#f9ae3d',
  16107. bgColor: '#fdf6ec',
  16108. speed: 80,
  16109. fontSize: 14,
  16110. duration: 2000,
  16111. disableTouch: true,
  16112. url: '',
  16113. linkType: 'navigateTo'
  16114. }
  16115. };
  16116. exports.default = _default;
  16117. /***/ }),
  16118. /* 118 */
  16119. /*!*******************************************************************************************************************!*\
  16120. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/notify.js ***!
  16121. \*******************************************************************************************************************/
  16122. /*! no static exports found */
  16123. /***/ (function(module, exports, __webpack_require__) {
  16124. "use strict";
  16125. Object.defineProperty(exports, "__esModule", {
  16126. value: true
  16127. });
  16128. exports.default = void 0;
  16129. /*
  16130. * @Author : LQ
  16131. * @Description :
  16132. * @version : 1.0
  16133. * @Date : 2021-08-20 16:44:21
  16134. * @LastAuthor : LQ
  16135. * @lastTime : 2021-08-20 17:10:21
  16136. * @FilePath : /u-view2.0/uview-ui/libs/config/props/notify.js
  16137. */
  16138. var _default = {
  16139. // notify组件
  16140. notify: {
  16141. top: 0,
  16142. type: 'primary',
  16143. color: '#ffffff',
  16144. bgColor: '',
  16145. message: '',
  16146. duration: 3000,
  16147. fontSize: 15,
  16148. safeAreaInsetTop: false
  16149. }
  16150. };
  16151. exports.default = _default;
  16152. /***/ }),
  16153. /* 119 */
  16154. /*!**********************************************************************************************************************!*\
  16155. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/numberBox.js ***!
  16156. \**********************************************************************************************************************/
  16157. /*! no static exports found */
  16158. /***/ (function(module, exports, __webpack_require__) {
  16159. "use strict";
  16160. Object.defineProperty(exports, "__esModule", {
  16161. value: true
  16162. });
  16163. exports.default = void 0;
  16164. /*
  16165. * @Author : LQ
  16166. * @Description :
  16167. * @version : 1.0
  16168. * @Date : 2021-08-20 16:44:21
  16169. * @LastAuthor : LQ
  16170. * @lastTime : 2021-08-20 17:11:46
  16171. * @FilePath : /u-view2.0/uview-ui/libs/config/props/numberBox.js
  16172. */
  16173. var _default = {
  16174. // 步进器组件
  16175. numberBox: {
  16176. name: '',
  16177. value: 0,
  16178. min: 1,
  16179. max: Number.MAX_SAFE_INTEGER,
  16180. step: 1,
  16181. integer: false,
  16182. disabled: false,
  16183. disabledInput: false,
  16184. asyncChange: false,
  16185. inputWidth: 35,
  16186. showMinus: true,
  16187. showPlus: true,
  16188. decimalLength: null,
  16189. longPress: true,
  16190. color: '#323233',
  16191. buttonSize: 30,
  16192. bgColor: '#EBECEE',
  16193. cursorSpacing: 100,
  16194. disableMinus: false,
  16195. disablePlus: false,
  16196. iconStyle: ''
  16197. }
  16198. };
  16199. exports.default = _default;
  16200. /***/ }),
  16201. /* 120 */
  16202. /*!***************************************************************************************************************************!*\
  16203. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/numberKeyboard.js ***!
  16204. \***************************************************************************************************************************/
  16205. /*! no static exports found */
  16206. /***/ (function(module, exports, __webpack_require__) {
  16207. "use strict";
  16208. Object.defineProperty(exports, "__esModule", {
  16209. value: true
  16210. });
  16211. exports.default = void 0;
  16212. /*
  16213. * @Author : LQ
  16214. * @Description :
  16215. * @version : 1.0
  16216. * @Date : 2021-08-20 16:44:21
  16217. * @LastAuthor : LQ
  16218. * @lastTime : 2021-08-20 17:08:05
  16219. * @FilePath : /u-view2.0/uview-ui/libs/config/props/numberKeyboard.js
  16220. */
  16221. var _default = {
  16222. // 数字键盘
  16223. numberKeyboard: {
  16224. mode: 'number',
  16225. dotDisabled: false,
  16226. random: false
  16227. }
  16228. };
  16229. exports.default = _default;
  16230. /***/ }),
  16231. /* 121 */
  16232. /*!********************************************************************************************************************!*\
  16233. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/overlay.js ***!
  16234. \********************************************************************************************************************/
  16235. /*! no static exports found */
  16236. /***/ (function(module, exports, __webpack_require__) {
  16237. "use strict";
  16238. Object.defineProperty(exports, "__esModule", {
  16239. value: true
  16240. });
  16241. exports.default = void 0;
  16242. /*
  16243. * @Author : LQ
  16244. * @Description :
  16245. * @version : 1.0
  16246. * @Date : 2021-08-20 16:44:21
  16247. * @LastAuthor : LQ
  16248. * @lastTime : 2021-08-20 17:06:50
  16249. * @FilePath : /u-view2.0/uview-ui/libs/config/props/overlay.js
  16250. */
  16251. var _default = {
  16252. // overlay组件
  16253. overlay: {
  16254. show: false,
  16255. zIndex: 10070,
  16256. duration: 300,
  16257. opacity: 0.5
  16258. }
  16259. };
  16260. exports.default = _default;
  16261. /***/ }),
  16262. /* 122 */
  16263. /*!******************************************************************************************************************!*\
  16264. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/parse.js ***!
  16265. \******************************************************************************************************************/
  16266. /*! no static exports found */
  16267. /***/ (function(module, exports, __webpack_require__) {
  16268. "use strict";
  16269. Object.defineProperty(exports, "__esModule", {
  16270. value: true
  16271. });
  16272. exports.default = void 0;
  16273. /*
  16274. * @Author : LQ
  16275. * @Description :
  16276. * @version : 1.0
  16277. * @Date : 2021-08-20 16:44:21
  16278. * @LastAuthor : LQ
  16279. * @lastTime : 2021-08-20 17:17:33
  16280. * @FilePath : /u-view2.0/uview-ui/libs/config/props/parse.js
  16281. */
  16282. var _default = {
  16283. // parse
  16284. parse: {
  16285. copyLink: true,
  16286. errorImg: '',
  16287. lazyLoad: false,
  16288. loadingImg: '',
  16289. pauseVideo: true,
  16290. previewImg: true,
  16291. setTitle: true,
  16292. showImgMenu: true
  16293. }
  16294. };
  16295. exports.default = _default;
  16296. /***/ }),
  16297. /* 123 */
  16298. /*!*******************************************************************************************************************!*\
  16299. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/picker.js ***!
  16300. \*******************************************************************************************************************/
  16301. /*! no static exports found */
  16302. /***/ (function(module, exports, __webpack_require__) {
  16303. "use strict";
  16304. Object.defineProperty(exports, "__esModule", {
  16305. value: true
  16306. });
  16307. exports.default = void 0;
  16308. /*
  16309. * @Author : LQ
  16310. * @Description :
  16311. * @version : 1.0
  16312. * @Date : 2021-08-20 16:44:21
  16313. * @LastAuthor : LQ
  16314. * @lastTime : 2021-08-20 17:18:20
  16315. * @FilePath : /u-view2.0/uview-ui/libs/config/props/picker.js
  16316. */
  16317. var _default = {
  16318. // picker
  16319. picker: {
  16320. show: false,
  16321. showToolbar: true,
  16322. title: '',
  16323. columns: function columns() {
  16324. return [];
  16325. },
  16326. loading: false,
  16327. itemHeight: 44,
  16328. cancelText: '取消',
  16329. confirmText: '确定',
  16330. cancelColor: '#909193',
  16331. confirmColor: '#3c9cff',
  16332. visibleItemCount: 5,
  16333. keyName: 'text',
  16334. closeOnClickOverlay: false,
  16335. defaultIndex: function defaultIndex() {
  16336. return [];
  16337. },
  16338. immediateChange: false
  16339. }
  16340. };
  16341. exports.default = _default;
  16342. /***/ }),
  16343. /* 124 */
  16344. /*!******************************************************************************************************************!*\
  16345. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/popup.js ***!
  16346. \******************************************************************************************************************/
  16347. /*! no static exports found */
  16348. /***/ (function(module, exports, __webpack_require__) {
  16349. "use strict";
  16350. Object.defineProperty(exports, "__esModule", {
  16351. value: true
  16352. });
  16353. exports.default = void 0;
  16354. /*
  16355. * @Author : LQ
  16356. * @Description :
  16357. * @version : 1.0
  16358. * @Date : 2021-08-20 16:44:21
  16359. * @LastAuthor : LQ
  16360. * @lastTime : 2021-08-20 17:06:33
  16361. * @FilePath : /u-view2.0/uview-ui/libs/config/props/popup.js
  16362. */
  16363. var _default = {
  16364. // popup组件
  16365. popup: {
  16366. show: false,
  16367. overlay: true,
  16368. mode: 'bottom',
  16369. duration: 300,
  16370. closeable: false,
  16371. overlayStyle: function overlayStyle() {},
  16372. closeOnClickOverlay: true,
  16373. zIndex: 10075,
  16374. safeAreaInsetBottom: true,
  16375. safeAreaInsetTop: false,
  16376. closeIconPos: 'top-right',
  16377. round: 0,
  16378. zoom: true,
  16379. bgColor: '',
  16380. overlayOpacity: 0.5
  16381. }
  16382. };
  16383. exports.default = _default;
  16384. /***/ }),
  16385. /* 125 */
  16386. /*!******************************************************************************************************************!*\
  16387. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/radio.js ***!
  16388. \******************************************************************************************************************/
  16389. /*! no static exports found */
  16390. /***/ (function(module, exports, __webpack_require__) {
  16391. "use strict";
  16392. Object.defineProperty(exports, "__esModule", {
  16393. value: true
  16394. });
  16395. exports.default = void 0;
  16396. /*
  16397. * @Author : LQ
  16398. * @Description :
  16399. * @version : 1.0
  16400. * @Date : 2021-08-20 16:44:21
  16401. * @LastAuthor : LQ
  16402. * @lastTime : 2021-08-20 17:02:34
  16403. * @FilePath : /u-view2.0/uview-ui/libs/config/props/radio.js
  16404. */
  16405. var _default = {
  16406. // radio组件
  16407. radio: {
  16408. name: '',
  16409. shape: '',
  16410. disabled: '',
  16411. labelDisabled: '',
  16412. activeColor: '',
  16413. inactiveColor: '',
  16414. iconSize: '',
  16415. labelSize: '',
  16416. label: '',
  16417. labelColor: '',
  16418. size: '',
  16419. iconColor: '',
  16420. placement: ''
  16421. }
  16422. };
  16423. exports.default = _default;
  16424. /***/ }),
  16425. /* 126 */
  16426. /*!***********************************************************************************************************************!*\
  16427. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/radioGroup.js ***!
  16428. \***********************************************************************************************************************/
  16429. /*! no static exports found */
  16430. /***/ (function(module, exports, __webpack_require__) {
  16431. "use strict";
  16432. Object.defineProperty(exports, "__esModule", {
  16433. value: true
  16434. });
  16435. exports.default = void 0;
  16436. /*
  16437. * @Author : LQ
  16438. * @Description :
  16439. * @version : 1.0
  16440. * @Date : 2021-08-20 16:44:21
  16441. * @LastAuthor : LQ
  16442. * @lastTime : 2021-08-20 17:03:12
  16443. * @FilePath : /u-view2.0/uview-ui/libs/config/props/radioGroup.js
  16444. */
  16445. var _default = {
  16446. // radio-group组件
  16447. radioGroup: {
  16448. value: '',
  16449. disabled: false,
  16450. shape: 'circle',
  16451. activeColor: '#2979ff',
  16452. inactiveColor: '#c8c9cc',
  16453. name: '',
  16454. size: 18,
  16455. placement: 'row',
  16456. label: '',
  16457. labelColor: '#303133',
  16458. labelSize: 14,
  16459. labelDisabled: false,
  16460. iconColor: '#ffffff',
  16461. iconSize: 12,
  16462. borderBottom: false,
  16463. iconPlacement: 'left'
  16464. }
  16465. };
  16466. exports.default = _default;
  16467. /***/ }),
  16468. /* 127 */
  16469. /*!*****************************************************************************************************************!*\
  16470. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/rate.js ***!
  16471. \*****************************************************************************************************************/
  16472. /*! no static exports found */
  16473. /***/ (function(module, exports, __webpack_require__) {
  16474. "use strict";
  16475. Object.defineProperty(exports, "__esModule", {
  16476. value: true
  16477. });
  16478. exports.default = void 0;
  16479. /*
  16480. * @Author : LQ
  16481. * @Description :
  16482. * @version : 1.0
  16483. * @Date : 2021-08-20 16:44:21
  16484. * @LastAuthor : LQ
  16485. * @lastTime : 2021-08-20 17:05:09
  16486. * @FilePath : /u-view2.0/uview-ui/libs/config/props/rate.js
  16487. */
  16488. var _default = {
  16489. // rate组件
  16490. rate: {
  16491. value: 1,
  16492. count: 5,
  16493. disabled: false,
  16494. size: 18,
  16495. inactiveColor: '#b2b2b2',
  16496. activeColor: '#FA3534',
  16497. gutter: 4,
  16498. minCount: 1,
  16499. allowHalf: false,
  16500. activeIcon: 'star-fill',
  16501. inactiveIcon: 'star',
  16502. touchable: true
  16503. }
  16504. };
  16505. exports.default = _default;
  16506. /***/ }),
  16507. /* 128 */
  16508. /*!*********************************************************************************************************************!*\
  16509. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/readMore.js ***!
  16510. \*********************************************************************************************************************/
  16511. /*! no static exports found */
  16512. /***/ (function(module, exports, __webpack_require__) {
  16513. "use strict";
  16514. Object.defineProperty(exports, "__esModule", {
  16515. value: true
  16516. });
  16517. exports.default = void 0;
  16518. /*
  16519. * @Author : LQ
  16520. * @Description :
  16521. * @version : 1.0
  16522. * @Date : 2021-08-20 16:44:21
  16523. * @LastAuthor : LQ
  16524. * @lastTime : 2021-08-20 17:18:41
  16525. * @FilePath : /u-view2.0/uview-ui/libs/config/props/readMore.js
  16526. */
  16527. var _default = {
  16528. // readMore
  16529. readMore: {
  16530. showHeight: 400,
  16531. toggle: false,
  16532. closeText: '展开阅读全文',
  16533. openText: '收起',
  16534. color: '#2979ff',
  16535. fontSize: 14,
  16536. textIndent: '2em',
  16537. name: ''
  16538. }
  16539. };
  16540. exports.default = _default;
  16541. /***/ }),
  16542. /* 129 */
  16543. /*!****************************************************************************************************************!*\
  16544. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/row.js ***!
  16545. \****************************************************************************************************************/
  16546. /*! no static exports found */
  16547. /***/ (function(module, exports, __webpack_require__) {
  16548. "use strict";
  16549. Object.defineProperty(exports, "__esModule", {
  16550. value: true
  16551. });
  16552. exports.default = void 0;
  16553. /*
  16554. * @Author : LQ
  16555. * @Description :
  16556. * @version : 1.0
  16557. * @Date : 2021-08-20 16:44:21
  16558. * @LastAuthor : LQ
  16559. * @lastTime : 2021-08-20 17:18:58
  16560. * @FilePath : /u-view2.0/uview-ui/libs/config/props/row.js
  16561. */
  16562. var _default = {
  16563. // row
  16564. row: {
  16565. gutter: 0,
  16566. justify: 'start',
  16567. align: 'center'
  16568. }
  16569. };
  16570. exports.default = _default;
  16571. /***/ }),
  16572. /* 130 */
  16573. /*!**********************************************************************************************************************!*\
  16574. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/rowNotice.js ***!
  16575. \**********************************************************************************************************************/
  16576. /*! no static exports found */
  16577. /***/ (function(module, exports, __webpack_require__) {
  16578. "use strict";
  16579. Object.defineProperty(exports, "__esModule", {
  16580. value: true
  16581. });
  16582. exports.default = void 0;
  16583. /*
  16584. * @Author : LQ
  16585. * @Description :
  16586. * @version : 1.0
  16587. * @Date : 2021-08-20 16:44:21
  16588. * @LastAuthor : LQ
  16589. * @lastTime : 2021-08-20 17:19:13
  16590. * @FilePath : /u-view2.0/uview-ui/libs/config/props/rowNotice.js
  16591. */
  16592. var _default = {
  16593. // rowNotice
  16594. rowNotice: {
  16595. text: '',
  16596. icon: 'volume',
  16597. mode: '',
  16598. color: '#f9ae3d',
  16599. bgColor: '#fdf6ec',
  16600. fontSize: 14,
  16601. speed: 80
  16602. }
  16603. };
  16604. exports.default = _default;
  16605. /***/ }),
  16606. /* 131 */
  16607. /*!***********************************************************************************************************************!*\
  16608. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/scrollList.js ***!
  16609. \***********************************************************************************************************************/
  16610. /*! no static exports found */
  16611. /***/ (function(module, exports, __webpack_require__) {
  16612. "use strict";
  16613. Object.defineProperty(exports, "__esModule", {
  16614. value: true
  16615. });
  16616. exports.default = void 0;
  16617. /*
  16618. * @Author : LQ
  16619. * @Description :
  16620. * @version : 1.0
  16621. * @Date : 2021-08-20 16:44:21
  16622. * @LastAuthor : LQ
  16623. * @lastTime : 2021-08-20 17:19:28
  16624. * @FilePath : /u-view2.0/uview-ui/libs/config/props/scrollList.js
  16625. */
  16626. var _default = {
  16627. // scrollList
  16628. scrollList: {
  16629. indicatorWidth: 50,
  16630. indicatorBarWidth: 20,
  16631. indicator: true,
  16632. indicatorColor: '#f2f2f2',
  16633. indicatorActiveColor: '#3c9cff',
  16634. indicatorStyle: ''
  16635. }
  16636. };
  16637. exports.default = _default;
  16638. /***/ }),
  16639. /* 132 */
  16640. /*!*******************************************************************************************************************!*\
  16641. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/search.js ***!
  16642. \*******************************************************************************************************************/
  16643. /*! no static exports found */
  16644. /***/ (function(module, exports, __webpack_require__) {
  16645. "use strict";
  16646. Object.defineProperty(exports, "__esModule", {
  16647. value: true
  16648. });
  16649. exports.default = void 0;
  16650. /*
  16651. * @Author : LQ
  16652. * @Description :
  16653. * @version : 1.0
  16654. * @Date : 2021-08-20 16:44:21
  16655. * @LastAuthor : LQ
  16656. * @lastTime : 2021-08-20 17:19:45
  16657. * @FilePath : /u-view2.0/uview-ui/libs/config/props/search.js
  16658. */
  16659. var _default = {
  16660. // search
  16661. search: {
  16662. shape: 'round',
  16663. bgColor: '#f2f2f2',
  16664. placeholder: '请输入关键字',
  16665. clearabled: true,
  16666. focus: false,
  16667. showAction: true,
  16668. actionStyle: function actionStyle() {
  16669. return {};
  16670. },
  16671. actionText: '搜索',
  16672. inputAlign: 'left',
  16673. inputStyle: function inputStyle() {
  16674. return {};
  16675. },
  16676. disabled: false,
  16677. borderColor: 'transparent',
  16678. searchIconColor: '#909399',
  16679. searchIconSize: 22,
  16680. color: '#606266',
  16681. placeholderColor: '#909399',
  16682. searchIcon: 'search',
  16683. margin: '0',
  16684. animation: false,
  16685. value: '',
  16686. maxlength: '-1',
  16687. height: 32,
  16688. label: null
  16689. }
  16690. };
  16691. exports.default = _default;
  16692. /***/ }),
  16693. /* 133 */
  16694. /*!********************************************************************************************************************!*\
  16695. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/section.js ***!
  16696. \********************************************************************************************************************/
  16697. /*! no static exports found */
  16698. /***/ (function(module, exports, __webpack_require__) {
  16699. "use strict";
  16700. Object.defineProperty(exports, "__esModule", {
  16701. value: true
  16702. });
  16703. exports.default = void 0;
  16704. /*
  16705. * @Author : LQ
  16706. * @Description :
  16707. * @version : 1.0
  16708. * @Date : 2021-08-20 16:44:21
  16709. * @LastAuthor : LQ
  16710. * @lastTime : 2021-08-20 17:07:33
  16711. * @FilePath : /u-view2.0/uview-ui/libs/config/props/section.js
  16712. */
  16713. var _default = {
  16714. // u-section组件
  16715. section: {
  16716. title: '',
  16717. subTitle: '更多',
  16718. right: true,
  16719. fontSize: 15,
  16720. bold: true,
  16721. color: '#303133',
  16722. subColor: '#909399',
  16723. showLine: true,
  16724. lineColor: '',
  16725. arrow: true
  16726. }
  16727. };
  16728. exports.default = _default;
  16729. /***/ }),
  16730. /* 134 */
  16731. /*!*********************************************************************************************************************!*\
  16732. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/skeleton.js ***!
  16733. \*********************************************************************************************************************/
  16734. /*! no static exports found */
  16735. /***/ (function(module, exports, __webpack_require__) {
  16736. "use strict";
  16737. Object.defineProperty(exports, "__esModule", {
  16738. value: true
  16739. });
  16740. exports.default = void 0;
  16741. /*
  16742. * @Author : LQ
  16743. * @Description :
  16744. * @version : 1.0
  16745. * @Date : 2021-08-20 16:44:21
  16746. * @LastAuthor : LQ
  16747. * @lastTime : 2021-08-20 17:20:14
  16748. * @FilePath : /u-view2.0/uview-ui/libs/config/props/skeleton.js
  16749. */
  16750. var _default = {
  16751. // skeleton
  16752. skeleton: {
  16753. loading: true,
  16754. animate: true,
  16755. rows: 0,
  16756. rowsWidth: '100%',
  16757. rowsHeight: 18,
  16758. title: true,
  16759. titleWidth: '50%',
  16760. titleHeight: 18,
  16761. avatar: false,
  16762. avatarSize: 32,
  16763. avatarShape: 'circle'
  16764. }
  16765. };
  16766. exports.default = _default;
  16767. /***/ }),
  16768. /* 135 */
  16769. /*!*******************************************************************************************************************!*\
  16770. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/slider.js ***!
  16771. \*******************************************************************************************************************/
  16772. /*! no static exports found */
  16773. /***/ (function(module, exports, __webpack_require__) {
  16774. "use strict";
  16775. Object.defineProperty(exports, "__esModule", {
  16776. value: true
  16777. });
  16778. exports.default = void 0;
  16779. /*
  16780. * @Author : LQ
  16781. * @Description :
  16782. * @version : 1.0
  16783. * @Date : 2021-08-20 16:44:21
  16784. * @LastAuthor : LQ
  16785. * @lastTime : 2021-08-20 17:08:25
  16786. * @FilePath : /u-view2.0/uview-ui/libs/config/props/slider.js
  16787. */
  16788. var _default = {
  16789. // slider组件
  16790. slider: {
  16791. value: 0,
  16792. blockSize: 18,
  16793. min: 0,
  16794. max: 100,
  16795. step: 1,
  16796. activeColor: '#2979ff',
  16797. inactiveColor: '#c0c4cc',
  16798. blockColor: '#ffffff',
  16799. showValue: false,
  16800. disabled: false,
  16801. blockStyle: function blockStyle() {}
  16802. }
  16803. };
  16804. exports.default = _default;
  16805. /***/ }),
  16806. /* 136 */
  16807. /*!**********************************************************************************************************************!*\
  16808. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/statusBar.js ***!
  16809. \**********************************************************************************************************************/
  16810. /*! no static exports found */
  16811. /***/ (function(module, exports, __webpack_require__) {
  16812. "use strict";
  16813. Object.defineProperty(exports, "__esModule", {
  16814. value: true
  16815. });
  16816. exports.default = void 0;
  16817. /*
  16818. * @Author : LQ
  16819. * @Description :
  16820. * @version : 1.0
  16821. * @Date : 2021-08-20 16:44:21
  16822. * @LastAuthor : LQ
  16823. * @lastTime : 2021-08-20 17:20:39
  16824. * @FilePath : /u-view2.0/uview-ui/libs/config/props/statusBar.js
  16825. */
  16826. var _default = {
  16827. // statusBar
  16828. statusBar: {
  16829. bgColor: 'transparent'
  16830. }
  16831. };
  16832. exports.default = _default;
  16833. /***/ }),
  16834. /* 137 */
  16835. /*!******************************************************************************************************************!*\
  16836. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/steps.js ***!
  16837. \******************************************************************************************************************/
  16838. /*! no static exports found */
  16839. /***/ (function(module, exports, __webpack_require__) {
  16840. "use strict";
  16841. Object.defineProperty(exports, "__esModule", {
  16842. value: true
  16843. });
  16844. exports.default = void 0;
  16845. /*
  16846. * @Author : LQ
  16847. * @Description :
  16848. * @version : 1.0
  16849. * @Date : 2021-08-20 16:44:21
  16850. * @LastAuthor : LQ
  16851. * @lastTime : 2021-08-20 17:12:37
  16852. * @FilePath : /u-view2.0/uview-ui/libs/config/props/steps.js
  16853. */
  16854. var _default = {
  16855. // steps组件
  16856. steps: {
  16857. direction: 'row',
  16858. current: 0,
  16859. activeColor: '#3c9cff',
  16860. inactiveColor: '#969799',
  16861. activeIcon: '',
  16862. inactiveIcon: '',
  16863. dot: false
  16864. }
  16865. };
  16866. exports.default = _default;
  16867. /***/ }),
  16868. /* 138 */
  16869. /*!**********************************************************************************************************************!*\
  16870. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/stepsItem.js ***!
  16871. \**********************************************************************************************************************/
  16872. /*! no static exports found */
  16873. /***/ (function(module, exports, __webpack_require__) {
  16874. "use strict";
  16875. Object.defineProperty(exports, "__esModule", {
  16876. value: true
  16877. });
  16878. exports.default = void 0;
  16879. /*
  16880. * @Author : LQ
  16881. * @Description :
  16882. * @version : 1.0
  16883. * @Date : 2021-08-20 16:44:21
  16884. * @LastAuthor : LQ
  16885. * @lastTime : 2021-08-20 17:12:55
  16886. * @FilePath : /u-view2.0/uview-ui/libs/config/props/stepsItem.js
  16887. */
  16888. var _default = {
  16889. // steps-item组件
  16890. stepsItem: {
  16891. title: '',
  16892. desc: '',
  16893. iconSize: 17,
  16894. error: false
  16895. }
  16896. };
  16897. exports.default = _default;
  16898. /***/ }),
  16899. /* 139 */
  16900. /*!*******************************************************************************************************************!*\
  16901. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/sticky.js ***!
  16902. \*******************************************************************************************************************/
  16903. /*! no static exports found */
  16904. /***/ (function(module, exports, __webpack_require__) {
  16905. "use strict";
  16906. Object.defineProperty(exports, "__esModule", {
  16907. value: true
  16908. });
  16909. exports.default = void 0;
  16910. /*
  16911. * @Author : LQ
  16912. * @Description :
  16913. * @version : 1.0
  16914. * @Date : 2021-08-20 16:44:21
  16915. * @LastAuthor : LQ
  16916. * @lastTime : 2021-08-20 17:01:30
  16917. * @FilePath : /u-view2.0/uview-ui/libs/config/props/sticky.js
  16918. */
  16919. var _default = {
  16920. // sticky组件
  16921. sticky: {
  16922. offsetTop: 0,
  16923. customNavHeight: 0,
  16924. disabled: false,
  16925. bgColor: 'transparent',
  16926. zIndex: '',
  16927. index: ''
  16928. }
  16929. };
  16930. exports.default = _default;
  16931. /***/ }),
  16932. /* 140 */
  16933. /*!***********************************************************************************************************************!*\
  16934. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/subsection.js ***!
  16935. \***********************************************************************************************************************/
  16936. /*! no static exports found */
  16937. /***/ (function(module, exports, __webpack_require__) {
  16938. "use strict";
  16939. Object.defineProperty(exports, "__esModule", {
  16940. value: true
  16941. });
  16942. exports.default = void 0;
  16943. /*
  16944. * @Author : LQ
  16945. * @Description :
  16946. * @version : 1.0
  16947. * @Date : 2021-08-20 16:44:21
  16948. * @LastAuthor : LQ
  16949. * @lastTime : 2021-08-20 17:12:20
  16950. * @FilePath : /u-view2.0/uview-ui/libs/config/props/subsection.js
  16951. */
  16952. var _default = {
  16953. // subsection组件
  16954. subsection: {
  16955. list: [],
  16956. current: 0,
  16957. activeColor: '#3c9cff',
  16958. inactiveColor: '#303133',
  16959. mode: 'button',
  16960. fontSize: 12,
  16961. bold: true,
  16962. bgColor: '#eeeeef',
  16963. keyName: 'name'
  16964. }
  16965. };
  16966. exports.default = _default;
  16967. /***/ }),
  16968. /* 141 */
  16969. /*!************************************************************************************************************************!*\
  16970. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/swipeAction.js ***!
  16971. \************************************************************************************************************************/
  16972. /*! no static exports found */
  16973. /***/ (function(module, exports, __webpack_require__) {
  16974. "use strict";
  16975. Object.defineProperty(exports, "__esModule", {
  16976. value: true
  16977. });
  16978. exports.default = void 0;
  16979. /*
  16980. * @Author : LQ
  16981. * @Description :
  16982. * @version : 1.0
  16983. * @Date : 2021-08-20 16:44:21
  16984. * @LastAuthor : LQ
  16985. * @lastTime : 2021-08-20 17:00:42
  16986. * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeAction.js
  16987. */
  16988. var _default = {
  16989. // swipe-action组件
  16990. swipeAction: {
  16991. autoClose: true
  16992. }
  16993. };
  16994. exports.default = _default;
  16995. /***/ }),
  16996. /* 142 */
  16997. /*!****************************************************************************************************************************!*\
  16998. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/swipeActionItem.js ***!
  16999. \****************************************************************************************************************************/
  17000. /*! no static exports found */
  17001. /***/ (function(module, exports, __webpack_require__) {
  17002. "use strict";
  17003. Object.defineProperty(exports, "__esModule", {
  17004. value: true
  17005. });
  17006. exports.default = void 0;
  17007. /*
  17008. * @Author : LQ
  17009. * @Description :
  17010. * @version : 1.0
  17011. * @Date : 2021-08-20 16:44:21
  17012. * @LastAuthor : LQ
  17013. * @lastTime : 2021-08-20 17:01:13
  17014. * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeActionItem.js
  17015. */
  17016. var _default = {
  17017. // swipeActionItem 组件
  17018. swipeActionItem: {
  17019. show: false,
  17020. name: '',
  17021. disabled: false,
  17022. threshold: 20,
  17023. autoClose: true,
  17024. options: [],
  17025. duration: 300
  17026. }
  17027. };
  17028. exports.default = _default;
  17029. /***/ }),
  17030. /* 143 */
  17031. /*!*******************************************************************************************************************!*\
  17032. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/swiper.js ***!
  17033. \*******************************************************************************************************************/
  17034. /*! no static exports found */
  17035. /***/ (function(module, exports, __webpack_require__) {
  17036. "use strict";
  17037. Object.defineProperty(exports, "__esModule", {
  17038. value: true
  17039. });
  17040. exports.default = void 0;
  17041. /*
  17042. * @Author : LQ
  17043. * @Description :
  17044. * @version : 1.0
  17045. * @Date : 2021-08-20 16:44:21
  17046. * @LastAuthor : LQ
  17047. * @lastTime : 2021-08-20 17:21:38
  17048. * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiper.js
  17049. */
  17050. var _default = {
  17051. // swiper 组件
  17052. swiper: {
  17053. list: function list() {
  17054. return [];
  17055. },
  17056. indicator: false,
  17057. indicatorActiveColor: '#FFFFFF',
  17058. indicatorInactiveColor: 'rgba(255, 255, 255, 0.35)',
  17059. indicatorStyle: '',
  17060. indicatorMode: 'line',
  17061. autoplay: true,
  17062. current: 0,
  17063. currentItemId: '',
  17064. interval: 3000,
  17065. duration: 300,
  17066. circular: false,
  17067. previousMargin: 0,
  17068. nextMargin: 0,
  17069. acceleration: false,
  17070. displayMultipleItems: 1,
  17071. easingFunction: 'default',
  17072. keyName: 'url',
  17073. imgMode: 'aspectFill',
  17074. height: 130,
  17075. bgColor: '#f3f4f6',
  17076. radius: 4,
  17077. loading: false,
  17078. showTitle: false
  17079. }
  17080. };
  17081. exports.default = _default;
  17082. /***/ }),
  17083. /* 144 */
  17084. /*!*****************************************************************************************************************************!*\
  17085. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/swipterIndicator.js ***!
  17086. \*****************************************************************************************************************************/
  17087. /*! no static exports found */
  17088. /***/ (function(module, exports, __webpack_require__) {
  17089. "use strict";
  17090. Object.defineProperty(exports, "__esModule", {
  17091. value: true
  17092. });
  17093. exports.default = void 0;
  17094. /*
  17095. * @Author : LQ
  17096. * @Description :
  17097. * @version : 1.0
  17098. * @Date : 2021-08-20 16:44:21
  17099. * @LastAuthor : LQ
  17100. * @lastTime : 2021-08-20 17:22:07
  17101. * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiperIndicator.js
  17102. */
  17103. var _default = {
  17104. // swiperIndicator 组件
  17105. swiperIndicator: {
  17106. length: 0,
  17107. current: 0,
  17108. indicatorActiveColor: '',
  17109. indicatorInactiveColor: '',
  17110. indicatorMode: 'line'
  17111. }
  17112. };
  17113. exports.default = _default;
  17114. /***/ }),
  17115. /* 145 */
  17116. /*!*******************************************************************************************************************!*\
  17117. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/switch.js ***!
  17118. \*******************************************************************************************************************/
  17119. /*! no static exports found */
  17120. /***/ (function(module, exports, __webpack_require__) {
  17121. "use strict";
  17122. Object.defineProperty(exports, "__esModule", {
  17123. value: true
  17124. });
  17125. exports.default = void 0;
  17126. /*
  17127. * @Author : LQ
  17128. * @Description :
  17129. * @version : 1.0
  17130. * @Date : 2021-08-20 16:44:21
  17131. * @LastAuthor : LQ
  17132. * @lastTime : 2021-08-20 17:22:24
  17133. * @FilePath : /u-view2.0/uview-ui/libs/config/props/switch.js
  17134. */
  17135. var _default = {
  17136. // switch
  17137. switch: {
  17138. loading: false,
  17139. disabled: false,
  17140. size: 25,
  17141. activeColor: '#2979ff',
  17142. inactiveColor: '#ffffff',
  17143. value: false,
  17144. activeValue: true,
  17145. inactiveValue: false,
  17146. asyncChange: false,
  17147. space: 0
  17148. }
  17149. };
  17150. exports.default = _default;
  17151. /***/ }),
  17152. /* 146 */
  17153. /*!*******************************************************************************************************************!*\
  17154. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/tabbar.js ***!
  17155. \*******************************************************************************************************************/
  17156. /*! no static exports found */
  17157. /***/ (function(module, exports, __webpack_require__) {
  17158. "use strict";
  17159. Object.defineProperty(exports, "__esModule", {
  17160. value: true
  17161. });
  17162. exports.default = void 0;
  17163. /*
  17164. * @Author : LQ
  17165. * @Description :
  17166. * @version : 1.0
  17167. * @Date : 2021-08-20 16:44:21
  17168. * @LastAuthor : LQ
  17169. * @lastTime : 2021-08-20 17:22:40
  17170. * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbar.js
  17171. */
  17172. var _default = {
  17173. // tabbar
  17174. tabbar: {
  17175. value: null,
  17176. safeAreaInsetBottom: true,
  17177. border: true,
  17178. zIndex: 1,
  17179. activeColor: '#1989fa',
  17180. inactiveColor: '#7d7e80',
  17181. fixed: true,
  17182. placeholder: true
  17183. }
  17184. };
  17185. exports.default = _default;
  17186. /***/ }),
  17187. /* 147 */
  17188. /*!***********************************************************************************************************************!*\
  17189. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/tabbarItem.js ***!
  17190. \***********************************************************************************************************************/
  17191. /*! no static exports found */
  17192. /***/ (function(module, exports, __webpack_require__) {
  17193. "use strict";
  17194. Object.defineProperty(exports, "__esModule", {
  17195. value: true
  17196. });
  17197. exports.default = void 0;
  17198. /*
  17199. * @Author : LQ
  17200. * @Description :
  17201. * @version : 1.0
  17202. * @Date : 2021-08-20 16:44:21
  17203. * @LastAuthor : LQ
  17204. * @lastTime : 2021-08-20 17:22:55
  17205. * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbarItem.js
  17206. */
  17207. var _default = {
  17208. //
  17209. tabbarItem: {
  17210. name: null,
  17211. icon: '',
  17212. badge: null,
  17213. dot: false,
  17214. text: '',
  17215. badgeStyle: 'top: 6px;right:2px;'
  17216. }
  17217. };
  17218. exports.default = _default;
  17219. /***/ }),
  17220. /* 148 */
  17221. /*!*****************************************************************************************************************!*\
  17222. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/tabs.js ***!
  17223. \*****************************************************************************************************************/
  17224. /*! no static exports found */
  17225. /***/ (function(module, exports, __webpack_require__) {
  17226. "use strict";
  17227. Object.defineProperty(exports, "__esModule", {
  17228. value: true
  17229. });
  17230. exports.default = void 0;
  17231. /*
  17232. * @Author : LQ
  17233. * @Description :
  17234. * @version : 1.0
  17235. * @Date : 2021-08-20 16:44:21
  17236. * @LastAuthor : LQ
  17237. * @lastTime : 2021-08-20 17:23:14
  17238. * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabs.js
  17239. */
  17240. var _default = {
  17241. //
  17242. tabs: {
  17243. duration: 300,
  17244. list: function list() {
  17245. return [];
  17246. },
  17247. lineColor: '#3c9cff',
  17248. activeStyle: function activeStyle() {
  17249. return {
  17250. color: '#303133'
  17251. };
  17252. },
  17253. inactiveStyle: function inactiveStyle() {
  17254. return {
  17255. color: '#606266'
  17256. };
  17257. },
  17258. lineWidth: 20,
  17259. lineHeight: 3,
  17260. lineBgSize: 'cover',
  17261. itemStyle: function itemStyle() {
  17262. return {
  17263. height: '44px'
  17264. };
  17265. },
  17266. scrollable: true,
  17267. current: 0,
  17268. keyName: 'name'
  17269. }
  17270. };
  17271. exports.default = _default;
  17272. /***/ }),
  17273. /* 149 */
  17274. /*!****************************************************************************************************************!*\
  17275. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/tag.js ***!
  17276. \****************************************************************************************************************/
  17277. /*! no static exports found */
  17278. /***/ (function(module, exports, __webpack_require__) {
  17279. "use strict";
  17280. Object.defineProperty(exports, "__esModule", {
  17281. value: true
  17282. });
  17283. exports.default = void 0;
  17284. /*
  17285. * @Author : LQ
  17286. * @Description :
  17287. * @version : 1.0
  17288. * @Date : 2021-08-20 16:44:21
  17289. * @LastAuthor : LQ
  17290. * @lastTime : 2021-08-20 17:23:37
  17291. * @FilePath : /u-view2.0/uview-ui/libs/config/props/tag.js
  17292. */
  17293. var _default = {
  17294. // tag 组件
  17295. tag: {
  17296. type: 'primary',
  17297. disabled: false,
  17298. size: 'medium',
  17299. shape: 'square',
  17300. text: '',
  17301. bgColor: '',
  17302. color: '',
  17303. borderColor: '',
  17304. closeColor: '#C6C7CB',
  17305. name: '',
  17306. plainFill: false,
  17307. plain: false,
  17308. closable: false,
  17309. show: true,
  17310. icon: ''
  17311. }
  17312. };
  17313. exports.default = _default;
  17314. /***/ }),
  17315. /* 150 */
  17316. /*!*****************************************************************************************************************!*\
  17317. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/text.js ***!
  17318. \*****************************************************************************************************************/
  17319. /*! no static exports found */
  17320. /***/ (function(module, exports, __webpack_require__) {
  17321. "use strict";
  17322. Object.defineProperty(exports, "__esModule", {
  17323. value: true
  17324. });
  17325. exports.default = void 0;
  17326. /*
  17327. * @Author : LQ
  17328. * @Description :
  17329. * @version : 1.0
  17330. * @Date : 2021-08-20 16:44:21
  17331. * @LastAuthor : LQ
  17332. * @lastTime : 2021-08-20 17:23:58
  17333. * @FilePath : /u-view2.0/uview-ui/libs/config/props/text.js
  17334. */
  17335. var _default = {
  17336. // text 组件
  17337. text: {
  17338. type: '',
  17339. show: true,
  17340. text: '',
  17341. prefixIcon: '',
  17342. suffixIcon: '',
  17343. mode: '',
  17344. href: '',
  17345. format: '',
  17346. call: false,
  17347. openType: '',
  17348. bold: false,
  17349. block: false,
  17350. lines: '',
  17351. color: '#303133',
  17352. size: 15,
  17353. iconStyle: function iconStyle() {
  17354. return {
  17355. fontSize: '15px'
  17356. };
  17357. },
  17358. decoration: 'none',
  17359. margin: 0,
  17360. lineHeight: '',
  17361. align: 'left',
  17362. wordWrap: 'normal'
  17363. }
  17364. };
  17365. exports.default = _default;
  17366. /***/ }),
  17367. /* 151 */
  17368. /*!*********************************************************************************************************************!*\
  17369. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/textarea.js ***!
  17370. \*********************************************************************************************************************/
  17371. /*! no static exports found */
  17372. /***/ (function(module, exports, __webpack_require__) {
  17373. "use strict";
  17374. Object.defineProperty(exports, "__esModule", {
  17375. value: true
  17376. });
  17377. exports.default = void 0;
  17378. /*
  17379. * @Author : LQ
  17380. * @Description :
  17381. * @version : 1.0
  17382. * @Date : 2021-08-20 16:44:21
  17383. * @LastAuthor : LQ
  17384. * @lastTime : 2021-08-20 17:24:32
  17385. * @FilePath : /u-view2.0/uview-ui/libs/config/props/textarea.js
  17386. */
  17387. var _default = {
  17388. // textarea 组件
  17389. textarea: {
  17390. value: '',
  17391. placeholder: '',
  17392. placeholderClass: 'textarea-placeholder',
  17393. placeholderStyle: 'color: #c0c4cc',
  17394. height: 70,
  17395. confirmType: 'done',
  17396. disabled: false,
  17397. count: false,
  17398. focus: false,
  17399. autoHeight: false,
  17400. fixed: false,
  17401. cursorSpacing: 0,
  17402. cursor: '',
  17403. showConfirmBar: true,
  17404. selectionStart: -1,
  17405. selectionEnd: -1,
  17406. adjustPosition: true,
  17407. disableDefaultPadding: false,
  17408. holdKeyboard: false,
  17409. maxlength: 140,
  17410. border: 'surround',
  17411. formatter: null
  17412. }
  17413. };
  17414. exports.default = _default;
  17415. /***/ }),
  17416. /* 152 */
  17417. /*!******************************************************************************************************************!*\
  17418. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/toast.js ***!
  17419. \******************************************************************************************************************/
  17420. /*! no static exports found */
  17421. /***/ (function(module, exports, __webpack_require__) {
  17422. "use strict";
  17423. Object.defineProperty(exports, "__esModule", {
  17424. value: true
  17425. });
  17426. exports.default = void 0;
  17427. /*
  17428. * @Author : LQ
  17429. * @Description :
  17430. * @version : 1.0
  17431. * @Date : 2021-08-20 16:44:21
  17432. * @LastAuthor : LQ
  17433. * @lastTime : 2021-08-20 17:07:07
  17434. * @FilePath : /u-view2.0/uview-ui/libs/config/props/toast.js
  17435. */
  17436. var _default = {
  17437. // toast组件
  17438. toast: {
  17439. zIndex: 10090,
  17440. loading: false,
  17441. text: '',
  17442. icon: '',
  17443. type: '',
  17444. loadingMode: '',
  17445. show: '',
  17446. overlay: false,
  17447. position: 'center',
  17448. params: function params() {},
  17449. duration: 2000,
  17450. isTab: false,
  17451. url: '',
  17452. callback: null,
  17453. back: false
  17454. }
  17455. };
  17456. exports.default = _default;
  17457. /***/ }),
  17458. /* 153 */
  17459. /*!********************************************************************************************************************!*\
  17460. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/toolbar.js ***!
  17461. \********************************************************************************************************************/
  17462. /*! no static exports found */
  17463. /***/ (function(module, exports, __webpack_require__) {
  17464. "use strict";
  17465. Object.defineProperty(exports, "__esModule", {
  17466. value: true
  17467. });
  17468. exports.default = void 0;
  17469. /*
  17470. * @Author : LQ
  17471. * @Description :
  17472. * @version : 1.0
  17473. * @Date : 2021-08-20 16:44:21
  17474. * @LastAuthor : LQ
  17475. * @lastTime : 2021-08-20 17:24:55
  17476. * @FilePath : /u-view2.0/uview-ui/libs/config/props/toolbar.js
  17477. */
  17478. var _default = {
  17479. // toolbar 组件
  17480. toolbar: {
  17481. show: true,
  17482. cancelText: '取消',
  17483. confirmText: '确认',
  17484. cancelColor: '#909193',
  17485. confirmColor: '#3c9cff',
  17486. title: ''
  17487. }
  17488. };
  17489. exports.default = _default;
  17490. /***/ }),
  17491. /* 154 */
  17492. /*!********************************************************************************************************************!*\
  17493. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/tooltip.js ***!
  17494. \********************************************************************************************************************/
  17495. /*! no static exports found */
  17496. /***/ (function(module, exports, __webpack_require__) {
  17497. "use strict";
  17498. Object.defineProperty(exports, "__esModule", {
  17499. value: true
  17500. });
  17501. exports.default = void 0;
  17502. /*
  17503. * @Author : LQ
  17504. * @Description :
  17505. * @version : 1.0
  17506. * @Date : 2021-08-20 16:44:21
  17507. * @LastAuthor : LQ
  17508. * @lastTime : 2021-08-20 17:25:14
  17509. * @FilePath : /u-view2.0/uview-ui/libs/config/props/tooltip.js
  17510. */
  17511. var _default = {
  17512. // tooltip 组件
  17513. tooltip: {
  17514. text: '',
  17515. copyText: '',
  17516. size: 14,
  17517. color: '#606266',
  17518. bgColor: 'transparent',
  17519. direction: 'top',
  17520. zIndex: 10071,
  17521. showCopy: true,
  17522. buttons: function buttons() {
  17523. return [];
  17524. },
  17525. overlay: true,
  17526. showToast: true
  17527. }
  17528. };
  17529. exports.default = _default;
  17530. /***/ }),
  17531. /* 155 */
  17532. /*!***********************************************************************************************************************!*\
  17533. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/transition.js ***!
  17534. \***********************************************************************************************************************/
  17535. /*! no static exports found */
  17536. /***/ (function(module, exports, __webpack_require__) {
  17537. "use strict";
  17538. Object.defineProperty(exports, "__esModule", {
  17539. value: true
  17540. });
  17541. exports.default = void 0;
  17542. /*
  17543. * @Author : LQ
  17544. * @Description :
  17545. * @version : 1.0
  17546. * @Date : 2021-08-20 16:44:21
  17547. * @LastAuthor : LQ
  17548. * @lastTime : 2021-08-20 16:59:00
  17549. * @FilePath : /u-view2.0/uview-ui/libs/config/props/transition.js
  17550. */
  17551. var _default = {
  17552. // transition动画组件的props
  17553. transition: {
  17554. show: false,
  17555. mode: 'fade',
  17556. duration: '300',
  17557. timingFunction: 'ease-out'
  17558. }
  17559. };
  17560. exports.default = _default;
  17561. /***/ }),
  17562. /* 156 */
  17563. /*!*******************************************************************************************************************!*\
  17564. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/props/upload.js ***!
  17565. \*******************************************************************************************************************/
  17566. /*! no static exports found */
  17567. /***/ (function(module, exports, __webpack_require__) {
  17568. "use strict";
  17569. Object.defineProperty(exports, "__esModule", {
  17570. value: true
  17571. });
  17572. exports.default = void 0;
  17573. /*
  17574. * @Author : LQ
  17575. * @Description :
  17576. * @version : 1.0
  17577. * @Date : 2021-08-20 16:44:21
  17578. * @LastAuthor : LQ
  17579. * @lastTime : 2021-08-20 17:09:50
  17580. * @FilePath : /u-view2.0/uview-ui/libs/config/props/upload.js
  17581. */
  17582. var _default = {
  17583. // upload组件
  17584. upload: {
  17585. accept: 'image',
  17586. capture: function capture() {
  17587. return ['album', 'camera'];
  17588. },
  17589. compressed: true,
  17590. camera: 'back',
  17591. maxDuration: 60,
  17592. uploadIcon: 'camera-fill',
  17593. uploadIconColor: '#D3D4D6',
  17594. useBeforeRead: false,
  17595. previewFullImage: true,
  17596. maxCount: 52,
  17597. disabled: false,
  17598. imageMode: 'aspectFill',
  17599. name: '',
  17600. sizeType: function sizeType() {
  17601. return ['original', 'compressed'];
  17602. },
  17603. multiple: false,
  17604. deletable: true,
  17605. maxSize: Number.MAX_VALUE,
  17606. fileList: function fileList() {
  17607. return [];
  17608. },
  17609. uploadText: '',
  17610. width: 80,
  17611. height: 80,
  17612. previewImage: true
  17613. }
  17614. };
  17615. exports.default = _default;
  17616. /***/ }),
  17617. /* 157 */
  17618. /*!*************************************************************************************************************!*\
  17619. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/config/zIndex.js ***!
  17620. \*************************************************************************************************************/
  17621. /*! no static exports found */
  17622. /***/ (function(module, exports, __webpack_require__) {
  17623. "use strict";
  17624. Object.defineProperty(exports, "__esModule", {
  17625. value: true
  17626. });
  17627. exports.default = void 0;
  17628. // uniapp在H5中各API的z-index值如下:
  17629. /**
  17630. * actionsheet: 999
  17631. * modal: 999
  17632. * navigate: 998
  17633. * tabbar: 998
  17634. * toast: 999
  17635. */
  17636. var _default = {
  17637. toast: 10090,
  17638. noNetwork: 10080,
  17639. // popup包含popup,actionsheet,keyboard,picker的值
  17640. popup: 10075,
  17641. mask: 10070,
  17642. navbar: 980,
  17643. topTips: 975,
  17644. sticky: 970,
  17645. indexListSticky: 965
  17646. };
  17647. exports.default = _default;
  17648. /***/ }),
  17649. /* 158 */
  17650. /*!*****************************************************************************************************************!*\
  17651. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/function/platform.js ***!
  17652. \*****************************************************************************************************************/
  17653. /*! no static exports found */
  17654. /***/ (function(module, exports, __webpack_require__) {
  17655. "use strict";
  17656. Object.defineProperty(exports, "__esModule", {
  17657. value: true
  17658. });
  17659. exports.default = void 0;
  17660. /**
  17661. * 注意:
  17662. * 此部分内容,在vue-cli模式下,需要在vue.config.js加入如下内容才有效:
  17663. * module.exports = {
  17664. * transpileDependencies: ['uview-v2']
  17665. * }
  17666. */
  17667. var platform = 'none';
  17668. platform = 'vue2';
  17669. platform = 'weixin';
  17670. platform = 'mp';
  17671. var _default = platform;
  17672. exports.default = _default;
  17673. /***/ }),
  17674. /* 159 */
  17675. /*!*********************************************************************************!*\
  17676. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/router/index.js ***!
  17677. \*********************************************************************************/
  17678. /*! no static exports found */
  17679. /***/ (function(module, exports, __webpack_require__) {
  17680. "use strict";
  17681. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  17682. Object.defineProperty(exports, "__esModule", {
  17683. value: true
  17684. });
  17685. Object.defineProperty(exports, "RouterMount", {
  17686. enumerable: true,
  17687. get: function get() {
  17688. return _uniSimpleRouter.RouterMount;
  17689. }
  17690. });
  17691. exports.router = void 0;
  17692. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  17693. var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ 160));
  17694. var _uniSimpleRouter = __webpack_require__(/*! uni-simple-router */ 162);
  17695. var _auth = __webpack_require__(/*! @/utils/auth */ 164);
  17696. var _store = _interopRequireDefault(__webpack_require__(/*! @/store */ 165));
  17697. var _excluded = ["type", "level"];
  17698. var router = (0, _uniSimpleRouter.createRouter)({
  17699. platform: "mp-weixin",
  17700. routerErrorEach: function routerErrorEach(_ref) {
  17701. var type = _ref.type,
  17702. level = _ref.level,
  17703. args = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  17704. },
  17705. applet: {
  17706. animationDuration: 300 //默认 300ms v2.0.6+
  17707. },
  17708. routes: (0, _toConsumableArray2.default)([{"path":"/pages/login/index","aliasPath":"/"},{"path":"/pages/index/index"},{"path":"/pages/details/index"}])
  17709. });
  17710. // 免登录白名单
  17711. exports.router = router;
  17712. var whiteList = ['/pages/login/index', '/pages/details/index'];
  17713. //全局路由前置守卫
  17714. router.beforeEach(function (to, from, next) {
  17715. if ((0, _auth.getToken)()) {
  17716. /* 存在token */
  17717. if (to.path === '/pages/login/index') {
  17718. next({
  17719. path: '/pages/index/index',
  17720. NAVTYPE: 'replace'
  17721. });
  17722. } else {
  17723. if (!_store.default.getters.userId) {
  17724. // 判断当前用户是否已拉取完userInfo信息
  17725. _store.default.dispatch('UserInfo').then(function (res) {
  17726. next();
  17727. }).catch(function () {
  17728. next();
  17729. });
  17730. } else {
  17731. next();
  17732. }
  17733. }
  17734. } else {
  17735. /* 不存在token */
  17736. if (whiteList.indexOf(to.path) !== -1) {
  17737. // 在免登录白名单,直接进入
  17738. next();
  17739. } else {
  17740. (0, _auth.removeToken)();
  17741. next({
  17742. path: '/pages/login/index',
  17743. NAVTYPE: 'replaceAll'
  17744. });
  17745. }
  17746. }
  17747. });
  17748. // 全局路由后置守卫
  17749. router.afterEach(function (to, from) {});
  17750. /***/ }),
  17751. /* 160 */
  17752. /*!************************************************************************!*\
  17753. !*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
  17754. \************************************************************************/
  17755. /*! no static exports found */
  17756. /***/ (function(module, exports, __webpack_require__) {
  17757. var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ 161);
  17758. function _objectWithoutProperties(source, excluded) {
  17759. if (source == null) return {};
  17760. var target = objectWithoutPropertiesLoose(source, excluded);
  17761. var key, i;
  17762. if (Object.getOwnPropertySymbols) {
  17763. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  17764. for (i = 0; i < sourceSymbolKeys.length; i++) {
  17765. key = sourceSymbolKeys[i];
  17766. if (excluded.indexOf(key) >= 0) continue;
  17767. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  17768. target[key] = source[key];
  17769. }
  17770. }
  17771. return target;
  17772. }
  17773. module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
  17774. /***/ }),
  17775. /* 161 */
  17776. /*!*****************************************************************************!*\
  17777. !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
  17778. \*****************************************************************************/
  17779. /*! no static exports found */
  17780. /***/ (function(module, exports) {
  17781. function _objectWithoutPropertiesLoose(source, excluded) {
  17782. if (source == null) return {};
  17783. var target = {};
  17784. var sourceKeys = Object.keys(source);
  17785. var key, i;
  17786. for (i = 0; i < sourceKeys.length; i++) {
  17787. key = sourceKeys[i];
  17788. if (excluded.indexOf(key) >= 0) continue;
  17789. target[key] = source[key];
  17790. }
  17791. return target;
  17792. }
  17793. module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
  17794. /***/ }),
  17795. /* 162 */
  17796. /*!**************************************************************************************************************************!*\
  17797. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uni-simple-router/dist/uni-simple-router.js ***!
  17798. \**************************************************************************************************************************/
  17799. /*! no static exports found */
  17800. /***/ (function(module, exports, __webpack_require__) {
  17801. /* WEBPACK VAR INJECTION */(function(uni, module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  17802. !function (e, t) {
  17803. "object" == ( false ? undefined : _typeof(exports)) && "object" == ( false ? undefined : _typeof(module)) ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t),
  17804. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  17805. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  17806. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
  17807. }(self, function () {
  17808. return e = {
  17809. 779: function _(e, t, r) {
  17810. var o = r(173);
  17811. e.exports = function e(t, r, n) {
  17812. return o(r) || (n = r || n, r = []), n = n || {}, t instanceof RegExp ? function (e, t) {
  17813. var r = e.source.match(/\((?!\?)/g);
  17814. if (r) for (var o = 0; o < r.length; o++) {
  17815. t.push({
  17816. name: o,
  17817. prefix: null,
  17818. delimiter: null,
  17819. optional: !1,
  17820. repeat: !1,
  17821. partial: !1,
  17822. asterisk: !1,
  17823. pattern: null
  17824. });
  17825. }
  17826. return s(e, t);
  17827. }(t, r) : o(t) ? function (t, r, o) {
  17828. for (var n = [], a = 0; a < t.length; a++) {
  17829. n.push(e(t[a], r, o).source);
  17830. }
  17831. return s(new RegExp("(?:" + n.join("|") + ")", p(o)), r);
  17832. }(t, r, n) : function (e, t, r) {
  17833. return f(a(e, r), t, r);
  17834. }(t, r, n);
  17835. }, e.exports.parse = a, e.exports.compile = function (e, t) {
  17836. return u(a(e, t), t);
  17837. }, e.exports.tokensToFunction = u, e.exports.tokensToRegExp = f;
  17838. var n = new RegExp(["(\\\\.)", "([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"), "g");
  17839. function a(e, t) {
  17840. for (var r, o = [], a = 0, i = 0, u = "", s = t && t.delimiter || "/"; null != (r = n.exec(e));) {
  17841. var p = r[0],
  17842. f = r[1],
  17843. h = r.index;
  17844. if (u += e.slice(i, h), i = h + p.length, f) u += f[1];else {
  17845. var v = e[i],
  17846. y = r[2],
  17847. g = r[3],
  17848. d = r[4],
  17849. m = r[5],
  17850. b = r[6],
  17851. P = r[7];
  17852. u && (o.push(u), u = "");
  17853. var O = null != y && null != v && v !== y,
  17854. k = "+" === b || "*" === b,
  17855. w = "?" === b || "*" === b,
  17856. j = r[2] || s,
  17857. R = d || m;
  17858. o.push({
  17859. name: g || a++,
  17860. prefix: y || "",
  17861. delimiter: j,
  17862. optional: w,
  17863. repeat: k,
  17864. partial: O,
  17865. asterisk: !!P,
  17866. pattern: R ? c(R) : P ? ".*" : "[^" + l(j) + "]+?"
  17867. });
  17868. }
  17869. }
  17870. return i < e.length && (u += e.substr(i)), u && o.push(u), o;
  17871. }
  17872. function i(e) {
  17873. return encodeURI(e).replace(/[\/?#]/g, function (e) {
  17874. return "%" + e.charCodeAt(0).toString(16).toUpperCase();
  17875. });
  17876. }
  17877. function u(e, t) {
  17878. for (var r = new Array(e.length), n = 0; n < e.length; n++) {
  17879. "object" == _typeof(e[n]) && (r[n] = new RegExp("^(?:" + e[n].pattern + ")$", p(t)));
  17880. }
  17881. return function (t, n) {
  17882. for (var a = "", u = t || {}, l = (n || {}).pretty ? i : encodeURIComponent, c = 0; c < e.length; c++) {
  17883. var s = e[c];
  17884. if ("string" != typeof s) {
  17885. var p,
  17886. f = u[s.name];
  17887. if (null == f) {
  17888. if (s.optional) {
  17889. s.partial && (a += s.prefix);
  17890. continue;
  17891. }
  17892. throw new TypeError('Expected "' + s.name + '" to be defined');
  17893. }
  17894. if (o(f)) {
  17895. if (!s.repeat) throw new TypeError('Expected "' + s.name + '" to not repeat, but received `' + JSON.stringify(f) + "`");
  17896. if (0 === f.length) {
  17897. if (s.optional) continue;
  17898. throw new TypeError('Expected "' + s.name + '" to not be empty');
  17899. }
  17900. for (var h = 0; h < f.length; h++) {
  17901. if (p = l(f[h]), !r[c].test(p)) throw new TypeError('Expected all "' + s.name + '" to match "' + s.pattern + '", but received `' + JSON.stringify(p) + "`");
  17902. a += (0 === h ? s.prefix : s.delimiter) + p;
  17903. }
  17904. } else {
  17905. if (p = s.asterisk ? encodeURI(f).replace(/[?#]/g, function (e) {
  17906. return "%" + e.charCodeAt(0).toString(16).toUpperCase();
  17907. }) : l(f), !r[c].test(p)) throw new TypeError('Expected "' + s.name + '" to match "' + s.pattern + '", but received "' + p + '"');
  17908. a += s.prefix + p;
  17909. }
  17910. } else a += s;
  17911. }
  17912. return a;
  17913. };
  17914. }
  17915. function l(e) {
  17916. return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
  17917. }
  17918. function c(e) {
  17919. return e.replace(/([=!:$\/()])/g, "\\$1");
  17920. }
  17921. function s(e, t) {
  17922. return e.keys = t, e;
  17923. }
  17924. function p(e) {
  17925. return e && e.sensitive ? "" : "i";
  17926. }
  17927. function f(e, t, r) {
  17928. o(t) || (r = t || r, t = []);
  17929. for (var n = (r = r || {}).strict, a = !1 !== r.end, i = "", u = 0; u < e.length; u++) {
  17930. var c = e[u];
  17931. if ("string" == typeof c) i += l(c);else {
  17932. var f = l(c.prefix),
  17933. h = "(?:" + c.pattern + ")";
  17934. t.push(c), c.repeat && (h += "(?:" + f + h + ")*"), i += h = c.optional ? c.partial ? f + "(" + h + ")?" : "(?:" + f + "(" + h + "))?" : f + "(" + h + ")";
  17935. }
  17936. }
  17937. var v = l(r.delimiter || "/"),
  17938. y = i.slice(-v.length) === v;
  17939. return n || (i = (y ? i.slice(0, -v.length) : i) + "(?:" + v + "(?=$))?"), i += a ? "$" : n && y ? "" : "(?=" + v + "|$)", s(new RegExp("^" + i, p(r)), t);
  17940. }
  17941. },
  17942. 173: function _(e) {
  17943. e.exports = Array.isArray || function (e) {
  17944. return "[object Array]" == Object.prototype.toString.call(e);
  17945. };
  17946. },
  17947. 844: function _(e, t, r) {
  17948. "use strict";
  17949. var o = this && this.__assign || function () {
  17950. return (o = Object.assign || function (e) {
  17951. for (var t, r = 1, o = arguments.length; r < o; r++) {
  17952. for (var n in t = arguments[r]) {
  17953. Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  17954. }
  17955. }
  17956. return e;
  17957. }).apply(this, arguments);
  17958. };
  17959. Object.defineProperty(t, "__esModule", {
  17960. value: !0
  17961. }), t.buildVueRouter = t.buildVueRoutes = void 0;
  17962. var n = r(366),
  17963. a = r(883),
  17964. i = r(789),
  17965. u = r(169);
  17966. t.buildVueRoutes = function (e, t) {
  17967. for (var r = e.routesMap, o = r.pathMap, l = r.finallyPathList, c = Object.keys(t), s = 0; s < c.length; s++) {
  17968. var p = c[s],
  17969. f = o[p],
  17970. h = t[p];
  17971. if (f) {
  17972. var v = i.getRoutePath(f, e).finallyPath;
  17973. if (v instanceof Array) throw new Error("非 vueRouterDev 模式下,alias、aliasPath、path 无法提供数组类型! " + JSON.stringify(f));
  17974. null != f.name && (h.name = f.name);
  17975. var y = h.path,
  17976. g = h.alias;
  17977. delete h.alias, h.path = v, "/" === y && null != g && (h.alias = g, h.path = y), f.beforeEnter && (h.beforeEnter = function (t, r, o) {
  17978. u.onTriggerEachHook(t, r, e, n.hookToggle.enterHooks, o);
  17979. });
  17980. } else a.warn(p + " 路由地址在路由表中未找到,确定是否传递漏啦", e, !0);
  17981. }
  17982. return l.includes("*") && (t["*"] = o["*"]), t;
  17983. }, t.buildVueRouter = function (e, t, r) {
  17984. var n;
  17985. n = "[object Array]" === i.getDataType(r) ? r : Object.values(r);
  17986. var a = e.options.h5,
  17987. u = a.scrollBehavior,
  17988. l = a.fallback,
  17989. c = t.options.scrollBehavior;
  17990. t.options.scrollBehavior = function (e, t, r) {
  17991. return c && c(e, t, r), u(e, t, r);
  17992. }, t.fallback = l;
  17993. var s = new t.constructor(o(o({}, e.options.h5), {
  17994. base: t.options.base,
  17995. mode: t.options.mode,
  17996. routes: n
  17997. }));
  17998. t.matcher = s.matcher;
  17999. };
  18000. },
  18001. 369: function _(e, t, r) {
  18002. "use strict";
  18003. Object.defineProperty(t, "__esModule", {
  18004. value: !0
  18005. }), t.addKeepAliveInclude = void 0;
  18006. var o = r(789),
  18007. n = ["", ""],
  18008. a = n[0],
  18009. i = n[1];
  18010. t.addKeepAliveInclude = function (e) {
  18011. var t = getApp(),
  18012. r = t.keepAliveInclude;
  18013. if (0 === e.runId && 0 === r.length) {
  18014. i = t.$route.params.__id__;
  18015. var n = (a = t.$route.meta.name) + "-" + i;
  18016. t.keepAliveInclude.push(n);
  18017. } else if ("" !== a) for (var u = t.keepAliveInclude, l = 0; l < u.length; l++) {
  18018. n = u[l];
  18019. var c = new RegExp(a + "-(\\d+)$"),
  18020. s = a + "-" + i;
  18021. if (c.test(n) && n !== s) {
  18022. o.removeSimpleValue(u, s), a = "";
  18023. break;
  18024. }
  18025. }
  18026. };
  18027. },
  18028. 147: function _(e, t) {
  18029. "use strict";
  18030. var _r,
  18031. o = this && this.__extends || (_r = function r(e, t) {
  18032. return (_r = Object.setPrototypeOf || {
  18033. __proto__: []
  18034. } instanceof Array && function (e, t) {
  18035. e.__proto__ = t;
  18036. } || function (e, t) {
  18037. for (var r in t) {
  18038. Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
  18039. }
  18040. })(e, t);
  18041. }, function (e, t) {
  18042. function o() {
  18043. this.constructor = e;
  18044. }
  18045. _r(e, t), e.prototype = null === t ? Object.create(t) : (o.prototype = t.prototype, new o());
  18046. });
  18047. Object.defineProperty(t, "__esModule", {
  18048. value: !0
  18049. }), t.proxyH5Mount = t.proxyEachHook = t.MyArray = void 0;
  18050. var n = function (e) {
  18051. function t(r, o, n, a) {
  18052. var i = e.call(this) || this;
  18053. return i.router = r, i.vueEachArray = o, i.myEachHook = n, i.hookName = a, Object.setPrototypeOf(i, t.prototype), i;
  18054. }
  18055. return o(t, e), t.prototype.push = function (e) {
  18056. var t = this;
  18057. this.vueEachArray.push(e);
  18058. var r = this.length;
  18059. this[this.length] = function (e, o, n) {
  18060. r > 0 ? t.vueEachArray[r](e, o, function () {
  18061. n && n();
  18062. }) : t.myEachHook(e, o, function (a) {
  18063. !1 === a ? n(!1) : t.vueEachArray[r](e, o, function (e) {
  18064. n(a);
  18065. });
  18066. }, t.router, !0);
  18067. };
  18068. }, t;
  18069. }(Array);
  18070. t.MyArray = n, t.proxyEachHook = function (e, t) {
  18071. for (var r = ["beforeHooks", "afterHooks"], o = 0; o < r.length; o++) {
  18072. var a = r[o],
  18073. i = e.lifeCycle[a][0];
  18074. if (i) {
  18075. var u = t[a];
  18076. t[a] = new n(e, u, i, a);
  18077. }
  18078. }
  18079. }, t.proxyH5Mount = function (e) {
  18080. var t;
  18081. if (0 === e.mount.length) {
  18082. if (null === (t = e.options.h5) || void 0 === t ? void 0 : t.vueRouterDev) return;
  18083. navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) && setTimeout(function () {
  18084. if (document.getElementsByTagName("uni-page").length > 0) return !1;
  18085. window.location.reload();
  18086. }, 0);
  18087. } else e.mount[0].app.$mount(), e.mount = [];
  18088. };
  18089. },
  18090. 814: function _(e, t) {
  18091. "use strict";
  18092. var r = this && this.__assign || function () {
  18093. return (r = Object.assign || function (e) {
  18094. for (var t, r = 1, o = arguments.length; r < o; r++) {
  18095. for (var n in t = arguments[r]) {
  18096. Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  18097. }
  18098. }
  18099. return e;
  18100. }).apply(this, arguments);
  18101. };
  18102. Object.defineProperty(t, "__esModule", {
  18103. value: !0
  18104. }), t.tabIndexSelect = t.HomeNvueSwitchTab = t.runtimeQuit = t.registerLoddingPage = void 0;
  18105. var o = null,
  18106. n = null;
  18107. t.registerLoddingPage = function (e) {
  18108. var t;
  18109. if (null === (t = e.options.APP) || void 0 === t ? void 0 : t.registerLoadingPage) {
  18110. var o = e.options.APP,
  18111. n = o.loadingPageHook,
  18112. a = o.loadingPageStyle;
  18113. n(new plus.nativeObj.View("router-loadding", r({
  18114. top: "0px",
  18115. left: "0px",
  18116. height: "100%",
  18117. width: "100%"
  18118. }, a())));
  18119. }
  18120. }, t.runtimeQuit = function (e) {
  18121. void 0 === e && (e = "再按一次退出应用");
  18122. var t = +new Date();
  18123. o ? t - o < 1e3 && plus.runtime.quit() : (o = t, uni.showToast({
  18124. title: e,
  18125. icon: "none",
  18126. position: "bottom",
  18127. duration: 1e3
  18128. }), setTimeout(function () {
  18129. o = null;
  18130. }, 1e3));
  18131. }, t.HomeNvueSwitchTab = function (e, t, r) {
  18132. return new Promise(function (t) {
  18133. return 0 !== e.runId ? t(!1) : __uniConfig.tabBar && Array.isArray(__uniConfig.tabBar.list) ? void r({
  18134. url: __uniConfig.entryPagePath,
  18135. animationDuration: 0,
  18136. complete: function complete() {
  18137. return t(!0);
  18138. }
  18139. }) : t(!1);
  18140. });
  18141. }, t.tabIndexSelect = function (e, t) {
  18142. if (!__uniConfig.tabBar || !Array.isArray(__uniConfig.tabBar.list)) return !1;
  18143. for (var r = __uniConfig.tabBar.list, o = [], a = 0, i = 0; i < r.length; i++) {
  18144. var u = r[i];
  18145. if ("/" + u.pagePath !== e.path && "/" + u.pagePath !== t.path || (u.pagePath === t.path && (a = i), o.push(u)), 2 === o.length) break;
  18146. }
  18147. return 2 === o.length && (null == n && (n = uni.requireNativePlugin("uni-tabview")), n.switchSelect({
  18148. index: a
  18149. }), !0);
  18150. };
  18151. },
  18152. 334: function _(e, t) {
  18153. "use strict";
  18154. Object.defineProperty(t, "__esModule", {
  18155. value: !0
  18156. }), t.getEnterPath = void 0, t.getEnterPath = function (e, t) {
  18157. switch (t.options.platform) {
  18158. case "mp-alipay":
  18159. case "mp-weixin":
  18160. case "mp-toutiao":
  18161. case "mp-qq":
  18162. return e.$options.mpInstance.route;
  18163. case "mp-baidu":
  18164. return e.$options.mpInstance.is || e.$options.mpInstance.pageinstance.route;
  18165. }
  18166. return e.$options.mpInstance.route;
  18167. };
  18168. },
  18169. 282: function _(e, t, r) {
  18170. "use strict";
  18171. Object.defineProperty(t, "__esModule", {
  18172. value: !0
  18173. }), t.proxyHookName = t.proxyHookDeps = t.lifeCycle = t.baseConfig = t.mpPlatformReg = void 0;
  18174. var o = r(883),
  18175. n = r(99);
  18176. t.mpPlatformReg = "(^mp-weixin$)|(^mp-baidu$)|(^mp-alipay$)|(^mp-toutiao$)|(^mp-qq$)|(^mp-360$)", t.baseConfig = {
  18177. h5: {
  18178. paramsToQuery: !1,
  18179. vueRouterDev: !1,
  18180. vueNext: !1,
  18181. mode: "hash",
  18182. base: "/",
  18183. linkActiveClass: "router-link-active",
  18184. linkExactActiveClass: "router-link-exact-active",
  18185. scrollBehavior: function scrollBehavior(e, t, r) {
  18186. return {
  18187. x: 0,
  18188. y: 0
  18189. };
  18190. },
  18191. fallback: !0
  18192. },
  18193. APP: {
  18194. registerLoadingPage: !0,
  18195. loadingPageStyle: function loadingPageStyle() {
  18196. return JSON.parse('{"backgroundColor":"#FFF"}');
  18197. },
  18198. loadingPageHook: function loadingPageHook(e) {
  18199. e.show();
  18200. },
  18201. launchedHook: function launchedHook() {
  18202. plus.navigator.closeSplashscreen();
  18203. },
  18204. animation: {}
  18205. },
  18206. applet: {
  18207. animationDuration: 300
  18208. },
  18209. beforeProxyHooks: {
  18210. onLoad: function onLoad(e, t, r) {
  18211. var o = e[0];
  18212. t([n.parseQuery({
  18213. query: o
  18214. }, r)]);
  18215. }
  18216. },
  18217. platform: "h5",
  18218. keepUniOriginNav: !1,
  18219. debugger: !1,
  18220. routerBeforeEach: function routerBeforeEach(e, t, r) {
  18221. r();
  18222. },
  18223. routerAfterEach: function routerAfterEach(e, t) {},
  18224. routerErrorEach: function routerErrorEach(e, t) {
  18225. t.$lockStatus = !1, o.err(e, t, !0);
  18226. },
  18227. detectBeforeLock: function detectBeforeLock(e, t, r) {},
  18228. routes: [{
  18229. path: "/choose-location"
  18230. }, {
  18231. path: "/open-location"
  18232. }, {
  18233. path: "/preview-image"
  18234. }]
  18235. }, t.lifeCycle = {
  18236. beforeHooks: [],
  18237. afterHooks: [],
  18238. routerBeforeHooks: [],
  18239. routerAfterHooks: [],
  18240. routerErrorHooks: []
  18241. }, t.proxyHookDeps = {
  18242. resetIndex: [],
  18243. hooks: {},
  18244. options: {}
  18245. }, t.proxyHookName = ["onLaunch", "onShow", "onHide", "onError", "onInit", "onLoad", "onReady", "onUnload", "onResize", "created", "beforeMount", "mounted", "beforeDestroy", "destroyed"];
  18246. },
  18247. 801: function _(e, t, r) {
  18248. "use strict";
  18249. Object.defineProperty(t, "__esModule", {
  18250. value: !0
  18251. }), t.createRouteMap = void 0;
  18252. var o = r(883),
  18253. n = r(789);
  18254. t.createRouteMap = function (e, t) {
  18255. var r = {
  18256. finallyPathList: [],
  18257. finallyPathMap: Object.create(null),
  18258. aliasPathMap: Object.create(null),
  18259. pathMap: Object.create(null),
  18260. vueRouteMap: Object.create(null),
  18261. nameMap: Object.create(null)
  18262. };
  18263. return t.forEach(function (t) {
  18264. var a = n.getRoutePath(t, e),
  18265. i = a.finallyPath,
  18266. u = a.aliasPath,
  18267. l = a.path;
  18268. if (null == l) throw new Error("请提供一个完整的路由对象,包括以绝对路径开始的 ‘path’ 字符串 " + JSON.stringify(t));
  18269. if (i instanceof Array && !e.options.h5.vueRouterDev && "h5" === e.options.platform) throw new Error("非 vueRouterDev 模式下,route.alias 目前无法提供数组类型! " + JSON.stringify(t));
  18270. var c = i,
  18271. s = u;
  18272. "h5" !== e.options.platform && 0 !== c.indexOf("/") && "*" !== l && o.warn("当前路由对象下,route:" + JSON.stringify(t) + " 是否缺少了前缀 ‘/’", e, !0), r.finallyPathMap[c] || (r.finallyPathMap[c] = t, r.aliasPathMap[s] = t, r.pathMap[l] = t, r.finallyPathList.push(c), null != t.name && (r.nameMap[t.name] = t));
  18273. }), r;
  18274. };
  18275. },
  18276. 662: function _(e, t, r) {
  18277. "use strict";
  18278. Object.defineProperty(t, "__esModule", {
  18279. value: !0
  18280. }), t.registerEachHooks = t.registerRouterHooks = t.registerHook = void 0;
  18281. var o = r(366),
  18282. n = r(169);
  18283. function a(e, t) {
  18284. e[0] = t;
  18285. }
  18286. t.registerHook = a, t.registerRouterHooks = function (e, t) {
  18287. return a(e.routerBeforeHooks, function (e, r, o) {
  18288. t.routerBeforeEach(e, r, o);
  18289. }), a(e.routerAfterHooks, function (e, r) {
  18290. t.routerAfterEach(e, r);
  18291. }), a(e.routerErrorHooks, function (e, r) {
  18292. t.routerErrorEach(e, r);
  18293. }), e;
  18294. }, t.registerEachHooks = function (e, t, r) {
  18295. a(e.lifeCycle[t], function (e, a, i, u, l) {
  18296. l ? n.onTriggerEachHook(e, a, u, o.hookToggle[t], i) : r(e, a, i);
  18297. });
  18298. };
  18299. },
  18300. 460: function _(e, t, r) {
  18301. "use strict";
  18302. var o = this && this.__assign || function () {
  18303. return (o = Object.assign || function (e) {
  18304. for (var t, r = 1, o = arguments.length; r < o; r++) {
  18305. for (var n in t = arguments[r]) {
  18306. Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  18307. }
  18308. }
  18309. return e;
  18310. }).apply(this, arguments);
  18311. };
  18312. Object.defineProperty(t, "__esModule", {
  18313. value: !0
  18314. }), t.initMixins = t.getMixins = void 0;
  18315. var n = r(801),
  18316. a = r(844),
  18317. i = r(147),
  18318. u = r(814),
  18319. l = r(845),
  18320. c = r(890),
  18321. s = r(789),
  18322. p = r(334),
  18323. f = r(282),
  18324. h = r(925),
  18325. v = !1,
  18326. y = !1,
  18327. g = {
  18328. app: !1,
  18329. page: ""
  18330. };
  18331. function d(e, t) {
  18332. var r = t.options.platform;
  18333. return new RegExp(f.mpPlatformReg, "g").test(r) && (r = "app-lets"), {
  18334. h5: {
  18335. beforeCreate: function beforeCreate() {
  18336. var e;
  18337. if (h.beforeProxyHook(this, t), this.$options.router) {
  18338. t.$route = this.$options.router;
  18339. var r = [];
  18340. (null === (e = t.options.h5) || void 0 === e ? void 0 : e.vueRouterDev) ? r = t.options.routes : (r = n.createRouteMap(t, this.$options.router.options.routes).finallyPathMap, t.routesMap.vueRouteMap = r, a.buildVueRoutes(t, r)), a.buildVueRouter(t, this.$options.router, r), i.proxyEachHook(t, this.$options.router);
  18341. }
  18342. }
  18343. },
  18344. "app-plus": {
  18345. beforeCreate: function beforeCreate() {
  18346. h.beforeProxyHook(this, t), v || (v = !0, l.proxyPageHook(this, t, "app"), u.registerLoddingPage(t));
  18347. }
  18348. },
  18349. "app-lets": {
  18350. beforeCreate: function beforeCreate() {
  18351. h.beforeProxyHook(this, t), s.voidFun("UNI-SIMPLE-ROUTER");
  18352. var e = !0,
  18353. r = this.$options.mpType;
  18354. y || ("component" === r ? e = s.assertParentChild(g.page, this) : "page" === r ? (g[r] = p.getEnterPath(this, t), t.enterPath = g[r]) : g[r] = !0, e && l.proxyPageHook(this, t, r));
  18355. },
  18356. onLoad: function onLoad() {
  18357. s.voidFun("UNI-SIMPLE-ROUTER"), !y && s.assertParentChild(g.page, this) && (y = !0, c.forceGuardEach(t));
  18358. }
  18359. }
  18360. }[r];
  18361. }
  18362. t.getMixins = d, t.initMixins = function (e, t) {
  18363. var r = n.createRouteMap(t, t.options.routes);
  18364. t.routesMap = r, e.mixin(o({}, d(0, t)));
  18365. };
  18366. },
  18367. 789: function _(e, t, r) {
  18368. "use strict";
  18369. var o = this && this.__assign || function () {
  18370. return (o = Object.assign || function (e) {
  18371. for (var t, r = 1, o = arguments.length; r < o; r++) {
  18372. for (var n in t = arguments[r]) {
  18373. Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  18374. }
  18375. }
  18376. return e;
  18377. }).apply(this, arguments);
  18378. },
  18379. n = this && this.__rest || function (e, t) {
  18380. var r = {};
  18381. for (var o in e) {
  18382. Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
  18383. }
  18384. if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
  18385. var n = 0;
  18386. for (o = Object.getOwnPropertySymbols(e); n < o.length; n++) {
  18387. t.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (r[o[n]] = e[o[n]]);
  18388. }
  18389. }
  18390. return r;
  18391. },
  18392. a = this && this.__spreadArrays || function () {
  18393. for (var e = 0, t = 0, r = arguments.length; t < r; t++) {
  18394. e += arguments[t].length;
  18395. }
  18396. var o = Array(e),
  18397. n = 0;
  18398. for (t = 0; t < r; t++) {
  18399. for (var a = arguments[t], i = 0, u = a.length; i < u; i++, n++) {
  18400. o[n] = a[i];
  18401. }
  18402. }
  18403. return o;
  18404. };
  18405. Object.defineProperty(t, "__esModule", {
  18406. value: !0
  18407. }), t.deepDecodeQuery = t.resolveAbsolutePath = t.assertParentChild = t.lockDetectWarn = t.deepClone = t.baseClone = t.assertDeepObject = t.paramsToQuery = t.forMatNextToFrom = t.urlToJson = t.getUniCachePage = t.removeSimpleValue = t.copyData = t.getDataType = t.routesForMapRoute = t.notRouteTo404 = t.getWildcardRule = t.assertNewOptions = t.getRoutePath = t.notDeepClearNull = t.mergeConfig = t.timeOut = t.def = t.voidFun = void 0;
  18408. var i = r(282),
  18409. u = r(169),
  18410. l = r(883),
  18411. c = r(890),
  18412. s = r(779);
  18413. function p(e, t) {
  18414. for (var r = Object.create(null), n = Object.keys(e).concat(["resolveQuery", "parseQuery"]), i = 0; i < n.length; i += 1) {
  18415. var u = n[i];
  18416. null != t[u] ? t[u].constructor === Object ? r[u] = o(o({}, e[u]), t[u]) : r[u] = "routes" === u ? a(e[u], t[u]) : t[u] : r[u] = e[u];
  18417. }
  18418. return r;
  18419. }
  18420. function f(e, t) {
  18421. var r = e.aliasPath || e.alias || e.path;
  18422. return "h5" !== t.options.platform && (r = e.path), {
  18423. finallyPath: r,
  18424. aliasPath: e.aliasPath || e.path,
  18425. path: e.path,
  18426. alias: e.alias
  18427. };
  18428. }
  18429. function h(e, t) {
  18430. var r = e.routesMap.finallyPathMap["*"];
  18431. if (r) return r;
  18432. throw t && u.ERRORHOOK[0](t, e), new Error("当前路由表匹配规则已全部匹配完成,未找到满足的匹配规则。你可以使用 '*' 通配符捕捉最后的异常");
  18433. }
  18434. function v(e) {
  18435. return Object.prototype.toString.call(e);
  18436. }
  18437. function y(e, t) {
  18438. if (null == e) t = e;else for (var r = 0, o = Object.keys(e); r < o.length; r++) {
  18439. var n = o[r],
  18440. a = n;
  18441. e[n] !== e && ("object" == _typeof(e[n]) ? (t[a] = "[object Array]" === v(e[n]) ? [] : {}, t[a] = y(e[n], t[a])) : t[a] = e[n]);
  18442. }
  18443. return t;
  18444. }
  18445. function g(e) {
  18446. var t = "[object Array]" === v(e) ? [] : {};
  18447. return y(e, t), t;
  18448. }
  18449. t.voidFun = function () {
  18450. for (var e = [], t = 0; t < arguments.length; t++) {
  18451. e[t] = arguments[t];
  18452. }
  18453. }, t.def = function (e, t, r) {
  18454. Object.defineProperty(e, t, {
  18455. get: function get() {
  18456. return r();
  18457. }
  18458. });
  18459. }, t.timeOut = function (e) {
  18460. return new Promise(function (t) {
  18461. setTimeout(function () {
  18462. t();
  18463. }, e);
  18464. });
  18465. }, t.mergeConfig = p, t.notDeepClearNull = function (e) {
  18466. for (var t in e) {
  18467. null == e[t] && delete e[t];
  18468. }
  18469. return e;
  18470. }, t.getRoutePath = f, t.assertNewOptions = function (e) {
  18471. var t,
  18472. r = e.platform,
  18473. o = e.routes;
  18474. if (null == r) throw new Error("你在实例化路由时必须传递 'platform'");
  18475. if (null == o || 0 === o.length) throw new Error("你在实例化路由时必须传递 routes 为空,这是无意义的。");
  18476. return "h5" === e.platform && (null === (t = e.h5) || void 0 === t ? void 0 : t.vueRouterDev) && (i.baseConfig.routes = []), p(i.baseConfig, e);
  18477. }, t.getWildcardRule = h, t.notRouteTo404 = function (e, t, r, o) {
  18478. if ("*" !== t.path) return t;
  18479. var n = t.redirect;
  18480. if (void 0 === n) throw new Error(" * 通配符必须配合 redirect 使用。redirect: string | Location | Function");
  18481. var a = n;
  18482. return "function" == typeof a && (a = a(r)), c.navjump(a, e, o, void 0, void 0, void 0, !1);
  18483. }, t.routesForMapRoute = function e(t, r, o, n) {
  18484. var a;
  18485. if (void 0 === n && (n = !1), null === (a = t.options.h5) || void 0 === a ? void 0 : a.vueRouterDev) return {
  18486. path: r
  18487. };
  18488. for (var i = r.split("?")[0], u = "", l = t.routesMap, c = 0; c < o.length; c++) {
  18489. for (var p = l[o[c]], f = 0, y = Object.entries(p); f < y.length; f++) {
  18490. var g = y[f],
  18491. d = g[0],
  18492. m = g[1];
  18493. if ("*" !== d) {
  18494. var b = m,
  18495. P = d;
  18496. if ("[object Array]" === v(p) && (P = b), null != s(P).exec(i)) return "[object String]" === v(b) ? l.finallyPathMap[b] : b;
  18497. } else "" === u && (u = "*");
  18498. }
  18499. }
  18500. if (n) return {};
  18501. if (l.aliasPathMap) {
  18502. var O = e(t, r, ["aliasPathMap"], !0);
  18503. if (Object.keys(O).length > 0) return O;
  18504. }
  18505. if ("" !== u) return h(t);
  18506. throw new Error(r + " 路径无法在路由表中找到!检查跳转路径及路由表");
  18507. }, t.getDataType = v, t.copyData = function (e) {
  18508. return JSON.parse(JSON.stringify(e));
  18509. }, t.removeSimpleValue = function (e, t) {
  18510. for (var r = 0; r < e.length; r++) {
  18511. if (e[r] === t) return e.splice(r, 1), !0;
  18512. }
  18513. return !1;
  18514. }, t.getUniCachePage = function (e) {
  18515. var t = getCurrentPages();
  18516. if (null == e) return t;
  18517. if (0 === t.length) return t;
  18518. var r = t.reverse()[e];
  18519. return null == r ? [] : r;
  18520. }, t.urlToJson = function (e) {
  18521. var t = {},
  18522. r = e.split("?"),
  18523. o = r[0],
  18524. n = r[1];
  18525. if (null != n) for (var a = 0, i = n.split("&"); a < i.length; a++) {
  18526. var u = i[a].split("=");
  18527. t[u[0]] = u[1];
  18528. }
  18529. return {
  18530. path: o,
  18531. query: t
  18532. };
  18533. }, t.forMatNextToFrom = function (e, t, r) {
  18534. var o = [t, r],
  18535. n = o[0],
  18536. a = o[1];
  18537. if ("h5" === e.options.platform) {
  18538. var i = e.options.h5,
  18539. u = i.vueNext,
  18540. l = i.vueRouterDev;
  18541. u || l || (n = c.createRoute(e, void 0, n), a = c.createRoute(e, void 0, a));
  18542. } else n = c.createRoute(e, void 0, g(n)), a = c.createRoute(e, void 0, g(a));
  18543. return {
  18544. matTo: n,
  18545. matFrom: a
  18546. };
  18547. }, t.paramsToQuery = function (e, t) {
  18548. var r;
  18549. if ("h5" === e.options.platform && !(null === (r = e.options.h5) || void 0 === r ? void 0 : r.paramsToQuery)) return t;
  18550. if ("[object Object]" === v(t)) {
  18551. var a = t,
  18552. i = a.name,
  18553. l = a.params,
  18554. c = n(a, ["name", "params"]),
  18555. s = l;
  18556. if ("h5" !== e.options.platform && null == s && (s = {}), null != i && null != s) {
  18557. var p = e.routesMap.nameMap[i];
  18558. null == p && (p = h(e, {
  18559. type: 2,
  18560. msg: "命名路由为:" + i + " 的路由,无法在路由表中找到!",
  18561. toRule: t
  18562. }));
  18563. var y = f(p, e).finallyPath;
  18564. if (!y.includes(":")) return o(o({}, c), {
  18565. path: y,
  18566. query: s
  18567. });
  18568. u.ERRORHOOK[0]({
  18569. type: 2,
  18570. msg: "动态路由:" + y + " 无法使用 paramsToQuery!",
  18571. toRule: t
  18572. }, e);
  18573. }
  18574. }
  18575. return t;
  18576. }, t.assertDeepObject = function (e) {
  18577. var t = null;
  18578. try {
  18579. t = JSON.stringify(e).match(/\{|\[|\}|\]/g);
  18580. } catch (e) {
  18581. l.warnLock("传递的参数解析对象失败。" + e);
  18582. }
  18583. return null != t && t.length > 3;
  18584. }, t.baseClone = y, t.deepClone = g, t.lockDetectWarn = function (e, t, r, o, n, a) {
  18585. if (void 0 === n && (n = {}), "afterHooks" === a) o();else {
  18586. var i = e.options.detectBeforeLock;
  18587. i && i(e, t, r), e.$lockStatus ? e.options.routerErrorEach({
  18588. type: 2,
  18589. msg: "当前页面正在处于跳转状态,请稍后再进行跳转....",
  18590. NAVTYPE: r,
  18591. uniActualData: n
  18592. }, e) : o();
  18593. }
  18594. }, t.assertParentChild = function (e, t) {
  18595. for (; null != t.$parent;) {
  18596. var r = t.$parent.$mp;
  18597. if (r.page && r.page.is === e) return !0;
  18598. t = t.$parent;
  18599. }
  18600. try {
  18601. if (t.$mp.page.is === e || t.$mp.page.route === e) return !0;
  18602. } catch (e) {
  18603. return !1;
  18604. }
  18605. return !1;
  18606. }, t.resolveAbsolutePath = function (e, t) {
  18607. var r = /^\/?([^\?\s]+)(\?.+)?$/,
  18608. o = e.trim();
  18609. if (!r.test(o)) throw new Error("【" + e + "】 路径错误,请提供完整的路径(10001)。");
  18610. var n = o.match(r);
  18611. if (null == n) throw new Error("【" + e + "】 路径错误,请提供完整的路径(10002)。");
  18612. var a = n[2] || "";
  18613. if (/^\.\/[^\.]+/.test(o)) return (t.currentRoute.path + e).replace(/[^\/]+\.\//, "");
  18614. var i = n[1].replace(/\//g, "\\/").replace(/\.\./g, "[^\\/]+").replace(/\./g, "\\."),
  18615. u = new RegExp("^\\/" + i + "$"),
  18616. l = t.options.routes.filter(function (e) {
  18617. return u.test(e.path);
  18618. });
  18619. if (1 !== l.length) throw new Error("【" + e + "】 路径错误,尝试转成绝对路径失败,请手动转成绝对路径(10003)。");
  18620. return l[0].path + a;
  18621. }, t.deepDecodeQuery = function e(t) {
  18622. for (var r = "[object Array]" === v(t) ? [] : {}, o = Object.keys(t), n = 0; n < o.length; n++) {
  18623. var a = o[n],
  18624. i = t[a];
  18625. if ("string" == typeof i) try {
  18626. var u = JSON.parse(decodeURIComponent(i));
  18627. "object" != _typeof(u) && (u = i), r[a] = u;
  18628. } catch (e) {
  18629. try {
  18630. r[a] = decodeURIComponent(i);
  18631. } catch (e) {
  18632. r[a] = i;
  18633. }
  18634. } else if ("object" == _typeof(i)) {
  18635. var l = e(i);
  18636. r[a] = l;
  18637. } else r[a] = i;
  18638. }
  18639. return r;
  18640. };
  18641. },
  18642. 883: function _(e, t) {
  18643. "use strict";
  18644. function r(e, t, r, o) {
  18645. if (void 0 === o && (o = !1), !o) {
  18646. var n = "[object Object]" === t.toString();
  18647. if (!1 === t) return !1;
  18648. if (n && !1 === t[e]) return !1;
  18649. }
  18650. return console[e](r), !0;
  18651. }
  18652. Object.defineProperty(t, "__esModule", {
  18653. value: !0
  18654. }), t.warnLock = t.log = t.warn = t.err = t.isLog = void 0, t.isLog = r, t.err = function (e, t, o) {
  18655. r("error", t.options.debugger, e, o);
  18656. }, t.warn = function (e, t, o) {
  18657. r("warn", t.options.debugger, e, o);
  18658. }, t.log = function (e, t, o) {
  18659. r("log", t.options.debugger, e, o);
  18660. }, t.warnLock = function (e) {
  18661. console.warn(e);
  18662. };
  18663. },
  18664. 607: function _(e, t, r) {
  18665. "use strict";
  18666. var o = this && this.__createBinding || (Object.create ? function (e, t, r, o) {
  18667. void 0 === o && (o = r), Object.defineProperty(e, o, {
  18668. enumerable: !0,
  18669. get: function get() {
  18670. return t[r];
  18671. }
  18672. });
  18673. } : function (e, t, r, o) {
  18674. void 0 === o && (o = r), e[o] = t[r];
  18675. }),
  18676. n = this && this.__exportStar || function (e, t) {
  18677. for (var r in e) {
  18678. "default" === r || Object.prototype.hasOwnProperty.call(t, r) || o(t, e, r);
  18679. }
  18680. };
  18681. Object.defineProperty(t, "__esModule", {
  18682. value: !0
  18683. }), t.createRouter = t.RouterMount = t.runtimeQuit = void 0, n(r(366), t), n(r(309), t), n(r(789), t);
  18684. var a = r(814);
  18685. Object.defineProperty(t, "runtimeQuit", {
  18686. enumerable: !0,
  18687. get: function get() {
  18688. return a.runtimeQuit;
  18689. }
  18690. });
  18691. var i = r(963);
  18692. Object.defineProperty(t, "RouterMount", {
  18693. enumerable: !0,
  18694. get: function get() {
  18695. return i.RouterMount;
  18696. }
  18697. }), Object.defineProperty(t, "createRouter", {
  18698. enumerable: !0,
  18699. get: function get() {
  18700. return i.createRouter;
  18701. }
  18702. });
  18703. var u = "2.0.8-BETA.4";
  18704. /[A-Z]/g.test(u) && console.warn("【" + "UNI-SIMPLE-ROUTER".toLocaleLowerCase() + " 提示】:当前版本 " + u.toLocaleLowerCase() + " 此版本为测试版。有BUG请退回正式版,线上正式版本:2.0.7");
  18705. },
  18706. 366: function _(e, t) {
  18707. "use strict";
  18708. var r, o, n;
  18709. Object.defineProperty(t, "__esModule", {
  18710. value: !0
  18711. }), t.rewriteMethodToggle = t.navtypeToggle = t.hookToggle = void 0, (n = t.hookToggle || (t.hookToggle = {})).beforeHooks = "beforeEach", n.afterHooks = "afterEach", n.enterHooks = "beforeEnter", (o = t.navtypeToggle || (t.navtypeToggle = {})).push = "navigateTo", o.replace = "redirectTo", o.replaceAll = "reLaunch", o.pushTab = "switchTab", o.back = "navigateBack", (r = t.rewriteMethodToggle || (t.rewriteMethodToggle = {})).navigateTo = "push", r.navigate = "push", r.redirectTo = "replace", r.reLaunch = "replaceAll", r.switchTab = "pushTab", r.navigateBack = "back";
  18712. },
  18713. 309: function _(e, t) {
  18714. "use strict";
  18715. Object.defineProperty(t, "__esModule", {
  18716. value: !0
  18717. });
  18718. },
  18719. 925: function _(e, t, r) {
  18720. "use strict";
  18721. Object.defineProperty(t, "__esModule", {
  18722. value: !0
  18723. }), t.beforeProxyHook = void 0;
  18724. var o = r(789),
  18725. n = r(883);
  18726. t.beforeProxyHook = function (e, t) {
  18727. var r = e.$options,
  18728. a = t.options.beforeProxyHooks;
  18729. if (null == r) return !1;
  18730. if (null == a) return !1;
  18731. for (var i = Object.keys(a), u = function u(e) {
  18732. var u = i[e],
  18733. l = r[u];
  18734. if (l) for (var c = a[u], s = function s(e) {
  18735. if (l[e].toString().includes("UNI-SIMPLE-ROUTER")) return "continue";
  18736. var r = l.splice(e, 1, function () {
  18737. for (var e = this, n = [], a = 0; a < arguments.length; a++) {
  18738. n[a] = arguments[a];
  18739. }
  18740. var i = "UNI-SIMPLE-ROUTER";
  18741. o.voidFun(i), c ? c.call(this, n, function (t) {
  18742. r.apply(e, t);
  18743. }, t) : r.apply(this, n);
  18744. })[0];
  18745. }, p = 0; p < l.length; p++) {
  18746. s(p);
  18747. } else n.warn("beforeProxyHooks ===> 当前组件不适合" + u + ",或者 hook: " + u + " 不存在,已为你规避处理,可以忽略。", t);
  18748. }, l = 0; l < i.length; l++) {
  18749. u(l);
  18750. }
  18751. return !0;
  18752. };
  18753. },
  18754. 169: function _(e, t, r) {
  18755. "use strict";
  18756. var o = this && this.__rest || function (e, t) {
  18757. var r = {};
  18758. for (var o in e) {
  18759. Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
  18760. }
  18761. if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
  18762. var n = 0;
  18763. for (o = Object.getOwnPropertySymbols(e); n < o.length; n++) {
  18764. t.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (r[o[n]] = e[o[n]]);
  18765. }
  18766. }
  18767. return r;
  18768. };
  18769. Object.defineProperty(t, "__esModule", {
  18770. value: !0
  18771. }), t.loopCallHook = t.transitionTo = t.onTriggerEachHook = t.callHook = t.callBeforeRouteLeave = t.HOOKLIST = t.ERRORHOOK = void 0;
  18772. var n = r(789),
  18773. a = r(890),
  18774. i = r(147),
  18775. u = r(369),
  18776. l = r(814);
  18777. function c(e, t, r, o) {
  18778. var a,
  18779. i = n.getUniCachePage(0);
  18780. if (Object.keys(i).length > 0) {
  18781. var u = void 0;
  18782. switch ("h5" === e.options.platform ? u = i.$options.beforeRouteLeave : null != i.$vm && (u = i.$vm.$options.beforeRouteLeave), n.getDataType(u)) {
  18783. case "[object Array]":
  18784. a = (a = u[0]).bind(i);
  18785. break;
  18786. case "[object Function]":
  18787. a = u.bind(i.$vm);
  18788. }
  18789. }
  18790. return s(a, t, r, e, o);
  18791. }
  18792. function s(e, t, r, o, n, a) {
  18793. void 0 === a && (a = !0), null != e && e instanceof Function ? !0 === a ? e(t, r, n, o, !1) : (e(t, r, function () {}, o, !1), n()) : n();
  18794. }
  18795. function p(e, t, r, o, a, i) {
  18796. var u = n.forMatNextToFrom(e, t, r),
  18797. l = u.matTo,
  18798. c = u.matFrom;
  18799. "h5" === e.options.platform ? f(a, 0, i, e, l, c, o) : f(a.slice(0, 4), 0, function () {
  18800. i(function () {
  18801. f(a.slice(4), 0, n.voidFun, e, l, c, o);
  18802. });
  18803. }, e, l, c, o);
  18804. }
  18805. function f(e, r, i, u, c, s, p) {
  18806. var h = n.routesForMapRoute(u, c.path, ["finallyPathMap", "pathMap"]);
  18807. if (e.length - 1 < r) return i();
  18808. var v = e[r],
  18809. y = t.ERRORHOOK[0];
  18810. v(u, c, s, h, function (t) {
  18811. if ("app-plus" === u.options.platform && (!1 !== t && "string" != typeof t && "object" != _typeof(t) || l.tabIndexSelect(c, s)), !1 === t) "h5" === u.options.platform && i(!1), y({
  18812. type: 0,
  18813. msg: "管道函数传递 false 导航被终止!",
  18814. matTo: c,
  18815. matFrom: s,
  18816. nextTo: t
  18817. }, u);else if ("string" == typeof t || "object" == _typeof(t)) {
  18818. var n = p,
  18819. h = t;
  18820. if ("object" == _typeof(t)) {
  18821. var v = t.NAVTYPE;
  18822. h = o(t, ["NAVTYPE"]), null != v && (n = v);
  18823. }
  18824. a.navjump(h, u, n, {
  18825. from: s,
  18826. next: i
  18827. });
  18828. } else null == t ? (r++, f(e, r, i, u, c, s, p)) : y({
  18829. type: 1,
  18830. msg: "管道函数传递未知类型,无法被识别。导航被终止!",
  18831. matTo: c,
  18832. matFrom: s,
  18833. nextTo: t
  18834. }, u);
  18835. });
  18836. }
  18837. t.ERRORHOOK = [function (e, t) {
  18838. return t.lifeCycle.routerErrorHooks[0](e, t);
  18839. }], t.HOOKLIST = [function (e, t, r, o, n) {
  18840. return s(e.lifeCycle.routerBeforeHooks[0], t, r, e, n);
  18841. }, function (e, t, r, o, n) {
  18842. return c(e, t, r, n);
  18843. }, function (e, t, r, o, n) {
  18844. return s(e.lifeCycle.beforeHooks[0], t, r, e, n);
  18845. }, function (e, t, r, o, n) {
  18846. return s(o.beforeEnter, t, r, e, n);
  18847. }, function (e, t, r, o, n) {
  18848. return s(e.lifeCycle.afterHooks[0], t, r, e, n, !1);
  18849. }, function (e, t, r, o, n) {
  18850. return e.$lockStatus = !1, "h5" === e.options.platform && (i.proxyH5Mount(e), u.addKeepAliveInclude(e)), e.runId++, s(e.lifeCycle.routerAfterHooks[0], t, r, e, n, !1);
  18851. }], t.callBeforeRouteLeave = c, t.callHook = s, t.onTriggerEachHook = function (e, r, o, n, a) {
  18852. var i = [];
  18853. switch (n) {
  18854. case "beforeEach":
  18855. i = t.HOOKLIST.slice(0, 3);
  18856. break;
  18857. case "afterEach":
  18858. i = t.HOOKLIST.slice(4);
  18859. break;
  18860. case "beforeEnter":
  18861. i = t.HOOKLIST.slice(3, 4);
  18862. }
  18863. p(o, e, r, "push", i, a);
  18864. }, t.transitionTo = p, t.loopCallHook = f;
  18865. },
  18866. 890: function _(e, t, r) {
  18867. "use strict";
  18868. var o = this && this.__assign || function () {
  18869. return (o = Object.assign || function (e) {
  18870. for (var t, r = 1, o = arguments.length; r < o; r++) {
  18871. for (var n in t = arguments[r]) {
  18872. Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  18873. }
  18874. }
  18875. return e;
  18876. }).apply(this, arguments);
  18877. },
  18878. n = this && this.__rest || function (e, t) {
  18879. var r = {};
  18880. for (var o in e) {
  18881. Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
  18882. }
  18883. if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
  18884. var n = 0;
  18885. for (o = Object.getOwnPropertySymbols(e); n < o.length; n++) {
  18886. t.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (r[o[n]] = e[o[n]]);
  18887. }
  18888. }
  18889. return r;
  18890. };
  18891. Object.defineProperty(t, "__esModule", {
  18892. value: !0
  18893. }), t.createRoute = t.forceGuardEach = t.backOptionsBuild = t.navjump = t.lockNavjump = void 0;
  18894. var a = r(366),
  18895. i = r(99),
  18896. u = r(789),
  18897. l = r(169),
  18898. c = r(845),
  18899. s = r(169);
  18900. function p(e, t, r, o, n) {
  18901. u.lockDetectWarn(t, e, r, function () {
  18902. "h5" !== t.options.platform && (t.$lockStatus = !0), f(e, t, r, void 0, o, n);
  18903. }, n);
  18904. }
  18905. function f(e, t, r, n, p, f, v) {
  18906. if (void 0 === v && (v = !0), "back" === r) {
  18907. var y = 1;
  18908. if ("string" == typeof e ? y = +e : (y = e.delta || 1, f = o(o({}, f || {}), e)), "h5" === t.options.platform) {
  18909. t.$route.go(-y);
  18910. var g = (f || {
  18911. success: u.voidFun
  18912. }).success || u.voidFun,
  18913. d = (f || {
  18914. complete: u.voidFun
  18915. }).complete || u.voidFun;
  18916. return g({
  18917. errMsg: "navigateBack:ok"
  18918. }), void d({
  18919. errMsg: "navigateBack:ok"
  18920. });
  18921. }
  18922. e = h(t, y, f);
  18923. }
  18924. var m = i.queryPageToMap(e, t).rule;
  18925. m.type = a.navtypeToggle[r];
  18926. var b = u.paramsToQuery(t, m),
  18927. P = i.resolveQuery(b, t);
  18928. if ("h5" === t.options.platform) {
  18929. if ("push" !== r && (r = "replace"), null != n) n.next(o({
  18930. replace: "push" !== r
  18931. }, P));else if ("push" === r && Reflect.has(P, "events")) {
  18932. if (Reflect.has(P, "name")) throw new Error("在h5端上使用 'push'、'navigateTo' 跳转时,如果包含 events 不允许使用 name 跳转,因为 name 实现了动态路由。请更换为 path 或者 url 跳转!");
  18933. uni.navigateTo(P, !0, u.voidFun, p);
  18934. } else t.$route[r](P, P.success || u.voidFun, P.fail || u.voidFun);
  18935. } else {
  18936. var O = {
  18937. path: ""
  18938. };
  18939. if (null == n) {
  18940. var k = u.routesForMapRoute(t, P.path, ["finallyPathMap", "pathMap"]);
  18941. k = u.notRouteTo404(t, k, P, r), P = o(o(o(o({}, k), {
  18942. params: {}
  18943. }), P), {
  18944. path: k.path
  18945. }), O = c.createToFrom(P, t);
  18946. } else O = n.from;
  18947. if (c.createFullPath(P, O), !1 === v) return P;
  18948. l.transitionTo(t, P, O, r, s.HOOKLIST, function (e) {
  18949. uni[a.navtypeToggle[r]](P, !0, e, p);
  18950. });
  18951. }
  18952. }
  18953. function h(e, t, r) {
  18954. void 0 === r && (r = {});
  18955. var n = v(e, t, void 0, o({
  18956. NAVTYPE: "back"
  18957. }, r)),
  18958. a = o(o({}, r), {
  18959. path: n.path,
  18960. query: n.query,
  18961. delta: t
  18962. });
  18963. if ("[object Object]" === u.getDataType(r)) {
  18964. var i = r,
  18965. l = i.animationDuration,
  18966. c = i.animationType;
  18967. null != l && (a.animationDuration = l), null != c && (a.animationType = c);
  18968. var s = r.from;
  18969. null != s && (a.BACKTYPE = s);
  18970. }
  18971. return a;
  18972. }
  18973. function v(e, t, r, l) {
  18974. void 0 === t && (t = 0), void 0 === l && (l = {});
  18975. var c = {
  18976. name: "",
  18977. meta: {},
  18978. path: "",
  18979. fullPath: "",
  18980. NAVTYPE: "",
  18981. query: {},
  18982. params: {},
  18983. BACKTYPE: (r || {
  18984. BACKTYPE: ""
  18985. }).BACKTYPE || ""
  18986. };
  18987. if (19970806 === t) return c;
  18988. if ("h5" === e.options.platform) {
  18989. var s = {
  18990. path: ""
  18991. };
  18992. s = null != r ? r : e.$route.currentRoute;
  18993. var p = u.copyData(s.params);
  18994. delete p.__id__;
  18995. var f = i.parseQuery(o(o({}, p), u.copyData(s.query)), e);
  18996. s = o(o({}, s), {
  18997. query: f
  18998. }), c.path = s.path, c.fullPath = s.fullPath || "", c.query = u.deepDecodeQuery(s.query || {}), c.NAVTYPE = a.rewriteMethodToggle[s.type || "reLaunch"];
  18999. } else {
  19000. var h = {};
  19001. if (null != r) h = o(o({}, r), {
  19002. openType: r.type
  19003. });else {
  19004. var v = u.getUniCachePage(t);
  19005. if (0 === Object.keys(v).length) {
  19006. var y = l.NAVTYPE,
  19007. g = n(l, ["NAVTYPE"]),
  19008. d = "不存在的页面栈,请确保有足够的页面可用,当前 level:" + t;
  19009. throw e.options.routerErrorEach({
  19010. type: 3,
  19011. msg: d,
  19012. NAVTYPE: y,
  19013. level: t,
  19014. uniActualData: g
  19015. }, e), new Error(d);
  19016. }
  19017. var m = v.options || {};
  19018. h = o(o({}, v.$page || {}), {
  19019. query: u.deepDecodeQuery(m),
  19020. fullPath: decodeURIComponent((v.$page || {}).fullPath || "/" + v.route)
  19021. }), "app-plus" !== e.options.platform && (h.path = "/" + v.route);
  19022. }
  19023. var b = h.openType;
  19024. c.query = h.query, c.path = h.path, c.fullPath = h.fullPath, c.NAVTYPE = a.rewriteMethodToggle[b || "reLaunch"];
  19025. }
  19026. var P = u.routesForMapRoute(e, c.path, ["finallyPathMap", "pathMap"]),
  19027. O = o(o({}, c), P);
  19028. return O.query = i.parseQuery(O.query, e), O;
  19029. }
  19030. t.lockNavjump = p, t.navjump = f, t.backOptionsBuild = h, t.forceGuardEach = function (e, t, r) {
  19031. if (void 0 === t && (t = "replaceAll"), void 0 === r && (r = !1), "h5" === e.options.platform) throw new Error("在h5端上使用:forceGuardEach 是无意义的,目前 forceGuardEach 仅支持在非h5端上使用");
  19032. var o = u.getUniCachePage(0);
  19033. 0 === Object.keys(o).length && e.options.routerErrorEach({
  19034. type: 3,
  19035. NAVTYPE: t,
  19036. uniActualData: {},
  19037. level: 0,
  19038. msg: "不存在的页面栈,请确保有足够的页面可用,当前 level:0"
  19039. }, e);
  19040. var n = o,
  19041. a = n.route,
  19042. i = n.options;
  19043. p({
  19044. path: "/" + a,
  19045. query: u.deepDecodeQuery(i || {})
  19046. }, e, t, r);
  19047. }, t.createRoute = v;
  19048. },
  19049. 845: function _(e, t, r) {
  19050. "use strict";
  19051. Object.defineProperty(t, "__esModule", {
  19052. value: !0
  19053. }), t.resetPageHook = t.resetAndCallPageHook = t.proxyPageHook = t.createFullPath = t.createToFrom = void 0;
  19054. var o = r(282),
  19055. n = r(789),
  19056. a = r(890),
  19057. i = r(99);
  19058. function u(e) {
  19059. for (var t = e.proxyHookDeps, r = 0, o = Object.entries(t.hooks); r < o.length; r++) {
  19060. (0, o[r][1].resetHook)();
  19061. }
  19062. }
  19063. t.createToFrom = function (e, t) {
  19064. var r = n.getUniCachePage(0);
  19065. return "[object Array]" === n.getDataType(r) ? n.deepClone(e) : a.createRoute(t);
  19066. }, t.createFullPath = function (e, t) {
  19067. if (null == e.fullPath) {
  19068. var r = i.stringifyQuery(e.query);
  19069. e.fullPath = e.path + r;
  19070. }
  19071. null == t.fullPath && (r = i.stringifyQuery(t.query), t.fullPath = t.path + r);
  19072. }, t.proxyPageHook = function (e, t, r) {
  19073. for (var n = t.proxyHookDeps, a = e.$options, i = function i(_i) {
  19074. var u = o.proxyHookName[_i],
  19075. l = a[u];
  19076. if (l) for (var c = function c(o) {
  19077. if (l[o].toString().includes("UNI-SIMPLE-ROUTER")) return "continue";
  19078. var a = Object.keys(n.hooks).length + 1,
  19079. i = function i() {
  19080. for (var e = [], t = 0; t < arguments.length; t++) {
  19081. e[t] = arguments[t];
  19082. }
  19083. n.resetIndex.push(a), n.options[a] = e;
  19084. },
  19085. u = l.splice(o, 1, i)[0];
  19086. n.hooks[a] = {
  19087. proxyHook: i,
  19088. callHook: function callHook(o) {
  19089. if (t.enterPath.replace(/^\//, "") === o.replace(/^\//, "") || "app" === r) {
  19090. var i = n.options[a];
  19091. u.apply(e, i);
  19092. }
  19093. },
  19094. resetHook: function resetHook() {
  19095. l.splice(o, 1, u);
  19096. }
  19097. };
  19098. }, s = 0; s < l.length; s++) {
  19099. c(s);
  19100. }
  19101. }, u = 0; u < o.proxyHookName.length; u++) {
  19102. i(u);
  19103. }
  19104. }, t.resetAndCallPageHook = function (e, t, r) {
  19105. void 0 === r && (r = !0);
  19106. var o = t.trim().match(/^(\/?[^\?\s]+)(\?[\s\S]*$)?$/);
  19107. if (null == o) throw new Error("还原hook失败。请检查 【" + t + "】 路径是否正确。");
  19108. t = o[1];
  19109. for (var n = e.proxyHookDeps, a = n.resetIndex, i = 0; i < a.length; i++) {
  19110. var l = a[i];
  19111. (0, n.hooks[l].callHook)(t);
  19112. }
  19113. r && u(e);
  19114. }, t.resetPageHook = u;
  19115. },
  19116. 99: function _(e, t, r) {
  19117. "use strict";
  19118. var o = this && this.__assign || function () {
  19119. return (o = Object.assign || function (e) {
  19120. for (var t, r = 1, o = arguments.length; r < o; r++) {
  19121. for (var n in t = arguments[r]) {
  19122. Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  19123. }
  19124. }
  19125. return e;
  19126. }).apply(this, arguments);
  19127. };
  19128. Object.defineProperty(t, "__esModule", {
  19129. value: !0
  19130. }), t.stringifyQuery = t.parseQuery = t.resolveQuery = t.queryPageToMap = void 0;
  19131. var n = r(789),
  19132. a = r(169),
  19133. i = r(883),
  19134. u = /[!'()*]/g,
  19135. l = function l(e) {
  19136. return "%" + e.charCodeAt(0).toString(16);
  19137. },
  19138. c = /%2C/g,
  19139. s = function s(e) {
  19140. return encodeURIComponent(e).replace(u, l).replace(c, ",");
  19141. };
  19142. t.queryPageToMap = function (e, t) {
  19143. var r = {},
  19144. i = "",
  19145. u = e.success,
  19146. l = e.fail;
  19147. if ("[object Object]" === n.getDataType(e)) {
  19148. var c = e;
  19149. if (null != c.path) {
  19150. var s = n.urlToJson(c.path),
  19151. p = s.path,
  19152. f = s.query;
  19153. i = n.routesForMapRoute(t, p, ["finallyPathList", "pathMap"]), r = o(o({}, f), e.query || {}), c.path = p, c.query = r, delete e.params;
  19154. } else null != c.name ? null == (i = t.routesMap.nameMap[c.name]) ? i = n.getWildcardRule(t, {
  19155. type: 2,
  19156. msg: "命名路由为:" + c.name + " 的路由,无法在路由表中找到!",
  19157. toRule: e
  19158. }) : (r = e.params || {}, delete e.query) : i = n.getWildcardRule(t, {
  19159. type: 2,
  19160. msg: e + " 解析失败,请检测当前路由表下是否有包含。",
  19161. toRule: e
  19162. });
  19163. } else e = n.urlToJson(e), i = n.routesForMapRoute(t, e.path, ["finallyPathList", "pathMap"]), r = e.query;
  19164. if ("h5" === t.options.platform) {
  19165. n.getRoutePath(i, t).finallyPath.includes(":") && null == e.name && a.ERRORHOOK[0]({
  19166. type: 2,
  19167. msg: "当有设置 alias或者aliasPath 为动态路由时,不允许使用 path 跳转。请使用 name 跳转!",
  19168. route: i
  19169. }, t);
  19170. var h = e.complete,
  19171. v = e.success,
  19172. y = e.fail;
  19173. if ("[object Function]" === n.getDataType(h)) {
  19174. var g = function g(e, t) {
  19175. "[object Function]" === n.getDataType(t) && t.apply(this, e), h.apply(this, e);
  19176. };
  19177. u = function u() {
  19178. for (var e = [], t = 0; t < arguments.length; t++) {
  19179. e[t] = arguments[t];
  19180. }
  19181. g.call(this, e, v);
  19182. }, l = function l() {
  19183. for (var e = [], t = 0; t < arguments.length; t++) {
  19184. e[t] = arguments[t];
  19185. }
  19186. g.call(this, e, y);
  19187. };
  19188. }
  19189. }
  19190. var d = e;
  19191. return "[object Function]" === n.getDataType(d.success) && (d.success = u), "[object Function]" === n.getDataType(d.fail) && (d.fail = l), {
  19192. rule: d,
  19193. route: i,
  19194. query: r
  19195. };
  19196. }, t.resolveQuery = function (e, t) {
  19197. var r = "query";
  19198. null != e.params && (r = "params"), null != e.query && (r = "query");
  19199. var o = n.copyData(e[r] || {}),
  19200. a = t.options.resolveQuery;
  19201. if (a) {
  19202. var u = a(o);
  19203. "[object Object]" !== n.getDataType(u) ? i.warn("请按格式返回参数: resolveQuery?:(jsonQuery:{[propName: string]: any;})=>{[propName: string]: any;}", t) : e[r] = u;
  19204. } else {
  19205. if (!n.assertDeepObject(o)) return e;
  19206. var l = JSON.stringify(o);
  19207. e[r] = {
  19208. query: l
  19209. };
  19210. }
  19211. return e;
  19212. }, t.parseQuery = function (e, t) {
  19213. var r = t.options.parseQuery;
  19214. if (r) e = r(n.copyData(e)), "[object Object]" !== n.getDataType(e) && i.warn("请按格式返回参数: parseQuery?:(jsonQuery:{[propName: string]: any;})=>{[propName: string]: any;}", t);else if (Reflect.get(e, "query")) {
  19215. var o = Reflect.get(e, "query");
  19216. if ("string" == typeof o) try {
  19217. o = JSON.parse(o);
  19218. } catch (e) {
  19219. i.warn("尝试解析深度对象失败,按原样输出。" + e, t);
  19220. }
  19221. if ("object" == _typeof(o)) return n.deepDecodeQuery(o);
  19222. }
  19223. return e;
  19224. }, t.stringifyQuery = function (e) {
  19225. var t = e ? Object.keys(e).map(function (t) {
  19226. var r = e[t];
  19227. if (void 0 === r) return "";
  19228. if (null === r) return s(t);
  19229. if (Array.isArray(r)) {
  19230. var o = [];
  19231. return r.forEach(function (e) {
  19232. void 0 !== e && (null === e ? o.push(s(t)) : o.push(s(t) + "=" + s(e)));
  19233. }), o.join("&");
  19234. }
  19235. return s(t) + "=" + s(r);
  19236. }).filter(function (e) {
  19237. return e.length > 0;
  19238. }).join("&") : null;
  19239. return t ? "?" + t : "";
  19240. };
  19241. },
  19242. 314: function _(e, t, r) {
  19243. "use strict";
  19244. var o = this && this.__awaiter || function (e, t, r, o) {
  19245. return new (r || (r = Promise))(function (n, a) {
  19246. function i(e) {
  19247. try {
  19248. l(o.next(e));
  19249. } catch (e) {
  19250. a(e);
  19251. }
  19252. }
  19253. function u(e) {
  19254. try {
  19255. l(o.throw(e));
  19256. } catch (e) {
  19257. a(e);
  19258. }
  19259. }
  19260. function l(e) {
  19261. var t;
  19262. e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r(function (e) {
  19263. e(t);
  19264. })).then(i, u);
  19265. }
  19266. l((o = o.apply(e, t || [])).next());
  19267. });
  19268. },
  19269. n = this && this.__generator || function (e, t) {
  19270. var r,
  19271. o,
  19272. n,
  19273. a,
  19274. i = {
  19275. label: 0,
  19276. sent: function sent() {
  19277. if (1 & n[0]) throw n[1];
  19278. return n[1];
  19279. },
  19280. trys: [],
  19281. ops: []
  19282. };
  19283. return a = {
  19284. next: u(0),
  19285. throw: u(1),
  19286. return: u(2)
  19287. }, "function" == typeof Symbol && (a[Symbol.iterator] = function () {
  19288. return this;
  19289. }), a;
  19290. function u(a) {
  19291. return function (u) {
  19292. return function (a) {
  19293. if (r) throw new TypeError("Generator is already executing.");
  19294. for (; i;) {
  19295. try {
  19296. if (r = 1, o && (n = 2 & a[0] ? o.return : a[0] ? o.throw || ((n = o.return) && n.call(o), 0) : o.next) && !(n = n.call(o, a[1])).done) return n;
  19297. switch (o = 0, n && (a = [2 & a[0], n.value]), a[0]) {
  19298. case 0:
  19299. case 1:
  19300. n = a;
  19301. break;
  19302. case 4:
  19303. return i.label++, {
  19304. value: a[1],
  19305. done: !1
  19306. };
  19307. case 5:
  19308. i.label++, o = a[1], a = [0];
  19309. continue;
  19310. case 7:
  19311. a = i.ops.pop(), i.trys.pop();
  19312. continue;
  19313. default:
  19314. if (!((n = (n = i.trys).length > 0 && n[n.length - 1]) || 6 !== a[0] && 2 !== a[0])) {
  19315. i = 0;
  19316. continue;
  19317. }
  19318. if (3 === a[0] && (!n || a[1] > n[0] && a[1] < n[3])) {
  19319. i.label = a[1];
  19320. break;
  19321. }
  19322. if (6 === a[0] && i.label < n[1]) {
  19323. i.label = n[1], n = a;
  19324. break;
  19325. }
  19326. if (n && i.label < n[2]) {
  19327. i.label = n[2], i.ops.push(a);
  19328. break;
  19329. }
  19330. n[2] && i.ops.pop(), i.trys.pop();
  19331. continue;
  19332. }
  19333. a = t.call(e, i);
  19334. } catch (e) {
  19335. a = [6, e], o = 0;
  19336. } finally {
  19337. r = n = 0;
  19338. }
  19339. }
  19340. if (5 & a[0]) throw a[1];
  19341. return {
  19342. value: a[0] ? a[1] : void 0,
  19343. done: !0
  19344. };
  19345. }([a, u]);
  19346. };
  19347. }
  19348. };
  19349. Object.defineProperty(t, "__esModule", {
  19350. value: !0
  19351. }), t.rewriteMethod = void 0;
  19352. var a = r(366),
  19353. i = r(789),
  19354. u = r(883),
  19355. l = r(809),
  19356. c = r(814),
  19357. s = ["navigateTo", "redirectTo", "reLaunch", "switchTab", "navigateBack"],
  19358. p = {
  19359. navigateTo: function navigateTo() {},
  19360. redirectTo: function redirectTo() {},
  19361. reLaunch: function reLaunch() {},
  19362. switchTab: function switchTab() {},
  19363. navigateBack: function navigateBack() {}
  19364. };
  19365. t.rewriteMethod = function (e) {
  19366. !1 === e.options.keepUniOriginNav && s.forEach(function (t) {
  19367. var r = uni[t];
  19368. p[t] = r, uni[t] = function (s, f, h, v) {
  19369. return void 0 === f && (f = !1), o(this, void 0, void 0, function () {
  19370. return n(this, function (o) {
  19371. switch (o.label) {
  19372. case 0:
  19373. return f ? "app-plus" !== e.options.platform ? [3, 2] : [4, c.HomeNvueSwitchTab(e, s, p.reLaunch)] : [3, 3];
  19374. case 1:
  19375. o.sent(), o.label = 2;
  19376. case 2:
  19377. return l.uniOriginJump(e, r, t, s, h, v), [3, 4];
  19378. case 3:
  19379. "app-plus" === e.options.platform && 0 === Object.keys(e.appMain).length && (e.appMain = {
  19380. NAVTYPE: t,
  19381. path: s.url
  19382. }), function (e, t, r) {
  19383. if ("app-plus" === r.options.platform) {
  19384. var o = null;
  19385. e && (o = e.openType), null != o && "appLaunch" === o && (t = "reLaunch");
  19386. }
  19387. if ("reLaunch" === t && '{"url":"/"}' === JSON.stringify(e) && (u.warn("uni-app 原生方法:reLaunch({url:'/'}) 默认被重写啦!你可以使用 this.$Router.replaceAll() 或者 uni.reLaunch({url:'/?xxx=xxx'})", r), t = "navigateBack", e = {
  19388. from: "backbutton"
  19389. }), "navigateBack" === t) {
  19390. var n = 1;
  19391. null == e && (e = {
  19392. delta: 1
  19393. }), "[object Number]" === i.getDataType(e.delta) && (n = e.delta), r.back(n, e);
  19394. } else {
  19395. var l = a.rewriteMethodToggle[t],
  19396. c = e.url;
  19397. if (!c.startsWith("/")) {
  19398. var s = i.resolveAbsolutePath(c, r);
  19399. c = s, e.url = s;
  19400. }
  19401. if ("switchTab" === t) {
  19402. var p = i.routesForMapRoute(r, c, ["pathMap", "finallyPathList"]),
  19403. f = i.getRoutePath(p, r).finallyPath;
  19404. if ("[object Array]" === i.getDataType(f) && u.warn("uni-app 原生方法跳转路径为:" + c + "。此路为是tab页面时,不允许设置 alias 为数组的情况,并且不能为动态路由!当然你可以通过通配符*解决!", r), "*" === f && u.warn("uni-app 原生方法跳转路径为:" + c + "。在路由表中找不到相关路由表!当然你可以通过通配符*解决!", r), "h5" === r.options.platform) {
  19405. var h = e.success;
  19406. e.success = function () {
  19407. for (var t = [], r = 0; r < arguments.length; r++) {
  19408. t[r] = arguments[r];
  19409. }
  19410. null == h || h.apply(null, t), i.timeOut(150).then(function () {
  19411. var t = e.detail || {};
  19412. if (Object.keys(t).length > 0 && Reflect.has(t, "index")) {
  19413. var r = i.getUniCachePage(0);
  19414. if (0 === Object.keys(r).length) return !1;
  19415. var o = r,
  19416. n = o.$options.onTabItemTap;
  19417. if (n) for (var a = 0; a < n.length; a++) {
  19418. n[a].call(o, t);
  19419. }
  19420. }
  19421. });
  19422. };
  19423. }
  19424. c = f;
  19425. }
  19426. var v = e,
  19427. y = v.events,
  19428. g = v.success,
  19429. d = v.fail,
  19430. m = v.complete,
  19431. b = v.animationType,
  19432. P = {
  19433. path: c,
  19434. events: y,
  19435. success: g,
  19436. fail: d,
  19437. complete: m,
  19438. animationDuration: v.animationDuration,
  19439. animationType: b
  19440. };
  19441. r[l](i.notDeepClearNull(P));
  19442. }
  19443. }(s, t, e), o.label = 4;
  19444. case 4:
  19445. return [2];
  19446. }
  19447. });
  19448. });
  19449. };
  19450. });
  19451. };
  19452. },
  19453. 963: function _(e, t, r) {
  19454. "use strict";
  19455. var o = this && this.__assign || function () {
  19456. return (o = Object.assign || function (e) {
  19457. for (var t, r = 1, o = arguments.length; r < o; r++) {
  19458. for (var n in t = arguments[r]) {
  19459. Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  19460. }
  19461. }
  19462. return e;
  19463. }).apply(this, arguments);
  19464. };
  19465. Object.defineProperty(t, "__esModule", {
  19466. value: !0
  19467. }), t.createRouter = t.RouterMount = void 0;
  19468. var n = r(282),
  19469. a = r(789),
  19470. i = r(662),
  19471. u = r(460),
  19472. l = r(890),
  19473. c = r(314),
  19474. s = function s() {},
  19475. p = new Promise(function (e) {
  19476. return s = e;
  19477. });
  19478. t.createRouter = function (e) {
  19479. var t = a.assertNewOptions(e),
  19480. r = {
  19481. options: t,
  19482. mount: [],
  19483. runId: 0,
  19484. Vue: null,
  19485. proxyHookDeps: n.proxyHookDeps,
  19486. appMain: {},
  19487. enterPath: "",
  19488. $route: null,
  19489. $lockStatus: !1,
  19490. routesMap: {},
  19491. lifeCycle: i.registerRouterHooks(n.lifeCycle, t),
  19492. push: function push(e) {
  19493. l.lockNavjump(e, r, "push");
  19494. },
  19495. replace: function replace(e) {
  19496. l.lockNavjump(e, r, "replace");
  19497. },
  19498. replaceAll: function replaceAll(e) {
  19499. l.lockNavjump(e, r, "replaceAll");
  19500. },
  19501. pushTab: function pushTab(e) {
  19502. l.lockNavjump(e, r, "pushTab");
  19503. },
  19504. back: function back(e, t) {
  19505. void 0 === e && (e = 1), "[object Object]" !== a.getDataType(t) ? t = {
  19506. from: "navigateBack"
  19507. } : Reflect.has(t, "from") || (t = o(o({}, t), {
  19508. from: "navigateBack"
  19509. })), l.lockNavjump(e + "", r, "back", void 0, t);
  19510. },
  19511. forceGuardEach: function forceGuardEach(e, t) {
  19512. l.forceGuardEach(r, e, t);
  19513. },
  19514. beforeEach: function beforeEach(e) {
  19515. i.registerEachHooks(r, "beforeHooks", e);
  19516. },
  19517. afterEach: function afterEach(e) {
  19518. i.registerEachHooks(r, "afterHooks", e);
  19519. },
  19520. install: function install(e) {
  19521. r.Vue = e, c.rewriteMethod(this), u.initMixins(e, this), Object.defineProperty(e.prototype, "$Router", {
  19522. get: function get() {
  19523. var e = r;
  19524. return Object.defineProperty(this, "$Router", {
  19525. value: e,
  19526. writable: !1,
  19527. configurable: !1,
  19528. enumerable: !1
  19529. }), Object.seal(e);
  19530. }
  19531. }), Object.defineProperty(e.prototype, "$Route", {
  19532. get: function get() {
  19533. return l.createRoute(r);
  19534. }
  19535. }), Object.defineProperty(e.prototype, "$AppReady", {
  19536. get: function get() {
  19537. return "h5" === r.options.platform ? Promise.resolve() : p;
  19538. },
  19539. set: function set(e) {
  19540. !0 === e && s();
  19541. }
  19542. });
  19543. }
  19544. };
  19545. return a.def(r, "currentRoute", function () {
  19546. return l.createRoute(r);
  19547. }), r.beforeEach(function (e, t, r) {
  19548. return r();
  19549. }), r.afterEach(function () {}), r;
  19550. }, t.RouterMount = function (e, t, r) {
  19551. if (void 0 === r && (r = "#app"), "[object Array]" !== a.getDataType(t.mount)) throw new Error("挂载路由失败,router.app 应该为数组类型。当前类型:" + _typeof(t.mount));
  19552. if (t.mount.push({
  19553. app: e,
  19554. el: r
  19555. }), "h5" === t.options.platform) {
  19556. var o = t.$route;
  19557. o.replace({
  19558. path: o.currentRoute.fullPath
  19559. });
  19560. }
  19561. };
  19562. },
  19563. 809: function _(e, t, r) {
  19564. "use strict";
  19565. var o = this && this.__assign || function () {
  19566. return (o = Object.assign || function (e) {
  19567. for (var t, r = 1, o = arguments.length; r < o; r++) {
  19568. for (var n in t = arguments[r]) {
  19569. Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
  19570. }
  19571. }
  19572. return e;
  19573. }).apply(this, arguments);
  19574. },
  19575. n = this && this.__awaiter || function (e, t, r, o) {
  19576. return new (r || (r = Promise))(function (n, a) {
  19577. function i(e) {
  19578. try {
  19579. l(o.next(e));
  19580. } catch (e) {
  19581. a(e);
  19582. }
  19583. }
  19584. function u(e) {
  19585. try {
  19586. l(o.throw(e));
  19587. } catch (e) {
  19588. a(e);
  19589. }
  19590. }
  19591. function l(e) {
  19592. var t;
  19593. e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r(function (e) {
  19594. e(t);
  19595. })).then(i, u);
  19596. }
  19597. l((o = o.apply(e, t || [])).next());
  19598. });
  19599. },
  19600. a = this && this.__generator || function (e, t) {
  19601. var r,
  19602. o,
  19603. n,
  19604. a,
  19605. i = {
  19606. label: 0,
  19607. sent: function sent() {
  19608. if (1 & n[0]) throw n[1];
  19609. return n[1];
  19610. },
  19611. trys: [],
  19612. ops: []
  19613. };
  19614. return a = {
  19615. next: u(0),
  19616. throw: u(1),
  19617. return: u(2)
  19618. }, "function" == typeof Symbol && (a[Symbol.iterator] = function () {
  19619. return this;
  19620. }), a;
  19621. function u(a) {
  19622. return function (u) {
  19623. return function (a) {
  19624. if (r) throw new TypeError("Generator is already executing.");
  19625. for (; i;) {
  19626. try {
  19627. if (r = 1, o && (n = 2 & a[0] ? o.return : a[0] ? o.throw || ((n = o.return) && n.call(o), 0) : o.next) && !(n = n.call(o, a[1])).done) return n;
  19628. switch (o = 0, n && (a = [2 & a[0], n.value]), a[0]) {
  19629. case 0:
  19630. case 1:
  19631. n = a;
  19632. break;
  19633. case 4:
  19634. return i.label++, {
  19635. value: a[1],
  19636. done: !1
  19637. };
  19638. case 5:
  19639. i.label++, o = a[1], a = [0];
  19640. continue;
  19641. case 7:
  19642. a = i.ops.pop(), i.trys.pop();
  19643. continue;
  19644. default:
  19645. if (!((n = (n = i.trys).length > 0 && n[n.length - 1]) || 6 !== a[0] && 2 !== a[0])) {
  19646. i = 0;
  19647. continue;
  19648. }
  19649. if (3 === a[0] && (!n || a[1] > n[0] && a[1] < n[3])) {
  19650. i.label = a[1];
  19651. break;
  19652. }
  19653. if (6 === a[0] && i.label < n[1]) {
  19654. i.label = n[1], n = a;
  19655. break;
  19656. }
  19657. if (n && i.label < n[2]) {
  19658. i.label = n[2], i.ops.push(a);
  19659. break;
  19660. }
  19661. n[2] && i.ops.pop(), i.trys.pop();
  19662. continue;
  19663. }
  19664. a = t.call(e, i);
  19665. } catch (e) {
  19666. a = [6, e], o = 0;
  19667. } finally {
  19668. r = n = 0;
  19669. }
  19670. }
  19671. if (5 & a[0]) throw a[1];
  19672. return {
  19673. value: a[0] ? a[1] : void 0,
  19674. done: !0
  19675. };
  19676. }([a, u]);
  19677. };
  19678. }
  19679. },
  19680. i = this && this.__rest || function (e, t) {
  19681. var r = {};
  19682. for (var o in e) {
  19683. Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
  19684. }
  19685. if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
  19686. var n = 0;
  19687. for (o = Object.getOwnPropertySymbols(e); n < o.length; n++) {
  19688. t.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (r[o[n]] = e[o[n]]);
  19689. }
  19690. }
  19691. return r;
  19692. };
  19693. Object.defineProperty(t, "__esModule", {
  19694. value: !0
  19695. }), t.formatOriginURLQuery = t.uniOriginJump = void 0;
  19696. var u = r(99),
  19697. l = r(789),
  19698. c = r(282),
  19699. s = r(845),
  19700. p = 0,
  19701. f = "reLaunch";
  19702. function h(e, t, r) {
  19703. var n,
  19704. a = t.url,
  19705. i = t.path,
  19706. c = t.query,
  19707. s = t.animationType,
  19708. p = t.animationDuration,
  19709. f = t.events,
  19710. h = t.success,
  19711. v = t.fail,
  19712. y = t.complete,
  19713. g = t.delta,
  19714. d = t.animation,
  19715. m = u.stringifyQuery(c || {}),
  19716. b = "" === m ? i || a : (i || a) + m,
  19717. P = {};
  19718. return "app-plus" === e.options.platform && "navigateBack" !== r && (P = (null === (n = e.options.APP) || void 0 === n ? void 0 : n.animation) || {}, P = o(o({}, P), d || {})), l.notDeepClearNull({
  19719. delta: g,
  19720. url: b,
  19721. animationType: s || P.animationType,
  19722. animationDuration: p || P.animationDuration,
  19723. events: f,
  19724. success: h,
  19725. fail: v,
  19726. complete: y
  19727. });
  19728. }
  19729. t.uniOriginJump = function (e, t, r, u, v, y) {
  19730. var g = h(e, u, r),
  19731. d = g.complete,
  19732. m = i(g, ["complete"]),
  19733. b = e.options.platform;
  19734. null != y && !1 === y ? (0 === p && (p++, "h5" !== b && (s.resetAndCallPageHook(e, m.url), e.Vue.prototype.$AppReady = !0)), d && d.apply(null, {
  19735. msg: "forceGuardEach强制触发并且不执行跳转"
  19736. }), v && v.apply(null, {
  19737. msg: "forceGuardEach强制触发并且不执行跳转"
  19738. })) : (0 === p && ("app-plus" === b ? s.resetAndCallPageHook(e, m.url) : new RegExp(c.mpPlatformReg, "g").test(b) && s.resetAndCallPageHook(e, m.url, !1)), t(o(o({}, m), {
  19739. from: u.BACKTYPE,
  19740. complete: function complete() {
  19741. for (var t, o, i, u, h = [], y = 0; y < arguments.length; y++) {
  19742. h[y] = arguments[y];
  19743. }
  19744. return n(this, void 0, void 0, function () {
  19745. var n, y, g;
  19746. return a(this, function (a) {
  19747. switch (a.label) {
  19748. case 0:
  19749. return 0 === p && (p++, "h5" !== b && (new RegExp(c.mpPlatformReg, "g").test(b) && s.resetPageHook(e), e.Vue.prototype.$AppReady = !0, "app-plus" === b && ((n = plus.nativeObj.View.getViewById("router-loadding")) && n.close(), (y = null === (t = e.options.APP) || void 0 === t ? void 0 : t.launchedHook) && y()))), g = 0, new RegExp(c.mpPlatformReg, "g").test(b) ? g = null === (o = e.options.applet) || void 0 === o ? void 0 : o.animationDuration : "app-plus" === b && "navigateBack" === r && "navigateTo" === f && (g = null === (u = null === (i = e.options.APP) || void 0 === i ? void 0 : i.animation) || void 0 === u ? void 0 : u.animationDuration), "navigateTo" !== r && "navigateBack" !== r || 0 === g ? [3, 2] : [4, l.timeOut(g)];
  19750. case 1:
  19751. a.sent(), a.label = 2;
  19752. case 2:
  19753. return f = r, d && d.apply(null, h), v && v.apply(null, h), [2];
  19754. }
  19755. });
  19756. });
  19757. }
  19758. })));
  19759. }, t.formatOriginURLQuery = h;
  19760. }
  19761. }, t = {}, function r(o) {
  19762. if (t[o]) return t[o].exports;
  19763. var n = t[o] = {
  19764. exports: {}
  19765. };
  19766. return e[o].call(n.exports, n, n.exports, r), n.exports;
  19767. }(607);
  19768. var e, t;
  19769. });
  19770. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! (webpack)/buildin/module.js */ 163)(module)))
  19771. /***/ }),
  19772. /* 163 */
  19773. /*!***********************************!*\
  19774. !*** (webpack)/buildin/module.js ***!
  19775. \***********************************/
  19776. /*! no static exports found */
  19777. /***/ (function(module, exports) {
  19778. module.exports = function(module) {
  19779. if (!module.webpackPolyfill) {
  19780. module.deprecate = function() {};
  19781. module.paths = [];
  19782. // module.parent = undefined by default
  19783. if (!module.children) module.children = [];
  19784. Object.defineProperty(module, "loaded", {
  19785. enumerable: true,
  19786. get: function() {
  19787. return module.l;
  19788. }
  19789. });
  19790. Object.defineProperty(module, "id", {
  19791. enumerable: true,
  19792. get: function() {
  19793. return module.i;
  19794. }
  19795. });
  19796. module.webpackPolyfill = 1;
  19797. }
  19798. return module;
  19799. };
  19800. /***/ }),
  19801. /* 164 */
  19802. /*!*******************************************************************************!*\
  19803. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/utils/auth.js ***!
  19804. \*******************************************************************************/
  19805. /*! no static exports found */
  19806. /***/ (function(module, exports, __webpack_require__) {
  19807. "use strict";
  19808. /* WEBPACK VAR INJECTION */(function(uni) {
  19809. Object.defineProperty(exports, "__esModule", {
  19810. value: true
  19811. });
  19812. exports.getToken = getToken;
  19813. exports.removeToken = removeToken;
  19814. exports.setToken = setToken;
  19815. var TokenKey = 'adminToken';
  19816. function getToken() {
  19817. return uni.getStorageSync(TokenKey);
  19818. }
  19819. function setToken(token) {
  19820. return uni.setStorageSync(TokenKey, token);
  19821. }
  19822. function removeToken() {
  19823. return uni.removeStorageSync(TokenKey);
  19824. }
  19825. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  19826. /***/ }),
  19827. /* 165 */
  19828. /*!********************************************************************************!*\
  19829. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/store/index.js ***!
  19830. \********************************************************************************/
  19831. /*! no static exports found */
  19832. /***/ (function(module, exports, __webpack_require__) {
  19833. "use strict";
  19834. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19835. Object.defineProperty(exports, "__esModule", {
  19836. value: true
  19837. });
  19838. exports.default = void 0;
  19839. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  19840. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 166));
  19841. var _user = _interopRequireDefault(__webpack_require__(/*! ./modules/user */ 167));
  19842. var _getters = _interopRequireDefault(__webpack_require__(/*! ./getters */ 169));
  19843. _vue.default.use(_vuex.default);
  19844. var _default = new _vuex.default.Store({
  19845. modules: {
  19846. user: _user.default
  19847. },
  19848. getters: _getters.default
  19849. });
  19850. exports.default = _default;
  19851. /***/ }),
  19852. /* 166 */
  19853. /*!**************************************************************************************!*\
  19854. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  19855. \**************************************************************************************/
  19856. /*! no static exports found */
  19857. /***/ (function(module, exports, __webpack_require__) {
  19858. "use strict";
  19859. /* WEBPACK VAR INJECTION */(function(global) {/*!
  19860. * vuex v3.6.2
  19861. * (c) 2021 Evan You
  19862. * @license MIT
  19863. */
  19864. function applyMixin (Vue) {
  19865. var version = Number(Vue.version.split('.')[0]);
  19866. if (version >= 2) {
  19867. Vue.mixin({ beforeCreate: vuexInit });
  19868. } else {
  19869. // override init and inject vuex init procedure
  19870. // for 1.x backwards compatibility.
  19871. var _init = Vue.prototype._init;
  19872. Vue.prototype._init = function (options) {
  19873. if ( options === void 0 ) options = {};
  19874. options.init = options.init
  19875. ? [vuexInit].concat(options.init)
  19876. : vuexInit;
  19877. _init.call(this, options);
  19878. };
  19879. }
  19880. /**
  19881. * Vuex init hook, injected into each instances init hooks list.
  19882. */
  19883. function vuexInit () {
  19884. var options = this.$options;
  19885. // store injection
  19886. if (options.store) {
  19887. this.$store = typeof options.store === 'function'
  19888. ? options.store()
  19889. : options.store;
  19890. } else if (options.parent && options.parent.$store) {
  19891. this.$store = options.parent.$store;
  19892. }
  19893. }
  19894. }
  19895. var target = typeof window !== 'undefined'
  19896. ? window
  19897. : typeof global !== 'undefined'
  19898. ? global
  19899. : {};
  19900. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  19901. function devtoolPlugin (store) {
  19902. if (!devtoolHook) { return }
  19903. store._devtoolHook = devtoolHook;
  19904. devtoolHook.emit('vuex:init', store);
  19905. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  19906. store.replaceState(targetState);
  19907. });
  19908. store.subscribe(function (mutation, state) {
  19909. devtoolHook.emit('vuex:mutation', mutation, state);
  19910. }, { prepend: true });
  19911. store.subscribeAction(function (action, state) {
  19912. devtoolHook.emit('vuex:action', action, state);
  19913. }, { prepend: true });
  19914. }
  19915. /**
  19916. * Get the first item that pass the test
  19917. * by second argument function
  19918. *
  19919. * @param {Array} list
  19920. * @param {Function} f
  19921. * @return {*}
  19922. */
  19923. function find (list, f) {
  19924. return list.filter(f)[0]
  19925. }
  19926. /**
  19927. * Deep copy the given object considering circular structure.
  19928. * This function caches all nested objects and its copies.
  19929. * If it detects circular structure, use cached copy to avoid infinite loop.
  19930. *
  19931. * @param {*} obj
  19932. * @param {Array<Object>} cache
  19933. * @return {*}
  19934. */
  19935. function deepCopy (obj, cache) {
  19936. if ( cache === void 0 ) cache = [];
  19937. // just return if obj is immutable value
  19938. if (obj === null || typeof obj !== 'object') {
  19939. return obj
  19940. }
  19941. // if obj is hit, it is in circular structure
  19942. var hit = find(cache, function (c) { return c.original === obj; });
  19943. if (hit) {
  19944. return hit.copy
  19945. }
  19946. var copy = Array.isArray(obj) ? [] : {};
  19947. // put the copy into cache at first
  19948. // because we want to refer it in recursive deepCopy
  19949. cache.push({
  19950. original: obj,
  19951. copy: copy
  19952. });
  19953. Object.keys(obj).forEach(function (key) {
  19954. copy[key] = deepCopy(obj[key], cache);
  19955. });
  19956. return copy
  19957. }
  19958. /**
  19959. * forEach for object
  19960. */
  19961. function forEachValue (obj, fn) {
  19962. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  19963. }
  19964. function isObject (obj) {
  19965. return obj !== null && typeof obj === 'object'
  19966. }
  19967. function isPromise (val) {
  19968. return val && typeof val.then === 'function'
  19969. }
  19970. function assert (condition, msg) {
  19971. if (!condition) { throw new Error(("[vuex] " + msg)) }
  19972. }
  19973. function partial (fn, arg) {
  19974. return function () {
  19975. return fn(arg)
  19976. }
  19977. }
  19978. // Base data struct for store's module, package with some attribute and method
  19979. var Module = function Module (rawModule, runtime) {
  19980. this.runtime = runtime;
  19981. // Store some children item
  19982. this._children = Object.create(null);
  19983. // Store the origin module object which passed by programmer
  19984. this._rawModule = rawModule;
  19985. var rawState = rawModule.state;
  19986. // Store the origin module's state
  19987. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  19988. };
  19989. var prototypeAccessors = { namespaced: { configurable: true } };
  19990. prototypeAccessors.namespaced.get = function () {
  19991. return !!this._rawModule.namespaced
  19992. };
  19993. Module.prototype.addChild = function addChild (key, module) {
  19994. this._children[key] = module;
  19995. };
  19996. Module.prototype.removeChild = function removeChild (key) {
  19997. delete this._children[key];
  19998. };
  19999. Module.prototype.getChild = function getChild (key) {
  20000. return this._children[key]
  20001. };
  20002. Module.prototype.hasChild = function hasChild (key) {
  20003. return key in this._children
  20004. };
  20005. Module.prototype.update = function update (rawModule) {
  20006. this._rawModule.namespaced = rawModule.namespaced;
  20007. if (rawModule.actions) {
  20008. this._rawModule.actions = rawModule.actions;
  20009. }
  20010. if (rawModule.mutations) {
  20011. this._rawModule.mutations = rawModule.mutations;
  20012. }
  20013. if (rawModule.getters) {
  20014. this._rawModule.getters = rawModule.getters;
  20015. }
  20016. };
  20017. Module.prototype.forEachChild = function forEachChild (fn) {
  20018. forEachValue(this._children, fn);
  20019. };
  20020. Module.prototype.forEachGetter = function forEachGetter (fn) {
  20021. if (this._rawModule.getters) {
  20022. forEachValue(this._rawModule.getters, fn);
  20023. }
  20024. };
  20025. Module.prototype.forEachAction = function forEachAction (fn) {
  20026. if (this._rawModule.actions) {
  20027. forEachValue(this._rawModule.actions, fn);
  20028. }
  20029. };
  20030. Module.prototype.forEachMutation = function forEachMutation (fn) {
  20031. if (this._rawModule.mutations) {
  20032. forEachValue(this._rawModule.mutations, fn);
  20033. }
  20034. };
  20035. Object.defineProperties( Module.prototype, prototypeAccessors );
  20036. var ModuleCollection = function ModuleCollection (rawRootModule) {
  20037. // register root module (Vuex.Store options)
  20038. this.register([], rawRootModule, false);
  20039. };
  20040. ModuleCollection.prototype.get = function get (path) {
  20041. return path.reduce(function (module, key) {
  20042. return module.getChild(key)
  20043. }, this.root)
  20044. };
  20045. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  20046. var module = this.root;
  20047. return path.reduce(function (namespace, key) {
  20048. module = module.getChild(key);
  20049. return namespace + (module.namespaced ? key + '/' : '')
  20050. }, '')
  20051. };
  20052. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  20053. update([], this.root, rawRootModule);
  20054. };
  20055. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  20056. var this$1 = this;
  20057. if ( runtime === void 0 ) runtime = true;
  20058. if ((true)) {
  20059. assertRawModule(path, rawModule);
  20060. }
  20061. var newModule = new Module(rawModule, runtime);
  20062. if (path.length === 0) {
  20063. this.root = newModule;
  20064. } else {
  20065. var parent = this.get(path.slice(0, -1));
  20066. parent.addChild(path[path.length - 1], newModule);
  20067. }
  20068. // register nested modules
  20069. if (rawModule.modules) {
  20070. forEachValue(rawModule.modules, function (rawChildModule, key) {
  20071. this$1.register(path.concat(key), rawChildModule, runtime);
  20072. });
  20073. }
  20074. };
  20075. ModuleCollection.prototype.unregister = function unregister (path) {
  20076. var parent = this.get(path.slice(0, -1));
  20077. var key = path[path.length - 1];
  20078. var child = parent.getChild(key);
  20079. if (!child) {
  20080. if ((true)) {
  20081. console.warn(
  20082. "[vuex] trying to unregister module '" + key + "', which is " +
  20083. "not registered"
  20084. );
  20085. }
  20086. return
  20087. }
  20088. if (!child.runtime) {
  20089. return
  20090. }
  20091. parent.removeChild(key);
  20092. };
  20093. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  20094. var parent = this.get(path.slice(0, -1));
  20095. var key = path[path.length - 1];
  20096. if (parent) {
  20097. return parent.hasChild(key)
  20098. }
  20099. return false
  20100. };
  20101. function update (path, targetModule, newModule) {
  20102. if ((true)) {
  20103. assertRawModule(path, newModule);
  20104. }
  20105. // update target module
  20106. targetModule.update(newModule);
  20107. // update nested modules
  20108. if (newModule.modules) {
  20109. for (var key in newModule.modules) {
  20110. if (!targetModule.getChild(key)) {
  20111. if ((true)) {
  20112. console.warn(
  20113. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  20114. 'manual reload is needed'
  20115. );
  20116. }
  20117. return
  20118. }
  20119. update(
  20120. path.concat(key),
  20121. targetModule.getChild(key),
  20122. newModule.modules[key]
  20123. );
  20124. }
  20125. }
  20126. }
  20127. var functionAssert = {
  20128. assert: function (value) { return typeof value === 'function'; },
  20129. expected: 'function'
  20130. };
  20131. var objectAssert = {
  20132. assert: function (value) { return typeof value === 'function' ||
  20133. (typeof value === 'object' && typeof value.handler === 'function'); },
  20134. expected: 'function or object with "handler" function'
  20135. };
  20136. var assertTypes = {
  20137. getters: functionAssert,
  20138. mutations: functionAssert,
  20139. actions: objectAssert
  20140. };
  20141. function assertRawModule (path, rawModule) {
  20142. Object.keys(assertTypes).forEach(function (key) {
  20143. if (!rawModule[key]) { return }
  20144. var assertOptions = assertTypes[key];
  20145. forEachValue(rawModule[key], function (value, type) {
  20146. assert(
  20147. assertOptions.assert(value),
  20148. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  20149. );
  20150. });
  20151. });
  20152. }
  20153. function makeAssertionMessage (path, key, type, value, expected) {
  20154. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  20155. if (path.length > 0) {
  20156. buf += " in module \"" + (path.join('.')) + "\"";
  20157. }
  20158. buf += " is " + (JSON.stringify(value)) + ".";
  20159. return buf
  20160. }
  20161. var Vue; // bind on install
  20162. var Store = function Store (options) {
  20163. var this$1 = this;
  20164. if ( options === void 0 ) options = {};
  20165. // Auto install if it is not done yet and `window` has `Vue`.
  20166. // To allow users to avoid auto-installation in some cases,
  20167. // this code should be placed here. See #731
  20168. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  20169. install(window.Vue);
  20170. }
  20171. if ((true)) {
  20172. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  20173. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  20174. assert(this instanceof Store, "store must be called with the new operator.");
  20175. }
  20176. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  20177. var strict = options.strict; if ( strict === void 0 ) strict = false;
  20178. // store internal state
  20179. this._committing = false;
  20180. this._actions = Object.create(null);
  20181. this._actionSubscribers = [];
  20182. this._mutations = Object.create(null);
  20183. this._wrappedGetters = Object.create(null);
  20184. this._modules = new ModuleCollection(options);
  20185. this._modulesNamespaceMap = Object.create(null);
  20186. this._subscribers = [];
  20187. this._watcherVM = new Vue();
  20188. this._makeLocalGettersCache = Object.create(null);
  20189. // bind commit and dispatch to self
  20190. var store = this;
  20191. var ref = this;
  20192. var dispatch = ref.dispatch;
  20193. var commit = ref.commit;
  20194. this.dispatch = function boundDispatch (type, payload) {
  20195. return dispatch.call(store, type, payload)
  20196. };
  20197. this.commit = function boundCommit (type, payload, options) {
  20198. return commit.call(store, type, payload, options)
  20199. };
  20200. // strict mode
  20201. this.strict = strict;
  20202. var state = this._modules.root.state;
  20203. // init root module.
  20204. // this also recursively registers all sub-modules
  20205. // and collects all module getters inside this._wrappedGetters
  20206. installModule(this, state, [], this._modules.root);
  20207. // initialize the store vm, which is responsible for the reactivity
  20208. // (also registers _wrappedGetters as computed properties)
  20209. resetStoreVM(this, state);
  20210. // apply plugins
  20211. plugins.forEach(function (plugin) { return plugin(this$1); });
  20212. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  20213. if (useDevtools) {
  20214. devtoolPlugin(this);
  20215. }
  20216. };
  20217. var prototypeAccessors$1 = { state: { configurable: true } };
  20218. prototypeAccessors$1.state.get = function () {
  20219. return this._vm._data.$$state
  20220. };
  20221. prototypeAccessors$1.state.set = function (v) {
  20222. if ((true)) {
  20223. assert(false, "use store.replaceState() to explicit replace store state.");
  20224. }
  20225. };
  20226. Store.prototype.commit = function commit (_type, _payload, _options) {
  20227. var this$1 = this;
  20228. // check object-style commit
  20229. var ref = unifyObjectStyle(_type, _payload, _options);
  20230. var type = ref.type;
  20231. var payload = ref.payload;
  20232. var options = ref.options;
  20233. var mutation = { type: type, payload: payload };
  20234. var entry = this._mutations[type];
  20235. if (!entry) {
  20236. if ((true)) {
  20237. console.error(("[vuex] unknown mutation type: " + type));
  20238. }
  20239. return
  20240. }
  20241. this._withCommit(function () {
  20242. entry.forEach(function commitIterator (handler) {
  20243. handler(payload);
  20244. });
  20245. });
  20246. this._subscribers
  20247. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  20248. .forEach(function (sub) { return sub(mutation, this$1.state); });
  20249. if (
  20250. ( true) &&
  20251. options && options.silent
  20252. ) {
  20253. console.warn(
  20254. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  20255. 'Use the filter functionality in the vue-devtools'
  20256. );
  20257. }
  20258. };
  20259. Store.prototype.dispatch = function dispatch (_type, _payload) {
  20260. var this$1 = this;
  20261. // check object-style dispatch
  20262. var ref = unifyObjectStyle(_type, _payload);
  20263. var type = ref.type;
  20264. var payload = ref.payload;
  20265. var action = { type: type, payload: payload };
  20266. var entry = this._actions[type];
  20267. if (!entry) {
  20268. if ((true)) {
  20269. console.error(("[vuex] unknown action type: " + type));
  20270. }
  20271. return
  20272. }
  20273. try {
  20274. this._actionSubscribers
  20275. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  20276. .filter(function (sub) { return sub.before; })
  20277. .forEach(function (sub) { return sub.before(action, this$1.state); });
  20278. } catch (e) {
  20279. if ((true)) {
  20280. console.warn("[vuex] error in before action subscribers: ");
  20281. console.error(e);
  20282. }
  20283. }
  20284. var result = entry.length > 1
  20285. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  20286. : entry[0](payload);
  20287. return new Promise(function (resolve, reject) {
  20288. result.then(function (res) {
  20289. try {
  20290. this$1._actionSubscribers
  20291. .filter(function (sub) { return sub.after; })
  20292. .forEach(function (sub) { return sub.after(action, this$1.state); });
  20293. } catch (e) {
  20294. if ((true)) {
  20295. console.warn("[vuex] error in after action subscribers: ");
  20296. console.error(e);
  20297. }
  20298. }
  20299. resolve(res);
  20300. }, function (error) {
  20301. try {
  20302. this$1._actionSubscribers
  20303. .filter(function (sub) { return sub.error; })
  20304. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  20305. } catch (e) {
  20306. if ((true)) {
  20307. console.warn("[vuex] error in error action subscribers: ");
  20308. console.error(e);
  20309. }
  20310. }
  20311. reject(error);
  20312. });
  20313. })
  20314. };
  20315. Store.prototype.subscribe = function subscribe (fn, options) {
  20316. return genericSubscribe(fn, this._subscribers, options)
  20317. };
  20318. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  20319. var subs = typeof fn === 'function' ? { before: fn } : fn;
  20320. return genericSubscribe(subs, this._actionSubscribers, options)
  20321. };
  20322. Store.prototype.watch = function watch (getter, cb, options) {
  20323. var this$1 = this;
  20324. if ((true)) {
  20325. assert(typeof getter === 'function', "store.watch only accepts a function.");
  20326. }
  20327. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  20328. };
  20329. Store.prototype.replaceState = function replaceState (state) {
  20330. var this$1 = this;
  20331. this._withCommit(function () {
  20332. this$1._vm._data.$$state = state;
  20333. });
  20334. };
  20335. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  20336. if ( options === void 0 ) options = {};
  20337. if (typeof path === 'string') { path = [path]; }
  20338. if ((true)) {
  20339. assert(Array.isArray(path), "module path must be a string or an Array.");
  20340. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  20341. }
  20342. this._modules.register(path, rawModule);
  20343. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  20344. // reset store to update getters...
  20345. resetStoreVM(this, this.state);
  20346. };
  20347. Store.prototype.unregisterModule = function unregisterModule (path) {
  20348. var this$1 = this;
  20349. if (typeof path === 'string') { path = [path]; }
  20350. if ((true)) {
  20351. assert(Array.isArray(path), "module path must be a string or an Array.");
  20352. }
  20353. this._modules.unregister(path);
  20354. this._withCommit(function () {
  20355. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  20356. Vue.delete(parentState, path[path.length - 1]);
  20357. });
  20358. resetStore(this);
  20359. };
  20360. Store.prototype.hasModule = function hasModule (path) {
  20361. if (typeof path === 'string') { path = [path]; }
  20362. if ((true)) {
  20363. assert(Array.isArray(path), "module path must be a string or an Array.");
  20364. }
  20365. return this._modules.isRegistered(path)
  20366. };
  20367. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  20368. this._modules.update(newOptions);
  20369. resetStore(this, true);
  20370. };
  20371. Store.prototype._withCommit = function _withCommit (fn) {
  20372. var committing = this._committing;
  20373. this._committing = true;
  20374. fn();
  20375. this._committing = committing;
  20376. };
  20377. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  20378. function genericSubscribe (fn, subs, options) {
  20379. if (subs.indexOf(fn) < 0) {
  20380. options && options.prepend
  20381. ? subs.unshift(fn)
  20382. : subs.push(fn);
  20383. }
  20384. return function () {
  20385. var i = subs.indexOf(fn);
  20386. if (i > -1) {
  20387. subs.splice(i, 1);
  20388. }
  20389. }
  20390. }
  20391. function resetStore (store, hot) {
  20392. store._actions = Object.create(null);
  20393. store._mutations = Object.create(null);
  20394. store._wrappedGetters = Object.create(null);
  20395. store._modulesNamespaceMap = Object.create(null);
  20396. var state = store.state;
  20397. // init all modules
  20398. installModule(store, state, [], store._modules.root, true);
  20399. // reset vm
  20400. resetStoreVM(store, state, hot);
  20401. }
  20402. function resetStoreVM (store, state, hot) {
  20403. var oldVm = store._vm;
  20404. // bind store public getters
  20405. store.getters = {};
  20406. // reset local getters cache
  20407. store._makeLocalGettersCache = Object.create(null);
  20408. var wrappedGetters = store._wrappedGetters;
  20409. var computed = {};
  20410. forEachValue(wrappedGetters, function (fn, key) {
  20411. // use computed to leverage its lazy-caching mechanism
  20412. // direct inline function use will lead to closure preserving oldVm.
  20413. // using partial to return function with only arguments preserved in closure environment.
  20414. computed[key] = partial(fn, store);
  20415. Object.defineProperty(store.getters, key, {
  20416. get: function () { return store._vm[key]; },
  20417. enumerable: true // for local getters
  20418. });
  20419. });
  20420. // use a Vue instance to store the state tree
  20421. // suppress warnings just in case the user has added
  20422. // some funky global mixins
  20423. var silent = Vue.config.silent;
  20424. Vue.config.silent = true;
  20425. store._vm = new Vue({
  20426. data: {
  20427. $$state: state
  20428. },
  20429. computed: computed
  20430. });
  20431. Vue.config.silent = silent;
  20432. // enable strict mode for new vm
  20433. if (store.strict) {
  20434. enableStrictMode(store);
  20435. }
  20436. if (oldVm) {
  20437. if (hot) {
  20438. // dispatch changes in all subscribed watchers
  20439. // to force getter re-evaluation for hot reloading.
  20440. store._withCommit(function () {
  20441. oldVm._data.$$state = null;
  20442. });
  20443. }
  20444. Vue.nextTick(function () { return oldVm.$destroy(); });
  20445. }
  20446. }
  20447. function installModule (store, rootState, path, module, hot) {
  20448. var isRoot = !path.length;
  20449. var namespace = store._modules.getNamespace(path);
  20450. // register in namespace map
  20451. if (module.namespaced) {
  20452. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  20453. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  20454. }
  20455. store._modulesNamespaceMap[namespace] = module;
  20456. }
  20457. // set state
  20458. if (!isRoot && !hot) {
  20459. var parentState = getNestedState(rootState, path.slice(0, -1));
  20460. var moduleName = path[path.length - 1];
  20461. store._withCommit(function () {
  20462. if ((true)) {
  20463. if (moduleName in parentState) {
  20464. console.warn(
  20465. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  20466. );
  20467. }
  20468. }
  20469. Vue.set(parentState, moduleName, module.state);
  20470. });
  20471. }
  20472. var local = module.context = makeLocalContext(store, namespace, path);
  20473. module.forEachMutation(function (mutation, key) {
  20474. var namespacedType = namespace + key;
  20475. registerMutation(store, namespacedType, mutation, local);
  20476. });
  20477. module.forEachAction(function (action, key) {
  20478. var type = action.root ? key : namespace + key;
  20479. var handler = action.handler || action;
  20480. registerAction(store, type, handler, local);
  20481. });
  20482. module.forEachGetter(function (getter, key) {
  20483. var namespacedType = namespace + key;
  20484. registerGetter(store, namespacedType, getter, local);
  20485. });
  20486. module.forEachChild(function (child, key) {
  20487. installModule(store, rootState, path.concat(key), child, hot);
  20488. });
  20489. }
  20490. /**
  20491. * make localized dispatch, commit, getters and state
  20492. * if there is no namespace, just use root ones
  20493. */
  20494. function makeLocalContext (store, namespace, path) {
  20495. var noNamespace = namespace === '';
  20496. var local = {
  20497. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  20498. var args = unifyObjectStyle(_type, _payload, _options);
  20499. var payload = args.payload;
  20500. var options = args.options;
  20501. var type = args.type;
  20502. if (!options || !options.root) {
  20503. type = namespace + type;
  20504. if (( true) && !store._actions[type]) {
  20505. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  20506. return
  20507. }
  20508. }
  20509. return store.dispatch(type, payload)
  20510. },
  20511. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  20512. var args = unifyObjectStyle(_type, _payload, _options);
  20513. var payload = args.payload;
  20514. var options = args.options;
  20515. var type = args.type;
  20516. if (!options || !options.root) {
  20517. type = namespace + type;
  20518. if (( true) && !store._mutations[type]) {
  20519. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  20520. return
  20521. }
  20522. }
  20523. store.commit(type, payload, options);
  20524. }
  20525. };
  20526. // getters and state object must be gotten lazily
  20527. // because they will be changed by vm update
  20528. Object.defineProperties(local, {
  20529. getters: {
  20530. get: noNamespace
  20531. ? function () { return store.getters; }
  20532. : function () { return makeLocalGetters(store, namespace); }
  20533. },
  20534. state: {
  20535. get: function () { return getNestedState(store.state, path); }
  20536. }
  20537. });
  20538. return local
  20539. }
  20540. function makeLocalGetters (store, namespace) {
  20541. if (!store._makeLocalGettersCache[namespace]) {
  20542. var gettersProxy = {};
  20543. var splitPos = namespace.length;
  20544. Object.keys(store.getters).forEach(function (type) {
  20545. // skip if the target getter is not match this namespace
  20546. if (type.slice(0, splitPos) !== namespace) { return }
  20547. // extract local getter type
  20548. var localType = type.slice(splitPos);
  20549. // Add a port to the getters proxy.
  20550. // Define as getter property because
  20551. // we do not want to evaluate the getters in this time.
  20552. Object.defineProperty(gettersProxy, localType, {
  20553. get: function () { return store.getters[type]; },
  20554. enumerable: true
  20555. });
  20556. });
  20557. store._makeLocalGettersCache[namespace] = gettersProxy;
  20558. }
  20559. return store._makeLocalGettersCache[namespace]
  20560. }
  20561. function registerMutation (store, type, handler, local) {
  20562. var entry = store._mutations[type] || (store._mutations[type] = []);
  20563. entry.push(function wrappedMutationHandler (payload) {
  20564. handler.call(store, local.state, payload);
  20565. });
  20566. }
  20567. function registerAction (store, type, handler, local) {
  20568. var entry = store._actions[type] || (store._actions[type] = []);
  20569. entry.push(function wrappedActionHandler (payload) {
  20570. var res = handler.call(store, {
  20571. dispatch: local.dispatch,
  20572. commit: local.commit,
  20573. getters: local.getters,
  20574. state: local.state,
  20575. rootGetters: store.getters,
  20576. rootState: store.state
  20577. }, payload);
  20578. if (!isPromise(res)) {
  20579. res = Promise.resolve(res);
  20580. }
  20581. if (store._devtoolHook) {
  20582. return res.catch(function (err) {
  20583. store._devtoolHook.emit('vuex:error', err);
  20584. throw err
  20585. })
  20586. } else {
  20587. return res
  20588. }
  20589. });
  20590. }
  20591. function registerGetter (store, type, rawGetter, local) {
  20592. if (store._wrappedGetters[type]) {
  20593. if ((true)) {
  20594. console.error(("[vuex] duplicate getter key: " + type));
  20595. }
  20596. return
  20597. }
  20598. store._wrappedGetters[type] = function wrappedGetter (store) {
  20599. return rawGetter(
  20600. local.state, // local state
  20601. local.getters, // local getters
  20602. store.state, // root state
  20603. store.getters // root getters
  20604. )
  20605. };
  20606. }
  20607. function enableStrictMode (store) {
  20608. store._vm.$watch(function () { return this._data.$$state }, function () {
  20609. if ((true)) {
  20610. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  20611. }
  20612. }, { deep: true, sync: true });
  20613. }
  20614. function getNestedState (state, path) {
  20615. return path.reduce(function (state, key) { return state[key]; }, state)
  20616. }
  20617. function unifyObjectStyle (type, payload, options) {
  20618. if (isObject(type) && type.type) {
  20619. options = payload;
  20620. payload = type;
  20621. type = type.type;
  20622. }
  20623. if ((true)) {
  20624. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  20625. }
  20626. return { type: type, payload: payload, options: options }
  20627. }
  20628. function install (_Vue) {
  20629. if (Vue && _Vue === Vue) {
  20630. if ((true)) {
  20631. console.error(
  20632. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  20633. );
  20634. }
  20635. return
  20636. }
  20637. Vue = _Vue;
  20638. applyMixin(Vue);
  20639. }
  20640. /**
  20641. * Reduce the code which written in Vue.js for getting the state.
  20642. * @param {String} [namespace] - Module's namespace
  20643. * @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.
  20644. * @param {Object}
  20645. */
  20646. var mapState = normalizeNamespace(function (namespace, states) {
  20647. var res = {};
  20648. if (( true) && !isValidMap(states)) {
  20649. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  20650. }
  20651. normalizeMap(states).forEach(function (ref) {
  20652. var key = ref.key;
  20653. var val = ref.val;
  20654. res[key] = function mappedState () {
  20655. var state = this.$store.state;
  20656. var getters = this.$store.getters;
  20657. if (namespace) {
  20658. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  20659. if (!module) {
  20660. return
  20661. }
  20662. state = module.context.state;
  20663. getters = module.context.getters;
  20664. }
  20665. return typeof val === 'function'
  20666. ? val.call(this, state, getters)
  20667. : state[val]
  20668. };
  20669. // mark vuex getter for devtools
  20670. res[key].vuex = true;
  20671. });
  20672. return res
  20673. });
  20674. /**
  20675. * Reduce the code which written in Vue.js for committing the mutation
  20676. * @param {String} [namespace] - Module's namespace
  20677. * @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.
  20678. * @return {Object}
  20679. */
  20680. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  20681. var res = {};
  20682. if (( true) && !isValidMap(mutations)) {
  20683. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  20684. }
  20685. normalizeMap(mutations).forEach(function (ref) {
  20686. var key = ref.key;
  20687. var val = ref.val;
  20688. res[key] = function mappedMutation () {
  20689. var args = [], len = arguments.length;
  20690. while ( len-- ) args[ len ] = arguments[ len ];
  20691. // Get the commit method from store
  20692. var commit = this.$store.commit;
  20693. if (namespace) {
  20694. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  20695. if (!module) {
  20696. return
  20697. }
  20698. commit = module.context.commit;
  20699. }
  20700. return typeof val === 'function'
  20701. ? val.apply(this, [commit].concat(args))
  20702. : commit.apply(this.$store, [val].concat(args))
  20703. };
  20704. });
  20705. return res
  20706. });
  20707. /**
  20708. * Reduce the code which written in Vue.js for getting the getters
  20709. * @param {String} [namespace] - Module's namespace
  20710. * @param {Object|Array} getters
  20711. * @return {Object}
  20712. */
  20713. var mapGetters = normalizeNamespace(function (namespace, getters) {
  20714. var res = {};
  20715. if (( true) && !isValidMap(getters)) {
  20716. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  20717. }
  20718. normalizeMap(getters).forEach(function (ref) {
  20719. var key = ref.key;
  20720. var val = ref.val;
  20721. // The namespace has been mutated by normalizeNamespace
  20722. val = namespace + val;
  20723. res[key] = function mappedGetter () {
  20724. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  20725. return
  20726. }
  20727. if (( true) && !(val in this.$store.getters)) {
  20728. console.error(("[vuex] unknown getter: " + val));
  20729. return
  20730. }
  20731. return this.$store.getters[val]
  20732. };
  20733. // mark vuex getter for devtools
  20734. res[key].vuex = true;
  20735. });
  20736. return res
  20737. });
  20738. /**
  20739. * Reduce the code which written in Vue.js for dispatch the action
  20740. * @param {String} [namespace] - Module's namespace
  20741. * @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.
  20742. * @return {Object}
  20743. */
  20744. var mapActions = normalizeNamespace(function (namespace, actions) {
  20745. var res = {};
  20746. if (( true) && !isValidMap(actions)) {
  20747. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  20748. }
  20749. normalizeMap(actions).forEach(function (ref) {
  20750. var key = ref.key;
  20751. var val = ref.val;
  20752. res[key] = function mappedAction () {
  20753. var args = [], len = arguments.length;
  20754. while ( len-- ) args[ len ] = arguments[ len ];
  20755. // get dispatch function from store
  20756. var dispatch = this.$store.dispatch;
  20757. if (namespace) {
  20758. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  20759. if (!module) {
  20760. return
  20761. }
  20762. dispatch = module.context.dispatch;
  20763. }
  20764. return typeof val === 'function'
  20765. ? val.apply(this, [dispatch].concat(args))
  20766. : dispatch.apply(this.$store, [val].concat(args))
  20767. };
  20768. });
  20769. return res
  20770. });
  20771. /**
  20772. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  20773. * @param {String} namespace
  20774. * @return {Object}
  20775. */
  20776. var createNamespacedHelpers = function (namespace) { return ({
  20777. mapState: mapState.bind(null, namespace),
  20778. mapGetters: mapGetters.bind(null, namespace),
  20779. mapMutations: mapMutations.bind(null, namespace),
  20780. mapActions: mapActions.bind(null, namespace)
  20781. }); };
  20782. /**
  20783. * Normalize the map
  20784. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  20785. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  20786. * @param {Array|Object} map
  20787. * @return {Object}
  20788. */
  20789. function normalizeMap (map) {
  20790. if (!isValidMap(map)) {
  20791. return []
  20792. }
  20793. return Array.isArray(map)
  20794. ? map.map(function (key) { return ({ key: key, val: key }); })
  20795. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  20796. }
  20797. /**
  20798. * Validate whether given map is valid or not
  20799. * @param {*} map
  20800. * @return {Boolean}
  20801. */
  20802. function isValidMap (map) {
  20803. return Array.isArray(map) || isObject(map)
  20804. }
  20805. /**
  20806. * 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.
  20807. * @param {Function} fn
  20808. * @return {Function}
  20809. */
  20810. function normalizeNamespace (fn) {
  20811. return function (namespace, map) {
  20812. if (typeof namespace !== 'string') {
  20813. map = namespace;
  20814. namespace = '';
  20815. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  20816. namespace += '/';
  20817. }
  20818. return fn(namespace, map)
  20819. }
  20820. }
  20821. /**
  20822. * Search a special module from store by namespace. if module not exist, print error message.
  20823. * @param {Object} store
  20824. * @param {String} helper
  20825. * @param {String} namespace
  20826. * @return {Object}
  20827. */
  20828. function getModuleByNamespace (store, helper, namespace) {
  20829. var module = store._modulesNamespaceMap[namespace];
  20830. if (( true) && !module) {
  20831. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  20832. }
  20833. return module
  20834. }
  20835. // Credits: borrowed code from fcomb/redux-logger
  20836. function createLogger (ref) {
  20837. if ( ref === void 0 ) ref = {};
  20838. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  20839. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  20840. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  20841. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  20842. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  20843. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  20844. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  20845. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  20846. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  20847. return function (store) {
  20848. var prevState = deepCopy(store.state);
  20849. if (typeof logger === 'undefined') {
  20850. return
  20851. }
  20852. if (logMutations) {
  20853. store.subscribe(function (mutation, state) {
  20854. var nextState = deepCopy(state);
  20855. if (filter(mutation, prevState, nextState)) {
  20856. var formattedTime = getFormattedTime();
  20857. var formattedMutation = mutationTransformer(mutation);
  20858. var message = "mutation " + (mutation.type) + formattedTime;
  20859. startMessage(logger, message, collapsed);
  20860. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  20861. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  20862. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  20863. endMessage(logger);
  20864. }
  20865. prevState = nextState;
  20866. });
  20867. }
  20868. if (logActions) {
  20869. store.subscribeAction(function (action, state) {
  20870. if (actionFilter(action, state)) {
  20871. var formattedTime = getFormattedTime();
  20872. var formattedAction = actionTransformer(action);
  20873. var message = "action " + (action.type) + formattedTime;
  20874. startMessage(logger, message, collapsed);
  20875. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  20876. endMessage(logger);
  20877. }
  20878. });
  20879. }
  20880. }
  20881. }
  20882. function startMessage (logger, message, collapsed) {
  20883. var startMessage = collapsed
  20884. ? logger.groupCollapsed
  20885. : logger.group;
  20886. // render
  20887. try {
  20888. startMessage.call(logger, message);
  20889. } catch (e) {
  20890. logger.log(message);
  20891. }
  20892. }
  20893. function endMessage (logger) {
  20894. try {
  20895. logger.groupEnd();
  20896. } catch (e) {
  20897. logger.log('—— log end ——');
  20898. }
  20899. }
  20900. function getFormattedTime () {
  20901. var time = new Date();
  20902. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  20903. }
  20904. function repeat (str, times) {
  20905. return (new Array(times + 1)).join(str)
  20906. }
  20907. function pad (num, maxLength) {
  20908. return repeat('0', maxLength - num.toString().length) + num
  20909. }
  20910. var index_cjs = {
  20911. Store: Store,
  20912. install: install,
  20913. version: '3.6.2',
  20914. mapState: mapState,
  20915. mapMutations: mapMutations,
  20916. mapGetters: mapGetters,
  20917. mapActions: mapActions,
  20918. createNamespacedHelpers: createNamespacedHelpers,
  20919. createLogger: createLogger
  20920. };
  20921. module.exports = index_cjs;
  20922. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  20923. /***/ }),
  20924. /* 167 */
  20925. /*!***************************************************************************************!*\
  20926. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/store/modules/user.js ***!
  20927. \***************************************************************************************/
  20928. /*! no static exports found */
  20929. /***/ (function(module, exports, __webpack_require__) {
  20930. "use strict";
  20931. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20932. Object.defineProperty(exports, "__esModule", {
  20933. value: true
  20934. });
  20935. exports.default = void 0;
  20936. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 56));
  20937. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 58));
  20938. var _index = __webpack_require__(/*! @/api/index */ 168);
  20939. var _auth = __webpack_require__(/*! @/utils/auth.js */ 164);
  20940. var user = {
  20941. state: {
  20942. // 用户认证token
  20943. token: (0, _auth.getToken)(),
  20944. // 用户ID
  20945. userId: null,
  20946. // 用户信息
  20947. userInfo: {},
  20948. // 测试信息
  20949. testText: ''
  20950. },
  20951. mutations: {
  20952. SET_TOKEN: function SET_TOKEN(state, token) {
  20953. state.token = token;
  20954. },
  20955. SET_USER_ID: function SET_USER_ID(state, userId) {
  20956. state.userId = userId;
  20957. },
  20958. SET_USERINFO: function SET_USERINFO(state, userInfo) {
  20959. state.userInfo = userInfo;
  20960. },
  20961. SET_TEST_TEXT: function SET_TEST_TEXT(state, testText) {
  20962. state.testText = testText;
  20963. }
  20964. },
  20965. actions: {
  20966. // 用户登录
  20967. Login: function Login(_ref, userInfo) {
  20968. var commit = _ref.commit;
  20969. return new Promise( /*#__PURE__*/function () {
  20970. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(resolve, reject) {
  20971. var res;
  20972. return _regenerator.default.wrap(function _callee$(_context) {
  20973. while (1) {
  20974. switch (_context.prev = _context.next) {
  20975. case 0:
  20976. _context.next = 2;
  20977. return _index.api.Login(userInfo);
  20978. case 2:
  20979. res = _context.sent;
  20980. (0, _auth.setToken)(res.data.token);
  20981. commit('SET_TOKEN', res.data.token);
  20982. resolve(res);
  20983. case 6:
  20984. case "end":
  20985. return _context.stop();
  20986. }
  20987. }
  20988. }, _callee);
  20989. }));
  20990. return function (_x, _x2) {
  20991. return _ref2.apply(this, arguments);
  20992. };
  20993. }());
  20994. },
  20995. // 获取用户信息
  20996. UserInfo: function UserInfo(_ref3) {
  20997. var commit = _ref3.commit;
  20998. return new Promise( /*#__PURE__*/function () {
  20999. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) {
  21000. var res;
  21001. return _regenerator.default.wrap(function _callee2$(_context2) {
  21002. while (1) {
  21003. switch (_context2.prev = _context2.next) {
  21004. case 0:
  21005. _context2.prev = 0;
  21006. _context2.next = 3;
  21007. return getUserInfo();
  21008. case 3:
  21009. res = _context2.sent;
  21010. setUserId(res.data.userId);
  21011. commit('SET_USER_ID', res.data.userId);
  21012. commit('SET_USERINFO', res.data);
  21013. resolve(res);
  21014. _context2.next = 13;
  21015. break;
  21016. case 10:
  21017. _context2.prev = 10;
  21018. _context2.t0 = _context2["catch"](0);
  21019. reject(_context2.t0);
  21020. case 13:
  21021. case "end":
  21022. return _context2.stop();
  21023. }
  21024. }
  21025. }, _callee2, null, [[0, 10]]);
  21026. }));
  21027. return function (_x3, _x4) {
  21028. return _ref4.apply(this, arguments);
  21029. };
  21030. }());
  21031. },
  21032. // 退出登录
  21033. Logout: function Logout(_ref5) {
  21034. var commit = _ref5.commit;
  21035. return new Promise(function (resolve, reject) {
  21036. (0, _auth.removeToken)();
  21037. removeUserId();
  21038. commit('SET_TOKEN', null);
  21039. commit('SET_USER_ID', null);
  21040. resolve();
  21041. });
  21042. }
  21043. }
  21044. };
  21045. var _default = user;
  21046. exports.default = _default;
  21047. /***/ }),
  21048. /* 168 */
  21049. /*!******************************************************************************!*\
  21050. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/api/index.js ***!
  21051. \******************************************************************************/
  21052. /*! no static exports found */
  21053. /***/ (function(module, exports, __webpack_require__) {
  21054. "use strict";
  21055. /* WEBPACK VAR INJECTION */(function(uni) {
  21056. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21057. Object.defineProperty(exports, "__esModule", {
  21058. value: true
  21059. });
  21060. exports.default = void 0;
  21061. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 56));
  21062. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  21063. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 58));
  21064. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  21065. var _store = _interopRequireDefault(__webpack_require__(/*! @/store */ 165));
  21066. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  21067. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  21068. // 基础
  21069. // 根据体验版本和线上版本区分接口地址
  21070. var baseUrl = __wxConfig.envVersion !== "release" ? "" : "";
  21071. var apiArray = {
  21072. // 登录
  21073. Login: {
  21074. url: baseUrl + "/api/User/Login",
  21075. config: {}
  21076. }
  21077. };
  21078. var api = {};
  21079. Object.keys(apiArray).forEach(function (item) {
  21080. api[item] = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  21081. var config,
  21082. deep,
  21083. _args3 = arguments;
  21084. return _regenerator.default.wrap(function _callee3$(_context3) {
  21085. while (1) {
  21086. switch (_context3.prev = _context3.next) {
  21087. case 0:
  21088. config = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
  21089. deep = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : false;
  21090. return _context3.abrupt("return", new Promise( /*#__PURE__*/function () {
  21091. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(res, rej) {
  21092. var temp, apiconfig, header, url;
  21093. return _regenerator.default.wrap(function _callee2$(_context2) {
  21094. while (1) {
  21095. switch (_context2.prev = _context2.next) {
  21096. case 0:
  21097. temp = apiArray[item];
  21098. apiconfig = temp.config;
  21099. header = config.header ? config.header : apiconfig.header ? apiconfig.header : {
  21100. "content-type": "application/json;charset:utf-8"
  21101. }; // 鉴权-登录检测
  21102. if (!(temp.auth === false)) {
  21103. // 如果没有用户信息则跳转至登录页
  21104. // Replace
  21105. // if (!store.state.agentId) {
  21106. // setTimeout(() => {
  21107. // uni.showToast({
  21108. // title: '请先登录',
  21109. // icon: 'none',
  21110. // duration: 4000,
  21111. // })
  21112. // }, 500)
  21113. // uni.reLaunch({
  21114. // url: '/pages/login/login',
  21115. // })
  21116. // return
  21117. // }
  21118. // 统一注入token
  21119. }
  21120. url = config.url ? config.url : temp.url;
  21121. if (config.query) {
  21122. url += _vue.default.prototype.$u.queryParams(config.query);
  21123. }
  21124. uni.request({
  21125. url: url,
  21126. data: config.data ? config.data : {},
  21127. method: config.method ? config.method : apiconfig.method ? apiconfig.method : "POST",
  21128. timeout: config.timeout ? config.timeout : apiconfig.timeout ? apiconfig.timeout : 60000,
  21129. header: header,
  21130. dataType: config.dataType ? config.dataType : apiconfig.dataType ? apiconfig.dataType : "json",
  21131. responseType: config.responseType ? config.responseType : apiconfig.responseType ? apiconfig.responseType : "text",
  21132. sslVerify: config.sslVerify === false ? false : apiconfig.sslVerify === false ? false : true,
  21133. withCredentials: config.withCredentials === false ? false : apiconfig.withCredentials === true ? true : false,
  21134. firstIpv4: config.firstIpv4 === false ? false : apiconfig.firstIpv4 === false ? false : true,
  21135. success: function success(data) {
  21136. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  21137. var re, str;
  21138. return _regenerator.default.wrap(function _callee$(_context) {
  21139. while (1) {
  21140. switch (_context.prev = _context.next) {
  21141. case 0:
  21142. // console.log(config.url?config.url:temp.url);
  21143. if (data.statusCode === 200) {
  21144. console.log("请求数据", _objectSpread({}, config));
  21145. console.log("响应数据", _objectSpread({}, data));
  21146. re = data.data;
  21147. if (re.code === 200 || re.stateCode === 0 || re.code === 106 || apiconfig.err === false) {
  21148. res(re);
  21149. } else {
  21150. setTimeout(function () {
  21151. uni.showToast({
  21152. icon: "none",
  21153. title: re.msg || re.message,
  21154. duration: 3000
  21155. });
  21156. }, 500);
  21157. res(false);
  21158. }
  21159. } else {
  21160. str = "".concat(data.statusCode, ":").concat(data.data.msg);
  21161. setTimeout(function () {
  21162. uni.showToast({
  21163. icon: "none",
  21164. title: str,
  21165. duration: 3000
  21166. });
  21167. }, 500);
  21168. res(false);
  21169. }
  21170. case 1:
  21171. case "end":
  21172. return _context.stop();
  21173. }
  21174. }
  21175. }, _callee);
  21176. }))();
  21177. },
  21178. fail: function fail(err) {
  21179. console.log(err);
  21180. var str = "网络错误:" + (err.statusCode ? err.statusCode : err.errMsg);
  21181. if (err.errMsg == "request:fail timeout") {
  21182. str = "网络异常,请检查网络";
  21183. }
  21184. setTimeout(function () {
  21185. uni.showToast({
  21186. icon: "none",
  21187. title: str,
  21188. duration: 3000
  21189. });
  21190. }, 500);
  21191. res(false);
  21192. }
  21193. });
  21194. case 7:
  21195. case "end":
  21196. return _context2.stop();
  21197. }
  21198. }
  21199. }, _callee2);
  21200. }));
  21201. return function (_x, _x2) {
  21202. return _ref2.apply(this, arguments);
  21203. };
  21204. }()));
  21205. case 3:
  21206. case "end":
  21207. return _context3.stop();
  21208. }
  21209. }
  21210. }, _callee3);
  21211. }));
  21212. });
  21213. var _default = {
  21214. api: api,
  21215. baseUrl: baseUrl
  21216. };
  21217. exports.default = _default;
  21218. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21219. /***/ }),
  21220. /* 169 */
  21221. /*!**********************************************************************************!*\
  21222. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/store/getters.js ***!
  21223. \**********************************************************************************/
  21224. /*! no static exports found */
  21225. /***/ (function(module, exports, __webpack_require__) {
  21226. "use strict";
  21227. Object.defineProperty(exports, "__esModule", {
  21228. value: true
  21229. });
  21230. exports.default = void 0;
  21231. var getters = {
  21232. token: function token(state) {
  21233. return state.user.token;
  21234. },
  21235. userId: function userId(state) {
  21236. return state.user.userId;
  21237. },
  21238. userInfo: function userInfo(state) {
  21239. return state.user.userInfo;
  21240. },
  21241. testText: function testText(state) {
  21242. return state.user.testText;
  21243. }
  21244. };
  21245. var _default = getters;
  21246. exports.default = _default;
  21247. /***/ }),
  21248. /* 170 */
  21249. /*!********************************************************************************!*\
  21250. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/utils/index.js ***!
  21251. \********************************************************************************/
  21252. /*! no static exports found */
  21253. /***/ (function(module, exports, __webpack_require__) {
  21254. "use strict";
  21255. /* WEBPACK VAR INJECTION */(function(uni) {
  21256. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21257. Object.defineProperty(exports, "__esModule", {
  21258. value: true
  21259. });
  21260. exports.default = void 0;
  21261. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 56));
  21262. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  21263. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 58));
  21264. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  21265. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  21266. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  21267. var FormData = __webpack_require__(/*! ./formData.js */ 171);
  21268. function formateDate() {
  21269. var fmt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'yyyy-mm-dd';
  21270. var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  21271. if (!date) {
  21272. date = new Date();
  21273. }
  21274. try {
  21275. if (typeof date == 'string') {
  21276. date = date.replace(/-/g, '/').replace(/T/g, ' ');
  21277. if (date.indexOf('/') == -1) {
  21278. date = new Date(parseFloat(date));
  21279. }
  21280. date = new Date(date);
  21281. } else if (typeof date == 'number') {
  21282. date = new Date(date);
  21283. }
  21284. } catch (error) {
  21285. console.log('时间格式化出错', error);
  21286. date = new Date();
  21287. }
  21288. var ret;
  21289. var weak = function (date) {
  21290. var days = date.getDay();
  21291. var weekArrTxt = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  21292. var weekArrTxt2 = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
  21293. return [weekArrTxt[days], weekArrTxt2[days]];
  21294. }(date);
  21295. var opt = {
  21296. 'y+': date.getFullYear().toString(),
  21297. // 年
  21298. 'm+': (date.getMonth() + 1).toString(),
  21299. // 月
  21300. 'd+': date.getDate().toString(),
  21301. // 日
  21302. 'H+': date.getHours().toString(),
  21303. // 时
  21304. 'M+': date.getMinutes().toString(),
  21305. // 分
  21306. 'S+': date.getSeconds().toString(),
  21307. // 秒
  21308. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  21309. 'W+': weak[0],
  21310. 'w+': weak[1]
  21311. };
  21312. for (var k in opt) {
  21313. ret = new RegExp('(' + k + ')').exec(fmt);
  21314. if (ret) {
  21315. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0'));
  21316. }
  21317. }
  21318. return fmt;
  21319. }
  21320. function getDateDiff() {
  21321. var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
  21322. if (time == '') return '未知';
  21323. // 当前时间
  21324. var now = new Date();
  21325. var ny = formateDate('yyyy', now);
  21326. var nm = formateDate('mm', now);
  21327. var nd = formateDate('dd', now);
  21328. var nH = formateDate('HH', now);
  21329. var nM = formateDate('MM', now);
  21330. var nS = formateDate('SS', now);
  21331. var oDate = new Date(formateDate('yyyy/mm/dd HH:MM:SS', time));
  21332. var oy = formateDate('yyyy', oDate);
  21333. var om = formateDate('mm', oDate);
  21334. var od = formateDate('dd', oDate);
  21335. var oH = formateDate('HH', oDate);
  21336. var oM = formateDate('MM', oDate);
  21337. var oS = formateDate('SS', oDate);
  21338. // console.log(parseInt(nm), parseInt(om));
  21339. if ('' + ny + nm + nd + nH + nM == '' + oy + om + od + oH + oM) {
  21340. //同分
  21341. return '刚刚';
  21342. } else if ('' + ny + nm + nd + nH == '' + oy + om + od + oH) {
  21343. //同时
  21344. return parseInt(nM) - parseInt(oM) + '分钟前';
  21345. } else if ('' + ny + nm + nd == '' + oy + om + od) {
  21346. //同天
  21347. return oH + ':' + oM;
  21348. } else if ('' + ny + nm == '' + oy + om) {
  21349. //同月
  21350. return om + '-' + od + ' ' + oH + ':' + oM;
  21351. } else if ('' + ny == '' + oy) {
  21352. //同年
  21353. return om + '-' + od + ' ' + oH + ':' + oM;
  21354. } else {
  21355. return oy + '-' + om + '-' + od;
  21356. }
  21357. }
  21358. //检测url是否合法
  21359. function TestUrl(url) {
  21360. var regex = new RegExp('(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
  21361. if (regex.test(url)) {
  21362. return true;
  21363. } else {
  21364. return false;
  21365. }
  21366. }
  21367. var ThrottleObject = new Map();
  21368. //节流器 程序名 执行函数 节流时间
  21369. function InitThrottle(name, event, time) {
  21370. if (ThrottleObject.get(name)) clearTimeout(ThrottleObject.get(name)); //清除前程序
  21371. //执行方法
  21372. var obj = setTimeout(function () {
  21373. ThrottleObject.delete(name);
  21374. event();
  21375. }, time);
  21376. //存入栈
  21377. ThrottleObject.set(name, obj);
  21378. }
  21379. //页面数据持久化工具 , app 使用 页面名称 this对象 带 async 的回调函数
  21380. function PersistencePages(_x, _x2, _x3) {
  21381. return _PersistencePages.apply(this, arguments);
  21382. }
  21383. function _PersistencePages() {
  21384. _PersistencePages = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(name, vdom, callback) {
  21385. return _regenerator.default.wrap(function _callee$(_context) {
  21386. while (1) {
  21387. switch (_context.prev = _context.next) {
  21388. case 0:
  21389. callback();
  21390. case 1:
  21391. case "end":
  21392. return _context.stop();
  21393. }
  21394. }
  21395. }, _callee);
  21396. }));
  21397. return _PersistencePages.apply(this, arguments);
  21398. }
  21399. function getNetWork() {
  21400. return _getNetWork.apply(this, arguments);
  21401. } // 文件tempUrl 转 上传参数
  21402. function _getNetWork() {
  21403. _getNetWork = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
  21404. return _regenerator.default.wrap(function _callee2$(_context2) {
  21405. while (1) {
  21406. switch (_context2.prev = _context2.next) {
  21407. case 0:
  21408. return _context2.abrupt("return", new Promise(function (res, rej) {
  21409. uni.getNetworkType({
  21410. success: function success(re) {
  21411. if (re.networkType == 'none') {
  21412. res(false);
  21413. } else {
  21414. res(true);
  21415. }
  21416. },
  21417. fail: function fail() {
  21418. res(false);
  21419. }
  21420. });
  21421. }));
  21422. case 1:
  21423. case "end":
  21424. return _context2.stop();
  21425. }
  21426. }
  21427. }, _callee2);
  21428. }));
  21429. return _getNetWork.apply(this, arguments);
  21430. }
  21431. function tempUrlToUpload(tempUrl, fileName) {
  21432. var other = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21433. var formData = new FormData();
  21434. if (tempUrl) {
  21435. formData.appendFile('File', tempUrl, fileName);
  21436. }
  21437. // 遍历增加额外参数
  21438. Object.keys(other).forEach(function (key) {
  21439. formData.append(key, other["".concat(key)]);
  21440. });
  21441. var data = formData.getData();
  21442. return {
  21443. data: data.buffer,
  21444. header: {
  21445. 'content-type': data.contentType
  21446. }
  21447. };
  21448. }
  21449. // 列表追加key
  21450. function listAddKey(list) {
  21451. console.log(list);
  21452. return list.map(function (item) {
  21453. return _objectSpread(_objectSpread({}, item), {}, {
  21454. key: _vue.default.prototype.$u.guid()
  21455. });
  21456. });
  21457. }
  21458. function getColorForStr(str) {
  21459. if (!str) {
  21460. return '#ffffff';
  21461. }
  21462. // 姓名拼音首字母为基础生成背景色,过滤白色及相近色
  21463. // 定义26个颜色
  21464. var colors = ['#000000',
  21465. // 黑色
  21466. '#1C1C1C',
  21467. // 深灰色
  21468. '#333333',
  21469. // 较深灰色
  21470. '#400000',
  21471. // 深红色
  21472. '#004000',
  21473. // 深绿色
  21474. '#000040',
  21475. // 深蓝色
  21476. '#590059',
  21477. // 深紫红色
  21478. '#404000',
  21479. // 深橄榄色
  21480. '#004040',
  21481. // 深青色
  21482. '#660000',
  21483. // 更深红色
  21484. '#006600',
  21485. // 更浅绿色
  21486. '#000066',
  21487. // 更深蓝色
  21488. '#7F0000',
  21489. // 极深红色
  21490. '#007F00',
  21491. // 极深绿色
  21492. '#00007F',
  21493. // 极深蓝色
  21494. '#8B008B',
  21495. // 深洋红色
  21496. '#990000',
  21497. // 非常深红色
  21498. '#009900',
  21499. // 非常深绿色
  21500. '#000099',
  21501. // 非常深蓝色
  21502. '#A52A2A',
  21503. // 褐红色
  21504. '#00A500',
  21505. // 深草绿色
  21506. '#0000A5',
  21507. // 深宝蓝色
  21508. '#B22222',
  21509. // 耐火砖色
  21510. '#00B200',
  21511. // 深翠绿色
  21512. '#0000B2',
  21513. // 深海军蓝色
  21514. '#C71585' // 洋红色
  21515. ];
  21516. var index = str.charCodeAt(0) % 26;
  21517. return colors[index];
  21518. }
  21519. var util = {
  21520. formateDate: formateDate,
  21521. PersistencePages: PersistencePages,
  21522. getNetWork: getNetWork,
  21523. getDateDiff: getDateDiff,
  21524. TestUrl: TestUrl,
  21525. tempUrlToUpload: tempUrlToUpload,
  21526. listAddKey: listAddKey,
  21527. getColorForStr: getColorForStr
  21528. };
  21529. var _default = util;
  21530. exports.default = _default;
  21531. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21532. /***/ }),
  21533. /* 171 */
  21534. /*!***********************************************************************************!*\
  21535. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/utils/formData.js ***!
  21536. \***********************************************************************************/
  21537. /*! no static exports found */
  21538. /***/ (function(module, exports, __webpack_require__) {
  21539. /* WEBPACK VAR INJECTION */(function(wx) {var _toConsumableArray = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18);
  21540. var mimeMap = __webpack_require__(/*! ./mimeMap.js */ 172);
  21541. function FormData() {
  21542. var fileManager = wx.getFileSystemManager();
  21543. var data = {};
  21544. var files = [];
  21545. this.append = function (name, value) {
  21546. data[name] = value;
  21547. return true;
  21548. };
  21549. this.appendFile = function (name, path, fileName) {
  21550. var buffer = fileManager.readFileSync(path);
  21551. if (Object.prototype.toString.call(buffer).indexOf("ArrayBuffer") < 0) {
  21552. return false;
  21553. }
  21554. if (!fileName) {
  21555. fileName = getFileNameFromPath(path);
  21556. }
  21557. files.push({
  21558. name: name,
  21559. buffer: buffer,
  21560. fileName: fileName
  21561. });
  21562. return true;
  21563. };
  21564. this.getData = function () {
  21565. return convert(data, files);
  21566. };
  21567. }
  21568. function getFileNameFromPath(path) {
  21569. var idx = path.lastIndexOf("/");
  21570. return path.substr(idx + 1);
  21571. }
  21572. function convert(data, files) {
  21573. var boundaryKey = 'wxmpFormBoundary' + randString(); // 数据分割符,一般是随机的字符串
  21574. var boundary = '--' + boundaryKey;
  21575. var endBoundary = boundary + '--';
  21576. var postArray = [];
  21577. //拼接参数
  21578. if (data && Object.prototype.toString.call(data) == "[object Object]") {
  21579. for (var key in data) {
  21580. postArray = postArray.concat(formDataArray(boundary, key, data[key]));
  21581. }
  21582. }
  21583. //拼接文件
  21584. if (files && Object.prototype.toString.call(files) == "[object Array]") {
  21585. for (var i in files) {
  21586. var file = files[i];
  21587. postArray = postArray.concat(formDataArray(boundary, file.name, file.buffer, file.fileName));
  21588. }
  21589. }
  21590. //结尾
  21591. var endBoundaryArray = [];
  21592. endBoundaryArray.push.apply(endBoundaryArray, _toConsumableArray(endBoundary.toUtf8Bytes()));
  21593. postArray = postArray.concat(endBoundaryArray);
  21594. return {
  21595. contentType: 'multipart/form-data; boundary=' + boundaryKey,
  21596. buffer: new Uint8Array(postArray).buffer
  21597. };
  21598. }
  21599. function randString() {
  21600. var result = '';
  21601. var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  21602. for (var i = 17; i > 0; --i) {
  21603. result += chars[Math.floor(Math.random() * chars.length)];
  21604. }
  21605. return result;
  21606. }
  21607. function formDataArray(boundary, name, value, fileName) {
  21608. var _dataArray, _dataArray2, _dataArray3;
  21609. var dataString = '';
  21610. var isFile = !!fileName;
  21611. dataString += boundary + '\r\n';
  21612. dataString += 'Content-Disposition: form-data; name="' + name + '"';
  21613. if (isFile) {
  21614. dataString += '; filename="' + fileName + '"' + '\r\n';
  21615. dataString += 'Content-Type: ' + getFileMime(fileName) + '\r\n\r\n';
  21616. } else {
  21617. dataString += '\r\n\r\n';
  21618. dataString += value;
  21619. }
  21620. var dataArray = [];
  21621. (_dataArray = dataArray).push.apply(_dataArray, _toConsumableArray(dataString.toUtf8Bytes()));
  21622. if (isFile) {
  21623. var fileArray = new Uint8Array(value);
  21624. dataArray = dataArray.concat(Array.prototype.slice.call(fileArray));
  21625. }
  21626. (_dataArray2 = dataArray).push.apply(_dataArray2, _toConsumableArray("\r".toUtf8Bytes()));
  21627. (_dataArray3 = dataArray).push.apply(_dataArray3, _toConsumableArray("\n".toUtf8Bytes()));
  21628. return dataArray;
  21629. }
  21630. function getFileMime(fileName) {
  21631. var idx = fileName.lastIndexOf(".");
  21632. var mime = mimeMap[fileName.substr(idx)];
  21633. return mime ? mime : "application/octet-stream";
  21634. }
  21635. String.prototype.toUtf8Bytes = function () {
  21636. var str = this;
  21637. var bytes = [];
  21638. for (var i = 0; i < str.length; i++) {
  21639. bytes.push.apply(bytes, _toConsumableArray(str.utf8CodeAt(i)));
  21640. if (str.codePointAt(i) > 0xffff) {
  21641. i++;
  21642. }
  21643. }
  21644. return bytes;
  21645. };
  21646. String.prototype.utf8CodeAt = function (i) {
  21647. var str = this;
  21648. var out = [],
  21649. p = 0;
  21650. var c = str.charCodeAt(i);
  21651. if (c < 128) {
  21652. out[p++] = c;
  21653. } else if (c < 2048) {
  21654. out[p++] = c >> 6 | 192;
  21655. out[p++] = c & 63 | 128;
  21656. } else if ((c & 0xFC00) == 0xD800 && i + 1 < str.length && (str.charCodeAt(i + 1) & 0xFC00) == 0xDC00) {
  21657. // Surrogate Pair
  21658. c = 0x10000 + ((c & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF);
  21659. out[p++] = c >> 18 | 240;
  21660. out[p++] = c >> 12 & 63 | 128;
  21661. out[p++] = c >> 6 & 63 | 128;
  21662. out[p++] = c & 63 | 128;
  21663. } else {
  21664. out[p++] = c >> 12 | 224;
  21665. out[p++] = c >> 6 & 63 | 128;
  21666. out[p++] = c & 63 | 128;
  21667. }
  21668. return out;
  21669. };
  21670. module.exports = FormData;
  21671. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  21672. /***/ }),
  21673. /* 172 */
  21674. /*!**********************************************************************************!*\
  21675. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/utils/mimeMap.js ***!
  21676. \**********************************************************************************/
  21677. /*! no static exports found */
  21678. /***/ (function(module, exports, __webpack_require__) {
  21679. var _defineProperty = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11);
  21680. var _module$exports;
  21681. module.exports = (_module$exports = {
  21682. "0.001": "application/x-001",
  21683. "0.323": "text/h323",
  21684. "0.907": "drawing/907",
  21685. ".acp": "audio/x-mei-aac",
  21686. ".aif": "audio/aiff",
  21687. ".aiff": "audio/aiff",
  21688. ".asa": "text/asa",
  21689. ".asp": "text/asp",
  21690. ".au": "audio/basic",
  21691. ".awf": "application/vnd.adobe.workflow",
  21692. ".bmp": "application/x-bmp",
  21693. ".c4t": "application/x-c4t",
  21694. ".cal": "application/x-cals",
  21695. ".cdf": "application/x-netcdf",
  21696. ".cel": "application/x-cel",
  21697. ".cg4": "application/x-g4",
  21698. ".cit": "application/x-cit",
  21699. ".cml": "text/xml",
  21700. ".cmx": "application/x-cmx",
  21701. ".crl": "application/pkix-crl",
  21702. ".csi": "application/x-csi",
  21703. ".cut": "application/x-cut",
  21704. ".dbm": "application/x-dbm",
  21705. ".dcd": "text/xml",
  21706. ".der": "application/x-x509-ca-cert",
  21707. ".dib": "application/x-dib",
  21708. ".doc": "application/msword",
  21709. ".drw": "application/x-drw",
  21710. ".dwf": "Model/vnd.dwf",
  21711. ".dwg": "application/x-dwg",
  21712. ".dxf": "application/x-dxf",
  21713. ".emf": "application/x-emf",
  21714. ".ent": "text/xml",
  21715. ".eps": "application/x-ps",
  21716. ".etd": "application/x-ebx",
  21717. ".fax": "image/fax",
  21718. ".fif": "application/fractals",
  21719. ".frm": "application/x-frm",
  21720. ".gbr": "application/x-gbr",
  21721. ".gif": "image/gif",
  21722. ".gp4": "application/x-gp4",
  21723. ".hmr": "application/x-hmr",
  21724. ".hpl": "application/x-hpl",
  21725. ".hrf": "application/x-hrf",
  21726. ".htc": "text/x-component",
  21727. ".html": "text/html",
  21728. ".htx": "text/html",
  21729. ".ico": "image/x-icon",
  21730. ".iff": "application/x-iff",
  21731. ".igs": "application/x-igs",
  21732. ".img": "application/x-img",
  21733. ".isp": "application/x-internet-signup",
  21734. ".java": "java/*",
  21735. ".jpe": "image/jpeg",
  21736. ".jpeg": "image/jpeg",
  21737. ".jpg": "application/x-jpg",
  21738. ".jsp": "text/html",
  21739. ".lar": "application/x-laplayer-reg",
  21740. ".lavs": "audio/x-liquid-secure",
  21741. ".lmsff": "audio/x-la-lms",
  21742. ".ltr": "application/x-ltr",
  21743. ".m2v": "video/x-mpeg",
  21744. ".m4e": "video/mpeg4",
  21745. ".man": "application/x-troff-man",
  21746. ".mdb": "application/msaccess",
  21747. ".mfp": "application/x-shockwave-flash",
  21748. ".mhtml": "message/rfc822",
  21749. ".mid": "audio/mid",
  21750. ".mil": "application/x-mil",
  21751. ".mnd": "audio/x-musicnet-download",
  21752. ".mocha": "application/x-javascript",
  21753. ".mp1": "audio/mp1",
  21754. ".mp2v": "video/mpeg",
  21755. ".mp4": "video/mpeg4",
  21756. ".mpd": "application/vnd.ms-project",
  21757. ".mpeg": "video/mpg",
  21758. ".mpga": "audio/rn-mpeg",
  21759. ".mps": "video/x-mpeg",
  21760. ".mpv": "video/mpg",
  21761. ".mpw": "application/vnd.ms-project",
  21762. ".mtx": "text/xml",
  21763. ".net": "image/pnetvue",
  21764. ".nws": "message/rfc822",
  21765. ".out": "application/x-out",
  21766. ".p12": "application/x-pkcs12",
  21767. ".p7c": "application/pkcs7-mime",
  21768. ".p7r": "application/x-pkcs7-certreqresp",
  21769. ".pc5": "application/x-pc5",
  21770. ".pcl": "application/x-pcl",
  21771. ".pdf": "application/pdf",
  21772. ".pdx": "application/vnd.adobe.pdx",
  21773. ".pgl": "application/x-pgl",
  21774. ".pko": "application/vnd.ms-pki.pko",
  21775. ".plg": "text/html",
  21776. ".plt": "application/x-plt",
  21777. ".png": "application/x-png",
  21778. ".ppa": "application/vnd.ms-powerpoint",
  21779. ".pps": "application/vnd.ms-powerpoint",
  21780. ".ppt": "application/x-ppt",
  21781. ".prf": "application/pics-rules",
  21782. ".prt": "application/x-prt",
  21783. ".ps": "application/postscript",
  21784. ".pwz": "application/vnd.ms-powerpoint",
  21785. ".ra": "audio/vnd.rn-realaudio",
  21786. ".ras": "application/x-ras",
  21787. ".rdf": "text/xml",
  21788. ".red": "application/x-red",
  21789. ".rjs": "application/vnd.rn-realsystem-rjs",
  21790. ".rlc": "application/x-rlc",
  21791. ".rm": "application/vnd.rn-realmedia",
  21792. ".rmi": "audio/mid",
  21793. ".rmm": "audio/x-pn-realaudio",
  21794. ".rms": "application/vnd.rn-realmedia-secure",
  21795. ".rmx": "application/vnd.rn-realsystem-rmx",
  21796. ".rp": "image/vnd.rn-realpix",
  21797. ".rsml": "application/vnd.rn-rsml",
  21798. ".rtf": "application/msword",
  21799. ".rv": "video/vnd.rn-realvideo",
  21800. ".sat": "application/x-sat",
  21801. ".sdw": "application/x-sdw",
  21802. ".slb": "application/x-slb",
  21803. ".slk": "drawing/x-slk",
  21804. ".smil": "application/smil",
  21805. ".snd": "audio/basic",
  21806. ".sor": "text/plain",
  21807. ".spl": "application/futuresplash",
  21808. ".ssm": "application/streamingmedia",
  21809. ".stl": "application/vnd.ms-pki.stl",
  21810. ".sty": "application/x-sty",
  21811. ".swf": "application/x-shockwave-flash",
  21812. ".tg4": "application/x-tg4",
  21813. ".tif": "image/tiff",
  21814. ".tiff": "image/tiff",
  21815. ".top": "drawing/x-top",
  21816. ".tsd": "text/xml",
  21817. ".uin": "application/x-icq",
  21818. ".vcf": "text/x-vcard",
  21819. ".vdx": "application/vnd.visio",
  21820. ".vpg": "application/x-vpeg005",
  21821. ".vsd": "application/x-vsd",
  21822. ".vst": "application/vnd.visio",
  21823. ".vsw": "application/vnd.visio",
  21824. ".vtx": "application/vnd.visio",
  21825. ".wav": "audio/wav",
  21826. ".wb1": "application/x-wb1",
  21827. ".wb3": "application/x-wb3",
  21828. ".wiz": "application/msword",
  21829. ".wk4": "application/x-wk4",
  21830. ".wks": "application/x-wks",
  21831. ".wma": "audio/x-ms-wma",
  21832. ".wmf": "application/x-wmf",
  21833. ".wmv": "video/x-ms-wmv",
  21834. ".wmz": "application/x-ms-wmz",
  21835. ".wpd": "application/x-wpd",
  21836. ".wpl": "application/vnd.ms-wpl",
  21837. ".wr1": "application/x-wr1",
  21838. ".wrk": "application/x-wrk",
  21839. ".ws2": "application/x-ws",
  21840. ".wsdl": "text/xml",
  21841. ".xdp": "application/vnd.adobe.xdp",
  21842. ".xfd": "application/vnd.adobe.xfd",
  21843. ".xhtml": "text/html",
  21844. ".xls": "application/x-xls",
  21845. ".xml": "text/xml",
  21846. ".xq": "text/xml",
  21847. ".xquery": "text/xml",
  21848. ".xsl": "text/xml",
  21849. ".xwd": "application/x-xwd",
  21850. ".sis": "application/vnd.symbian.install",
  21851. ".x_t": "application/x-x_t",
  21852. ".apk": "application/vnd.android.package-archive",
  21853. "0.301": "application/x-301",
  21854. "0.906": "application/x-906",
  21855. ".a11": "application/x-a11",
  21856. ".ai": "application/postscript",
  21857. ".aifc": "audio/aiff",
  21858. ".anv": "application/x-anv",
  21859. ".asf": "video/x-ms-asf",
  21860. ".asx": "video/x-ms-asf",
  21861. ".avi": "video/avi",
  21862. ".biz": "text/xml",
  21863. ".bot": "application/x-bot",
  21864. ".c90": "application/x-c90",
  21865. ".cat": "application/vnd.ms-pki.seccat",
  21866. ".cdr": "application/x-cdr",
  21867. ".cer": "application/x-x509-ca-cert",
  21868. ".cgm": "application/x-cgm",
  21869. ".class": "java/*",
  21870. ".cmp": "application/x-cmp",
  21871. ".cot": "application/x-cot",
  21872. ".crt": "application/x-x509-ca-cert",
  21873. ".css": "text/css",
  21874. ".dbf": "application/x-dbf",
  21875. ".dbx": "application/x-dbx",
  21876. ".dcx": "application/x-dcx",
  21877. ".dgn": "application/x-dgn",
  21878. ".dll": "application/x-msdownload",
  21879. ".dot": "application/msword",
  21880. ".dtd": "text/xml"
  21881. }, _defineProperty(_module$exports, ".dwf", "application/x-dwf"), _defineProperty(_module$exports, ".dxb", "application/x-dxb"), _defineProperty(_module$exports, ".edn", "application/vnd.adobe.edn"), _defineProperty(_module$exports, ".eml", "message/rfc822"), _defineProperty(_module$exports, ".epi", "application/x-epi"), _defineProperty(_module$exports, ".eps", "application/postscript"), _defineProperty(_module$exports, ".exe", "application/x-msdownload"), _defineProperty(_module$exports, ".fdf", "application/vnd.fdf"), _defineProperty(_module$exports, ".fo", "text/xml"), _defineProperty(_module$exports, ".g4", "application/x-g4"), _defineProperty(_module$exports, ".tif", "image/tiff"), _defineProperty(_module$exports, ".gl2", "application/x-gl2"), _defineProperty(_module$exports, ".hgl", "application/x-hgl"), _defineProperty(_module$exports, ".hpg", "application/x-hpgl"), _defineProperty(_module$exports, ".hqx", "application/mac-binhex40"), _defineProperty(_module$exports, ".hta", "application/hta"), _defineProperty(_module$exports, ".htm", "text/html"), _defineProperty(_module$exports, ".htt", "text/webviewhtml"), _defineProperty(_module$exports, ".icb", "application/x-icb"), _defineProperty(_module$exports, ".ico", "application/x-ico"), _defineProperty(_module$exports, ".ig4", "application/x-g4"), _defineProperty(_module$exports, ".iii", "application/x-iphone"), _defineProperty(_module$exports, ".ins", "application/x-internet-signup"), _defineProperty(_module$exports, ".IVF", "video/x-ivf"), _defineProperty(_module$exports, ".jfif", "image/jpeg"), _defineProperty(_module$exports, ".jpe", "application/x-jpe"), _defineProperty(_module$exports, ".jpg", "image/jpeg"), _defineProperty(_module$exports, ".js", "application/x-javascript"), _defineProperty(_module$exports, ".la1", "audio/x-liquid-file"), _defineProperty(_module$exports, ".latex", "application/x-latex"), _defineProperty(_module$exports, ".lbm", "application/x-lbm"), _defineProperty(_module$exports, ".ls", "application/x-javascript"), _defineProperty(_module$exports, ".m1v", "video/x-mpeg"), _defineProperty(_module$exports, ".m3u", "audio/mpegurl"), _defineProperty(_module$exports, ".mac", "application/x-mac"), _defineProperty(_module$exports, ".math", "text/xml"), _defineProperty(_module$exports, ".mdb", "application/x-mdb"), _defineProperty(_module$exports, ".mht", "message/rfc822"), _defineProperty(_module$exports, ".mi", "application/x-mi"), _defineProperty(_module$exports, ".midi", "audio/mid"), _defineProperty(_module$exports, ".mml", "text/xml"), _defineProperty(_module$exports, ".mns", "audio/x-musicnet-stream"), _defineProperty(_module$exports, ".movie", "video/x-sgi-movie"), _defineProperty(_module$exports, ".mp2", "audio/mp2"), _defineProperty(_module$exports, ".mp3", "audio/mp3"), _defineProperty(_module$exports, ".mpa", "video/x-mpg"), _defineProperty(_module$exports, ".mpe", "video/x-mpeg"), _defineProperty(_module$exports, ".mpg", "video/mpg"), _defineProperty(_module$exports, ".mpp", "application/vnd.ms-project"), _defineProperty(_module$exports, ".mpt", "application/vnd.ms-project"), _defineProperty(_module$exports, ".mpv2", "video/mpeg"), _defineProperty(_module$exports, ".mpx", "application/vnd.ms-project"), _defineProperty(_module$exports, ".mxp", "application/x-mmxp"), _defineProperty(_module$exports, ".nrf", "application/x-nrf"), _defineProperty(_module$exports, ".odc", "text/x-ms-odc"), _defineProperty(_module$exports, ".p10", "application/pkcs10"), _defineProperty(_module$exports, ".p7b", "application/x-pkcs7-certificates"), _defineProperty(_module$exports, ".p7m", "application/pkcs7-mime"), _defineProperty(_module$exports, ".p7s", "application/pkcs7-signature"), _defineProperty(_module$exports, ".pci", "application/x-pci"), _defineProperty(_module$exports, ".pcx", "application/x-pcx"), _defineProperty(_module$exports, ".pdf", "application/pdf"), _defineProperty(_module$exports, ".pfx", "application/x-pkcs12"), _defineProperty(_module$exports, ".pic", "application/x-pic"), _defineProperty(_module$exports, ".pl", "application/x-perl"), _defineProperty(_module$exports, ".pls", "audio/scpls"), _defineProperty(_module$exports, ".png", "image/png"), _defineProperty(_module$exports, ".pot", "application/vnd.ms-powerpoint"), _defineProperty(_module$exports, ".ppm", "application/x-ppm"), _defineProperty(_module$exports, ".ppt", "application/vnd.ms-powerpoint"), _defineProperty(_module$exports, ".pr", "application/x-pr"), _defineProperty(_module$exports, ".prn", "application/x-prn"), _defineProperty(_module$exports, ".ps", "application/x-ps"), _defineProperty(_module$exports, ".ptn", "application/x-ptn"), _defineProperty(_module$exports, ".r3t", "text/vnd.rn-realtext3d"), _defineProperty(_module$exports, ".ram", "audio/x-pn-realaudio"), _defineProperty(_module$exports, ".rat", "application/rat-file"), _defineProperty(_module$exports, ".rec", "application/vnd.rn-recording"), _defineProperty(_module$exports, ".rgb", "application/x-rgb"), _defineProperty(_module$exports, ".rjt", "application/vnd.rn-realsystem-rjt"), _defineProperty(_module$exports, ".rle", "application/x-rle"), _defineProperty(_module$exports, ".rmf", "application/vnd.adobe.rmf"), _defineProperty(_module$exports, ".rmj", "application/vnd.rn-realsystem-rmj"), _defineProperty(_module$exports, ".rmp", "application/vnd.rn-rn_music_package"), _defineProperty(_module$exports, ".rmvb", "application/vnd.rn-realmedia-vbr"), _defineProperty(_module$exports, ".rnx", "application/vnd.rn-realplayer"), _defineProperty(_module$exports, ".rpm", "audio/x-pn-realaudio-plugin"), _defineProperty(_module$exports, ".rt", "text/vnd.rn-realtext"), _defineProperty(_module$exports, ".rtf", "application/x-rtf"), _defineProperty(_module$exports, ".sam", "application/x-sam"), _defineProperty(_module$exports, ".sdp", "application/sdp"), _defineProperty(_module$exports, ".sit", "application/x-stuffit"), _defineProperty(_module$exports, ".sld", "application/x-sld"), _defineProperty(_module$exports, ".smi", "application/smil"), _defineProperty(_module$exports, ".smk", "application/x-smk"), _defineProperty(_module$exports, ".sol", "text/plain"), _defineProperty(_module$exports, ".spc", "application/x-pkcs7-certificates"), _defineProperty(_module$exports, ".spp", "text/xml"), _defineProperty(_module$exports, ".sst", "application/vnd.ms-pki.certstore"), _defineProperty(_module$exports, ".stm", "text/html"), _defineProperty(_module$exports, ".svg", "text/xml"), _defineProperty(_module$exports, ".tdf", "application/x-tdf"), _defineProperty(_module$exports, ".tga", "application/x-tga"), _defineProperty(_module$exports, ".tif", "application/x-tif"), _defineProperty(_module$exports, ".tld", "text/xml"), _defineProperty(_module$exports, ".torrent", "application/x-bittorrent"), _defineProperty(_module$exports, ".txt", "text/plain"), _defineProperty(_module$exports, ".uls", "text/iuls"), _defineProperty(_module$exports, ".vda", "application/x-vda"), _defineProperty(_module$exports, ".vml", "text/xml"), _defineProperty(_module$exports, ".vsd", "application/vnd.visio"), _defineProperty(_module$exports, ".vss", "application/vnd.visio"), _defineProperty(_module$exports, ".vst", "application/x-vst"), _defineProperty(_module$exports, ".vsx", "application/vnd.visio"), _defineProperty(_module$exports, ".vxml", "text/xml"), _defineProperty(_module$exports, ".wax", "audio/x-ms-wax"), _defineProperty(_module$exports, ".wb2", "application/x-wb2"), _defineProperty(_module$exports, ".wbmp", "image/vnd.wap.wbmp"), _defineProperty(_module$exports, ".wk3", "application/x-wk3"), _defineProperty(_module$exports, ".wkq", "application/x-wkq"), _defineProperty(_module$exports, ".wm", "video/x-ms-wm"), _defineProperty(_module$exports, ".wmd", "application/x-ms-wmd"), _defineProperty(_module$exports, ".wml", "text/vnd.wap.wml"), _defineProperty(_module$exports, ".wmx", "video/x-ms-wmx"), _defineProperty(_module$exports, ".wp6", "application/x-wp6"), _defineProperty(_module$exports, ".wpg", "application/x-wpg"), _defineProperty(_module$exports, ".wq1", "application/x-wq1"), _defineProperty(_module$exports, ".wri", "application/x-wri"), _defineProperty(_module$exports, ".ws", "application/x-ws"), _defineProperty(_module$exports, ".wsc", "text/scriptlet"), _defineProperty(_module$exports, ".wvx", "video/x-ms-wvx"), _defineProperty(_module$exports, ".xdr", "text/xml"), _defineProperty(_module$exports, ".xfdf", "application/vnd.adobe.xfdf"), _defineProperty(_module$exports, ".xls", "application/vnd.ms-excel"), _defineProperty(_module$exports, ".xlw", "application/x-xlw"), _defineProperty(_module$exports, ".xpl", "audio/scpls"), _defineProperty(_module$exports, ".xql", "text/xml"), _defineProperty(_module$exports, ".xsd", "text/xml"), _defineProperty(_module$exports, ".xslt", "text/xml"), _defineProperty(_module$exports, ".x_b", "application/x-x_b"), _defineProperty(_module$exports, ".sisx", "application/vnd.symbian.install"), _defineProperty(_module$exports, ".ipa", "application/vnd.iphone"), _defineProperty(_module$exports, ".xap", "application/x-silverlight-app"), _defineProperty(_module$exports, ".zip", "application/x-zip-compressed"), _module$exports);
  21882. /***/ }),
  21883. /* 173 */,
  21884. /* 174 */,
  21885. /* 175 */,
  21886. /* 176 */,
  21887. /* 177 */,
  21888. /* 178 */,
  21889. /* 179 */,
  21890. /* 180 */,
  21891. /* 181 */,
  21892. /* 182 */,
  21893. /* 183 */,
  21894. /* 184 */,
  21895. /* 185 */,
  21896. /* 186 */,
  21897. /* 187 */,
  21898. /* 188 */,
  21899. /* 189 */,
  21900. /* 190 */,
  21901. /* 191 */,
  21902. /* 192 */,
  21903. /* 193 */,
  21904. /* 194 */,
  21905. /* 195 */,
  21906. /* 196 */,
  21907. /* 197 */,
  21908. /* 198 */,
  21909. /* 199 */,
  21910. /* 200 */,
  21911. /* 201 */,
  21912. /* 202 */
  21913. /*!******************************************************************************************************************!*\
  21914. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/components/u-form/props.js ***!
  21915. \******************************************************************************************************************/
  21916. /*! no static exports found */
  21917. /***/ (function(module, exports, __webpack_require__) {
  21918. "use strict";
  21919. /* WEBPACK VAR INJECTION */(function(uni) {
  21920. Object.defineProperty(exports, "__esModule", {
  21921. value: true
  21922. });
  21923. exports.default = void 0;
  21924. var _default = {
  21925. props: {
  21926. // 当前form的需要验证字段的集合
  21927. model: {
  21928. type: Object,
  21929. default: uni.$u.props.form.model
  21930. },
  21931. // 验证规则
  21932. rules: {
  21933. type: [Object, Function, Array],
  21934. default: uni.$u.props.form.rules
  21935. },
  21936. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  21937. // border-bottom-下边框呈现红色,none-无提示
  21938. errorType: {
  21939. type: String,
  21940. default: uni.$u.props.form.errorType
  21941. },
  21942. // 是否显示表单域的下划线边框
  21943. borderBottom: {
  21944. type: Boolean,
  21945. default: uni.$u.props.form.borderBottom
  21946. },
  21947. // label的位置,left-左边,top-上边
  21948. labelPosition: {
  21949. type: String,
  21950. default: uni.$u.props.form.labelPosition
  21951. },
  21952. // label的宽度,单位px
  21953. labelWidth: {
  21954. type: [String, Number],
  21955. default: uni.$u.props.form.labelWidth
  21956. },
  21957. // lable字体的对齐方式
  21958. labelAlign: {
  21959. type: String,
  21960. default: uni.$u.props.form.labelAlign
  21961. },
  21962. // lable的样式,对象形式
  21963. labelStyle: {
  21964. type: Object,
  21965. default: uni.$u.props.form.labelStyle
  21966. }
  21967. }
  21968. };
  21969. exports.default = _default;
  21970. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21971. /***/ }),
  21972. /* 203 */,
  21973. /* 204 */,
  21974. /* 205 */,
  21975. /* 206 */,
  21976. /* 207 */,
  21977. /* 208 */
  21978. /*!***********************************************************************************************************************!*\
  21979. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/components/u-form-item/props.js ***!
  21980. \***********************************************************************************************************************/
  21981. /*! no static exports found */
  21982. /***/ (function(module, exports, __webpack_require__) {
  21983. "use strict";
  21984. /* WEBPACK VAR INJECTION */(function(uni) {
  21985. Object.defineProperty(exports, "__esModule", {
  21986. value: true
  21987. });
  21988. exports.default = void 0;
  21989. var _default = {
  21990. props: {
  21991. // input的label提示语
  21992. label: {
  21993. type: String,
  21994. default: uni.$u.props.formItem.label
  21995. },
  21996. // 绑定的值
  21997. prop: {
  21998. type: String,
  21999. default: uni.$u.props.formItem.prop
  22000. },
  22001. // 是否显示表单域的下划线边框
  22002. borderBottom: {
  22003. type: [String, Boolean],
  22004. default: uni.$u.props.formItem.borderBottom
  22005. },
  22006. // label的位置,left-左边,top-上边
  22007. labelPosition: {
  22008. type: String,
  22009. default: uni.$u.props.formItem.labelPosition
  22010. },
  22011. // label的宽度,单位px
  22012. labelWidth: {
  22013. type: [String, Number],
  22014. default: uni.$u.props.formItem.labelWidth
  22015. },
  22016. // 右侧图标
  22017. rightIcon: {
  22018. type: String,
  22019. default: uni.$u.props.formItem.rightIcon
  22020. },
  22021. // 左侧图标
  22022. leftIcon: {
  22023. type: String,
  22024. default: uni.$u.props.formItem.leftIcon
  22025. },
  22026. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  22027. required: {
  22028. type: Boolean,
  22029. default: uni.$u.props.formItem.required
  22030. },
  22031. leftIconStyle: {
  22032. type: [String, Object],
  22033. default: uni.$u.props.formItem.leftIconStyle
  22034. }
  22035. }
  22036. };
  22037. exports.default = _default;
  22038. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  22039. /***/ }),
  22040. /* 209 */,
  22041. /* 210 */,
  22042. /* 211 */,
  22043. /* 212 */,
  22044. /* 213 */,
  22045. /* 214 */,
  22046. /* 215 */,
  22047. /* 216 */
  22048. /*!*******************************************************************************************************************!*\
  22049. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/components/u-input/props.js ***!
  22050. \*******************************************************************************************************************/
  22051. /*! no static exports found */
  22052. /***/ (function(module, exports, __webpack_require__) {
  22053. "use strict";
  22054. /* WEBPACK VAR INJECTION */(function(uni) {
  22055. Object.defineProperty(exports, "__esModule", {
  22056. value: true
  22057. });
  22058. exports.default = void 0;
  22059. var _default = {
  22060. props: {
  22061. // 输入的值
  22062. value: {
  22063. type: [String, Number],
  22064. default: uni.$u.props.input.value
  22065. },
  22066. // 输入框类型
  22067. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  22068. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  22069. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  22070. // text-文本输入键盘
  22071. type: {
  22072. type: String,
  22073. default: uni.$u.props.input.type
  22074. },
  22075. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  22076. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  22077. fixed: {
  22078. type: Boolean,
  22079. default: uni.$u.props.input.fixed
  22080. },
  22081. // 是否禁用输入框
  22082. disabled: {
  22083. type: Boolean,
  22084. default: uni.$u.props.input.disabled
  22085. },
  22086. // 禁用状态时的背景色
  22087. disabledColor: {
  22088. type: String,
  22089. default: uni.$u.props.input.disabledColor
  22090. },
  22091. // 是否显示清除控件
  22092. clearable: {
  22093. type: Boolean,
  22094. default: uni.$u.props.input.clearable
  22095. },
  22096. // 是否密码类型
  22097. password: {
  22098. type: Boolean,
  22099. default: uni.$u.props.input.password
  22100. },
  22101. // 最大输入长度,设置为 -1 的时候不限制最大长度
  22102. maxlength: {
  22103. type: [String, Number],
  22104. default: uni.$u.props.input.maxlength
  22105. },
  22106. // 输入框为空时的占位符
  22107. placeholder: {
  22108. type: String,
  22109. default: uni.$u.props.input.placeholder
  22110. },
  22111. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  22112. placeholderClass: {
  22113. type: String,
  22114. default: uni.$u.props.input.placeholderClass
  22115. },
  22116. // 指定placeholder的样式
  22117. placeholderStyle: {
  22118. type: [String, Object],
  22119. default: uni.$u.props.input.placeholderStyle
  22120. },
  22121. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  22122. showWordLimit: {
  22123. type: Boolean,
  22124. default: uni.$u.props.input.showWordLimit
  22125. },
  22126. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  22127. // https://uniapp.dcloud.io/component/input
  22128. // https://uniapp.dcloud.io/component/textarea
  22129. confirmType: {
  22130. type: String,
  22131. default: uni.$u.props.input.confirmType
  22132. },
  22133. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  22134. confirmHold: {
  22135. type: Boolean,
  22136. default: uni.$u.props.input.confirmHold
  22137. },
  22138. // focus时,点击页面的时候不收起键盘,微信小程序有效
  22139. holdKeyboard: {
  22140. type: Boolean,
  22141. default: uni.$u.props.input.holdKeyboard
  22142. },
  22143. // 自动获取焦点
  22144. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  22145. focus: {
  22146. type: Boolean,
  22147. default: uni.$u.props.input.focus
  22148. },
  22149. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  22150. autoBlur: {
  22151. type: Boolean,
  22152. default: uni.$u.props.input.autoBlur
  22153. },
  22154. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  22155. disableDefaultPadding: {
  22156. type: Boolean,
  22157. default: uni.$u.props.input.disableDefaultPadding
  22158. },
  22159. // 指定focus时光标的位置
  22160. cursor: {
  22161. type: [String, Number],
  22162. default: uni.$u.props.input.cursor
  22163. },
  22164. // 输入框聚焦时底部与键盘的距离
  22165. cursorSpacing: {
  22166. type: [String, Number],
  22167. default: uni.$u.props.input.cursorSpacing
  22168. },
  22169. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  22170. selectionStart: {
  22171. type: [String, Number],
  22172. default: uni.$u.props.input.selectionStart
  22173. },
  22174. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  22175. selectionEnd: {
  22176. type: [String, Number],
  22177. default: uni.$u.props.input.selectionEnd
  22178. },
  22179. // 键盘弹起时,是否自动上推页面
  22180. adjustPosition: {
  22181. type: Boolean,
  22182. default: uni.$u.props.input.adjustPosition
  22183. },
  22184. // 输入框内容对齐方式,可选值为:left|center|right
  22185. inputAlign: {
  22186. type: String,
  22187. default: uni.$u.props.input.inputAlign
  22188. },
  22189. // 输入框字体的大小
  22190. fontSize: {
  22191. type: [String, Number],
  22192. default: uni.$u.props.input.fontSize
  22193. },
  22194. // 输入框字体颜色
  22195. color: {
  22196. type: String,
  22197. default: uni.$u.props.input.color
  22198. },
  22199. // 输入框前置图标
  22200. prefixIcon: {
  22201. type: String,
  22202. default: uni.$u.props.input.prefixIcon
  22203. },
  22204. // 前置图标样式,对象或字符串
  22205. prefixIconStyle: {
  22206. type: [String, Object],
  22207. default: uni.$u.props.input.prefixIconStyle
  22208. },
  22209. // 输入框后置图标
  22210. suffixIcon: {
  22211. type: String,
  22212. default: uni.$u.props.input.suffixIcon
  22213. },
  22214. // 后置图标样式,对象或字符串
  22215. suffixIconStyle: {
  22216. type: [String, Object],
  22217. default: uni.$u.props.input.suffixIconStyle
  22218. },
  22219. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  22220. border: {
  22221. type: String,
  22222. default: uni.$u.props.input.border
  22223. },
  22224. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  22225. readonly: {
  22226. type: Boolean,
  22227. default: uni.$u.props.input.readonly
  22228. },
  22229. // 输入框形状,circle-圆形,square-方形
  22230. shape: {
  22231. type: String,
  22232. default: uni.$u.props.input.shape
  22233. },
  22234. // 用于处理或者过滤输入框内容的方法
  22235. formatter: {
  22236. type: [Function, null],
  22237. default: uni.$u.props.input.formatter
  22238. },
  22239. // 是否忽略组件内对文本合成系统事件的处理
  22240. ignoreCompositionEvent: {
  22241. type: Boolean,
  22242. default: true
  22243. }
  22244. }
  22245. };
  22246. exports.default = _default;
  22247. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  22248. /***/ }),
  22249. /* 217 */,
  22250. /* 218 */,
  22251. /* 219 */,
  22252. /* 220 */,
  22253. /* 221 */,
  22254. /* 222 */,
  22255. /* 223 */,
  22256. /* 224 */
  22257. /*!************************************************************************************************************!*\
  22258. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/mixin/button.js ***!
  22259. \************************************************************************************************************/
  22260. /*! no static exports found */
  22261. /***/ (function(module, exports, __webpack_require__) {
  22262. "use strict";
  22263. Object.defineProperty(exports, "__esModule", {
  22264. value: true
  22265. });
  22266. exports.default = void 0;
  22267. var _default = {
  22268. props: {
  22269. lang: String,
  22270. sessionFrom: String,
  22271. sendMessageTitle: String,
  22272. sendMessagePath: String,
  22273. sendMessageImg: String,
  22274. showMessageCard: Boolean,
  22275. appParameter: String,
  22276. formType: String,
  22277. openType: String
  22278. }
  22279. };
  22280. exports.default = _default;
  22281. /***/ }),
  22282. /* 225 */
  22283. /*!**************************************************************************************************************!*\
  22284. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/mixin/openType.js ***!
  22285. \**************************************************************************************************************/
  22286. /*! no static exports found */
  22287. /***/ (function(module, exports, __webpack_require__) {
  22288. "use strict";
  22289. Object.defineProperty(exports, "__esModule", {
  22290. value: true
  22291. });
  22292. exports.default = void 0;
  22293. var _default = {
  22294. props: {
  22295. openType: String
  22296. },
  22297. methods: {
  22298. onGetUserInfo: function onGetUserInfo(event) {
  22299. this.$emit('getuserinfo', event.detail);
  22300. },
  22301. onContact: function onContact(event) {
  22302. this.$emit('contact', event.detail);
  22303. },
  22304. onGetPhoneNumber: function onGetPhoneNumber(event) {
  22305. this.$emit('getphonenumber', event.detail);
  22306. },
  22307. onError: function onError(event) {
  22308. this.$emit('error', event.detail);
  22309. },
  22310. onLaunchApp: function onLaunchApp(event) {
  22311. this.$emit('launchapp', event.detail);
  22312. },
  22313. onOpenSetting: function onOpenSetting(event) {
  22314. this.$emit('opensetting', event.detail);
  22315. }
  22316. }
  22317. };
  22318. exports.default = _default;
  22319. /***/ }),
  22320. /* 226 */
  22321. /*!********************************************************************************************************************!*\
  22322. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/components/u-button/props.js ***!
  22323. \********************************************************************************************************************/
  22324. /*! no static exports found */
  22325. /***/ (function(module, exports, __webpack_require__) {
  22326. "use strict";
  22327. /* WEBPACK VAR INJECTION */(function(uni) {
  22328. Object.defineProperty(exports, "__esModule", {
  22329. value: true
  22330. });
  22331. exports.default = void 0;
  22332. /*
  22333. * @Author : LQ
  22334. * @Description :
  22335. * @version : 1.0
  22336. * @Date : 2021-08-16 10:04:04
  22337. * @LastAuthor : LQ
  22338. * @lastTime : 2021-08-16 10:04:24
  22339. * @FilePath : /u-view2.0/uview-ui/components/u-button/props.js
  22340. */
  22341. var _default = {
  22342. props: {
  22343. // 是否细边框
  22344. hairline: {
  22345. type: Boolean,
  22346. default: uni.$u.props.button.hairline
  22347. },
  22348. // 按钮的预置样式,info,primary,error,warning,success
  22349. type: {
  22350. type: String,
  22351. default: uni.$u.props.button.type
  22352. },
  22353. // 按钮尺寸,large,normal,small,mini
  22354. size: {
  22355. type: String,
  22356. default: uni.$u.props.button.size
  22357. },
  22358. // 按钮形状,circle(两边为半圆),square(带圆角)
  22359. shape: {
  22360. type: String,
  22361. default: uni.$u.props.button.shape
  22362. },
  22363. // 按钮是否镂空
  22364. plain: {
  22365. type: Boolean,
  22366. default: uni.$u.props.button.plain
  22367. },
  22368. // 是否禁止状态
  22369. disabled: {
  22370. type: Boolean,
  22371. default: uni.$u.props.button.disabled
  22372. },
  22373. // 是否加载中
  22374. loading: {
  22375. type: Boolean,
  22376. default: uni.$u.props.button.loading
  22377. },
  22378. // 加载中提示文字
  22379. loadingText: {
  22380. type: [String, Number],
  22381. default: uni.$u.props.button.loadingText
  22382. },
  22383. // 加载状态图标类型
  22384. loadingMode: {
  22385. type: String,
  22386. default: uni.$u.props.button.loadingMode
  22387. },
  22388. // 加载图标大小
  22389. loadingSize: {
  22390. type: [String, Number],
  22391. default: uni.$u.props.button.loadingSize
  22392. },
  22393. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  22394. // https://uniapp.dcloud.io/component/button
  22395. openType: {
  22396. type: String,
  22397. default: uni.$u.props.button.openType
  22398. },
  22399. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  22400. // 取值为submit(提交表单),reset(重置表单)
  22401. formType: {
  22402. type: String,
  22403. default: uni.$u.props.button.formType
  22404. },
  22405. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  22406. // 只微信小程序、QQ小程序有效
  22407. appParameter: {
  22408. type: String,
  22409. default: uni.$u.props.button.appParameter
  22410. },
  22411. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  22412. hoverStopPropagation: {
  22413. type: Boolean,
  22414. default: uni.$u.props.button.hoverStopPropagation
  22415. },
  22416. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  22417. lang: {
  22418. type: String,
  22419. default: uni.$u.props.button.lang
  22420. },
  22421. // 会话来源,open-type="contact"时有效。只微信小程序有效
  22422. sessionFrom: {
  22423. type: String,
  22424. default: uni.$u.props.button.sessionFrom
  22425. },
  22426. // 会话内消息卡片标题,open-type="contact"时有效
  22427. // 默认当前标题,只微信小程序有效
  22428. sendMessageTitle: {
  22429. type: String,
  22430. default: uni.$u.props.button.sendMessageTitle
  22431. },
  22432. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  22433. // 默认当前分享路径,只微信小程序有效
  22434. sendMessagePath: {
  22435. type: String,
  22436. default: uni.$u.props.button.sendMessagePath
  22437. },
  22438. // 会话内消息卡片图片,open-type="contact"时有效
  22439. // 默认当前页面截图,只微信小程序有效
  22440. sendMessageImg: {
  22441. type: String,
  22442. default: uni.$u.props.button.sendMessageImg
  22443. },
  22444. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  22445. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  22446. showMessageCard: {
  22447. type: Boolean,
  22448. default: uni.$u.props.button.showMessageCard
  22449. },
  22450. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  22451. dataName: {
  22452. type: String,
  22453. default: uni.$u.props.button.dataName
  22454. },
  22455. // 节流,一定时间内只能触发一次
  22456. throttleTime: {
  22457. type: [String, Number],
  22458. default: uni.$u.props.button.throttleTime
  22459. },
  22460. // 按住后多久出现点击态,单位毫秒
  22461. hoverStartTime: {
  22462. type: [String, Number],
  22463. default: uni.$u.props.button.hoverStartTime
  22464. },
  22465. // 手指松开后点击态保留时间,单位毫秒
  22466. hoverStayTime: {
  22467. type: [String, Number],
  22468. default: uni.$u.props.button.hoverStayTime
  22469. },
  22470. // 按钮文字,之所以通过props传入,是因为slot传入的话
  22471. // nvue中无法控制文字的样式
  22472. text: {
  22473. type: [String, Number],
  22474. default: uni.$u.props.button.text
  22475. },
  22476. // 按钮图标
  22477. icon: {
  22478. type: String,
  22479. default: uni.$u.props.button.icon
  22480. },
  22481. // 按钮图标
  22482. iconColor: {
  22483. type: String,
  22484. default: uni.$u.props.button.icon
  22485. },
  22486. // 按钮颜色,支持传入linear-gradient渐变色
  22487. color: {
  22488. type: String,
  22489. default: uni.$u.props.button.color
  22490. }
  22491. }
  22492. };
  22493. exports.default = _default;
  22494. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  22495. /***/ }),
  22496. /* 227 */,
  22497. /* 228 */,
  22498. /* 229 */,
  22499. /* 230 */,
  22500. /* 231 */,
  22501. /* 232 */,
  22502. /* 233 */,
  22503. /* 234 */
  22504. /*!********************************************************************************************************************!*\
  22505. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/libs/util/async-validator.js ***!
  22506. \********************************************************************************************************************/
  22507. /*! no static exports found */
  22508. /***/ (function(module, exports, __webpack_require__) {
  22509. "use strict";
  22510. /* WEBPACK VAR INJECTION */(function(process) {
  22511. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22512. Object.defineProperty(exports, "__esModule", {
  22513. value: true
  22514. });
  22515. exports.default = void 0;
  22516. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  22517. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  22518. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  22519. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  22520. function _extends() {
  22521. _extends = Object.assign || function (target) {
  22522. for (var i = 1; i < arguments.length; i++) {
  22523. var source = arguments[i];
  22524. for (var key in source) {
  22525. if (Object.prototype.hasOwnProperty.call(source, key)) {
  22526. target[key] = source[key];
  22527. }
  22528. }
  22529. }
  22530. return target;
  22531. };
  22532. return _extends.apply(this, arguments);
  22533. }
  22534. /* eslint no-console:0 */
  22535. var formatRegExp = /%[sdj%]/g;
  22536. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  22537. if (typeof process !== 'undefined' && Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"uniapp-template","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  22538. warning = function warning(type, errors) {
  22539. if (typeof console !== 'undefined' && console.warn) {
  22540. if (errors.every(function (e) {
  22541. return typeof e === 'string';
  22542. })) {
  22543. console.warn(type, errors);
  22544. }
  22545. }
  22546. };
  22547. }
  22548. function convertFieldsError(errors) {
  22549. if (!errors || !errors.length) return null;
  22550. var fields = {};
  22551. errors.forEach(function (error) {
  22552. var field = error.field;
  22553. fields[field] = fields[field] || [];
  22554. fields[field].push(error);
  22555. });
  22556. return fields;
  22557. }
  22558. function format() {
  22559. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  22560. args[_key] = arguments[_key];
  22561. }
  22562. var i = 1;
  22563. var f = args[0];
  22564. var len = args.length;
  22565. if (typeof f === 'function') {
  22566. return f.apply(null, args.slice(1));
  22567. }
  22568. if (typeof f === 'string') {
  22569. var str = String(f).replace(formatRegExp, function (x) {
  22570. if (x === '%%') {
  22571. return '%';
  22572. }
  22573. if (i >= len) {
  22574. return x;
  22575. }
  22576. switch (x) {
  22577. case '%s':
  22578. return String(args[i++]);
  22579. case '%d':
  22580. return Number(args[i++]);
  22581. case '%j':
  22582. try {
  22583. return JSON.stringify(args[i++]);
  22584. } catch (_) {
  22585. return '[Circular]';
  22586. }
  22587. break;
  22588. default:
  22589. return x;
  22590. }
  22591. });
  22592. for (var arg = args[i]; i < len; arg = args[++i]) {
  22593. str += " ".concat(arg);
  22594. }
  22595. return str;
  22596. }
  22597. return f;
  22598. }
  22599. function isNativeStringType(type) {
  22600. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  22601. }
  22602. function isEmptyValue(value, type) {
  22603. if (value === undefined || value === null) {
  22604. return true;
  22605. }
  22606. if (type === 'array' && Array.isArray(value) && !value.length) {
  22607. return true;
  22608. }
  22609. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  22610. return true;
  22611. }
  22612. return false;
  22613. }
  22614. function asyncParallelArray(arr, func, callback) {
  22615. var results = [];
  22616. var total = 0;
  22617. var arrLength = arr.length;
  22618. function count(errors) {
  22619. results.push.apply(results, errors);
  22620. total++;
  22621. if (total === arrLength) {
  22622. callback(results);
  22623. }
  22624. }
  22625. arr.forEach(function (a) {
  22626. func(a, count);
  22627. });
  22628. }
  22629. function asyncSerialArray(arr, func, callback) {
  22630. var index = 0;
  22631. var arrLength = arr.length;
  22632. function next(errors) {
  22633. if (errors && errors.length) {
  22634. callback(errors);
  22635. return;
  22636. }
  22637. var original = index;
  22638. index += 1;
  22639. if (original < arrLength) {
  22640. func(arr[original], next);
  22641. } else {
  22642. callback([]);
  22643. }
  22644. }
  22645. next([]);
  22646. }
  22647. function flattenObjArr(objArr) {
  22648. var ret = [];
  22649. Object.keys(objArr).forEach(function (k) {
  22650. ret.push.apply(ret, objArr[k]);
  22651. });
  22652. return ret;
  22653. }
  22654. function asyncMap(objArr, option, func, callback) {
  22655. if (option.first) {
  22656. var _pending = new Promise(function (resolve, reject) {
  22657. var next = function next(errors) {
  22658. callback(errors);
  22659. return errors.length ? reject({
  22660. errors: errors,
  22661. fields: convertFieldsError(errors)
  22662. }) : resolve();
  22663. };
  22664. var flattenArr = flattenObjArr(objArr);
  22665. asyncSerialArray(flattenArr, func, next);
  22666. });
  22667. _pending.catch(function (e) {
  22668. return e;
  22669. });
  22670. return _pending;
  22671. }
  22672. var firstFields = option.firstFields || [];
  22673. if (firstFields === true) {
  22674. firstFields = Object.keys(objArr);
  22675. }
  22676. var objArrKeys = Object.keys(objArr);
  22677. var objArrLength = objArrKeys.length;
  22678. var total = 0;
  22679. var results = [];
  22680. var pending = new Promise(function (resolve, reject) {
  22681. var next = function next(errors) {
  22682. results.push.apply(results, errors);
  22683. total++;
  22684. if (total === objArrLength) {
  22685. callback(results);
  22686. return results.length ? reject({
  22687. errors: results,
  22688. fields: convertFieldsError(results)
  22689. }) : resolve();
  22690. }
  22691. };
  22692. if (!objArrKeys.length) {
  22693. callback(results);
  22694. resolve();
  22695. }
  22696. objArrKeys.forEach(function (key) {
  22697. var arr = objArr[key];
  22698. if (firstFields.indexOf(key) !== -1) {
  22699. asyncSerialArray(arr, func, next);
  22700. } else {
  22701. asyncParallelArray(arr, func, next);
  22702. }
  22703. });
  22704. });
  22705. pending.catch(function (e) {
  22706. return e;
  22707. });
  22708. return pending;
  22709. }
  22710. function complementError(rule) {
  22711. return function (oe) {
  22712. if (oe && oe.message) {
  22713. oe.field = oe.field || rule.fullField;
  22714. return oe;
  22715. }
  22716. return {
  22717. message: typeof oe === 'function' ? oe() : oe,
  22718. field: oe.field || rule.fullField
  22719. };
  22720. };
  22721. }
  22722. function deepMerge(target, source) {
  22723. if (source) {
  22724. for (var s in source) {
  22725. if (source.hasOwnProperty(s)) {
  22726. var value = source[s];
  22727. if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
  22728. target[s] = _objectSpread(_objectSpread({}, target[s]), value);
  22729. } else {
  22730. target[s] = value;
  22731. }
  22732. }
  22733. }
  22734. }
  22735. return target;
  22736. }
  22737. /**
  22738. * Rule for validating required fields.
  22739. *
  22740. * @param rule The validation rule.
  22741. * @param value The value of the field on the source object.
  22742. * @param source The source object being validated.
  22743. * @param errors An array of errors that this rule may add
  22744. * validation errors to.
  22745. * @param options The validation options.
  22746. * @param options.messages The validation messages.
  22747. */
  22748. function required(rule, value, source, errors, options, type) {
  22749. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  22750. errors.push(format(options.messages.required, rule.fullField));
  22751. }
  22752. }
  22753. /**
  22754. * Rule for validating whitespace.
  22755. *
  22756. * @param rule The validation rule.
  22757. * @param value The value of the field on the source object.
  22758. * @param source The source object being validated.
  22759. * @param errors An array of errors that this rule may add
  22760. * validation errors to.
  22761. * @param options The validation options.
  22762. * @param options.messages The validation messages.
  22763. */
  22764. function whitespace(rule, value, source, errors, options) {
  22765. if (/^\s+$/.test(value) || value === '') {
  22766. errors.push(format(options.messages.whitespace, rule.fullField));
  22767. }
  22768. }
  22769. /* eslint max-len:0 */
  22770. var pattern = {
  22771. // http://emailregex.com/
  22772. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  22773. url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
  22774. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  22775. };
  22776. var types = {
  22777. integer: function integer(value) {
  22778. return /^(-)?\d+$/.test(value);
  22779. },
  22780. float: function float(value) {
  22781. return /^(-)?\d+(\.\d+)?$/.test(value);
  22782. },
  22783. array: function array(value) {
  22784. return Array.isArray(value);
  22785. },
  22786. regexp: function regexp(value) {
  22787. if (value instanceof RegExp) {
  22788. return true;
  22789. }
  22790. try {
  22791. return !!new RegExp(value);
  22792. } catch (e) {
  22793. return false;
  22794. }
  22795. },
  22796. date: function date(value) {
  22797. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  22798. },
  22799. number: function number(value) {
  22800. if (isNaN(value)) {
  22801. return false;
  22802. }
  22803. // 修改源码,将字符串数值先转为数值
  22804. return typeof +value === 'number';
  22805. },
  22806. object: function object(value) {
  22807. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  22808. },
  22809. method: function method(value) {
  22810. return typeof value === 'function';
  22811. },
  22812. email: function email(value) {
  22813. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  22814. },
  22815. url: function url(value) {
  22816. return typeof value === 'string' && !!value.match(pattern.url);
  22817. },
  22818. hex: function hex(value) {
  22819. return typeof value === 'string' && !!value.match(pattern.hex);
  22820. }
  22821. };
  22822. /**
  22823. * Rule for validating the type of a value.
  22824. *
  22825. * @param rule The validation rule.
  22826. * @param value The value of the field on the source object.
  22827. * @param source The source object being validated.
  22828. * @param errors An array of errors that this rule may add
  22829. * validation errors to.
  22830. * @param options The validation options.
  22831. * @param options.messages The validation messages.
  22832. */
  22833. function type(rule, value, source, errors, options) {
  22834. if (rule.required && value === undefined) {
  22835. required(rule, value, source, errors, options);
  22836. return;
  22837. }
  22838. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  22839. var ruleType = rule.type;
  22840. if (custom.indexOf(ruleType) > -1) {
  22841. if (!types[ruleType](value)) {
  22842. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  22843. } // straight typeof check
  22844. } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
  22845. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  22846. }
  22847. }
  22848. /**
  22849. * Rule for validating minimum and maximum allowed values.
  22850. *
  22851. * @param rule The validation rule.
  22852. * @param value The value of the field on the source object.
  22853. * @param source The source object being validated.
  22854. * @param errors An array of errors that this rule may add
  22855. * validation errors to.
  22856. * @param options The validation options.
  22857. * @param options.messages The validation messages.
  22858. */
  22859. function range(rule, value, source, errors, options) {
  22860. var len = typeof rule.len === 'number';
  22861. var min = typeof rule.min === 'number';
  22862. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  22863. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  22864. var val = value;
  22865. var key = null;
  22866. var num = typeof value === 'number';
  22867. var str = typeof value === 'string';
  22868. var arr = Array.isArray(value);
  22869. if (num) {
  22870. key = 'number';
  22871. } else if (str) {
  22872. key = 'string';
  22873. } else if (arr) {
  22874. key = 'array';
  22875. } // if the value is not of a supported type for range validation
  22876. // the validation rule rule should use the
  22877. // type property to also test for a particular type
  22878. if (!key) {
  22879. return false;
  22880. }
  22881. if (arr) {
  22882. val = value.length;
  22883. }
  22884. if (str) {
  22885. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
  22886. val = value.replace(spRegexp, '_').length;
  22887. }
  22888. if (len) {
  22889. if (val !== rule.len) {
  22890. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  22891. }
  22892. } else if (min && !max && val < rule.min) {
  22893. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  22894. } else if (max && !min && val > rule.max) {
  22895. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  22896. } else if (min && max && (val < rule.min || val > rule.max)) {
  22897. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  22898. }
  22899. }
  22900. var ENUM = 'enum';
  22901. /**
  22902. * Rule for validating a value exists in an enumerable list.
  22903. *
  22904. * @param rule The validation rule.
  22905. * @param value The value of the field on the source object.
  22906. * @param source The source object being validated.
  22907. * @param errors An array of errors that this rule may add
  22908. * validation errors to.
  22909. * @param options The validation options.
  22910. * @param options.messages The validation messages.
  22911. */
  22912. function enumerable(rule, value, source, errors, options) {
  22913. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  22914. if (rule[ENUM].indexOf(value) === -1) {
  22915. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  22916. }
  22917. }
  22918. /**
  22919. * Rule for validating a regular expression pattern.
  22920. *
  22921. * @param rule The validation rule.
  22922. * @param value The value of the field on the source object.
  22923. * @param source The source object being validated.
  22924. * @param errors An array of errors that this rule may add
  22925. * validation errors to.
  22926. * @param options The validation options.
  22927. * @param options.messages The validation messages.
  22928. */
  22929. function pattern$1(rule, value, source, errors, options) {
  22930. if (rule.pattern) {
  22931. if (rule.pattern instanceof RegExp) {
  22932. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  22933. // flag is accidentally set to `true`, which in a validation scenario
  22934. // is not necessary and the result might be misleading
  22935. rule.pattern.lastIndex = 0;
  22936. if (!rule.pattern.test(value)) {
  22937. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  22938. }
  22939. } else if (typeof rule.pattern === 'string') {
  22940. var _pattern = new RegExp(rule.pattern);
  22941. if (!_pattern.test(value)) {
  22942. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  22943. }
  22944. }
  22945. }
  22946. }
  22947. var rules = {
  22948. required: required,
  22949. whitespace: whitespace,
  22950. type: type,
  22951. range: range,
  22952. enum: enumerable,
  22953. pattern: pattern$1
  22954. };
  22955. /**
  22956. * Performs validation for string types.
  22957. *
  22958. * @param rule The validation rule.
  22959. * @param value The value of the field on the source object.
  22960. * @param callback The callback function.
  22961. * @param source The source object being validated.
  22962. * @param options The validation options.
  22963. * @param options.messages The validation messages.
  22964. */
  22965. function string(rule, value, callback, source, options) {
  22966. var errors = [];
  22967. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  22968. if (validate) {
  22969. if (isEmptyValue(value, 'string') && !rule.required) {
  22970. return callback();
  22971. }
  22972. rules.required(rule, value, source, errors, options, 'string');
  22973. if (!isEmptyValue(value, 'string')) {
  22974. rules.type(rule, value, source, errors, options);
  22975. rules.range(rule, value, source, errors, options);
  22976. rules.pattern(rule, value, source, errors, options);
  22977. if (rule.whitespace === true) {
  22978. rules.whitespace(rule, value, source, errors, options);
  22979. }
  22980. }
  22981. }
  22982. callback(errors);
  22983. }
  22984. /**
  22985. * Validates a function.
  22986. *
  22987. * @param rule The validation rule.
  22988. * @param value The value of the field on the source object.
  22989. * @param callback The callback function.
  22990. * @param source The source object being validated.
  22991. * @param options The validation options.
  22992. * @param options.messages The validation messages.
  22993. */
  22994. function method(rule, value, callback, source, options) {
  22995. var errors = [];
  22996. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  22997. if (validate) {
  22998. if (isEmptyValue(value) && !rule.required) {
  22999. return callback();
  23000. }
  23001. rules.required(rule, value, source, errors, options);
  23002. if (value !== undefined) {
  23003. rules.type(rule, value, source, errors, options);
  23004. }
  23005. }
  23006. callback(errors);
  23007. }
  23008. /**
  23009. * Validates a number.
  23010. *
  23011. * @param rule The validation rule.
  23012. * @param value The value of the field on the source object.
  23013. * @param callback The callback function.
  23014. * @param source The source object being validated.
  23015. * @param options The validation options.
  23016. * @param options.messages The validation messages.
  23017. */
  23018. function number(rule, value, callback, source, options) {
  23019. var errors = [];
  23020. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23021. if (validate) {
  23022. if (value === '') {
  23023. value = undefined;
  23024. }
  23025. if (isEmptyValue(value) && !rule.required) {
  23026. return callback();
  23027. }
  23028. rules.required(rule, value, source, errors, options);
  23029. if (value !== undefined) {
  23030. rules.type(rule, value, source, errors, options);
  23031. rules.range(rule, value, source, errors, options);
  23032. }
  23033. }
  23034. callback(errors);
  23035. }
  23036. /**
  23037. * Validates a boolean.
  23038. *
  23039. * @param rule The validation rule.
  23040. * @param value The value of the field on the source object.
  23041. * @param callback The callback function.
  23042. * @param source The source object being validated.
  23043. * @param options The validation options.
  23044. * @param options.messages The validation messages.
  23045. */
  23046. function _boolean(rule, value, callback, source, options) {
  23047. var errors = [];
  23048. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23049. if (validate) {
  23050. if (isEmptyValue(value) && !rule.required) {
  23051. return callback();
  23052. }
  23053. rules.required(rule, value, source, errors, options);
  23054. if (value !== undefined) {
  23055. rules.type(rule, value, source, errors, options);
  23056. }
  23057. }
  23058. callback(errors);
  23059. }
  23060. /**
  23061. * Validates the regular expression type.
  23062. *
  23063. * @param rule The validation rule.
  23064. * @param value The value of the field on the source object.
  23065. * @param callback The callback function.
  23066. * @param source The source object being validated.
  23067. * @param options The validation options.
  23068. * @param options.messages The validation messages.
  23069. */
  23070. function regexp(rule, value, callback, source, options) {
  23071. var errors = [];
  23072. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23073. if (validate) {
  23074. if (isEmptyValue(value) && !rule.required) {
  23075. return callback();
  23076. }
  23077. rules.required(rule, value, source, errors, options);
  23078. if (!isEmptyValue(value)) {
  23079. rules.type(rule, value, source, errors, options);
  23080. }
  23081. }
  23082. callback(errors);
  23083. }
  23084. /**
  23085. * Validates a number is an integer.
  23086. *
  23087. * @param rule The validation rule.
  23088. * @param value The value of the field on the source object.
  23089. * @param callback The callback function.
  23090. * @param source The source object being validated.
  23091. * @param options The validation options.
  23092. * @param options.messages The validation messages.
  23093. */
  23094. function integer(rule, value, callback, source, options) {
  23095. var errors = [];
  23096. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23097. if (validate) {
  23098. if (isEmptyValue(value) && !rule.required) {
  23099. return callback();
  23100. }
  23101. rules.required(rule, value, source, errors, options);
  23102. if (value !== undefined) {
  23103. rules.type(rule, value, source, errors, options);
  23104. rules.range(rule, value, source, errors, options);
  23105. }
  23106. }
  23107. callback(errors);
  23108. }
  23109. /**
  23110. * Validates a number is a floating point number.
  23111. *
  23112. * @param rule The validation rule.
  23113. * @param value The value of the field on the source object.
  23114. * @param callback The callback function.
  23115. * @param source The source object being validated.
  23116. * @param options The validation options.
  23117. * @param options.messages The validation messages.
  23118. */
  23119. function floatFn(rule, value, callback, source, options) {
  23120. var errors = [];
  23121. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23122. if (validate) {
  23123. if (isEmptyValue(value) && !rule.required) {
  23124. return callback();
  23125. }
  23126. rules.required(rule, value, source, errors, options);
  23127. if (value !== undefined) {
  23128. rules.type(rule, value, source, errors, options);
  23129. rules.range(rule, value, source, errors, options);
  23130. }
  23131. }
  23132. callback(errors);
  23133. }
  23134. /**
  23135. * Validates an array.
  23136. *
  23137. * @param rule The validation rule.
  23138. * @param value The value of the field on the source object.
  23139. * @param callback The callback function.
  23140. * @param source The source object being validated.
  23141. * @param options The validation options.
  23142. * @param options.messages The validation messages.
  23143. */
  23144. function array(rule, value, callback, source, options) {
  23145. var errors = [];
  23146. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23147. if (validate) {
  23148. if (isEmptyValue(value, 'array') && !rule.required) {
  23149. return callback();
  23150. }
  23151. rules.required(rule, value, source, errors, options, 'array');
  23152. if (!isEmptyValue(value, 'array')) {
  23153. rules.type(rule, value, source, errors, options);
  23154. rules.range(rule, value, source, errors, options);
  23155. }
  23156. }
  23157. callback(errors);
  23158. }
  23159. /**
  23160. * Validates an object.
  23161. *
  23162. * @param rule The validation rule.
  23163. * @param value The value of the field on the source object.
  23164. * @param callback The callback function.
  23165. * @param source The source object being validated.
  23166. * @param options The validation options.
  23167. * @param options.messages The validation messages.
  23168. */
  23169. function object(rule, value, callback, source, options) {
  23170. var errors = [];
  23171. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23172. if (validate) {
  23173. if (isEmptyValue(value) && !rule.required) {
  23174. return callback();
  23175. }
  23176. rules.required(rule, value, source, errors, options);
  23177. if (value !== undefined) {
  23178. rules.type(rule, value, source, errors, options);
  23179. }
  23180. }
  23181. callback(errors);
  23182. }
  23183. var ENUM$1 = 'enum';
  23184. /**
  23185. * Validates an enumerable list.
  23186. *
  23187. * @param rule The validation rule.
  23188. * @param value The value of the field on the source object.
  23189. * @param callback The callback function.
  23190. * @param source The source object being validated.
  23191. * @param options The validation options.
  23192. * @param options.messages The validation messages.
  23193. */
  23194. function enumerable$1(rule, value, callback, source, options) {
  23195. var errors = [];
  23196. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23197. if (validate) {
  23198. if (isEmptyValue(value) && !rule.required) {
  23199. return callback();
  23200. }
  23201. rules.required(rule, value, source, errors, options);
  23202. if (value !== undefined) {
  23203. rules[ENUM$1](rule, value, source, errors, options);
  23204. }
  23205. }
  23206. callback(errors);
  23207. }
  23208. /**
  23209. * Validates a regular expression pattern.
  23210. *
  23211. * Performs validation when a rule only contains
  23212. * a pattern property but is not declared as a string type.
  23213. *
  23214. * @param rule The validation rule.
  23215. * @param value The value of the field on the source object.
  23216. * @param callback The callback function.
  23217. * @param source The source object being validated.
  23218. * @param options The validation options.
  23219. * @param options.messages The validation messages.
  23220. */
  23221. function pattern$2(rule, value, callback, source, options) {
  23222. var errors = [];
  23223. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23224. if (validate) {
  23225. if (isEmptyValue(value, 'string') && !rule.required) {
  23226. return callback();
  23227. }
  23228. rules.required(rule, value, source, errors, options);
  23229. if (!isEmptyValue(value, 'string')) {
  23230. rules.pattern(rule, value, source, errors, options);
  23231. }
  23232. }
  23233. callback(errors);
  23234. }
  23235. function date(rule, value, callback, source, options) {
  23236. var errors = [];
  23237. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23238. if (validate) {
  23239. if (isEmptyValue(value) && !rule.required) {
  23240. return callback();
  23241. }
  23242. rules.required(rule, value, source, errors, options);
  23243. if (!isEmptyValue(value)) {
  23244. var dateObject;
  23245. if (typeof value === 'number') {
  23246. dateObject = new Date(value);
  23247. } else {
  23248. dateObject = value;
  23249. }
  23250. rules.type(rule, dateObject, source, errors, options);
  23251. if (dateObject) {
  23252. rules.range(rule, dateObject.getTime(), source, errors, options);
  23253. }
  23254. }
  23255. }
  23256. callback(errors);
  23257. }
  23258. function required$1(rule, value, callback, source, options) {
  23259. var errors = [];
  23260. var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
  23261. rules.required(rule, value, source, errors, options, type);
  23262. callback(errors);
  23263. }
  23264. function type$1(rule, value, callback, source, options) {
  23265. var ruleType = rule.type;
  23266. var errors = [];
  23267. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23268. if (validate) {
  23269. if (isEmptyValue(value, ruleType) && !rule.required) {
  23270. return callback();
  23271. }
  23272. rules.required(rule, value, source, errors, options, ruleType);
  23273. if (!isEmptyValue(value, ruleType)) {
  23274. rules.type(rule, value, source, errors, options);
  23275. }
  23276. }
  23277. callback(errors);
  23278. }
  23279. /**
  23280. * Performs validation for any type.
  23281. *
  23282. * @param rule The validation rule.
  23283. * @param value The value of the field on the source object.
  23284. * @param callback The callback function.
  23285. * @param source The source object being validated.
  23286. * @param options The validation options.
  23287. * @param options.messages The validation messages.
  23288. */
  23289. function any(rule, value, callback, source, options) {
  23290. var errors = [];
  23291. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  23292. if (validate) {
  23293. if (isEmptyValue(value) && !rule.required) {
  23294. return callback();
  23295. }
  23296. rules.required(rule, value, source, errors, options);
  23297. }
  23298. callback(errors);
  23299. }
  23300. var validators = {
  23301. string: string,
  23302. method: method,
  23303. number: number,
  23304. boolean: _boolean,
  23305. regexp: regexp,
  23306. integer: integer,
  23307. float: floatFn,
  23308. array: array,
  23309. object: object,
  23310. enum: enumerable$1,
  23311. pattern: pattern$2,
  23312. date: date,
  23313. url: type$1,
  23314. hex: type$1,
  23315. email: type$1,
  23316. required: required$1,
  23317. any: any
  23318. };
  23319. function newMessages() {
  23320. return {
  23321. default: 'Validation error on field %s',
  23322. required: '%s is required',
  23323. enum: '%s must be one of %s',
  23324. whitespace: '%s cannot be empty',
  23325. date: {
  23326. format: '%s date %s is invalid for format %s',
  23327. parse: '%s date could not be parsed, %s is invalid ',
  23328. invalid: '%s date %s is invalid'
  23329. },
  23330. types: {
  23331. string: '%s is not a %s',
  23332. method: '%s is not a %s (function)',
  23333. array: '%s is not an %s',
  23334. object: '%s is not an %s',
  23335. number: '%s is not a %s',
  23336. date: '%s is not a %s',
  23337. boolean: '%s is not a %s',
  23338. integer: '%s is not an %s',
  23339. float: '%s is not a %s',
  23340. regexp: '%s is not a valid %s',
  23341. email: '%s is not a valid %s',
  23342. url: '%s is not a valid %s',
  23343. hex: '%s is not a valid %s'
  23344. },
  23345. string: {
  23346. len: '%s must be exactly %s characters',
  23347. min: '%s must be at least %s characters',
  23348. max: '%s cannot be longer than %s characters',
  23349. range: '%s must be between %s and %s characters'
  23350. },
  23351. number: {
  23352. len: '%s must equal %s',
  23353. min: '%s cannot be less than %s',
  23354. max: '%s cannot be greater than %s',
  23355. range: '%s must be between %s and %s'
  23356. },
  23357. array: {
  23358. len: '%s must be exactly %s in length',
  23359. min: '%s cannot be less than %s in length',
  23360. max: '%s cannot be greater than %s in length',
  23361. range: '%s must be between %s and %s in length'
  23362. },
  23363. pattern: {
  23364. mismatch: '%s value %s does not match pattern %s'
  23365. },
  23366. clone: function clone() {
  23367. var cloned = JSON.parse(JSON.stringify(this));
  23368. cloned.clone = this.clone;
  23369. return cloned;
  23370. }
  23371. };
  23372. }
  23373. var messages = newMessages();
  23374. /**
  23375. * Encapsulates a validation schema.
  23376. *
  23377. * @param descriptor An object declaring validation rules
  23378. * for this schema.
  23379. */
  23380. function Schema(descriptor) {
  23381. this.rules = null;
  23382. this._messages = messages;
  23383. this.define(descriptor);
  23384. }
  23385. Schema.prototype = {
  23386. messages: function messages(_messages) {
  23387. if (_messages) {
  23388. this._messages = deepMerge(newMessages(), _messages);
  23389. }
  23390. return this._messages;
  23391. },
  23392. define: function define(rules) {
  23393. if (!rules) {
  23394. throw new Error('Cannot configure a schema with no rules');
  23395. }
  23396. if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
  23397. throw new Error('Rules must be an object');
  23398. }
  23399. this.rules = {};
  23400. var z;
  23401. var item;
  23402. for (z in rules) {
  23403. if (rules.hasOwnProperty(z)) {
  23404. item = rules[z];
  23405. this.rules[z] = Array.isArray(item) ? item : [item];
  23406. }
  23407. }
  23408. },
  23409. validate: function validate(source_, o, oc) {
  23410. var _this = this;
  23411. if (o === void 0) {
  23412. o = {};
  23413. }
  23414. if (oc === void 0) {
  23415. oc = function oc() {};
  23416. }
  23417. var source = source_;
  23418. var options = o;
  23419. var callback = oc;
  23420. if (typeof options === 'function') {
  23421. callback = options;
  23422. options = {};
  23423. }
  23424. if (!this.rules || Object.keys(this.rules).length === 0) {
  23425. if (callback) {
  23426. callback();
  23427. }
  23428. return Promise.resolve();
  23429. }
  23430. function complete(results) {
  23431. var i;
  23432. var errors = [];
  23433. var fields = {};
  23434. function add(e) {
  23435. if (Array.isArray(e)) {
  23436. var _errors;
  23437. errors = (_errors = errors).concat.apply(_errors, e);
  23438. } else {
  23439. errors.push(e);
  23440. }
  23441. }
  23442. for (i = 0; i < results.length; i++) {
  23443. add(results[i]);
  23444. }
  23445. if (!errors.length) {
  23446. errors = null;
  23447. fields = null;
  23448. } else {
  23449. fields = convertFieldsError(errors);
  23450. }
  23451. callback(errors, fields);
  23452. }
  23453. if (options.messages) {
  23454. var messages$1 = this.messages();
  23455. if (messages$1 === messages) {
  23456. messages$1 = newMessages();
  23457. }
  23458. deepMerge(messages$1, options.messages);
  23459. options.messages = messages$1;
  23460. } else {
  23461. options.messages = this.messages();
  23462. }
  23463. var arr;
  23464. var value;
  23465. var series = {};
  23466. var keys = options.keys || Object.keys(this.rules);
  23467. keys.forEach(function (z) {
  23468. arr = _this.rules[z];
  23469. value = source[z];
  23470. arr.forEach(function (r) {
  23471. var rule = r;
  23472. if (typeof rule.transform === 'function') {
  23473. if (source === source_) {
  23474. source = _objectSpread({}, source);
  23475. }
  23476. value = source[z] = rule.transform(value);
  23477. }
  23478. if (typeof rule === 'function') {
  23479. rule = {
  23480. validator: rule
  23481. };
  23482. } else {
  23483. rule = _objectSpread({}, rule);
  23484. }
  23485. rule.validator = _this.getValidationMethod(rule);
  23486. rule.field = z;
  23487. rule.fullField = rule.fullField || z;
  23488. rule.type = _this.getType(rule);
  23489. if (!rule.validator) {
  23490. return;
  23491. }
  23492. series[z] = series[z] || [];
  23493. series[z].push({
  23494. rule: rule,
  23495. value: value,
  23496. source: source,
  23497. field: z
  23498. });
  23499. });
  23500. });
  23501. var errorFields = {};
  23502. return asyncMap(series, options, function (data, doIt) {
  23503. var rule = data.rule;
  23504. var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
  23505. deep = deep && (rule.required || !rule.required && data.value);
  23506. rule.field = data.field;
  23507. function addFullfield(key, schema) {
  23508. return _objectSpread(_objectSpread({}, schema), {}, {
  23509. fullField: "".concat(rule.fullField, ".").concat(key)
  23510. });
  23511. }
  23512. function cb(e) {
  23513. if (e === void 0) {
  23514. e = [];
  23515. }
  23516. var errors = e;
  23517. if (!Array.isArray(errors)) {
  23518. errors = [errors];
  23519. }
  23520. if (!options.suppressWarning && errors.length) {
  23521. Schema.warning('async-validator:', errors);
  23522. }
  23523. if (errors.length && rule.message) {
  23524. errors = [].concat(rule.message);
  23525. }
  23526. errors = errors.map(complementError(rule));
  23527. if (options.first && errors.length) {
  23528. errorFields[rule.field] = 1;
  23529. return doIt(errors);
  23530. }
  23531. if (!deep) {
  23532. doIt(errors);
  23533. } else {
  23534. // if rule is required but the target object
  23535. // does not exist fail at the rule level and don't
  23536. // go deeper
  23537. if (rule.required && !data.value) {
  23538. if (rule.message) {
  23539. errors = [].concat(rule.message).map(complementError(rule));
  23540. } else if (options.error) {
  23541. errors = [options.error(rule, format(options.messages.required, rule.field))];
  23542. } else {
  23543. errors = [];
  23544. }
  23545. return doIt(errors);
  23546. }
  23547. var fieldsSchema = {};
  23548. if (rule.defaultField) {
  23549. for (var k in data.value) {
  23550. if (data.value.hasOwnProperty(k)) {
  23551. fieldsSchema[k] = rule.defaultField;
  23552. }
  23553. }
  23554. }
  23555. fieldsSchema = _objectSpread(_objectSpread({}, fieldsSchema), data.rule.fields);
  23556. for (var f in fieldsSchema) {
  23557. if (fieldsSchema.hasOwnProperty(f)) {
  23558. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  23559. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  23560. }
  23561. }
  23562. var schema = new Schema(fieldsSchema);
  23563. schema.messages(options.messages);
  23564. if (data.rule.options) {
  23565. data.rule.options.messages = options.messages;
  23566. data.rule.options.error = options.error;
  23567. }
  23568. schema.validate(data.value, data.rule.options || options, function (errs) {
  23569. var finalErrors = [];
  23570. if (errors && errors.length) {
  23571. finalErrors.push.apply(finalErrors, errors);
  23572. }
  23573. if (errs && errs.length) {
  23574. finalErrors.push.apply(finalErrors, errs);
  23575. }
  23576. doIt(finalErrors.length ? finalErrors : null);
  23577. });
  23578. }
  23579. }
  23580. var res;
  23581. if (rule.asyncValidator) {
  23582. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  23583. } else if (rule.validator) {
  23584. res = rule.validator(rule, data.value, cb, data.source, options);
  23585. if (res === true) {
  23586. cb();
  23587. } else if (res === false) {
  23588. cb(rule.message || "".concat(rule.field, " fails"));
  23589. } else if (res instanceof Array) {
  23590. cb(res);
  23591. } else if (res instanceof Error) {
  23592. cb(res.message);
  23593. }
  23594. }
  23595. if (res && res.then) {
  23596. res.then(function () {
  23597. return cb();
  23598. }, function (e) {
  23599. return cb(e);
  23600. });
  23601. }
  23602. }, function (results) {
  23603. complete(results);
  23604. });
  23605. },
  23606. getType: function getType(rule) {
  23607. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  23608. rule.type = 'pattern';
  23609. }
  23610. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  23611. throw new Error(format('Unknown rule type %s', rule.type));
  23612. }
  23613. return rule.type || 'string';
  23614. },
  23615. getValidationMethod: function getValidationMethod(rule) {
  23616. if (typeof rule.validator === 'function') {
  23617. return rule.validator;
  23618. }
  23619. var keys = Object.keys(rule);
  23620. var messageIndex = keys.indexOf('message');
  23621. if (messageIndex !== -1) {
  23622. keys.splice(messageIndex, 1);
  23623. }
  23624. if (keys.length === 1 && keys[0] === 'required') {
  23625. return validators.required;
  23626. }
  23627. return validators[this.getType(rule)] || false;
  23628. }
  23629. };
  23630. Schema.register = function register(type, validator) {
  23631. if (typeof validator !== 'function') {
  23632. throw new Error('Cannot register a validator by type, validator is not a function');
  23633. }
  23634. validators[type] = validator;
  23635. };
  23636. Schema.warning = warning;
  23637. Schema.messages = messages;
  23638. var _default = Schema; // # sourceMappingURL=index.js.map
  23639. exports.default = _default;
  23640. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 235)))
  23641. /***/ }),
  23642. /* 235 */
  23643. /*!********************************************************!*\
  23644. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  23645. \********************************************************/
  23646. /*! no static exports found */
  23647. /***/ (function(module, exports, __webpack_require__) {
  23648. exports.nextTick = function nextTick(fn) {
  23649. var args = Array.prototype.slice.call(arguments);
  23650. args.shift();
  23651. setTimeout(function () {
  23652. fn.apply(null, args);
  23653. }, 0);
  23654. };
  23655. exports.platform = exports.arch =
  23656. exports.execPath = exports.title = 'browser';
  23657. exports.pid = 1;
  23658. exports.browser = true;
  23659. exports.env = {};
  23660. exports.argv = [];
  23661. exports.binding = function (name) {
  23662. throw new Error('No such module. (Possibly not yet loaded)')
  23663. };
  23664. (function () {
  23665. var cwd = '/';
  23666. var path;
  23667. exports.cwd = function () { return cwd };
  23668. exports.chdir = function (dir) {
  23669. if (!path) path = __webpack_require__(/*! path */ 236);
  23670. cwd = path.resolve(dir, cwd);
  23671. };
  23672. })();
  23673. exports.exit = exports.kill =
  23674. exports.umask = exports.dlopen =
  23675. exports.uptime = exports.memoryUsage =
  23676. exports.uvCounters = function() {};
  23677. exports.features = {};
  23678. /***/ }),
  23679. /* 236 */
  23680. /*!***********************************************!*\
  23681. !*** ./node_modules/path-browserify/index.js ***!
  23682. \***********************************************/
  23683. /*! no static exports found */
  23684. /***/ (function(module, exports, __webpack_require__) {
  23685. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  23686. // backported and transplited with Babel, with backwards-compat fixes
  23687. // Copyright Joyent, Inc. and other Node contributors.
  23688. //
  23689. // Permission is hereby granted, free of charge, to any person obtaining a
  23690. // copy of this software and associated documentation files (the
  23691. // "Software"), to deal in the Software without restriction, including
  23692. // without limitation the rights to use, copy, modify, merge, publish,
  23693. // distribute, sublicense, and/or sell copies of the Software, and to permit
  23694. // persons to whom the Software is furnished to do so, subject to the
  23695. // following conditions:
  23696. //
  23697. // The above copyright notice and this permission notice shall be included
  23698. // in all copies or substantial portions of the Software.
  23699. //
  23700. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  23701. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  23702. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  23703. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  23704. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  23705. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  23706. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  23707. // resolves . and .. elements in a path array with directory names there
  23708. // must be no slashes, empty elements, or device names (c:\) in the array
  23709. // (so also no leading and trailing slashes - it does not distinguish
  23710. // relative and absolute paths)
  23711. function normalizeArray(parts, allowAboveRoot) {
  23712. // if the path tries to go above the root, `up` ends up > 0
  23713. var up = 0;
  23714. for (var i = parts.length - 1; i >= 0; i--) {
  23715. var last = parts[i];
  23716. if (last === '.') {
  23717. parts.splice(i, 1);
  23718. } else if (last === '..') {
  23719. parts.splice(i, 1);
  23720. up++;
  23721. } else if (up) {
  23722. parts.splice(i, 1);
  23723. up--;
  23724. }
  23725. }
  23726. // if the path is allowed to go above the root, restore leading ..s
  23727. if (allowAboveRoot) {
  23728. for (; up--; up) {
  23729. parts.unshift('..');
  23730. }
  23731. }
  23732. return parts;
  23733. }
  23734. // path.resolve([from ...], to)
  23735. // posix version
  23736. exports.resolve = function() {
  23737. var resolvedPath = '',
  23738. resolvedAbsolute = false;
  23739. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  23740. var path = (i >= 0) ? arguments[i] : process.cwd();
  23741. // Skip empty and invalid entries
  23742. if (typeof path !== 'string') {
  23743. throw new TypeError('Arguments to path.resolve must be strings');
  23744. } else if (!path) {
  23745. continue;
  23746. }
  23747. resolvedPath = path + '/' + resolvedPath;
  23748. resolvedAbsolute = path.charAt(0) === '/';
  23749. }
  23750. // At this point the path should be resolved to a full absolute path, but
  23751. // handle relative paths to be safe (might happen when process.cwd() fails)
  23752. // Normalize the path
  23753. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  23754. return !!p;
  23755. }), !resolvedAbsolute).join('/');
  23756. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  23757. };
  23758. // path.normalize(path)
  23759. // posix version
  23760. exports.normalize = function(path) {
  23761. var isAbsolute = exports.isAbsolute(path),
  23762. trailingSlash = substr(path, -1) === '/';
  23763. // Normalize the path
  23764. path = normalizeArray(filter(path.split('/'), function(p) {
  23765. return !!p;
  23766. }), !isAbsolute).join('/');
  23767. if (!path && !isAbsolute) {
  23768. path = '.';
  23769. }
  23770. if (path && trailingSlash) {
  23771. path += '/';
  23772. }
  23773. return (isAbsolute ? '/' : '') + path;
  23774. };
  23775. // posix version
  23776. exports.isAbsolute = function(path) {
  23777. return path.charAt(0) === '/';
  23778. };
  23779. // posix version
  23780. exports.join = function() {
  23781. var paths = Array.prototype.slice.call(arguments, 0);
  23782. return exports.normalize(filter(paths, function(p, index) {
  23783. if (typeof p !== 'string') {
  23784. throw new TypeError('Arguments to path.join must be strings');
  23785. }
  23786. return p;
  23787. }).join('/'));
  23788. };
  23789. // path.relative(from, to)
  23790. // posix version
  23791. exports.relative = function(from, to) {
  23792. from = exports.resolve(from).substr(1);
  23793. to = exports.resolve(to).substr(1);
  23794. function trim(arr) {
  23795. var start = 0;
  23796. for (; start < arr.length; start++) {
  23797. if (arr[start] !== '') break;
  23798. }
  23799. var end = arr.length - 1;
  23800. for (; end >= 0; end--) {
  23801. if (arr[end] !== '') break;
  23802. }
  23803. if (start > end) return [];
  23804. return arr.slice(start, end - start + 1);
  23805. }
  23806. var fromParts = trim(from.split('/'));
  23807. var toParts = trim(to.split('/'));
  23808. var length = Math.min(fromParts.length, toParts.length);
  23809. var samePartsLength = length;
  23810. for (var i = 0; i < length; i++) {
  23811. if (fromParts[i] !== toParts[i]) {
  23812. samePartsLength = i;
  23813. break;
  23814. }
  23815. }
  23816. var outputParts = [];
  23817. for (var i = samePartsLength; i < fromParts.length; i++) {
  23818. outputParts.push('..');
  23819. }
  23820. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  23821. return outputParts.join('/');
  23822. };
  23823. exports.sep = '/';
  23824. exports.delimiter = ':';
  23825. exports.dirname = function (path) {
  23826. if (typeof path !== 'string') path = path + '';
  23827. if (path.length === 0) return '.';
  23828. var code = path.charCodeAt(0);
  23829. var hasRoot = code === 47 /*/*/;
  23830. var end = -1;
  23831. var matchedSlash = true;
  23832. for (var i = path.length - 1; i >= 1; --i) {
  23833. code = path.charCodeAt(i);
  23834. if (code === 47 /*/*/) {
  23835. if (!matchedSlash) {
  23836. end = i;
  23837. break;
  23838. }
  23839. } else {
  23840. // We saw the first non-path separator
  23841. matchedSlash = false;
  23842. }
  23843. }
  23844. if (end === -1) return hasRoot ? '/' : '.';
  23845. if (hasRoot && end === 1) {
  23846. // return '//';
  23847. // Backwards-compat fix:
  23848. return '/';
  23849. }
  23850. return path.slice(0, end);
  23851. };
  23852. function basename(path) {
  23853. if (typeof path !== 'string') path = path + '';
  23854. var start = 0;
  23855. var end = -1;
  23856. var matchedSlash = true;
  23857. var i;
  23858. for (i = path.length - 1; i >= 0; --i) {
  23859. if (path.charCodeAt(i) === 47 /*/*/) {
  23860. // If we reached a path separator that was not part of a set of path
  23861. // separators at the end of the string, stop now
  23862. if (!matchedSlash) {
  23863. start = i + 1;
  23864. break;
  23865. }
  23866. } else if (end === -1) {
  23867. // We saw the first non-path separator, mark this as the end of our
  23868. // path component
  23869. matchedSlash = false;
  23870. end = i + 1;
  23871. }
  23872. }
  23873. if (end === -1) return '';
  23874. return path.slice(start, end);
  23875. }
  23876. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  23877. // in new Node.js versions, so only basename() above is backported here
  23878. exports.basename = function (path, ext) {
  23879. var f = basename(path);
  23880. if (ext && f.substr(-1 * ext.length) === ext) {
  23881. f = f.substr(0, f.length - ext.length);
  23882. }
  23883. return f;
  23884. };
  23885. exports.extname = function (path) {
  23886. if (typeof path !== 'string') path = path + '';
  23887. var startDot = -1;
  23888. var startPart = 0;
  23889. var end = -1;
  23890. var matchedSlash = true;
  23891. // Track the state of characters (if any) we see before our first dot and
  23892. // after any path separator we find
  23893. var preDotState = 0;
  23894. for (var i = path.length - 1; i >= 0; --i) {
  23895. var code = path.charCodeAt(i);
  23896. if (code === 47 /*/*/) {
  23897. // If we reached a path separator that was not part of a set of path
  23898. // separators at the end of the string, stop now
  23899. if (!matchedSlash) {
  23900. startPart = i + 1;
  23901. break;
  23902. }
  23903. continue;
  23904. }
  23905. if (end === -1) {
  23906. // We saw the first non-path separator, mark this as the end of our
  23907. // extension
  23908. matchedSlash = false;
  23909. end = i + 1;
  23910. }
  23911. if (code === 46 /*.*/) {
  23912. // If this is our first dot, mark it as the start of our extension
  23913. if (startDot === -1)
  23914. startDot = i;
  23915. else if (preDotState !== 1)
  23916. preDotState = 1;
  23917. } else if (startDot !== -1) {
  23918. // We saw a non-dot and non-path separator before our dot, so we should
  23919. // have a good chance at having a non-empty extension
  23920. preDotState = -1;
  23921. }
  23922. }
  23923. if (startDot === -1 || end === -1 ||
  23924. // We saw a non-dot character immediately before the dot
  23925. preDotState === 0 ||
  23926. // The (right-most) trimmed path component is exactly '..'
  23927. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  23928. return '';
  23929. }
  23930. return path.slice(startDot, end);
  23931. };
  23932. function filter (xs, f) {
  23933. if (xs.filter) return xs.filter(f);
  23934. var res = [];
  23935. for (var i = 0; i < xs.length; i++) {
  23936. if (f(xs[i], i, xs)) res.push(xs[i]);
  23937. }
  23938. return res;
  23939. }
  23940. // String.prototype.substr - negative index don't work in IE8
  23941. var substr = 'ab'.substr(-1) === 'b'
  23942. ? function (str, start, len) { return str.substr(start, len) }
  23943. : function (str, start, len) {
  23944. if (start < 0) start = str.length + start;
  23945. return str.substr(start, len);
  23946. }
  23947. ;
  23948. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 235)))
  23949. /***/ }),
  23950. /* 237 */,
  23951. /* 238 */,
  23952. /* 239 */,
  23953. /* 240 */,
  23954. /* 241 */,
  23955. /* 242 */
  23956. /*!******************************************************************************************************************!*\
  23957. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/components/u-icon/icons.js ***!
  23958. \******************************************************************************************************************/
  23959. /*! no static exports found */
  23960. /***/ (function(module, exports, __webpack_require__) {
  23961. "use strict";
  23962. Object.defineProperty(exports, "__esModule", {
  23963. value: true
  23964. });
  23965. exports.default = void 0;
  23966. var _default = {
  23967. 'uicon-level': "\uE693",
  23968. 'uicon-column-line': "\uE68E",
  23969. 'uicon-checkbox-mark': "\uE807",
  23970. 'uicon-folder': "\uE7F5",
  23971. 'uicon-movie': "\uE7F6",
  23972. 'uicon-star-fill': "\uE669",
  23973. 'uicon-star': "\uE65F",
  23974. 'uicon-phone-fill': "\uE64F",
  23975. 'uicon-phone': "\uE622",
  23976. 'uicon-apple-fill': "\uE881",
  23977. 'uicon-chrome-circle-fill': "\uE885",
  23978. 'uicon-backspace': "\uE67B",
  23979. 'uicon-attach': "\uE632",
  23980. 'uicon-cut': "\uE948",
  23981. 'uicon-empty-car': "\uE602",
  23982. 'uicon-empty-coupon': "\uE682",
  23983. 'uicon-empty-address': "\uE646",
  23984. 'uicon-empty-favor': "\uE67C",
  23985. 'uicon-empty-permission': "\uE686",
  23986. 'uicon-empty-news': "\uE687",
  23987. 'uicon-empty-search': "\uE664",
  23988. 'uicon-github-circle-fill': "\uE887",
  23989. 'uicon-rmb': "\uE608",
  23990. 'uicon-person-delete-fill': "\uE66A",
  23991. 'uicon-reload': "\uE788",
  23992. 'uicon-order': "\uE68F",
  23993. 'uicon-server-man': "\uE6BC",
  23994. 'uicon-search': "\uE62A",
  23995. 'uicon-fingerprint': "\uE955",
  23996. 'uicon-more-dot-fill': "\uE630",
  23997. 'uicon-scan': "\uE662",
  23998. 'uicon-share-square': "\uE60B",
  23999. 'uicon-map': "\uE61D",
  24000. 'uicon-map-fill': "\uE64E",
  24001. 'uicon-tags': "\uE629",
  24002. 'uicon-tags-fill': "\uE651",
  24003. 'uicon-bookmark-fill': "\uE63B",
  24004. 'uicon-bookmark': "\uE60A",
  24005. 'uicon-eye': "\uE613",
  24006. 'uicon-eye-fill': "\uE641",
  24007. 'uicon-mic': "\uE64A",
  24008. 'uicon-mic-off': "\uE649",
  24009. 'uicon-calendar': "\uE66E",
  24010. 'uicon-calendar-fill': "\uE634",
  24011. 'uicon-trash': "\uE623",
  24012. 'uicon-trash-fill': "\uE658",
  24013. 'uicon-play-left': "\uE66D",
  24014. 'uicon-play-right': "\uE610",
  24015. 'uicon-minus': "\uE618",
  24016. 'uicon-plus': "\uE62D",
  24017. 'uicon-info': "\uE653",
  24018. 'uicon-info-circle': "\uE7D2",
  24019. 'uicon-info-circle-fill': "\uE64B",
  24020. 'uicon-question': "\uE715",
  24021. 'uicon-error': "\uE6D3",
  24022. 'uicon-close': "\uE685",
  24023. 'uicon-checkmark': "\uE6A8",
  24024. 'uicon-android-circle-fill': "\uE67E",
  24025. 'uicon-android-fill': "\uE67D",
  24026. 'uicon-ie': "\uE87B",
  24027. 'uicon-IE-circle-fill': "\uE889",
  24028. 'uicon-google': "\uE87A",
  24029. 'uicon-google-circle-fill': "\uE88A",
  24030. 'uicon-setting-fill': "\uE872",
  24031. 'uicon-setting': "\uE61F",
  24032. 'uicon-minus-square-fill': "\uE855",
  24033. 'uicon-plus-square-fill': "\uE856",
  24034. 'uicon-heart': "\uE7DF",
  24035. 'uicon-heart-fill': "\uE851",
  24036. 'uicon-camera': "\uE7D7",
  24037. 'uicon-camera-fill': "\uE870",
  24038. 'uicon-more-circle': "\uE63E",
  24039. 'uicon-more-circle-fill': "\uE645",
  24040. 'uicon-chat': "\uE620",
  24041. 'uicon-chat-fill': "\uE61E",
  24042. 'uicon-bag-fill': "\uE617",
  24043. 'uicon-bag': "\uE619",
  24044. 'uicon-error-circle-fill': "\uE62C",
  24045. 'uicon-error-circle': "\uE624",
  24046. 'uicon-close-circle': "\uE63F",
  24047. 'uicon-close-circle-fill': "\uE637",
  24048. 'uicon-checkmark-circle': "\uE63D",
  24049. 'uicon-checkmark-circle-fill': "\uE635",
  24050. 'uicon-question-circle-fill': "\uE666",
  24051. 'uicon-question-circle': "\uE625",
  24052. 'uicon-share': "\uE631",
  24053. 'uicon-share-fill': "\uE65E",
  24054. 'uicon-shopping-cart': "\uE621",
  24055. 'uicon-shopping-cart-fill': "\uE65D",
  24056. 'uicon-bell': "\uE609",
  24057. 'uicon-bell-fill': "\uE640",
  24058. 'uicon-list': "\uE650",
  24059. 'uicon-list-dot': "\uE616",
  24060. 'uicon-zhihu': "\uE6BA",
  24061. 'uicon-zhihu-circle-fill': "\uE709",
  24062. 'uicon-zhifubao': "\uE6B9",
  24063. 'uicon-zhifubao-circle-fill': "\uE6B8",
  24064. 'uicon-weixin-circle-fill': "\uE6B1",
  24065. 'uicon-weixin-fill': "\uE6B2",
  24066. 'uicon-twitter-circle-fill': "\uE6AB",
  24067. 'uicon-twitter': "\uE6AA",
  24068. 'uicon-taobao-circle-fill': "\uE6A7",
  24069. 'uicon-taobao': "\uE6A6",
  24070. 'uicon-weibo-circle-fill': "\uE6A5",
  24071. 'uicon-weibo': "\uE6A4",
  24072. 'uicon-qq-fill': "\uE6A1",
  24073. 'uicon-qq-circle-fill': "\uE6A0",
  24074. 'uicon-moments-circel-fill': "\uE69A",
  24075. 'uicon-moments': "\uE69B",
  24076. 'uicon-qzone': "\uE695",
  24077. 'uicon-qzone-circle-fill': "\uE696",
  24078. 'uicon-baidu-circle-fill': "\uE680",
  24079. 'uicon-baidu': "\uE681",
  24080. 'uicon-facebook-circle-fill': "\uE68A",
  24081. 'uicon-facebook': "\uE689",
  24082. 'uicon-car': "\uE60C",
  24083. 'uicon-car-fill': "\uE636",
  24084. 'uicon-warning-fill': "\uE64D",
  24085. 'uicon-warning': "\uE694",
  24086. 'uicon-clock-fill': "\uE638",
  24087. 'uicon-clock': "\uE60F",
  24088. 'uicon-edit-pen': "\uE612",
  24089. 'uicon-edit-pen-fill': "\uE66B",
  24090. 'uicon-email': "\uE611",
  24091. 'uicon-email-fill': "\uE642",
  24092. 'uicon-minus-circle': "\uE61B",
  24093. 'uicon-minus-circle-fill': "\uE652",
  24094. 'uicon-plus-circle': "\uE62E",
  24095. 'uicon-plus-circle-fill': "\uE661",
  24096. 'uicon-file-text': "\uE663",
  24097. 'uicon-file-text-fill': "\uE665",
  24098. 'uicon-pushpin': "\uE7E3",
  24099. 'uicon-pushpin-fill': "\uE86E",
  24100. 'uicon-grid': "\uE673",
  24101. 'uicon-grid-fill': "\uE678",
  24102. 'uicon-play-circle': "\uE647",
  24103. 'uicon-play-circle-fill': "\uE655",
  24104. 'uicon-pause-circle-fill': "\uE654",
  24105. 'uicon-pause': "\uE8FA",
  24106. 'uicon-pause-circle': "\uE643",
  24107. 'uicon-eye-off': "\uE648",
  24108. 'uicon-eye-off-outline': "\uE62B",
  24109. 'uicon-gift-fill': "\uE65C",
  24110. 'uicon-gift': "\uE65B",
  24111. 'uicon-rmb-circle-fill': "\uE657",
  24112. 'uicon-rmb-circle': "\uE677",
  24113. 'uicon-kefu-ermai': "\uE656",
  24114. 'uicon-server-fill': "\uE751",
  24115. 'uicon-coupon-fill': "\uE8C4",
  24116. 'uicon-coupon': "\uE8AE",
  24117. 'uicon-integral': "\uE704",
  24118. 'uicon-integral-fill': "\uE703",
  24119. 'uicon-home-fill': "\uE964",
  24120. 'uicon-home': "\uE965",
  24121. 'uicon-hourglass-half-fill': "\uE966",
  24122. 'uicon-hourglass': "\uE967",
  24123. 'uicon-account': "\uE628",
  24124. 'uicon-plus-people-fill': "\uE626",
  24125. 'uicon-minus-people-fill': "\uE615",
  24126. 'uicon-account-fill': "\uE614",
  24127. 'uicon-thumb-down-fill': "\uE726",
  24128. 'uicon-thumb-down': "\uE727",
  24129. 'uicon-thumb-up': "\uE733",
  24130. 'uicon-thumb-up-fill': "\uE72F",
  24131. 'uicon-lock-fill': "\uE979",
  24132. 'uicon-lock-open': "\uE973",
  24133. 'uicon-lock-opened-fill': "\uE974",
  24134. 'uicon-lock': "\uE97A",
  24135. 'uicon-red-packet-fill': "\uE690",
  24136. 'uicon-photo-fill': "\uE98B",
  24137. 'uicon-photo': "\uE98D",
  24138. 'uicon-volume-off-fill': "\uE659",
  24139. 'uicon-volume-off': "\uE644",
  24140. 'uicon-volume-fill': "\uE670",
  24141. 'uicon-volume': "\uE633",
  24142. 'uicon-red-packet': "\uE691",
  24143. 'uicon-download': "\uE63C",
  24144. 'uicon-arrow-up-fill': "\uE6B0",
  24145. 'uicon-arrow-down-fill': "\uE600",
  24146. 'uicon-play-left-fill': "\uE675",
  24147. 'uicon-play-right-fill': "\uE676",
  24148. 'uicon-rewind-left-fill': "\uE679",
  24149. 'uicon-rewind-right-fill': "\uE67A",
  24150. 'uicon-arrow-downward': "\uE604",
  24151. 'uicon-arrow-leftward': "\uE601",
  24152. 'uicon-arrow-rightward': "\uE603",
  24153. 'uicon-arrow-upward': "\uE607",
  24154. 'uicon-arrow-down': "\uE60D",
  24155. 'uicon-arrow-right': "\uE605",
  24156. 'uicon-arrow-left': "\uE60E",
  24157. 'uicon-arrow-up': "\uE606",
  24158. 'uicon-skip-back-left': "\uE674",
  24159. 'uicon-skip-forward-right': "\uE672",
  24160. 'uicon-rewind-right': "\uE66F",
  24161. 'uicon-rewind-left': "\uE671",
  24162. 'uicon-arrow-right-double': "\uE68D",
  24163. 'uicon-arrow-left-double': "\uE68C",
  24164. 'uicon-wifi-off': "\uE668",
  24165. 'uicon-wifi': "\uE667",
  24166. 'uicon-empty-data': "\uE62F",
  24167. 'uicon-empty-history': "\uE684",
  24168. 'uicon-empty-list': "\uE68B",
  24169. 'uicon-empty-page': "\uE627",
  24170. 'uicon-empty-order': "\uE639",
  24171. 'uicon-man': "\uE697",
  24172. 'uicon-woman': "\uE69C",
  24173. 'uicon-man-add': "\uE61C",
  24174. 'uicon-man-add-fill': "\uE64C",
  24175. 'uicon-man-delete': "\uE61A",
  24176. 'uicon-man-delete-fill': "\uE66A",
  24177. 'uicon-zh': "\uE70A",
  24178. 'uicon-en': "\uE692"
  24179. };
  24180. exports.default = _default;
  24181. /***/ }),
  24182. /* 243 */
  24183. /*!******************************************************************************************************************!*\
  24184. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/components/u-icon/props.js ***!
  24185. \******************************************************************************************************************/
  24186. /*! no static exports found */
  24187. /***/ (function(module, exports, __webpack_require__) {
  24188. "use strict";
  24189. /* WEBPACK VAR INJECTION */(function(uni) {
  24190. Object.defineProperty(exports, "__esModule", {
  24191. value: true
  24192. });
  24193. exports.default = void 0;
  24194. var _default = {
  24195. props: {
  24196. // 图标类名
  24197. name: {
  24198. type: String,
  24199. default: uni.$u.props.icon.name
  24200. },
  24201. // 图标颜色,可接受主题色
  24202. color: {
  24203. type: String,
  24204. default: uni.$u.props.icon.color
  24205. },
  24206. // 字体大小,单位px
  24207. size: {
  24208. type: [String, Number],
  24209. default: uni.$u.props.icon.size
  24210. },
  24211. // 是否显示粗体
  24212. bold: {
  24213. type: Boolean,
  24214. default: uni.$u.props.icon.bold
  24215. },
  24216. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  24217. index: {
  24218. type: [String, Number],
  24219. default: uni.$u.props.icon.index
  24220. },
  24221. // 触摸图标时的类名
  24222. hoverClass: {
  24223. type: String,
  24224. default: uni.$u.props.icon.hoverClass
  24225. },
  24226. // 自定义扩展前缀,方便用户扩展自己的图标库
  24227. customPrefix: {
  24228. type: String,
  24229. default: uni.$u.props.icon.customPrefix
  24230. },
  24231. // 图标右边或者下面的文字
  24232. label: {
  24233. type: [String, Number],
  24234. default: uni.$u.props.icon.label
  24235. },
  24236. // label的位置,只能右边或者下边
  24237. labelPos: {
  24238. type: String,
  24239. default: uni.$u.props.icon.labelPos
  24240. },
  24241. // label的大小
  24242. labelSize: {
  24243. type: [String, Number],
  24244. default: uni.$u.props.icon.labelSize
  24245. },
  24246. // label的颜色
  24247. labelColor: {
  24248. type: String,
  24249. default: uni.$u.props.icon.labelColor
  24250. },
  24251. // label与图标的距离
  24252. space: {
  24253. type: [String, Number],
  24254. default: uni.$u.props.icon.space
  24255. },
  24256. // 图片的mode
  24257. imgMode: {
  24258. type: String,
  24259. default: uni.$u.props.icon.imgMode
  24260. },
  24261. // 用于显示图片小图标时,图片的宽度
  24262. width: {
  24263. type: [String, Number],
  24264. default: uni.$u.props.icon.width
  24265. },
  24266. // 用于显示图片小图标时,图片的高度
  24267. height: {
  24268. type: [String, Number],
  24269. default: uni.$u.props.icon.height
  24270. },
  24271. // 用于解决某些情况下,让图标垂直居中的用途
  24272. top: {
  24273. type: [String, Number],
  24274. default: uni.$u.props.icon.top
  24275. },
  24276. // 是否阻止事件传播
  24277. stop: {
  24278. type: Boolean,
  24279. default: uni.$u.props.icon.stop
  24280. }
  24281. }
  24282. };
  24283. exports.default = _default;
  24284. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  24285. /***/ }),
  24286. /* 244 */,
  24287. /* 245 */,
  24288. /* 246 */,
  24289. /* 247 */,
  24290. /* 248 */,
  24291. /* 249 */,
  24292. /* 250 */,
  24293. /* 251 */
  24294. /*!******************************************************************************************************************!*\
  24295. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/components/u-line/props.js ***!
  24296. \******************************************************************************************************************/
  24297. /*! no static exports found */
  24298. /***/ (function(module, exports, __webpack_require__) {
  24299. "use strict";
  24300. /* WEBPACK VAR INJECTION */(function(uni) {
  24301. Object.defineProperty(exports, "__esModule", {
  24302. value: true
  24303. });
  24304. exports.default = void 0;
  24305. var _default = {
  24306. props: {
  24307. color: {
  24308. type: String,
  24309. default: uni.$u.props.line.color
  24310. },
  24311. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  24312. length: {
  24313. type: [String, Number],
  24314. default: uni.$u.props.line.length
  24315. },
  24316. // 线条方向,col-竖向,row-横向
  24317. direction: {
  24318. type: String,
  24319. default: uni.$u.props.line.direction
  24320. },
  24321. // 是否显示细边框
  24322. hairline: {
  24323. type: Boolean,
  24324. default: uni.$u.props.line.hairline
  24325. },
  24326. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  24327. margin: {
  24328. type: [String, Number],
  24329. default: uni.$u.props.line.margin
  24330. },
  24331. // 是否虚线,true-虚线,false-实线
  24332. dashed: {
  24333. type: Boolean,
  24334. default: uni.$u.props.line.dashed
  24335. }
  24336. }
  24337. };
  24338. exports.default = _default;
  24339. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  24340. /***/ }),
  24341. /* 252 */,
  24342. /* 253 */,
  24343. /* 254 */,
  24344. /* 255 */,
  24345. /* 256 */,
  24346. /* 257 */,
  24347. /* 258 */,
  24348. /* 259 */
  24349. /*!**************************************************************************************************************************!*\
  24350. !*** C:/Users/14116/Documents/HBuilderProjects/uniapp-template/node_modules/uview-ui/components/u-loading-icon/props.js ***!
  24351. \**************************************************************************************************************************/
  24352. /*! no static exports found */
  24353. /***/ (function(module, exports, __webpack_require__) {
  24354. "use strict";
  24355. /* WEBPACK VAR INJECTION */(function(uni) {
  24356. Object.defineProperty(exports, "__esModule", {
  24357. value: true
  24358. });
  24359. exports.default = void 0;
  24360. var _default = {
  24361. props: {
  24362. // 是否显示组件
  24363. show: {
  24364. type: Boolean,
  24365. default: uni.$u.props.loadingIcon.show
  24366. },
  24367. // 颜色
  24368. color: {
  24369. type: String,
  24370. default: uni.$u.props.loadingIcon.color
  24371. },
  24372. // 提示文字颜色
  24373. textColor: {
  24374. type: String,
  24375. default: uni.$u.props.loadingIcon.textColor
  24376. },
  24377. // 文字和图标是否垂直排列
  24378. vertical: {
  24379. type: Boolean,
  24380. default: uni.$u.props.loadingIcon.vertical
  24381. },
  24382. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  24383. mode: {
  24384. type: String,
  24385. default: uni.$u.props.loadingIcon.mode
  24386. },
  24387. // 图标大小,单位默认px
  24388. size: {
  24389. type: [String, Number],
  24390. default: uni.$u.props.loadingIcon.size
  24391. },
  24392. // 文字大小
  24393. textSize: {
  24394. type: [String, Number],
  24395. default: uni.$u.props.loadingIcon.textSize
  24396. },
  24397. // 文字内容
  24398. text: {
  24399. type: [String, Number],
  24400. default: uni.$u.props.loadingIcon.text
  24401. },
  24402. // 动画模式
  24403. timingFunction: {
  24404. type: String,
  24405. default: uni.$u.props.loadingIcon.timingFunction
  24406. },
  24407. // 动画执行周期时间
  24408. duration: {
  24409. type: [String, Number],
  24410. default: uni.$u.props.loadingIcon.duration
  24411. },
  24412. // mode=circle时的暗边颜色
  24413. inactiveColor: {
  24414. type: String,
  24415. default: uni.$u.props.loadingIcon.inactiveColor
  24416. }
  24417. }
  24418. };
  24419. exports.default = _default;
  24420. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  24421. /***/ })
  24422. ]]);
  24423. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map