框架源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1736 lines
46 KiB

4 years ago
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "/dist/";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = 501);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 0:
  90. /***/ (function(module, exports, __webpack_require__) {
  91. "use strict";
  92. var _interopRequireDefault = __webpack_require__(1);
  93. exports.__esModule = true;
  94. exports.noop = noop;
  95. exports.isDef = isDef;
  96. exports.isFunction = isFunction;
  97. exports.isObject = isObject;
  98. exports.isPromise = isPromise;
  99. exports.get = get;
  100. exports.isServer = exports.inBrowser = exports.addUnit = exports.createNamespace = void 0;
  101. var _vue = _interopRequireDefault(__webpack_require__(4));
  102. var _create = __webpack_require__(24);
  103. exports.createNamespace = _create.createNamespace;
  104. var _unit = __webpack_require__(20);
  105. exports.addUnit = _unit.addUnit;
  106. var inBrowser = typeof window !== 'undefined';
  107. exports.inBrowser = inBrowser;
  108. var isServer = _vue.default.prototype.$isServer; // eslint-disable-next-line @typescript-eslint/no-empty-function
  109. exports.isServer = isServer;
  110. function noop() {}
  111. function isDef(val) {
  112. return val !== undefined && val !== null;
  113. }
  114. function isFunction(val) {
  115. return typeof val === 'function';
  116. }
  117. function isObject(val) {
  118. return val !== null && typeof val === 'object';
  119. }
  120. function isPromise(val) {
  121. return isObject(val) && isFunction(val.then) && isFunction(val.catch);
  122. }
  123. function get(object, path) {
  124. var keys = path.split('.');
  125. var result = object;
  126. keys.forEach(function (key) {
  127. var _result$key;
  128. result = (_result$key = result[key]) != null ? _result$key : '';
  129. });
  130. return result;
  131. }
  132. /***/ }),
  133. /***/ 1:
  134. /***/ (function(module, exports) {
  135. function _interopRequireDefault(obj) {
  136. return obj && obj.__esModule ? obj : {
  137. "default": obj
  138. };
  139. }
  140. module.exports = _interopRequireDefault;
  141. /***/ }),
  142. /***/ 11:
  143. /***/ (function(module, exports, __webpack_require__) {
  144. "use strict";
  145. var _interopRequireDefault = __webpack_require__(1);
  146. exports.__esModule = true;
  147. exports.default = void 0;
  148. var _vue = _interopRequireDefault(__webpack_require__(4));
  149. var _deepAssign = __webpack_require__(21);
  150. var _zhCN = _interopRequireDefault(__webpack_require__(27));
  151. var proto = _vue.default.prototype;
  152. var defineReactive = _vue.default.util.defineReactive;
  153. defineReactive(proto, '$vantLang', 'zh-CN');
  154. defineReactive(proto, '$vantMessages', {
  155. 'zh-CN': _zhCN.default
  156. });
  157. var _default = {
  158. messages: function messages() {
  159. return proto.$vantMessages[proto.$vantLang];
  160. },
  161. use: function use(lang, messages) {
  162. var _this$add;
  163. proto.$vantLang = lang;
  164. this.add((_this$add = {}, _this$add[lang] = messages, _this$add));
  165. },
  166. add: function add(messages) {
  167. if (messages === void 0) {
  168. messages = {};
  169. }
  170. (0, _deepAssign.deepAssign)(proto.$vantMessages, messages);
  171. }
  172. };
  173. exports.default = _default;
  174. /***/ }),
  175. /***/ 12:
  176. /***/ (function(module, exports) {
  177. /**
  178. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  179. * embed the css on the page. This breaks all relative urls because now they are relative to a
  180. * bundle instead of the current page.
  181. *
  182. * One solution is to only use full urls, but that may be impossible.
  183. *
  184. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  185. *
  186. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  187. *
  188. */
  189. module.exports = function (css) {
  190. // get current location
  191. var location = typeof window !== "undefined" && window.location;
  192. if (!location) {
  193. throw new Error("fixUrls requires window.location");
  194. }
  195. // blank or null?
  196. if (!css || typeof css !== "string") {
  197. return css;
  198. }
  199. var baseUrl = location.protocol + "//" + location.host;
  200. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  201. // convert each url(...)
  202. /*
  203. This regular expression is just a way to recursively match brackets within
  204. a string.
  205. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  206. ( = Start a capturing group
  207. (?: = Start a non-capturing group
  208. [^)(] = Match anything that isn't a parentheses
  209. | = OR
  210. \( = Match a start parentheses
  211. (?: = Start another non-capturing groups
  212. [^)(]+ = Match anything that isn't a parentheses
  213. | = OR
  214. \( = Match a start parentheses
  215. [^)(]* = Match anything that isn't a parentheses
  216. \) = Match a end parentheses
  217. ) = End Group
  218. *\) = Match anything and then a close parens
  219. ) = Close non-capturing group
  220. * = Match anything
  221. ) = Close capturing group
  222. \) = Match a close parens
  223. /gi = Get all matches, not the first. Be case insensitive.
  224. */
  225. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  226. // strip quotes (if they exist)
  227. var unquotedOrigUrl = origUrl
  228. .trim()
  229. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  230. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  231. // already a full url? no change
  232. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
  233. return fullMatch;
  234. }
  235. // convert the url to a full url
  236. var newUrl;
  237. if (unquotedOrigUrl.indexOf("//") === 0) {
  238. //TODO: should we add protocol?
  239. newUrl = unquotedOrigUrl;
  240. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  241. // path should be relative to the base url
  242. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  243. } else {
  244. // path should be relative to current directory
  245. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  246. }
  247. // send back the fixed url(...)
  248. return "url(" + JSON.stringify(newUrl) + ")";
  249. });
  250. // send back the fixed css
  251. return fixedCss;
  252. };
  253. /***/ }),
  254. /***/ 176:
  255. /***/ (function(module, exports, __webpack_require__) {
  256. "use strict";
  257. exports.__esModule = true;
  258. exports.callInterceptor = callInterceptor;
  259. var _ = __webpack_require__(0);
  260. function callInterceptor(options) {
  261. var interceptor = options.interceptor,
  262. args = options.args,
  263. done = options.done;
  264. if (interceptor) {
  265. var returnVal = interceptor.apply(void 0, args);
  266. if ((0, _.isPromise)(returnVal)) {
  267. returnVal.then(function (value) {
  268. if (value) {
  269. done();
  270. }
  271. }).catch(_.noop);
  272. } else if (returnVal) {
  273. done();
  274. }
  275. } else {
  276. done();
  277. }
  278. }
  279. /***/ }),
  280. /***/ 19:
  281. /***/ (function(module, exports, __webpack_require__) {
  282. "use strict";
  283. exports.__esModule = true;
  284. exports.isNumeric = isNumeric;
  285. exports.isNaN = isNaN;
  286. function isNumeric(val) {
  287. return /^\d+(\.\d+)?$/.test(val);
  288. }
  289. function isNaN(val) {
  290. if (Number.isNaN) {
  291. return Number.isNaN(val);
  292. } // eslint-disable-next-line no-self-compare
  293. return val !== val;
  294. }
  295. /***/ }),
  296. /***/ 20:
  297. /***/ (function(module, exports, __webpack_require__) {
  298. "use strict";
  299. exports.__esModule = true;
  300. exports.addUnit = addUnit;
  301. exports.unitToPx = unitToPx;
  302. var _ = __webpack_require__(0);
  303. var _number = __webpack_require__(19);
  304. function addUnit(value) {
  305. if (!(0, _.isDef)(value)) {
  306. return undefined;
  307. }
  308. value = String(value);
  309. return (0, _number.isNumeric)(value) ? value + "px" : value;
  310. } // cache
  311. var rootFontSize;
  312. function getRootFontSize() {
  313. if (!rootFontSize) {
  314. var doc = document.documentElement;
  315. var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
  316. rootFontSize = parseFloat(fontSize);
  317. }
  318. return rootFontSize;
  319. }
  320. function convertRem(value) {
  321. value = value.replace(/rem/g, '');
  322. return +value * getRootFontSize();
  323. }
  324. function convertVw(value) {
  325. value = value.replace(/vw/g, '');
  326. return +value * window.innerWidth / 100;
  327. }
  328. function convertVh(value) {
  329. value = value.replace(/vh/g, '');
  330. return +value * window.innerHeight / 100;
  331. }
  332. function unitToPx(value) {
  333. if (typeof value === 'number') {
  334. return value;
  335. }
  336. if (_.inBrowser) {
  337. if (value.indexOf('rem') !== -1) {
  338. return convertRem(value);
  339. }
  340. if (value.indexOf('vw') !== -1) {
  341. return convertVw(value);
  342. }
  343. if (value.indexOf('vh') !== -1) {
  344. return convertVh(value);
  345. }
  346. }
  347. return parseFloat(value);
  348. }
  349. /***/ }),
  350. /***/ 21:
  351. /***/ (function(module, exports, __webpack_require__) {
  352. "use strict";
  353. exports.__esModule = true;
  354. exports.deepAssign = deepAssign;
  355. var _ = __webpack_require__(0);
  356. var hasOwnProperty = Object.prototype.hasOwnProperty;
  357. function assignKey(to, from, key) {
  358. var val = from[key];
  359. if (!(0, _.isDef)(val)) {
  360. return;
  361. }
  362. if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) {
  363. to[key] = val;
  364. } else {
  365. // eslint-disable-next-line @typescript-eslint/no-use-before-define
  366. to[key] = deepAssign(Object(to[key]), from[key]);
  367. }
  368. }
  369. function deepAssign(to, from) {
  370. Object.keys(from).forEach(function (key) {
  371. assignKey(to, from, key);
  372. });
  373. return to;
  374. }
  375. /***/ }),
  376. /***/ 22:
  377. /***/ (function(module, exports, __webpack_require__) {
  378. var content = __webpack_require__(23);
  379. if(typeof content === 'string') content = [[module.i, content, '']];
  380. var transform;
  381. var insertInto;
  382. var options = {"hmr":true}
  383. options.transform = transform
  384. options.insertInto = undefined;
  385. var update = __webpack_require__(6)(content, options);
  386. if(content.locals) module.exports = content.locals;
  387. if(false) {}
  388. /***/ }),
  389. /***/ 23:
  390. /***/ (function(module, exports, __webpack_require__) {
  391. exports = module.exports = __webpack_require__(5)(false);
  392. // Module
  393. exports.push([module.i, "html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue',Helvetica,Segoe UI,Arial,Roboto,'PingFang SC',miui,'Hiragino Sans GB','Microsoft Yahei',sans-serif}a{text-decoration:none}button,input,textarea{color:inherit;font:inherit}[class*=van-]:focus,a:focus,button:focus,input:focus,textarea:focus{outline:0}ol,ul{margin:0;padding:0;list-style:none}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-clearfix::after{display:table;clear:both;content:''}[class*=van-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #ebedf0;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--top::after{border-top-width:1px}.van-hairline--left::after{border-left-width:1px}.van-hairline--right::after{border-right-width:1px}.van-hairline--bottom::after{border-bottom-width:1px}.van-hairline--top-bottom::after,.van-hairline-unset--top-bottom::after{border-width:1px 0}.van-hairline--surround::after{border-width:1px}@-webkit-keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-out{from{opacity:1}to{opacity:0}}@keyframes van-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.van-fade-enter-active{-webkit-animation:.3s van-fade-in both ease-out;animation:.3s van-fade-in both ease-out}.van-fade-leave-active{-webkit-animation:.3s van-fade-out both ease-in;animation:.3s van-fade-out both ease-in
  394. /***/ }),
  395. /***/ 24:
  396. /***/ (function(module, exports, __webpack_require__) {
  397. "use strict";
  398. exports.__esModule = true;
  399. exports.createNamespace = createNamespace;
  400. var _bem = __webpack_require__(25);
  401. var _component = __webpack_require__(26);
  402. var _i18n = __webpack_require__(29);
  403. function createNamespace(name) {
  404. name = 'van-' + name;
  405. return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)];
  406. }
  407. /***/ }),
  408. /***/ 241:
  409. /***/ (function(module, exports, __webpack_require__) {
  410. "use strict";
  411. exports.__esModule = true;
  412. exports.default = void 0;
  413. var _utils = __webpack_require__(0);
  414. var _constant = __webpack_require__(63);
  415. var _interceptor = __webpack_require__(176);
  416. var _relation = __webpack_require__(47);
  417. var _createNamespace = (0, _utils.createNamespace)('tabbar'),
  418. createComponent = _createNamespace[0],
  419. bem = _createNamespace[1];
  420. var _default = createComponent({
  421. mixins: [(0, _relation.ParentMixin)('vanTabbar')],
  422. props: {
  423. route: Boolean,
  424. zIndex: [Number, String],
  425. placeholder: Boolean,
  426. activeColor: String,
  427. beforeChange: Function,
  428. inactiveColor: String,
  429. value: {
  430. type: [Number, String],
  431. default: 0
  432. },
  433. border: {
  434. type: Boolean,
  435. default: true
  436. },
  437. fixed: {
  438. type: Boolean,
  439. default: true
  440. },
  441. safeAreaInsetBottom: {
  442. type: Boolean,
  443. default: null
  444. }
  445. },
  446. data: function data() {
  447. return {
  448. height: null
  449. };
  450. },
  451. computed: {
  452. fit: function fit() {
  453. if (this.safeAreaInsetBottom !== null) {
  454. return this.safeAreaInsetBottom;
  455. } // enable safe-area-inset-bottom by default when fixed
  456. return this.fixed;
  457. }
  458. },
  459. watch: {
  460. value: 'setActiveItem',
  461. children: 'setActiveItem'
  462. },
  463. mounted: function mounted() {
  464. if (this.placeholder && this.fixed) {
  465. this.height = this.$refs.tabbar.getBoundingClientRect().height;
  466. }
  467. },
  468. methods: {
  469. setActiveItem: function setActiveItem() {
  470. var _this = this;
  471. this.children.forEach(function (item, index) {
  472. item.active = (item.name || index) === _this.value;
  473. });
  474. },
  475. onChange: function onChange(active) {
  476. var _this2 = this;
  477. if (active !== this.value) {
  478. (0, _interceptor.callInterceptor)({
  479. interceptor: this.beforeChange,
  480. args: [active],
  481. done: function done() {
  482. _this2.$emit('input', active);
  483. _this2.$emit('change', active);
  484. }
  485. });
  486. }
  487. },
  488. genTabbar: function genTabbar() {
  489. var _ref;
  490. var h = this.$createElement;
  491. return h("div", {
  492. "ref": "tabbar",
  493. "style": {
  494. zIndex: this.zIndex
  495. },
  496. "class": [(_ref = {}, _ref[_constant.BORDER_TOP_BOTTOM] = this.border, _ref), bem({
  497. unfit: !this.fit,
  498. fixed: this.fixed
  499. })]
  500. }, [this.slots()]);
  501. }
  502. },
  503. render: function render() {
  504. var h = arguments[0];
  505. if (this.placeholder && this.fixed) {
  506. return h("div", {
  507. "class": bem('placeholder'),
  508. "style": {
  509. height: this.height + "px"
  510. }
  511. }, [this.genTabbar()]);
  512. }
  513. return this.genTabbar();
  514. }
  515. });
  516. exports.default = _default;
  517. /***/ }),
  518. /***/ 25:
  519. /***/ (function(module, exports, __webpack_require__) {
  520. "use strict";
  521. exports.__esModule = true;
  522. exports.createBEM = createBEM;
  523. /**
  524. * bem helper
  525. * b() // 'button'
  526. * b('text') // 'button__text'
  527. * b({ disabled }) // 'button button--disabled'
  528. * b('text', { disabled }) // 'button__text button__text--disabled'
  529. * b(['disabled', 'primary']) // 'button button--disabled button--primary'
  530. */
  531. function gen(name, mods) {
  532. if (!mods) {
  533. return '';
  534. }
  535. if (typeof mods === 'string') {
  536. return " " + name + "--" + mods;
  537. }
  538. if (Array.isArray(mods)) {
  539. return mods.reduce(function (ret, item) {
  540. return ret + gen(name, item);
  541. }, '');
  542. }
  543. return Object.keys(mods).reduce(function (ret, key) {
  544. return ret + (mods[key] ? gen(name, key) : '');
  545. }, '');
  546. }
  547. function createBEM(name) {
  548. return function (el, mods) {
  549. if (el && typeof el !== 'string') {
  550. mods = el;
  551. el = '';
  552. }
  553. el = el ? name + "__" + el : name;
  554. return "" + el + gen(el, mods);
  555. };
  556. }
  557. /***/ }),
  558. /***/ 26:
  559. /***/ (function(module, exports, __webpack_require__) {
  560. "use strict";
  561. var _interopRequireDefault = __webpack_require__(1);
  562. exports.__esModule = true;
  563. exports.unifySlots = unifySlots;
  564. exports.createComponent = createComponent;
  565. __webpack_require__(11);
  566. var _ = __webpack_require__(0);
  567. var _string = __webpack_require__(9);
  568. var _slots = __webpack_require__(28);
  569. var _vue = _interopRequireDefault(__webpack_require__(4));
  570. /**
  571. * Create a basic component with common options
  572. */
  573. function install(Vue) {
  574. var name = this.name;
  575. Vue.component(name, this);
  576. Vue.component((0, _string.camelize)("-" + name), this);
  577. } // unify slots & scopedSlots
  578. function unifySlots(context) {
  579. // use data.scopedSlots in lower Vue version
  580. var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
  581. var slots = context.slots();
  582. Object.keys(slots).forEach(function (key) {
  583. if (!scopedSlots[key]) {
  584. scopedSlots[key] = function () {
  585. return slots[key];
  586. };
  587. }
  588. });
  589. return scopedSlots;
  590. } // should be removed after Vue 3
  591. function transformFunctionComponent(pure) {
  592. return {
  593. functional: true,
  594. props: pure.props,
  595. model: pure.model,
  596. render: function render(h, context) {
  597. return pure(h, context.props, unifySlots(context), context);
  598. }
  599. };
  600. }
  601. function createComponent(name) {
  602. return function (sfc) {
  603. if ((0, _.isFunction)(sfc)) {
  604. sfc = transformFunctionComponent(sfc);
  605. }
  606. if (!sfc.functional) {
  607. sfc.mixins = sfc.mixins || [];
  608. sfc.mixins.push(_slots.SlotsMixin);
  609. }
  610. sfc.name = name;
  611. sfc.install = install;
  612. return sfc;
  613. };
  614. }
  615. /***/ }),
  616. /***/ 27:
  617. /***/ (function(module, exports, __webpack_require__) {
  618. "use strict";
  619. exports.__esModule = true;
  620. exports.default = void 0;
  621. var _default = {
  622. name: '姓名',
  623. tel: '电话',
  624. save: '保存',
  625. confirm: '确认',
  626. cancel: '取消',
  627. delete: '删除',
  628. complete: '完成',
  629. loading: '加载中...',
  630. telEmpty: '请填写电话',
  631. nameEmpty: '请填写姓名',
  632. nameInvalid: '请输入正确的姓名',
  633. confirmDelete: '确定要删除吗',
  634. telInvalid: '请输入正确的手机号',
  635. vanCalendar: {
  636. end: '结束',
  637. start: '开始',
  638. title: '日期选择',
  639. confirm: '确定',
  640. startEnd: '开始/结束',
  641. weekdays: ['日', '一', '二', '三', '四', '五', '六'],
  642. monthTitle: function monthTitle(year, month) {
  643. return year + "\u5E74" + month + "\u6708";
  644. },
  645. rangePrompt: function rangePrompt(maxRange) {
  646. return "\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 " + maxRange + " \u5929";
  647. }
  648. },
  649. vanCascader: {
  650. select: '请选择'
  651. },
  652. vanContactCard: {
  653. addText: '添加联系人'
  654. },
  655. vanContactList: {
  656. addText: '新建联系人'
  657. },
  658. vanPagination: {
  659. prev: '上一页',
  660. next: '下一页'
  661. },
  662. vanPullRefresh: {
  663. pulling: '下拉即可刷新...',
  664. loosing: '释放即可刷新...'
  665. },
  666. vanSubmitBar: {
  667. label: '合计:'
  668. },
  669. vanCoupon: {
  670. unlimited: '无使用门槛',
  671. discount: function discount(_discount) {
  672. return _discount + "\u6298";
  673. },
  674. condition: function condition(_condition) {
  675. return "\u6EE1" + _condition + "\u5143\u53EF\u7528";
  676. }
  677. },
  678. vanCouponCell: {
  679. title: '优惠券',
  680. tips: '暂无可用',
  681. count: function count(_count) {
  682. return _count + "\u5F20\u53EF\u7528";
  683. }
  684. },
  685. vanCouponList: {
  686. empty: '暂无优惠券',
  687. exchange: '兑换',
  688. close: '不使用优惠券',
  689. enable: '可用',
  690. disabled: '不可用',
  691. placeholder: '请输入优惠码'
  692. },
  693. vanAddressEdit: {
  694. area: '地区',
  695. postal: '邮政编码',
  696. areaEmpty: '请选择地区',
  697. addressEmpty: '请填写详细地址',
  698. postalEmpty: '邮政编码格式不正确',
  699. defaultAddress: '设为默认收货地址',
  700. telPlaceholder: '收货人手机号',
  701. namePlaceholder: '收货人姓名',
  702. areaPlaceholder: '选择省 / 市 / 区'
  703. },
  704. vanAddressEditDetail: {
  705. label: '详细地址',
  706. placeholder: '街道门牌、楼层房间号等信息'
  707. },
  708. vanAddressList: {
  709. add: '新增地址'
  710. }
  711. };
  712. exports.default = _default;
  713. /***/ }),
  714. /***/ 28:
  715. /***/ (function(module, exports, __webpack_require__) {
  716. "use strict";
  717. exports.__esModule = true;
  718. exports.SlotsMixin = void 0;
  719. /**
  720. * Use scopedSlots in Vue 2.6+
  721. * downgrade to slots in lower version
  722. */
  723. var SlotsMixin = {
  724. methods: {
  725. slots: function slots(name, props) {
  726. if (name === void 0) {
  727. name = 'default';
  728. }
  729. var $slots = this.$slots,
  730. $scopedSlots = this.$scopedSlots;
  731. var scopedSlot = $scopedSlots[name];
  732. if (scopedSlot) {
  733. return scopedSlot(props);
  734. }
  735. return $slots[name];
  736. }
  737. }
  738. };
  739. exports.SlotsMixin = SlotsMixin;
  740. /***/ }),
  741. /***/ 29:
  742. /***/ (function(module, exports, __webpack_require__) {
  743. "use strict";
  744. var _interopRequireDefault = __webpack_require__(1);
  745. exports.__esModule = true;
  746. exports.createI18N = createI18N;
  747. var _ = __webpack_require__(0);
  748. var _string = __webpack_require__(9);
  749. var _locale = _interopRequireDefault(__webpack_require__(11));
  750. function createI18N(name) {
  751. var prefix = (0, _string.camelize)(name) + '.';
  752. return function (path) {
  753. var messages = _locale.default.messages();
  754. var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
  755. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  756. args[_key - 1] = arguments[_key];
  757. }
  758. return (0, _.isFunction)(message) ? message.apply(void 0, args) : message;
  759. };
  760. }
  761. /***/ }),
  762. /***/ 4:
  763. /***/ (function(module, exports) {
  764. module.exports = require("vue");
  765. /***/ }),
  766. /***/ 47:
  767. /***/ (function(module, exports, __webpack_require__) {
  768. "use strict";
  769. exports.__esModule = true;
  770. exports.ChildrenMixin = ChildrenMixin;
  771. exports.ParentMixin = ParentMixin;
  772. var _vnodes = __webpack_require__(48);
  773. function ChildrenMixin(_parent, options) {
  774. var _inject, _computed;
  775. if (options === void 0) {
  776. options = {};
  777. }
  778. var indexKey = options.indexKey || 'index';
  779. return {
  780. inject: (_inject = {}, _inject[_parent] = {
  781. default: null
  782. }, _inject),
  783. computed: (_computed = {
  784. parent: function parent() {
  785. if (this.disableBindRelation) {
  786. return null;
  787. }
  788. return this[_parent];
  789. }
  790. }, _computed[indexKey] = function () {
  791. this.bindRelation();
  792. if (this.parent) {
  793. return this.parent.children.indexOf(this);
  794. }
  795. return null;
  796. }, _computed),
  797. watch: {
  798. disableBindRelation: function disableBindRelation(val) {
  799. if (!val) {
  800. this.bindRelation();
  801. }
  802. }
  803. },
  804. mounted: function mounted() {
  805. this.bindRelation();
  806. },
  807. beforeDestroy: function beforeDestroy() {
  808. var _this = this;
  809. if (this.parent) {
  810. this.parent.children = this.parent.children.filter(function (item) {
  811. return item !== _this;
  812. });
  813. }
  814. },
  815. methods: {
  816. bindRelation: function bindRelation() {
  817. if (!this.parent || this.parent.children.indexOf(this) !== -1) {
  818. return;
  819. }
  820. var children = [].concat(this.parent.children, [this]);
  821. (0, _vnodes.sortChildren)(children, this.parent);
  822. this.parent.children = children;
  823. }
  824. }
  825. };
  826. }
  827. function ParentMixin(parent) {
  828. return {
  829. provide: function provide() {
  830. var _ref;
  831. return _ref = {}, _ref[parent] = this, _ref;
  832. },
  833. data: function data() {
  834. return {
  835. children: []
  836. };
  837. }
  838. };
  839. }
  840. /***/ }),
  841. /***/ 48:
  842. /***/ (function(module, exports, __webpack_require__) {
  843. "use strict";
  844. exports.__esModule = true;
  845. exports.sortChildren = sortChildren;
  846. function flattenVNodes(vnodes) {
  847. var result = [];
  848. function traverse(vnodes) {
  849. vnodes.forEach(function (vnode) {
  850. result.push(vnode);
  851. if (vnode.componentInstance) {
  852. traverse(vnode.componentInstance.$children.map(function (item) {
  853. return item.$vnode;
  854. }));
  855. }
  856. if (vnode.children) {
  857. traverse(vnode.children);
  858. }
  859. });
  860. }
  861. traverse(vnodes);
  862. return result;
  863. } // sort children instances by vnodes order
  864. function sortChildren(children, parent) {
  865. var componentOptions = parent.$vnode.componentOptions;
  866. if (!componentOptions || !componentOptions.children) {
  867. return;
  868. }
  869. var vnodes = flattenVNodes(componentOptions.children);
  870. children.sort(function (a, b) {
  871. return vnodes.indexOf(a.$vnode) - vnodes.indexOf(b.$vnode);
  872. });
  873. }
  874. /***/ }),
  875. /***/ 5:
  876. /***/ (function(module, exports, __webpack_require__) {
  877. "use strict";
  878. /*
  879. MIT License http://www.opensource.org/licenses/mit-license.php
  880. Author Tobias Koppers @sokra
  881. */
  882. // css base code, injected by the css-loader
  883. module.exports = function (useSourceMap) {
  884. var list = []; // return the list of modules as css string
  885. list.toString = function toString() {
  886. return this.map(function (item) {
  887. var content = cssWithMappingToString(item, useSourceMap);
  888. if (item[2]) {
  889. return '@media ' + item[2] + '{' + content + '}';
  890. } else {
  891. return content;
  892. }
  893. }).join('');
  894. }; // import a list of modules into the list
  895. list.i = function (modules, mediaQuery) {
  896. if (typeof modules === 'string') {
  897. modules = [[null, modules, '']];
  898. }
  899. var alreadyImportedModules = {};
  900. for (var i = 0; i < this.length; i++) {
  901. var id = this[i][0];
  902. if (id != null) {
  903. alreadyImportedModules[id] = true;
  904. }
  905. }
  906. for (i = 0; i < modules.length; i++) {
  907. var item = modules[i]; // skip already imported module
  908. // this implementation is not 100% perfect for weird media query combinations
  909. // when a module is imported multiple times with different media queries.
  910. // I hope this will never occur (Hey this way we have smaller bundles)
  911. if (item[0] == null || !alreadyImportedModules[item[0]]) {
  912. if (mediaQuery && !item[2]) {
  913. item[2] = mediaQuery;
  914. } else if (mediaQuery) {
  915. item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
  916. }
  917. list.push(item);
  918. }
  919. }
  920. };
  921. return list;
  922. };
  923. function cssWithMappingToString(item, useSourceMap) {
  924. var content = item[1] || '';
  925. var cssMapping = item[3];
  926. if (!cssMapping) {
  927. return content;
  928. }
  929. if (useSourceMap && typeof btoa === 'function') {
  930. var sourceMapping = toComment(cssMapping);
  931. var sourceURLs = cssMapping.sources.map(function (source) {
  932. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
  933. });
  934. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  935. }
  936. return [content].join('\n');
  937. } // Adapted from convert-source-map (MIT)
  938. function toComment(sourceMap) {
  939. // eslint-disable-next-line no-undef
  940. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  941. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  942. return '/*# ' + data + ' */';
  943. }
  944. /***/ }),
  945. /***/ 501:
  946. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  947. "use strict";
  948. __webpack_require__.r(__webpack_exports__);
  949. /* harmony import */ var _tisdesign_m_lib_tabbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(241);
  950. /* harmony import */ var _tisdesign_m_lib_tabbar__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_tabbar__WEBPACK_IMPORTED_MODULE_0__);
  951. /* harmony import */ var _tisdesign_m_lib_tabbar_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(502);
  952. /* harmony import */ var _tisdesign_m_lib_tabbar_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_tabbar_style__WEBPACK_IMPORTED_MODULE_1__);
  953. _tisdesign_m_lib_tabbar__WEBPACK_IMPORTED_MODULE_0___default.a.name = 'm-tabbar';
  954. /* harmony default export */ __webpack_exports__["default"] = (_tisdesign_m_lib_tabbar__WEBPACK_IMPORTED_MODULE_0___default.a);
  955. /***/ }),
  956. /***/ 502:
  957. /***/ (function(module, exports, __webpack_require__) {
  958. __webpack_require__(22);
  959. __webpack_require__(503);
  960. /***/ }),
  961. /***/ 503:
  962. /***/ (function(module, exports, __webpack_require__) {
  963. var content = __webpack_require__(504);
  964. if(typeof content === 'string') content = [[module.i, content, '']];
  965. var transform;
  966. var insertInto;
  967. var options = {"hmr":true}
  968. options.transform = transform
  969. options.insertInto = undefined;
  970. var update = __webpack_require__(6)(content, options);
  971. if(content.locals) module.exports = content.locals;
  972. if(false) {}
  973. /***/ }),
  974. /***/ 504:
  975. /***/ (function(module, exports, __webpack_require__) {
  976. exports = module.exports = __webpack_require__(5)(false);
  977. // Module
  978. exports.push([module.i, ".van-tabbar{z-index:1;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:content-box;width:100%;height:50px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom);background-color:#fff}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--unfit{padding-bottom:0}", ""]);
  979. /***/ }),
  980. /***/ 6:
  981. /***/ (function(module, exports, __webpack_require__) {
  982. /*
  983. MIT License http://www.opensource.org/licenses/mit-license.php
  984. Author Tobias Koppers @sokra
  985. */
  986. var stylesInDom = {};
  987. var memoize = function (fn) {
  988. var memo;
  989. return function () {
  990. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  991. return memo;
  992. };
  993. };
  994. var isOldIE = memoize(function () {
  995. // Test for IE <= 9 as proposed by Browserhacks
  996. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  997. // Tests for existence of standard globals is to allow style-loader
  998. // to operate correctly into non-standard environments
  999. // @see https://github.com/webpack-contrib/style-loader/issues/177
  1000. return window && document && document.all && !window.atob;
  1001. });
  1002. var getTarget = function (target, parent) {
  1003. if (parent){
  1004. return parent.querySelector(target);
  1005. }
  1006. return document.querySelector(target);
  1007. };
  1008. var getElement = (function (fn) {
  1009. var memo = {};
  1010. return function(target, parent) {
  1011. // If passing function in options, then use it for resolve "head" element.
  1012. // Useful for Shadow Root style i.e
  1013. // {
  1014. // insertInto: function () { return document.querySelector("#foo").shadowRoot }
  1015. // }
  1016. if (typeof target === 'function') {
  1017. return target();
  1018. }
  1019. if (typeof memo[target] === "undefined") {
  1020. var styleTarget = getTarget.call(this, target, parent);
  1021. // Special case to return head of iframe instead of iframe itself
  1022. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  1023. try {
  1024. // This will throw an exception if access to iframe is blocked
  1025. // due to cross-origin restrictions
  1026. styleTarget = styleTarget.contentDocument.head;
  1027. } catch(e) {
  1028. styleTarget = null;
  1029. }
  1030. }
  1031. memo[target] = styleTarget;
  1032. }
  1033. return memo[target]
  1034. };
  1035. })();
  1036. var singleton = null;
  1037. var singletonCounter = 0;
  1038. var stylesInsertedAtTop = [];
  1039. var fixUrls = __webpack_require__(12);
  1040. module.exports = function(list, options) {
  1041. if (typeof DEBUG !== "undefined" && DEBUG) {
  1042. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  1043. }
  1044. options = options || {};
  1045. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  1046. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  1047. // tags it will allow on a page
  1048. if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
  1049. // By default, add <style> tags to the <head> element
  1050. if (!options.insertInto) options.insertInto = "head";
  1051. // By default, add <style> tags to the bottom of the target
  1052. if (!options.insertAt) options.insertAt = "bottom";
  1053. var styles = listToStyles(list, options);
  1054. addStylesToDom(styles, options);
  1055. return function update (newList) {
  1056. var mayRemove = [];
  1057. for (var i = 0; i < styles.length; i++) {
  1058. var item = styles[i];
  1059. var domStyle = stylesInDom[item.id];
  1060. domStyle.refs--;
  1061. mayRemove.push(domStyle);
  1062. }
  1063. if(newList) {
  1064. var newStyles = listToStyles(newList, options);
  1065. addStylesToDom(newStyles, options);
  1066. }
  1067. for (var i = 0; i < mayRemove.length; i++) {
  1068. var domStyle = mayRemove[i];
  1069. if(domStyle.refs === 0) {
  1070. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  1071. delete stylesInDom[domStyle.id];
  1072. }
  1073. }
  1074. };
  1075. };
  1076. function addStylesToDom (styles, options) {
  1077. for (var i = 0; i < styles.length; i++) {
  1078. var item = styles[i];
  1079. var domStyle = stylesInDom[item.id];
  1080. if(domStyle) {
  1081. domStyle.refs++;
  1082. for(var j = 0; j < domStyle.parts.length; j++) {
  1083. domStyle.parts[j](item.parts[j]);
  1084. }
  1085. for(; j < item.parts.length; j++) {
  1086. domStyle.parts.push(addStyle(item.parts[j], options));
  1087. }
  1088. } else {
  1089. var parts = [];
  1090. for(var j = 0; j < item.parts.length; j++) {
  1091. parts.push(addStyle(item.parts[j], options));
  1092. }
  1093. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  1094. }
  1095. }
  1096. }
  1097. function listToStyles (list, options) {
  1098. var styles = [];
  1099. var newStyles = {};
  1100. for (var i = 0; i < list.length; i++) {
  1101. var item = list[i];
  1102. var id = options.base ? item[0] + options.base : item[0];
  1103. var css = item[1];
  1104. var media = item[2];
  1105. var sourceMap = item[3];
  1106. var part = {css: css, media: media, sourceMap: sourceMap};
  1107. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  1108. else newStyles[id].parts.push(part);
  1109. }
  1110. return styles;
  1111. }
  1112. function insertStyleElement (options, style) {
  1113. var target = getElement(options.insertInto)
  1114. if (!target) {
  1115. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  1116. }
  1117. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  1118. if (options.insertAt === "top") {
  1119. if (!lastStyleElementInsertedAtTop) {
  1120. target.insertBefore(style, target.firstChild);
  1121. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  1122. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  1123. } else {
  1124. target.appendChild(style);
  1125. }
  1126. stylesInsertedAtTop.push(style);
  1127. } else if (options.insertAt === "bottom") {
  1128. target.appendChild(style);
  1129. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  1130. var nextSibling = getElement(options.insertAt.before, target);
  1131. target.insertBefore(style, nextSibling);
  1132. } else {
  1133. throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  1134. }
  1135. }
  1136. function removeStyleElement (style) {
  1137. if (style.parentNode === null) return false;
  1138. style.parentNode.removeChild(style);
  1139. var idx = stylesInsertedAtTop.indexOf(style);
  1140. if(idx >= 0) {
  1141. stylesInsertedAtTop.splice(idx, 1);
  1142. }
  1143. }
  1144. function createStyleElement (options) {
  1145. var style = document.createElement("style");
  1146. if(options.attrs.type === undefined) {
  1147. options.attrs.type = "text/css";
  1148. }
  1149. if(options.attrs.nonce === undefined) {
  1150. var nonce = getNonce();
  1151. if (nonce) {
  1152. options.attrs.nonce = nonce;
  1153. }
  1154. }
  1155. addAttrs(style, options.attrs);
  1156. insertStyleElement(options, style);
  1157. return style;
  1158. }
  1159. function createLinkElement (options) {
  1160. var link = document.createElement("link");
  1161. if(options.attrs.type === undefined) {
  1162. options.attrs.type = "text/css";
  1163. }
  1164. options.attrs.rel = "stylesheet";
  1165. addAttrs(link, options.attrs);
  1166. insertStyleElement(options, link);
  1167. return link;
  1168. }
  1169. function addAttrs (el, attrs) {
  1170. Object.keys(attrs).forEach(function (key) {
  1171. el.setAttribute(key, attrs[key]);
  1172. });
  1173. }
  1174. function getNonce() {
  1175. if (false) {}
  1176. return __webpack_require__.nc;
  1177. }
  1178. function addStyle (obj, options) {
  1179. var style, update, remove, result;
  1180. // If a transform function was defined, run it on the css
  1181. if (options.transform && obj.css) {
  1182. result = typeof options.transform === 'function'
  1183. ? options.transform(obj.css)
  1184. : options.transform.default(obj.css);
  1185. if (result) {
  1186. // If transform returns a value, use that instead of the original css.
  1187. // This allows running runtime transformations on the css.
  1188. obj.css = result;
  1189. } else {
  1190. // If the transform function returns a falsy value, don't add this css.
  1191. // This allows conditional loading of css
  1192. return function() {
  1193. // noop
  1194. };
  1195. }
  1196. }
  1197. if (options.singleton) {
  1198. var styleIndex = singletonCounter++;
  1199. style = singleton || (singleton = createStyleElement(options));
  1200. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  1201. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  1202. } else if (
  1203. obj.sourceMap &&
  1204. typeof URL === "function" &&
  1205. typeof URL.createObjectURL === "function" &&
  1206. typeof URL.revokeObjectURL === "function" &&
  1207. typeof Blob === "function" &&
  1208. typeof btoa === "function"
  1209. ) {
  1210. style = createLinkElement(options);
  1211. update = updateLink.bind(null, style, options);
  1212. remove = function () {
  1213. removeStyleElement(style);
  1214. if(style.href) URL.revokeObjectURL(style.href);
  1215. };
  1216. } else {
  1217. style = createStyleElement(options);
  1218. update = applyToTag.bind(null, style);
  1219. remove = function () {
  1220. removeStyleElement(style);
  1221. };
  1222. }
  1223. update(obj);
  1224. return function updateStyle (newObj) {
  1225. if (newObj) {
  1226. if (
  1227. newObj.css === obj.css &&
  1228. newObj.media === obj.media &&
  1229. newObj.sourceMap === obj.sourceMap
  1230. ) {
  1231. return;
  1232. }
  1233. update(obj = newObj);
  1234. } else {
  1235. remove();
  1236. }
  1237. };
  1238. }
  1239. var replaceText = (function () {
  1240. var textStore = [];
  1241. return function (index, replacement) {
  1242. textStore[index] = replacement;
  1243. return textStore.filter(Boolean).join('\n');
  1244. };
  1245. })();
  1246. function applyToSingletonTag (style, index, remove, obj) {
  1247. var css = remove ? "" : obj.css;
  1248. if (style.styleSheet) {
  1249. style.styleSheet.cssText = replaceText(index, css);
  1250. } else {
  1251. var cssNode = document.createTextNode(css);
  1252. var childNodes = style.childNodes;
  1253. if (childNodes[index]) style.removeChild(childNodes[index]);
  1254. if (childNodes.length) {
  1255. style.insertBefore(cssNode, childNodes[index]);
  1256. } else {
  1257. style.appendChild(cssNode);
  1258. }
  1259. }
  1260. }
  1261. function applyToTag (style, obj) {
  1262. var css = obj.css;
  1263. var media = obj.media;
  1264. if(media) {
  1265. style.setAttribute("media", media)
  1266. }
  1267. if(style.styleSheet) {
  1268. style.styleSheet.cssText = css;
  1269. } else {
  1270. while(style.firstChild) {
  1271. style.removeChild(style.firstChild);
  1272. }
  1273. style.appendChild(document.createTextNode(css));
  1274. }
  1275. }
  1276. function updateLink (link, options, obj) {
  1277. var css = obj.css;
  1278. var sourceMap = obj.sourceMap;
  1279. /*
  1280. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  1281. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  1282. on by default. Otherwise default to the convertToAbsoluteUrls option
  1283. directly
  1284. */
  1285. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  1286. if (options.convertToAbsoluteUrls || autoFixUrls) {
  1287. css = fixUrls(css);
  1288. }
  1289. if (sourceMap) {
  1290. // http://stackoverflow.com/a/26603875
  1291. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  1292. }
  1293. var blob = new Blob([css], { type: "text/css" });
  1294. var oldSrc = link.href;
  1295. link.href = URL.createObjectURL(blob);
  1296. if(oldSrc) URL.revokeObjectURL(oldSrc);
  1297. }
  1298. /***/ }),
  1299. /***/ 63:
  1300. /***/ (function(module, exports, __webpack_require__) {
  1301. "use strict";
  1302. exports.__esModule = true;
  1303. exports.BORDER_UNSET_TOP_BOTTOM = exports.BORDER_TOP_BOTTOM = exports.BORDER_SURROUND = exports.BORDER_BOTTOM = exports.BORDER_LEFT = exports.BORDER_TOP = exports.BORDER = exports.RED = void 0;
  1304. // color
  1305. var RED = '#ee0a24'; // border
  1306. exports.RED = RED;
  1307. var BORDER = 'van-hairline';
  1308. exports.BORDER = BORDER;
  1309. var BORDER_TOP = BORDER + "--top";
  1310. exports.BORDER_TOP = BORDER_TOP;
  1311. var BORDER_LEFT = BORDER + "--left";
  1312. exports.BORDER_LEFT = BORDER_LEFT;
  1313. var BORDER_BOTTOM = BORDER + "--bottom";
  1314. exports.BORDER_BOTTOM = BORDER_BOTTOM;
  1315. var BORDER_SURROUND = BORDER + "--surround";
  1316. exports.BORDER_SURROUND = BORDER_SURROUND;
  1317. var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
  1318. exports.BORDER_TOP_BOTTOM = BORDER_TOP_BOTTOM;
  1319. var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
  1320. exports.BORDER_UNSET_TOP_BOTTOM = BORDER_UNSET_TOP_BOTTOM;
  1321. /***/ }),
  1322. /***/ 9:
  1323. /***/ (function(module, exports, __webpack_require__) {
  1324. "use strict";
  1325. exports.__esModule = true;
  1326. exports.camelize = camelize;
  1327. exports.padZero = padZero;
  1328. var camelizeRE = /-(\w)/g;
  1329. function camelize(str) {
  1330. return str.replace(camelizeRE, function (_, c) {
  1331. return c.toUpperCase();
  1332. });
  1333. }
  1334. function padZero(num, targetLength) {
  1335. if (targetLength === void 0) {
  1336. targetLength = 2;
  1337. }
  1338. var str = num + '';
  1339. while (str.length < targetLength) {
  1340. str = '0' + str;
  1341. }
  1342. return str;
  1343. }
  1344. /***/ })
  1345. /******/ });