app模板、应用模板、组件模板、widget模板
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.

4590 lines
162 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 = 458);
  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. /***/ 100:
  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 _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  149. var _utils = __webpack_require__(0);
  150. var _icon = _interopRequireDefault(__webpack_require__(35));
  151. var _createNamespace = (0, _utils.createNamespace)('image'),
  152. createComponent = _createNamespace[0],
  153. bem = _createNamespace[1];
  154. var _default = createComponent({
  155. props: {
  156. src: String,
  157. fit: String,
  158. alt: String,
  159. round: Boolean,
  160. width: [Number, String],
  161. height: [Number, String],
  162. radius: [Number, String],
  163. lazyLoad: Boolean,
  164. iconPrefix: String,
  165. showError: {
  166. type: Boolean,
  167. default: true
  168. },
  169. showLoading: {
  170. type: Boolean,
  171. default: true
  172. },
  173. errorIcon: {
  174. type: String,
  175. default: 'photo-fail'
  176. },
  177. loadingIcon: {
  178. type: String,
  179. default: 'photo'
  180. }
  181. },
  182. data: function data() {
  183. return {
  184. loading: true,
  185. error: false
  186. };
  187. },
  188. watch: {
  189. src: function src() {
  190. this.loading = true;
  191. this.error = false;
  192. }
  193. },
  194. computed: {
  195. style: function style() {
  196. var style = {};
  197. if ((0, _utils.isDef)(this.width)) {
  198. style.width = (0, _utils.addUnit)(this.width);
  199. }
  200. if ((0, _utils.isDef)(this.height)) {
  201. style.height = (0, _utils.addUnit)(this.height);
  202. }
  203. if ((0, _utils.isDef)(this.radius)) {
  204. style.overflow = 'hidden';
  205. style.borderRadius = (0, _utils.addUnit)(this.radius);
  206. }
  207. return style;
  208. }
  209. },
  210. created: function created() {
  211. var $Lazyload = this.$Lazyload;
  212. if ($Lazyload && _utils.inBrowser) {
  213. $Lazyload.$on('loaded', this.onLazyLoaded);
  214. $Lazyload.$on('error', this.onLazyLoadError);
  215. }
  216. },
  217. beforeDestroy: function beforeDestroy() {
  218. var $Lazyload = this.$Lazyload;
  219. if ($Lazyload) {
  220. $Lazyload.$off('loaded', this.onLazyLoaded);
  221. $Lazyload.$off('error', this.onLazyLoadError);
  222. }
  223. },
  224. methods: {
  225. onLoad: function onLoad(event) {
  226. this.loading = false;
  227. this.$emit('load', event);
  228. },
  229. onLazyLoaded: function onLazyLoaded(_ref) {
  230. var el = _ref.el;
  231. if (el === this.$refs.image && this.loading) {
  232. this.onLoad();
  233. }
  234. },
  235. onLazyLoadError: function onLazyLoadError(_ref2) {
  236. var el = _ref2.el;
  237. if (el === this.$refs.image && !this.error) {
  238. this.onError();
  239. }
  240. },
  241. onError: function onError(event) {
  242. this.error = true;
  243. this.loading = false;
  244. this.$emit('error', event);
  245. },
  246. onClick: function onClick(event) {
  247. this.$emit('click', event);
  248. },
  249. genPlaceholder: function genPlaceholder() {
  250. var h = this.$createElement;
  251. if (this.loading && this.showLoading) {
  252. return h("div", {
  253. "class": bem('loading')
  254. }, [this.slots('loading') || h(_icon.default, {
  255. "attrs": {
  256. "name": this.loadingIcon,
  257. "classPrefix": this.iconPrefix
  258. },
  259. "class": bem('loading-icon')
  260. })]);
  261. }
  262. if (this.error && this.showError) {
  263. return h("div", {
  264. "class": bem('error')
  265. }, [this.slots('error') || h(_icon.default, {
  266. "attrs": {
  267. "name": this.errorIcon,
  268. "classPrefix": this.iconPrefix
  269. },
  270. "class": bem('error-icon')
  271. })]);
  272. }
  273. },
  274. genImage: function genImage() {
  275. var h = this.$createElement;
  276. var imgData = {
  277. class: bem('img'),
  278. attrs: {
  279. alt: this.alt
  280. },
  281. style: {
  282. objectFit: this.fit
  283. }
  284. };
  285. if (this.error) {
  286. return;
  287. }
  288. if (this.lazyLoad) {
  289. return h("img", (0, _babelHelperVueJsxMergeProps.default)([{
  290. "ref": "image",
  291. "directives": [{
  292. name: "lazy",
  293. value: this.src
  294. }]
  295. }, imgData]));
  296. }
  297. return h("img", (0, _babelHelperVueJsxMergeProps.default)([{
  298. "attrs": {
  299. "src": this.src
  300. },
  301. "on": {
  302. "load": this.onLoad,
  303. "error": this.onError
  304. }
  305. }, imgData]));
  306. }
  307. },
  308. render: function render() {
  309. var h = arguments[0];
  310. return h("div", {
  311. "class": bem({
  312. round: this.round
  313. }),
  314. "style": this.style,
  315. "on": {
  316. "click": this.onClick
  317. }
  318. }, [this.genImage(), this.genPlaceholder(), this.slots()]);
  319. }
  320. });
  321. exports.default = _default;
  322. /***/ }),
  323. /***/ 11:
  324. /***/ (function(module, exports, __webpack_require__) {
  325. "use strict";
  326. var _interopRequireDefault = __webpack_require__(1);
  327. exports.__esModule = true;
  328. exports.default = void 0;
  329. var _vue = _interopRequireDefault(__webpack_require__(4));
  330. var _deepAssign = __webpack_require__(21);
  331. var _zhCN = _interopRequireDefault(__webpack_require__(27));
  332. var proto = _vue.default.prototype;
  333. var defineReactive = _vue.default.util.defineReactive;
  334. defineReactive(proto, '$vantLang', 'zh-CN');
  335. defineReactive(proto, '$vantMessages', {
  336. 'zh-CN': _zhCN.default
  337. });
  338. var _default = {
  339. messages: function messages() {
  340. return proto.$vantMessages[proto.$vantLang];
  341. },
  342. use: function use(lang, messages) {
  343. var _this$add;
  344. proto.$vantLang = lang;
  345. this.add((_this$add = {}, _this$add[lang] = messages, _this$add));
  346. },
  347. add: function add(messages) {
  348. if (messages === void 0) {
  349. messages = {};
  350. }
  351. (0, _deepAssign.deepAssign)(proto.$vantMessages, messages);
  352. }
  353. };
  354. exports.default = _default;
  355. /***/ }),
  356. /***/ 116:
  357. /***/ (function(module, exports, __webpack_require__) {
  358. var content = __webpack_require__(117);
  359. if(typeof content === 'string') content = [[module.i, content, '']];
  360. var transform;
  361. var insertInto;
  362. var options = {"hmr":true}
  363. options.transform = transform
  364. options.insertInto = undefined;
  365. var update = __webpack_require__(6)(content, options);
  366. if(content.locals) module.exports = content.locals;
  367. if(false) {}
  368. /***/ }),
  369. /***/ 117:
  370. /***/ (function(module, exports, __webpack_require__) {
  371. exports = module.exports = __webpack_require__(5)(false);
  372. // Module
  373. exports.push([module.i, ".van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;color:#969799;font-size:14px;background-color:#f7f8fa}.van-image__loading-icon{color:#dcdee0;font-size:32px}.van-image__error-icon{color:#dcdee0;font-size:32px}", ""]);
  374. /***/ }),
  375. /***/ 118:
  376. /***/ (function(module, exports, __webpack_require__) {
  377. "use strict";
  378. var _interopRequireDefault = __webpack_require__(1);
  379. exports.__esModule = true;
  380. exports.default = void 0;
  381. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  382. var _utils = __webpack_require__(0);
  383. var _relation = __webpack_require__(47);
  384. var _createNamespace = (0, _utils.createNamespace)('swipe-item'),
  385. createComponent = _createNamespace[0],
  386. bem = _createNamespace[1];
  387. var _default = createComponent({
  388. mixins: [(0, _relation.ChildrenMixin)('vanSwipe')],
  389. data: function data() {
  390. return {
  391. offset: 0,
  392. inited: false,
  393. mounted: false
  394. };
  395. },
  396. mounted: function mounted() {
  397. var _this = this;
  398. this.$nextTick(function () {
  399. _this.mounted = true;
  400. });
  401. },
  402. computed: {
  403. style: function style() {
  404. var style = {};
  405. var _this$parent = this.parent,
  406. size = _this$parent.size,
  407. vertical = _this$parent.vertical;
  408. if (size) {
  409. style[vertical ? 'height' : 'width'] = size + "px";
  410. }
  411. if (this.offset) {
  412. style.transform = "translate" + (vertical ? 'Y' : 'X') + "(" + this.offset + "px)";
  413. }
  414. return style;
  415. },
  416. shouldRender: function shouldRender() {
  417. var index = this.index,
  418. inited = this.inited,
  419. parent = this.parent,
  420. mounted = this.mounted;
  421. if (!parent.lazyRender || inited) {
  422. return true;
  423. } // wait for all item to mount, so we can get the exact count
  424. if (!mounted) {
  425. return false;
  426. }
  427. var active = parent.activeIndicator;
  428. var maxActive = parent.count - 1;
  429. var prevActive = active === 0 && parent.loop ? maxActive : active - 1;
  430. var nextActive = active === maxActive && parent.loop ? 0 : active + 1;
  431. var shouldRender = index === active || index === prevActive || index === nextActive;
  432. if (shouldRender) {
  433. this.inited = true;
  434. }
  435. return shouldRender;
  436. }
  437. },
  438. render: function render() {
  439. var h = arguments[0];
  440. return h("div", {
  441. "class": bem(),
  442. "style": this.style,
  443. "on": (0, _extends2.default)({}, this.$listeners)
  444. }, [this.shouldRender && this.slots()]);
  445. }
  446. });
  447. exports.default = _default;
  448. /***/ }),
  449. /***/ 119:
  450. /***/ (function(module, exports, __webpack_require__) {
  451. "use strict";
  452. exports.__esModule = true;
  453. exports.default = void 0;
  454. var _utils = __webpack_require__(0);
  455. var _style = __webpack_require__(94);
  456. var _event = __webpack_require__(30);
  457. var _raf = __webpack_require__(86);
  458. var _number = __webpack_require__(81);
  459. var _touch = __webpack_require__(51);
  460. var _relation = __webpack_require__(47);
  461. var _bindEvent = __webpack_require__(60);
  462. // Utils
  463. // Mixins
  464. var _createNamespace = (0, _utils.createNamespace)('swipe'),
  465. createComponent = _createNamespace[0],
  466. bem = _createNamespace[1];
  467. var _default = createComponent({
  468. mixins: [_touch.TouchMixin, (0, _relation.ParentMixin)('vanSwipe'), (0, _bindEvent.BindEventMixin)(function (bind, isBind) {
  469. bind(window, 'resize', this.resize, true);
  470. bind(window, 'orientationchange', this.resize, true);
  471. bind(window, 'visibilitychange', this.onVisibilityChange);
  472. if (isBind) {
  473. this.initialize();
  474. } else {
  475. this.clear();
  476. }
  477. })],
  478. props: {
  479. width: [Number, String],
  480. height: [Number, String],
  481. autoplay: [Number, String],
  482. vertical: Boolean,
  483. lazyRender: Boolean,
  484. indicatorColor: String,
  485. loop: {
  486. type: Boolean,
  487. default: true
  488. },
  489. duration: {
  490. type: [Number, String],
  491. default: 500
  492. },
  493. touchable: {
  494. type: Boolean,
  495. default: true
  496. },
  497. initialSwipe: {
  498. type: [Number, String],
  499. default: 0
  500. },
  501. showIndicators: {
  502. type: Boolean,
  503. default: true
  504. },
  505. stopPropagation: {
  506. type: Boolean,
  507. default: true
  508. }
  509. },
  510. data: function data() {
  511. return {
  512. rect: null,
  513. offset: 0,
  514. active: 0,
  515. deltaX: 0,
  516. deltaY: 0,
  517. swiping: false,
  518. computedWidth: 0,
  519. computedHeight: 0
  520. };
  521. },
  522. watch: {
  523. children: function children() {
  524. this.initialize();
  525. },
  526. initialSwipe: function initialSwipe() {
  527. this.initialize();
  528. },
  529. autoplay: function autoplay(_autoplay) {
  530. if (_autoplay > 0) {
  531. this.autoPlay();
  532. } else {
  533. this.clear();
  534. }
  535. }
  536. },
  537. computed: {
  538. count: function count() {
  539. return this.children.length;
  540. },
  541. maxCount: function maxCount() {
  542. return Math.ceil(Math.abs(this.minOffset) / this.size);
  543. },
  544. delta: function delta() {
  545. return this.vertical ? this.deltaY : this.deltaX;
  546. },
  547. size: function size() {
  548. return this[this.vertical ? 'computedHeight' : 'computedWidth'];
  549. },
  550. trackSize: function trackSize() {
  551. return this.count * this.size;
  552. },
  553. activeIndicator: function activeIndicator() {
  554. return (this.active + this.count) % this.count;
  555. },
  556. isCorrectDirection: function isCorrectDirection() {
  557. var expect = this.vertical ? 'vertical' : 'horizontal';
  558. return this.direction === expect;
  559. },
  560. trackStyle: function trackStyle() {
  561. var style = {
  562. transitionDuration: (this.swiping ? 0 : this.duration) + "ms",
  563. transform: "translate" + (this.vertical ? 'Y' : 'X') + "(" + this.offset + "px)"
  564. };
  565. if (this.size) {
  566. var mainAxis = this.vertical ? 'height' : 'width';
  567. var crossAxis = this.vertical ? 'width' : 'height';
  568. style[mainAxis] = this.trackSize + "px";
  569. style[crossAxis] = this[crossAxis] ? this[crossAxis] + "px" : '';
  570. }
  571. return style;
  572. },
  573. indicatorStyle: function indicatorStyle() {
  574. return {
  575. backgroundColor: this.indicatorColor
  576. };
  577. },
  578. minOffset: function minOffset() {
  579. return (this.vertical ? this.rect.height : this.rect.width) - this.size * this.count;
  580. }
  581. },
  582. mounted: function mounted() {
  583. this.bindTouchEvent(this.$refs.track);
  584. },
  585. methods: {
  586. // initialize swipe position
  587. initialize: function initialize(active) {
  588. if (active === void 0) {
  589. active = +this.initialSwipe;
  590. }
  591. if (!this.$el || (0, _style.isHidden)(this.$el)) {
  592. return;
  593. }
  594. clearTimeout(this.timer);
  595. var rect = this.$el.getBoundingClientRect();
  596. this.rect = rect;
  597. this.swiping = true;
  598. this.active = active;
  599. this.computedWidth = +this.width || rect.width;
  600. this.computedHeight = +this.height || rect.height;
  601. this.offset = this.getTargetOffset(active);
  602. this.children.forEach(function (swipe) {
  603. swipe.offset = 0;
  604. });
  605. this.autoPlay();
  606. },
  607. // @exposed-api
  608. resize: function resize() {
  609. this.initialize(this.activeIndicator);
  610. },
  611. onVisibilityChange: function onVisibilityChange() {
  612. if (document.hidden) {
  613. this.clear();
  614. } else {
  615. this.autoPlay();
  616. }
  617. },
  618. onTouchStart: function onTouchStart(event) {
  619. if (!this.touchable) return;
  620. this.clear();
  621. this.touchStartTime = Date.now();
  622. this.touchStart(event);
  623. this.correctPosition();
  624. },
  625. onTouchMove: function onTouchMove(event) {
  626. if (!this.touchable || !this.swiping) return;
  627. this.touchMove(event);
  628. if (this.isCorrectDirection) {
  629. (0, _event.preventDefault)(event, this.stopPropagation);
  630. this.move({
  631. offset: this.delta
  632. });
  633. }
  634. },
  635. onTouchEnd: function onTouchEnd() {
  636. if (!this.touchable || !this.swiping) return;
  637. var size = this.size,
  638. delta = this.delta;
  639. var duration = Date.now() - this.touchStartTime;
  640. var speed = delta / duration;
  641. var shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(delta) > size / 2;
  642. if (shouldSwipe && this.isCorrectDirection) {
  643. var offset = this.vertical ? this.offsetY : this.offsetX;
  644. var pace = 0;
  645. if (this.loop) {
  646. pace = offset > 0 ? delta > 0 ? -1 : 1 : 0;
  647. } else {
  648. pace = -Math[delta > 0 ? 'ceil' : 'floor'](delta / size);
  649. }
  650. this.move({
  651. pace: pace,
  652. emitChange: true
  653. });
  654. } else if (delta) {
  655. this.move({
  656. pace: 0
  657. });
  658. }
  659. this.swiping = false;
  660. this.autoPlay();
  661. },
  662. getTargetActive: function getTargetActive(pace) {
  663. var active = this.active,
  664. count = this.count,
  665. maxCount = this.maxCount;
  666. if (pace) {
  667. if (this.loop) {
  668. return (0, _number.range)(active + pace, -1, count);
  669. }
  670. return (0, _number.range)(active + pace, 0, maxCount);
  671. }
  672. return active;
  673. },
  674. getTargetOffset: function getTargetOffset(targetActive, offset) {
  675. if (offset === void 0) {
  676. offset = 0;
  677. }
  678. var currentPosition = targetActive * this.size;
  679. if (!this.loop) {
  680. currentPosition = Math.min(currentPosition, -this.minOffset);
  681. }
  682. var targetOffset = offset - currentPosition;
  683. if (!this.loop) {
  684. targetOffset = (0, _number.range)(targetOffset, this.minOffset, 0);
  685. }
  686. return targetOffset;
  687. },
  688. move: function move(_ref) {
  689. var _ref$pace = _ref.pace,
  690. pace = _ref$pace === void 0 ? 0 : _ref$pace,
  691. _ref$offset = _ref.offset,
  692. offset = _ref$offset === void 0 ? 0 : _ref$offset,
  693. emitChange = _ref.emitChange;
  694. var loop = this.loop,
  695. count = this.count,
  696. active = this.active,
  697. children = this.children,
  698. trackSize = this.trackSize,
  699. minOffset = this.minOffset;
  700. if (count <= 1) {
  701. return;
  702. }
  703. var targetActive = this.getTargetActive(pace);
  704. var targetOffset = this.getTargetOffset(targetActive, offset); // auto move first and last swipe in loop mode
  705. if (loop) {
  706. if (children[0] && targetOffset !== minOffset) {
  707. var outRightBound = targetOffset < minOffset;
  708. children[0].offset = outRightBound ? trackSize : 0;
  709. }
  710. if (children[count - 1] && targetOffset !== 0) {
  711. var outLeftBound = targetOffset > 0;
  712. children[count - 1].offset = outLeftBound ? -trackSize : 0;
  713. }
  714. }
  715. this.active = targetActive;
  716. this.offset = targetOffset;
  717. if (emitChange && targetActive !== active) {
  718. this.$emit('change', this.activeIndicator);
  719. }
  720. },
  721. // @exposed-api
  722. prev: function prev() {
  723. var _this = this;
  724. this.correctPosition();
  725. this.resetTouchStatus();
  726. (0, _raf.doubleRaf)(function () {
  727. _this.swiping = false;
  728. _this.move({
  729. pace: -1,
  730. emitChange: true
  731. });
  732. });
  733. },
  734. // @exposed-api
  735. next: function next() {
  736. var _this2 = this;
  737. this.correctPosition();
  738. this.resetTouchStatus();
  739. (0, _raf.doubleRaf)(function () {
  740. _this2.swiping = false;
  741. _this2.move({
  742. pace: 1,
  743. emitChange: true
  744. });
  745. });
  746. },
  747. // @exposed-api
  748. swipeTo: function swipeTo(index, options) {
  749. var _this3 = this;
  750. if (options === void 0) {
  751. options = {};
  752. }
  753. this.correctPosition();
  754. this.resetTouchStatus();
  755. (0, _raf.doubleRaf)(function () {
  756. var targetIndex;
  757. if (_this3.loop && index === _this3.count) {
  758. targetIndex = _this3.active === 0 ? 0 : index;
  759. } else {
  760. targetIndex = index % _this3.count;
  761. }
  762. if (options.immediate) {
  763. (0, _raf.doubleRaf)(function () {
  764. _this3.swiping = false;
  765. });
  766. } else {
  767. _this3.swiping = false;
  768. }
  769. _this3.move({
  770. pace: targetIndex - _this3.active,
  771. emitChange: true
  772. });
  773. });
  774. },
  775. correctPosition: function correctPosition() {
  776. this.swiping = true;
  777. if (this.active <= -1) {
  778. this.move({
  779. pace: this.count
  780. });
  781. }
  782. if (this.active >= this.count) {
  783. this.move({
  784. pace: -this.count
  785. });
  786. }
  787. },
  788. clear: function clear() {
  789. clearTimeout(this.timer);
  790. },
  791. autoPlay: function autoPlay() {
  792. var _this4 = this;
  793. var autoplay = this.autoplay;
  794. if (autoplay > 0 && this.count > 1) {
  795. this.clear();
  796. this.timer = setTimeout(function () {
  797. _this4.next();
  798. _this4.autoPlay();
  799. }, autoplay);
  800. }
  801. },
  802. genIndicator: function genIndicator() {
  803. var _this5 = this;
  804. var h = this.$createElement;
  805. var count = this.count,
  806. activeIndicator = this.activeIndicator;
  807. var slot = this.slots('indicator');
  808. if (slot) {
  809. return slot;
  810. }
  811. if (this.showIndicators && count > 1) {
  812. return h("div", {
  813. "class": bem('indicators', {
  814. vertical: this.vertical
  815. })
  816. }, [Array.apply(void 0, Array(count)).map(function (empty, index) {
  817. return h("i", {
  818. "class": bem('indicator', {
  819. active: index === activeIndicator
  820. }),
  821. "style": index === activeIndicator ? _this5.indicatorStyle : null
  822. });
  823. })]);
  824. }
  825. }
  826. },
  827. render: function render() {
  828. var h = arguments[0];
  829. return h("div", {
  830. "class": bem()
  831. }, [h("div", {
  832. "ref": "track",
  833. "style": this.trackStyle,
  834. "class": bem('track', {
  835. vertical: this.vertical
  836. })
  837. }, [this.slots()]), this.genIndicator()]);
  838. }
  839. });
  840. exports.default = _default;
  841. /***/ }),
  842. /***/ 12:
  843. /***/ (function(module, exports) {
  844. /**
  845. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  846. * embed the css on the page. This breaks all relative urls because now they are relative to a
  847. * bundle instead of the current page.
  848. *
  849. * One solution is to only use full urls, but that may be impossible.
  850. *
  851. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  852. *
  853. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  854. *
  855. */
  856. module.exports = function (css) {
  857. // get current location
  858. var location = typeof window !== "undefined" && window.location;
  859. if (!location) {
  860. throw new Error("fixUrls requires window.location");
  861. }
  862. // blank or null?
  863. if (!css || typeof css !== "string") {
  864. return css;
  865. }
  866. var baseUrl = location.protocol + "//" + location.host;
  867. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  868. // convert each url(...)
  869. /*
  870. This regular expression is just a way to recursively match brackets within
  871. a string.
  872. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  873. ( = Start a capturing group
  874. (?: = Start a non-capturing group
  875. [^)(] = Match anything that isn't a parentheses
  876. | = OR
  877. \( = Match a start parentheses
  878. (?: = Start another non-capturing groups
  879. [^)(]+ = Match anything that isn't a parentheses
  880. | = OR
  881. \( = Match a start parentheses
  882. [^)(]* = Match anything that isn't a parentheses
  883. \) = Match a end parentheses
  884. ) = End Group
  885. *\) = Match anything and then a close parens
  886. ) = Close non-capturing group
  887. * = Match anything
  888. ) = Close capturing group
  889. \) = Match a close parens
  890. /gi = Get all matches, not the first. Be case insensitive.
  891. */
  892. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  893. // strip quotes (if they exist)
  894. var unquotedOrigUrl = origUrl
  895. .trim()
  896. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  897. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  898. // already a full url? no change
  899. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
  900. return fullMatch;
  901. }
  902. // convert the url to a full url
  903. var newUrl;
  904. if (unquotedOrigUrl.indexOf("//") === 0) {
  905. //TODO: should we add protocol?
  906. newUrl = unquotedOrigUrl;
  907. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  908. // path should be relative to the base url
  909. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  910. } else {
  911. // path should be relative to current directory
  912. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  913. }
  914. // send back the fixed url(...)
  915. return "url(" + JSON.stringify(newUrl) + ")";
  916. });
  917. // send back the fixed css
  918. return fixedCss;
  919. };
  920. /***/ }),
  921. /***/ 129:
  922. /***/ (function(module, exports, __webpack_require__) {
  923. var content = __webpack_require__(130);
  924. if(typeof content === 'string') content = [[module.i, content, '']];
  925. var transform;
  926. var insertInto;
  927. var options = {"hmr":true}
  928. options.transform = transform
  929. options.insertInto = undefined;
  930. var update = __webpack_require__(6)(content, options);
  931. if(content.locals) module.exports = content.locals;
  932. if(false) {}
  933. /***/ }),
  934. /***/ 130:
  935. /***/ (function(module, exports, __webpack_require__) {
  936. exports = module.exports = __webpack_require__(5)(false);
  937. // Module
  938. exports.push([module.i, ".van-swipe-item{position:relative;-webkit-flex-shrink:0;flex-shrink:0;width:100%;height:100%}", ""]);
  939. /***/ }),
  940. /***/ 131:
  941. /***/ (function(module, exports, __webpack_require__) {
  942. var content = __webpack_require__(132);
  943. if(typeof content === 'string') content = [[module.i, content, '']];
  944. var transform;
  945. var insertInto;
  946. var options = {"hmr":true}
  947. options.transform = transform
  948. options.insertInto = undefined;
  949. var update = __webpack_require__(6)(content, options);
  950. if(content.locals) module.exports = content.locals;
  951. if(false) {}
  952. /***/ }),
  953. /***/ 132:
  954. /***/ (function(module, exports, __webpack_require__) {
  955. exports = module.exports = __webpack_require__(5)(false);
  956. // Module
  957. exports.push([module.i, ".van-swipe{position:relative;overflow:hidden;cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:-webkit-box;display:-webkit-flex;display:flex;height:100%}.van-swipe__track--vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.van-swipe__indicators{position:absolute;bottom:12px;left:50%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:12px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:6px}.van-swipe__indicator{width:6px;height:6px;background-color:#ebedf0;border-radius:100%;opacity:.3;-webkit-transition:opacity .2s,background-color .2s;transition:opacity .2s,background-color .2s}.van-swipe__indicator:not(:last-child){margin-right:6px}.van-swipe__indicator--active{background-color:#2cb8b8;opacity:1}", ""]);
  958. /***/ }),
  959. /***/ 134:
  960. /***/ (function(module, exports, __webpack_require__) {
  961. "use strict";
  962. exports.__esModule = true;
  963. exports.bem = exports.createComponent = void 0;
  964. var _utils = __webpack_require__(0);
  965. var _createNamespace = (0, _utils.createNamespace)('image-preview'),
  966. createComponent = _createNamespace[0],
  967. bem = _createNamespace[1];
  968. exports.bem = bem;
  969. exports.createComponent = createComponent;
  970. /***/ }),
  971. /***/ 14:
  972. /***/ (function(module, exports, __webpack_require__) {
  973. "use strict";
  974. var _interopRequireDefault = __webpack_require__(1);
  975. exports.__esModule = true;
  976. exports.inherit = inherit;
  977. exports.emit = emit;
  978. exports.mount = mount;
  979. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  980. var _vue = _interopRequireDefault(__webpack_require__(4));
  981. var inheritKey = ['ref', 'style', 'class', 'attrs', 'refInFor', 'nativeOn', 'directives', 'staticClass', 'staticStyle'];
  982. var mapInheritKey = {
  983. nativeOn: 'on'
  984. }; // inherit partial context, map nativeOn to on
  985. function inherit(context, inheritListeners) {
  986. var result = inheritKey.reduce(function (obj, key) {
  987. if (context.data[key]) {
  988. obj[mapInheritKey[key] || key] = context.data[key];
  989. }
  990. return obj;
  991. }, {});
  992. if (inheritListeners) {
  993. result.on = result.on || {};
  994. (0, _extends2.default)(result.on, context.data.on);
  995. }
  996. return result;
  997. } // emit event
  998. function emit(context, eventName) {
  999. for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  1000. args[_key - 2] = arguments[_key];
  1001. }
  1002. var listeners = context.listeners[eventName];
  1003. if (listeners) {
  1004. if (Array.isArray(listeners)) {
  1005. listeners.forEach(function (listener) {
  1006. listener.apply(void 0, args);
  1007. });
  1008. } else {
  1009. listeners.apply(void 0, args);
  1010. }
  1011. }
  1012. } // mount functional component
  1013. function mount(Component, data) {
  1014. var instance = new _vue.default({
  1015. el: document.createElement('div'),
  1016. props: Component.props,
  1017. render: function render(h) {
  1018. return h(Component, (0, _extends2.default)({
  1019. props: this.$props
  1020. }, data));
  1021. }
  1022. });
  1023. document.body.appendChild(instance.$el);
  1024. return instance;
  1025. }
  1026. /***/ }),
  1027. /***/ 151:
  1028. /***/ (function(module, exports, __webpack_require__) {
  1029. "use strict";
  1030. var _interopRequireDefault = __webpack_require__(1);
  1031. exports.__esModule = true;
  1032. exports.default = void 0;
  1033. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  1034. var _vue = _interopRequireDefault(__webpack_require__(4));
  1035. var _ImagePreview = _interopRequireDefault(__webpack_require__(192));
  1036. var _utils = __webpack_require__(0);
  1037. var instance;
  1038. var defaultConfig = {
  1039. loop: true,
  1040. value: true,
  1041. images: [],
  1042. maxZoom: 3,
  1043. minZoom: 1 / 3,
  1044. onClose: null,
  1045. onChange: null,
  1046. className: '',
  1047. showIndex: true,
  1048. closeable: false,
  1049. closeIcon: 'clear',
  1050. asyncClose: false,
  1051. getContainer: 'body',
  1052. startPosition: 0,
  1053. swipeDuration: 500,
  1054. showIndicators: false,
  1055. closeOnPopstate: true,
  1056. closeIconPosition: 'top-right'
  1057. };
  1058. var initInstance = function initInstance() {
  1059. instance = new (_vue.default.extend(_ImagePreview.default))({
  1060. el: document.createElement('div')
  1061. });
  1062. document.body.appendChild(instance.$el);
  1063. instance.$on('change', function (index) {
  1064. if (instance.onChange) {
  1065. instance.onChange(index);
  1066. }
  1067. });
  1068. instance.$on('scale', function (data) {
  1069. if (instance.onScale) {
  1070. instance.onScale(data);
  1071. }
  1072. });
  1073. };
  1074. var ImagePreview = function ImagePreview(images, startPosition) {
  1075. if (startPosition === void 0) {
  1076. startPosition = 0;
  1077. }
  1078. /* istanbul ignore if */
  1079. if (_utils.isServer) {
  1080. return;
  1081. }
  1082. if (!instance) {
  1083. initInstance();
  1084. }
  1085. var options = Array.isArray(images) ? {
  1086. images: images,
  1087. startPosition: startPosition
  1088. } : images;
  1089. (0, _extends2.default)(instance, defaultConfig, options);
  1090. instance.$once('input', function (show) {
  1091. instance.value = show;
  1092. });
  1093. instance.$once('closed', function () {
  1094. instance.images = [];
  1095. });
  1096. if (options.onClose) {
  1097. instance.$off('close');
  1098. instance.$once('close', options.onClose);
  1099. }
  1100. return instance;
  1101. };
  1102. ImagePreview.Component = _ImagePreview.default;
  1103. ImagePreview.install = function () {
  1104. _vue.default.use(_ImagePreview.default);
  1105. };
  1106. var _default = ImagePreview;
  1107. exports.default = _default;
  1108. /***/ }),
  1109. /***/ 16:
  1110. /***/ (function(module, exports, __webpack_require__) {
  1111. "use strict";
  1112. function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=["attrs","props","domProps"],toArrayMerge=["class","style","directives"],functionalMerge=["on","nativeOn"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=d.concat(e)}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=g.concat(h)}else c[b][f]=a[b][f];}else if("hook"==b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}};module.exports=mergeJsxProps;
  1113. /***/ }),
  1114. /***/ 18:
  1115. /***/ (function(module, exports) {
  1116. function _extends() {
  1117. module.exports = _extends = Object.assign || function (target) {
  1118. for (var i = 1; i < arguments.length; i++) {
  1119. var source = arguments[i];
  1120. for (var key in source) {
  1121. if (Object.prototype.hasOwnProperty.call(source, key)) {
  1122. target[key] = source[key];
  1123. }
  1124. }
  1125. }
  1126. return target;
  1127. };
  1128. return _extends.apply(this, arguments);
  1129. }
  1130. module.exports = _extends;
  1131. /***/ }),
  1132. /***/ 19:
  1133. /***/ (function(module, exports, __webpack_require__) {
  1134. "use strict";
  1135. exports.__esModule = true;
  1136. exports.isNumeric = isNumeric;
  1137. exports.isNaN = isNaN;
  1138. function isNumeric(val) {
  1139. return /^\d+(\.\d+)?$/.test(val);
  1140. }
  1141. function isNaN(val) {
  1142. if (Number.isNaN) {
  1143. return Number.isNaN(val);
  1144. } // eslint-disable-next-line no-self-compare
  1145. return val !== val;
  1146. }
  1147. /***/ }),
  1148. /***/ 190:
  1149. /***/ (function(module, exports, __webpack_require__) {
  1150. var content = __webpack_require__(191);
  1151. if(typeof content === 'string') content = [[module.i, content, '']];
  1152. var transform;
  1153. var insertInto;
  1154. var options = {"hmr":true}
  1155. options.transform = transform
  1156. options.insertInto = undefined;
  1157. var update = __webpack_require__(6)(content, options);
  1158. if(content.locals) module.exports = content.locals;
  1159. if(false) {}
  1160. /***/ }),
  1161. /***/ 191:
  1162. /***/ (function(module, exports, __webpack_require__) {
  1163. exports = module.exports = __webpack_require__(5)(false);
  1164. // Module
  1165. exports.push([module.i, ".van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image{width:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-image-preview__image--vertical{width:auto;height:100%}.van-image-preview__image img{-webkit-user-drag:none}.van-image-preview__image .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:16px;left:50%;color:#fff;font-size:14px;line-height:20px;text-shadow:0 1px 1px #323233;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}.van-image-preview__overlay{background-color:rgba(0,0,0,.9)}.van-image-preview__close-icon{position:absolute;z-index:1;color:#c8c9cc;font-size:22px;cursor:pointer}.van-image-preview__close-icon:active{color:#969799}.van-image-preview__close-icon--top-left{top:16px;left:16px}.van-image-preview__close-icon--top-right{top:16px;right:16px}.van-image-preview__close-icon--bottom-left{bottom:16px;left:16px}.van-image-preview__close-icon--bottom-right{right:16px;bottom:16px}", ""]);
  1166. /***/ }),
  1167. /***/ 192:
  1168. /***/ (function(module, exports, __webpack_require__) {
  1169. "use strict";
  1170. var _interopRequireDefault = __webpack_require__(1);
  1171. exports.__esModule = true;
  1172. exports.default = void 0;
  1173. var _shared = __webpack_require__(134);
  1174. var _popup = __webpack_require__(75);
  1175. var _touch = __webpack_require__(51);
  1176. var _bindEvent = __webpack_require__(60);
  1177. var _icon = _interopRequireDefault(__webpack_require__(35));
  1178. var _swipe = _interopRequireDefault(__webpack_require__(119));
  1179. var _ImagePreviewItem = _interopRequireDefault(__webpack_require__(193));
  1180. // Utils
  1181. // Mixins
  1182. // Components
  1183. var _default2 = (0, _shared.createComponent)({
  1184. mixins: [_touch.TouchMixin, (0, _popup.PopupMixin)({
  1185. skipToggleEvent: true
  1186. }), (0, _bindEvent.BindEventMixin)(function (bind) {
  1187. bind(window, 'resize', this.resize, true);
  1188. bind(window, 'orientationchange', this.resize, true);
  1189. })],
  1190. props: {
  1191. className: null,
  1192. closeable: Boolean,
  1193. asyncClose: Boolean,
  1194. showIndicators: Boolean,
  1195. images: {
  1196. type: Array,
  1197. default: function _default() {
  1198. return [];
  1199. }
  1200. },
  1201. loop: {
  1202. type: Boolean,
  1203. default: true
  1204. },
  1205. overlay: {
  1206. type: Boolean,
  1207. default: true
  1208. },
  1209. minZoom: {
  1210. type: [Number, String],
  1211. default: 1 / 3
  1212. },
  1213. maxZoom: {
  1214. type: [Number, String],
  1215. default: 3
  1216. },
  1217. showIndex: {
  1218. type: Boolean,
  1219. default: true
  1220. },
  1221. swipeDuration: {
  1222. type: [Number, String],
  1223. default: 500
  1224. },
  1225. startPosition: {
  1226. type: [Number, String],
  1227. default: 0
  1228. },
  1229. overlayClass: {
  1230. type: String,
  1231. default: (0, _shared.bem)('overlay')
  1232. },
  1233. closeIcon: {
  1234. type: String,
  1235. default: 'clear'
  1236. },
  1237. closeOnPopstate: {
  1238. type: Boolean,
  1239. default: true
  1240. },
  1241. closeIconPosition: {
  1242. type: String,
  1243. default: 'top-right'
  1244. }
  1245. },
  1246. data: function data() {
  1247. return {
  1248. active: 0,
  1249. rootWidth: 0,
  1250. rootHeight: 0,
  1251. doubleClickTimer: null
  1252. };
  1253. },
  1254. mounted: function mounted() {
  1255. this.resize();
  1256. },
  1257. watch: {
  1258. startPosition: 'setActive',
  1259. value: function value(val) {
  1260. var _this = this;
  1261. if (val) {
  1262. this.setActive(+this.startPosition);
  1263. this.$nextTick(function () {
  1264. _this.resize();
  1265. _this.$refs.swipe.swipeTo(+_this.startPosition, {
  1266. immediate: true
  1267. });
  1268. });
  1269. } else {
  1270. this.$emit('close', {
  1271. index: this.active,
  1272. url: this.images[this.active]
  1273. });
  1274. }
  1275. }
  1276. },
  1277. methods: {
  1278. resize: function resize() {
  1279. if (this.$el && this.$el.getBoundingClientRect) {
  1280. var rect = this.$el.getBoundingClientRect();
  1281. this.rootWidth = rect.width;
  1282. this.rootHeight = rect.height;
  1283. }
  1284. },
  1285. emitClose: function emitClose() {
  1286. if (!this.asyncClose) {
  1287. this.$emit('input', false);
  1288. }
  1289. },
  1290. emitScale: function emitScale(args) {
  1291. this.$emit('scale', args);
  1292. },
  1293. setActive: function setActive(active) {
  1294. if (active !== this.active) {
  1295. this.active = active;
  1296. this.$emit('change', active);
  1297. }
  1298. },
  1299. genIndex: function genIndex() {
  1300. var h = this.$createElement;
  1301. if (this.showIndex) {
  1302. return h("div", {
  1303. "class": (0, _shared.bem)('index')
  1304. }, [this.slots('index', {
  1305. index: this.active
  1306. }) || this.active + 1 + " / " + this.images.length]);
  1307. }
  1308. },
  1309. genCover: function genCover() {
  1310. var h = this.$createElement;
  1311. var cover = this.slots('cover');
  1312. if (cover) {
  1313. return h("div", {
  1314. "class": (0, _shared.bem)('cover')
  1315. }, [cover]);
  1316. }
  1317. },
  1318. genImages: function genImages() {
  1319. var _this2 = this;
  1320. var h = this.$createElement;
  1321. return h(_swipe.default, {
  1322. "ref": "swipe",
  1323. "attrs": {
  1324. "lazyRender": true,
  1325. "loop": this.loop,
  1326. "duration": this.swipeDuration,
  1327. "initialSwipe": this.startPosition,
  1328. "showIndicators": this.showIndicators,
  1329. "indicatorColor": "white"
  1330. },
  1331. "class": (0, _shared.bem)('swipe'),
  1332. "on": {
  1333. "change": this.setActive
  1334. }
  1335. }, [this.images.map(function (image) {
  1336. return h(_ImagePreviewItem.default, {
  1337. "attrs": {
  1338. "src": image,
  1339. "show": _this2.value,
  1340. "active": _this2.active,
  1341. "maxZoom": _this2.maxZoom,
  1342. "minZoom": _this2.minZoom,
  1343. "rootWidth": _this2.rootWidth,
  1344. "rootHeight": _this2.rootHeight
  1345. },
  1346. "on": {
  1347. "scale": _this2.emitScale,
  1348. "close": _this2.emitClose
  1349. }
  1350. });
  1351. })]);
  1352. },
  1353. genClose: function genClose() {
  1354. var h = this.$createElement;
  1355. if (this.closeable) {
  1356. return h(_icon.default, {
  1357. "attrs": {
  1358. "role": "button",
  1359. "name": this.closeIcon
  1360. },
  1361. "class": (0, _shared.bem)('close-icon', this.closeIconPosition),
  1362. "on": {
  1363. "click": this.emitClose
  1364. }
  1365. });
  1366. }
  1367. },
  1368. onClosed: function onClosed() {
  1369. this.$emit('closed');
  1370. },
  1371. // @exposed-api
  1372. swipeTo: function swipeTo(index, options) {
  1373. if (this.$refs.swipe) {
  1374. this.$refs.swipe.swipeTo(index, options);
  1375. }
  1376. }
  1377. },
  1378. render: function render() {
  1379. var h = arguments[0];
  1380. if (!this.shouldRender) {
  1381. return;
  1382. }
  1383. return h("transition", {
  1384. "attrs": {
  1385. "name": "van-fade"
  1386. },
  1387. "on": {
  1388. "afterLeave": this.onClosed
  1389. }
  1390. }, [h("div", {
  1391. "directives": [{
  1392. name: "show",
  1393. value: this.value
  1394. }],
  1395. "class": [(0, _shared.bem)(), this.className]
  1396. }, [this.genClose(), this.genImages(), this.genIndex(), this.genCover()])]);
  1397. }
  1398. });
  1399. exports.default = _default2;
  1400. /***/ }),
  1401. /***/ 193:
  1402. /***/ (function(module, exports, __webpack_require__) {
  1403. "use strict";
  1404. var _interopRequireDefault = __webpack_require__(1);
  1405. exports.__esModule = true;
  1406. exports.default = void 0;
  1407. var _shared = __webpack_require__(134);
  1408. var _number = __webpack_require__(81);
  1409. var _event = __webpack_require__(30);
  1410. var _touch = __webpack_require__(51);
  1411. var _image = _interopRequireDefault(__webpack_require__(100));
  1412. var _loading = _interopRequireDefault(__webpack_require__(71));
  1413. var _swipeItem = _interopRequireDefault(__webpack_require__(118));
  1414. // Utils
  1415. // Mixins
  1416. // Component
  1417. function getDistance(touches) {
  1418. return Math.sqrt(Math.pow(touches[0].clientX - touches[1].clientX, 2) + Math.pow(touches[0].clientY - touches[1].clientY, 2));
  1419. }
  1420. var _default = {
  1421. mixins: [_touch.TouchMixin],
  1422. props: {
  1423. src: String,
  1424. show: Boolean,
  1425. active: Number,
  1426. minZoom: [Number, String],
  1427. maxZoom: [Number, String],
  1428. rootWidth: Number,
  1429. rootHeight: Number
  1430. },
  1431. data: function data() {
  1432. return {
  1433. scale: 1,
  1434. moveX: 0,
  1435. moveY: 0,
  1436. moving: false,
  1437. zooming: false,
  1438. imageRatio: 0,
  1439. displayWidth: 0,
  1440. displayHeight: 0
  1441. };
  1442. },
  1443. computed: {
  1444. vertical: function vertical() {
  1445. var rootWidth = this.rootWidth,
  1446. rootHeight = this.rootHeight;
  1447. var rootRatio = rootHeight / rootWidth;
  1448. return this.imageRatio > rootRatio;
  1449. },
  1450. imageStyle: function imageStyle() {
  1451. var scale = this.scale;
  1452. var style = {
  1453. transitionDuration: this.zooming || this.moving ? '0s' : '.3s'
  1454. };
  1455. if (scale !== 1) {
  1456. var offsetX = this.moveX / scale;
  1457. var offsetY = this.moveY / scale;
  1458. style.transform = "scale(" + scale + ", " + scale + ") translate(" + offsetX + "px, " + offsetY + "px)";
  1459. }
  1460. return style;
  1461. },
  1462. maxMoveX: function maxMoveX() {
  1463. if (this.imageRatio) {
  1464. var displayWidth = this.vertical ? this.rootHeight / this.imageRatio : this.rootWidth;
  1465. return Math.max(0, (this.scale * displayWidth - this.rootWidth) / 2);
  1466. }
  1467. return 0;
  1468. },
  1469. maxMoveY: function maxMoveY() {
  1470. if (this.imageRatio) {
  1471. var displayHeight = this.vertical ? this.rootHeight : this.rootWidth * this.imageRatio;
  1472. return Math.max(0, (this.scale * displayHeight - this.rootHeight) / 2);
  1473. }
  1474. return 0;
  1475. }
  1476. },
  1477. watch: {
  1478. show: function show(val) {
  1479. if (!val) {
  1480. this.resetScale();
  1481. }
  1482. }
  1483. },
  1484. mounted: function mounted() {
  1485. this.bindTouchEvent(this.$el);
  1486. },
  1487. methods: {
  1488. resetScale: function resetScale() {
  1489. this.setScale(1);
  1490. this.moveX = 0;
  1491. this.moveY = 0;
  1492. },
  1493. setScale: function setScale(scale) {
  1494. this.scale = (0, _number.range)(scale, +this.minZoom, +this.maxZoom);
  1495. this.$emit('scale', {
  1496. scale: this.scale,
  1497. index: this.active
  1498. });
  1499. },
  1500. toggleScale: function toggleScale() {
  1501. var scale = this.scale > 1 ? 1 : 2;
  1502. this.setScale(scale);
  1503. this.moveX = 0;
  1504. this.moveY = 0;
  1505. },
  1506. onTouchStart: function onTouchStart(event) {
  1507. var touches = event.touches;
  1508. var _this$offsetX = this.offsetX,
  1509. offsetX = _this$offsetX === void 0 ? 0 : _this$offsetX;
  1510. this.touchStart(event);
  1511. this.touchStartTime = new Date();
  1512. this.startMoveX = this.moveX;
  1513. this.startMoveY = this.moveY;
  1514. this.moving = touches.length === 1 && this.scale !== 1;
  1515. this.zooming = touches.length === 2 && !offsetX;
  1516. if (this.zooming) {
  1517. this.startScale = this.scale;
  1518. this.startDistance = getDistance(event.touches);
  1519. }
  1520. },
  1521. onTouchMove: function onTouchMove(event) {
  1522. var touches = event.touches;
  1523. this.touchMove(event);
  1524. if (this.moving || this.zooming) {
  1525. (0, _event.preventDefault)(event, true);
  1526. }
  1527. if (this.moving) {
  1528. var moveX = this.deltaX + this.startMoveX;
  1529. var moveY = this.deltaY + this.startMoveY;
  1530. this.moveX = (0, _number.range)(moveX, -this.maxMoveX, this.maxMoveX);
  1531. this.moveY = (0, _number.range)(moveY, -this.maxMoveY, this.maxMoveY);
  1532. }
  1533. if (this.zooming && touches.length === 2) {
  1534. var distance = getDistance(touches);
  1535. var scale = this.startScale * distance / this.startDistance;
  1536. this.setScale(scale);
  1537. }
  1538. },
  1539. onTouchEnd: function onTouchEnd(event) {
  1540. var stopPropagation = false;
  1541. /* istanbul ignore else */
  1542. if (this.moving || this.zooming) {
  1543. stopPropagation = true;
  1544. if (this.moving && this.startMoveX === this.moveX && this.startMoveY === this.moveY) {
  1545. stopPropagation = false;
  1546. }
  1547. if (!event.touches.length) {
  1548. if (this.zooming) {
  1549. this.moveX = (0, _number.range)(this.moveX, -this.maxMoveX, this.maxMoveX);
  1550. this.moveY = (0, _number.range)(this.moveY, -this.maxMoveY, this.maxMoveY);
  1551. this.zooming = false;
  1552. }
  1553. this.moving = false;
  1554. this.startMoveX = 0;
  1555. this.startMoveY = 0;
  1556. this.startScale = 1;
  1557. if (this.scale < 1) {
  1558. this.resetScale();
  1559. }
  1560. }
  1561. } // eliminate tap delay on safari
  1562. (0, _event.preventDefault)(event, stopPropagation);
  1563. this.checkTap();
  1564. this.resetTouchStatus();
  1565. },
  1566. checkTap: function checkTap() {
  1567. var _this = this;
  1568. var _this$offsetX2 = this.offsetX,
  1569. offsetX = _this$offsetX2 === void 0 ? 0 : _this$offsetX2,
  1570. _this$offsetY = this.offsetY,
  1571. offsetY = _this$offsetY === void 0 ? 0 : _this$offsetY;
  1572. var deltaTime = new Date() - this.touchStartTime;
  1573. var TAP_TIME = 250;
  1574. var TAP_OFFSET = 10;
  1575. if (offsetX < TAP_OFFSET && offsetY < TAP_OFFSET && deltaTime < TAP_TIME) {
  1576. if (this.doubleTapTimer) {
  1577. clearTimeout(this.doubleTapTimer);
  1578. this.doubleTapTimer = null;
  1579. this.toggleScale();
  1580. } else {
  1581. this.doubleTapTimer = setTimeout(function () {
  1582. _this.$emit('close');
  1583. _this.doubleTapTimer = null;
  1584. }, TAP_TIME);
  1585. }
  1586. }
  1587. },
  1588. onLoad: function onLoad(event) {
  1589. var _event$target = event.target,
  1590. naturalWidth = _event$target.naturalWidth,
  1591. naturalHeight = _event$target.naturalHeight;
  1592. this.imageRatio = naturalHeight / naturalWidth;
  1593. }
  1594. },
  1595. render: function render() {
  1596. var h = arguments[0];
  1597. var imageSlots = {
  1598. loading: function loading() {
  1599. return h(_loading.default, {
  1600. "attrs": {
  1601. "type": "spinner"
  1602. }
  1603. });
  1604. }
  1605. };
  1606. return h(_swipeItem.default, {
  1607. "class": (0, _shared.bem)('swipe-item')
  1608. }, [h(_image.default, {
  1609. "attrs": {
  1610. "src": this.src,
  1611. "fit": "contain"
  1612. },
  1613. "class": (0, _shared.bem)('image', {
  1614. vertical: this.vertical
  1615. }),
  1616. "style": this.imageStyle,
  1617. "scopedSlots": imageSlots,
  1618. "on": {
  1619. "load": this.onLoad
  1620. }
  1621. })]);
  1622. }
  1623. };
  1624. exports.default = _default;
  1625. /***/ }),
  1626. /***/ 20:
  1627. /***/ (function(module, exports, __webpack_require__) {
  1628. "use strict";
  1629. exports.__esModule = true;
  1630. exports.addUnit = addUnit;
  1631. exports.unitToPx = unitToPx;
  1632. var _ = __webpack_require__(0);
  1633. var _number = __webpack_require__(19);
  1634. function addUnit(value) {
  1635. if (!(0, _.isDef)(value)) {
  1636. return undefined;
  1637. }
  1638. value = String(value);
  1639. return (0, _number.isNumeric)(value) ? value + "px" : value;
  1640. } // cache
  1641. var rootFontSize;
  1642. function getRootFontSize() {
  1643. if (!rootFontSize) {
  1644. var doc = document.documentElement;
  1645. var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
  1646. rootFontSize = parseFloat(fontSize);
  1647. }
  1648. return rootFontSize;
  1649. }
  1650. function convertRem(value) {
  1651. value = value.replace(/rem/g, '');
  1652. return +value * getRootFontSize();
  1653. }
  1654. function convertVw(value) {
  1655. value = value.replace(/vw/g, '');
  1656. return +value * window.innerWidth / 100;
  1657. }
  1658. function convertVh(value) {
  1659. value = value.replace(/vh/g, '');
  1660. return +value * window.innerHeight / 100;
  1661. }
  1662. function unitToPx(value) {
  1663. if (typeof value === 'number') {
  1664. return value;
  1665. }
  1666. if (_.inBrowser) {
  1667. if (value.indexOf('rem') !== -1) {
  1668. return convertRem(value);
  1669. }
  1670. if (value.indexOf('vw') !== -1) {
  1671. return convertVw(value);
  1672. }
  1673. if (value.indexOf('vh') !== -1) {
  1674. return convertVh(value);
  1675. }
  1676. }
  1677. return parseFloat(value);
  1678. }
  1679. /***/ }),
  1680. /***/ 21:
  1681. /***/ (function(module, exports, __webpack_require__) {
  1682. "use strict";
  1683. exports.__esModule = true;
  1684. exports.deepAssign = deepAssign;
  1685. var _ = __webpack_require__(0);
  1686. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1687. function assignKey(to, from, key) {
  1688. var val = from[key];
  1689. if (!(0, _.isDef)(val)) {
  1690. return;
  1691. }
  1692. if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) {
  1693. to[key] = val;
  1694. } else {
  1695. // eslint-disable-next-line @typescript-eslint/no-use-before-define
  1696. to[key] = deepAssign(Object(to[key]), from[key]);
  1697. }
  1698. }
  1699. function deepAssign(to, from) {
  1700. Object.keys(from).forEach(function (key) {
  1701. assignKey(to, from, key);
  1702. });
  1703. return to;
  1704. }
  1705. /***/ }),
  1706. /***/ 22:
  1707. /***/ (function(module, exports, __webpack_require__) {
  1708. var content = __webpack_require__(23);
  1709. if(typeof content === 'string') content = [[module.i, content, '']];
  1710. var transform;
  1711. var insertInto;
  1712. var options = {"hmr":true}
  1713. options.transform = transform
  1714. options.insertInto = undefined;
  1715. var update = __webpack_require__(6)(content, options);
  1716. if(content.locals) module.exports = content.locals;
  1717. if(false) {}
  1718. /***/ }),
  1719. /***/ 23:
  1720. /***/ (function(module, exports, __webpack_require__) {
  1721. exports = module.exports = __webpack_require__(5)(false);
  1722. // Module
  1723. 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
  1724. /***/ }),
  1725. /***/ 24:
  1726. /***/ (function(module, exports, __webpack_require__) {
  1727. "use strict";
  1728. exports.__esModule = true;
  1729. exports.createNamespace = createNamespace;
  1730. var _bem = __webpack_require__(25);
  1731. var _component = __webpack_require__(26);
  1732. var _i18n = __webpack_require__(29);
  1733. function createNamespace(name) {
  1734. name = 'van-' + name;
  1735. return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)];
  1736. }
  1737. /***/ }),
  1738. /***/ 25:
  1739. /***/ (function(module, exports, __webpack_require__) {
  1740. "use strict";
  1741. exports.__esModule = true;
  1742. exports.createBEM = createBEM;
  1743. /**
  1744. * bem helper
  1745. * b() // 'button'
  1746. * b('text') // 'button__text'
  1747. * b({ disabled }) // 'button button--disabled'
  1748. * b('text', { disabled }) // 'button__text button__text--disabled'
  1749. * b(['disabled', 'primary']) // 'button button--disabled button--primary'
  1750. */
  1751. function gen(name, mods) {
  1752. if (!mods) {
  1753. return '';
  1754. }
  1755. if (typeof mods === 'string') {
  1756. return " " + name + "--" + mods;
  1757. }
  1758. if (Array.isArray(mods)) {
  1759. return mods.reduce(function (ret, item) {
  1760. return ret + gen(name, item);
  1761. }, '');
  1762. }
  1763. return Object.keys(mods).reduce(function (ret, key) {
  1764. return ret + (mods[key] ? gen(name, key) : '');
  1765. }, '');
  1766. }
  1767. function createBEM(name) {
  1768. return function (el, mods) {
  1769. if (el && typeof el !== 'string') {
  1770. mods = el;
  1771. el = '';
  1772. }
  1773. el = el ? name + "__" + el : name;
  1774. return "" + el + gen(el, mods);
  1775. };
  1776. }
  1777. /***/ }),
  1778. /***/ 26:
  1779. /***/ (function(module, exports, __webpack_require__) {
  1780. "use strict";
  1781. var _interopRequireDefault = __webpack_require__(1);
  1782. exports.__esModule = true;
  1783. exports.unifySlots = unifySlots;
  1784. exports.createComponent = createComponent;
  1785. __webpack_require__(11);
  1786. var _ = __webpack_require__(0);
  1787. var _string = __webpack_require__(9);
  1788. var _slots = __webpack_require__(28);
  1789. var _vue = _interopRequireDefault(__webpack_require__(4));
  1790. /**
  1791. * Create a basic component with common options
  1792. */
  1793. function install(Vue) {
  1794. var name = this.name;
  1795. Vue.component(name, this);
  1796. Vue.component((0, _string.camelize)("-" + name), this);
  1797. } // unify slots & scopedSlots
  1798. function unifySlots(context) {
  1799. // use data.scopedSlots in lower Vue version
  1800. var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
  1801. var slots = context.slots();
  1802. Object.keys(slots).forEach(function (key) {
  1803. if (!scopedSlots[key]) {
  1804. scopedSlots[key] = function () {
  1805. return slots[key];
  1806. };
  1807. }
  1808. });
  1809. return scopedSlots;
  1810. } // should be removed after Vue 3
  1811. function transformFunctionComponent(pure) {
  1812. return {
  1813. functional: true,
  1814. props: pure.props,
  1815. model: pure.model,
  1816. render: function render(h, context) {
  1817. return pure(h, context.props, unifySlots(context), context);
  1818. }
  1819. };
  1820. }
  1821. function createComponent(name) {
  1822. return function (sfc) {
  1823. if ((0, _.isFunction)(sfc)) {
  1824. sfc = transformFunctionComponent(sfc);
  1825. }
  1826. if (!sfc.functional) {
  1827. sfc.mixins = sfc.mixins || [];
  1828. sfc.mixins.push(_slots.SlotsMixin);
  1829. }
  1830. sfc.name = name;
  1831. sfc.install = install;
  1832. return sfc;
  1833. };
  1834. }
  1835. /***/ }),
  1836. /***/ 27:
  1837. /***/ (function(module, exports, __webpack_require__) {
  1838. "use strict";
  1839. exports.__esModule = true;
  1840. exports.default = void 0;
  1841. var _default = {
  1842. name: '姓名',
  1843. tel: '电话',
  1844. save: '保存',
  1845. confirm: '确认',
  1846. cancel: '取消',
  1847. delete: '删除',
  1848. complete: '完成',
  1849. loading: '加载中...',
  1850. telEmpty: '请填写电话',
  1851. nameEmpty: '请填写姓名',
  1852. nameInvalid: '请输入正确的姓名',
  1853. confirmDelete: '确定要删除吗',
  1854. telInvalid: '请输入正确的手机号',
  1855. vanCalendar: {
  1856. end: '结束',
  1857. start: '开始',
  1858. title: '日期选择',
  1859. confirm: '确定',
  1860. startEnd: '开始/结束',
  1861. weekdays: ['日', '一', '二', '三', '四', '五', '六'],
  1862. monthTitle: function monthTitle(year, month) {
  1863. return year + "\u5E74" + month + "\u6708";
  1864. },
  1865. rangePrompt: function rangePrompt(maxRange) {
  1866. return "\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 " + maxRange + " \u5929";
  1867. }
  1868. },
  1869. vanCascader: {
  1870. select: '请选择'
  1871. },
  1872. vanContactCard: {
  1873. addText: '添加联系人'
  1874. },
  1875. vanContactList: {
  1876. addText: '新建联系人'
  1877. },
  1878. vanPagination: {
  1879. prev: '上一页',
  1880. next: '下一页'
  1881. },
  1882. vanPullRefresh: {
  1883. pulling: '下拉即可刷新...',
  1884. loosing: '释放即可刷新...'
  1885. },
  1886. vanSubmitBar: {
  1887. label: '合计:'
  1888. },
  1889. vanCoupon: {
  1890. unlimited: '无使用门槛',
  1891. discount: function discount(_discount) {
  1892. return _discount + "\u6298";
  1893. },
  1894. condition: function condition(_condition) {
  1895. return "\u6EE1" + _condition + "\u5143\u53EF\u7528";
  1896. }
  1897. },
  1898. vanCouponCell: {
  1899. title: '优惠券',
  1900. tips: '暂无可用',
  1901. count: function count(_count) {
  1902. return _count + "\u5F20\u53EF\u7528";
  1903. }
  1904. },
  1905. vanCouponList: {
  1906. empty: '暂无优惠券',
  1907. exchange: '兑换',
  1908. close: '不使用优惠券',
  1909. enable: '可用',
  1910. disabled: '不可用',
  1911. placeholder: '请输入优惠码'
  1912. },
  1913. vanAddressEdit: {
  1914. area: '地区',
  1915. postal: '邮政编码',
  1916. areaEmpty: '请选择地区',
  1917. addressEmpty: '请填写详细地址',
  1918. postalEmpty: '邮政编码格式不正确',
  1919. defaultAddress: '设为默认收货地址',
  1920. telPlaceholder: '收货人手机号',
  1921. namePlaceholder: '收货人姓名',
  1922. areaPlaceholder: '选择省 / 市 / 区'
  1923. },
  1924. vanAddressEditDetail: {
  1925. label: '详细地址',
  1926. placeholder: '街道门牌、楼层房间号等信息'
  1927. },
  1928. vanAddressList: {
  1929. add: '新增地址'
  1930. }
  1931. };
  1932. exports.default = _default;
  1933. /***/ }),
  1934. /***/ 28:
  1935. /***/ (function(module, exports, __webpack_require__) {
  1936. "use strict";
  1937. exports.__esModule = true;
  1938. exports.SlotsMixin = void 0;
  1939. /**
  1940. * Use scopedSlots in Vue 2.6+
  1941. * downgrade to slots in lower version
  1942. */
  1943. var SlotsMixin = {
  1944. methods: {
  1945. slots: function slots(name, props) {
  1946. if (name === void 0) {
  1947. name = 'default';
  1948. }
  1949. var $slots = this.$slots,
  1950. $scopedSlots = this.$scopedSlots;
  1951. var scopedSlot = $scopedSlots[name];
  1952. if (scopedSlot) {
  1953. return scopedSlot(props);
  1954. }
  1955. return $slots[name];
  1956. }
  1957. }
  1958. };
  1959. exports.SlotsMixin = SlotsMixin;
  1960. /***/ }),
  1961. /***/ 29:
  1962. /***/ (function(module, exports, __webpack_require__) {
  1963. "use strict";
  1964. var _interopRequireDefault = __webpack_require__(1);
  1965. exports.__esModule = true;
  1966. exports.createI18N = createI18N;
  1967. var _ = __webpack_require__(0);
  1968. var _string = __webpack_require__(9);
  1969. var _locale = _interopRequireDefault(__webpack_require__(11));
  1970. function createI18N(name) {
  1971. var prefix = (0, _string.camelize)(name) + '.';
  1972. return function (path) {
  1973. var messages = _locale.default.messages();
  1974. var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
  1975. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  1976. args[_key - 1] = arguments[_key];
  1977. }
  1978. return (0, _.isFunction)(message) ? message.apply(void 0, args) : message;
  1979. };
  1980. }
  1981. /***/ }),
  1982. /***/ 30:
  1983. /***/ (function(module, exports, __webpack_require__) {
  1984. "use strict";
  1985. exports.__esModule = true;
  1986. exports.on = on;
  1987. exports.off = off;
  1988. exports.stopPropagation = stopPropagation;
  1989. exports.preventDefault = preventDefault;
  1990. exports.supportsPassive = void 0;
  1991. var _ = __webpack_require__(0);
  1992. // eslint-disable-next-line import/no-mutable-exports
  1993. var supportsPassive = false;
  1994. exports.supportsPassive = supportsPassive;
  1995. if (!_.isServer) {
  1996. try {
  1997. var opts = {};
  1998. Object.defineProperty(opts, 'passive', {
  1999. // eslint-disable-next-line getter-return
  2000. get: function get() {
  2001. /* istanbul ignore next */
  2002. exports.supportsPassive = supportsPassive = true;
  2003. }
  2004. });
  2005. window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
  2006. } catch (e) {}
  2007. }
  2008. function on(target, event, handler, passive) {
  2009. if (passive === void 0) {
  2010. passive = false;
  2011. }
  2012. if (!_.isServer) {
  2013. target.addEventListener(event, handler, supportsPassive ? {
  2014. capture: false,
  2015. passive: passive
  2016. } : false);
  2017. }
  2018. }
  2019. function off(target, event, handler) {
  2020. if (!_.isServer) {
  2021. target.removeEventListener(event, handler);
  2022. }
  2023. }
  2024. function stopPropagation(event) {
  2025. event.stopPropagation();
  2026. }
  2027. function preventDefault(event, isStopPropagation) {
  2028. /* istanbul ignore else */
  2029. if (typeof event.cancelable !== 'boolean' || event.cancelable) {
  2030. event.preventDefault();
  2031. }
  2032. if (isStopPropagation) {
  2033. stopPropagation(event);
  2034. }
  2035. }
  2036. /***/ }),
  2037. /***/ 35:
  2038. /***/ (function(module, exports, __webpack_require__) {
  2039. "use strict";
  2040. var _interopRequireDefault = __webpack_require__(1);
  2041. exports.__esModule = true;
  2042. exports.default = void 0;
  2043. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  2044. var _utils = __webpack_require__(0);
  2045. var _functional = __webpack_require__(14);
  2046. var _info = _interopRequireDefault(__webpack_require__(37));
  2047. // Utils
  2048. // Components
  2049. var _createNamespace = (0, _utils.createNamespace)('icon'),
  2050. createComponent = _createNamespace[0],
  2051. bem = _createNamespace[1];
  2052. function isImage(name) {
  2053. return name ? name.indexOf('/') !== -1 : false;
  2054. } // compatible with legacy usage, should be removed in next major version
  2055. var LEGACY_MAP = {
  2056. medel: 'medal',
  2057. 'medel-o': 'medal-o',
  2058. 'calender-o': 'calendar-o'
  2059. };
  2060. function correctName(name) {
  2061. return name && LEGACY_MAP[name] || name;
  2062. }
  2063. function Icon(h, props, slots, ctx) {
  2064. var _props$badge;
  2065. var name = correctName(props.name);
  2066. var imageIcon = isImage(name);
  2067. if (false) {}
  2068. return h(props.tag, (0, _babelHelperVueJsxMergeProps.default)([{
  2069. "class": [props.classPrefix, imageIcon ? '' : props.classPrefix + "-" + name],
  2070. "style": {
  2071. color: props.color,
  2072. fontSize: (0, _utils.addUnit)(props.size)
  2073. }
  2074. }, (0, _functional.inherit)(ctx, true)]), [slots.default && slots.default(), imageIcon && h("img", {
  2075. "class": bem('image'),
  2076. "attrs": {
  2077. "src": name
  2078. }
  2079. }), h(_info.default, {
  2080. "attrs": {
  2081. "dot": props.dot,
  2082. "info": (_props$badge = props.badge) != null ? _props$badge : props.info
  2083. }
  2084. })]);
  2085. }
  2086. Icon.props = {
  2087. dot: Boolean,
  2088. name: String,
  2089. size: [Number, String],
  2090. // @deprecated
  2091. // should be removed in next major version
  2092. info: [Number, String],
  2093. badge: [Number, String],
  2094. color: String,
  2095. tag: {
  2096. type: String,
  2097. default: 'i'
  2098. },
  2099. classPrefix: {
  2100. type: String,
  2101. default: bem()
  2102. }
  2103. };
  2104. var _default = createComponent(Icon);
  2105. exports.default = _default;
  2106. /***/ }),
  2107. /***/ 37:
  2108. /***/ (function(module, exports, __webpack_require__) {
  2109. "use strict";
  2110. var _interopRequireDefault = __webpack_require__(1);
  2111. exports.__esModule = true;
  2112. exports.default = void 0;
  2113. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  2114. var _utils = __webpack_require__(0);
  2115. var _functional = __webpack_require__(14);
  2116. // Utils
  2117. var _createNamespace = (0, _utils.createNamespace)('info'),
  2118. createComponent = _createNamespace[0],
  2119. bem = _createNamespace[1];
  2120. function Info(h, props, slots, ctx) {
  2121. var dot = props.dot,
  2122. info = props.info;
  2123. var showInfo = (0, _utils.isDef)(info) && info !== '';
  2124. if (!dot && !showInfo) {
  2125. return;
  2126. }
  2127. return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
  2128. "class": bem({
  2129. dot: dot
  2130. })
  2131. }, (0, _functional.inherit)(ctx, true)]), [dot ? '' : props.info]);
  2132. }
  2133. Info.props = {
  2134. dot: Boolean,
  2135. info: [Number, String]
  2136. };
  2137. var _default = createComponent(Info);
  2138. exports.default = _default;
  2139. /***/ }),
  2140. /***/ 4:
  2141. /***/ (function(module, exports) {
  2142. module.exports = require("vue");
  2143. /***/ }),
  2144. /***/ 41:
  2145. /***/ (function(module, exports, __webpack_require__) {
  2146. var content = __webpack_require__(42);
  2147. if(typeof content === 'string') content = [[module.i, content, '']];
  2148. var transform;
  2149. var insertInto;
  2150. var options = {"hmr":true}
  2151. options.transform = transform
  2152. options.insertInto = undefined;
  2153. var update = __webpack_require__(6)(content, options);
  2154. if(content.locals) module.exports = content.locals;
  2155. if(false) {}
  2156. /***/ }),
  2157. /***/ 42:
  2158. /***/ (function(module, exports, __webpack_require__) {
  2159. exports = module.exports = __webpack_require__(5)(false);
  2160. // Module
  2161. exports.push([module.i, ".van-info{position:absolute;top:0;right:0;box-sizing:border-box;min-width:16px;padding:0 3px;color:#fff;font-weight:500;font-size:12px;font-family:-apple-system-font,Helvetica Neue,Arial,sans-serif;line-height:1.2;text-align:center;background-color:#ffce6d;border:1px solid #fff;border-radius:16px;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%}.van-info--dot{width:8px;min-width:0;height:8px;background-color:#ffce6d;border-radius:100%}", ""]);
  2162. /***/ }),
  2163. /***/ 45:
  2164. /***/ (function(module, exports, __webpack_require__) {
  2165. var content = __webpack_require__(46);
  2166. if(typeof content === 'string') content = [[module.i, content, '']];
  2167. var transform;
  2168. var insertInto;
  2169. var options = {"hmr":true}
  2170. options.transform = transform
  2171. options.insertInto = undefined;
  2172. var update = __webpack_require__(6)(content, options);
  2173. if(content.locals) module.exports = content.locals;
  2174. if(false) {}
  2175. /***/ }),
  2176. /***/ 458:
  2177. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2178. "use strict";
  2179. __webpack_require__.r(__webpack_exports__);
  2180. /* harmony import */ var _tisdesign_m_lib_image_preview__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
  2181. /* harmony import */ var _tisdesign_m_lib_image_preview__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_image_preview__WEBPACK_IMPORTED_MODULE_0__);
  2182. /* harmony import */ var _tisdesign_m_lib_image_preview_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(459);
  2183. /* harmony import */ var _tisdesign_m_lib_image_preview_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_image_preview_style__WEBPACK_IMPORTED_MODULE_1__);
  2184. // ImagePreview.name = 'm-image-preview';
  2185. /* harmony default export */ __webpack_exports__["default"] = (_tisdesign_m_lib_image_preview__WEBPACK_IMPORTED_MODULE_0___default.a);
  2186. /***/ }),
  2187. /***/ 459:
  2188. /***/ (function(module, exports, __webpack_require__) {
  2189. __webpack_require__(22);
  2190. __webpack_require__(79);
  2191. __webpack_require__(41);
  2192. __webpack_require__(45);
  2193. __webpack_require__(116);
  2194. __webpack_require__(82);
  2195. __webpack_require__(73);
  2196. __webpack_require__(131);
  2197. __webpack_require__(129);
  2198. __webpack_require__(190);
  2199. /***/ }),
  2200. /***/ 46:
  2201. /***/ (function(module, exports, __webpack_require__) {
  2202. exports = module.exports = __webpack_require__(5)(false);
  2203. // Module
  2204. exports.push([module.i, "@font-face{font-weight:400;font-family:vant-icon;font-style:normal;font-display:auto;src:url(data:font/ttf;base64,d09GMgABAAAAAF7YAAsAAAAA4igAAF6FAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGVgCcZgqC/nCCuSwBNgIkA4c8C4NgAAQgBYR2B5RVG7y8J2ReK87drapqKAwhI4qSQGuzAy1sHMCgrWnZ//+flHSM4QAYWFrlrf9gVtv23tF2JUvlQFfKUKAgDpGWBE95ZSjamzhpK//bfiU6h8gMMx2m+jEdKqNwiSVpeTSCpKFcn7CTL/i2VRubdqOXMtE0guHu73pP+XNbjJG+1C+njuHxj3Jq8qJR1OXh/w/1vqwtmM2x7QnHVksBKtAUqFC4pwRrWP7xDq1mS26z3z1tGYTBY3AMUW42ISSEJLBJSLIBQiAJbx7IRza8hoSEJw8IBH6F8HyagAoB34ogiP71I2p9CVZbRatYBVsFq23VVvF5oY/aaj0xivaqtu6E3YKmbm+bXkYSZDDnfQrspiWinHCYjoXasLX3oXIz19ubOTK3tvYpUI+S/ta+aJ8rAoLIUT1akSImAN4apvHTAPDN9WkmCC0g+X2HX3jSlsuybOvG9nNkea/HSREsguF54Jg9wCkNZIoTPLHrRdZVfghkbVdCezVg6hMbMR4E4LZumFe/QbolQz96VC/Z815gNXWwBua5EHnIMDFVFzSOAWSQEmRqxXMlkTv2r49ne5gzbMaKCzOynRR2C0xPJEGg3dBCkf3RfKVvHJcAjmFhvnfqfzNp39vdmaRZGGkMzUU7hpQo7QUAQaCUuLQvj/N2e97xj/Qr/Wo0tlx8tSyy45YThwqXCmxYBI3fT0+VEtuXX000QofCTSMpADCqQg7Jz9WIEagNzgt5xEFEwLaW/5usdpt3ued6SCHVjEj4Ae30z7+pli2GFO+oi9TFrPcoV7m/kCufi85N99MA+PNnBpwZANJgAC4HkLgEQEocQOQiUPuQxAUGXC1JhSeS2gsxYgBqDyQlH0BeoDaKDiFVF1LqzpX72IVYrjsXrUsX3W7nunTporyiNEbsSB70bACWRpgGRqFitklozgzKAIZ3qk3SDL7763UmuAZ/PToWxTRNU0SkY6mHU4cx99/Dxhv7CHFmphgouhFRMXv9cXf3slm/dP3Ee/TeslVEq0gSIjOTBL7eHAEqfpJ5LA6Msjge6NwtTjzZpQHD6XHQPFwcHjQK7Aklh+eC2ffYkEHm4nIEt84Sz6pD8IJ5lv0AVudosgCSv9mngHX2mQKBmXmQBf14/NmhN5ZpY/u079j0GZ7xE24uhPT7/590OFonCIMRf5jwJXmptGnZjsvthcYPHQMTjMVfgEBsQTiCheDi4QsVJlyESFEEhETEosWQkJKRU4ilhFCJEy9BoiTJZlADQWAIFI5AotAYLA5PIJIoVBqdwWSxOVweXyCWSGVyhVKl1mh1eoPRZHZ2cXVz9/D08vbx9fPvH8/X+/P9URVESVZUTTdMy3Zczw/CKE7SLC/Kqm7arh/GaV7WbT+ut7f3D06ub27v7h8r1Vq90Wy1O91efzgaT6az+WK5Wm+2u/3heDpfnp5fXt/ePz6/vn9+/0rHhYdy8dkciTbHgIK9o0HUCM7/hUATAYxARhAjmBHCCGWEMcIZEYxIRhQjmhHDiGXEERIEIVEIkoQhWQRSRCFVDKSJhXRxkCEeMiVAlkTIlgQ5kiFXCuRJhXxpUCAdCmVAkUwolgUlsqFUDpTJhXJ5UCEfKhVAlUKoVgQ1iqFWCdQphXpl0KAcGlVAk0poVgUtqqFVDbSphXZ10KEeOjVAl0bo1gQ9mqFXC/RphX7aYIB2GKQDhuiEYbpghG4YpQfG6IVx+mCCfphkAKYYhGmGYIZhmGUE5hiFecZggXFYZAKWmIRlpmCFaVhlBtaYhXXmYIN52GQBtliEbZZgh2XYZQX2WIV91uCAdThkA47YhGO24IRtOGUHztiFc/bggn245ACuOIRrjuCGY7jlBO44hXvO4IFzeOQCnriEZ67ghWt4xQ285hbecAdvuYd3PMB7HuGDJ/joGT55gc9e4Ys3+OodvvmA7z7hhy/46Rt++YE/fuGvP/jnH5ZogAKEKEKEZ4hRggRlSFGBDFXIUYMCdSjRgApNqNGCBm1o0YEOXejRgwF9GGEAYwxhghFMMYYZJjDHFBaYwRJzWGEBa7zABkvYYgU7rGGPDRywhSN2cMIezjjABUe44gQ3nOGOCzxwhSdu8MId3njAB6/wxRv88BX+vqECFWFRFQ414VEXAQ0R0RQJLZHRFgUdUdEVgJ5A9AVhKBgjIRiLhonomIqBmZiYi4WFUCzFxkocrMXFRjxsxcdOAuwlxEEiHCXGSRKcJcVFMjxJjmcp8CIlXqXCm9R4lwYf0uJTOnxJj28Z8CMjfmVav1X3DCiBLLiSFQXZ8CA7ynKgCHJiILX/xtYi/WBjkX5fHMEJEI9A9gEY37G8t1O8tBL1rFExd5FCYPr/S/wTQ4p/l0YYfZaoO7lHF2n0hsbRMGmkQoTNrNlDTRgIpGARpanbIhFHf2IaMtBQZJL1iSAjgXilipC5JjHI+FoluUz+hh7cIj4KsdYhaiQ+hMaxhyhAqgJ9n/jMfJKNRSi5xnTN02GEyMc8Isl4JH63GGmYaD4PuA26JwVwaxBBVv/4WeSFUN2pweHmXs167W2/R/LF7vjtRUgrWtp+467ezCCZL00apkXMO5Fxli71vZtpxWbs6fn5TqeYzATSBXEcn6m2/NZYwHkcYjTbTBBxwX5LXGyVtA7qi5K6RnkuzpmtCBhQwFsrXgzAENWFIRIBmo40H49A9Eqmjz3mwobakodsgDfwYG/2Zx5AtP6n4WuoW8zqB2eR2SksiJj9ROTJZn9lLoo5s86gfQupSurF9NzV68YP8S3Kg/6M0HnJx9acVEzz51rIT7uFLK/k2CV3egg+Np1jbKEQlX5c1yuRL92RIvKcUx2//W3y98cSWGBkVTo1axaZPRDKFpMhsu6qZ7gIdg4JpaTbl5etNgLhj8qydJPSaF2Nh46W7um5LN/WgJ9nV9XkmidB98wuV5pbClecOu1jr04qaCFVYlpxDsxhyNskvc64Kut6rlIJat+6yDxAqFCaAcrNenNqYcuO1DSIWeYRrGW8tCUXblXleZqSne+KIVqqoCZJRqSroPNWpGm4cJzKCvOfMCRiBjj8DPz+aBDt9svVrl/25//TBAbEKURbEaVEVfu3ZU/2XidZtm+H+bxycEhTERN0UYxQ0cnOzty5Y7bEmP23L946swxTJE7cSFSpDjTntwZ36cPpzPG2zvitDRwbc09AduH60JhSyiIrO8Cg1IVK+jA+jW614seMH/RuQQT7Sa9yPovcpJhTqONabGLerB6T+2Zs0NuE0NKKc4f+oN6codw5FE+DMr5SarOw3HQ/JWiGEApovnZvHS42z/ugcIypDIacj9IsROZRhg2RJusVPEhqjwOSdgcC3N4jSEcw/IIMFRQQBPj12EfR0hhmCMzkEDlx3UaEYhsW2FdpGaRhCZVxBeayOosgVI1aCpyTwyie6QJSn1ea+CzI1so/+azd1Ea2YIPM5YDu2yrUiLkba5O8HXbfYV3r2rfQslnhykkrj8mrijRsyqTkPUwAzJWCweKO46gmoPFpuGWFwtYVZOxbr1jwgsrIJSD4Rghx+xlSHAg0n+1wkAslMgOAY985KIZ6hHk3UTcz5rK2ZKzoq0Xz4TnQSd8oytmWyEhIkVgANK40Ll7b0sXfaW2aF3DC75MOAeHmEyrjowuYy51Xb/DnwWvyzYGfUNwbdkt5xisaD87E+bN6vZQXL77ZMULrwFrp3ApgdJwaAN6Oji2IsjoehJ+KqANu5R6LU9wCt8TNWaLjtnjMLoYpHD3eFi1OjljV41XCe+JHG803zkZOMsFRjiyKCc8d8mYtYofLXxpj5aJ0pKucVqjBYmvrTXuyqDFB185cZLdqUvBGgcJ8/udh7qZT
  2205. /***/ }),
  2206. /***/ 47:
  2207. /***/ (function(module, exports, __webpack_require__) {
  2208. "use strict";
  2209. exports.__esModule = true;
  2210. exports.ChildrenMixin = ChildrenMixin;
  2211. exports.ParentMixin = ParentMixin;
  2212. var _vnodes = __webpack_require__(48);
  2213. function ChildrenMixin(_parent, options) {
  2214. var _inject, _computed;
  2215. if (options === void 0) {
  2216. options = {};
  2217. }
  2218. var indexKey = options.indexKey || 'index';
  2219. return {
  2220. inject: (_inject = {}, _inject[_parent] = {
  2221. default: null
  2222. }, _inject),
  2223. computed: (_computed = {
  2224. parent: function parent() {
  2225. if (this.disableBindRelation) {
  2226. return null;
  2227. }
  2228. return this[_parent];
  2229. }
  2230. }, _computed[indexKey] = function () {
  2231. this.bindRelation();
  2232. if (this.parent) {
  2233. return this.parent.children.indexOf(this);
  2234. }
  2235. return null;
  2236. }, _computed),
  2237. watch: {
  2238. disableBindRelation: function disableBindRelation(val) {
  2239. if (!val) {
  2240. this.bindRelation();
  2241. }
  2242. }
  2243. },
  2244. mounted: function mounted() {
  2245. this.bindRelation();
  2246. },
  2247. beforeDestroy: function beforeDestroy() {
  2248. var _this = this;
  2249. if (this.parent) {
  2250. this.parent.children = this.parent.children.filter(function (item) {
  2251. return item !== _this;
  2252. });
  2253. }
  2254. },
  2255. methods: {
  2256. bindRelation: function bindRelation() {
  2257. if (!this.parent || this.parent.children.indexOf(this) !== -1) {
  2258. return;
  2259. }
  2260. var children = [].concat(this.parent.children, [this]);
  2261. (0, _vnodes.sortChildren)(children, this.parent);
  2262. this.parent.children = children;
  2263. }
  2264. }
  2265. };
  2266. }
  2267. function ParentMixin(parent) {
  2268. return {
  2269. provide: function provide() {
  2270. var _ref;
  2271. return _ref = {}, _ref[parent] = this, _ref;
  2272. },
  2273. data: function data() {
  2274. return {
  2275. children: []
  2276. };
  2277. }
  2278. };
  2279. }
  2280. /***/ }),
  2281. /***/ 48:
  2282. /***/ (function(module, exports, __webpack_require__) {
  2283. "use strict";
  2284. exports.__esModule = true;
  2285. exports.sortChildren = sortChildren;
  2286. function flattenVNodes(vnodes) {
  2287. var result = [];
  2288. function traverse(vnodes) {
  2289. vnodes.forEach(function (vnode) {
  2290. result.push(vnode);
  2291. if (vnode.componentInstance) {
  2292. traverse(vnode.componentInstance.$children.map(function (item) {
  2293. return item.$vnode;
  2294. }));
  2295. }
  2296. if (vnode.children) {
  2297. traverse(vnode.children);
  2298. }
  2299. });
  2300. }
  2301. traverse(vnodes);
  2302. return result;
  2303. } // sort children instances by vnodes order
  2304. function sortChildren(children, parent) {
  2305. var componentOptions = parent.$vnode.componentOptions;
  2306. if (!componentOptions || !componentOptions.children) {
  2307. return;
  2308. }
  2309. var vnodes = flattenVNodes(componentOptions.children);
  2310. children.sort(function (a, b) {
  2311. return vnodes.indexOf(a.$vnode) - vnodes.indexOf(b.$vnode);
  2312. });
  2313. }
  2314. /***/ }),
  2315. /***/ 5:
  2316. /***/ (function(module, exports, __webpack_require__) {
  2317. "use strict";
  2318. /*
  2319. MIT License http://www.opensource.org/licenses/mit-license.php
  2320. Author Tobias Koppers @sokra
  2321. */
  2322. // css base code, injected by the css-loader
  2323. module.exports = function (useSourceMap) {
  2324. var list = []; // return the list of modules as css string
  2325. list.toString = function toString() {
  2326. return this.map(function (item) {
  2327. var content = cssWithMappingToString(item, useSourceMap);
  2328. if (item[2]) {
  2329. return '@media ' + item[2] + '{' + content + '}';
  2330. } else {
  2331. return content;
  2332. }
  2333. }).join('');
  2334. }; // import a list of modules into the list
  2335. list.i = function (modules, mediaQuery) {
  2336. if (typeof modules === 'string') {
  2337. modules = [[null, modules, '']];
  2338. }
  2339. var alreadyImportedModules = {};
  2340. for (var i = 0; i < this.length; i++) {
  2341. var id = this[i][0];
  2342. if (id != null) {
  2343. alreadyImportedModules[id] = true;
  2344. }
  2345. }
  2346. for (i = 0; i < modules.length; i++) {
  2347. var item = modules[i]; // skip already imported module
  2348. // this implementation is not 100% perfect for weird media query combinations
  2349. // when a module is imported multiple times with different media queries.
  2350. // I hope this will never occur (Hey this way we have smaller bundles)
  2351. if (item[0] == null || !alreadyImportedModules[item[0]]) {
  2352. if (mediaQuery && !item[2]) {
  2353. item[2] = mediaQuery;
  2354. } else if (mediaQuery) {
  2355. item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
  2356. }
  2357. list.push(item);
  2358. }
  2359. }
  2360. };
  2361. return list;
  2362. };
  2363. function cssWithMappingToString(item, useSourceMap) {
  2364. var content = item[1] || '';
  2365. var cssMapping = item[3];
  2366. if (!cssMapping) {
  2367. return content;
  2368. }
  2369. if (useSourceMap && typeof btoa === 'function') {
  2370. var sourceMapping = toComment(cssMapping);
  2371. var sourceURLs = cssMapping.sources.map(function (source) {
  2372. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
  2373. });
  2374. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  2375. }
  2376. return [content].join('\n');
  2377. } // Adapted from convert-source-map (MIT)
  2378. function toComment(sourceMap) {
  2379. // eslint-disable-next-line no-undef
  2380. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  2381. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  2382. return '/*# ' + data + ' */';
  2383. }
  2384. /***/ }),
  2385. /***/ 51:
  2386. /***/ (function(module, exports, __webpack_require__) {
  2387. "use strict";
  2388. exports.__esModule = true;
  2389. exports.TouchMixin = void 0;
  2390. var _event = __webpack_require__(30);
  2391. var MIN_DISTANCE = 10;
  2392. function getDirection(x, y) {
  2393. if (x > y && x > MIN_DISTANCE) {
  2394. return 'horizontal';
  2395. }
  2396. if (y > x && y > MIN_DISTANCE) {
  2397. return 'vertical';
  2398. }
  2399. return '';
  2400. }
  2401. var TouchMixin = {
  2402. data: function data() {
  2403. return {
  2404. direction: ''
  2405. };
  2406. },
  2407. methods: {
  2408. touchStart: function touchStart(event) {
  2409. this.resetTouchStatus();
  2410. this.startX = event.touches[0].clientX;
  2411. this.startY = event.touches[0].clientY;
  2412. },
  2413. touchMove: function touchMove(event) {
  2414. var touch = event.touches[0];
  2415. this.deltaX = touch.clientX - this.startX;
  2416. this.deltaY = touch.clientY - this.startY;
  2417. this.offsetX = Math.abs(this.deltaX);
  2418. this.offsetY = Math.abs(this.deltaY);
  2419. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  2420. },
  2421. resetTouchStatus: function resetTouchStatus() {
  2422. this.direction = '';
  2423. this.deltaX = 0;
  2424. this.deltaY = 0;
  2425. this.offsetX = 0;
  2426. this.offsetY = 0;
  2427. },
  2428. // avoid Vue 2.6 event bubble issues by manually binding events
  2429. // https://github.com/youzan/vant/issues/3015
  2430. bindTouchEvent: function bindTouchEvent(el) {
  2431. var onTouchStart = this.onTouchStart,
  2432. onTouchMove = this.onTouchMove,
  2433. onTouchEnd = this.onTouchEnd;
  2434. (0, _event.on)(el, 'touchstart', onTouchStart);
  2435. (0, _event.on)(el, 'touchmove', onTouchMove);
  2436. if (onTouchEnd) {
  2437. (0, _event.on)(el, 'touchend', onTouchEnd);
  2438. (0, _event.on)(el, 'touchcancel', onTouchEnd);
  2439. }
  2440. }
  2441. }
  2442. };
  2443. exports.TouchMixin = TouchMixin;
  2444. /***/ }),
  2445. /***/ 53:
  2446. /***/ (function(module, exports, __webpack_require__) {
  2447. "use strict";
  2448. exports.__esModule = true;
  2449. exports.getScroller = getScroller;
  2450. exports.getScrollTop = getScrollTop;
  2451. exports.setScrollTop = setScrollTop;
  2452. exports.getRootScrollTop = getRootScrollTop;
  2453. exports.setRootScrollTop = setRootScrollTop;
  2454. exports.getElementTop = getElementTop;
  2455. exports.getVisibleHeight = getVisibleHeight;
  2456. exports.getVisibleTop = getVisibleTop;
  2457. function isWindow(val) {
  2458. return val === window;
  2459. } // get nearest scroll element
  2460. // https://github.com/youzan/vant/issues/3823
  2461. var overflowScrollReg = /scroll|auto/i;
  2462. function getScroller(el, root) {
  2463. if (root === void 0) {
  2464. root = window;
  2465. }
  2466. var node = el;
  2467. while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== root) {
  2468. var _window$getComputedSt = window.getComputedStyle(node),
  2469. overflowY = _window$getComputedSt.overflowY;
  2470. if (overflowScrollReg.test(overflowY)) {
  2471. return node;
  2472. }
  2473. node = node.parentNode;
  2474. }
  2475. return root;
  2476. }
  2477. function getScrollTop(el) {
  2478. var top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset; // iOS scroll bounce cause minus scrollTop
  2479. return Math.max(top, 0);
  2480. }
  2481. function setScrollTop(el, value) {
  2482. if ('scrollTop' in el) {
  2483. el.scrollTop = value;
  2484. } else {
  2485. el.scrollTo(el.scrollX, value);
  2486. }
  2487. }
  2488. function getRootScrollTop() {
  2489. return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
  2490. }
  2491. function setRootScrollTop(value) {
  2492. setScrollTop(window, value);
  2493. setScrollTop(document.body, value);
  2494. } // get distance from element top to page top or scroller top
  2495. function getElementTop(el, scroller) {
  2496. if (isWindow(el)) {
  2497. return 0;
  2498. }
  2499. var scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
  2500. return el.getBoundingClientRect().top + scrollTop;
  2501. }
  2502. function getVisibleHeight(el) {
  2503. if (isWindow(el)) {
  2504. return el.innerHeight;
  2505. }
  2506. return el.getBoundingClientRect().height;
  2507. }
  2508. function getVisibleTop(el) {
  2509. if (isWindow(el)) {
  2510. return 0;
  2511. }
  2512. return el.getBoundingClientRect().top;
  2513. }
  2514. /***/ }),
  2515. /***/ 6:
  2516. /***/ (function(module, exports, __webpack_require__) {
  2517. /*
  2518. MIT License http://www.opensource.org/licenses/mit-license.php
  2519. Author Tobias Koppers @sokra
  2520. */
  2521. var stylesInDom = {};
  2522. var memoize = function (fn) {
  2523. var memo;
  2524. return function () {
  2525. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  2526. return memo;
  2527. };
  2528. };
  2529. var isOldIE = memoize(function () {
  2530. // Test for IE <= 9 as proposed by Browserhacks
  2531. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  2532. // Tests for existence of standard globals is to allow style-loader
  2533. // to operate correctly into non-standard environments
  2534. // @see https://github.com/webpack-contrib/style-loader/issues/177
  2535. return window && document && document.all && !window.atob;
  2536. });
  2537. var getTarget = function (target, parent) {
  2538. if (parent){
  2539. return parent.querySelector(target);
  2540. }
  2541. return document.querySelector(target);
  2542. };
  2543. var getElement = (function (fn) {
  2544. var memo = {};
  2545. return function(target, parent) {
  2546. // If passing function in options, then use it for resolve "head" element.
  2547. // Useful for Shadow Root style i.e
  2548. // {
  2549. // insertInto: function () { return document.querySelector("#foo").shadowRoot }
  2550. // }
  2551. if (typeof target === 'function') {
  2552. return target();
  2553. }
  2554. if (typeof memo[target] === "undefined") {
  2555. var styleTarget = getTarget.call(this, target, parent);
  2556. // Special case to return head of iframe instead of iframe itself
  2557. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  2558. try {
  2559. // This will throw an exception if access to iframe is blocked
  2560. // due to cross-origin restrictions
  2561. styleTarget = styleTarget.contentDocument.head;
  2562. } catch(e) {
  2563. styleTarget = null;
  2564. }
  2565. }
  2566. memo[target] = styleTarget;
  2567. }
  2568. return memo[target]
  2569. };
  2570. })();
  2571. var singleton = null;
  2572. var singletonCounter = 0;
  2573. var stylesInsertedAtTop = [];
  2574. var fixUrls = __webpack_require__(12);
  2575. module.exports = function(list, options) {
  2576. if (typeof DEBUG !== "undefined" && DEBUG) {
  2577. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  2578. }
  2579. options = options || {};
  2580. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  2581. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  2582. // tags it will allow on a page
  2583. if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
  2584. // By default, add <style> tags to the <head> element
  2585. if (!options.insertInto) options.insertInto = "head";
  2586. // By default, add <style> tags to the bottom of the target
  2587. if (!options.insertAt) options.insertAt = "bottom";
  2588. var styles = listToStyles(list, options);
  2589. addStylesToDom(styles, options);
  2590. return function update (newList) {
  2591. var mayRemove = [];
  2592. for (var i = 0; i < styles.length; i++) {
  2593. var item = styles[i];
  2594. var domStyle = stylesInDom[item.id];
  2595. domStyle.refs--;
  2596. mayRemove.push(domStyle);
  2597. }
  2598. if(newList) {
  2599. var newStyles = listToStyles(newList, options);
  2600. addStylesToDom(newStyles, options);
  2601. }
  2602. for (var i = 0; i < mayRemove.length; i++) {
  2603. var domStyle = mayRemove[i];
  2604. if(domStyle.refs === 0) {
  2605. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  2606. delete stylesInDom[domStyle.id];
  2607. }
  2608. }
  2609. };
  2610. };
  2611. function addStylesToDom (styles, options) {
  2612. for (var i = 0; i < styles.length; i++) {
  2613. var item = styles[i];
  2614. var domStyle = stylesInDom[item.id];
  2615. if(domStyle) {
  2616. domStyle.refs++;
  2617. for(var j = 0; j < domStyle.parts.length; j++) {
  2618. domStyle.parts[j](item.parts[j]);
  2619. }
  2620. for(; j < item.parts.length; j++) {
  2621. domStyle.parts.push(addStyle(item.parts[j], options));
  2622. }
  2623. } else {
  2624. var parts = [];
  2625. for(var j = 0; j < item.parts.length; j++) {
  2626. parts.push(addStyle(item.parts[j], options));
  2627. }
  2628. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  2629. }
  2630. }
  2631. }
  2632. function listToStyles (list, options) {
  2633. var styles = [];
  2634. var newStyles = {};
  2635. for (var i = 0; i < list.length; i++) {
  2636. var item = list[i];
  2637. var id = options.base ? item[0] + options.base : item[0];
  2638. var css = item[1];
  2639. var media = item[2];
  2640. var sourceMap = item[3];
  2641. var part = {css: css, media: media, sourceMap: sourceMap};
  2642. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  2643. else newStyles[id].parts.push(part);
  2644. }
  2645. return styles;
  2646. }
  2647. function insertStyleElement (options, style) {
  2648. var target = getElement(options.insertInto)
  2649. if (!target) {
  2650. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  2651. }
  2652. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  2653. if (options.insertAt === "top") {
  2654. if (!lastStyleElementInsertedAtTop) {
  2655. target.insertBefore(style, target.firstChild);
  2656. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  2657. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  2658. } else {
  2659. target.appendChild(style);
  2660. }
  2661. stylesInsertedAtTop.push(style);
  2662. } else if (options.insertAt === "bottom") {
  2663. target.appendChild(style);
  2664. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  2665. var nextSibling = getElement(options.insertAt.before, target);
  2666. target.insertBefore(style, nextSibling);
  2667. } else {
  2668. 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");
  2669. }
  2670. }
  2671. function removeStyleElement (style) {
  2672. if (style.parentNode === null) return false;
  2673. style.parentNode.removeChild(style);
  2674. var idx = stylesInsertedAtTop.indexOf(style);
  2675. if(idx >= 0) {
  2676. stylesInsertedAtTop.splice(idx, 1);
  2677. }
  2678. }
  2679. function createStyleElement (options) {
  2680. var style = document.createElement("style");
  2681. if(options.attrs.type === undefined) {
  2682. options.attrs.type = "text/css";
  2683. }
  2684. if(options.attrs.nonce === undefined) {
  2685. var nonce = getNonce();
  2686. if (nonce) {
  2687. options.attrs.nonce = nonce;
  2688. }
  2689. }
  2690. addAttrs(style, options.attrs);
  2691. insertStyleElement(options, style);
  2692. return style;
  2693. }
  2694. function createLinkElement (options) {
  2695. var link = document.createElement("link");
  2696. if(options.attrs.type === undefined) {
  2697. options.attrs.type = "text/css";
  2698. }
  2699. options.attrs.rel = "stylesheet";
  2700. addAttrs(link, options.attrs);
  2701. insertStyleElement(options, link);
  2702. return link;
  2703. }
  2704. function addAttrs (el, attrs) {
  2705. Object.keys(attrs).forEach(function (key) {
  2706. el.setAttribute(key, attrs[key]);
  2707. });
  2708. }
  2709. function getNonce() {
  2710. if (false) {}
  2711. return __webpack_require__.nc;
  2712. }
  2713. function addStyle (obj, options) {
  2714. var style, update, remove, result;
  2715. // If a transform function was defined, run it on the css
  2716. if (options.transform && obj.css) {
  2717. result = typeof options.transform === 'function'
  2718. ? options.transform(obj.css)
  2719. : options.transform.default(obj.css);
  2720. if (result) {
  2721. // If transform returns a value, use that instead of the original css.
  2722. // This allows running runtime transformations on the css.
  2723. obj.css = result;
  2724. } else {
  2725. // If the transform function returns a falsy value, don't add this css.
  2726. // This allows conditional loading of css
  2727. return function() {
  2728. // noop
  2729. };
  2730. }
  2731. }
  2732. if (options.singleton) {
  2733. var styleIndex = singletonCounter++;
  2734. style = singleton || (singleton = createStyleElement(options));
  2735. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  2736. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  2737. } else if (
  2738. obj.sourceMap &&
  2739. typeof URL === "function" &&
  2740. typeof URL.createObjectURL === "function" &&
  2741. typeof URL.revokeObjectURL === "function" &&
  2742. typeof Blob === "function" &&
  2743. typeof btoa === "function"
  2744. ) {
  2745. style = createLinkElement(options);
  2746. update = updateLink.bind(null, style, options);
  2747. remove = function () {
  2748. removeStyleElement(style);
  2749. if(style.href) URL.revokeObjectURL(style.href);
  2750. };
  2751. } else {
  2752. style = createStyleElement(options);
  2753. update = applyToTag.bind(null, style);
  2754. remove = function () {
  2755. removeStyleElement(style);
  2756. };
  2757. }
  2758. update(obj);
  2759. return function updateStyle (newObj) {
  2760. if (newObj) {
  2761. if (
  2762. newObj.css === obj.css &&
  2763. newObj.media === obj.media &&
  2764. newObj.sourceMap === obj.sourceMap
  2765. ) {
  2766. return;
  2767. }
  2768. update(obj = newObj);
  2769. } else {
  2770. remove();
  2771. }
  2772. };
  2773. }
  2774. var replaceText = (function () {
  2775. var textStore = [];
  2776. return function (index, replacement) {
  2777. textStore[index] = replacement;
  2778. return textStore.filter(Boolean).join('\n');
  2779. };
  2780. })();
  2781. function applyToSingletonTag (style, index, remove, obj) {
  2782. var css = remove ? "" : obj.css;
  2783. if (style.styleSheet) {
  2784. style.styleSheet.cssText = replaceText(index, css);
  2785. } else {
  2786. var cssNode = document.createTextNode(css);
  2787. var childNodes = style.childNodes;
  2788. if (childNodes[index]) style.removeChild(childNodes[index]);
  2789. if (childNodes.length) {
  2790. style.insertBefore(cssNode, childNodes[index]);
  2791. } else {
  2792. style.appendChild(cssNode);
  2793. }
  2794. }
  2795. }
  2796. function applyToTag (style, obj) {
  2797. var css = obj.css;
  2798. var media = obj.media;
  2799. if(media) {
  2800. style.setAttribute("media", media)
  2801. }
  2802. if(style.styleSheet) {
  2803. style.styleSheet.cssText = css;
  2804. } else {
  2805. while(style.firstChild) {
  2806. style.removeChild(style.firstChild);
  2807. }
  2808. style.appendChild(document.createTextNode(css));
  2809. }
  2810. }
  2811. function updateLink (link, options, obj) {
  2812. var css = obj.css;
  2813. var sourceMap = obj.sourceMap;
  2814. /*
  2815. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  2816. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  2817. on by default. Otherwise default to the convertToAbsoluteUrls option
  2818. directly
  2819. */
  2820. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  2821. if (options.convertToAbsoluteUrls || autoFixUrls) {
  2822. css = fixUrls(css);
  2823. }
  2824. if (sourceMap) {
  2825. // http://stackoverflow.com/a/26603875
  2826. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  2827. }
  2828. var blob = new Blob([css], { type: "text/css" });
  2829. var oldSrc = link.href;
  2830. link.href = URL.createObjectURL(blob);
  2831. if(oldSrc) URL.revokeObjectURL(oldSrc);
  2832. }
  2833. /***/ }),
  2834. /***/ 60:
  2835. /***/ (function(module, exports, __webpack_require__) {
  2836. "use strict";
  2837. exports.__esModule = true;
  2838. exports.BindEventMixin = BindEventMixin;
  2839. var _event = __webpack_require__(30);
  2840. /**
  2841. * Bind event when mounted or activated
  2842. */
  2843. var uid = 0;
  2844. function BindEventMixin(handler) {
  2845. var key = "binded_" + uid++;
  2846. function bind() {
  2847. if (!this[key]) {
  2848. handler.call(this, _event.on, true);
  2849. this[key] = true;
  2850. }
  2851. }
  2852. function unbind() {
  2853. if (this[key]) {
  2854. handler.call(this, _event.off, false);
  2855. this[key] = false;
  2856. }
  2857. }
  2858. return {
  2859. mounted: bind,
  2860. activated: bind,
  2861. deactivated: unbind,
  2862. beforeDestroy: unbind
  2863. };
  2864. }
  2865. /***/ }),
  2866. /***/ 64:
  2867. /***/ (function(module, exports, __webpack_require__) {
  2868. "use strict";
  2869. exports.__esModule = true;
  2870. exports.removeNode = removeNode;
  2871. function removeNode(el) {
  2872. var parent = el.parentNode;
  2873. if (parent) {
  2874. parent.removeChild(el);
  2875. }
  2876. }
  2877. /***/ }),
  2878. /***/ 67:
  2879. /***/ (function(module, exports, __webpack_require__) {
  2880. "use strict";
  2881. exports.__esModule = true;
  2882. exports.context = void 0;
  2883. var context = {
  2884. zIndex: 2000,
  2885. lockCount: 0,
  2886. stack: [],
  2887. find: function find(vm) {
  2888. return this.stack.filter(function (item) {
  2889. return item.vm === vm;
  2890. })[0];
  2891. }
  2892. };
  2893. exports.context = context;
  2894. /***/ }),
  2895. /***/ 71:
  2896. /***/ (function(module, exports, __webpack_require__) {
  2897. "use strict";
  2898. var _interopRequireDefault = __webpack_require__(1);
  2899. exports.__esModule = true;
  2900. exports.default = void 0;
  2901. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  2902. var _utils = __webpack_require__(0);
  2903. var _functional = __webpack_require__(14);
  2904. // Utils
  2905. var _createNamespace = (0, _utils.createNamespace)('loading'),
  2906. createComponent = _createNamespace[0],
  2907. bem = _createNamespace[1];
  2908. function LoadingIcon(h, props) {
  2909. if (props.type === 'spinner') {
  2910. var Spin = [];
  2911. for (var i = 0; i < 12; i++) {
  2912. Spin.push(h("i"));
  2913. }
  2914. return Spin;
  2915. }
  2916. return h("svg", {
  2917. "class": bem('circular'),
  2918. "attrs": {
  2919. "viewBox": "25 25 50 50"
  2920. }
  2921. }, [h("circle", {
  2922. "attrs": {
  2923. "cx": "50",
  2924. "cy": "50",
  2925. "r": "20",
  2926. "fill": "none"
  2927. }
  2928. })]);
  2929. }
  2930. function LoadingText(h, props, slots) {
  2931. if (slots.default) {
  2932. var _props$textColor;
  2933. var style = {
  2934. fontSize: (0, _utils.addUnit)(props.textSize),
  2935. color: (_props$textColor = props.textColor) != null ? _props$textColor : props.color
  2936. };
  2937. return h("span", {
  2938. "class": bem('text'),
  2939. "style": style
  2940. }, [slots.default()]);
  2941. }
  2942. }
  2943. function Loading(h, props, slots, ctx) {
  2944. var color = props.color,
  2945. size = props.size,
  2946. type = props.type;
  2947. var style = {
  2948. color: color
  2949. };
  2950. if (size) {
  2951. var iconSize = (0, _utils.addUnit)(size);
  2952. style.width = iconSize;
  2953. style.height = iconSize;
  2954. }
  2955. return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
  2956. "class": bem([type, {
  2957. vertical: props.vertical
  2958. }])
  2959. }, (0, _functional.inherit)(ctx, true)]), [h("span", {
  2960. "class": bem('spinner', type),
  2961. "style": style
  2962. }, [LoadingIcon(h, props)]), LoadingText(h, props, slots)]);
  2963. }
  2964. Loading.props = {
  2965. color: String,
  2966. size: [Number, String],
  2967. vertical: Boolean,
  2968. textSize: [Number, String],
  2969. textColor: String,
  2970. type: {
  2971. type: String,
  2972. default: 'circular'
  2973. }
  2974. };
  2975. var _default = createComponent(Loading);
  2976. exports.default = _default;
  2977. /***/ }),
  2978. /***/ 73:
  2979. /***/ (function(module, exports, __webpack_require__) {
  2980. var content = __webpack_require__(74);
  2981. if(typeof content === 'string') content = [[module.i, content, '']];
  2982. var transform;
  2983. var insertInto;
  2984. var options = {"hmr":true}
  2985. options.transform = transform
  2986. options.insertInto = undefined;
  2987. var update = __webpack_require__(6)(content, options);
  2988. if(content.locals) module.exports = content.locals;
  2989. if(false) {}
  2990. /***/ }),
  2991. /***/ 74:
  2992. /***/ (function(module, exports, __webpack_require__) {
  2993. exports = module.exports = __webpack_require__(5)(false);
  2994. // Module
  2995. exports.push([module.i, ".van-loading{position:relative;color:#c8c9cc;font-size:0;vertical-align:middle}.van-loading__spinner{position:relative;display:inline-block;width:30px;max-width:100%;height:30px;max-height:100%;vertical-align:middle;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--spinner i{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__spinner--spinner i::before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:' '}.van-loading__spinner--circular{-webkit-animation-duration:2s;animation-duration:2s}.van-loading__circular{display:block;width:100%;height:100%}.van-loading__circular circle{-webkit-animation:van-circular 1.5s ease-in-out infinite;animation:van-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.van-loading__text{display:inline-block;margin-left:8px;color:#969799;font-size:14px;vertical-align:middle}.van-loading--vertical{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-loading--vertical .van-loading__text{margin:8px 0 0}@-webkit-keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}@keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}.van-loading__spinner--spinner i:nth-of-type(1){-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__spinner--spinner i:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__spinner--spinner i:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__spinner--spinner i:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__spinner--spinner i:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__spinner--spinner i:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__spinner--spinner i:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__spinner--spinner i:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__spinner--spinner i:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__spinner--spinner i:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__spinner--spinner i:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__spinner--spinner i:nth-of-type(12){-webkit-transform:rotate(360deg);transform:rotate(360deg);opacity:.3125}", ""]);
  2996. /***/ }),
  2997. /***/ 75:
  2998. /***/ (function(module, exports, __webpack_require__) {
  2999. "use strict";
  3000. exports.__esModule = true;
  3001. exports.PopupMixin = PopupMixin;
  3002. exports.popupMixinProps = void 0;
  3003. var _context = __webpack_require__(67);
  3004. var _overlay = __webpack_require__(84);
  3005. var _event = __webpack_require__(30);
  3006. var _node = __webpack_require__(64);
  3007. var _scroll = __webpack_require__(53);
  3008. var _touch = __webpack_require__(51);
  3009. var _portal = __webpack_require__(78);
  3010. var _closeOnPopstate = __webpack_require__(85);
  3011. // Context
  3012. // Utils
  3013. // Mixins
  3014. var popupMixinProps = {
  3015. // Initial rendering animation
  3016. transitionAppear: Boolean,
  3017. // whether to show popup
  3018. value: Boolean,
  3019. // whether to show overlay
  3020. overlay: Boolean,
  3021. // overlay custom style
  3022. overlayStyle: Object,
  3023. // overlay custom class name
  3024. overlayClass: String,
  3025. // whether to close popup when overlay is clicked
  3026. closeOnClickOverlay: Boolean,
  3027. // z-index
  3028. zIndex: [Number, String],
  3029. // prevent body scroll
  3030. lockScroll: {
  3031. type: Boolean,
  3032. default: true
  3033. },
  3034. // whether to lazy render
  3035. lazyRender: {
  3036. type: Boolean,
  3037. default: true
  3038. }
  3039. };
  3040. exports.popupMixinProps = popupMixinProps;
  3041. function PopupMixin(options) {
  3042. if (options === void 0) {
  3043. options = {};
  3044. }
  3045. return {
  3046. mixins: [_touch.TouchMixin, _closeOnPopstate.CloseOnPopstateMixin, (0, _portal.PortalMixin)({
  3047. afterPortal: function afterPortal() {
  3048. if (this.overlay) {
  3049. (0, _overlay.updateOverlay)();
  3050. }
  3051. }
  3052. })],
  3053. props: popupMixinProps,
  3054. data: function data() {
  3055. return {
  3056. inited: this.value
  3057. };
  3058. },
  3059. computed: {
  3060. shouldRender: function shouldRender() {
  3061. return this.inited || !this.lazyRender;
  3062. }
  3063. },
  3064. watch: {
  3065. value: function value(val) {
  3066. var type = val ? 'open' : 'close';
  3067. this.inited = this.inited || this.value;
  3068. this[type]();
  3069. if (!options.skipToggleEvent) {
  3070. this.$emit(type);
  3071. }
  3072. },
  3073. overlay: 'renderOverlay'
  3074. },
  3075. mounted: function mounted() {
  3076. if (this.value) {
  3077. this.open();
  3078. }
  3079. },
  3080. /* istanbul ignore next */
  3081. activated: function activated() {
  3082. if (this.shouldReopen) {
  3083. this.$emit('input', true);
  3084. this.shouldReopen = false;
  3085. }
  3086. },
  3087. beforeDestroy: function beforeDestroy() {
  3088. (0, _overlay.removeOverlay)(this);
  3089. if (this.opened) {
  3090. this.removeLock();
  3091. }
  3092. if (this.getContainer) {
  3093. (0, _node.removeNode)(this.$el);
  3094. }
  3095. },
  3096. /* istanbul ignore next */
  3097. deactivated: function deactivated() {
  3098. if (this.value) {
  3099. this.close();
  3100. this.shouldReopen = true;
  3101. }
  3102. },
  3103. methods: {
  3104. open: function open() {
  3105. /* istanbul ignore next */
  3106. if (this.$isServer || this.opened) {
  3107. return;
  3108. } // cover default zIndex
  3109. if (this.zIndex !== undefined) {
  3110. _context.context.zIndex = this.zIndex;
  3111. }
  3112. this.opened = true;
  3113. this.renderOverlay();
  3114. this.addLock();
  3115. },
  3116. addLock: function addLock() {
  3117. if (this.lockScroll) {
  3118. (0, _event.on)(document, 'touchstart', this.touchStart);
  3119. (0, _event.on)(document, 'touchmove', this.onTouchMove);
  3120. if (!_context.context.lockCount) {
  3121. document.body.classList.add('van-overflow-hidden');
  3122. }
  3123. _context.context.lockCount++;
  3124. }
  3125. },
  3126. removeLock: function removeLock() {
  3127. if (this.lockScroll && _context.context.lockCount) {
  3128. _context.context.lockCount--;
  3129. (0, _event.off)(document, 'touchstart', this.touchStart);
  3130. (0, _event.off)(document, 'touchmove', this.onTouchMove);
  3131. if (!_context.context.lockCount) {
  3132. document.body.classList.remove('van-overflow-hidden');
  3133. }
  3134. }
  3135. },
  3136. close: function close() {
  3137. if (!this.opened) {
  3138. return;
  3139. }
  3140. (0, _overlay.closeOverlay)(this);
  3141. this.opened = false;
  3142. this.removeLock();
  3143. this.$emit('input', false);
  3144. },
  3145. onTouchMove: function onTouchMove(event) {
  3146. this.touchMove(event);
  3147. var direction = this.deltaY > 0 ? '10' : '01';
  3148. var el = (0, _scroll.getScroller)(event.target, this.$el);
  3149. var scrollHeight = el.scrollHeight,
  3150. offsetHeight = el.offsetHeight,
  3151. scrollTop = el.scrollTop;
  3152. var status = '11';
  3153. /* istanbul ignore next */
  3154. if (scrollTop === 0) {
  3155. status = offsetHeight >= scrollHeight ? '00' : '01';
  3156. } else if (scrollTop + offsetHeight >= scrollHeight) {
  3157. status = '10';
  3158. }
  3159. /* istanbul ignore next */
  3160. if (status !== '11' && this.direction === 'vertical' && !(parseInt(status, 2) & parseInt(direction, 2))) {
  3161. (0, _event.preventDefault)(event, true);
  3162. }
  3163. },
  3164. renderOverlay: function renderOverlay() {
  3165. var _this = this;
  3166. if (this.$isServer || !this.value) {
  3167. return;
  3168. }
  3169. this.$nextTick(function () {
  3170. _this.updateZIndex(_this.overlay ? 1 : 0);
  3171. if (_this.overlay) {
  3172. (0, _overlay.openOverlay)(_this, {
  3173. zIndex: _context.context.zIndex++,
  3174. duration: _this.duration,
  3175. className: _this.overlayClass,
  3176. customStyle: _this.overlayStyle
  3177. });
  3178. } else {
  3179. (0, _overlay.closeOverlay)(_this);
  3180. }
  3181. });
  3182. },
  3183. updateZIndex: function updateZIndex(value) {
  3184. if (value === void 0) {
  3185. value = 0;
  3186. }
  3187. this.$el.style.zIndex = ++_context.context.zIndex + value;
  3188. }
  3189. }
  3190. };
  3191. }
  3192. /***/ }),
  3193. /***/ 76:
  3194. /***/ (function(module, exports, __webpack_require__) {
  3195. "use strict";
  3196. var _interopRequireDefault = __webpack_require__(1);
  3197. exports.__esModule = true;
  3198. exports.default = void 0;
  3199. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  3200. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  3201. var _utils = __webpack_require__(0);
  3202. var _functional = __webpack_require__(14);
  3203. var _event = __webpack_require__(30);
  3204. // Utils
  3205. var _createNamespace = (0, _utils.createNamespace)('overlay'),
  3206. createComponent = _createNamespace[0],
  3207. bem = _createNamespace[1];
  3208. function preventTouchMove(event) {
  3209. (0, _event.preventDefault)(event, true);
  3210. }
  3211. function Overlay(h, props, slots, ctx) {
  3212. var style = (0, _extends2.default)({
  3213. zIndex: props.zIndex
  3214. }, props.customStyle);
  3215. if ((0, _utils.isDef)(props.duration)) {
  3216. style.animationDuration = props.duration + "s";
  3217. }
  3218. return h("transition", {
  3219. "attrs": {
  3220. "name": "van-fade"
  3221. }
  3222. }, [h("div", (0, _babelHelperVueJsxMergeProps.default)([{
  3223. "directives": [{
  3224. name: "show",
  3225. value: props.show
  3226. }],
  3227. "style": style,
  3228. "class": [bem(), props.className],
  3229. "on": {
  3230. "touchmove": props.lockScroll ? preventTouchMove : _utils.noop
  3231. }
  3232. }, (0, _functional.inherit)(ctx, true)]), [slots.default == null ? void 0 : slots.default()])]);
  3233. }
  3234. Overlay.props = {
  3235. show: Boolean,
  3236. zIndex: [Number, String],
  3237. duration: [Number, String],
  3238. className: null,
  3239. customStyle: Object,
  3240. lockScroll: {
  3241. type: Boolean,
  3242. default: true
  3243. }
  3244. };
  3245. var _default = createComponent(Overlay);
  3246. exports.default = _default;
  3247. /***/ }),
  3248. /***/ 78:
  3249. /***/ (function(module, exports, __webpack_require__) {
  3250. "use strict";
  3251. exports.__esModule = true;
  3252. exports.PortalMixin = PortalMixin;
  3253. function getElement(selector) {
  3254. if (typeof selector === 'string') {
  3255. return document.querySelector(selector);
  3256. }
  3257. return selector();
  3258. }
  3259. function PortalMixin(_temp) {
  3260. var _ref = _temp === void 0 ? {} : _temp,
  3261. ref = _ref.ref,
  3262. afterPortal = _ref.afterPortal;
  3263. return {
  3264. props: {
  3265. getContainer: [String, Function]
  3266. },
  3267. watch: {
  3268. getContainer: 'portal'
  3269. },
  3270. mounted: function mounted() {
  3271. if (this.getContainer) {
  3272. this.portal();
  3273. }
  3274. },
  3275. methods: {
  3276. portal: function portal() {
  3277. var getContainer = this.getContainer;
  3278. var el = ref ? this.$refs[ref] : this.$el;
  3279. var container;
  3280. if (getContainer) {
  3281. container = getElement(getContainer);
  3282. } else if (this.$parent) {
  3283. container = this.$parent.$el;
  3284. }
  3285. if (container && container !== el.parentNode) {
  3286. container.appendChild(el);
  3287. }
  3288. if (afterPortal) {
  3289. afterPortal.call(this);
  3290. }
  3291. }
  3292. }
  3293. };
  3294. }
  3295. /***/ }),
  3296. /***/ 79:
  3297. /***/ (function(module, exports, __webpack_require__) {
  3298. var content = __webpack_require__(80);
  3299. if(typeof content === 'string') content = [[module.i, content, '']];
  3300. var transform;
  3301. var insertInto;
  3302. var options = {"hmr":true}
  3303. options.transform = transform
  3304. options.insertInto = undefined;
  3305. var update = __webpack_require__(6)(content, options);
  3306. if(content.locals) module.exports = content.locals;
  3307. if(false) {}
  3308. /***/ }),
  3309. /***/ 80:
  3310. /***/ (function(module, exports, __webpack_require__) {
  3311. exports = module.exports = __webpack_require__(5)(false);
  3312. // Module
  3313. exports.push([module.i, ".van-overlay{position:fixed;top:0;left:0;z-index:1;width:100%;height:100%;background-color:rgba(0,0,0,.7)}", ""]);
  3314. /***/ }),
  3315. /***/ 81:
  3316. /***/ (function(module, exports, __webpack_require__) {
  3317. "use strict";
  3318. exports.__esModule = true;
  3319. exports.range = range;
  3320. exports.formatNumber = formatNumber;
  3321. function range(num, min, max) {
  3322. return Math.min(Math.max(num, min), max);
  3323. }
  3324. function trimExtraChar(value, _char, regExp) {
  3325. var index = value.indexOf(_char);
  3326. if (index === -1) {
  3327. return value;
  3328. }
  3329. if (_char === '-' && index !== 0) {
  3330. return value.slice(0, index);
  3331. }
  3332. return value.slice(0, index + 1) + value.slice(index).replace(regExp, '');
  3333. }
  3334. function formatNumber(value, allowDot, allowMinus) {
  3335. if (allowDot === void 0) {
  3336. allowDot = true;
  3337. }
  3338. if (allowMinus === void 0) {
  3339. allowMinus = true;
  3340. }
  3341. if (allowDot) {
  3342. value = trimExtraChar(value, '.', /\./g);
  3343. } else {
  3344. value = value.split('.')[0];
  3345. }
  3346. if (allowMinus) {
  3347. value = trimExtraChar(value, '-', /-/g);
  3348. } else {
  3349. value = value.replace(/-/, '');
  3350. }
  3351. var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
  3352. return value.replace(regExp, '');
  3353. }
  3354. /***/ }),
  3355. /***/ 82:
  3356. /***/ (function(module, exports, __webpack_require__) {
  3357. var content = __webpack_require__(83);
  3358. if(typeof content === 'string') content = [[module.i, content, '']];
  3359. var transform;
  3360. var insertInto;
  3361. var options = {"hmr":true}
  3362. options.transform = transform
  3363. options.insertInto = undefined;
  3364. var update = __webpack_require__(6)(content, options);
  3365. if(content.locals) module.exports = content.locals;
  3366. if(false) {}
  3367. /***/ }),
  3368. /***/ 83:
  3369. /***/ (function(module, exports, __webpack_require__) {
  3370. exports = module.exports = __webpack_require__(5)(false);
  3371. // Module
  3372. exports.push([module.i, ".van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;background-color:#fff;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:16px}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 16px 16px}.van-popup--right{top:50%;right:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:16px 0 0 16px}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:16px 16px 0 0}.van-popup--left{top:50%;left:0;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 16px 16px 0}.van-popup--safe-area-inset-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-popup-slide-bottom-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-top-enter-active{-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.van-popup-slide-bottom-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-top-leave-active{-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.van-popup-slide-top-enter,.van-popup-slide-top-leave-active{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter,.van-popup-slide-right-leave-active{-webkit-transform:translate3d(100%,-50%,0);transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter,.van-popup-slide-bottom-leave-active{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-popup-slide-left-enter,.van-popup-slide-left-leave-active{-webkit-transform:translate3d(-100%,-50%,0);transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:1;color:#c8c9cc;font-size:22px;cursor:pointer}.van-popup__close-icon:active{color:#969799}.van-popup__close-icon--top-left{top:16px;left:16px}.van-popup__close-icon--top-right{top:16px;right:16px}.van-popup__close-icon--bottom-left{bottom:16px;left:16px}.van-popup__close-icon--bottom-right{right:16px;bottom:16px}", ""]);
  3373. /***/ }),
  3374. /***/ 84:
  3375. /***/ (function(module, exports, __webpack_require__) {
  3376. "use strict";
  3377. var _interopRequireDefault = __webpack_require__(1);
  3378. exports.__esModule = true;
  3379. exports.updateOverlay = updateOverlay;
  3380. exports.openOverlay = openOverlay;
  3381. exports.closeOverlay = closeOverlay;
  3382. exports.removeOverlay = removeOverlay;
  3383. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  3384. var _overlay = _interopRequireDefault(__webpack_require__(76));
  3385. var _context = __webpack_require__(67);
  3386. var _functional = __webpack_require__(14);
  3387. var _node = __webpack_require__(64);
  3388. var defaultConfig = {
  3389. className: '',
  3390. customStyle: {}
  3391. };
  3392. function mountOverlay(vm) {
  3393. return (0, _functional.mount)(_overlay.default, {
  3394. on: {
  3395. // close popup when overlay clicked & closeOnClickOverlay is true
  3396. click: function click() {
  3397. vm.$emit('click-overlay');
  3398. if (vm.closeOnClickOverlay) {
  3399. if (vm.onClickOverlay) {
  3400. vm.onClickOverlay();
  3401. } else {
  3402. vm.close();
  3403. }
  3404. }
  3405. }
  3406. }
  3407. });
  3408. }
  3409. function updateOverlay(vm) {
  3410. var item = _context.context.find(vm);
  3411. if (item) {
  3412. var el = vm.$el;
  3413. var config = item.config,
  3414. overlay = item.overlay;
  3415. if (el && el.parentNode) {
  3416. el.parentNode.insertBefore(overlay.$el, el);
  3417. }
  3418. (0, _extends2.default)(overlay, defaultConfig, config, {
  3419. show: true
  3420. });
  3421. }
  3422. }
  3423. function openOverlay(vm, config) {
  3424. var item = _context.context.find(vm);
  3425. if (item) {
  3426. item.config = config;
  3427. } else {
  3428. var overlay = mountOverlay(vm);
  3429. _context.context.stack.push({
  3430. vm: vm,
  3431. config: config,
  3432. overlay: overlay
  3433. });
  3434. }
  3435. updateOverlay(vm);
  3436. }
  3437. function closeOverlay(vm) {
  3438. var item = _context.context.find(vm);
  3439. if (item) {
  3440. item.overlay.show = false;
  3441. }
  3442. }
  3443. function removeOverlay(vm) {
  3444. var item = _context.context.find(vm);
  3445. if (item) {
  3446. (0, _node.removeNode)(item.overlay.$el);
  3447. }
  3448. }
  3449. /***/ }),
  3450. /***/ 85:
  3451. /***/ (function(module, exports, __webpack_require__) {
  3452. "use strict";
  3453. exports.__esModule = true;
  3454. exports.CloseOnPopstateMixin = void 0;
  3455. var _event = __webpack_require__(30);
  3456. var _bindEvent = __webpack_require__(60);
  3457. var CloseOnPopstateMixin = {
  3458. mixins: [(0, _bindEvent.BindEventMixin)(function (bind, isBind) {
  3459. this.handlePopstate(isBind && this.closeOnPopstate);
  3460. })],
  3461. props: {
  3462. closeOnPopstate: Boolean
  3463. },
  3464. data: function data() {
  3465. return {
  3466. bindStatus: false
  3467. };
  3468. },
  3469. watch: {
  3470. closeOnPopstate: function closeOnPopstate(val) {
  3471. this.handlePopstate(val);
  3472. }
  3473. },
  3474. methods: {
  3475. onPopstate: function onPopstate() {
  3476. this.close();
  3477. this.shouldReopen = false;
  3478. },
  3479. handlePopstate: function handlePopstate(bind) {
  3480. /* istanbul ignore if */
  3481. if (this.$isServer) {
  3482. return;
  3483. }
  3484. if (this.bindStatus !== bind) {
  3485. this.bindStatus = bind;
  3486. var action = bind ? _event.on : _event.off;
  3487. action(window, 'popstate', this.onPopstate);
  3488. }
  3489. }
  3490. }
  3491. };
  3492. exports.CloseOnPopstateMixin = CloseOnPopstateMixin;
  3493. /***/ }),
  3494. /***/ 86:
  3495. /***/ (function(module, exports, __webpack_require__) {
  3496. "use strict";
  3497. /* WEBPACK VAR INJECTION */(function(global) {
  3498. exports.__esModule = true;
  3499. exports.raf = raf;
  3500. exports.doubleRaf = doubleRaf;
  3501. exports.cancelRaf = cancelRaf;
  3502. var _ = __webpack_require__(0);
  3503. /**
  3504. * requestAnimationFrame polyfill
  3505. */
  3506. var prev = Date.now();
  3507. /* istanbul ignore next */
  3508. function fallback(fn) {
  3509. var curr = Date.now();
  3510. var ms = Math.max(0, 16 - (curr - prev));
  3511. var id = setTimeout(fn, ms);
  3512. prev = curr + ms;
  3513. return id;
  3514. }
  3515. /* istanbul ignore next */
  3516. var root = _.isServer ? global : window;
  3517. /* istanbul ignore next */
  3518. var iRaf = root.requestAnimationFrame || fallback;
  3519. /* istanbul ignore next */
  3520. var iCancel = root.cancelAnimationFrame || root.clearTimeout;
  3521. function raf(fn) {
  3522. return iRaf.call(root, fn);
  3523. } // double raf for animation
  3524. function doubleRaf(fn) {
  3525. raf(function () {
  3526. raf(fn);
  3527. });
  3528. }
  3529. function cancelRaf(id) {
  3530. iCancel.call(root, id);
  3531. }
  3532. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(87)))
  3533. /***/ }),
  3534. /***/ 87:
  3535. /***/ (function(module, exports) {
  3536. var g;
  3537. // This works in non-strict mode
  3538. g = (function() {
  3539. return this;
  3540. })();
  3541. try {
  3542. // This works if eval is allowed (see CSP)
  3543. g = g || new Function("return this")();
  3544. } catch (e) {
  3545. // This works if the window reference is available
  3546. if (typeof window === "object") g = window;
  3547. }
  3548. // g can still be undefined, but nothing to do about it...
  3549. // We return undefined, instead of nothing here, so it's
  3550. // easier to handle this case. if(!global) { ...}
  3551. module.exports = g;
  3552. /***/ }),
  3553. /***/ 9:
  3554. /***/ (function(module, exports, __webpack_require__) {
  3555. "use strict";
  3556. exports.__esModule = true;
  3557. exports.camelize = camelize;
  3558. exports.padZero = padZero;
  3559. var camelizeRE = /-(\w)/g;
  3560. function camelize(str) {
  3561. return str.replace(camelizeRE, function (_, c) {
  3562. return c.toUpperCase();
  3563. });
  3564. }
  3565. function padZero(num, targetLength) {
  3566. if (targetLength === void 0) {
  3567. targetLength = 2;
  3568. }
  3569. var str = num + '';
  3570. while (str.length < targetLength) {
  3571. str = '0' + str;
  3572. }
  3573. return str;
  3574. }
  3575. /***/ }),
  3576. /***/ 94:
  3577. /***/ (function(module, exports, __webpack_require__) {
  3578. "use strict";
  3579. exports.__esModule = true;
  3580. exports.isHidden = isHidden;
  3581. function isHidden(el) {
  3582. var style = window.getComputedStyle(el);
  3583. var hidden = style.display === 'none'; // offsetParent returns null in the following situations:
  3584. // 1. The element or its parent element has the display property set to none.
  3585. // 2. The element has the position property set to fixed
  3586. var parentHidden = el.offsetParent === null && style.position !== 'fixed';
  3587. return hidden || parentHidden;
  3588. }
  3589. /***/ })
  3590. /******/ });