框架源码
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.

1886 lines
51 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 = 337);
  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. /***/ 132:
  255. /***/ (function(module, exports, __webpack_require__) {
  256. "use strict";
  257. exports.__esModule = true;
  258. exports.ClickOutsideMixin = void 0;
  259. var _event = __webpack_require__(30);
  260. /**
  261. * Listen to click outside event
  262. */
  263. var ClickOutsideMixin = function ClickOutsideMixin(config) {
  264. return {
  265. props: {
  266. closeOnClickOutside: {
  267. type: Boolean,
  268. default: true
  269. }
  270. },
  271. data: function data() {
  272. var _this = this;
  273. var clickOutsideHandler = function clickOutsideHandler(event) {
  274. if (_this.closeOnClickOutside && !_this.$el.contains(event.target)) {
  275. _this[config.method]();
  276. }
  277. };
  278. return {
  279. clickOutsideHandler: clickOutsideHandler
  280. };
  281. },
  282. mounted: function mounted() {
  283. (0, _event.on)(document, config.event, this.clickOutsideHandler);
  284. },
  285. beforeDestroy: function beforeDestroy() {
  286. (0, _event.off)(document, config.event, this.clickOutsideHandler);
  287. }
  288. };
  289. };
  290. exports.ClickOutsideMixin = ClickOutsideMixin;
  291. /***/ }),
  292. /***/ 19:
  293. /***/ (function(module, exports, __webpack_require__) {
  294. "use strict";
  295. exports.__esModule = true;
  296. exports.isNumeric = isNumeric;
  297. exports.isNaN = isNaN;
  298. function isNumeric(val) {
  299. return /^\d+(\.\d+)?$/.test(val);
  300. }
  301. function isNaN(val) {
  302. if (Number.isNaN) {
  303. return Number.isNaN(val);
  304. } // eslint-disable-next-line no-self-compare
  305. return val !== val;
  306. }
  307. /***/ }),
  308. /***/ 20:
  309. /***/ (function(module, exports, __webpack_require__) {
  310. "use strict";
  311. exports.__esModule = true;
  312. exports.addUnit = addUnit;
  313. exports.unitToPx = unitToPx;
  314. var _ = __webpack_require__(0);
  315. var _number = __webpack_require__(19);
  316. function addUnit(value) {
  317. if (!(0, _.isDef)(value)) {
  318. return undefined;
  319. }
  320. value = String(value);
  321. return (0, _number.isNumeric)(value) ? value + "px" : value;
  322. } // cache
  323. var rootFontSize;
  324. function getRootFontSize() {
  325. if (!rootFontSize) {
  326. var doc = document.documentElement;
  327. var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
  328. rootFontSize = parseFloat(fontSize);
  329. }
  330. return rootFontSize;
  331. }
  332. function convertRem(value) {
  333. value = value.replace(/rem/g, '');
  334. return +value * getRootFontSize();
  335. }
  336. function convertVw(value) {
  337. value = value.replace(/vw/g, '');
  338. return +value * window.innerWidth / 100;
  339. }
  340. function convertVh(value) {
  341. value = value.replace(/vh/g, '');
  342. return +value * window.innerHeight / 100;
  343. }
  344. function unitToPx(value) {
  345. if (typeof value === 'number') {
  346. return value;
  347. }
  348. if (_.inBrowser) {
  349. if (value.indexOf('rem') !== -1) {
  350. return convertRem(value);
  351. }
  352. if (value.indexOf('vw') !== -1) {
  353. return convertVw(value);
  354. }
  355. if (value.indexOf('vh') !== -1) {
  356. return convertVh(value);
  357. }
  358. }
  359. return parseFloat(value);
  360. }
  361. /***/ }),
  362. /***/ 205:
  363. /***/ (function(module, exports, __webpack_require__) {
  364. "use strict";
  365. exports.__esModule = true;
  366. exports.default = void 0;
  367. var _utils = __webpack_require__(0);
  368. var _number = __webpack_require__(81);
  369. var _event = __webpack_require__(30);
  370. var _touch = __webpack_require__(51);
  371. var _clickOutside = __webpack_require__(132);
  372. // Utils
  373. // Mixins
  374. var _createNamespace = (0, _utils.createNamespace)('swipe-cell'),
  375. createComponent = _createNamespace[0],
  376. bem = _createNamespace[1];
  377. var THRESHOLD = 0.15;
  378. var _default = createComponent({
  379. mixins: [_touch.TouchMixin, (0, _clickOutside.ClickOutsideMixin)({
  380. event: 'touchstart',
  381. method: 'onClick'
  382. })],
  383. props: {
  384. // @deprecated
  385. // should be removed in next major version, use beforeClose instead
  386. onClose: Function,
  387. disabled: Boolean,
  388. leftWidth: [Number, String],
  389. rightWidth: [Number, String],
  390. beforeClose: Function,
  391. stopPropagation: Boolean,
  392. name: {
  393. type: [Number, String],
  394. default: ''
  395. }
  396. },
  397. data: function data() {
  398. return {
  399. offset: 0,
  400. dragging: false
  401. };
  402. },
  403. computed: {
  404. computedLeftWidth: function computedLeftWidth() {
  405. return +this.leftWidth || this.getWidthByRef('left');
  406. },
  407. computedRightWidth: function computedRightWidth() {
  408. return +this.rightWidth || this.getWidthByRef('right');
  409. }
  410. },
  411. mounted: function mounted() {
  412. this.bindTouchEvent(this.$el);
  413. },
  414. methods: {
  415. getWidthByRef: function getWidthByRef(ref) {
  416. if (this.$refs[ref]) {
  417. var rect = this.$refs[ref].getBoundingClientRect();
  418. return rect.width;
  419. }
  420. return 0;
  421. },
  422. // @exposed-api
  423. open: function open(position) {
  424. var offset = position === 'left' ? this.computedLeftWidth : -this.computedRightWidth;
  425. this.opened = true;
  426. this.offset = offset;
  427. this.$emit('open', {
  428. position: position,
  429. name: this.name,
  430. // @deprecated
  431. // should be removed in next major version
  432. detail: this.name
  433. });
  434. },
  435. // @exposed-api
  436. close: function close(position) {
  437. this.offset = 0;
  438. if (this.opened) {
  439. this.opened = false;
  440. this.$emit('close', {
  441. position: position,
  442. name: this.name
  443. });
  444. }
  445. },
  446. onTouchStart: function onTouchStart(event) {
  447. if (this.disabled) {
  448. return;
  449. }
  450. this.startOffset = this.offset;
  451. this.touchStart(event);
  452. },
  453. onTouchMove: function onTouchMove(event) {
  454. if (this.disabled) {
  455. return;
  456. }
  457. this.touchMove(event);
  458. if (this.direction === 'horizontal') {
  459. this.dragging = true;
  460. this.lockClick = true;
  461. var isPrevent = !this.opened || this.deltaX * this.startOffset < 0;
  462. if (isPrevent) {
  463. (0, _event.preventDefault)(event, this.stopPropagation);
  464. }
  465. this.offset = (0, _number.range)(this.deltaX + this.startOffset, -this.computedRightWidth, this.computedLeftWidth);
  466. }
  467. },
  468. onTouchEnd: function onTouchEnd() {
  469. var _this = this;
  470. if (this.disabled) {
  471. return;
  472. }
  473. if (this.dragging) {
  474. this.toggle(this.offset > 0 ? 'left' : 'right');
  475. this.dragging = false; // compatible with desktop scenario
  476. setTimeout(function () {
  477. _this.lockClick = false;
  478. }, 0);
  479. }
  480. },
  481. toggle: function toggle(direction) {
  482. var offset = Math.abs(this.offset);
  483. var threshold = this.opened ? 1 - THRESHOLD : THRESHOLD;
  484. var computedLeftWidth = this.computedLeftWidth,
  485. computedRightWidth = this.computedRightWidth;
  486. if (computedRightWidth && direction === 'right' && offset > computedRightWidth * threshold) {
  487. this.open('right');
  488. } else if (computedLeftWidth && direction === 'left' && offset > computedLeftWidth * threshold) {
  489. this.open('left');
  490. } else {
  491. this.close();
  492. }
  493. },
  494. onClick: function onClick(position) {
  495. if (position === void 0) {
  496. position = 'outside';
  497. }
  498. this.$emit('click', position);
  499. if (this.opened && !this.lockClick) {
  500. if (this.beforeClose) {
  501. this.beforeClose({
  502. position: position,
  503. name: this.name,
  504. instance: this
  505. });
  506. } else if (this.onClose) {
  507. this.onClose(position, this, {
  508. name: this.name
  509. });
  510. } else {
  511. this.close(position);
  512. }
  513. }
  514. },
  515. getClickHandler: function getClickHandler(position, stop) {
  516. var _this2 = this;
  517. return function (event) {
  518. if (stop) {
  519. event.stopPropagation();
  520. }
  521. _this2.onClick(position);
  522. };
  523. },
  524. genLeftPart: function genLeftPart() {
  525. var h = this.$createElement;
  526. var content = this.slots('left');
  527. if (content) {
  528. return h("div", {
  529. "ref": "left",
  530. "class": bem('left'),
  531. "on": {
  532. "click": this.getClickHandler('left', true)
  533. }
  534. }, [content]);
  535. }
  536. },
  537. genRightPart: function genRightPart() {
  538. var h = this.$createElement;
  539. var content = this.slots('right');
  540. if (content) {
  541. return h("div", {
  542. "ref": "right",
  543. "class": bem('right'),
  544. "on": {
  545. "click": this.getClickHandler('right', true)
  546. }
  547. }, [content]);
  548. }
  549. }
  550. },
  551. render: function render() {
  552. var h = arguments[0];
  553. var wrapperStyle = {
  554. transform: "translate3d(" + this.offset + "px, 0, 0)",
  555. transitionDuration: this.dragging ? '0s' : '.6s'
  556. };
  557. return h("div", {
  558. "class": bem(),
  559. "on": {
  560. "click": this.getClickHandler('cell')
  561. }
  562. }, [h("div", {
  563. "class": bem('wrapper'),
  564. "style": wrapperStyle
  565. }, [this.genLeftPart(), this.slots(), this.genRightPart()])]);
  566. }
  567. });
  568. exports.default = _default;
  569. /***/ }),
  570. /***/ 21:
  571. /***/ (function(module, exports, __webpack_require__) {
  572. "use strict";
  573. exports.__esModule = true;
  574. exports.deepAssign = deepAssign;
  575. var _ = __webpack_require__(0);
  576. var hasOwnProperty = Object.prototype.hasOwnProperty;
  577. function assignKey(to, from, key) {
  578. var val = from[key];
  579. if (!(0, _.isDef)(val)) {
  580. return;
  581. }
  582. if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) {
  583. to[key] = val;
  584. } else {
  585. // eslint-disable-next-line @typescript-eslint/no-use-before-define
  586. to[key] = deepAssign(Object(to[key]), from[key]);
  587. }
  588. }
  589. function deepAssign(to, from) {
  590. Object.keys(from).forEach(function (key) {
  591. assignKey(to, from, key);
  592. });
  593. return to;
  594. }
  595. /***/ }),
  596. /***/ 22:
  597. /***/ (function(module, exports, __webpack_require__) {
  598. var content = __webpack_require__(23);
  599. if(typeof content === 'string') content = [[module.i, content, '']];
  600. var transform;
  601. var insertInto;
  602. var options = {"hmr":true}
  603. options.transform = transform
  604. options.insertInto = undefined;
  605. var update = __webpack_require__(6)(content, options);
  606. if(content.locals) module.exports = content.locals;
  607. if(false) {}
  608. /***/ }),
  609. /***/ 23:
  610. /***/ (function(module, exports, __webpack_require__) {
  611. exports = module.exports = __webpack_require__(5)(false);
  612. // Module
  613. 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
  614. /***/ }),
  615. /***/ 24:
  616. /***/ (function(module, exports, __webpack_require__) {
  617. "use strict";
  618. exports.__esModule = true;
  619. exports.createNamespace = createNamespace;
  620. var _bem = __webpack_require__(25);
  621. var _component = __webpack_require__(26);
  622. var _i18n = __webpack_require__(29);
  623. function createNamespace(name) {
  624. name = 'van-' + name;
  625. return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)];
  626. }
  627. /***/ }),
  628. /***/ 25:
  629. /***/ (function(module, exports, __webpack_require__) {
  630. "use strict";
  631. exports.__esModule = true;
  632. exports.createBEM = createBEM;
  633. /**
  634. * bem helper
  635. * b() // 'button'
  636. * b('text') // 'button__text'
  637. * b({ disabled }) // 'button button--disabled'
  638. * b('text', { disabled }) // 'button__text button__text--disabled'
  639. * b(['disabled', 'primary']) // 'button button--disabled button--primary'
  640. */
  641. function gen(name, mods) {
  642. if (!mods) {
  643. return '';
  644. }
  645. if (typeof mods === 'string') {
  646. return " " + name + "--" + mods;
  647. }
  648. if (Array.isArray(mods)) {
  649. return mods.reduce(function (ret, item) {
  650. return ret + gen(name, item);
  651. }, '');
  652. }
  653. return Object.keys(mods).reduce(function (ret, key) {
  654. return ret + (mods[key] ? gen(name, key) : '');
  655. }, '');
  656. }
  657. function createBEM(name) {
  658. return function (el, mods) {
  659. if (el && typeof el !== 'string') {
  660. mods = el;
  661. el = '';
  662. }
  663. el = el ? name + "__" + el : name;
  664. return "" + el + gen(el, mods);
  665. };
  666. }
  667. /***/ }),
  668. /***/ 26:
  669. /***/ (function(module, exports, __webpack_require__) {
  670. "use strict";
  671. var _interopRequireDefault = __webpack_require__(1);
  672. exports.__esModule = true;
  673. exports.unifySlots = unifySlots;
  674. exports.createComponent = createComponent;
  675. __webpack_require__(11);
  676. var _ = __webpack_require__(0);
  677. var _string = __webpack_require__(9);
  678. var _slots = __webpack_require__(28);
  679. var _vue = _interopRequireDefault(__webpack_require__(4));
  680. /**
  681. * Create a basic component with common options
  682. */
  683. function install(Vue) {
  684. var name = this.name;
  685. Vue.component(name, this);
  686. Vue.component((0, _string.camelize)("-" + name), this);
  687. } // unify slots & scopedSlots
  688. function unifySlots(context) {
  689. // use data.scopedSlots in lower Vue version
  690. var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
  691. var slots = context.slots();
  692. Object.keys(slots).forEach(function (key) {
  693. if (!scopedSlots[key]) {
  694. scopedSlots[key] = function () {
  695. return slots[key];
  696. };
  697. }
  698. });
  699. return scopedSlots;
  700. } // should be removed after Vue 3
  701. function transformFunctionComponent(pure) {
  702. return {
  703. functional: true,
  704. props: pure.props,
  705. model: pure.model,
  706. render: function render(h, context) {
  707. return pure(h, context.props, unifySlots(context), context);
  708. }
  709. };
  710. }
  711. function createComponent(name) {
  712. return function (sfc) {
  713. if ((0, _.isFunction)(sfc)) {
  714. sfc = transformFunctionComponent(sfc);
  715. }
  716. if (!sfc.functional) {
  717. sfc.mixins = sfc.mixins || [];
  718. sfc.mixins.push(_slots.SlotsMixin);
  719. }
  720. sfc.name = name;
  721. sfc.install = install;
  722. return sfc;
  723. };
  724. }
  725. /***/ }),
  726. /***/ 27:
  727. /***/ (function(module, exports, __webpack_require__) {
  728. "use strict";
  729. exports.__esModule = true;
  730. exports.default = void 0;
  731. var _default = {
  732. name: '姓名',
  733. tel: '电话',
  734. save: '保存',
  735. confirm: '确认',
  736. cancel: '取消',
  737. delete: '删除',
  738. complete: '完成',
  739. loading: '加载中...',
  740. telEmpty: '请填写电话',
  741. nameEmpty: '请填写姓名',
  742. nameInvalid: '请输入正确的姓名',
  743. confirmDelete: '确定要删除吗',
  744. telInvalid: '请输入正确的手机号',
  745. vanCalendar: {
  746. end: '结束',
  747. start: '开始',
  748. title: '日期选择',
  749. confirm: '确定',
  750. startEnd: '开始/结束',
  751. weekdays: ['日', '一', '二', '三', '四', '五', '六'],
  752. monthTitle: function monthTitle(year, month) {
  753. return year + "\u5E74" + month + "\u6708";
  754. },
  755. rangePrompt: function rangePrompt(maxRange) {
  756. return "\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 " + maxRange + " \u5929";
  757. }
  758. },
  759. vanCascader: {
  760. select: '请选择'
  761. },
  762. vanContactCard: {
  763. addText: '添加联系人'
  764. },
  765. vanContactList: {
  766. addText: '新建联系人'
  767. },
  768. vanPagination: {
  769. prev: '上一页',
  770. next: '下一页'
  771. },
  772. vanPullRefresh: {
  773. pulling: '下拉即可刷新...',
  774. loosing: '释放即可刷新...'
  775. },
  776. vanSubmitBar: {
  777. label: '合计:'
  778. },
  779. vanCoupon: {
  780. unlimited: '无使用门槛',
  781. discount: function discount(_discount) {
  782. return _discount + "\u6298";
  783. },
  784. condition: function condition(_condition) {
  785. return "\u6EE1" + _condition + "\u5143\u53EF\u7528";
  786. }
  787. },
  788. vanCouponCell: {
  789. title: '优惠券',
  790. tips: '暂无可用',
  791. count: function count(_count) {
  792. return _count + "\u5F20\u53EF\u7528";
  793. }
  794. },
  795. vanCouponList: {
  796. empty: '暂无优惠券',
  797. exchange: '兑换',
  798. close: '不使用优惠券',
  799. enable: '可用',
  800. disabled: '不可用',
  801. placeholder: '请输入优惠码'
  802. },
  803. vanAddressEdit: {
  804. area: '地区',
  805. postal: '邮政编码',
  806. areaEmpty: '请选择地区',
  807. addressEmpty: '请填写详细地址',
  808. postalEmpty: '邮政编码格式不正确',
  809. defaultAddress: '设为默认收货地址',
  810. telPlaceholder: '收货人手机号',
  811. namePlaceholder: '收货人姓名',
  812. areaPlaceholder: '选择省 / 市 / 区'
  813. },
  814. vanAddressEditDetail: {
  815. label: '详细地址',
  816. placeholder: '街道门牌、楼层房间号等信息'
  817. },
  818. vanAddressList: {
  819. add: '新增地址'
  820. }
  821. };
  822. exports.default = _default;
  823. /***/ }),
  824. /***/ 28:
  825. /***/ (function(module, exports, __webpack_require__) {
  826. "use strict";
  827. exports.__esModule = true;
  828. exports.SlotsMixin = void 0;
  829. /**
  830. * Use scopedSlots in Vue 2.6+
  831. * downgrade to slots in lower version
  832. */
  833. var SlotsMixin = {
  834. methods: {
  835. slots: function slots(name, props) {
  836. if (name === void 0) {
  837. name = 'default';
  838. }
  839. var $slots = this.$slots,
  840. $scopedSlots = this.$scopedSlots;
  841. var scopedSlot = $scopedSlots[name];
  842. if (scopedSlot) {
  843. return scopedSlot(props);
  844. }
  845. return $slots[name];
  846. }
  847. }
  848. };
  849. exports.SlotsMixin = SlotsMixin;
  850. /***/ }),
  851. /***/ 29:
  852. /***/ (function(module, exports, __webpack_require__) {
  853. "use strict";
  854. var _interopRequireDefault = __webpack_require__(1);
  855. exports.__esModule = true;
  856. exports.createI18N = createI18N;
  857. var _ = __webpack_require__(0);
  858. var _string = __webpack_require__(9);
  859. var _locale = _interopRequireDefault(__webpack_require__(11));
  860. function createI18N(name) {
  861. var prefix = (0, _string.camelize)(name) + '.';
  862. return function (path) {
  863. var messages = _locale.default.messages();
  864. var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
  865. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  866. args[_key - 1] = arguments[_key];
  867. }
  868. return (0, _.isFunction)(message) ? message.apply(void 0, args) : message;
  869. };
  870. }
  871. /***/ }),
  872. /***/ 30:
  873. /***/ (function(module, exports, __webpack_require__) {
  874. "use strict";
  875. exports.__esModule = true;
  876. exports.on = on;
  877. exports.off = off;
  878. exports.stopPropagation = stopPropagation;
  879. exports.preventDefault = preventDefault;
  880. exports.supportsPassive = void 0;
  881. var _ = __webpack_require__(0);
  882. // eslint-disable-next-line import/no-mutable-exports
  883. var supportsPassive = false;
  884. exports.supportsPassive = supportsPassive;
  885. if (!_.isServer) {
  886. try {
  887. var opts = {};
  888. Object.defineProperty(opts, 'passive', {
  889. // eslint-disable-next-line getter-return
  890. get: function get() {
  891. /* istanbul ignore next */
  892. exports.supportsPassive = supportsPassive = true;
  893. }
  894. });
  895. window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
  896. } catch (e) {}
  897. }
  898. function on(target, event, handler, passive) {
  899. if (passive === void 0) {
  900. passive = false;
  901. }
  902. if (!_.isServer) {
  903. target.addEventListener(event, handler, supportsPassive ? {
  904. capture: false,
  905. passive: passive
  906. } : false);
  907. }
  908. }
  909. function off(target, event, handler) {
  910. if (!_.isServer) {
  911. target.removeEventListener(event, handler);
  912. }
  913. }
  914. function stopPropagation(event) {
  915. event.stopPropagation();
  916. }
  917. function preventDefault(event, isStopPropagation) {
  918. /* istanbul ignore else */
  919. if (typeof event.cancelable !== 'boolean' || event.cancelable) {
  920. event.preventDefault();
  921. }
  922. if (isStopPropagation) {
  923. stopPropagation(event);
  924. }
  925. }
  926. /***/ }),
  927. /***/ 337:
  928. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  929. "use strict";
  930. __webpack_require__.r(__webpack_exports__);
  931. /* harmony import */ var _tisdesign_m_lib_swipe_cell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
  932. /* harmony import */ var _tisdesign_m_lib_swipe_cell__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_swipe_cell__WEBPACK_IMPORTED_MODULE_0__);
  933. /* harmony import */ var _tisdesign_m_lib_swipe_cell_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(338);
  934. /* harmony import */ var _tisdesign_m_lib_swipe_cell_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_swipe_cell_style__WEBPACK_IMPORTED_MODULE_1__);
  935. _tisdesign_m_lib_swipe_cell__WEBPACK_IMPORTED_MODULE_0___default.a.name = 'm-swipe-cell';
  936. /* harmony default export */ __webpack_exports__["default"] = (_tisdesign_m_lib_swipe_cell__WEBPACK_IMPORTED_MODULE_0___default.a);
  937. /***/ }),
  938. /***/ 338:
  939. /***/ (function(module, exports, __webpack_require__) {
  940. __webpack_require__(22);
  941. __webpack_require__(339);
  942. /***/ }),
  943. /***/ 339:
  944. /***/ (function(module, exports, __webpack_require__) {
  945. var content = __webpack_require__(340);
  946. if(typeof content === 'string') content = [[module.i, content, '']];
  947. var transform;
  948. var insertInto;
  949. var options = {"hmr":true}
  950. options.transform = transform
  951. options.insertInto = undefined;
  952. var update = __webpack_require__(6)(content, options);
  953. if(content.locals) module.exports = content.locals;
  954. if(false) {}
  955. /***/ }),
  956. /***/ 340:
  957. /***/ (function(module, exports, __webpack_require__) {
  958. exports = module.exports = __webpack_require__(5)(false);
  959. // Module
  960. exports.push([module.i, ".van-swipe-cell{position:relative;overflow:hidden;cursor:grab}.van-swipe-cell__wrapper{-webkit-transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-timing-function:cubic-bezier(.18,.89,.32,1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}", ""]);
  961. /***/ }),
  962. /***/ 4:
  963. /***/ (function(module, exports) {
  964. module.exports = require("vue");
  965. /***/ }),
  966. /***/ 5:
  967. /***/ (function(module, exports, __webpack_require__) {
  968. "use strict";
  969. /*
  970. MIT License http://www.opensource.org/licenses/mit-license.php
  971. Author Tobias Koppers @sokra
  972. */
  973. // css base code, injected by the css-loader
  974. module.exports = function (useSourceMap) {
  975. var list = []; // return the list of modules as css string
  976. list.toString = function toString() {
  977. return this.map(function (item) {
  978. var content = cssWithMappingToString(item, useSourceMap);
  979. if (item[2]) {
  980. return '@media ' + item[2] + '{' + content + '}';
  981. } else {
  982. return content;
  983. }
  984. }).join('');
  985. }; // import a list of modules into the list
  986. list.i = function (modules, mediaQuery) {
  987. if (typeof modules === 'string') {
  988. modules = [[null, modules, '']];
  989. }
  990. var alreadyImportedModules = {};
  991. for (var i = 0; i < this.length; i++) {
  992. var id = this[i][0];
  993. if (id != null) {
  994. alreadyImportedModules[id] = true;
  995. }
  996. }
  997. for (i = 0; i < modules.length; i++) {
  998. var item = modules[i]; // skip already imported module
  999. // this implementation is not 100% perfect for weird media query combinations
  1000. // when a module is imported multiple times with different media queries.
  1001. // I hope this will never occur (Hey this way we have smaller bundles)
  1002. if (item[0] == null || !alreadyImportedModules[item[0]]) {
  1003. if (mediaQuery && !item[2]) {
  1004. item[2] = mediaQuery;
  1005. } else if (mediaQuery) {
  1006. item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
  1007. }
  1008. list.push(item);
  1009. }
  1010. }
  1011. };
  1012. return list;
  1013. };
  1014. function cssWithMappingToString(item, useSourceMap) {
  1015. var content = item[1] || '';
  1016. var cssMapping = item[3];
  1017. if (!cssMapping) {
  1018. return content;
  1019. }
  1020. if (useSourceMap && typeof btoa === 'function') {
  1021. var sourceMapping = toComment(cssMapping);
  1022. var sourceURLs = cssMapping.sources.map(function (source) {
  1023. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
  1024. });
  1025. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  1026. }
  1027. return [content].join('\n');
  1028. } // Adapted from convert-source-map (MIT)
  1029. function toComment(sourceMap) {
  1030. // eslint-disable-next-line no-undef
  1031. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  1032. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  1033. return '/*# ' + data + ' */';
  1034. }
  1035. /***/ }),
  1036. /***/ 51:
  1037. /***/ (function(module, exports, __webpack_require__) {
  1038. "use strict";
  1039. exports.__esModule = true;
  1040. exports.TouchMixin = void 0;
  1041. var _event = __webpack_require__(30);
  1042. var MIN_DISTANCE = 10;
  1043. function getDirection(x, y) {
  1044. if (x > y && x > MIN_DISTANCE) {
  1045. return 'horizontal';
  1046. }
  1047. if (y > x && y > MIN_DISTANCE) {
  1048. return 'vertical';
  1049. }
  1050. return '';
  1051. }
  1052. var TouchMixin = {
  1053. data: function data() {
  1054. return {
  1055. direction: ''
  1056. };
  1057. },
  1058. methods: {
  1059. touchStart: function touchStart(event) {
  1060. this.resetTouchStatus();
  1061. this.startX = event.touches[0].clientX;
  1062. this.startY = event.touches[0].clientY;
  1063. },
  1064. touchMove: function touchMove(event) {
  1065. var touch = event.touches[0];
  1066. this.deltaX = touch.clientX - this.startX;
  1067. this.deltaY = touch.clientY - this.startY;
  1068. this.offsetX = Math.abs(this.deltaX);
  1069. this.offsetY = Math.abs(this.deltaY);
  1070. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  1071. },
  1072. resetTouchStatus: function resetTouchStatus() {
  1073. this.direction = '';
  1074. this.deltaX = 0;
  1075. this.deltaY = 0;
  1076. this.offsetX = 0;
  1077. this.offsetY = 0;
  1078. },
  1079. // avoid Vue 2.6 event bubble issues by manually binding events
  1080. // https://github.com/youzan/vant/issues/3015
  1081. bindTouchEvent: function bindTouchEvent(el) {
  1082. var onTouchStart = this.onTouchStart,
  1083. onTouchMove = this.onTouchMove,
  1084. onTouchEnd = this.onTouchEnd;
  1085. (0, _event.on)(el, 'touchstart', onTouchStart);
  1086. (0, _event.on)(el, 'touchmove', onTouchMove);
  1087. if (onTouchEnd) {
  1088. (0, _event.on)(el, 'touchend', onTouchEnd);
  1089. (0, _event.on)(el, 'touchcancel', onTouchEnd);
  1090. }
  1091. }
  1092. }
  1093. };
  1094. exports.TouchMixin = TouchMixin;
  1095. /***/ }),
  1096. /***/ 6:
  1097. /***/ (function(module, exports, __webpack_require__) {
  1098. /*
  1099. MIT License http://www.opensource.org/licenses/mit-license.php
  1100. Author Tobias Koppers @sokra
  1101. */
  1102. var stylesInDom = {};
  1103. var memoize = function (fn) {
  1104. var memo;
  1105. return function () {
  1106. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  1107. return memo;
  1108. };
  1109. };
  1110. var isOldIE = memoize(function () {
  1111. // Test for IE <= 9 as proposed by Browserhacks
  1112. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  1113. // Tests for existence of standard globals is to allow style-loader
  1114. // to operate correctly into non-standard environments
  1115. // @see https://github.com/webpack-contrib/style-loader/issues/177
  1116. return window && document && document.all && !window.atob;
  1117. });
  1118. var getTarget = function (target, parent) {
  1119. if (parent){
  1120. return parent.querySelector(target);
  1121. }
  1122. return document.querySelector(target);
  1123. };
  1124. var getElement = (function (fn) {
  1125. var memo = {};
  1126. return function(target, parent) {
  1127. // If passing function in options, then use it for resolve "head" element.
  1128. // Useful for Shadow Root style i.e
  1129. // {
  1130. // insertInto: function () { return document.querySelector("#foo").shadowRoot }
  1131. // }
  1132. if (typeof target === 'function') {
  1133. return target();
  1134. }
  1135. if (typeof memo[target] === "undefined") {
  1136. var styleTarget = getTarget.call(this, target, parent);
  1137. // Special case to return head of iframe instead of iframe itself
  1138. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  1139. try {
  1140. // This will throw an exception if access to iframe is blocked
  1141. // due to cross-origin restrictions
  1142. styleTarget = styleTarget.contentDocument.head;
  1143. } catch(e) {
  1144. styleTarget = null;
  1145. }
  1146. }
  1147. memo[target] = styleTarget;
  1148. }
  1149. return memo[target]
  1150. };
  1151. })();
  1152. var singleton = null;
  1153. var singletonCounter = 0;
  1154. var stylesInsertedAtTop = [];
  1155. var fixUrls = __webpack_require__(12);
  1156. module.exports = function(list, options) {
  1157. if (typeof DEBUG !== "undefined" && DEBUG) {
  1158. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  1159. }
  1160. options = options || {};
  1161. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  1162. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  1163. // tags it will allow on a page
  1164. if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
  1165. // By default, add <style> tags to the <head> element
  1166. if (!options.insertInto) options.insertInto = "head";
  1167. // By default, add <style> tags to the bottom of the target
  1168. if (!options.insertAt) options.insertAt = "bottom";
  1169. var styles = listToStyles(list, options);
  1170. addStylesToDom(styles, options);
  1171. return function update (newList) {
  1172. var mayRemove = [];
  1173. for (var i = 0; i < styles.length; i++) {
  1174. var item = styles[i];
  1175. var domStyle = stylesInDom[item.id];
  1176. domStyle.refs--;
  1177. mayRemove.push(domStyle);
  1178. }
  1179. if(newList) {
  1180. var newStyles = listToStyles(newList, options);
  1181. addStylesToDom(newStyles, options);
  1182. }
  1183. for (var i = 0; i < mayRemove.length; i++) {
  1184. var domStyle = mayRemove[i];
  1185. if(domStyle.refs === 0) {
  1186. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  1187. delete stylesInDom[domStyle.id];
  1188. }
  1189. }
  1190. };
  1191. };
  1192. function addStylesToDom (styles, options) {
  1193. for (var i = 0; i < styles.length; i++) {
  1194. var item = styles[i];
  1195. var domStyle = stylesInDom[item.id];
  1196. if(domStyle) {
  1197. domStyle.refs++;
  1198. for(var j = 0; j < domStyle.parts.length; j++) {
  1199. domStyle.parts[j](item.parts[j]);
  1200. }
  1201. for(; j < item.parts.length; j++) {
  1202. domStyle.parts.push(addStyle(item.parts[j], options));
  1203. }
  1204. } else {
  1205. var parts = [];
  1206. for(var j = 0; j < item.parts.length; j++) {
  1207. parts.push(addStyle(item.parts[j], options));
  1208. }
  1209. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  1210. }
  1211. }
  1212. }
  1213. function listToStyles (list, options) {
  1214. var styles = [];
  1215. var newStyles = {};
  1216. for (var i = 0; i < list.length; i++) {
  1217. var item = list[i];
  1218. var id = options.base ? item[0] + options.base : item[0];
  1219. var css = item[1];
  1220. var media = item[2];
  1221. var sourceMap = item[3];
  1222. var part = {css: css, media: media, sourceMap: sourceMap};
  1223. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  1224. else newStyles[id].parts.push(part);
  1225. }
  1226. return styles;
  1227. }
  1228. function insertStyleElement (options, style) {
  1229. var target = getElement(options.insertInto)
  1230. if (!target) {
  1231. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  1232. }
  1233. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  1234. if (options.insertAt === "top") {
  1235. if (!lastStyleElementInsertedAtTop) {
  1236. target.insertBefore(style, target.firstChild);
  1237. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  1238. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  1239. } else {
  1240. target.appendChild(style);
  1241. }
  1242. stylesInsertedAtTop.push(style);
  1243. } else if (options.insertAt === "bottom") {
  1244. target.appendChild(style);
  1245. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  1246. var nextSibling = getElement(options.insertAt.before, target);
  1247. target.insertBefore(style, nextSibling);
  1248. } else {
  1249. 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");
  1250. }
  1251. }
  1252. function removeStyleElement (style) {
  1253. if (style.parentNode === null) return false;
  1254. style.parentNode.removeChild(style);
  1255. var idx = stylesInsertedAtTop.indexOf(style);
  1256. if(idx >= 0) {
  1257. stylesInsertedAtTop.splice(idx, 1);
  1258. }
  1259. }
  1260. function createStyleElement (options) {
  1261. var style = document.createElement("style");
  1262. if(options.attrs.type === undefined) {
  1263. options.attrs.type = "text/css";
  1264. }
  1265. if(options.attrs.nonce === undefined) {
  1266. var nonce = getNonce();
  1267. if (nonce) {
  1268. options.attrs.nonce = nonce;
  1269. }
  1270. }
  1271. addAttrs(style, options.attrs);
  1272. insertStyleElement(options, style);
  1273. return style;
  1274. }
  1275. function createLinkElement (options) {
  1276. var link = document.createElement("link");
  1277. if(options.attrs.type === undefined) {
  1278. options.attrs.type = "text/css";
  1279. }
  1280. options.attrs.rel = "stylesheet";
  1281. addAttrs(link, options.attrs);
  1282. insertStyleElement(options, link);
  1283. return link;
  1284. }
  1285. function addAttrs (el, attrs) {
  1286. Object.keys(attrs).forEach(function (key) {
  1287. el.setAttribute(key, attrs[key]);
  1288. });
  1289. }
  1290. function getNonce() {
  1291. if (false) {}
  1292. return __webpack_require__.nc;
  1293. }
  1294. function addStyle (obj, options) {
  1295. var style, update, remove, result;
  1296. // If a transform function was defined, run it on the css
  1297. if (options.transform && obj.css) {
  1298. result = typeof options.transform === 'function'
  1299. ? options.transform(obj.css)
  1300. : options.transform.default(obj.css);
  1301. if (result) {
  1302. // If transform returns a value, use that instead of the original css.
  1303. // This allows running runtime transformations on the css.
  1304. obj.css = result;
  1305. } else {
  1306. // If the transform function returns a falsy value, don't add this css.
  1307. // This allows conditional loading of css
  1308. return function() {
  1309. // noop
  1310. };
  1311. }
  1312. }
  1313. if (options.singleton) {
  1314. var styleIndex = singletonCounter++;
  1315. style = singleton || (singleton = createStyleElement(options));
  1316. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  1317. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  1318. } else if (
  1319. obj.sourceMap &&
  1320. typeof URL === "function" &&
  1321. typeof URL.createObjectURL === "function" &&
  1322. typeof URL.revokeObjectURL === "function" &&
  1323. typeof Blob === "function" &&
  1324. typeof btoa === "function"
  1325. ) {
  1326. style = createLinkElement(options);
  1327. update = updateLink.bind(null, style, options);
  1328. remove = function () {
  1329. removeStyleElement(style);
  1330. if(style.href) URL.revokeObjectURL(style.href);
  1331. };
  1332. } else {
  1333. style = createStyleElement(options);
  1334. update = applyToTag.bind(null, style);
  1335. remove = function () {
  1336. removeStyleElement(style);
  1337. };
  1338. }
  1339. update(obj);
  1340. return function updateStyle (newObj) {
  1341. if (newObj) {
  1342. if (
  1343. newObj.css === obj.css &&
  1344. newObj.media === obj.media &&
  1345. newObj.sourceMap === obj.sourceMap
  1346. ) {
  1347. return;
  1348. }
  1349. update(obj = newObj);
  1350. } else {
  1351. remove();
  1352. }
  1353. };
  1354. }
  1355. var replaceText = (function () {
  1356. var textStore = [];
  1357. return function (index, replacement) {
  1358. textStore[index] = replacement;
  1359. return textStore.filter(Boolean).join('\n');
  1360. };
  1361. })();
  1362. function applyToSingletonTag (style, index, remove, obj) {
  1363. var css = remove ? "" : obj.css;
  1364. if (style.styleSheet) {
  1365. style.styleSheet.cssText = replaceText(index, css);
  1366. } else {
  1367. var cssNode = document.createTextNode(css);
  1368. var childNodes = style.childNodes;
  1369. if (childNodes[index]) style.removeChild(childNodes[index]);
  1370. if (childNodes.length) {
  1371. style.insertBefore(cssNode, childNodes[index]);
  1372. } else {
  1373. style.appendChild(cssNode);
  1374. }
  1375. }
  1376. }
  1377. function applyToTag (style, obj) {
  1378. var css = obj.css;
  1379. var media = obj.media;
  1380. if(media) {
  1381. style.setAttribute("media", media)
  1382. }
  1383. if(style.styleSheet) {
  1384. style.styleSheet.cssText = css;
  1385. } else {
  1386. while(style.firstChild) {
  1387. style.removeChild(style.firstChild);
  1388. }
  1389. style.appendChild(document.createTextNode(css));
  1390. }
  1391. }
  1392. function updateLink (link, options, obj) {
  1393. var css = obj.css;
  1394. var sourceMap = obj.sourceMap;
  1395. /*
  1396. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  1397. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  1398. on by default. Otherwise default to the convertToAbsoluteUrls option
  1399. directly
  1400. */
  1401. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  1402. if (options.convertToAbsoluteUrls || autoFixUrls) {
  1403. css = fixUrls(css);
  1404. }
  1405. if (sourceMap) {
  1406. // http://stackoverflow.com/a/26603875
  1407. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  1408. }
  1409. var blob = new Blob([css], { type: "text/css" });
  1410. var oldSrc = link.href;
  1411. link.href = URL.createObjectURL(blob);
  1412. if(oldSrc) URL.revokeObjectURL(oldSrc);
  1413. }
  1414. /***/ }),
  1415. /***/ 81:
  1416. /***/ (function(module, exports, __webpack_require__) {
  1417. "use strict";
  1418. exports.__esModule = true;
  1419. exports.range = range;
  1420. exports.formatNumber = formatNumber;
  1421. function range(num, min, max) {
  1422. return Math.min(Math.max(num, min), max);
  1423. }
  1424. function trimExtraChar(value, _char, regExp) {
  1425. var index = value.indexOf(_char);
  1426. if (index === -1) {
  1427. return value;
  1428. }
  1429. if (_char === '-' && index !== 0) {
  1430. return value.slice(0, index);
  1431. }
  1432. return value.slice(0, index + 1) + value.slice(index).replace(regExp, '');
  1433. }
  1434. function formatNumber(value, allowDot, allowMinus) {
  1435. if (allowDot === void 0) {
  1436. allowDot = true;
  1437. }
  1438. if (allowMinus === void 0) {
  1439. allowMinus = true;
  1440. }
  1441. if (allowDot) {
  1442. value = trimExtraChar(value, '.', /\./g);
  1443. } else {
  1444. value = value.split('.')[0];
  1445. }
  1446. if (allowMinus) {
  1447. value = trimExtraChar(value, '-', /-/g);
  1448. } else {
  1449. value = value.replace(/-/, '');
  1450. }
  1451. var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
  1452. return value.replace(regExp, '');
  1453. }
  1454. /***/ }),
  1455. /***/ 9:
  1456. /***/ (function(module, exports, __webpack_require__) {
  1457. "use strict";
  1458. exports.__esModule = true;
  1459. exports.camelize = camelize;
  1460. exports.padZero = padZero;
  1461. var camelizeRE = /-(\w)/g;
  1462. function camelize(str) {
  1463. return str.replace(camelizeRE, function (_, c) {
  1464. return c.toUpperCase();
  1465. });
  1466. }
  1467. function padZero(num, targetLength) {
  1468. if (targetLength === void 0) {
  1469. targetLength = 2;
  1470. }
  1471. var str = num + '';
  1472. while (str.length < targetLength) {
  1473. str = '0' + str;
  1474. }
  1475. return str;
  1476. }
  1477. /***/ })
  1478. /******/ });